From badeade4e99a2c178556818c38e7c8108e8759f2 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 14 Aug 2007 00:53:39 +0000 Subject: [PATCH] fixed up sqlite3 script - now has proper constraints and autoincrement fields --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401329 --- configs/sql-init-scripts/admins-sqlite.sq3 | Bin 13312 -> 13312 bytes configs/sql-init-scripts/admins-sqlite.sql | 26 ++++++++++----------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/configs/sql-init-scripts/admins-sqlite.sq3 b/configs/sql-init-scripts/admins-sqlite.sq3 index f10a22fe788dd2409a5c09c875eeda60b0e2fa35..2883fd10060345631e3d453f64200109e3503c95 100644 GIT binary patch delta 803 zcma)4%Wl&^6wTO4oI0_ph_t2+kU=z#AE`vywA;k8AWGs!!Cgc`L~ddlOMax-7K*xQ z(k@sb!u&yy*jE*6R;Vi^Sn&aD5Qqg5AHX;d6}sw3XYM@ioO|ZX9QTfUud`_`GHV15 z0OQ`cC0E-L1t(YG$Nn@Cd9|HVHrGWWa6wOftIiDTZVUNnZD8XjKjciI#;Kp+*C@M0<}`P zrobz?yrbJj5uX%BaD`%XIdHm+KIB;tMPKuGgo>&u50xftG%NK|vjwY43zqh@-HM7y z>x!xsX$bYe?;%xOlc4-ak*j<-_Xm9gR#eCrJm1jmLJ=0se%Ocg3W9(*&QH<8XlIpT zx3<7(7JU;05JQZ(NzIF*lE~#}l#svV>$tY9JKd1$;JF+0Lo!#oi(ZP^jYYQJ!7g~S z`nqMgFT(7u;S9p$w<4cmh)ElRwO*jeAFOID-|66Cb zrxiWO<6E0u%zq7cOxq3|(;uKTx3WEVXt6d^=(vtC6ZlLIEPr}4%iY(laD?R-1oV`< zk4_3wj24FVb#%cOK@$DprHzFGbytJxUab~B$5dncQXZ0pW-J?LA8(>BVivs@a#Z*u uqcV#=iREN`*t$uv`8*f}XkEGuD6}JOU)%RqY%R`K^Hb*U5(^TOXzDL+A=Bvq delta 524 zcmZ9IJxjx26ovEVvyBbDMKEa5#H2|Y+JX_$!NH*j4r;*<97`p|2DB|Tiesazh;m&V zTofIgs?Z-G2qIFP90WHfe}bD$(^m9OhdVqE=hTX|;z=yZ5Py$3O=VEuUFDb}dHNpH z_=?6jLZb$O8f2aPq?&i$HB!8N#EFuG4rkr`##UixJD0b&ozhM(kno@l%5s92WyhAC zlAEx`O?fH1Dle@qETmfR{H|LB%NT;J;zC8CVOAIV9NXkgi)6()37ST1GN9(H9+&bq zslYtaHE&kSyA|IY1R5^lqxioOKH_6=WGHZ}2w-bTn9zqiHo9xm13=prL`Fbw1WP;; z=$(9_F!e+{qO()4PI-%AIMY%n(yEz^|Cjmo+JM||cfk5G!?WT_+AjtNy3{YUrl-9! z!-YFr2F~n9-x~rHX8ZWyN)?4SLd5lk+AyPSiAX iknE09-YZnAj$QC~>E#d%7}Fi#JPN_HF@?gHIP?Rco0qEq diff --git a/configs/sql-init-scripts/admins-sqlite.sql b/configs/sql-init-scripts/admins-sqlite.sql index 93f6c842..1c0e2795 100644 --- a/configs/sql-init-scripts/admins-sqlite.sql +++ b/configs/sql-init-scripts/admins-sqlite.sql @@ -1,41 +1,39 @@ CREATE TABLE sm_admins ( - id int(10) NOT NULL, - authtype varchar(16) NOT NULL, + 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, - PRIMARY KEY (id) + name varchar(65) NOT NULL ); CREATE TABLE sm_groups ( - id int(10) NOT NULL, - immunity varchar(16) NOT NULL, + 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, - groups_immune varchar(255), - PRIMARY KEY (id) + groups_immune varchar(255) ); CREATE TABLE sm_group_overrides ( - group_id int(10) NOT NULL, - type varchar(16) NOT NULL, + 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, + 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, + 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 int(10) NOT NULL, - group_id int(10) NOT NULL, + admin_id INTEGER NOT NULL, + group_id INTEGER NOT NULL, inherit_order int(10) NOT NULL, PRIMARY KEY (admin_id, group_id) );