projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Rugby short description
[vchess.git]
/
server
/
db
/
create.sql
diff --git
a/server/db/create.sql
b/server/db/create.sql
index
5aba8ff
..
533e0f2
100644
(file)
--- a/
server/db/create.sql
+++ b/
server/db/create.sql
@@
-56,6
+56,8
@@
create table Games (
vid integer,
fenStart varchar, --initial state
fen varchar, --current state
vid integer,
fenStart varchar, --initial state
fen varchar, --current state
+ white integer,
+ black integer,
score varchar default '*',
scoreMsg varchar,
cadence varchar,
score varchar default '*',
scoreMsg varchar,
cadence varchar,
@@
-65,7
+67,9
@@
create table Games (
rematchOffer character default '',
deletedByWhite boolean,
deletedByBlack boolean,
rematchOffer character default '',
deletedByWhite boolean,
deletedByBlack boolean,
- foreign key (vid) references Variants(id)
+ foreign key (vid) references Variants(id),
+ foreign key (white) references Users(id),
+ foreign key (black) references Users(id)
);
create table Chats (
);
create table Chats (
@@
-75,15
+79,6
@@
create table Chats (
added datetime
);
added datetime
);
--- Store informations about players in a corr game
-create table Players (
- gid integer,
- uid integer,
- color character,
- foreign key (gid) references Games(id),
- foreign key (uid) references Users(id)
-);
-
create table Moves (
gid integer,
squares varchar, --description, appear/vanish/from/to
create table Moves (
gid integer,
squares varchar, --description, appear/vanish/from/to
@@
-92,4
+87,6
@@
create table Moves (
foreign key (gid) references Games(id)
);
foreign key (gid) references Games(id)
);
+create index scoreIdx on Games(score);
+
pragma foreign_keys = on;
pragma foreign_keys = on;