- 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
This commit is contained in:
+11
-1
@@ -6,14 +6,15 @@ CREATE TABLE sm_admins (
|
||||
password varchar(65),
|
||||
flags varchar(30) NOT NULL,
|
||||
name varchar(65) NOT NULL,
|
||||
immunity int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE sm_groups (
|
||||
id int(10) unsigned NOT NULL auto_increment,
|
||||
immunity enum('none','global','default') NOT NULL,
|
||||
flags varchar(30) NOT NULL,
|
||||
name varchar(120) NOT NULL,
|
||||
immunity_level int(1) unsigned NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
@@ -44,3 +45,12 @@ CREATE TABLE sm_admins_groups (
|
||||
inherit_order int(10) NOT NULL,
|
||||
PRIMARY KEY (admin_id, group_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sm_config (
|
||||
cfg_key varchar(32) NOT NULL,
|
||||
cfg_value varchar(255) NOT NULL,
|
||||
PRIMARY KEY (cfg_key)
|
||||
);
|
||||
|
||||
INSERT INTO sm_config (cfg_key, cfg_value) VALUES ('admin_version', '1.0.0.1409') ON DUPLICATE KEY UPDATE cfg_value = '1.0.0.1409';
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
ALTER TABLE sm_admins ADD immunity INT UNSIGNED NOT NULL;
|
||||
|
||||
ALTER TABLE sm_groups ADD immunity_level INT UNSIGNED NOT NULL;
|
||||
UPDATE sm_groups SET immunity_level = 2 WHERE immunity = 'default';
|
||||
UPDATE sm_groups SET immunity_level = 1 WHERE immunity = 'global';
|
||||
ALTER TABLE sm_groups DROP immunity;
|
||||
|
||||
CREATE TABLE sm_config (
|
||||
cfg_key varchar(32) NOT NULL,
|
||||
cfg_value varchar(255) NOT NULL,
|
||||
PRIMARY KEY (cfg_key)
|
||||
);
|
||||
INSERT INTO sm_config (cfg_key, cfg_value) VALUES ('admin_version', '1.0.0.1409') ON DUPLICATE KEY UPDATE cfg_value = '1.0.0.1409';
|
||||
|
||||
Reference in New Issue
Block a user