diff --git a/apps/vault/src/shared/module/persistence/schema/migrations/20241203141912_add_provider_integration_tables/migration.sql b/apps/vault/src/shared/module/persistence/schema/migrations/20241203160823_add_provider_integration_tables/migration.sql similarity index 93% rename from apps/vault/src/shared/module/persistence/schema/migrations/20241203141912_add_provider_integration_tables/migration.sql rename to apps/vault/src/shared/module/persistence/schema/migrations/20241203160823_add_provider_integration_tables/migration.sql index a79102a29..a98962f75 100644 --- a/apps/vault/src/shared/module/persistence/schema/migrations/20241203141912_add_provider_integration_tables/migration.sql +++ b/apps/vault/src/shared/module/persistence/schema/migrations/20241203160823_add_provider_integration_tables/migration.sql @@ -41,7 +41,7 @@ CREATE TABLE "provider_address" ( ); -- CreateTable -CREATE TABLE "provider_address_book" ( +CREATE TABLE "provider_known_destination" ( "id" TEXT NOT NULL, "client_id" TEXT NOT NULL, "connection_id" TEXT NOT NULL, @@ -54,7 +54,7 @@ CREATE TABLE "provider_address_book" ( "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP(3) NOT NULL, - CONSTRAINT "provider_address_book_pkey" PRIMARY KEY ("id") + CONSTRAINT "provider_known_destination_pkey" PRIMARY KEY ("id") ); -- CreateTable @@ -120,7 +120,7 @@ ALTER TABLE "provider_account" ADD CONSTRAINT "provider_account_wallet_id_fkey" ALTER TABLE "provider_address" ADD CONSTRAINT "provider_address_account_id_fkey" FOREIGN KEY ("account_id") REFERENCES "provider_account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; -- AddForeignKey -ALTER TABLE "provider_address_book" ADD CONSTRAINT "provider_address_book_connection_id_fkey" FOREIGN KEY ("connection_id") REFERENCES "provider_connection"("id") ON DELETE RESTRICT ON UPDATE CASCADE; +ALTER TABLE "provider_known_destination" ADD CONSTRAINT "provider_known_destination_connection_id_fkey" FOREIGN KEY ("connection_id") REFERENCES "provider_connection"("id") ON DELETE RESTRICT ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "provider_wallet_connection" ADD CONSTRAINT "provider_wallet_connection_connection_id_fkey" FOREIGN KEY ("connection_id") REFERENCES "provider_connection"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/apps/vault/src/shared/module/persistence/schema/schema.prisma b/apps/vault/src/shared/module/persistence/schema/schema.prisma index 4285fd978..d5a3a6d65 100644 --- a/apps/vault/src/shared/module/persistence/schema/schema.prisma +++ b/apps/vault/src/shared/module/persistence/schema/schema.prisma @@ -82,7 +82,7 @@ model ProviderAddress { @@map("provider_address") } -model ProviderAddressBook { +model ProviderKnownDestination { id String @id clientId String @map("client_id") connectionId String @map("connection_id") @@ -97,7 +97,7 @@ model ProviderAddressBook { connection ProviderConnection @relation(fields: [connectionId], references: [id]) - @@map("provider_address_book") + @@map("provider_known_destination") } model ProviderConnection { @@ -113,9 +113,9 @@ model ProviderConnection { updatedAt DateTime @updatedAt @map("updated_at") revokedAt DateTime? @map("revoked_at") - counterparties ProviderAddressBook[] - connections ProviderWalletConnection[] - syncs ProviderSync[] + knwonDestinations ProviderKnownDestination[] + connections ProviderWalletConnection[] + syncs ProviderSync[] @@map("provider_connection") }