diff --git a/prisma/migrations/20240815034112_alter_metadata_optional/migration.sql b/prisma/migrations/20240815034112_alter_metadata_optional/migration.sql new file mode 100644 index 0000000..7b7f1a4 --- /dev/null +++ b/prisma/migrations/20240815034112_alter_metadata_optional/migration.sql @@ -0,0 +1,5 @@ +-- AlterTable +ALTER TABLE "collections" ALTER COLUMN "metadata" DROP NOT NULL; + +-- AlterTable +ALTER TABLE "products" ALTER COLUMN "metadata" DROP NOT NULL; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index af1ff32..728715e 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -39,7 +39,7 @@ model Product { description String avatar_img String banner_img String - metadata Json + metadata Json? owner_id Int featured_at DateTime? created_at DateTime @default(now()) @@ -89,7 +89,7 @@ model Collection { name String? chain_id String contract_address String - metadata Json + metadata Json? nfts Nft[] product_collections ProductCollection[]