Class: SpaceCadet::UuidCore
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- SpaceCadet::UuidCore
- Defined in:
- lib/space_cadet_uuid.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
19 20 21 |
# File 'lib/space_cadet_uuid.rb', line 19 def self.down drop_table :uuids end |
.up ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/space_cadet_uuid.rb', line 7 def self.up create_table :uuids do |t| t.integer :source_id t.string :source_name t.integer :space_id t.string :uuid end add_index :uuids, :space_id, unique: true add_index :uuids, [:source_name, :source_id], unique: true end |