fixed up sqlite3 script - now has proper constraints and autoincrement fields
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401329
This commit is contained in:
parent
86d5ccc3c4
commit
badeade4e9
Binary file not shown.
@ -1,41 +1,39 @@
|
|||||||
|
|
||||||
CREATE TABLE sm_admins (
|
CREATE TABLE sm_admins (
|
||||||
id int(10) NOT NULL,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
authtype varchar(16) NOT NULL,
|
authtype varchar(16) NOT NULL CHECK(authtype IN ('steam', 'ip', 'name')),
|
||||||
identity varchar(65) NOT NULL,
|
identity varchar(65) NOT NULL,
|
||||||
password varchar(65),
|
password varchar(65),
|
||||||
flags varchar(30) NOT NULL,
|
flags varchar(30) NOT NULL,
|
||||||
name varchar(65) NOT NULL,
|
name varchar(65) NOT NULL
|
||||||
PRIMARY KEY (id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE sm_groups (
|
CREATE TABLE sm_groups (
|
||||||
id int(10) NOT NULL,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
immunity varchar(16) NOT NULL,
|
immunity varchar(16) NOT NULL CHECK(immunity IN ('none', 'default', 'global', 'all')),
|
||||||
flags varchar(30) NOT NULL,
|
flags varchar(30) NOT NULL,
|
||||||
name varchar(120) NOT NULL,
|
name varchar(120) NOT NULL,
|
||||||
groups_immune varchar(255),
|
groups_immune varchar(255)
|
||||||
PRIMARY KEY (id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE sm_group_overrides (
|
CREATE TABLE sm_group_overrides (
|
||||||
group_id int(10) NOT NULL,
|
group_id INTEGER NOT NULL,
|
||||||
type varchar(16) NOT NULL,
|
type varchar(16) NOT NULL CHECK (type IN ('command', 'group')),
|
||||||
name varchar(32) NOT NULL,
|
name varchar(32) NOT NULL,
|
||||||
access varchar(16) NOT NULL,
|
access varchar(16) NOT NULL CHECK (access IN ('allow', 'deny')),
|
||||||
PRIMARY KEY (group_id, type, name)
|
PRIMARY KEY (group_id, type, name)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE sm_overrides (
|
CREATE TABLE sm_overrides (
|
||||||
type varchar(16) NOT NULL,
|
type varchar(16) NOT NULL CHECK (type IN ('command', 'group')),
|
||||||
name varchar(32) NOT NULL,
|
name varchar(32) NOT NULL,
|
||||||
flags varchar(30) NOT NULL,
|
flags varchar(30) NOT NULL,
|
||||||
PRIMARY KEY (type,name)
|
PRIMARY KEY (type,name)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE sm_admins_groups (
|
CREATE TABLE sm_admins_groups (
|
||||||
admin_id int(10) NOT NULL,
|
admin_id INTEGER NOT NULL,
|
||||||
group_id int(10) NOT NULL,
|
group_id INTEGER NOT NULL,
|
||||||
inherit_order int(10) NOT NULL,
|
inherit_order int(10) NOT NULL,
|
||||||
PRIMARY KEY (admin_id, group_id)
|
PRIMARY KEY (admin_id, group_id)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user