mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 02:56:57 +00:00
feat: greepy review
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user