Skip to content

Commit 1cf4aae

Browse files
chore: add createdAt to organisation #13 (#41)
* added createdAt field for organisations * added migrations.sql * fix: Use proper migration filename --------- Co-authored-by: TheMythologist <leekaixuan2001@gmail.com>
1 parent f160993 commit 1cf4aae

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- AlterTable
2+
ALTER TABLE "public"."organisations" ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;

prisma/schema.prisma

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ model Organisation {
4141
category IGCategory
4242
isInactive Boolean @default(false) @map("is_inactive")
4343
isInvisible Boolean @default(false) @map("is_invisible") // is not displayed on the website
44+
createdAt DateTime @default(now()) @map("created_at")
4445
4546
@@map("organisations")
4647
}

0 commit comments

Comments
 (0)