Class: AuxCodes::CreateAuxCodes
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AuxCodes::CreateAuxCodes
- Defined in:
- lib/aux_codes/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
26 27 28 |
# File 'lib/aux_codes/migration.rb', line 26 def self.down drop_table :aux_codes end |
.up ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/aux_codes/migration.rb', line 7 def self.up create_table :aux_codes, :comment => 'Auxilary Codes' do |t| t.integer :aux_code_id, :comment => 'ID of parent aux code (Category)', :null => false t.string :name, :comment => 'Name of Category code (or child code)', :null => false # disabled for now, as they're not needed - no specs using this functionality # # %w( integer decimal string text boolean datetime ).each do |field_type| # t.column field_type.to_sym, "#{field_type}_field" # end # this should be added conditionally, based on whether or not meta attributes are desired t.text :meta, :comment => 'Serialized meta_attributes' t. end end |