mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:57:08 +00:00
These files contain the sequence of SQL commands needed to bring a database or project schema up to date with the latest template database or project schema. These files must be applied manually. Check the comments at the top of the file for instructions.
23 lines
692 B
SQL
23 lines
692 B
SQL
-- Upgrade the database from commit 78adb2be to 7917eeeb.
|
|
--
|
|
-- This upgrade affects the `public` schema only.
|
|
--
|
|
-- It creates a new table, `info`, for storing arbitrary JSON
|
|
-- data not belonging to a specific project. Currently used
|
|
-- for the equipment list, it could also serve to store user
|
|
-- details, configuration settings, system state, etc.
|
|
--
|
|
-- To apply, run as the dougal user:
|
|
--
|
|
-- psql < $THIS_FILE
|
|
--
|
|
-- NOTE: It will fail harmlessly if applied twice.
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS public.info (
|
|
key text NOT NULL primary key,
|
|
value jsonb
|
|
);
|
|
|
|
CREATE TRIGGER info_tg AFTER INSERT OR DELETE OR UPDATE ON public.info FOR EACH ROW EXECUTE FUNCTION public.notify('info');
|