Browse Source

Feature/add default values for countries and sectors (#1133)

* Add default values

* Add database validation script

* Update changelog
pull/1135/head
Thomas Kaul 2 years ago
committed by GitHub
parent
commit
573038f407
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 1
      package.json
  3. 2
      prisma/migrations/20220808191912_added_default_value_for_countries_of_symbol_profile_overrides/migration.sql
  4. 2
      prisma/migrations/20220808192002_added_default_value_for_sectors_of_symbol_profile_overrides/migration.sql
  5. 4
      prisma/schema.prisma

1
CHANGELOG.md

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added `url` to the symbol profile overrides model for manual adjustments
- Added default values for `countries` and `sectors` of the symbol profile overrides model
### Changed

1
package.json

@ -26,6 +26,7 @@
"database:push": "prisma db push",
"database:seed": "prisma db seed",
"database:setup": "yarn database:push && yarn database:seed && yarn database:baseline",
"database:validate": "prisma validate",
"dep-graph": "nx dep-graph",
"e2e": "ng e2e",
"format": "nx format:write",

2
prisma/migrations/20220808191912_added_default_value_for_countries_of_symbol_profile_overrides/migration.sql

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "SymbolProfileOverrides" ALTER COLUMN "countries" SET DEFAULT '[]';

2
prisma/migrations/20220808192002_added_default_value_for_sectors_of_symbol_profile_overrides/migration.sql

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "SymbolProfileOverrides" ALTER COLUMN "sectors" SET DEFAULT '[]';

4
prisma/schema.prisma

@ -133,9 +133,9 @@ model SymbolProfile {
model SymbolProfileOverrides {
assetClass AssetClass?
assetSubClass AssetSubClass?
countries Json?
countries Json? @default("[]")
name String?
sectors Json?
sectors Json? @default("[]")
url String?
symbolProfileId String @id
updatedAt DateTime @updatedAt

Loading…
Cancel
Save