Skip to content

Commit

Permalink
Rename address book to known destination
Browse files Browse the repository at this point in the history
  • Loading branch information
wcalderipe committed Dec 3, 2024
1 parent 732aeb1 commit 952d0f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions apps/vault/src/shared/module/persistence/schema/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -97,7 +97,7 @@ model ProviderAddressBook {
connection ProviderConnection @relation(fields: [connectionId], references: [id])
@@map("provider_address_book")
@@map("provider_known_destination")
}

model ProviderConnection {
Expand All @@ -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")
}
Expand Down

0 comments on commit 952d0f1

Please sign in to comment.