Skip to content

Commit

Permalink
✨ api: add type column to certification subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Steph0 committed May 2, 2024
1 parent 59e9e1b commit cae1df4
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const up = async function (knex) {
await knex.schema.table('complementary-certification-subscriptions', function (table) {
table.text('type').notNull().defaultTo('COMPLEMENTARY');
});

await knex.schema.dropView('certification-subscriptions');
return knex.schema.createView('certification-subscriptions', function (view) {
view.as(knex('complementary-certification-subscriptions'));
});
};

const down = async function (knex) {
await knex.schema.dropView('certification-subscriptions');
return knex.schema.createView('certification-subscriptions', function (view) {
view.as(knex('complementary-certification-subscriptions'));
});
};

export { down, up };

0 comments on commit cae1df4

Please sign in to comment.