comparison ikariam.sql @ 130:dbefe10550cb

refined sql format
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Fri, 31 Oct 2008 01:54:12 +0800
parents d7a17dc6dc27
children 937fc672df56
comparison
equal deleted inserted replaced
129:3756298f8e4b 130:dbefe10550cb
1 CREATE TABLE "ally" ("id" INTEGER PRIMARY KEY NOT NULL , "name" TEXT, "members" INTEGER, "url" TEXT, "time" DATETIME); 1 CREATE TABLE "ally" ("id" INTEGER PRIMARY KEY NOT NULL , "name" TEXT, "members" INTEGER, "url" TEXT, "time" DATETIME);
2 CREATE TABLE cities ( 2 CREATE TABLE "cities" ( cityId INTEGER PRIMARY KEY UNIQUE, citylevel INTEGER, cityname TEXT, user INTEGER, owner TEXT, ally TEXT, island INTEGER, "status" CHAR, "time" INTEGER, "allyId" INTEGER);
3 cityId INTEGER PRIMARY KEY UNIQUE, 3 CREATE TABLE "island" ( id BIGINT PRIMARY KEY UNIQUE, x INTEGER, y INTEGER, name TEXT, tradegood INTEGER, wonder INTEGER, people INTEGER, "time" INTEGER);
4 citylevel INTEGER,
5 cityname TEXT,
6 user INTEGER,
7 owner TEXT,
8 ally TEXT,
9 island INTEGER, "status" CHAR, "time" INTEGER, "allyId" INTEGER);
10 CREATE TABLE "island" (
11 id BIGINT PRIMARY KEY UNIQUE,
12 x INTEGER,
13 y INTEGER,
14 name TEXT,
15 tradegood INTEGER,
16 wonder INTEGER,
17 people INTEGER, "time" INTEGER);
18 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); 4 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);
19 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); 5 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);