Files
grecia/db/migrate/20190103132925_create_progress_bars.rb
Julian Herrero 65c30c8d2d Remove migrations warning
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)
2019-04-17 17:40:56 +02:00

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