mirror of
https://github.com/glimpse-app/server.git
synced 2025-04-02 10:52:45 -04:00
moved database init to own file
This commit is contained in:
parent
4fd51c0367
commit
5716b84f4d
1 changed files with 6 additions and 0 deletions
6
src/database.nim
Normal file
6
src/database.nim
Normal file
|
@ -0,0 +1,6 @@
|
|||
import norm/[model, sqlite]
|
||||
import types/[users, files]
|
||||
# using sqlite as it makes setup faster
|
||||
# once project is stable enough this will switch to postgresql
|
||||
let db* = open("storage.db", "", "", "")
|
||||
db.createTables(newFile()) # file objects require a user object, thus a tables for both are created
|
Loading…
Add table
Reference in a new issue