DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for: class MigrationClass < ActiveRecord::Migration[4.2] (called from require at bin/rails:4)
24 lines
485 B
Ruby
24 lines
485 B
Ruby
class CreateProgressBars < ActiveRecord::Migration[4.2]
|
|
def change
|
|
create_table :progress_bars do |t|
|
|
t.integer :kind
|
|
t.integer :percentage
|
|
t.references :progressable, polymorphic: true
|
|
|
|
t.timestamps null: false
|
|
end
|
|
|
|
reversible do |change|
|
|
change.up do
|
|
ProgressBar.create_translation_table!({
|
|
title: :string
|
|
})
|
|
end
|
|
|
|
change.down do
|
|
ProgressBar.drop_translation_table!
|
|
end
|
|
end
|
|
end
|
|
end
|