Permalink
Browse files

Makes current adapter decide the syntax of PRIMARY KEY column definition

  • Loading branch information...
1 parent 7113f20 commit 24f303b677e4a8f0ecf8c335d95c63c3f7f1bdcc @spastorino spastorino committed Jul 22, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/session_store.rb
@@ -82,7 +82,7 @@ def unmarshal(data)
def create_table!
connection.execute <<-end_sql
CREATE TABLE #{table_name} (
- id INTEGER PRIMARY KEY,
+ id #{connection.type_to_sql(:primary_key)},
#{connection.quote_column_name(session_id_column)} VARCHAR(255) UNIQUE,
#{connection.quote_column_name(data_column_name)} VARCHAR(255)
)
@@ -219,7 +219,7 @@ def unmarshal(data)
def create_table!
connection.execute <<-end_sql
CREATE TABLE #{table_name} (
- id INTEGER PRIMARY KEY,
+ id #{connection.type_to_sql(:primary_key)},
#{connection.quote_column_name(session_id_column)} VARCHAR(255) UNIQUE,
#{connection.quote_column_name(data_column)} TEXT
)

0 comments on commit 24f303b

Please sign in to comment.