Table "cafe.payment_diff_reasons" Column | Type | Collation | Nullable | Default ------------+--------------------------+-----------+----------+------------------- id | uuid | | not null | gen_random_uuid() tenant_id | uuid | | not null | name | character varying(100) | | not null | is_active | boolean | | not null | true created_at | timestamp with time zone | | not null | CURRENT_TIMESTAMP created_by | uuid | | | Indexes: "payment_diff_reasons_pkey" PRIMARY KEY, btree (id) "payment_diff_reasons_tenant_active_idx" btree (tenant_id, is_active) "payment_diff_reasons_tenant_id_name_unique" UNIQUE CONSTRAINT, btree (tenant_id, name) Foreign-key constraints: "payment_diff_reasons_created_by_foreign" FOREIGN KEY (created_by) REFERENCES tenant_users(id) ON DELETE SET NULL "payment_diff_reasons_tenant_id_foreign" FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE Referenced by: TABLE "cafe.sessions" CONSTRAINT "sessions_diff_reason_id_foreign" FOREIGN KEY (diff_reason_id) REFERENCES cafe.payment_diff_reasons(id) ON DELETE SET NULL