annotate ikariam.sql @ 104:b369fe3c1992

fixed typo and war counting
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Wed, 29 Oct 2008 15:08:34 +0800
parents 6804e9c3c589
children 839d8ad81cde
rev   line source
98
34749e907405 we now scan for ally
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 42
diff changeset
1 CREATE TABLE "ally" ("id" INTEGER PRIMARY KEY NOT NULL , "name" TEXT, "members" INTEGER, "url" TEXT, "time" DATETIME);
5
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
2 CREATE TABLE cities (
8
e4b3168d0319 implemented sheep and enemy scripts.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 5
diff changeset
3 cityId INTEGER PRIMARY KEY UNIQUE,
5
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
4 citylevel INTEGER,
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
5 cityname TEXT,
8
e4b3168d0319 implemented sheep and enemy scripts.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 5
diff changeset
6 user INTEGER,
5
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
7 owner TEXT,
8
e4b3168d0319 implemented sheep and enemy scripts.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 5
diff changeset
8 ally TEXT,
42
0644b53fd3af updated documents
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 8
diff changeset
9 island INTEGER, "status" CHAR, "time" INTEGER);
8
e4b3168d0319 implemented sheep and enemy scripts.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 5
diff changeset
10 CREATE TABLE "island" (
5
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
11 id BIGINT PRIMARY KEY UNIQUE,
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
12 x INTEGER,
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
13 y INTEGER,
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
14 name TEXT,
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
15 tradegood INTEGER,
dbb97c4265ba implemented the scores search tool
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
16 wonder INTEGER,
42
0644b53fd3af updated documents
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 8
diff changeset
17 people INTEGER, "time" INTEGER);
0644b53fd3af updated documents
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 8
diff changeset
18 CREATE TABLE "user" ("id" INTEGER PRIMARY KEY ,"name" VARCHAR,"ally" VARCHAR,"allyId" INTEGER,"score" INTEGER,"building_score_main" INTEGER,"building_score_secondary" INTEGER,"research_score_main" INTEGER,"research_score_secondary" INTEGER,"army_score_main" INTEGER,"trader_score_secondary" INTEGER, "time" INTEGER);
103
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
19 CREATE TABLE "ally" ("id" INTEGER PRIMARY KEY NOT NULL , "name" TEXT, "members" INTEGER, "url" TEXT, "time" DATETIME);
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
20 CREATE TABLE cities (
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
21 cityId INTEGER PRIMARY KEY UNIQUE,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
22 citylevel INTEGER,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
23 cityname TEXT,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
24 user INTEGER,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
25 owner TEXT,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
26 ally TEXT,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
27 island INTEGER, "status" CHAR, "time" INTEGER);
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
28 CREATE TABLE "island" (
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
29 id BIGINT PRIMARY KEY UNIQUE,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
30 x INTEGER,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
31 y INTEGER,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
32 name TEXT,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
33 tradegood INTEGER,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
34 wonder INTEGER,
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
35 people INTEGER, "time" INTEGER);
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
36 CREATE TABLE "report" ("id" INTEGER PRIMARY KEY NOT NULL , "cityLevel" INTEGER, "wallLevel" INTEGER, "attacker" TEXT, "defender" TEXT, "winner" TEXT, "targetCity" TEXT, "island" INTEGER NOT NULL , "city" INTEGER NOT NULL , "gold" INTEGER DEFAULT 0, "wood" INTEGER DEFAULT 0, "crystal" INTEGER DEFAULT 0, "wine" INTEGER DEFAULT 0, "sulfur" INTEGER DEFAULT 0, "date" DATETIME, "time" DATETIME);
6804e9c3c589 added ally and report table.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 98
diff changeset
37 CREATE TABLE "user" ("id" INTEGER PRIMARY KEY ,"name" VARCHAR,"ally" VARCHAR,"allyId" INTEGER,"score" INTEGER,"building_score_main" INTEGER,"building_score_secondary" INTEGER,"research_score_main" INTEGER,"research_score_secondary" INTEGER,"army_score_main" INTEGER,"trader_score_secondary" INTEGER, "time" INTEGER);