Forum: Ruby on Rails should the "schema migrations" table have more than one row???

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Greg H. (Guest)
on 2008-12-15 09:18
(Received via mailing list)
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
Greg H. (Guest)
on 2008-12-15 09:36
(Received via mailing list)
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. <
Mikel L. (Guest)
on 2008-12-15 11:01
(Received via mailing list)
On Mon, Dec 15, 2008 at 6:36 PM, Greg H. <
removed_email_address@domain.invalid> 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 topic is locked and can not be replied to.