summaryrefslogtreecommitdiff
path: root/src/migrations/20211017023049_create_shoe.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-10-17 02:52:05 +0200
committerJules Laplace <julescarbon@gmail.com>2021-10-17 02:52:05 +0200
commit06ecdf2af182034496e2123852deee4a58de1043 (patch)
treec8d4eb9664dd368bee5a4bf73dd1e02015ecaf39 /src/migrations/20211017023049_create_shoe.js
making a shoebox
Diffstat (limited to 'src/migrations/20211017023049_create_shoe.js')
-rw-r--r--src/migrations/20211017023049_create_shoe.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/migrations/20211017023049_create_shoe.js b/src/migrations/20211017023049_create_shoe.js
new file mode 100644
index 0000000..50f6add
--- /dev/null
+++ b/src/migrations/20211017023049_create_shoe.js
@@ -0,0 +1,18 @@
+/**
+ * Migration: Create shoe table.
+ */
+
+exports.up = function (knex) {
+ return knex.schema.createTable("shoe", function (table) {
+ table.increments("shoe_id").primary().unsigned();
+ table.string("shoelace", 16).nullable();
+ table.string("shoebox", 16).nullable();
+ table.string("type", 16).nullable();
+ table.jsonb("metadata").defaultTo({});
+ table.timestamp("created_at").defaultTo(knex.fn.now());
+ });
+};
+
+exports.down = function (knex) {
+ return knex.schema.dropTable("shoe");
+};