5bf3a3b0be324285d78e65f122c69611c495a8a4
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,
27 foreign key (uid
) references Users(id),
28 foreign key (vid
) references Variants(id)
31 create table Challenges (
32 id integer primary key,
39 foreign key (uid
) references Users(id),
40 foreign key (vid
) references Variants(id)
44 id integer primary key,
46 fenStart
varchar, --initial state
47 fen
varchar, --current state
53 foreign key (vid
) references Variants(id)
63 -- Store informations about players in a corr game
64 create table Players (
68 foreign key (gid
) references Games(id),
69 foreign key (uid
) references Users(id)
74 squares
varchar, --description, appear/vanish/from/to
75 played datetime
, --when was this move played?
76 idx
integer, --index of the move in the game
77 foreign key (gid
) references Games(id)
80 pragma foreign_keys
= on;