Migrate database from sqlite to local postgres container #53

Closed
imaznaseem wants to merge 1 commit from 36-migrate-new_database into main
Owner

I swapped our local SQLite setup for a Postgres Docker container so our local dev environment actually matches our live server.

In docker-compose.yml: Added the postgres:15 container.

In Cargo.toml & main.rs: Switched SeaORM to the Postgres driver and removed the old SQLite table building code.

Take a look at it and see if its ok. After that in main we will need to migrate the actual data on the live server. I looked into it and a tool called pgloader looks good for this. It will aitomaticially translate and push our old SQLite .db file straight into the new Postgres database. However, if anyone knows a better tool, feel free to use that instead.

I actually don't have my SSH access set up for the live server right now. Could someone else handle running the pgloader migration once this is merged?

I swapped our local SQLite setup for a Postgres Docker container so our local dev environment actually matches our live server. In docker-compose.yml: Added the postgres:15 container. In Cargo.toml & main.rs: Switched SeaORM to the Postgres driver and removed the old SQLite table building code. Take a look at it and see if its ok. After that in main we will need to migrate the actual data on the live server. I looked into it and a tool called pgloader looks good for this. It will aitomaticially translate and push our old SQLite .db file straight into the new Postgres database. However, if anyone knows a better tool, feel free to use that instead. I actually don't have my SSH access set up for the live server right now. Could someone else handle running the pgloader migration once this is merged?
Migrate database from sqlite to local postgres container
All checks were successful
Static analysis / Check Rust code with Clippy and rustfmt (pull_request) Successful in 3m5s
Static analysis / Check Dockerfile with Hadolint (pull_request) Successful in 6s
9433852565
marfavi requested review from Owners 2026-04-17 12:19:58 +02:00
marfavi self-assigned this 2026-04-17 12:20:21 +02:00
Owner

Fixed by #55

Fixed by #55
marfavi closed this pull request 2026-04-24 16:11:18 +02:00
marfavi deleted branch 36-migrate-new_database 2026-04-24 16:11:26 +02:00
Commenting is not possible because the repository is archived.
No reviewers
DevOpps/Owners
No milestone
No project
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
DevOpps/minitwit!53
No description provided.