Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MySQL can't index a TEXT column

  • Loading branch information...
commit 1b8cd5fb53d0414b2dbbcaf0bc4f8851b8550e34 1 parent 21c4b09
@spastorino spastorino authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/session_store.rb
View
4 activerecord/lib/active_record/session_store.rb
@@ -83,7 +83,7 @@ def create_table!
connection.execute <<-end_sql
CREATE TABLE #{table_name} (
id INTEGER PRIMARY KEY,
- #{connection.quote_column_name(session_id_column)} TEXT UNIQUE,
+ #{connection.quote_column_name(session_id_column)} VARCHAR(255) UNIQUE,
#{connection.quote_column_name(data_column_name)} TEXT(255)
)
end_sql
@@ -220,7 +220,7 @@ def create_table!
connection.execute <<-end_sql
CREATE TABLE #{table_name} (
id INTEGER PRIMARY KEY,
- #{connection.quote_column_name(session_id_column)} TEXT UNIQUE,
+ #{connection.quote_column_name(session_id_column)} VARCHAR(255) UNIQUE,
#{connection.quote_column_name(data_column)} TEXT
)
end_sql
Please sign in to comment.
Something went wrong with that request. Please try again.