# Quantic phenomena in migrations

**URL:** <https://www.ruby-forum.com/t/quantic-phenomena-in-migrations/98673>\
**Category:** Rails\
**Created:** [July 17, 2006, 1:16pm UTC](https://www.ruby-forum.com/t/quantic-phenomena-in-migrations/98673 "2006-07-17T13:16:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [July 17, 2006, 1:16pm UTC](https://www.ruby-forum.com/t/quantic-phenomena-in-migrations/98673/1 "2006-07-17T13:16:44Z")

</div>

I have an application with 15 migrations under version control. In a  
Mac and and in a Windows, a rake migrate from scratch runs them all  
just fine. But in a different Windows machine rake migrate stops  
after migration 3 for no apparent reason. --trace seems normal. No  
error is reported. Both Windows are XP SP2. They all have the same  
svn revision and Rails-related software, database is SQLite.

I even rebooted the machine to no avail. Does this ring any bell?

– fxn

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [July 17, 2006, 3:36pm UTC](https://www.ruby-forum.com/t/quantic-phenomena-in-migrations/98673/2 "2006-07-17T15:36:48Z")

</div>

Xavier N. \<fxn@…\> writes:

> I have an application with 15 migrations under version control. In a  
> Mac and and in a Windows, a rake migrate from scratch runs them all  
> just fine. But in a different Windows machine rake migrate stops  
> after migration 3 for no apparent reason. --trace seems normal. No  
> error is reported. Both Windows are XP SP2. They all have the same  
> svn revision and Rails-related software, database is SQLite.
> 
> I even rebooted the machine to no avail. Does this ring any bell?

No bells, but I would re-checkout on Windows machine 2 into a clean  
directory,  
clear your database and try again. Perhaps something is screwed up with  
the  
state of those version control files.

-damon

> **[Damon Clinkscales](https://damonc.onuniverse.com/)**
>
> Damon Clinkscales

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [July 17, 2006, 4:43pm UTC](https://www.ruby-forum.com/t/quantic-phenomena-in-migrations/98673/3 "2006-07-17T16:43:12Z")

</div>

On Jul 17, 2006, at 15:34, Damon C. wrote:

> No bells, but I would re-checkout on Windows machine 2 into a clean  
> directory,  
> clear your database and try again. Perhaps something is screwed up  
> with the  
> state of those version control files.

Yeah, I tried without luck. I even checked the disk just in case  
because this morning an Ubuntu in a different partition run a dosfsck  
at startup. Nothing, lost by now.

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [July 17, 2006, 4:49pm UTC](https://www.ruby-forum.com/t/quantic-phenomena-in-migrations/98673/4 "2006-07-17T16:49:38Z")

</div>

On Jul 17, 2006, at 16:41, Xavier N. wrote:

> Yeah, I tried without luck. I even checked the disk just in case  
> because this morning an Ubuntu in a different partition run a  
> dosfsck at startup. Nothing, lost by now.

Ah, let me add something I discovered. The problem seems to be  
related to migration 4, the one that does not get to be run. If I  
remove that file everything runs, until the 15th, the last one. I  
can’t for the life of me see anything wrong in that migration, which  
otherwise runs smoothly in two machines. I copy it below just for the  
record.

– fxn

class LaCaixaCrawlerStatus \< ActiveRecord::Migration  
def self.up  
delete\_all  
CrawlerStatus.create(:entity =\> Entity::LA\_CAIXA)  
end

def self.down  
delete\_all  
end

def self.delete\_all  
CrawlerStatus.delete\_all([‘entity = ?’, Entity::LA\_CAIXA])  
end  
end

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [July 20, 2006, 3:34pm UTC](https://www.ruby-forum.com/t/quantic-phenomena-in-migrations/98673/5 "2006-07-20T15:34:58Z")

</div>

On Jul 17, 2006, at 10:47 AM, Xavier N. wrote:

> which otherwise runs smoothly in two machines. I copy it below just  
> def self.down  
> delete\_all  
> end
> 
> def self.delete\_all  
> CrawlerStatus.delete\_all([‘entity = ?’, Entity::LA\_CAIXA])  
> end  
> end

How has your CrawlerStatus model changed between when migrations 4  
and 15 were created? This is a “known” problem when using Model  
classes in migrations. (particularly when your model deals with more  
columns/attributes than the table has at that point in time)

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [July 17, 2006, 10:13pm UTC](https://www.ruby-forum.com/t/quantic-phenomena-in-migrations/98673/6 "2006-07-17T22:13:39Z")

</div>

Just for the archives.

After a whole day lost doing all kind of trials, changing SQLite with  
MySQL, removing rails from vendor, doing clean checkouts, and what  
not, I decided to reinstall Windows, this is a quite new laptop so  
that was an option. Now the migrations run normally again. The only  
strange thing I did this morning was to boot a brand new Kubuntu that  
automatically runs dosfsck (that does not mean it was its fault, but  
is the only conjecture I have).

Unfortunately I don’t know what happened, but at least I’ll be able  
to continue with this project tomorrow.

– fxn
