2007-08-13 03:46:58 +02:00
|
|
|
|
|
|
|
CREATE TABLE sm_admins (
|
2007-08-14 02:53:39 +02:00
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
authtype varchar(16) NOT NULL CHECK(authtype IN ('steam', 'ip', 'name')),
|
2007-08-13 03:46:58 +02:00
|
|
|
identity varchar(65) NOT NULL,
|
|
|
|
password varchar(65),
|
|
|
|
flags varchar(30) NOT NULL,
|
2007-08-14 02:53:39 +02:00
|
|
|
name varchar(65) NOT NULL
|
2007-08-13 03:46:58 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE sm_groups (
|
2007-08-14 02:53:39 +02:00
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
immunity varchar(16) NOT NULL CHECK(immunity IN ('none', 'default', 'global', 'all')),
|
2007-08-13 03:46:58 +02:00
|
|
|
flags varchar(30) NOT NULL,
|
2007-08-14 07:42:44 +02:00
|
|
|
name varchar(120) NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE sm_group_immunity (
|
|
|
|
group_id INTEGER NOT NULL,
|
|
|
|
other_id INTEGER NOT NULL,
|
|
|
|
PRIMARY KEY (group_id, other_id)
|
2007-08-13 03:46:58 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE sm_group_overrides (
|
2007-08-14 02:53:39 +02:00
|
|
|
group_id INTEGER NOT NULL,
|
|
|
|
type varchar(16) NOT NULL CHECK (type IN ('command', 'group')),
|
2007-08-13 03:46:58 +02:00
|
|
|
name varchar(32) NOT NULL,
|
2007-08-14 02:53:39 +02:00
|
|
|
access varchar(16) NOT NULL CHECK (access IN ('allow', 'deny')),
|
2007-08-13 03:46:58 +02:00
|
|
|
PRIMARY KEY (group_id, type, name)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE sm_overrides (
|
2007-08-14 02:53:39 +02:00
|
|
|
type varchar(16) NOT NULL CHECK (type IN ('command', 'group')),
|
2007-08-13 03:46:58 +02:00
|
|
|
name varchar(32) NOT NULL,
|
|
|
|
flags varchar(30) NOT NULL,
|
|
|
|
PRIMARY KEY (type,name)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE sm_admins_groups (
|
2007-08-14 02:53:39 +02:00
|
|
|
admin_id INTEGER NOT NULL,
|
|
|
|
group_id INTEGER NOT NULL,
|
2007-08-13 03:46:58 +02:00
|
|
|
inherit_order int(10) NOT NULL,
|
|
|
|
PRIMARY KEY (admin_id, group_id)
|
|
|
|
);
|