diff options
| author | soryu <soryu@soryu.co> | 2026-02-04 01:18:31 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-02-04 01:18:31 +0000 |
| commit | ebba95213847a129016c313be5dcdbcbb812ef32 (patch) | |
| tree | 174499827f00ab6cf6ce87304087012f13865356 /makima/migrations | |
| parent | a734bf1a472b19d63341769d26a66628575df7f4 (diff) | |
| download | soryu-ebba95213847a129016c313be5dcdbcbb812ef32.tar.gz soryu-ebba95213847a129016c313be5dcdbcbb812ef32.zip | |
Fix default chain status
Diffstat (limited to 'makima/migrations')
| -rw-r--r-- | makima/migrations/20260204100000_chain_default_pending.sql | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/makima/migrations/20260204100000_chain_default_pending.sql b/makima/migrations/20260204100000_chain_default_pending.sql new file mode 100644 index 0000000..2803562 --- /dev/null +++ b/makima/migrations/20260204100000_chain_default_pending.sql @@ -0,0 +1,12 @@ +-- Fix chain default status to 'pending' instead of 'active' +-- Chains should start as pending until explicitly started + +-- Change default for new chains +ALTER TABLE chains ALTER COLUMN status SET DEFAULT 'pending'; + +-- Update any chains that have no contracts and are 'active' to 'pending' +-- (These were likely created but never properly started) +UPDATE chains +SET status = 'pending' +WHERE status = 'active' + AND id NOT IN (SELECT DISTINCT chain_id FROM chain_contracts WHERE chain_id IS NOT NULL); |
