This project is archived and is in readonly mode.

#5239 ✓stale
Praveen Devarao

Hard-Coded ddl statement in SessionStore#create_table!

Reported by Praveen Devarao | July 29th, 2010 @ 01:33 PM

In the method SessionStore#create_table! the create table statement contains sql that specifies datatype for data column to be TEXT, which is not a supported datatype by all databases, for eg DB2. Hence will need to change the sql construction appropriately such that database specifics are added. A patch to correct the same is attached in the ticket.

Along with the above a new method unique_constraint is added to SchemaStatements to provide flexiblility to handle database specifics for UNIQUE constraint on a column. For Eg, DB2 doesnot allow null values in a unique column and requires that the column be specified not null explicitly. To handle this, one can override the method unique_constraint in the ibm_db adapter. So will be the case for any other database to handle respective specifics.

Test cases: Existing test cases test_create_table!, test_find_by_session_id, test_find_by_sess_id_compat from session_store/session_test.rb should suffice.

Comments and changes to this ticket

  • Praveen Devarao

    Praveen Devarao July 29th, 2010 @ 01:36 PM

    Forgot to specify. This is seen with Rails-3.0.0-rc.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:34 PM

    • State changed from “new” to “open”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:34 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket