winton / acts_as_archive

Don't delete your records, move them to a different table
MIT License
372 stars 87 forks source link

no archive table is being created #49

Open ragrawal opened 12 years ago

ragrawal commented 12 years ago

Hi,

I have created the config file but after running migration, no archive table is created. I am using Rails 3.2 and ruby 1.9 and latest version of acts_as_archive. Based on some previous issues, I also added acts_as_archive to my original table but that also didn't help. Am I missing any critical step ?

Ritesh

ghost commented 11 years ago

provide more information please if you can

timscott commented 11 years ago

I am also having this problem. In my Gemfile:

gem 'acts_as_archive'

In config/acts_as_archive.yml:

Consumer:
  - class: Consumer::Cancelled
    table: cancelled_consumers

When I run rake db:migrate there is no output and no table is created.

timscott commented 11 years ago

Upon further testing I can see that with the gem present, migrations are messed up. Specifically when I do something like this, for example:

rails g migration RemoveSoftDeleteFieldsFromConsumer cancelled cancelled_at

It generates a migration with this name:

_remove_soft_delete_fields_from_consumer.rb

Notice that the ID prefix is missing. So when running rake db:migrate the migration does not run.

Please, help. I would really love to use this gem instead of write it myself by hand. I spent some time looking through the code, and I'm not able to locate or follow the migration voodoo that the gem is doing, or else I would make a pull request myself.

eef commented 10 years ago

I am suffering from the same issue. Did you ever figure out why the migrations were not being created?