From a246fc83658dc10e5da89a8f8f828ca556686860 Mon Sep 17 00:00:00 2001 From: kanadeko Date: Sat, 14 Jan 2017 05:50:18 -0300 Subject: Frontend done --- database/db.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 database/db.js (limited to 'database') 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 -- cgit v1.2.3