From 0b65d05013941b57c28446856a50a0beaca27ef0 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 25 Dec 2022 12:20:09 +0100 Subject: [PATCH] Feature/remove rakuten from data source type (#1534) * Remove RAKUTEN * Update changelog --- CHANGELOG.md | 4 ++++ .../migration.sql | 9 +++++++++ prisma/schema.prisma | 1 - 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 prisma/migrations/20221225084546_removed_rakuten_from_data_source/migration.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index cf577de7d..3ddced56a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added the tags to the admin control panel +### Changed + +- Removed the data source type `RAKUTEN` + ## 1.220.0 - 2022-12-23 ### Added diff --git a/prisma/migrations/20221225084546_removed_rakuten_from_data_source/migration.sql b/prisma/migrations/20221225084546_removed_rakuten_from_data_source/migration.sql new file mode 100644 index 000000000..448e240ec --- /dev/null +++ b/prisma/migrations/20221225084546_removed_rakuten_from_data_source/migration.sql @@ -0,0 +1,9 @@ +-- AlterEnum +BEGIN; +CREATE TYPE "DataSource_new" AS ENUM ('ALPHA_VANTAGE', 'EOD_HISTORICAL_DATA', 'GHOSTFOLIO', 'GOOGLE_SHEETS', 'MANUAL', 'RAPID_API', 'YAHOO'); +ALTER TABLE "MarketData" ALTER COLUMN "dataSource" TYPE "DataSource_new" USING ("dataSource"::text::"DataSource_new"); +ALTER TABLE "SymbolProfile" ALTER COLUMN "dataSource" TYPE "DataSource_new" USING ("dataSource"::text::"DataSource_new"); +ALTER TYPE "DataSource" RENAME TO "DataSource_old"; +ALTER TYPE "DataSource_new" RENAME TO "DataSource"; +DROP TYPE "DataSource_old"; +COMMIT; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 2520172d1..1c210cfb8 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -207,7 +207,6 @@ enum DataSource { GHOSTFOLIO GOOGLE_SHEETS MANUAL - RAKUTEN RAPID_API YAHOO }