Sha256: cefb91dd152e8d56fa1272a699796e0a58d334e0a2231c05228c097c16ed7326

Contents?: true

Size: 575 Bytes

Versions: 5

Compression:

Stored size: 575 Bytes

Contents

class CreateEcmStaffBusinessUnits < ActiveRecord::Migration[4.2]
  def change
    create_table :ecm_staff_business_units do |t|
      t.references :organisation

      t.string :name
      t.text :description

      # acts as markup
      t.string :markup_language

      # friendly id
      t.string :slug

      # awesome nested set
      t.references :parent
      t.integer :lft
      t.integer :rgt
      t.integer :depth

      t.timestamps
    end
    add_index :ecm_staff_business_units, :organisation_id
    add_index :ecm_staff_business_units, :parent_id
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecm_staff2-3.1.1 db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff2-3.1.0 db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff2-3.0.2 db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff2-3.0.1 db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff2-3.0.0 db/migrate/002_create_ecm_staff_business_units.rb