Permalink
Browse files

Merge pull request #11833 from vipulnsward/remove_autoincrement

Remove sqlite specific`supports_autoincrement?` which defaults to true
  • Loading branch information...
2 parents a11ddbe + 1457589 commit c05f9558eebf88a137d606c27f3e0be232e35100 @rafaelfranca rafaelfranca committed Oct 14, 2013
@@ -183,11 +183,6 @@ def supports_count_distinct? #:nodoc:
true
end
- # Returns true
- def supports_autoincrement? #:nodoc:
- true
- end
-
def supports_index_sort_order?
true
end
@@ -597,11 +592,7 @@ def sqlite_version
end
def default_primary_key_type
- if supports_autoincrement?
- 'INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL'
- else
- 'INTEGER PRIMARY KEY NOT NULL'
- end
+ 'INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL'
end
def translate_exception(exception, message)
@@ -1,9 +1,6 @@
ActiveRecord::Schema.define do
- # For sqlite 3.1.0+, make a table with an autoincrement column
- if supports_autoincrement?
- create_table :table_with_autoincrement, :force => true do |t|
- t.column :name, :string
- end
+ create_table :table_with_autoincrement, :force => true do |t|
+ t.column :name, :string
end
execute "DROP TABLE fk_test_has_fk" rescue nil

0 comments on commit c05f955

Please sign in to comment.