Sha256: dac6c261365574055821b38bb50a56cdd50f878cebf171a205aa2b9c4243911a

Contents?: true

Size: 525 Bytes

Versions: 10

Compression:

Stored size: 525 Bytes

Contents

class CreatePorts < ActiveRecord::Migration
  def self.up
    create_table(:ports, :id => false) do |t|
      t.string :uuid, :limit => 36, :primary => true
      t.string :name

      # For STI
      t.text   :type

      # UUID version of belongs_to :component
      t.string :component_uuid

      t.timestamps
    end

    add_index :ports, :uuid, :unique => true
    add_index :ports, :component_uuid
    add_index :ports, [:component_uuid, :name], :unique => true
  end

  def self.down
    drop_table :ports
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rflow-1.2.0 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.1.0 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.0.1 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.0.0 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.0.0a6 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.0.0a5 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.0.0a4 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.0.0a3 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.0.0a2 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.0.0a1 lib/rflow/configuration/migrations/20010101000003_create_ports.rb