aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/primary_keys_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-02-12 07:01:04 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-03-12 18:26:41 +0900
commit98fb37449e57ab1d956de0ff1d1e309f8b28814b (patch)
tree5af5851914eff42e19096a0f2ae18a545711f7e6 /activerecord/test/cases/primary_keys_test.rb
parent9201030320d09bb2ec76a7cc59aa58f77f984995 (diff)
downloadrails-98fb37449e57ab1d956de0ff1d1e309f8b28814b.tar.gz
rails-98fb37449e57ab1d956de0ff1d1e309f8b28814b.tar.bz2
rails-98fb37449e57ab1d956de0ff1d1e309f8b28814b.zip
Primary key should be `NOT NULL`
Follow up to #18228. In MySQL and PostgreSQL, primary key is to be `NOT NULL` implicitly. But in SQLite it must be specified `NOT NULL` explicitly.
Diffstat (limited to 'activerecord/test/cases/primary_keys_test.rb')
-rw-r--r--activerecord/test/cases/primary_keys_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/primary_keys_test.rb b/activerecord/test/cases/primary_keys_test.rb
index 32bccce2ed..52eac4a124 100644
--- a/activerecord/test/cases/primary_keys_test.rb
+++ b/activerecord/test/cases/primary_keys_test.rb
@@ -229,7 +229,7 @@ class PrimaryKeyAnyTypeTest < ActiveRecord::TestCase
assert_equal "code", Barcode.primary_key
column = Barcode.column_for_attribute(Barcode.primary_key)
- assert_not column.null unless current_adapter?(:SQLite3Adapter)
+ assert_not column.null
assert_equal :string, column.type
assert_equal 42, column.limit
end