mirror of
https://github.com/projekteuler/projekteuler.git
synced 2025-12-10 16:46:42 +01:00
16 lines
347 B
Ruby
16 lines
347 B
Ruby
class AddStatusToTranslations < ActiveRecord::Migration[5.2]
|
|
def change
|
|
add_column :translations, :status, :integer, default: 0
|
|
|
|
reversible do |dir|
|
|
dir.up do
|
|
Problem.all.each do |problem|
|
|
if problem.is_translated?
|
|
problem.translation.in_use!
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|