mongo2pg – Schema Diagram – sample_analytics

Generated: 2026-05-05 06:34 UTC
erDiagram accounts { UUID id PK INTEGER account_id "NOT NULL" INTEGER _limit "NOT NULL" } accounts_products { BIGINT id PK UUID accounts_id FK TEXT value "NOT NULL" } customers { UUID id PK BOOLEAN active TEXT address "NOT NULL" TIMESTAMP birthdate "NOT NULL" TEXT email "NOT NULL" TEXT name "NOT NULL" TEXT username "NOT NULL" } customers_accounts { BIGINT id PK UUID customers_id FK INTEGER value "NOT NULL" } customers_tier_and_details { BIGINT id PK UUID customers_id FK TEXT key "NOT NULL" BOOLEAN active "NOT NULL" TEXT field_id "NOT NULL" TEXT tier "NOT NULL" } customers_tier_and_details_benefits { BIGINT id PK BIGINT customers_tier_and_details_id FK TEXT value "NOT NULL" } transactions { UUID id PK INTEGER account_id "NOT NULL" TIMESTAMP bucket_end_date "NOT NULL" TIMESTAMP bucket_start_date "NOT NULL" INTEGER transaction_count "NOT NULL" } transactions_transactions { BIGINT id PK UUID transactions_id FK INTEGER amount "NOT NULL" TIMESTAMP date "NOT NULL" FLOAT price "NOT NULL" TEXT symbol "NOT NULL" FLOAT total "NOT NULL" VARCHAR(4) transaction_code "NOT NULL" } accounts ||--o{ accounts_products : "accounts_id" customers ||--o{ customers_accounts : "customers_id" customers ||--o{ customers_tier_and_details : "customers_id" customers_tier_and_details ||--o{ customers_tier_and_details_benefits : "customers_tier_and_details_id" transactions ||--o{ transactions_transactions : "transactions_id"