Sha256: 3a134e4f1a4b7fe9ab60247f2a9c9c646c4d043d8cf415c7c7edc47a41663dbf

Contents?: true

Size: 1.13 KB

Versions: 35

Compression:

Stored size: 1.13 KB

Contents

describe 'Ridgepole::Client#diff -> migrate' do
  context 'when table already defined' do
    let(:dsl) {
      <<-EOS
        create_table "employees", primary_key: "emp_no", force: :cascade do |t|
          t.date    "birth_date", null: false
          t.string  "first_name", limit: 14, null: false
          t.string  "last_name", limit: 16, null: false
          t.string  "gender", limit: 1, null: false
          t.date    "hire_date", null: false
          t.integer "age", unsigned: true, null: false
          t.date    "updated_at"
        end

        create_table "employees", primary_key: "emp_no", force: :cascade do |t|
          t.date    "birth_date", null: false
          t.string  "first_name", limit: 14, null: false
          t.string  "last_name", limit: 16, null: false
          t.string  "gender", limit: 1, null: false
          t.date    "hire_date", null: false
          t.integer "age", unsigned: true, null: false
          t.date    "updated_at"
        end
      EOS
    }

    subject { client }

    it {
      expect {
        subject.diff(dsl)
      }.to raise_error('Table `employees` 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_table_spec.rb
ridgepole-0.7.2 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.2.beta spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.1 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.1.beta5 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.1.beta4 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.1.beta3 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.1.beta2 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.1.beta spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.rc1 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.beta22 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.beta21 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.beta20 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.beta19 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.beta18 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.beta17 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.beta16 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.beta15 spec/mysql/migrate/migrate_duplicate_table_spec.rb
ridgepole-0.7.0.beta14 spec/mysql/migrate/migrate_duplicate_table_spec.rb