aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema/schema.rb
diff options
context:
space:
mode:
authorRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2009-03-22 23:50:05 +0200
committerRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2009-08-06 23:40:59 +0300
commit963570b51ce4d95b046a441dd1c413dc6fcec8b4 (patch)
treef3b8aab53e280d1e042f9ec00dbe1360c55742d9 /activerecord/test/schema/schema.rb
parent04fea8a07ba94d381b03fae4a657077a7b966229 (diff)
downloadrails-963570b51ce4d95b046a441dd1c413dc6fcec8b4.tar.gz
rails-963570b51ce4d95b046a441dd1c413dc6fcec8b4.tar.bz2
rails-963570b51ce4d95b046a441dd1c413dc6fcec8b4.zip
added additional objects necessary for OracleAdapter specific tests
if OracleAdapter is used then use VARCHAR2(4000) instead of CLOB datatype as CLOB data type has many limitations in Oracle SELECT WHERE clause which causes many unit test failures
Diffstat (limited to 'activerecord/test/schema/schema.rb')
-rw-r--r--activerecord/test/schema/schema.rb24
1 files changed, 21 insertions, 3 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 1e47cdbaf6..5752d6fa40 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -104,7 +104,13 @@ ActiveRecord::Schema.define do
create_table :comments, :force => true do |t|
t.integer :post_id, :null => false
- t.text :body, :null => false
+ # use VARCHAR2(4000) instead of CLOB datatype as CLOB data type has many limitations in
+ # Oracle SELECT WHERE clause which causes many unit test failures
+ if current_adapter?(:OracleAdapter)
+ t.string :body, :null => false, :limit => 4000
+ else
+ t.text :body, :null => false
+ end
t.string :type
end
@@ -350,7 +356,13 @@ ActiveRecord::Schema.define do
create_table :posts, :force => true do |t|
t.integer :author_id
t.string :title, :null => false
- t.text :body, :null => false
+ # use VARCHAR2(4000) instead of CLOB datatype as CLOB data type has many limitations in
+ # Oracle SELECT WHERE clause which causes many unit test failures
+ if current_adapter?(:OracleAdapter)
+ t.string :body, :null => false, :limit => 4000
+ else
+ t.text :body, :null => false
+ end
t.string :type
t.integer :comments_count, :default => 0
t.integer :taggings_count, :default => 0
@@ -423,7 +435,13 @@ ActiveRecord::Schema.define do
t.datetime :written_on
t.time :bonus_time
t.date :last_read
- t.text :content
+ # use VARCHAR2(4000) instead of CLOB datatype as CLOB data type has many limitations in
+ # Oracle SELECT WHERE clause which causes many unit test failures
+ if current_adapter?(:OracleAdapter)
+ t.string :content, :limit => 4000
+ else
+ t.text :content
+ end
t.boolean :approved, :default => true
t.integer :replies_count, :default => 0
t.integer :parent_id