Billing fk_rails_3d4e5f6a7b accounts.plan_id → billing.plans.idfk_rails_e4f5a6b7c8 billing.invoice_line_items.invoice_id → billing.invoices.id ON DELETE CASCADEfk_rails_c2d3e4f5a6 billing.invoices.account_id → accounts.idfk_rails_d3e4f5a6b7 billing.invoices.subscription_id → billing.subscriptions.idfk_rails_f5a6b7c8d9 billing.payments.invoice_id → billing.invoices.idfk_rails_a0b1c2d3e4 billing.subscriptions.account_id → accounts.id ON DELETE CASCADEfk_rails_b1c2d3e4f5 billing.subscriptions.plan_id → billing.plans.idpublic.accounts A tenant. Everything hangs off an account. 4 of 7 columns hiddenaccounts5 relations to hidden tables↗5id bigint NOT NULL primary key default: nextval('public.accounts_id_seq'::regclass)primary keyPKidbigintslug public.citext NOT NULL unique index index_accounts_on_slug (slug)unique unique index index_accounts_on_slug (slug)UQslugcitextplan_id bigint → billing.plans(id) fk_rails_3d4e5f6a7bforeign key → billing.plans(id) fk_rails_3d4e5f6a7bFKplan_idbigintnullable?… 4 more columnsbilling.invoice_line_items 4 of 6 columns hiddenbilling.invoice_line_itemsid bigint NOT NULL primary key default: nextval('billing.invoice_line_items_id_seq'::regclass)primary keyPKidbigintinvoice_id bigint NOT NULL → billing.invoices(id) on delete cascade fk_rails_e4f5a6b7c8 index index_invoice_line_items_on_invoice_id (invoice_id)foreign key → billing.invoices(id) on delete cascade fk_rails_e4f5a6b7c8FKin 1 index index index_invoice_line_items_on_invoice_id (invoice_id)IXinvoice_idbigint… 4 more columnsbilling.invoices 7 of 11 columns hiddenbilling.invoicesid bigint NOT NULL primary key default: nextval('billing.invoices_id_seq'::regclass)primary keyPKidbigintaccount_id bigint NOT NULL → accounts(id) fk_rails_c2d3e4f5a6 index index_invoices_on_account_id (account_id)foreign key → accounts(id) fk_rails_c2d3e4f5a6FKin 1 index index index_invoices_on_account_id (account_id)IXaccount_idbigintsubscription_id bigint → billing.subscriptions(id) fk_rails_d3e4f5a6b7 index index_invoices_on_subscription_id (subscription_id)foreign key → billing.subscriptions(id) fk_rails_d3e4f5a6b7FKin 1 index index index_invoices_on_subscription_id (subscription_id)IXsubscription_idbigintnullable?number character varying NOT NULL unique index index_invoices_on_number (number)unique unique index index_invoices_on_number (number)UQnumbervarchar… 7 more columnsbilling.payments 5 of 7 columns hiddenbilling.paymentsid bigint NOT NULL primary key default: nextval('billing.payments_id_seq'::regclass)primary keyPKidbigintinvoice_id bigint NOT NULL → billing.invoices(id) fk_rails_f5a6b7c8d9 index index_payments_on_invoice_id (invoice_id)foreign key → billing.invoices(id) fk_rails_f5a6b7c8d9FKin 1 index index index_payments_on_invoice_id (invoice_id)IXinvoice_idbigint… 5 more columnsbilling.plans 4 of 6 columns hiddenbilling.plansid bigint NOT NULL primary key default: nextval('billing.plans_id_seq'::regclass)primary keyPKidbigintcode character varying NOT NULL unique index index_plans_on_code (code)unique unique index index_plans_on_code (code)UQcodevarchar… 4 more columnsbilling.subscriptions 5 of 8 columns hiddenbilling.subscriptionsid bigint NOT NULL primary key default: nextval('billing.subscriptions_id_seq'::regclass)primary keyPKidbigintaccount_id bigint NOT NULL → accounts(id) on delete cascade fk_rails_a0b1c2d3e4 index index_subscriptions_on_account_id (account_id)foreign key → accounts(id) on delete cascade fk_rails_a0b1c2d3e4FKin 1 index index index_subscriptions_on_account_id (account_id)IXaccount_idbigintplan_id bigint NOT NULL → billing.plans(id) fk_rails_b1c2d3e4f5foreign key → billing.plans(id) fk_rails_b1c2d3e4f5FKplan_idbigint… 5 more columns