Skip to content

Commit 19dd8d0

Browse files
committed
fix(microorm-database): rename snapshot file
1 parent 28f1ab9 commit 19dd8d0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

libs/microorm-database/src/lib/migrations/.snapshot-microorm-test.json renamed to libs/microorm-database/src/lib/migrations/.snapshot-mikroorm-database.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@
512512
"unsigned": false,
513513
"autoincrement": false,
514514
"primary": false,
515-
"nullable": false,
515+
"nullable": true,
516516
"mappedType": "integer"
517517
}
518518
},
@@ -542,6 +542,7 @@
542542
"id"
543543
],
544544
"referencedTableName": "public.users",
545+
"deleteRule": "set null",
545546
"updateRule": "cascade"
546547
}
547548
},

libs/microorm-database/src/lib/migrations/Migration20250123130345_CreateUsersCommentsRelations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export class Migration20250123130345_CreateUsersCommentsRelations extends Migrat
44

55
override async up(): Promise<void> {
66
this.addSql(`alter table "comments" add column "created_by" int;`);
7-
this.addSql(`alter table "comments" add constraint "comments_created_by_foreign" foreign key ("created_by") references "users" ("id") on update cascade;`);
7+
this.addSql(`alter table "comments" add constraint "comments_created_by_foreign" foreign key ("created_by") references "users" ("id") on update cascade on delete set null;`);
88
}
99

1010
override async down(): Promise<void> {

0 commit comments

Comments
 (0)