diff options
Diffstat (limited to 'database/db.js')
| -rw-r--r-- | database/db.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/database/db.js b/database/db.js new file mode 100644 index 0000000..a7b1192 --- /dev/null +++ b/database/db.js @@ -0,0 +1,19 @@ + +let init = function(db){ + + // Create the tables we need to store galleries and files + db.schema.createTableIfNotExists('gallery', function (table) { + table.increments() + table.string('name') + table.timestamps() + }).then(() => {}) + + db.schema.createTableIfNotExists('files', function (table) { + table.increments() + table.string('file') + table.integer('galleryid') + }).then(() => {}) + +} + +module.exports = init
\ No newline at end of file |