diff options
Diffstat (limited to 'server/init_db.lua')
-rw-r--r-- | server/init_db.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/init_db.lua b/server/init_db.lua new file mode 100644 index 0000000..c4165f5 --- /dev/null +++ b/server/init_db.lua @@ -0,0 +1,14 @@ +local lmdb = require'lmdb' +local env = assert(lmdb.open('data',{maxdbs=16})) +local txn = assert(env:txn_begin(true)) + +local dbs = { + 'chunks', +} + +for _,dbname in ipairs(dbs) do + assert(txn:open(dbname, true)) +end + +txn:commit() + |