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,
48 foreign key (uid
) references Users(id),
49 foreign key (vid
) references Variants(id)
53 id integer primary key,
55 fenStart
varchar, --initial state
56 fen
varchar, --current state
62 foreign key (vid
) references Variants(id)
72 -- Store informations about players in a corr game
73 create table Players (
77 foreign key (gid
) references Games(id),
78 foreign key (uid
) references Users(id)
83 squares
varchar, --description, appear/vanish/from/to
84 played datetime
, --when was this move played?
85 idx
integer, --index of the move in the game
86 foreign key (gid
) references Games(id)
89 pragma foreign_keys
= on;