2017-01-14 09:50:18 +01:00
|
|
|
|
|
|
|
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')
|
2017-01-16 08:21:46 +01:00
|
|
|
table.string('original')
|
|
|
|
table.string('type')
|
|
|
|
table.string('size')
|
|
|
|
table.string('ip')
|
2017-01-14 09:50:18 +01:00
|
|
|
table.integer('galleryid')
|
2017-01-16 08:21:46 +01:00
|
|
|
table.timestamps()
|
2017-01-14 09:50:18 +01:00
|
|
|
}).then(() => {})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = init
|