Skip to content

Migrate from SQLite to PostgresQL

Jose V. Trigueros requested to merge add-postgres-migrations into master

I've been having a lot of issues with SQLite, namely because it's not meant to run in a highly concurrent system, which is exactly the use case for pawa. A lot of guilds are writing and reading from the same database so we end up losing some of the events or failing altogether.

This MR does a few things:

  • Updates the migrations so that we can apply them to a blank PostgresQL database
  • Update the migrate scripts by making a copy of the previous one
  • Modify code to accept host, username, password to the db initializer

Once the situation has been stabilized, I'll be making the changes less destructive so that we can run in SQLite or PostgresQL mode or perhaps just a local mode where there's no database or Minio datastore, problem for tomorrow :D

Merge request reports