DB conversion: SQLite to PostgreSQL

No problem! :blush:

I did a restart and…:drum:… it worked! :tada:

I can now create tasks, teams, looking at the overview and upcoming page without any error messages and the labels are also there. Also, deleting those works flawlessly. I would say it is fixed. :thinking:

If I can help further with testing the implementation/merge of the fix in vikunja, just say it. I’m happy to help.


Sorry, I had too much information in my mind and wanted to tell it at the same time. :face_with_spiral_eyes:

It is true, the sequences are the same in this case. When comparing to SQLite and PostgreSQL there are some missing sequences if they made automatically by vikunja. But sure I can make a new post for this to have a better overview. :+1:

I meant that I created a new instance with PostgreSQL and Valkey. Then I created and copied the data by hand from my old instance to the new one. It was a bit tedious but worth it. It was like a side quest to this issue here. :smile:


Anyway, thank you for this big help and work here. It was a pleasure, and I’m looking forward to other possible collaboration. :handshake:

:penguin::wolf:

2 Likes

DB conversion: SQLite to PostgreSQL

PGLoader

The used command for pgloader is the following:

How to:

pgloader sqlite:///Path/to/the/SQLiteDatabase/vikunja.db pgsql://UserFromPostgreSQLServer:MySecurePassword@IPofPostgreSQLServer/Database

Real example which I used:

pgloader sqlite:///home/officerk/Downloads/vikunja.db pgsql://dev:LinuxForTheWin!@192.168.200.203/devdb

How to execute SQL script in PostgreSQL

To execute the SQL script, I used DBeaver, but sure you can also just login into the local PostgreSQL server and execute the script there.

Local:

psql -U username -d myDataBase -a -f myInsertFile

Adapted to my example from above, it would be:

psql -U dev -d devdb -a -f conv_bigint_to_boolean.sql

Remote:

psql -h remotehost -U username -d myDataBase -a -f myInsertFile

Adapted to my example from above, it would be:

psql -host 192.168.200.203 -U dev -d devdb -a -f conv_bigint_to_boolean.sql

Important Notice:

Keep in mind to open ports and setup PostgreSQL server to listen on all interfaces (postgresql.conf) if the server or tool is not on the same host, which I recommend. Also you may need to add a user entry for an successful remote authenticated connection in the pg_hba.conf file. More information about that file and function here.

The last thing is only needed if you want a remote connection to it. Local connection are always allowed if not configuration otherwise.

1 Like