aboutsummaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorkanadeko <[email protected]>2017-01-14 05:50:18 -0300
committerkanadeko <[email protected]>2017-01-14 05:50:18 -0300
commita246fc83658dc10e5da89a8f8f828ca556686860 (patch)
tree462231143aaca715925431339a594242b7ef0b04 /database
parentSmall edit (diff)
downloadhost.fuwn.me-a246fc83658dc10e5da89a8f8f828ca556686860.tar.xz
host.fuwn.me-a246fc83658dc10e5da89a8f8f828ca556686860.zip
Frontend done
Diffstat (limited to 'database')
-rw-r--r--database/db.js19
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