-- +goose Up
ALTER TABLE federal_states
  ADD COLUMN IF NOT EXISTS sortkey INT NULL AFTER name,
  ADD COLUMN IF NOT EXISTS is_active TINYINT(1) NOT NULL DEFAULT 1 AFTER note,
  ADD KEY idx_federal_states_sortkey (sortkey),
  ADD KEY idx_federal_states_is_active (is_active);

-- +goose Down
ALTER TABLE federal_states
  DROP KEY idx_federal_states_sortkey,
  DROP KEY idx_federal_states_is_active,
  DROP COLUMN IF EXISTS sortkey,
  DROP COLUMN IF EXISTS is_active;
