# Issues with schema.rb

**URL:** <https://www.ruby-forum.com/t/issues-with-schema-rb/154934>\
**Category:** Rails\
**Created:** [December 5, 2008, 9:59am UTC](https://www.ruby-forum.com/t/issues-with-schema-rb/154934 "2008-12-05T09:59:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![priya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eada6e/32.png) [@priya](https://www.ruby-forum.com/u/priya)\
**Post date:** [December 5, 2008, 9:59am UTC](https://www.ruby-forum.com/t/issues-with-schema-rb/154934/1 "2008-12-05T09:59:41Z")

</div>

Hi all,

I have some doubts in running test cases for a ROR application.  
If I create the test DB structure manually and run the individual  
tests , they are working fine.  
But when I use rails\_rake and run all the tests together , the DB is  
is getting dropped all together and the tables are generated from  
schema.rb.  
One problem with this is that the db:migrate is not setting the  
primary key and the autoincrement parameters for the table.

I tried to set the primary key and autoincrement parameters in  
schema.rb. But it fails .

## create\_table “ebooks”, :id =\> false, :force =\> true , :primary\_key=”ebook\_id” , :options =\> “auto\_increment = 10000” do |t|

I need to understand how to set the various parameters for a table  
using schema.rb. Even though the underlying table in the MYSQL DB  
contains these parameters (primary\_key and auto increment) , the  
generated schema.rb does not contain any parameters to specify the  
same.

Can somebody help me . Am I missing something here.

Thanks,  
Priya
