From bf674a96534816819f7d71a91f2274bf4aa59798 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 25 Jan 2021 14:25:18 -0500 Subject: [PATCH] hydra.sql: embed some in-line docs about schema changes --- src/sql/hydra.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index 07d15ddc..ab2c6159 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -1,3 +1,14 @@ +-- Making a database change: +-- +-- 1. Update this schema document to match what the end result should be. +-- +-- 2. Run `make -C src/sql update-dbix hydra-postgresql.sql` in the root +-- of the project directory, and git add / git commit the changed, +-- generated files. +-- +-- 3. Create a migration in this same directory, named `upgrade-N.sql` +-- + -- Singleton table to keep track of the schema version. create table SchemaVersion ( version integer not null