Sha256: b9cf5ee88c54677a135e6dcc0188475f47f6fdcb612a1455931c228be5ce061b

Contents?: true

Size: 676 Bytes

Versions: 9

Compression:

Stored size: 676 Bytes

Contents

class CreateStructures < ActiveRecord::Migration
  def change
    create_table :spina_structures do |t|
      t.timestamps
    end

    create_table :spina_structure_items do |t|
      t.integer :structure_id
      t.integer :position
      t.timestamps
    end

    add_index :spina_structure_items, :structure_id

    create_table :spina_structure_parts do |t|
      t.integer :structure_item_id
      t.integer :structure_partable_id
      t.string :structure_partable_type
      t.string :name
      t.string :title
      t.timestamps
    end

    add_index :spina_structure_parts, :structure_item_id
    add_index :spina_structure_parts, :structure_partable_id
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spina-0.6.22 db/migrate/20150402144347_create_structures.rb
spina-0.6.21 db/migrate/20150402144347_create_structures.rb
spina-0.6.20 db/migrate/20150402144347_create_structures.rb
spina-0.6.19 db/migrate/20150402144347_create_structures.rb
spina-0.6.18 db/migrate/20150402144347_create_structures.rb
spina-0.6.17 db/migrate/20150402144347_create_structures.rb
spina-0.6.16 db/migrate/20150402144347_create_structures.rb
spina-0.6.15 db/migrate/20150402144347_create_structures.rb
spina-0.6.14 db/migrate/20150402144347_create_structures.rb