Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sN8o6-006zvq-Vg for pgsql-novice@arkaria.postgresql.org; Fri, 28 Jun 2024 10:26:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sN8o5-003STJ-8p for pgsql-novice@arkaria.postgresql.org; Fri, 28 Jun 2024 10:26:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sN8o4-003ST3-UG for pgsql-novice@lists.postgresql.org; Fri, 28 Jun 2024 10:26:17 +0000 Received: from mail-40133.protonmail.ch ([185.70.40.133]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sN8o2-003WtK-9J for pgsql-novice@postgresql.org; Fri, 28 Jun 2024 10:26:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1719570371; x=1719829571; bh=RUNy81WWcPJX2yWcdRKMRJ8ncL7/ivlrjKYTyBX/lJw=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=liXPB4x0ui/euFgHZqhZkq8u6J5LrhBTuzFVpYtrXAW43zojgHR49raXusiNFiKP6 16hi7VtdggVFhjOAHw/lt38UFfh71aFpvpErO1UlSQtb4GX8G3q/Aek5QwTaSz0HN7 7bzU6pvCN89h/5R5+/0p8MiR7osW4T8zROdY63HQhkeN54cqhNfvJGdXpoYrnh4YdJ buFTpE5WAC1DANvlTEJIo7h93ZzsNDi9deMI0s7KNp+KZn1i1SNHPnNutLsGGfGzlt 6BZ45mkyZCpoDrGV7p1TjWFa/YeHkSDEzgqn2We+iAMy/4Josz5jeQofS3CMigbkBG TCT/2Lk8kGR+Q== Date: Fri, 28 Jun 2024 10:26:09 +0000 To: "pgsql-novice@postgresql.org" From: Simon Connah Subject: Database migrations Message-ID: Feedback-ID: 24074989:user:proton X-Pm-Message-ID: 334c74c0fd92e7802b0f5d65bbed82d27463829f MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="------2b758f0942f1ed4b95295e83ca6b76c6008bd55513da1776784e1e5e448cb09f"; charset=utf-8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------2b758f0942f1ed4b95295e83ca6b76c6008bd55513da1776784e1e5e448cb09f Content-Type: multipart/mixed;boundary=---------------------30a0ae55532813e02a90d4c0b34cfd60 -----------------------30a0ae55532813e02a90d4c0b34cfd60 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 Hi, I'm building a web app using the Python web framework Flask and I'm curiou= s how I should handle database changes. At the moment I can just delete ev= erything and load the SQL files but when I launch into production obviousl= y 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 fu= nction definitions. I know there are libraries like Alembic but that seems to be for SQLAlchem= y and not raw SQL and Flyway seems to require an expensive license to allo= w migration rollback so I'm wondering if anyone can offer some advice? If you need more information then please let me know. Simon. -----------------------30a0ae55532813e02a90d4c0b34cfd60-- --------2b758f0942f1ed4b95295e83ca6b76c6008bd55513da1776784e1e5e448cb09f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYKACcFgmZ+j7QJkFrvKC74ta6lFiEEXOYF9uqFRn4815bYWu8oLvi1 rqUAABR0AP9M53CSx61vQtnRB2df7k/KVUdBaMH/l/yhmI8D36rCGQEAr+Yd Odvq7TMoAs1/ivc5W77bqCoXUL+O6NNU0yNzXgc= =bz6H -----END PGP SIGNATURE----- --------2b758f0942f1ed4b95295e83ca6b76c6008bd55513da1776784e1e5e448cb09f--