Class: CreateInvalidRecords
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateInvalidRecords
- Defined in:
- lib/generators/active_sanity/templates/create_invalid_records.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
11 12 13 |
# File 'lib/generators/active_sanity/templates/create_invalid_records.rb', line 11 def self.down drop_table :invalid_records end |
.up ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/generators/active_sanity/templates/create_invalid_records.rb', line 2 def self.up create_table :invalid_records do |t| t.references :record, :polymorphic => true, :null => false t.text :validation_errors t. end add_index :invalid_records, [:record_type, :record_id] end |