From 92828b52953f72c6a47fc9e1f03829e96df40d13 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Thu, 8 Feb 2024 20:47:12 -0500 Subject: [PATCH] add slug index --- backend/src/db/migrations/20240204171758_org-based-auth.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/db/migrations/20240204171758_org-based-auth.ts b/backend/src/db/migrations/20240204171758_org-based-auth.ts index 27a1486778..f2b2f913cb 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) => {