Sha256: 460bd4aec98f03ae5eb9491632c7c01e2c36517f62bd29430332d094b367408b

Contents?: true

Size: 570 Bytes

Versions: 7

Compression:

Stored size: 570 Bytes

Contents

class CreateEcmStaffBusinessUnits < ActiveRecord::Migration
  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

7 entries across 7 versions & 2 rubygems

Version Path
ecm_staff2-2.0.0 db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff2-1.0.0 db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff2-0.0.3 db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff2-0.0.2 db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff2-0.0.1 db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff-0.0.2.pre db/migrate/002_create_ecm_staff_business_units.rb
ecm_staff-0.0.1.pre db/migrate/002_create_ecm_staff_business_units.rb