Database migrations

From: Simon Connah <simon(dot)n(dot)connah(at)protonmail(dot)com>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Database migrations
Date: 2024-06-28 10:26:09
Message-ID: fbpkeeZLFOGdtB9bbncwzbn-sAu-VEIoln2KStvcs7BgYCA3th1QZNffk0fFgaSEHAqSUPK8-Jl3pkqUQjvjcXQ9CRnJ4I2hrZWM9ykEvwY=@protonmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I'm building a web app using the Python web framework Flask and I'm curious how I should handle database changes. At the moment I can just delete everything and load the SQL files but when I launch into production obviously I won't be able to do that. Currently all my database stuff is stored in a SQL file. One file for each table and includes stored procedures and function definitions.

I know there are libraries like Alembic but that seems to be for SQLAlchemy and not raw SQL and Flyway seems to require an expensive license to allow migration rollback so I'm wondering if anyone can offer some advice?

If you need more information then please let me know.

Simon.

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Wallach 2024-06-28 21:09:57 Vacuum Analyze
Previous Message Roxanne Reid-Bennett 2024-06-14 06:38:13 Re: How to create a View of geometry type equals point?