]> git.stg.codes - stg.git/blobdiff - projects/stargazer/inst/var/01-alter-02.sql
Move projects back into subfolder.
[stg.git] / projects / stargazer / inst / var / 01-alter-02.sql
diff --git a/projects/stargazer/inst/var/01-alter-02.sql b/projects/stargazer/inst/var/01-alter-02.sql
new file mode 100644 (file)
index 0000000..628a016
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ *  DB migration from v01 to v02 (firebird)
+ */
+
+CREATE DOMAIN DM_TARIFF_PERIOD AS VARCHAR(32) NOT NULL
+    CHECK (VALUE = 'month' OR VALUE = 'day');
+
+ALTER TABLE tb_tariffs ADD period DM_TARIFF_PERIOD DEFAULT 'month';
+
+CREATE TABLE tb_info
+(
+    version INTEGER NOT NULL
+);
+
+INSERT INTO tb_info VALUES (1);