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