acts_as_archive icon indicating copy to clipboard operation
acts_as_archive copied to clipboard

no archive table is being created

Open ragrawal opened this issue 12 years ago • 4 comments

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

ragrawal avatar Oct 16 '12 23:10 ragrawal

provide more information please if you can

ghost avatar Feb 24 '13 23:02 ghost

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 avatar May 21 '13 20:05 timscott

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.

timscott avatar May 21 '13 22:05 timscott

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

eef avatar Nov 13 '13 11:11 eef