From: Matteo Nastasi (mop) Date: Fri, 27 Dec 2013 13:01:34 +0000 (+0100) Subject: drop default for #PFX#_users::code_guar, now is foreign key of #PFX#_users::code... X-Git-Tag: v4.12.1~1 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=6c1edc28977e0fe344f5c15b345b11c4a0e61b4b;p=brisk.git drop default for #PFX#_users::code_guar, now is foreign key of #PFX#_users::code field --- diff --git a/sql/sql.d/065-user-guarant-constraint.sql b/sql/sql.d/065-user-guarant-constraint.sql new file mode 100644 index 0000000..423572a --- /dev/null +++ b/sql/sql.d/065-user-guarant-constraint.sql @@ -0,0 +1,4 @@ +ALTER TABLE #PFX#users DROP CONSTRAINT #PFX#users_guar_code_fkey; +ALTER TABLE #PFX#users ADD CONSTRAINT #PFX#users_guar_code_fkey FOREIGN KEY (guar_code) REFERENCES #PFX#users(code) MATCH FULL; + +ALTER TABLE #PFX#users ALTER COLUMN guar_code DROP DEFAULT; --MF \ No newline at end of file