From 880ff42e7dfb3f622c3da45aee3e5ce74546c489 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 12 Jan 2010 17:40:19 +0000 Subject: [PATCH] Sqlite3 schema fix git-svn-id: svn://ultimatepp.org/upp/trunk@1882 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/plugin/sqlite3/Sqlite3Schema.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uppsrc/plugin/sqlite3/Sqlite3Schema.h b/uppsrc/plugin/sqlite3/Sqlite3Schema.h index 974b329ff..74fe2ceaf 100644 --- a/uppsrc/plugin/sqlite3/Sqlite3Schema.h +++ b/uppsrc/plugin/sqlite3/Sqlite3Schema.h @@ -55,13 +55,13 @@ #define DUAL_PRIMARY_KEY(k1, k2) INLINE_ATTRIBUTE(", primary key (" #k1 ", " #k2 ")") -#define DUAL_UNIQUE(k1, k2) ATTRIBUTE("alter table @t add constraint DQ_@t unique "\ +#define DUAL_UNIQUE(k1, k2) ATTRIBUTE("create unique index DQ_@t$" #k1 #k2 " on @t "\ "(" #k1 ", " #k2 ");",\ - "alter table @t drop constraint DQ_@t;") + "drop index DQ_@t$" #k1 #k2 ";") -#define UNIQUE_LIST(u, l) ATTRIBUTE("alter table @t add constraint UQ_@t$" #u " unique "\ +#define UNIQUE_LIST(u, l) ATTRIBUTE("create unique index DQ_@t$" #u " on @t "\ "(" l ");",\ - "alter table @t drop constraint UQ_@t$" #u ";") + "drop index UQ_@t$" #u ";") #define SQLCHECK(n, ct) ATTRIBUTE("alter table @t add constraint CHK_@t$" #n " check "\ "(" ct ");",\