Sql: REFERENCES in .sch now can be preset by Sql (prerequisite for introspection)

git-svn-id: svn://ultimatepp.org/upp/trunk@4174 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-11-16 07:47:00 +00:00
commit 79280e95a6
6 changed files with 24 additions and 1 deletions

View file

@ -82,16 +82,19 @@
"(@c) references " #x ";",\
"alter table @t drop constraint FK_@x;")
#endif
#ifndef REFERENCES_CASCADE
#define REFERENCES_CASCADE(x) ATTRIBUTE("alter table @t add constraint FK_@x foreign key "\
"(@c) references " #x " on delete cascade;",\
"alter table @t drop constraint FK_@x;")
#endif
#ifndef REFERENCES_
#define REFERENCES_(n, x) ATTRIBUTE("alter table @t add constraint FK_@x$" #n " foreign key "\
"(@c) references " #x ";",\
"alter table @t drop constraint FK_@x$" #n ";")
#endif
#ifndef REFERENCES_CASCADE_
#define REFERENCES_CASCADE_(n, x) ATTRIBUTE("alter table @t add constraint FK_@x$" #n " foreign key "\
"(@c) references " #x " on delete cascade;",\