# Rake and NOT using schema.rb for clone\_structure\_to\_test

**URL:** <https://www.ruby-forum.com/t/rake-and-not-using-schema-rb-for-clone-structure-to-test/98918>\
**Category:** Rails\
**Created:** [January 30, 2006, 5:58pm UTC](https://www.ruby-forum.com/t/rake-and-not-using-schema-rb-for-clone-structure-to-test/98918 "2006-01-30T17:58:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joergd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@joergd](https://www.ruby-forum.com/u/joergd)\
**Post date:** [January 30, 2006, 5:58pm UTC](https://www.ruby-forum.com/t/rake-and-not-using-schema-rb-for-clone-structure-to-test/98918/1 "2006-01-30T17:58:35Z")

</div>

Is there a way to specify not not use schema.rb but instead using a  
native sql file to clone structure to the test db? Schema.rb doesn’t  
really work that well for mediumblobs … Thanks.

---

<div class="post-metadata">

**Author:** ![joergd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@joergd](https://www.ruby-forum.com/u/joergd)\
**Post date:** [January 30, 2006, 6:07pm UTC](https://www.ruby-forum.com/t/rake-and-not-using-schema-rb-for-clone-structure-to-test/98918/2 "2006-01-30T18:07:49Z")

</div>

Sorry - this is when I run rake test\_units for example. I want it to use  
a sql dump as opposed to a schema dump.

Joerg D. wrote:

> Is there a way to specify not not use schema.rb but instead using a  
> native sql file to clone structure to the test db? Schema.rb doesn’t  
> really work that well for mediumblobs … Thanks.

---

<div class="post-metadata">

**Author:** ![joergd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@joergd](https://www.ruby-forum.com/u/joergd)\
**Post date:** [January 30, 2006, 6:14pm UTC](https://www.ruby-forum.com/t/rake-and-not-using-schema-rb-for-clone-structure-to-test/98918/3 "2006-01-30T18:14:44Z")

</div>

I found it - sorry for this extra cruft to the forums …

In the environment.rb file, change

config.active\_record.schema\_format = :ruby

to

config.active\_record.schema\_format = :sql

Joerg D. wrote:

> Sorry - this is when I run rake test\_units for example. I want it to use  
> a sql dump as opposed to a schema dump.
> 
> Joerg D. wrote:
> 
> > Is there a way to specify not not use schema.rb but instead using a  
> > native sql file to clone structure to the test db? Schema.rb doesn’t  
> > really work that well for mediumblobs … Thanks.
