From 8acf29b1805bcb0204a49ea2242fabc7cecad1e5 Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Tue, 7 Jun 2016 09:50:57 +0300 Subject: [PATCH 1/1] Ticket 37. The 02-alter-03.postgresql.sql new file added. --- .../stargazer/inst/var/02-alter-03.postgresql.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/stargazer/inst/var/02-alter-03.postgresql.sql diff --git a/projects/stargazer/inst/var/02-alter-03.postgresql.sql b/projects/stargazer/inst/var/02-alter-03.postgresql.sql new file mode 100644 index 00000000..a686aa68 --- /dev/null +++ b/projects/stargazer/inst/var/02-alter-03.postgresql.sql @@ -0,0 +1,13 @@ +/* + * DB migration from v02 to v03 (postgres) + */ +BEGIN; + +CREATE DOMAIN DM_TARIFF_CHANGE_POLICY AS TEXT NOT NULL + CONSTRAINT valid_value CHECK (VALUE IN ('allow', 'to_cheap', 'to_expensive', 'deny')); + +ALTER TABLE tb_tariffs ADD change_policy DM_TARIFF_CHANGE_POLICY DEFAULT 'allow'; + +UPDATE tb_info SET version = 8; + +COMMIT; -- 2.44.2