I want to convert my database in postgresql to sqlite3 during upgrading my software
2 Answers
Normally you do the oposite. If it is small, you take the metadata of each table, copy paste to the gui of sqlite and just change the differents datatype. Programmatically you prepare a list of "INSERT INTO bla bla" one for each row. If you use.net system use stringbuilder to compose the strings. The query must be sorted for the autoincrement value. Than run them. Small tip activate PRAGMA synchronous = OFF in sqlite if you have to insert a huge ammount of rows. Remember to format the data.