summaryrefslogtreecommitdiff
path: root/tools/import-game.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-02-15 23:49:53 +0100
committerTor Andersson <tor@ccxvii.net>2024-02-15 23:50:00 +0100
commit9616871a58f7b395aa234249a09c685c2f70c595 (patch)
tree62248197b02dd581ea23d8489e805da92a765cd2 /tools/import-game.js
parent42063475c84efa6e81cbf6dbf7fd1e29b21941b7 (diff)
downloadserver-9616871a58f7b395aa234249a09c685c2f70c595.tar.gz
Set owner_id when importing games.
Diffstat (limited to 'tools/import-game.js')
-rwxr-xr-xtools/import-game.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/import-game.js b/tools/import-game.js
index 4bca88e..8413b2f 100755
--- a/tools/import-game.js
+++ b/tools/import-game.js
@@ -38,7 +38,7 @@ game.setup.moves = game.snaps && game.snaps.length > 0 ? game.snaps.length - 1 :
let db = new sqlite3("db")
-let insert_game = db.prepare("insert into games(status,title_id,scenario,options,player_count,active,moves,notice) values (1,:title_id,:scenario,:options,:player_count,:active,:moves,:notice) returning game_id").pluck()
+let insert_game = db.prepare("insert into games(status,owner_id,title_id,scenario,options,player_count,active,moves,notice) values (1,1,:title_id,:scenario,:options,:player_count,:active,:moves,:notice) returning game_id").pluck()
let insert_player = db.prepare("insert into players(game_id,role,user_id) values (?,?,1)")
let insert_state = db.prepare("insert into game_state(game_id,state) values (?,?)")