# Is there a way to override SQL generated during rake:test:clone\_structure?

**URL:** <https://www.ruby-forum.com/t/is-there-a-way-to-override-sql-generated-during-rakeclone-structure/174751>\
**Category:** Rails\
**Created:** [September 1, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-override-sql-generated-during-rakeclone-structure/174751 "2009-09-01T17:25:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomuhs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecb155/32.png) [@tomuhs](https://www.ruby-forum.com/u/tomuhs)\
**Post date:** [September 1, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-override-sql-generated-during-rakeclone-structure/174751/1 "2009-09-01T17:25:54Z")

</div>

I have two tables with ID columns that must be unsigned integers. When  
I try to clone the database for testing, Rails misjudges these columns  
as signed integers, and the test cannot proceed because this table  
type does not accept a signed integer for these columns (Sphinx SE  
document and body tables).

Is there a way to hook into the database cloning process and override  
the generated SQL with the correct column type?

Thomas
