Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

set cascade in trusted ip for project id

Maidul Islam15fc4fd60931
diff --git a/backend-pg/src/db/migrations/20240113103743_trusted-ip.ts b/backend-pg/src/db/migrations/20240113103743_trusted-ip.ts
index 2924f0668e..e90fac8884 100644
--- a/backend-pg/src/db/migrations/20240113103743_trusted-ip.ts
+++ b/backend-pg/src/db/migrations/20240113103743_trusted-ip.ts
@@ -13,7 +13,7 @@ export async function up(knex: Knex): Promise<void> {
t.boolean("isActive").defaultTo(true);
t.string("comment");
t.string("projectId").notNullable();
- t.foreign("projectId").references("id").inTable(TableName.Project);
+ t.foreign("projectId").references("id").inTable(TableName.Project).onDelete("CASCADE");
t.timestamps(true, true, true);
});
}