ridgepole 0.7.0.beta12 → 0.7.0.beta13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49d810a267218a0eb0e29b24172b263bb01160de
4
- data.tar.gz: 103967b434908d08b210e156107f5833fc45a567
3
+ metadata.gz: f26a101fb8d0e30d98ed68ea44d6d10c9e1b4890
4
+ data.tar.gz: 765b92df8b2d0fb304f062cfdf4b2eb3eb230e0b
5
5
  SHA512:
6
- metadata.gz: 80869484e860c7e14bd0757b09b72a6694cfa8dfadc883127f7f61c32e198954e16c00deb2ff63568c0fa04525b5604d9eb65c111a54654d035d1c534e7afab9
7
- data.tar.gz: dd88225d51a88f149f8de5b913fa7198d5c97ff707e91062b7eb21a61be4e53d5f09b336adaef5f080ea98b9257b1a427bc83738760c1c5ffe321929e4108957
6
+ metadata.gz: 537d7f1e01baff056b431cfa6d4f55db876e4564ae76a5da3ba2224f567c04bdacb5c0181270e7f1bba67298957506f980cab9813f88ee4c60c9b1a0102aa9bd
7
+ data.tar.gz: a74a3b777e4ccc6e25f9978895150beccd140585553d3dd53590ddc3b5944ce966032bf00e5f83f4137693d87c1955b2b0a8cc6befb9d1cb29d3a3c76ffd55f1
data/README.md CHANGED
@@ -9,7 +9,7 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
9
9
  [![Build Status](https://travis-ci.org/winebarrel/ridgepole.svg?branch=0.6)](https://travis-ci.org/winebarrel/ridgepole)
10
10
  [![Coverage Status](https://coveralls.io/repos/github/winebarrel/ridgepole/badge.svg?branch=0.6)](https://coveralls.io/github/winebarrel/ridgepole?branch=0.6)
11
11
 
12
- [![Edge Version](https://img.shields.io/badge/edge_version-0.7.0.beta12-brightgreen.svg)](https://rubygems.org/gems/ridgepole/versions/0.7.0.beta12)
12
+ [![Edge Version](https://img.shields.io/badge/edge_version-0.7.0.beta13-brightgreen.svg)](https://rubygems.org/gems/ridgepole/versions/0.7.0.beta13)
13
13
  [![Build Status](https://travis-ci.org/winebarrel/ridgepole.svg?branch=0.7)](https://travis-ci.org/winebarrel/ridgepole)
14
14
  [![Coverage Status](https://coveralls.io/repos/github/winebarrel/ridgepole/badge.svg?branch=0.7)](https://coveralls.io/github/winebarrel/ridgepole?branch=0.7)
15
15
 
@@ -314,6 +314,11 @@ class Ridgepole::Diff
314
314
 
315
315
  if Ridgepole::ConnectionAdapters.mysql?
316
316
  opts[:unsigned] = false unless opts.has_key?(:unsigned)
317
+
318
+ if attrs[:type] == :integer and opts[:limit] == Ridgepole::DefaultsLimit.default_limit(:bigint, @options)
319
+ attrs[:type] = :bigint
320
+ opts.delete(:limit)
321
+ end
317
322
  end
318
323
  end
319
324
 
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.7.0.beta12'
2
+ VERSION = '0.7.0.beta13'
3
3
  end
@@ -0,0 +1,23 @@
1
+ describe 'Ridgepole::Client#diff -> migrate' do
2
+ context 'integer/limit:8 = bigint' do
3
+ let(:dsl) {
4
+ erbh(<<-EOS)
5
+ create_table "salaries", id: false, force: :cascade do |t|
6
+ t.integer "emp_no", limit: 8, null: false
7
+ t.float "salary", limit: 24, null: false
8
+ t.date "from_date", null: false
9
+ t.date "to_date", null: false
10
+ end
11
+ EOS
12
+ }
13
+
14
+ before { subject.diff(dsl).migrate }
15
+ subject { client }
16
+
17
+ it {
18
+ expect(subject.dump).to match_fuzzy dsl.sub(/t.integer "emp_no", limit: 8/, 't.bigint "emp_no"')
19
+ delta = subject.diff(dsl)
20
+ expect(delta.differ?).to be_falsey
21
+ }
22
+ end
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.beta12
4
+ version: 0.7.0.beta13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
@@ -273,6 +273,7 @@ files:
273
273
  - spec/mysql/migrate/migrate_change_column4_spec.rb
274
274
  - spec/mysql/migrate/migrate_change_column5_spec.rb
275
275
  - spec/mysql/migrate/migrate_change_column6_spec.rb
276
+ - spec/mysql/migrate/migrate_change_column7_spec.rb
276
277
  - spec/mysql/migrate/migrate_change_column_default_spec.rb
277
278
  - spec/mysql/migrate/migrate_change_column_float_spec.rb
278
279
  - spec/mysql/migrate/migrate_change_column_spec.rb
@@ -418,6 +419,7 @@ test_files:
418
419
  - spec/mysql/migrate/migrate_change_column4_spec.rb
419
420
  - spec/mysql/migrate/migrate_change_column5_spec.rb
420
421
  - spec/mysql/migrate/migrate_change_column6_spec.rb
422
+ - spec/mysql/migrate/migrate_change_column7_spec.rb
421
423
  - spec/mysql/migrate/migrate_change_column_default_spec.rb
422
424
  - spec/mysql/migrate/migrate_change_column_float_spec.rb
423
425
  - spec/mysql/migrate/migrate_change_column_spec.rb