sourcemod/configs/sql-init-scripts/sqlite/update_admins-r1409.sql
David Anderson 6aec628ab0 - completely overhauled the immunity system
- updated and reorganized database schema files
- changed config files to show new immunity rules
- updated sql-admin-manager so it can update+create tables
- added compile.sh file for building plugins in batch
- deprecated the old admin-cache immunity api relying on ImmunityType
- added a new sm_config table to the schema for storing version numbers

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401409
2007-09-10 23:38:58 +00:00

24 lines
856 B
SQL

ALTER TABLE sm_admins ADD immunity INTEGER DEFAULT 0 NOT NULL;
CREATE TABLE _sm_groups_temp (
id INTEGER PRIMARY KEY AUTOINCREMENT,
flags varchar(30) NOT NULL,
name varchar(120) NOT NULL,
immunity_level INTEGER DEFAULT 0 NOT NULL
);
INSERT INTO _sm_groups_temp (id, flags, name) SELECT id, flags, name FROM sm_groups;
UPDATE _sm_groups_temp SET immunity_level = 2 WHERE id IN (SELECT g.id FROM sm_groups g WHERE g.immunity = 'global');
UPDATE _sm_groups_temp SET immunity_level = 1 WHERE id IN (SELECT g.id FROM sm_groups g WHERE g.immunity = 'default');
DROP TABLE sm_groups;
ALTER TABLE _sm_groups_temp RENAME TO sm_groups;
CREATE TABLE IF NOT EXISTS sm_config (
cfg_key varchar(32) NOT NULL,
cfg_value varchar(255) NOT NULL,
PRIMARY KEY (cfg_key)
);
REPLACE INTO sm_config (cfg_key, cfg_value) VALUES ('admin_version', '1.0.0.1409');