From f2364eed10055b9e205fd2fe3850f3044043ab42 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 19 Sep 2021 17:16:29 +0200 Subject: [PATCH] Feature/remove default value of data source (#379) * Remove default value of dataSource * Update changelog --- CHANGELOG.md | 18 ++++++++++++++---- .../migration.sql | 5 +++++ prisma/schema.prisma | 4 ++-- 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 prisma/migrations/20210918183212_removed_default_value_of_data_source/migration.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index d75c8ba33..da59b1c72 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 000000000..3fa6e2942 --- /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 8cff7862c..10f27e8ef 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())