diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-12-26 16:00:40 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 16:00:40 +0900 |
commit | 9507b4f02d332cccf76ca803b967dab69ab6bfdd (patch) | |
tree | eac5a7a89279bb9bd888051f91bd37ef33618dc8 /activerecord/lib | |
parent | 87d6fb4ece170d58ad8e0a596e9fbc96a868d03b (diff) | |
download | rails-9507b4f02d332cccf76ca803b967dab69ab6bfdd.tar.gz rails-9507b4f02d332cccf76ca803b967dab69ab6bfdd.tar.bz2 rails-9507b4f02d332cccf76ca803b967dab69ab6bfdd.zip |
Make `sql_type` of primary key in SQLite to comparable with an integer (#28008)
Originally I tried to add `assert_equal pk.sql_type, ref.sql_type`. But
the assert failed even though the same type due to `sql_type` of primary
key in SQLite is upper case. Prefer lower case like other types.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index a8c3318905..5a4540f6ad 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -60,7 +60,7 @@ module ActiveRecord include SQLite3::SchemaStatements NATIVE_DATABASE_TYPES = { - primary_key: "INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL", + primary_key: "integer PRIMARY KEY AUTOINCREMENT NOT NULL", string: { name: "varchar" }, text: { name: "text" }, integer: { name: "integer" }, |