aboutsummaryrefslogtreecommitdiff
path: root/database/db.js
blob: a7b11922a063fe4f639bef1c77c24a8fef27c104 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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