Clint Hill wrote:
Yes - the create statement includes VARCHAR2(4000).

As Ola points out (which I was afraid of) the adapter will default to the biggest size allowed. Interestingly only the Oracle implementation in activerecord-jdbc-adapter does this. Most others choose 255 as the default.

Thanks for the insight.


This is because the max in Oracle is 4000, while the other databases have 255 as max.
On Dec 11, 2008, at 8:28 AM, Nick Sieger wrote:

I don't think activerecord-jdbc has anything to do with default sizes,
they should be baked into AR's migrations. Is the SQL sent to the
database actually specifying varchar2(4000)?

/Nick

On Thu, Dec 11, 2008 at 8:20 AM, Clint Hill <[email protected]> wrote:
I'm not sure if this is the best place for this question (so redirect if
not) but I was wondering about the String default from the
activerecord-jdbc-adapter.

When using Oracle the default for string seems odd.

create_table :accounts do |t|
      t.string :name
end

This will create a column VARCHAR2(4000). I can set the :limit to 255 but I
was curious - why doesn't it do this automatically?
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Ola Bini (http://olabini.com) JRuby Core Developer
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818)

"Yields falsehood when quined" yields falsehood when quined.



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to