aboutsummaryrefslogtreecommitdiff
path: root/database/db.js
blob: 8dc62d044dae72eac5552f4652ff9128ac28e0b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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.string('original')
		table.string('type')
		table.string('size')
		table.string('ip')
		table.integer('galleryid')
		table.timestamps()
	}).then(() => {})

}

module.exports = init