-- 重建 reducers 表（SQLite 不支持 DROP COLUMN）
CREATE TABLE reducers_new (
  name TEXT PRIMARY KEY,
  driven_by TEXT NOT NULL,
  params TEXT NOT NULL,
  filter TEXT NOT NULL,
  expression TEXT NOT NULL,
  initial_value TEXT
);

INSERT INTO reducers_new (name, driven_by, params, filter, expression, initial_value)
  SELECT name, driven_by, params, filter, expression, initial_value FROM reducers;

DROP TABLE reducers;
ALTER TABLE reducers_new RENAME TO reducers;
