mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-01-24 10:09:15 +00:00
add unique constraints for tblApiKeys
This commit is contained in:
parent
af0e23a39c
commit
c2a10fa0a9
|
|
@ -101,7 +101,9 @@ CREATE TABLE `tblApiKeys` (
|
|||
`apikey` varchar(32) NOT NULL,
|
||||
`expires` datetime DEFAULT NULL,
|
||||
`disabled` smallint(1) NOT NULL DEFAULT '0',
|
||||
CONSTRAINT `tblApiKeys_user` FOREIGN KEY (`user`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `apikey` (`apikey`),
|
||||
CONSTRAINT `tblApiKeys_user` FOREIGN KEY (`user`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ CREATE TABLE "tblApiKeys" (
|
|||
"user" INTEGER DEFAULT NULL REFERENCES "tblUsers" ("id") ON DELETE CASCADE,
|
||||
"apikey" varchar(32) NOT NULL,
|
||||
"expires" TIMESTAMP DEFAULT NULL
|
||||
"disabled" INTEGER NOT NULL default '0'
|
||||
"disabled" INTEGER NOT NULL default '0',
|
||||
UNIQUE ("apikey")
|
||||
);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@ CREATE TABLE `tblApiKeys` (
|
|||
`user` INTEGER DEFAULT NULL REFERENCES `tblUsers` (`id`) ON DELETE CASCADE,
|
||||
`apikey` varchar(32) NOT NULL,
|
||||
`expires` TEXT NOT NULL
|
||||
`disabled` INTEGER NOT NULL DEFAULT '0'
|
||||
`disabled` INTEGER NOT NULL DEFAULT '0',
|
||||
UNIQUE (`apikey`)
|
||||
);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user