Should the "schema migrations" table have more than one row?

Hi,

Should the “schema migrations” table have more than one row??? If yes
how
do you know what the current version is supposed to be?

I noted mine looks like the following. Is this a problem?

mysql> select * from schema_migrations;
±---------------+
| version |
±---------------+
| 1 |
| 10 |
| 11 |
| 2 |
| 20080817031054 |
| 20080817031553 |
| 20080817035257 |
| 20080817040006 |
| 20080825042400 |
| 20080825042409 |
| 20080827041506 |
| 20080827233612 |
| 20080827234249 |
| 20080828013624 |
| 20080828023952 |
| 20080828202412 |
| 20080829003635 |
| 20080829053140 |
| 20080829234813 |
| 20080831231657 |
| 20080902000944 |
| 20080909023613 |
| 20080909031013 |
| 20080929084759 |
| 20080930224956 |
| 20081101104047 |
| 20081101111721 |
| 20081102025337 |
| 20081105225128 |
| 20081110083640 |
| 20081115064924 |
| 20081128103504 |
| 20081128104846 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
±---------------+
40 rows in set (0.01 sec)

thanks

I’m guessing that it needs to keep the whole list of migration versions
given there’s been a change in the way migration version naming are
created. So in this case Rails would check to see for each migration,
whether there is already an entry in the “schema_migrations” table, and
if
there is it would assume the migration has been applied.

Is this correct?

On Mon, Dec 15, 2008 at 5:18 PM, Greg H. <

On Mon, Dec 15, 2008 at 6:36 PM, Greg H. <
[email protected]> wrote:

I’m guessing that it needs to keep the whole list of migration versions
given there’s been a change in the way migration version naming are
created. So in this case Rails would check to see for each migration,
whether there is already an entry in the “schema_migrations” table, and if
there is it would assume the migration has been applied.

Is this correct?

Yes, you are correct.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs