Skip to content

Commit e77738b

Browse files
committed
TECH-4995: extend sqlite special case to include Rails 6+
1 parent 81511c1 commit e77738b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/declare_schema/model/index_definition.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def for_model(model, old_table_name = nil)
6262

6363
private
6464

65-
# This is the old approach which is still needed for SQLite, at least through Rails 5
65+
# This is the old approach which is still needed for SQLite
6666
def sqlite_compound_primary_key(model, table)
67-
!ActiveRecord::Base.connection.class.name.match?(/SQLite3Adapter/) || Rails::VERSION::MAJOR > 5 and return nil
67+
ActiveRecord::Base.connection.class.name.match?(/SQLite3Adapter/) or return nil
6868

6969
connection = model.connection.dup
7070

0 commit comments

Comments
 (0)