mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:47:09 +00:00
25 lines
889 B
SQL
25 lines
889 B
SQL
-- Upgrade the database from commit 74b3de5c to commit 83be83e4.
|
|
--
|
|
-- NOTE: This upgrade only affects the `public` schema.
|
|
--
|
|
-- This inserts a database schema version into the database.
|
|
-- Note that we are not otherwise changing the schema, so older
|
|
-- server code will continue to run against this version.
|
|
--
|
|
-- ATTENTION!
|
|
--
|
|
-- This value should be incremented every time that the database
|
|
-- schema changes (either `public` or any of the survey schemas)
|
|
-- and is used by the server at start-up to detect if it is
|
|
-- running against a compatible schema version.
|
|
--
|
|
-- To apply, run as the dougal user:
|
|
--
|
|
-- psql < $THIS_FILE
|
|
--
|
|
-- NOTE: It can be applied multiple times without ill effect.
|
|
|
|
INSERT INTO public.info VALUES ('version', '{"db_schema": "0.1.0"}')
|
|
ON CONFLICT (key) DO UPDATE
|
|
SET value = public.info.value || '{"db_schema": "0.1.0"}' WHERE public.info.key = 'version';
|