diff --git a/backend/src/db/migrations/20240204171758_org-based-auth.ts b/backend/src/db/migrations/20240204171758_org-based-auth.ts index 27a148677..f2b2f913c 100644 --- a/backend/src/db/migrations/20240204171758_org-based-auth.ts +++ b/backend/src/db/migrations/20240204171758_org-based-auth.ts @@ -5,6 +5,7 @@ import { TableName } from "../schemas"; export async function up(knex: Knex): Promise { await knex.schema.alterTable(TableName.Organization, (t) => { t.boolean("authEnforced").defaultTo(false); + t.index("slug"); }); await knex.schema.alterTable(TableName.SamlConfig, (t) => { @@ -15,6 +16,7 @@ export async function up(knex: Knex): Promise { export async function down(knex: Knex): Promise { await knex.schema.alterTable(TableName.Organization, (t) => { t.dropColumn("authEnforced"); + t.dropIndex("slug"); }); await knex.schema.alterTable(TableName.SamlConfig, (t) => {