Skip to content

Commit

Permalink
feat(back): drop focus_phrase table
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremiejade committed Jan 17, 2025
1 parent d3ee64d commit faa3728
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions api/db/migrations/20250117133225_drop-focus-phrase-table.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const TABLE_NAME = 'focus_phrase';

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
export async function up(knex) {
await knex.schema.dropTable(TABLE_NAME);
}

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
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());
});
}

0 comments on commit faa3728

Please # to comment.