diff --git a/api/db/migrations/20250117133225_drop-focus-phrase-table.js b/api/db/migrations/20250117133225_drop-focus-phrase-table.js new file mode 100644 index 000000000..ba23ef4b0 --- /dev/null +++ b/api/db/migrations/20250117133225_drop-focus-phrase-table.js @@ -0,0 +1,22 @@ +const TABLE_NAME = 'focus_phrase'; + +/** + * @param { import("knex").Knex } knex + * @returns { Promise } + */ +export async function up(knex) { + await knex.schema.dropTable(TABLE_NAME); +} + +/** + * @param { import("knex").Knex } knex + * @returns { Promise } + */ +export async function down(knex) { + await knex.schema.createTable(TABLE_NAME, function(table) { + table.increments('id').notNullable(); + table.string('type').notNullable(); + table.string('persistantId').notNullable(); + table.dateTime('createdAt').notNullable().defaultTo(knex.fn.now()); + }); +}