Unclassified
Round 2 — Neon Migration 035 Verification
Date: 2026-07-29
Migration: 035_canonical_spine_schema_fortress.sql
Status: Migration exists; live verification needed
Migration Stats
| Metric | Count |
|---|---|
| Total lines | 1,634 |
| Tables created | 114 |
| Indexes created | 39 |
| Extensions | 2 (uuid-ossp, pgcrypto) |
| Policies (RLS) | 0 (added in 042) |
Key Tables (Customer Zero / External Product)
Identity & Tenancy
spine_organizations— organization registryspine_workspaces— workspace registryspine_users— user registryspine_memberships— user↔organization membershipspine_roles— role definitionsspine_permissions— permission definitionsspine_role_bindings— user↔role assignmentsspine_consent_grants— consent recordsspine_api_key_refs— API key references
Platform Configuration
platform_config_layers— config layer registryplatform_compiled_configs— compiled config snapshotsplatform_feature_flags— feature flag registryplatform_entitlements— entitlement definitionsplatform_activation_runs— activation run recordsplatform_activation_steps— activation step recordsplatform_hydration_plans— hydration plan registry
Connectors & Integrations
spine_connector_catalog— connector catalog (65 connectors)spine_connector_versions— connector version registryspine_connector_installations— tenant connector installationsintegration_connections— active connectionsintegration_connection_health— connection health recordsintegration_provider_schemas— provider schema definitionsintegration_schema_mappings— schema mapping rulesintegration_sync_cursors— sync cursor stateintegration_webhook_endpoints— webhook endpoint registry
Discovery
discovery_runs— discovery run recordsdiscovery_assets— discovered assetsdiscovery_capability_candidates— capability candidatesdiscovery_domain_manifests— domain manifest records
Spine Core
spine_entities— entity registryspine_activities— activity logspine_knowledge_documents— knowledge documentsspine_knowledge_topics— knowledge topicsspine_memories— memory recordsspine_lifecycle_definitions— lifecycle definitionsspine_lifecycle_transitions— lifecycle transitionsspine_proposals— governance proposalsspine_evidence— proposal evidencespine_approvals— approval records
Governance
governance_proposals— governance proposal registrygovernance_checkpoints— checkpoint records (D1 in 042)governance_audit_log— audit log
Product
product_workbench_overview— workbench overview projectionproduct_workbench_items— workbench item projectionproduct_workbench_metrics— workbench metric projection
Verification Queries
Run these against the live Neon database to verify migration 035 is applied:
-- 1. Check extension
SELECT extname FROM pg_extension WHERE extname IN ('uuid-ossp', 'pgcrypto');
-- 2. Check critical tables exist
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public'
AND table_name IN (
'spine_organizations', 'spine_workspaces', 'spine_users',
'spine_memberships', 'spine_connector_catalog',
'spine_connector_installations', 'spine_entities',
'spine_activities', 'spine_proposals', 'governance_proposals',
'product_workbench_overview'
)
ORDER BY table_name;
-- 3. Check indexes
SELECT indexname FROM pg_indexes
WHERE schemaname = 'public'
AND tablename LIKE 'spine_%'
ORDER BY indexname
LIMIT 20;
-- 4. Check table counts
SELECT
(SELECT count(*) FROM information_schema.tables WHERE table_schema = 'public') as total_tables,
(SELECT count(*) FROM pg_indexes WHERE schemaname = 'public') as total_indexes;
-- 5. Check RLS policies (should be 0 in 035, added in 042)
SELECT policyname FROM pg_policies WHERE schemaname = 'public' LIMIT 5;
Expected Results
| Check | Expected |
|---|---|
| Extensions | uuid-ossp, pgcrypto present |
| Critical tables | All 11 tables listed above exist |
| Table count | ≥ 114 |
| Index count | ≥ 39 |
| RLS policies | 0 (added in migration 042) |
If Migration 035 Is Not Applied
# Apply migration 035 to Neon
psql "$FORTRESS_DATABASE_URL" -f migrations/035_canonical_spine_schema_fortress.sql
# Verify after application
psql "$FORTRESS_DATABASE_URL" -c "SELECT count(*) FROM information_schema.tables WHERE table_schema = 'public';"
Customer Zero Specific
Customer Zero uses the same tables but with tenant_id = 'iw-customer-zero' on all tenant-owned rows. After migration 035 is verified:
-- Check Customer Zero data exists
SELECT count(*) FROM spine_connector_installations WHERE tenant_id = 'iw-customer-zero';
SELECT count(*) FROM spine_entities WHERE tenant_id = 'iw-customer-zero';