-- Fixes production drift: live `charges.tariff_id` is NOT NULL with no
-- default, but manual charge entry (PaymentController::storeCharge(), both
-- the decommissioned legacy version and the current Laravel port) has never
-- supplied tariff_id — it's set later by billing, not at charge-creation
-- time. The repo's own docker/mysql/init/000_schema.sql has always declared
-- this column `INT NULL`; production's live schema disagrees, causing every
-- manual "+ Начисление" charge to fail with:
--   SQLSTATE[HY000]: 1364 Field 'tariff_id' doesn't have a default value
--
-- Safe to run once; if the column is already nullable this is a no-op.

ALTER TABLE charges MODIFY tariff_id INT NULL;
