]> git.stg.codes - stg.git/commitdiff
Ticket 37. The 02-alter-03.sql new file added.
authorElena Mamontova <helenh463@gmail.com>
Fri, 1 Jul 2016 09:30:03 +0000 (12:30 +0300)
committerElena Mamontova <helenh463@gmail.com>
Fri, 1 Jul 2016 09:30:03 +0000 (12:30 +0300)
projects/stargazer/inst/var/02-alter-03.sql [new file with mode: 0644]

diff --git a/projects/stargazer/inst/var/02-alter-03.sql b/projects/stargazer/inst/var/02-alter-03.sql
new file mode 100644 (file)
index 0000000..a019917
--- /dev/null
@@ -0,0 +1,10 @@
+/*
+ *  DB migration from v02 to v03 (firebird)
+ */
+
+CREATE DOMAIN DM_TARIFF_CHANGE_POLICY AS  VARCHAR(32) NOT NULL
+    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 = 2;