misc: addressed feedback

This commit is contained in:
Sheen Capadngan
2025-04-17 04:00:02 +08:00
parent fc2e5d18b7
commit 1137247e69
14 changed files with 29 additions and 29 deletions
@@ -3,17 +3,17 @@ import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
if (!(await knex.schema.hasColumn(TableName.Organization, "enableBypassOrgAuth"))) {
if (!(await knex.schema.hasColumn(TableName.Organization, "bypassOrgAuthEnabled"))) {
await knex.schema.alterTable(TableName.Organization, (t) => {
t.boolean("enableBypassOrgAuth").defaultTo(false).notNullable();
t.boolean("bypassOrgAuthEnabled").defaultTo(false).notNullable();
});
}
}
export async function down(knex: Knex): Promise<void> {
if (await knex.schema.hasColumn(TableName.Organization, "enableBypassOrgAuth")) {
if (await knex.schema.hasColumn(TableName.Organization, "bypassOrgAuthEnabled")) {
await knex.schema.alterTable(TableName.Organization, (t) => {
t.dropColumn("enableBypassOrgAuth");
t.dropColumn("bypassOrgAuthEnabled");
});
}
}
+1 -1
View File
@@ -27,7 +27,7 @@ export const OrganizationsSchema = z.object({
shouldUseNewPrivilegeSystem: z.boolean().default(true),
privilegeUpgradeInitiatedByUsername: z.string().nullable().optional(),
privilegeUpgradeInitiatedAt: z.date().nullable().optional(),
enableBypassOrgAuth: z.boolean().default(false)
bypassOrgAuthEnabled: z.boolean().default(false)
});
export type TOrganizations = z.infer<typeof OrganizationsSchema>;