Sha256: c23144969a6619fa17541cfb5084ad42a82573acc27e6128d836a8095637b7b6

Contents?: true

Size: 689 Bytes

Versions: 35

Compression:

Stored size: 689 Bytes

Contents

describe 'Ridgepole::Client#diff -> migrate' do
  context 'when index already defined' do
    let(:dsl) {
      <<-EOS
        create_table "salaries", id: false, force: :cascade 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
      EOS
    }

    subject { client }

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

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
ridgepole-0.7.3.beta spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.2 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.2.beta spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.1 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.1.beta5 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.1.beta4 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.1.beta3 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.1.beta2 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.1.beta spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.rc1 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.beta22 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.beta21 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.beta20 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.beta19 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.beta18 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.beta17 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.beta16 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.beta15 spec/mysql/migrate/migrate_duplicate_index_spec.rb
ridgepole-0.7.0.beta14 spec/mysql/migrate/migrate_duplicate_index_spec.rb