Class: CreateOrgUnits
- Inherits:
-
Object
- Object
- CreateOrgUnits
- Defined in:
- lib/ucb_orgs/migrations/20171211220534_create_org_units.rb
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
20 21 22 |
# File 'lib/ucb_orgs/migrations/20171211220534_create_org_units.rb', line 20 def down drop_table :org_units end |
#up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ucb_orgs/migrations/20171211220534_create_org_units.rb', line 2 def up create_table :org_units do |t| t.string :code t.string :name t.integer :level t.string :level_2 t.string :level_3 t.string :level_4 t.string :level_5 t.string :level_6 t. end add_index :org_units, :code, unique: true end |