Class: CreateShards
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateShards
- Defined in:
- lib/rflow/configuration/migrations/20010101000001_create_shards.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
18 19 20 |
# File 'lib/rflow/configuration/migrations/20010101000001_create_shards.rb', line 18 def self.down drop_table :shards end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rflow/configuration/migrations/20010101000001_create_shards.rb', line 2 def self.up create_table(:shards, :id => false) do |t| t.string :uuid, :limit => 36, :primary => true t.string :name t.integer :count # STI t.string :type t. end add_index :shards, :uuid, :unique => true add_index :shards, :name, :unique => true end |