Sha256: 2e949181a5026817f1ffb5f4ae678f3338979ad9bb6ad3c7c312b9943eb111b8

Contents?: true

Size: 489 Bytes

Versions: 27

Compression:

Stored size: 489 Bytes

Contents

class CreateFieldHierarchies < ActiveRecord::Migration[6.1]
  def change
    create_table :field_hierarchies, id: false do |t|
      t.integer :ancestor_id, null: false
      t.integer :descendant_id, null: false
      t.integer :generations, null: false
    end

    add_index :field_hierarchies, [:ancestor_id, :descendant_id, :generations],
      unique: true,
      name: "field_anc_desc_idx"

    add_index :field_hierarchies, [:descendant_id],
      name: "field_desc_idx"
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
headmin-0.6.3 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.2.9 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.6.2 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.6.1 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.6.0 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.9 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.8 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.7 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.6 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.5 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.4 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.3 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.2 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.1 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.5.0 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.4.2 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.4.1 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.4.0 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.3.4 lib/generators/templates/migrations/create_field_hierarchies.rb
headmin-0.3.3 lib/generators/templates/migrations/create_field_hierarchies.rb