Sha256: 038d926c299686d8f139fa9eb930fcb485b8858f8ae59886f8384967d782cc8a

Contents?: true

Size: 474 Bytes

Versions: 8

Compression:

Stored size: 474 Bytes

Contents

class CreateUsersUsingBlock < BaseOctopusMigrationClass
  def self.up
    Octopus.using(:brazil) do
      User.create!(:name => 'UsingBlock1')
      User.create!(:name => 'UsingBlock2')
    end

    Octopus.using(:canada) do
      User.create!(:name => 'UsingCanada')
      User.create!(:name => 'UsingCanada2')
    end
  end

  def self.down
    Octopus.using(:brazil) do
      User.delete_all
    end

    Octopus.using(:canada) do
      User.delete_all
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
ar-octopus-ruby-3-0.11.3 spec/migrations/12_create_users_using_block.rb
ar-octopus-ruby-3-0.11.2 spec/migrations/12_create_users_using_block.rb
ar-octopus-0.10.2 spec/migrations/12_create_users_using_block.rb
ar-octopus-0.10.1 spec/migrations/12_create_users_using_block.rb
ar-octopus-0.10.0 spec/migrations/12_create_users_using_block.rb
ar-octopus-master-0.9.2.1 spec/migrations/12_create_users_using_block.rb
ar-octopus-0.9.2 spec/migrations/12_create_users_using_block.rb
ar-octopus-0.9.1 spec/migrations/12_create_users_using_block.rb