From: Elena Mamontova Date: Wed, 21 Sep 2016 10:32:19 +0000 (+0300) Subject: Ticket 37. The 'change_policy_timeout' field adding added. The default values X-Git-Tag: 2.409~83 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/f4398ba0b7d835790b3211fd31117735fa14fd81?hp=0c5f08010e784f0c860c8459141af7da75b2da3c Ticket 37. The 'change_policy_timeout' field adding added. The default values deletion for 'change_policy', 'change_policy_timeout' fields added. --- diff --git a/projects/stargazer/inst/var/02-alter-03.postgresql.sql b/projects/stargazer/inst/var/02-alter-03.postgresql.sql index a686aa68..e8b248bf 100644 --- a/projects/stargazer/inst/var/02-alter-03.postgresql.sql +++ b/projects/stargazer/inst/var/02-alter-03.postgresql.sql @@ -7,6 +7,9 @@ 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'; +ALTER TABLE tb_tariffs ADD change_policy_timeout TIMESTAMP NOT NULL DEFAULT '1970-01-01 00:00:00'; +ALTER TABLE tb_tariffs ALTER COLUMN change_policy DROP DEFAULT; +ALTER TABLE tb_tariffs ALTER COLUMN change_policy_timeout DROP DEFAULT; UPDATE tb_info SET version = 8;