Add progress bar model

This commit is contained in:
Javi Martín
2019-01-04 14:42:46 +01:00
committed by decabeza
parent c3c9b02220
commit eaea95ccfb
9 changed files with 205 additions and 1 deletions

View 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