mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2026-02-07 18:56:12 +01:00
removed id_offer on trade
This commit is contained in:
11
prisma/migrations/20240607113031_/migration.sql
Normal file
11
prisma/migrations/20240607113031_/migration.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `id_offer` on the `Trade` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "Trade" DROP CONSTRAINT "Trade_id_offer_fkey";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Trade" DROP COLUMN "id_offer";
|
||||
@@ -33,7 +33,6 @@ model Offer {
|
||||
|
||||
Crypto Crypto @relation(fields: [id_crypto], references: [id])
|
||||
User User @relation(fields: [id_user], references: [id])
|
||||
Trade Trade[]
|
||||
|
||||
}
|
||||
|
||||
@@ -61,11 +60,9 @@ model Trade {
|
||||
id_receiver String
|
||||
id_crypto String
|
||||
amount_traded Float
|
||||
id_offer String
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt @default(now())
|
||||
|
||||
Offer Offer @relation(fields: [id_offer], references: [id])
|
||||
Giver User @relation("Giver", fields: [id_giver], references: [id])
|
||||
Receiver User @relation("Receiver", fields: [id_receiver], references: [id])
|
||||
Crypto Crypto @relation(fields: [id_crypto], references: [id])
|
||||
|
||||
Reference in New Issue
Block a user