# Migrations - determine all available migration (files)

**URL:** <https://www.ruby-forum.com/t/migrations-determine-all-available-migration-files/153195>\
**Category:** Rails\
**Created:** [November 13, 2008, 8:08am UTC](https://www.ruby-forum.com/t/migrations-determine-all-available-migration-files/153195 "2008-11-13T08:08:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clemens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/df788c/32.png) [@clemens](https://www.ruby-forum.com/u/clemens)\
**Post date:** [November 13, 2008, 8:08am UTC](https://www.ruby-forum.com/t/migrations-determine-all-available-migration-files/153195/1 "2008-11-13T08:08:27Z")

</div>

Is there a way to determine whether all migrations have been run?

ActiveRecord::Migrator.get\_all\_versions only returns the migrations  
run (but not the ones not yet run).

Thx Clemens

---

<div class="post-metadata">

**Author:** ![clemens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/df788c/32.png) [@clemens](https://www.ruby-forum.com/u/clemens)\
**Post date:** [November 13, 2008, 11:38am UTC](https://www.ruby-forum.com/t/migrations-determine-all-available-migration-files/153195/2 "2008-11-13T11:38:11Z")

</div>

On Nov 13, 7:07 am, Clemens [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a way to determine whether all migrations have been run?
> 
> ActiveRecord::Migrator.get\_all\_versions only returns the migrations  
> run (but not the ones not yet run).

just scanning throught the source,  
ActiveRecord::Migrator.new.pending\_migrations looks promising.

Fred
