From: Elena Mamontova Date: Wed, 19 Oct 2016 07:24:45 +0000 (+0300) Subject: Ticket 37. UPDATE moved before DROP DEFAULT. X-Git-Tag: 2.409~59 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/c2c22250c1f6fe2ed787b96ac6ff7dae96f44464?hp=7377ab11320e17a5368a731fa7b0d93cd9415e81 Ticket 37. UPDATE moved before DROP DEFAULT. --- diff --git a/projects/stargazer/inst/var/02-alter-03.sql b/projects/stargazer/inst/var/02-alter-03.sql index d5b2e52e..d2745203 100644 --- a/projects/stargazer/inst/var/02-alter-03.sql +++ b/projects/stargazer/inst/var/02-alter-03.sql @@ -8,9 +8,9 @@ CREATE DOMAIN DM_TARIFF_CHANGE_POLICY AS VARCHAR(32) NOT NULL ALTER TABLE tb_tariffs ADD change_policy DM_TARIFF_CHANGE_POLICY DEFAULT 'allow'; ALTER TABLE tb_tariffs ADD change_policy_timeout DM_MOMENT DEFAULT '1970-01-01 00:00:00'; +UPDATE tb_tariffs SET change_policy = 'allow', change_policy_timeout = '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_tariffs SET change_policy = 'allow', change_policy_timeout = '1970-01-01 00:00:00'; - UPDATE tb_info SET version = 2;