Skip to content

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

Feature/add isActive flag to asset profile model (#4479)

Thomas Kaulf08ed2dc68a1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 49692b1127..ad9ae6c3a2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+### Added
+
+- Added the `isActive` flag to the asset profile model
+
### Changed
- Improved the language localization for German (`de`)
diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts
index 4d9613ee71..729049fd17 100644
--- a/apps/api/src/app/import/import.service.ts
+++ b/apps/api/src/app/import/import.service.ts
@@ -300,6 +300,7 @@ export class ImportService {
figiShareClass,
holdings,
id,
+ isActive,
isin,
name,
scraperConfiguration,
@@ -375,6 +376,7 @@ export class ImportService {
figiShareClass,
holdings,
id,
+ isActive,
isin,
name,
scraperConfiguration,
diff --git a/prisma/migrations/20250324072407_added_is_active_to_symbol_profile/migration.sql b/prisma/migrations/20250324072407_added_is_active_to_symbol_profile/migration.sql
new file mode 100644
index 0000000000..690f709df4
--- /dev/null
+++ b/prisma/migrations/20250324072407_added_is_active_to_symbol_profile/migration.sql
@@ -0,0 +1,5 @@
+-- AlterTable
+ALTER TABLE "SymbolProfile" ADD COLUMN "isActive" BOOLEAN NOT NULL DEFAULT true;
+
+-- CreateIndex
+CREATE INDEX "SymbolProfile_isActive_idx" ON "SymbolProfile"("isActive");
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 371a3fcd8a..29c98788fa 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -181,6 +181,7 @@ model SymbolProfile {
figiShareClass String?
holdings Json? @default("[]")
id String @id @default(uuid())
+ isActive Boolean @default(true)
isin String?
name String?
updatedAt DateTime @updatedAt
@@ -199,6 +200,7 @@ model SymbolProfile {
@@index([currency])
@@index([cusip])
@@index([dataSource])
+ @@index([isActive])
@@index([isin])
@@index([name])
@@index([symbol])