projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Relocate board adjuster + start working on translations
[vchess.git]
/
server
/
db
/
create.sql
diff --git
a/server/db/create.sql
b/server/db/create.sql
index
e5cbfd7
..
d18a310
100644
(file)
--- a/
server/db/create.sql
+++ b/
server/db/create.sql
@@
-13,23
+13,12
@@
create table Users (
loginToken varchar,
loginTime datetime,
sessionToken varchar,
loginToken varchar,
loginTime datetime,
sessionToken varchar,
+ created datetime,
notify boolean
);
notify boolean
);
-create table Problems (
- id integer primary key,
- added datetime,
- uid integer,
- vid integer,
- fen varchar,
- instructions text,
- solution text,
- foreign key (uid) references Users(id),
- foreign key (vid) references Variants(id)
-);
-
-- All the following tables are for correspondance play only
-- All the following tables are for correspondance play only
--- (Live games are stored
only in browsers
)
+-- (Live games are stored
in browser
)
create table Challenges (
id integer primary key,
create table Challenges (
id integer primary key,
@@
-49,28
+38,34
@@
create table Games (
fenStart varchar, --initial state
fen varchar, --current state
score varchar,
fenStart varchar, --initial state
fen varchar, --current state
score varchar,
- mainTime integer,
- addTime integer,
+ scoreMsg varchar,
+ timeControl varchar,
+ created datetime, --used only for DB cleaning
+ drawOffer boolean,
foreign key (vid) references Variants(id)
);
foreign key (vid) references Variants(id)
);
+create table Chats (
+ gid integer,
+ name varchar,
+ msg varchar,
+ added datetime
+);
+
-- Store informations about players in a corr game
create table Players (
gid integer,
uid integer,
color character,
-- Store informations about players in a corr game
create table Players (
gid integer,
uid integer,
color character,
- rtime integer, --remaining time in milliseconds
foreign key (gid) references Games(id),
foreign key (uid) references Users(id)
);
create table Moves (
gid integer,
foreign key (gid) references Games(id),
foreign key (uid) references Users(id)
);
create table Moves (
gid integer,
- move varchar,
- message varchar,
+ squares varchar, --description, appear/vanish/from/to
played datetime, --when was this move played?
idx integer, --index of the move in the game
played datetime, --when was this move played?
idx integer, --index of the move in the game
- color character, --required for e.g. Marseillais Chess
foreign key (gid) references Games(id)
);
foreign key (gid) references Games(id)
);