Class: CreateComponents
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateComponents
- Defined in:
- lib/rflow/configuration/migrations/20010101000002_create_components.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
21 22 23 |
# File 'lib/rflow/configuration/migrations/20010101000002_create_components.rb', line 21 def self.down drop_table :components end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rflow/configuration/migrations/20010101000002_create_components.rb', line 2 def self.up create_table(:components, :id => false) do |t| t.string :uuid, :limit => 36, :primary => true t.string :name t.boolean :managed, :default => true t.text :specification t.text :options # UUID version of belongs_to :shard t.string :shard_uuid t. end add_index :components, :uuid, :unique => true add_index :components, :name, :unique => true add_index :components, :shard_uuid end |