Skip to content

Commit

Permalink
fix: migration
Browse files Browse the repository at this point in the history
  • Loading branch information
HungLV46 committed Aug 14, 2024
1 parent b51091e commit c139083
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 31 deletions.

This file was deleted.

17 changes: 0 additions & 17 deletions prisma/migrations/20240809081547_updated_at_trigger/migration.sql

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "collections" ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN "updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
4 changes: 2 additions & 2 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ model Product {
owner_id Int
featured_at DateTime?
created_at DateTime @default(now())
updated_at DateTime @updatedAt
updated_at DateTime @default(now()) @updatedAt
stat_total_collection Int?
stat_total_items Int?
Expand Down Expand Up @@ -95,7 +95,7 @@ model Collection {
nfts Nft[]
product Product @relation(fields: [product_id], references: [id])
created_at DateTime @default(now())
updated_at DateTime @updatedAt
updated_at DateTime @default(now()) @updatedAt
@@unique([chain_id, contract_address])
@@index(product_id)
Expand Down

0 comments on commit c139083

Please sign in to comment.