c9f523241b57d7542a635576ae266992d7d2b8fb
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
58 score
varchar default '*',
62 drawOffer
character default '',
63 rematchOffer
character default '',
64 deletedByWhite
boolean,
65 deletedByBlack
boolean,
66 foreign key (vid
) references Variants(id)
76 -- Store informations about players in a corr game
77 create table Players (
81 foreign key (gid
) references Games(id),
82 foreign key (uid
) references Users(id)
87 squares
varchar, --description, appear/vanish/from/to
88 played datetime
, --when was this move played?
89 idx
integer, --index of the move in the game
90 foreign key (gid
) references Games(id)
93 pragma foreign_keys
= on;