Add progress bar model
This commit is contained in:
23
db/migrate/20190103132925_create_progress_bars.rb
Normal file
23
db/migrate/20190103132925_create_progress_bars.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
class CreateProgressBars < ActiveRecord::Migration
|
||||
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
|
||||
Reference in New Issue
Block a user