git repos / oastat

commit 1c79fe36

sago007 · 2011-09-01 16:59
1c79fe36f70d8168d720a816bbebce27a699e7fb patch · browse files
parent bebac2ed7dc41122a4710e76545802dbfee15f58

Somehow the CREATE SQL statements was not commited


git-svn-id: http://oastat.googlecode.com/svn/trunk@28 a36be8df-c75f-1e49-46ad-4f0ee64bdc62

Changed files

M sql/create_tables/oastat_create_tables_common.sql before
diff --git a/sql/create_tables/oastat_create_tables_common.sql b/sql/create_tables/oastat_create_tables_common.sql index 97b6922..6d4d89c 100644 --- a/sql/create_tables/oastat_create_tables_common.sql +++ b/sql/create_tables/oastat_create_tables_common.sql
@@ -108,6 +108,19 @@ CREATE TABLE oastat_uservars (
numericvalue float -- if value is a float or int, then the value will also be stored here for easier comparison
);
+CREATE TABLE oastat_config (
+ thekey character varying(64) PRIMARY KEY,
+ thevalue character varying(256)
+);
+
+CREATE TABLE oastat_config_uservars2save (
+ thekey character varying(100) PRIMARY KEY
+);
+
+CREATE TABLE oastat_config_gamevars2save (
+ cvar character varying(100) PRIMARY KEY
+);
+
-- CHECKS START
ALTER TABLE oastat_games
@@ -116,6 +129,9 @@ ALTER TABLE oastat_games
ALTER TABLE oastat_players
ADD CONSTRAINT oastat_player_index UNIQUE (playerid);
+ALTER TABLE oastat_userinfo
+ ADD CONSTRAINT oastat_userinfo_second_limit UNIQUE (gamenumber,player,second);
+
-- CHECKs END
-- PRIMARY KEYS START
@@ -150,7 +166,7 @@ ALTER TABLE oastat_challenges -- RESTRICT2POSTGRESQL
ALTER TABLE oastat_challenges -- RESTRICT2POSTGRESQL
- ADD CONSTRAINT oastat_challenges_fk2 FOREIGN KEY (player) REFERENCES oastat_players(guid) ON UPDATE CASCADE ON DELETE RESTRICT; -- RESTRICT2POSTGRESQL
+ ADD CONSTRAINT oastat_challenges_fk2 FOREIGN KEY (player) REFERENCES oastat_players(playerid) ON UPDATE CASCADE ON DELETE RESTRICT; -- RESTRICT2POSTGRESQL
ALTER TABLE oastat_kills -- RESTRICT2POSTGRESQL
@@ -162,7 +178,7 @@ ALTER TABLE oastat_points -- RESTRICT2POSTGRESQL
ALTER TABLE oastat_points -- RESTRICT2POSTGRESQL
- ADD CONSTRAINT oastat_points_fk2 FOREIGN KEY (player) REFERENCES oastat_players(guid) ON UPDATE CASCADE ON DELETE RESTRICT; -- RESTRICT2POSTGRESQL
+ ADD CONSTRAINT oastat_points_fk2 FOREIGN KEY (player) REFERENCES oastat_players(playerid) ON UPDATE CASCADE ON DELETE RESTRICT; -- RESTRICT2POSTGRESQL
ALTER TABLE oastat_userinfo -- RESTRICT2POSTGRESQL
@@ -177,3 +193,14 @@ ALTER TABLE oastat_uservars -- RESTRICT2POSTGRESQL
set foreign_key_checks = 1 ; -- RESTRICT2MYSQL
-- FOREIGN KEYS END
+
+-- STANDARD VALUES
+
+INSERT INTO oastat_config_uservars2save (thekey) VALUES ('hc');
+
+INSERT INTO oastat_config_gamevars2save (cvar) VALUES ('g_instantgib');
+INSERT INTO oastat_config_gamevars2save (cvar) VALUES ('g_rockets');
+
+COMMIT;
+
+-- STANDARD VALUES END