Sha256: 41ddcc9a221152a8321b0a295280399609444d41a783a66098accb4bcb4df086

Contents?: true

Size: 1.13 KB

Versions: 32

Compression:

Stored size: 1.13 KB

Contents

describe 'Ridgepole::Client (with integer pk)', condition: 5.1 do
  context 'when with id:integer' do
    let(:dsl) {
      <<-EOS
        create_table "books", id: :integer, force: :cascade do |t|
          t.string   "title", null: false
          t.integer  "author_id", null: false
          t.datetime "created_at"
          t.datetime "updated_at"
        end
      EOS
    }

    subject { client }

    before { subject.diff(dsl).migrate }

    specify {
      expect(show_create_table(:books)).to include '`id` int(11) NOT NULL AUTO_INCREMENT'
      expect(subject.dump).to match_fuzzy dsl
    }
  end

  context 'when without id:integer' do
    let(:dsl) {
      <<-EOS
        create_table "books", force: :cascade do |t|
          t.string   "title", null: false
          t.integer  "author_id", null: false
          t.datetime "created_at"
          t.datetime "updated_at"
        end
      EOS
    }

    subject { client }

    before { subject.diff(dsl).migrate }

    specify {
      expect(show_create_table(:books)).to include '`id` bigint(20) NOT NULL AUTO_INCREMENT'
      expect(subject.dump).to match_fuzzy dsl
    }
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
ridgepole-0.7.0.beta10 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.beta9 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.beta8 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.beta7 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.beta6 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.beta5 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.beta4 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.beta3 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.beta2 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.beta spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.alpha3 spec/mysql/bigint_pk/int_pk_spec.rb
ridgepole-0.7.0.alpha2 spec/mysql/bigint_pk/int_pk_spec.rb