Sha256: dd5856393836e6a6d6c1016c6d97d9e3443ad956839248b9c21faab0a717cdc6

Contents?: true

Size: 537 Bytes

Versions: 4

Compression:

Stored size: 537 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 null: false
    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

4 entries across 4 versions & 1 rubygems

Version Path
rflow-1.3.2 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.3.1 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.3.0 lib/rflow/configuration/migrations/20010101000003_create_ports.rb
rflow-1.3.0a1 lib/rflow/configuration/migrations/20010101000003_create_ports.rb