Files
sanasto-wiki/db/migrate/20260129204705_add_status_to_entries.rb
Runar Ingebrigtsen 530021960e
CI / scan_ruby (push) Failing after 12s
CI / scan_js (push) Successful in 11s
CI / lint (push) Failing after 19s
CI / test (push) Successful in 34s
add entry requests, invite new users
2026-01-30 01:28:53 +01:00

14 lines
339 B
Ruby

class AddStatusToEntries < ActiveRecord::Migration[8.1]
def change
add_column :entries, :status, :integer, default: 2, null: false
add_index :entries, :status
# Set all existing entries to status: 2 (active)
reversible do |dir|
dir.up do
execute "UPDATE entries SET status = 2"
end
end
end
end