add chat commands
[browser-rts.git] / dump.sql
1 BEGIN TRANSACTION;
2 CREATE TABLE IF NOT EXISTS "accounts" (
3         "id"    text,
4         "username"      text UNIQUE,
5         "password"      text,
6         PRIMARY KEY("id")
7 );
8 CREATE TABLE IF NOT EXISTS "army_queue" (
9         "id"    text,
10         "owner" text,
11         "your_city"     text,
12         "created"       int,
13         "due"   int,
14         "soldiers"      int,
15         "attackers"     int,
16         "defenders"     int,
17         "sp_attackers"  int,
18         "sp_defenders"  int,
19         "attacked_city" text,
20         PRIMARY KEY("id")
21 );
22 CREATE TABLE IF NOT EXISTS "build_queues" (
23         "id"    text,
24         "building_type" text,
25         "owner" text,
26         "created"       int,
27         "due"   int,
28         "amount"        int,
29         PRIMARY KEY("id")
30 );
31 CREATE TABLE IF NOT EXISTS "buildings" (
32         "slug"  text,
33         "display"       text UNIQUE,
34         "credits"       int,
35         "alloys"        int,
36         "energy"        int,
37         "land"  int,
38         "time"  int,
39         PRIMARY KEY("slug")
40 );
41 CREATE TABLE IF NOT EXISTS "cities" (
42         "id"    string,
43         "owner" string,
44         "icon"  string,
45         "totalSpace"    int,
46         "usedSpace"     int,
47         "credits"       int,
48         "alloys"        int,
49         "energy"        int,
50         "food"  int,
51         "population"    int,
52         "soliders"      int,
53         "attackers"     int,
54         "defenders"     int,
55         "sp_attackers"  int,
56         "sp_defenders"  int,
57         "soldiers"      int after population,
58         "farms" int,
59         "barracks"      int,
60         "special_attacker_trainer"      int,
61         "special_defender_trainer"      int,
62         "homes" int after sp_defenders,
63         "warehouses"    int,
64         "solar_panels"  int,
65         "accumulators"  int,
66         "mining_facilities"     int,
67         "ore_refinery"  int,
68         PRIMARY KEY("id")
69 );
70 CREATE TABLE IF NOT EXISTS "locations" (
71         "sector_id"     int,
72         "city_id"       text UNIQUE,
73         "location_x"    int,
74         "location_y"    int
75 );
76 CREATE TABLE IF NOT EXISTS "mail" (
77         "id"    text,
78         "to_account"    text,
79         "from_account"  text,
80         "type"  text,
81         "sent_at"       int,
82         "read_at"       int,
83         "subject"       text,
84         "message"       text,
85         PRIMARY KEY("id")
86 );
87 CREATE TABLE IF NOT EXISTS "sessions" (
88         "id"    text,
89         "account_id"    TEXT,
90         PRIMARY KEY("id")
91 );
92 CREATE TABLE IF NOT EXISTS "ticks" (
93         "current_tick"  int,
94         "last_tick_at"  int
95 );
96 CREATE TABLE IF NOT EXISTS "unit_training_queue" (
97         "id"    string,
98         "unit_type"     text,
99         "owner" text,
100         "created"       int,
101         "due"   int,
102         "amount"        int,
103         PRIMARY KEY("id")
104 );
105 CREATE TABLE IF NOT EXISTS "units" (
106         "slug"  ,
107         "display"       ,
108         "credits"       ,
109         "food"  ,
110         "population"    ,
111         "soldiers"      ,
112         "attackers"     ,
113         "defenders"     ,
114         "time"  ,
115         "attack"        int,
116         "defence"       int
117 );
118 INSERT INTO "accounts" VALUES ('-','Advisor','xos');
119 INSERT INTO "buildings" VALUES ('farms','Farms',20,0,40,1,14);
120 INSERT INTO "buildings" VALUES ('barracks','Barracks',40,10,60,1,16);
121 INSERT INTO "buildings" VALUES ('special_attacker_trainer','Sp. Attacker Trainer',80,40,100,2,20);
122 INSERT INTO "buildings" VALUES ('special_defender_trainer','Sp. Defender Trainer',100,60,80,2,20);
123 INSERT INTO "buildings" VALUES ('homes','Homes',40,10,10,1,6);
124 INSERT INTO "buildings" VALUES ('warehouses','Warehouses',40,70,30,1,5);
125 INSERT INTO "buildings" VALUES ('solar_panels','Solar Panels',100,80,10,1,10);
126 INSERT INTO "buildings" VALUES ('accumulators','Accumulators',150,60,100,1,12);
127 INSERT INTO "buildings" VALUES ('mining_facilities','Droid Mining Facilities',120,120,80,1,12);
128 INSERT INTO "buildings" VALUES ('ore_refinery','Ore Refinery',80,60,40,1,8);
129 INSERT INTO "locations" VALUES (1,'-',-1,-1);
130 INSERT INTO "units" VALUES ('soldiers','Soldiers',2,1,1,0,0,0,2,2.1,1);
131 INSERT INTO "units" VALUES ('attackers','Attackers',5,2,0,1,0,0,3,4,1);
132 INSERT INTO "units" VALUES ('defenders','Defenders',4,2,0,1,0,0,5,1,4);
133 INSERT INTO "units" VALUES ('sp_attackers','Sp. Attacker',9,4,0,0,1,0,7,7,3);
134 INSERT INTO "units" VALUES ('sp_defenders','Sp. Defender',11,5,0,0,0,1,10,2,9);
135 COMMIT;