From 1dd69fab7dc6fc097a8c134dc8d3b55475752ed7 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 22 Feb 2025 09:49:28 +0100 Subject: [PATCH] Add CUSIP --- .../migration.sql | 5 +++++ prisma/migrations/migration_lock.toml | 2 +- prisma/schema.prisma | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 prisma/migrations/20250222084717_added_cusip_to_symbol_profile/migration.sql diff --git a/prisma/migrations/20250222084717_added_cusip_to_symbol_profile/migration.sql b/prisma/migrations/20250222084717_added_cusip_to_symbol_profile/migration.sql new file mode 100644 index 000000000..b60cebef6 --- /dev/null +++ b/prisma/migrations/20250222084717_added_cusip_to_symbol_profile/migration.sql @@ -0,0 +1,5 @@ +-- AlterTable +ALTER TABLE "SymbolProfile" ADD COLUMN "cusip" TEXT; + +-- CreateIndex +CREATE INDEX "SymbolProfile_cusip_idx" ON "SymbolProfile"("cusip"); diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml index fbffa92c2..648c57fd5 100644 --- a/prisma/migrations/migration_lock.toml +++ b/prisma/migrations/migration_lock.toml @@ -1,3 +1,3 @@ # Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) +# It should be added in your version-control system (e.g., Git) provider = "postgresql" \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma index af9acebaf..371a3fcd8 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -174,6 +174,7 @@ model SymbolProfile { countries Json? createdAt DateTime @default(now()) currency String + cusip String? dataSource DataSource figi String? figiComposite String? @@ -196,6 +197,7 @@ model SymbolProfile { @@unique([dataSource, symbol]) @@index([assetClass]) @@index([currency]) + @@index([cusip]) @@index([dataSource]) @@index([isin]) @@index([name])