feat: greepy review

This commit is contained in:
=
2025-10-20 22:05:02 +05:30
parent 2fa762e56d
commit eec2b30666
25 changed files with 65 additions and 66 deletions
@@ -14,8 +14,14 @@ export async function up(knex: Knex): Promise<void> {
t.foreign("rootOrgId").references("id").inTable(TableName.Organization).onDelete("CASCADE");
t.dropUnique(["slug"]);
t.unique(["rootOrgId", "parentOrgId", "slug"]);
});
// had to switch to raw for null not distinct
await knex.raw(`
ALTER TABLE "organization"
ADD CONSTRAINT "organization_root_parent_slug_unique"
UNIQUE ("rootOrgId", "parentOrgId", "slug") NULLS NOT DISTINCT;
`);
}
const hasIdentityOrgCol = await knex.schema.hasColumn(TableName.Identity, "orgId");
+2 -1
View File
@@ -24,7 +24,8 @@ export async function seed(knex: Knex): Promise<void> {
// @ts-ignore
id: seedData1.machineIdentity.id,
name: seedData1.machineIdentity.name,
authMethod: IdentityAuthMethod.UNIVERSAL_AUTH
authMethod: IdentityAuthMethod.UNIVERSAL_AUTH,
orgId: seedData1.organization.id
}
]);
const identityUa = await knex(TableName.IdentityUniversalAuth)