X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8c6fa3fbaccc22127280bf77a48fab5a3ee0716e..46b0747592074017ff0ea4b33d4a7194235886e5:/stargazer/inst/var/01-alter-02.sql

diff --git a/stargazer/inst/var/01-alter-02.sql b/stargazer/inst/var/01-alter-02.sql
new file mode 100644
index 00000000..628a016a
--- /dev/null
+++ b/stargazer/inst/var/01-alter-02.sql
@@ -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);
