diff options
| author | kanadeko <[email protected]> | 2017-01-14 05:50:18 -0300 |
|---|---|---|
| committer | kanadeko <[email protected]> | 2017-01-14 05:50:18 -0300 |
| commit | a246fc83658dc10e5da89a8f8f828ca556686860 (patch) | |
| tree | 462231143aaca715925431339a594242b7ef0b04 /database | |
| parent | Small edit (diff) | |
| download | host.fuwn.me-a246fc83658dc10e5da89a8f8f828ca556686860.tar.xz host.fuwn.me-a246fc83658dc10e5da89a8f8f828ca556686860.zip | |
Frontend done
Diffstat (limited to 'database')
| -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 |