Sha256: ac7dc3bd8cfbd61787156ae10c125a7ad03c33744109550653a4ffe23461da29

Contents?: true

Size: 695 Bytes

Versions: 52

Compression:

Stored size: 695 Bytes

Contents

describe 'Ridgepole::Client#diff -> migrate' do
  context 'when index already defined' do
    let(:dsl) {
      <<-RUBY
        create_table "salaries", id: false, force: true do |t|
          t.integer "emp_no",    null: false
          t.integer "salary",    null: false
          t.date    "from_date", null: false
          t.date    "to_date",   null: false
        end

        add_index "salaries", ["emp_no"], name: "emp_no", using: :btree
        add_index "salaries", ["emp_no"], name: "emp_no", using: :btree
      RUBY
    }

    subject { client }

    it {
      expect {
        subject.diff(dsl)
      }.to raise_error('Index `salaries(emp_no)` already defined')
    }
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
ridgepole-0.5.3.beta4 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.3.beta2 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.3.beta spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.2 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.2.beta6 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.2.beta5 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.2.beta4 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.2.beta3 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.2.beta2 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.2.beta spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.1 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.1.beta3 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.1.beta2 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.1.beta spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.0 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.5.0.beta spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.4.12 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.4.11.beta spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.4.10 spec/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.4.10.beta spec/migrate/migrate_duplicate_index_spec.rb