diff --git a/migrations/20240131000000_form_db.js b/migrations/20240131000000_form_db.js new file mode 100644 index 00000000..6e80dec4 --- /dev/null +++ b/migrations/20240131000000_form_db.js @@ -0,0 +1,9 @@ +exports.up = knex => + knex.schema.table('statement', table => { + table.index('report_id') + }) + +exports.down = knex => + knex.schema.table('statement', table => { + table.dropIndex('report_id') + }) diff --git a/migrations/20240131000001_form_db.js b/migrations/20240131000001_form_db.js new file mode 100644 index 00000000..e453a2f0 --- /dev/null +++ b/migrations/20240131000001_form_db.js @@ -0,0 +1,9 @@ +exports.up = knex => + knex.schema.table('statement_amendments', table => { + table.index('statement_id') + }) + +exports.down = knex => + knex.schema.table('statement_amendments', table => { + table.dropIndex('statement_id') + }) diff --git a/migrations/20240131000002_form_db.js b/migrations/20240131000002_form_db.js new file mode 100644 index 00000000..e36f4dcc --- /dev/null +++ b/migrations/20240131000002_form_db.js @@ -0,0 +1,13 @@ +exports.up = knex => + knex.schema.table('report', table => { + table.index('offender_no') + table.index('created_date') + table.index('incident_date') + }) + +exports.down = knex => + knex.schema.table('report', table => { + table.dropIndex('offender_no') + table.dropIndex('created_date') + table.dropIndex('incident_date') + })