Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/remove default value of data source (#379)

Thomas Kaulf2364eed1005
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d75c8ba330..da59b1c72a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## Unreleased
+
+### Changed
+
+- Removed the default value of the data source attribute
+
+### Todo
+
+- Apply data migration (`yarn prisma migrate deploy`)
+
## 1.54.0 - 18.09.2021
### Added
@@ -24,7 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Todo
-- Apply data migration (`yarn database:push`)
+- Apply data migration (`yarn prisma migrate deploy`)
## 1.53.0 - 13.09.2021
@@ -146,7 +156,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Todo
-- Apply data migration (`yarn database:push`)
+- Apply data migration (`yarn prisma migrate deploy`)
## 1.41.0 - 21.08.2021
@@ -199,7 +209,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Todo
-- Apply data migration (`yarn database:push`)
+- Apply data migration (`yarn prisma migrate deploy`)
## 1.38.0 - 14.08.2021
@@ -259,7 +269,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Todo
-- Apply data migration (`yarn database:push`)
+- Apply data migration (`yarn prisma migrate deploy`)
## 1.34.0 - 07.08.2021
diff --git a/prisma/migrations/20210918183212_removed_default_value_of_data_source/migration.sql b/prisma/migrations/20210918183212_removed_default_value_of_data_source/migration.sql
new file mode 100644
index 0000000000..3fa6e2942e
--- /dev/null
+++ b/prisma/migrations/20210918183212_removed_default_value_of_data_source/migration.sql
@@ -0,0 +1,5 @@
+-- AlterTable
+ALTER TABLE "MarketData" ALTER COLUMN "dataSource" DROP DEFAULT;
+
+-- AlterTable
+ALTER TABLE "Order" ALTER COLUMN "dataSource" DROP DEFAULT;
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 8cff7862c8..10f27e8ef3 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -62,7 +62,7 @@ model AuthDevice {
model MarketData {
createdAt DateTime @default(now())
- dataSource DataSource @default(YAHOO)
+ dataSource DataSource
date DateTime
id String @default(uuid())
symbol String
@@ -78,7 +78,7 @@ model Order {
accountUserId String?
createdAt DateTime @default(now())
currency Currency?
- dataSource DataSource @default(YAHOO)
+ dataSource DataSource
date DateTime
fee Float
id String @default(uuid())