# Migrations with 2.1 and engines trunk

**URL:** <https://www.ruby-forum.com/t/migrations-with-2-1-and-engines-trunk/139732>\
**Category:** Engines\
**Created:** [June 6, 2008, 1:41pm UTC](https://www.ruby-forum.com/t/migrations-with-2-1-and-engines-trunk/139732 "2008-06-06T13:41:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tekin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tekin](https://www.ruby-forum.com/u/tekin)\
**Post date:** [June 6, 2008, 1:41pm UTC](https://www.ruby-forum.com/t/migrations-with-2-1-and-engines-trunk/139732/1 "2008-06-06T13:41:31Z")

</div>

Hi,

Are migrations currently broken because of the changes to Rails in 2.1?

I can migrate a plugin first time, but when I add a new migration to the  
plugin and try and migrate up, rather than migrating from the current  
version, Rails tries to run all the migrations from the top.

Is this because engines uses Rails’ migration engine and thus isn’t  
currently compatible with the new UTC timestamp format? Is there a way  
around this?

Thanks,

Tekin

---

<div class="post-metadata">

**Author:** ![tekin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tekin](https://www.ruby-forum.com/u/tekin)\
**Post date:** [June 6, 2008, 3:47pm UTC](https://www.ruby-forum.com/t/migrations-with-2-1-and-engines-trunk/139732/2 "2008-06-06T15:47:37Z")

</div>

I _think_ this should work. I’ll try writing some tests to verify it -  
stay tuned to the lighthouse ticket.

Cheers,

James

---

<div class="post-metadata">

**Author:** ![tekin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tekin](https://www.ruby-forum.com/u/tekin)\
**Post date:** [June 6, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/migrations-with-2-1-and-engines-trunk/139732/3 "2008-06-06T17:32:53Z")

</div>

I added a test, but still couldn’t replicate this. Can you try?

[http://engines.lighthouseapp.com/projects/10178/tickets/17-migrations-do-not-work-beyond-the-initial-migration#ticket-17-1](http://engines.lighthouseapp.com/projects/10178/tickets/17-migrations-do-not-work-beyond-the-initial-migration#ticket-17-1)

Thanks!

James

---

<div class="post-metadata">

**Author:** ![tekin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tekin](https://www.ruby-forum.com/u/tekin)\
**Post date:** [August 22, 2008, 11:07pm UTC](https://www.ruby-forum.com/t/migrations-with-2-1-and-engines-trunk/139732/4 "2008-08-22T23:07:43Z")

</div>

James is there any movement on this? I recently migrated Substruct to  
Rails 2.1 and I’m experiencing the same issue.

Tried Sven’s fork over on github which didn’t work either. Seems both  
of them want to run plugins from my engine from 1 onward.

Is there a definite fix by now?

* * *

## seth - subimage llc

## [http://sublog.subimage.com](http://sublog.subimage.com)

## Cashboard - Estimates, invoices, and time tracking software - for free! [http://www.getcashboard.com](http://www.getcashboard.com)

Substruct - Open source RoR e-commerce software.  
[http://code.google.com/p/substruct/](http://code.google.com/p/substruct/)

---

<div class="post-metadata">

**Author:** ![tekin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tekin](https://www.ruby-forum.com/u/tekin)\
**Post date:** [August 23, 2008, 7:20am UTC](https://www.ruby-forum.com/t/migrations-with-2-1-and-engines-trunk/139732/5 "2008-08-23T07:20:23Z")

</div>

seth b. wrote:

> James is there any movement on this? I recently migrated Substruct to  
> Rails 2.1 and I’m experiencing the same issue.
> 
> Tried Sven’s fork over on github which didn’t work either. Seems both  
> of them want to run plugins from my engine from 1 onward.
> 
> Is there a definite fix by now?

FYI: I resolved the issue with Samuel’s patch available here:

[http://engines.lighthouseapp.com/attachments/32727/engines.diff](http://engines.lighthouseapp.com/attachments/32727/engines.diff)

---

<div class="post-metadata">

**Author:** ![tekin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@tekin](https://www.ruby-forum.com/u/tekin)\
**Post date:** [June 9, 2008, 1:18pm UTC](https://www.ruby-forum.com/t/migrations-with-2-1-and-engines-trunk/139732/6 "2008-06-09T13:18:26Z")

</div>

Test runs fine for me too. I try do a bit more digging as the same  
plugins were migrating fine on a 1.2 rails app.
