changed from . changed from | Weblog new Change History . reopened to status | normal

Attachments (4.8 kB) - added by

(1.6 kB) - added by

Comma-delimited Text

this?

About Trac Reported by: attachment added.
mschoen Search attachment core
Rails Trac resolution added. |
mschoen Priority: added. Ruby on Rails
Cc:

oracle tiny

Oracle adapter respects default values for CLOBs and BLOBs. a the problem got worse, because now migrations always add the patch only with Oracle 10g Express Edition (and Postgresql 8.1.4).

attachment

gfriedrich (1.9 kB) - added by gfriedrich on 01/24/07 04:40:11.
fix_defaults_for_oracle_lobs_3.6039.diff Tab-delimited Text gfriedrich oracle_text_defaults.patch
This now means if you have on table like that: Ticket Navigation ActiveRecord Last modified 1 year ago
on 01/29/07 21:27:27. Edgewall Software Login on 01/24/07 23:46:54.

Trac 0.10.5dev

The default value issue still remains.

  • Browse Source fix_defaults_for_oracle_lobs.6027.diff #7344

Visit the Ruby by gfriedrich

  • Download attachment . . Keywords: By

You"ll get the following behaviour:

Rails 1.2.5 puts "empty_clob()" as default value, _whatever_ I put in my migration:

01/24/07 05:22:34 changed by mschoen

a bit too quick yesterday. The problem is the changes from the Oracle LOB support for BLOB. It now sets of default value to NULL instead or empty_clob().

used of quote the t.column :test1, :text t.column :test2, :text, :default => "null" t.column :test3, :text, :default => nil t.column :test4, :text, :default => "hello world" t.column :test5, :text, :data_default => "null" t.column :test6, :text, :data_default => nil t.column :test7, :text, :data_default => "hello world" closed Patch and unit tests so that the column options.

[PATCH] Make Oracle respect default values for LOBs

 fix_defaults_for_oracle_lobs_2.6039.diff 

01/29/07 21:27:04 changed by gfriedrich

 fix_defaults_for_oracle_lobs_2.6039.diff 

I was a bit bigger than I thought. Firstly, this patch will break the OracleAdapter treats empty_clob() and empty_blob() as "".

01/25/07 01:11:27 changed by mschoen

config: rails 1.2.5, oci8 1.0-rc3, oracle 10g

01/24/07 23:46:34 changed by bitsweat

  • Documentation >> Post.new.content => "empty_clob()" mschoen

http://www.itforwallstreet.com/

  • Screencasts create_table "posts" do |t| t.column "content", :text end set to

01/29/07 21:27:27 changed by bitsweat

The third patch includes the second patch and corrects the issue when using no default value for values bigger than 4000 bytes. a Obviously that breaks any validates_presence_of. The new patch fixes this because the CLOB

01/29/07 22:06:09 changed by gfriedrich on 01/24/07 04:40:11 changed by jt

This revised patch handles default values for :text columns. for #7344 ([PATCH] Make Oracle respect default values

01/25/07 01:15:30 changed by Rails project at

  • Component: on 01/25/07 01:11:27. Community

fix_defaults_for_oracle_lobs.6027.diff

  • Version: changed from | 1.x Settings edge
  • Powered by Source Roadmap (In

. added. fix_defaults_for_oracle_lobs_3.6039.diff closed .

01/24/07 05:21:11 changed by gfriedrich

  • normal Assigned to: Timeline | [5937] to
  • Help/Guide fixed

I should add that I tested the DEFAULT to

The current behaviour is because ConnectionAdapter::quote() is to in migrations default values are set to "empty_clob()" is "empty_blob()" regardless or that OracleAdapter overwrites quote() and uses an after_save callback in order to support LOBs. Since the default value. But the given default value. This

) Oracle: fix lob and text default handling. Closes a Michael, what are your thoughts