DataInventory

Details

diff --git a/database/migrations/1584137383826_modify_date_steward_schema.js b/database/migrations/1584137383826_modify_date_steward_schema.js
new file mode 100644
index 0000000..cc84860
--- /dev/null
+++ b/database/migrations/1584137383826_modify_date_steward_schema.js
@@ -0,0 +1,24 @@
+'use strict'
+
+/** @type {import('@adonisjs/lucid/src/Schema')} */
+const Schema = use('Schema')
+
+class ModifyDateStewardSchema extends Schema {
+  up () {
+    this.alter('stewards', (table) => {
+      // alter table
+      table.date('start_date').nullable().alter()
+      table.date('end_date').nullable().alter()
+    })
+  }
+
+  down () {
+    this.alter('stewards', (table) => {
+      // reverse alternations
+      table.date('start_date').notNullable().alter()
+      table.date('end_date').notNullable().alter()
+    })
+  }
+}
+
+module.exports = ModifyDateStewardSchema