Skip to content

Commit

Permalink
db: migrations > remove discord 'name' column from guilds & channels
Browse files Browse the repository at this point in the history
  • Loading branch information
dsevillamartin committed Mar 3, 2024
1 parent ebd61cc commit f36b6ef
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions db/migrations/2024_03_03_000000_remove_discord_names.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
exports.up = async (knex) =>
knex.transaction(async (trx) => {
await trx.raw('ALTER TABLE channels DROP COLUMN name');
await trx.raw('ALTER TABLE guilds DROP COLUMN name');
});

exports.down = async (knex) => {
await knex.schema.table('channels', (table) => table.string('name'));
await knex.schema.table('guilds', (table) => table.string('name'));
};

0 comments on commit f36b6ef

Please sign in to comment.