From 15fc4fd6093195cd0aa01e0f9db25d77bf5e3a93 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Wed, 24 Jan 2024 13:12:24 -0500 Subject: [PATCH] set cascade in trusted ip for project id --- backend-pg/src/db/migrations/20240113103743_trusted-ip.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend-pg/src/db/migrations/20240113103743_trusted-ip.ts b/backend-pg/src/db/migrations/20240113103743_trusted-ip.ts index 2924f0668..e90fac888 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 { 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); }); }