# Schema\_migrations and schema\_info

**URL:** <https://www.ruby-forum.com/t/schema-migrations-and-schema-info/157199>\
**Category:** Deployment\
**Created:** [January 8, 2009, 11:35am UTC](https://www.ruby-forum.com/t/schema-migrations-and-schema-info/157199 "2009-01-08T11:35:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonaylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@antonaylward](https://www.ruby-forum.com/u/antonaylward)\
**Post date:** [January 8, 2009, 11:35am UTC](https://www.ruby-forum.com/t/schema-migrations-and-schema-info/157199/1 "2009-01-08T11:35:09Z")

</div>

i’m using Aptana Studio for developing my rails application, and it  
generates migrations files with names like  
20090107231713\_name\_of\_migration. Sequence number of migration is  
generated from current timestamp. In my development database i have  
table SCHEMA\_MIGRATIONS with varchar(255) field ‘version’. In this table  
i have list of all applied migrations and everything goes fine. But in  
my production database on webserver i don’t have SCHEMA\_MIGRATIONS  
table, i have SCHEMA\_INFO instead. This table has field ‘version’ too,  
but it’s integer. Also this table doesn’t seem to contain all the  
applied migrations, only the last one. rake db:migrate tries to store in  
this table value like 20090107231713 and failes, because it’s too big fo  
integer.

The main question is: is SCHEMA\_INFO designed to contain only number of  
last applied migration o have i some nasty bug? Will it be allright if i  
convert SCHEMA\_INFO.version to varchar(255)?

Also maybe someone knows, how to override Aptana’s migration naming  
rules to make them sequential like 00001\_…, 00002\_…?

thanks and sorry for my english =\

---

<div class="post-metadata">

**Author:** ![antonaylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@antonaylward](https://www.ruby-forum.com/u/antonaylward)\
**Post date:** [August 18, 2009, 10:03am UTC](https://www.ruby-forum.com/t/schema-migrations-and-schema-info/157199/2 "2009-08-18T10:03:05Z")

</div>

Anton Anykeyev wrote:

> i’m using Aptana Studio for developing my rails application, and it  
> generates migrations files with names like  
> 20090107231713\_name\_of\_migration. Sequence number of migration is  
> generated from current timestamp. In my development database i have  
> table SCHEMA\_MIGRATIONS with varchar(255) field ‘version’. In this table  
> i have list of all applied migrations and everything goes fine. But in  
> my production database on webserver i don’t have SCHEMA\_MIGRATIONS  
> table, i have SCHEMA\_INFO instead. This table has field ‘version’ too,  
> but it’s integer. Also this table doesn’t seem to contain all the  
> applied migrations, only the last one. rake db:migrate tries to store in  
> this table value like 20090107231713 and failes, because it’s too big fo  
> integer.
> 
> The main question is: is SCHEMA\_INFO designed to contain only number of  
> last applied migration o have i some nasty bug? Will it be allright if i  
> convert SCHEMA\_INFO.version to varchar(255)?
> 
> Also maybe someone knows, how to override Aptana’s migration naming  
> rules to make them sequential like 00001\_…, 00002\_…?
> 
> thanks and sorry for my english =\

Seems like the migration is failing to update the database; SCHEMA\_INFO  
should automatically be replaced with SCHEMA\_MIGRATIONS.

Does your webserver run the correct version of rails?

Looking at the migration docs  
([ActiveRecord::Migration](http://api.rubyonrails.org/classes/ActiveRecord/Migration.html)), it  
shows that you can disable the datastamp migrations with:

config.active\_record.timestamped\_migrations = false

Hope that helps,  
James.
