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,
20 create table Problems (
21 id integer primary key,
28 foreign key (uid
) references Users(id),
29 foreign key (vid
) references Variants(id)
33 id integer primary key,
37 foreign key (uid
) references Users(id)
40 create table Challenges (
41 id integer primary key,
49 foreign key (uid
) references Users(id),
50 foreign key (vid
) references Variants(id)
54 id integer primary key,
56 fenStart
varchar, --initial state
57 fen
varchar, --current state
63 foreign key (vid
) references Variants(id)
73 -- Store informations about players in a corr game
74 create table Players (
78 foreign key (gid
) references Games(id),
79 foreign key (uid
) references Users(id)
84 squares
varchar, --description, appear/vanish/from/to
85 played datetime
, --when was this move played?
86 idx
integer, --index of the move in the game
87 foreign key (gid
) references Games(id)
90 pragma foreign_keys
= on;