File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -28,15 +28,17 @@ def self.down
2828 end
2929 end
3030
31- class SerialNumber < ActiveRecord ::Base ; end
31+ class SerialNumber < ActiveRecord ::Base
32+ #self.primary_key = 'serial' unless MySQLTableNameTest.ar_version('3.0')
33+ end
3234
3335 test 'serial number' do
3436 sn = SerialNumber . new ; sn . serial = 1234567890 ; sn . serial_patch = 11
3537 sn . save!
3638 assert sn . reload
3739
3840 SerialNumber . columns
39- end
41+ end if ar_version ( '3.2' )
4042
4143 class SerialMigration < ActiveRecord ::Migration
4244 def self . up
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class SerialNumber < ActiveRecord::Base; end
3636 assert sn . reload
3737
3838 SerialNumber . columns
39- end
39+ end if ar_version ( '3.1' )
4040
4141 class SerialMigration < ActiveRecord ::Migration
4242
Original file line number Diff line number Diff line change @@ -42,12 +42,13 @@ def self.down
4242 class SerialNumber < ActiveRecord ::Base ; end
4343
4444 test 'serial number' do
45+ skip ( 'fails with prepared statements' ) if ar_version ( '3.1' ) && prepared_statements?
4546 sn = SerialNumber . new ; sn . serial = 1234567890 ; sn . serial_patch = 11
4647 sn . save!
4748 assert sn . reload
4849
4950 SerialNumber . columns
50- end
51+ end if ar_version ( '3.2' )
5152
5253 class SerialMigration < ActiveRecord ::Migration
5354 def self . up
You can’t perform that action at this time.
0 commit comments