Class: Enginery::Migrator::TracksMigrator
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- Enginery::Migrator::TracksMigrator
- Defined in:
- app/migrations/tracking_table/ActiveRecord.rb
Instance Method Summary collapse
Instance Method Details
#up ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/migrations/tracking_table/ActiveRecord.rb', line 6 def up return if table_exists?(TRACKING_TABLE) create_table TRACKING_TABLE do |t| TRACKING_TABLE__COLUMNS.each {|c| t.string(c, limit: 255)} end TRACKING_TABLE__INDEXES.each {|c| add_index(TRACKING_TABLE, c)} end |