Skip to content

Commit

Permalink
add slug index
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Feb 9, 2024
1 parent 4e2f228 commit 92828b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/db/migrations/20240204171758_org-based-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
await knex.schema.alterTable(TableName.Organization, (t) => {
t.boolean("authEnforced").defaultTo(false);
t.index("slug");
});

await knex.schema.alterTable(TableName.SamlConfig, (t) => {
Expand All @@ -15,6 +16,7 @@ export async function up(knex: Knex): Promise<void> {
export async function down(knex: Knex): Promise<void> {
await knex.schema.alterTable(TableName.Organization, (t) => {
t.dropColumn("authEnforced");
t.dropIndex("slug");
});

await knex.schema.alterTable(TableName.SamlConfig, (t) => {
Expand Down

0 comments on commit 92828b5

Please sign in to comment.