commit bf0f0b0cfaac84ab98abc6694ffa2e57c4a1a855
parent 6ade7cb4331a7ffc428ae861e089fc5d101b70ea
Author: Yoann <yoann.b87@voila.fr>
Date: Wed, 25 May 2011 21:50:27 +0200
Ajout d'un champ cgCount pour comptabiliser le nombre de parties à créer que les joueurs ont gagnés.
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/code/serveur/dump2sqlite.sh b/code/serveur/dump2sqlite.sh
@@ -26,7 +26,7 @@ create table node(eid integer primary key autoincrement, name, type, weight);
create table relation(rid integer primary key autoincrement, start, end, type, weight);
create table type_node(name, num);
create table type_relation(name, num, extended_name, info);
-create table user(login primary key, mail, hash_passwd, score, ugroup);
+create table user(login primary key, mail, hash_passwd, score, ugroup, cgCount);
create table game(gid integer primary key autoincrement, eid_central_word, relation_1, relation_2, difficulty, author, nb_like, nb_dislike);
create table game_cloud(gid, num, difficulty, eid_word, totalWeight, probaR1, probaR2, probaR0, probaTrash);
create table played_game(pgid, gid, login, timestamp, like, primary key(login, pgid));
@@ -37,8 +37,9 @@ create table random_cloud_node(eid,nbneighbors);
create table random_center_node(eid);
create table user_info(user, key, value, primary key (user, key));
-insert into user(login, mail, hash_passwd, score, ugroup) values('$(echo "$user" | sed -e "s/'/''/g")', 'foo@isp.com', '$(echo "$passwd" | dd bs=1 count="${#passwd}" | (if which md5sum >/dev/null 2>&1; then md5sum; else md5; fi) | cut -d ' ' -f 1)', 0, 1);
-insert into user(login, mail, hash_passwd, score, ugroup) values('bot', 'no mail', 'no password', 0, 1);
+insert into user(login, mail, hash_passwd, score, ugroup) values('$(echo "$user" | sed -e "s/'/''/g")', 'foo@isp.com', '$(echo "$passwd" | dd bs=1
+count="${#passwd}" | (if which md5sum >/dev/null 2>&1; then md5sum; else md5; fi) | cut -d ' ' -f 1)', 0, 1, 0);
+insert into user(login, mail, hash_passwd, score, ugroup) values('bot', 'no mail', 'no password', 0, 1, 0);
EOF
# tr : pour virer le CRLF qui traîne