db.js 414 B

12345678910111213141516171819
  1. let init = function(db){
  2. // Create the tables we need to store galleries and files
  3. db.schema.createTableIfNotExists('gallery', function (table) {
  4. table.increments()
  5. table.string('name')
  6. table.timestamps()
  7. }).then(() => {})
  8. db.schema.createTableIfNotExists('files', function (table) {
  9. table.increments()
  10. table.string('file')
  11. table.integer('galleryid')
  12. }).then(() => {})
  13. }
  14. module.exports = init