public inbox for [email protected]  
help / color / mirror / Atom feed
From: Simon Connah <[email protected]>
To: [email protected] <[email protected]>
Subject: Database migrations
Date: Sat, 13 Mar 2021 21:40:27 +0000
Message-ID: <DZDT1SCFF7_nJRcZylu8tod4dlTmOX1hAuAlselavvkA4HJAFbOUPC_33W7IxDtMdbzQBPYGPN6p0N58SRHjP3D-JuI8CEyRn3xL1VF4t30=@protonmail.com> (raw)

Hi,

I'm sorry if this is a rather stupid question but I'm fairly new to databases and was wondering if anyone could offer some advice?

I have an app I am developing using Node.js and PostgreSQL 13.2. I have the basic tables I want to start with but I know that as development progresses change is going to be required. Since this is an open-source project people are going to want to upgrade from one version to the next and that might require changes to the database structure. What is the best way to handle this?

I was thinking about just having a bunch of SQL files with a version number and date and applying them to the database from oldest to newest (with a table storing information for files that have already been processed). Does this sound like a reasonable solution?

If not could someone point me in the right direction, please?

Thank you for your help.

Simon.







view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Database migrations
  In-Reply-To: <DZDT1SCFF7_nJRcZylu8tod4dlTmOX1hAuAlselavvkA4HJAFbOUPC_33W7IxDtMdbzQBPYGPN6p0N58SRHjP3D-JuI8CEyRn3xL1VF4t30=@protonmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox