-- 32b_add_blocked_reason_to_partner_ampere_accounts.sql
--
-- BUG-28: migration 57 creates the view v_partner_ampere_summary, which selects
-- paa.blocked_reason from partner_ampere_accounts. No migration ever created that
-- column. It exists in the production database, added by hand and never recorded,
-- so migration 57 succeeded there and fails on every fresh database with:
--   stmt #12 [42S22/1054] Unknown column 'paa.blocked_reason' in 'field list'
--
-- Scope: this migration adds only the column needed to make migration 57 runnable
-- from zero. partner_ampere_accounts diverges from 32_partner_ampere_accounts.sql
-- in several further ways (id is int in production and bigint in the migration,
-- different unique and index names, two foreign keys and two CHECK constraints
-- present only in production, updated_at nullability). That divergence is tracked
-- as BUG-29 and is deliberately NOT addressed here.
--
-- Plain ALTER TABLE with no IF NOT EXISTS: that form is MariaDB-only and would
-- break the MySQL image used by CI. On production this file is recorded by
-- --baseline-existing and never executed.

ALTER TABLE `partner_ampere_accounts`
    ADD COLUMN `blocked_reason` VARCHAR(255) NULL DEFAULT NULL AFTER `is_blocked`;
