# Oracle 26ai DDL — generation report

Source: live Neon (PostgreSQL 16.14) — 107 tables, 1300 columns.
Emitted: 107 CREATE TABLE, 106 FKs, 195 indexes.

## BLOCKER (2)

- **self_hosted_licenses** — self_hosted_licenses_one_free_per_user: partial index -> function-based CASE index (UNIQUE — enforces the same rule; verify before relying on it)
- **users** — users_google_id_idx: partial index -> function-based CASE index (UNIQUE — enforces the same rule; verify before relying on it)

## review (12)

- **migrations** — table `_migrations` renamed to `migrations` — Oracle identifiers cannot start with '_'
- **connection_health_runs** — column `trigger` renamed to `run_trigger` (Oracle reserved word) — update app call sites
- **agent_diagnose_runs** — detected_sids: text[] -> JSON array. App must read/write a JSON array, not a PG array.
- **agent_diagnose_runs** — listener_services: text[] -> JSON array. App must read/write a JSON array, not a PG array.
- **agent_tunnels** — oracle_sids: text[] -> JSON array. App must read/write a JSON array, not a PG array.
- **agent_tunnels** — pdb_services: text[] -> JSON array. App must read/write a JSON array, not a PG array.
- **agents_log_buffer** — lines: text[] -> JSON array. App must read/write a JSON array, not a PG array.
- **connection_schedules** — alert_email: NOT NULL relaxed — Neon holds '' which Oracle cannot store as non-NULL
- **fndload_history** — object_names: text[] -> JSON array. App must read/write a JSON array, not a PG array.
- **tns_topology_snapshots** — service_names: text[] -> JSON array. App must read/write a JSON array, not a PG array.
- **tns_topology_snapshots** — patch_services: text[] -> JSON array. App must read/write a JSON array, not a PG array.
- **oracle_doc_chunks** — oracle_doc_chunks_embedding_idx: pgvector ivfflat(lists=100) -> IVF vector index, COSINE. Verify accuracy//params against query patterns.

## info (45)

- **oracle_connections** — connectivity_mode: PG enum connectivity_mode_enum -> VARCHAR2 + CHECK
- **activity_log** — activity_log_company_domain_idx: partial index -> function-based CASE index
- **activity_log** — activity_log_connection_id_idx: partial index -> function-based CASE index
- **activity_log** — activity_log_user_id_idx: partial index -> function-based CASE index
- **agent_command_queue** — idx_agent_command_queue_expired_claims: partial index -> function-based CASE index
- **agent_install_failures** — idx_agent_install_failures_resolved: partial index -> function-based CASE index
- **agent_tunnels** — idx_agent_tunnels_uninstalled: partial index -> function-based CASE index
- **agent_upgrade_audit** — idx_agent_upgrade_audit_connection_verified: partial index -> function-based CASE index
- **agent_upgrade_audit** — idx_upgrade_audit_failures: partial index -> function-based CASE index
- **agents_log_buffer** — idx_agents_log_buffer_conn: dropped — duplicates the index Oracle creates for agents_log_buffer_connection_id_key
- **alert_events** — idx_alert_events_open: partial index -> function-based CASE index
- **analytics_events** — analytics_events_ip_idx: partial index -> function-based CASE index
- **analytics_events** — analytics_events_session_idx: partial index -> function-based CASE index
- **analytics_events** — analytics_events_user_id_idx: partial index -> function-based CASE index
- **approval_requests** — idx_approval_requests_status: partial index -> function-based CASE index
- **blog_posts** — idx_blog_posts_slug: dropped — duplicates the index Oracle creates for blog_posts_slug_key
- **check_results** — idx_check_results_status_time: partial index -> function-based CASE index
- **clone_history** — idx_clone_history_company: partial index -> function-based CASE index
- **clone_recipes** — idx_clone_recipes_company: partial index -> function-based CASE index
- **connection_schedules** — idx_schedules_due: partial index -> function-based CASE index
- **ebs_adop_state** — idx_ebs_adop_state_patching: partial index -> function-based CASE index
- **finding_history** — idx_finding_history_resolved_at: partial index -> function-based CASE index
- **installer_smoke_tokens** — idx_installer_smoke_tokens_token: partial index -> function-based CASE index
- **installer_validation_runs** — idx_installer_runs_topology_started: partial index -> function-based CASE index
- **magic_link_tokens** — magic_link_tokens_token_idx: dropped — duplicates the index Oracle creates for magic_link_tokens_token_key
- **oracle_connections** — idx_connections_key_rotation_status: partial index -> function-based CASE index
- **oracle_connections** — idx_connections_schedule_due: partial index -> function-based CASE index
- **oracle_connections** — idx_oc_ebs_instance_name: partial index -> function-based CASE index
- **oracle_connections** — idx_oracle_connections_first_run: partial index -> function-based CASE index
- **oracle_connections** — idx_oracle_connections_install_stalled: partial index -> function-based CASE index
- **oracle_connections** — idx_oracle_connections_status: partial index -> function-based CASE index
- **payments** — idx_payments_razorpay_order_id: dropped — duplicates the index Oracle creates for payments_razorpay_order_id_key
- **self_hosted_licenses** — idx_licenses_key: dropped — duplicates the index Oracle creates for self_hosted_licenses_license_key_key
- **ssh_install_credentials** — idx_ssh_install_creds_conn: dropped — duplicates the index Oracle creates for ssh_install_credentials_connection_id_key
- **sso_configs** — idx_sso_configs_domain: dropped — duplicates the index Oracle creates for sso_configs_company_domain_key
- **subscriptions** — idx_subscriptions_razorpay_id: dropped — duplicates the index Oracle creates for subscriptions_razorpay_subscription_id_key
- **team_invites** — idx_team_invites_token: dropped — duplicates the index Oracle creates for team_invites_token_key
- **tns_topology_snapshots** — idx_tns_topology_snapshots_share_token: partial index -> function-based CASE index
- **tuneops_notification_prefs** — idx_tuneops_notif_prefs_user_id: dropped — duplicates the index Oracle creates for tuneops_notification_prefs_user_id_key
- **tuneops_tickets** — idx_tuneops_tickets_canonical: partial index -> function-based CASE index
- **tuneops_tickets** — idx_tuneops_tickets_company: partial index -> function-based CASE index
- **user_credits** — idx_user_credits_user_id: dropped — duplicates the index Oracle creates for user_credits_user_id_key
- **user_mfa** — idx_user_mfa_user_id: dropped — duplicates the index Oracle creates for user_mfa_user_id_key
- **user_preferences** — idx_user_preferences_user_id: dropped — duplicates the index Oracle creates for user_preferences_user_id_key
- **validation_runs** — idx_validation_runs_share_token: partial index -> function-based CASE index
