Best way to convert sqlite database to postgresql database? (solved)

I have been trying to import this sqlite database into mysql or postgresql database. But had been failing. Can anyone help me with this?

8 points · 11 comments · view on lemmy.world

11 Comments

Double_A@discuss.tchncs.de · 5 pts · 3y (5 replies)

Maybe this? https://pgloader.readthedocs.io/en/latest/ref/sqlite.html

Also what have you tried, and how did it fail?

Timely_Jellyfish_2077@programming.dev · 1 pts · 3y (4 replies)

I have tried it. Getting this error: The value NIL is not of type STRING when binding STRING

Timely_Jellyfish_2077@programming.dev · 1 pts · 3y (2 replies)

Full error message: DB-CONNECTION-ERROR: Failed to connect to pgsql at "localhost" (port 5432) as user "postgres": The value NIL is not of type STRING when binding STRING An unhandled error condition has been signalled: Failed to connect to pgsql at "localhost" (port 5432) as user "postgres": The value NIL is not of type STRING when binding STRING

What I am doing here?

Failed to connect to pgsql at "localhost" (port 5432) as user "postgres": The value NIL is not of type STRING when binding STRING ___

Double_A@discuss.tchncs.de · 4 pts · 3y (1 reply)
Timely_Jellyfish_2077@programming.dev · 1 pts · 3y

Thanks man. It worked

pfannkuchen@lemmy.world · 1 pts · 3y

You might need to handle NULL values by explicit type casting

Timely_Jellyfish_2077@programming.dev · 1 pts · 3y

I exported the file in db drowser for sqlite into an sql file. When I tried importing in mysql workbench, i am getting this error: Error executing SQL script. '>' not supported between instances of 'NoneType' and 'int'.

Timely_Jellyfish_2077@programming.dev · -3 pts · 3y
[ removed ]
eluvatar@programming.dev · -3 pts · 3y (3 replies)

Great webdev question /s

Timely_Jellyfish_2077@programming.dev · 3 pts · 3y (1 reply)

Yeah I know. I didn't find better suitable community on lemmy. It's the closest one I got. Also searching for communities is little harder on lemmy.

eluvatar@programming.dev · 2 pts · 3y

Makes sense. I still haven't really figured out how searching works either.

Dunstabzugshaubitze@feddit.de · 1 pts · 3y

Actually, yes it's a fitting question unless you define webdev as just creating websites that might query an api via js.

The services that provide this apis are just as much part of our domain and basic knowledge about the other end of a communication channel benefits everyone.