ee753a13f8
--HG-- rename : configs/sql-init-scripts/admins-mysql.sql => configs/sql-init-scripts/mysql/admins-mysql.sql rename : configs/sql-init-scripts/admins-sqlite.sq3 => configs/sql-init-scripts/sqlite/admins-sqlite.sq3 rename : configs/sql-init-scripts/admins-sqlite.sql => configs/sql-init-scripts/sqlite/admins-sqlite.sql extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401406
45 lines
1.2 KiB
SQL
45 lines
1.2 KiB
SQL
|
|
CREATE TABLE sm_admins (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
authtype varchar(16) NOT NULL CHECK(authtype IN ('steam', 'ip', 'name')),
|
|
identity varchar(65) NOT NULL,
|
|
password varchar(65),
|
|
flags varchar(30) NOT NULL,
|
|
name varchar(65) NOT NULL
|
|
);
|
|
|
|
CREATE TABLE sm_groups (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
immunity varchar(16) NOT NULL CHECK(immunity IN ('none', 'default', 'global', 'all')),
|
|
flags varchar(30) NOT NULL,
|
|
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)
|
|
);
|
|
|
|
CREATE TABLE sm_group_overrides (
|
|
group_id INTEGER NOT NULL,
|
|
type varchar(16) NOT NULL CHECK (type IN ('command', 'group')),
|
|
name varchar(32) NOT NULL,
|
|
access varchar(16) NOT NULL CHECK (access IN ('allow', 'deny')),
|
|
PRIMARY KEY (group_id, type, name)
|
|
);
|
|
|
|
CREATE TABLE sm_overrides (
|
|
type varchar(16) NOT NULL CHECK (type IN ('command', 'group')),
|
|
name varchar(32) NOT NULL,
|
|
flags varchar(30) NOT NULL,
|
|
PRIMARY KEY (type,name)
|
|
);
|
|
|
|
CREATE TABLE sm_admins_groups (
|
|
admin_id INTEGER NOT NULL,
|
|
group_id INTEGER NOT NULL,
|
|
inherit_order int(10) NOT NULL,
|
|
PRIMARY KEY (admin_id, group_id)
|
|
);
|