0.5.1-pre.002
This commit is contained in:
21
ks-store/maintenance/drop_raw_core_store.sql
Normal file
21
ks-store/maintenance/drop_raw_core_store.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- file: ks-store/maintenance/drop_raw_core_store.sql
|
||||
-- version: 2
|
||||
|
||||
-- Drop raw and core Solana storage tables in reverse dependency order.
|
||||
-- This script is intended for local development and test databases only.
|
||||
-- It does not drop unrelated schemas, migrations, roles or configuration state.
|
||||
-- It intentionally avoids CASCADE so unexpected dependencies fail loudly.
|
||||
-- No custom PostgreSQL enum/domain types are owned by these 0.2.3/0.2.4 tables.
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP TABLE IF EXISTS kb_sol_core_balance_changes;
|
||||
DROP TABLE IF EXISTS kb_sol_core_logs;
|
||||
DROP TABLE IF EXISTS kb_sol_core_inner_instructions;
|
||||
DROP TABLE IF EXISTS kb_sol_core_instructions;
|
||||
DROP TABLE IF EXISTS kb_sol_core_account_keys;
|
||||
DROP TABLE IF EXISTS kb_sol_core_transactions;
|
||||
DROP TABLE IF EXISTS kb_sol_obs_transaction_observations;
|
||||
DROP TABLE IF EXISTS kb_sol_raw_transactions;
|
||||
|
||||
COMMIT;
|
||||
30
ks-store/maintenance/reset_derived_store_keep_raw.sql
Normal file
30
ks-store/maintenance/reset_derived_store_keep_raw.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
-- file: ks-store/maintenance/reset_derived_store_keep_raw.sql
|
||||
-- version: 3
|
||||
|
||||
-- Reset every reconstructible Solana projection while preserving acquisition data.
|
||||
-- Intended for controlled local/research rebuilds only.
|
||||
-- Preserved tables:
|
||||
-- - kb_sol_raw_transactions
|
||||
-- - kb_sol_obs_transaction_observations
|
||||
-- No CASCADE is used: unexpected dependencies fail loudly.
|
||||
|
||||
BEGIN;
|
||||
TRUNCATE TABLE
|
||||
kb_sol_mat_events,
|
||||
kb_sol_decode_coverage_observations,
|
||||
kb_sol_decode_coverage_declarations,
|
||||
kb_sol_decode_events,
|
||||
kb_sol_ops_processing_ledger,
|
||||
kb_sol_core_balance_changes,
|
||||
kb_sol_core_logs,
|
||||
kb_sol_core_inner_instructions,
|
||||
kb_sol_core_instructions,
|
||||
kb_sol_core_account_keys,
|
||||
kb_sol_core_transactions
|
||||
RESTART IDENTITY;
|
||||
UPDATE kb_sol_raw_transactions
|
||||
SET
|
||||
processing_state = 'received',
|
||||
lifecycle_reason = NULL,
|
||||
updated_at = NOW();
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user