11c3574e89233ec895a4dd38f8fced972788a63b
1 -- Database should be in this folder, and named 'vchess.sqlite'
3 create table Variants (
4 id integer primary key,
10 id integer primary key,
19 create table Problems (
20 id integer primary key,
27 foreign key (uid
) references Users(id),
28 foreign key (vid
) references Variants(id)
31 -- All the following tables are for correspondance play only
32 -- (Live games are stored in browser)
34 create table Challenges (
35 id integer primary key,
42 foreign key (uid
) references Users(id),
43 foreign key (vid
) references Variants(id)
46 -- NOTE: no need for a "created" field, it's deduced from first move playing time
48 id integer primary key,
50 fenStart
varchar, --initial state
51 fen
varchar, --current state
54 foreign key (vid
) references Variants(id)
57 -- Store informations about players in a corr game
58 create table Players (
62 foreign key (gid
) references Games(id),
63 foreign key (uid
) references Users(id)
68 squares
varchar, --description, appear/vanish/from/to
70 played datetime
, --when was this move played?
71 idx
integer, --index of the move in the game
72 foreign key (gid
) references Games(id)
75 pragma foreign_keys
= on;