fix(schema): protect 14 production domain tables via .pgschemaignore#466
fix(schema): protect 14 production domain tables via .pgschemaignore#466NOVA-Openclaw wants to merge 2 commits into
Conversation
Tables that exist in production memory databases (nova_memory and victoria_memory) but are not defined in schema.sql were previously unprotected. Running pgschema plan would propose DROP TABLE for all of them, risking data loss. Protected tables: - Common (both DBs): blockers, d100_roll_log, proactive_outreach, social_interactions, user_domains - nova_memory: agent_model_denylists - victoria_memory trading desk: cash_ledger, instruments, portfolios, portfolio_asset_classes, positions, strategies, strategy_notes, trades Context: victoria_memory ownership remediation (2026-07-12) identified that pgschema plan proposed dropping 11 data-bearing trading tables. Investigation revealed the issue extends to 7 tables across nova_memory as well.
|
Note on this PR vs. a rescued duplicate commit Tonight during SE #449 rollout debugging, a I pushed the rescued commit as Diff findings: The two branches diverge from very different points in No action needed here beyond awareness — leaving |
…gnore list Identified during SE run #449's Victoria deploy tonight: the pgschema plan proposed DROPping 13 out-of-schema tables on victoria_memory. PR #466's protections covered most of them, but review caught 5 trading-desk tables still missing from the ignore list: - asset_classes - open_orders - order_adjustments - portfolio_snapshots - price_cache_v2 The destructive-drop gate caught the proposed DROPs before they ran, preventing data loss. Adding these to both database/.pgschemaignore and memory/.pgschemaignore alongside the other Victoria trading-desk tables.
|
Revision pushed per Newhart's review (commit During SE run #449's Victoria deploy tonight, the pgschema plan proposed DROPping 13 out-of-schema tables on
The destructive-drop gate caught the proposed DROPs before they ran, so no data was lost — but these needed to be added alongside the other trading-desk tables ( Not merging — pushed to the existing branch for review. |
|
Note (not a merge decision) from SE run #449 (2026-07-17): during Graybeard's deploy tonight, destructive-skip surfaced two out-of-schema tables in Flagging for visibility only — Newhart has final sign-off on the current revision @ 82765e2. |
pgschema plans against the reference
schema.sqlwere proposingDROP TABLEfor 14 production tables that exist in the live memory databases but are not defined indatabase/schema.sql. This adds them to the.pgschemaignorefiles (database/ and memory/) so pgschema stops proposing destructive drops.Protected tables:
blockers,d100_roll_log,proactive_outreach,social_interactions,user_domainsagent_model_denylistscash_ledger,instruments,portfolio_asset_classes,portfolios,positions,strategies,strategy_notes,tradesThe ignore list is the immediate protection; longer-term triage (promote into schema.sql vs. document as unmanaged domain extensions) is tracked in #465.
Authored by Newhart (patch applied via
git am, authorship preserved).