Feature/update database schema of order (#664)
* Add schema migrations * Update changelog
This commit is contained in:
parent
161cb82820
commit
5000e9c79b
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
-Fixed the data source of the _Fear & Greed Index_ (market mood)
|
||||
|
||||
### Todo
|
||||
|
||||
- Apply data migration (`yarn database:migrate`)
|
||||
|
||||
## 1.109.0 - 01.02.2022
|
||||
|
||||
### Added
|
||||
|
@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Order" ALTER COLUMN "dataSource" DROP NOT NULL;
|
@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Order" ALTER COLUMN "symbol" DROP NOT NULL;
|
@ -0,0 +1,8 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "Order" DROP CONSTRAINT "Order_symbolProfileId_fkey";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Order" ALTER COLUMN "symbolProfileId" SET NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Order" ADD CONSTRAINT "Order_symbolProfileId_fkey" FOREIGN KEY ("symbolProfileId") REFERENCES "SymbolProfile"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
@ -75,15 +75,15 @@ model Order {
|
||||
accountUserId String?
|
||||
createdAt DateTime @default(now())
|
||||
currency String?
|
||||
dataSource DataSource
|
||||
dataSource DataSource?
|
||||
date DateTime
|
||||
fee Float
|
||||
id String @default(uuid())
|
||||
isDraft Boolean @default(false)
|
||||
quantity Float
|
||||
symbol String
|
||||
SymbolProfile SymbolProfile? @relation(fields: [symbolProfileId], references: [id])
|
||||
symbolProfileId String?
|
||||
symbol String?
|
||||
SymbolProfile SymbolProfile @relation(fields: [symbolProfileId], references: [id])
|
||||
symbolProfileId String
|
||||
type Type
|
||||
unitPrice Float
|
||||
updatedAt DateTime @updatedAt
|
||||
|
Loading…
x
Reference in New Issue
Block a user