19 May 19:26
Re: ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models
From: Shngn <hartforda@...>
Subject: Re: ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-19 17:26:51 GMT
Subject: Re: ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-19 17:26:51 GMT
On May 18, 7:05 pm, Danimal <fightonfightw...@...> wrote: > 1) Migrations: > Another thought would be to offer some sort of warning... i.e. running > a migration that removes columns would give a warning... which could > be overridden by a flag or even some environment setting. I like the warning approach that can be disabled. With that in place, I don't mind automatically syncing tables rather than the manual #update_columns call. I'll try to get these changes implemented soon. > You might even do some plugin research and find some > others that do some custom Find calls and use that as a starting > point. Thats a good idea. I'll look around for that. Maybe someone reading this thread can suggest something? > 4) File-based Archival > > I could even imagine adding some hook whereby the archival takes > records from the DB and dumps them to some flat-file, or XML, or CSV > or some such format. This may not be necessary... but I can imagine > some possible use. I.e. where you "archive" (to the archive tables) > posts older than 3 months, but you "flat-file-archive" posts older > than 1 year. Just an idea, though... maybe it's not that useful. It would also be possible to write a rake task to dump the archival tables with mysqldump or the equivalent. > The biggest win of your approach over acts_as_paranoid is the speedup > in normal queries because the "deleted" data simply isn't in those > tables anymore. And most normal usage won't need the deleted data > anyway. Oh yeah, I'll have to add this advantage to my readme! Take care, Andy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@... To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RSS Feed