From 6c1edc28977e0fe344f5c15b345b11c4a0e61b4b Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Fri, 27 Dec 2013 14:01:34 +0100 Subject: [PATCH] drop default for #PFX#_users::code_guar, now is foreign key of #PFX#_users::code field --- sql/sql.d/065-user-guarant-constraint.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/sql.d/065-user-guarant-constraint.sql 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 -- 2.17.1