fat_free_crm icon indicating copy to clipboard operation
fat_free_crm copied to clipboard

Installing fat free crm as an engine destroys your database.

Open timuckun opened this issue 12 years ago • 3 comments

Really guys?

Following the instructions here http://guides.fatfreecrm.com/Running-as-a-Rails-Engine.html and using the command rake ffcrm:setup completely destroys your database.

This is most definitely not proper behavior for a rails engine.

timuckun avatar Aug 01 '12 10:08 timuckun

You're right, it doesn't work for an engine... the 'rake ffcrm:setup' task does destroy the database. This task pre-dates the enginisation of ffcrm and should be refactored.

To be clear, the task does ask you if you wish to proceed, "Your database is about to be reset, so if you choose to proceed all the existing data will be lost. Continue [yes/no]: "

steveyken avatar Aug 02 '12 01:08 steveyken

Off the top of my head, "rake db:migrate ffcrm:setup:admin" should replace 'rake ffcrm:setup'. Rails 3.2 handles engine migrations much better now.

steveyken avatar Aug 02 '12 02:08 steveyken

To be clear, the task does ask you if you wish to proceed, "Your database is about to be reset, so if you choose to proceed all the existing data will be lost. Continue [yes/no]: "

This message would be more clear if it listed the database name in the message, something like "Your database (database_name_development) is about to be destroyed ..."

But of course there is no real reason to destroy the database at all. Simply adding :force=> true the migration would take care of recreating your tables without destroying the entire database.

timuckun avatar Aug 02 '12 03:08 timuckun

Patches welcome

CloCkWeRX avatar Aug 26 '24 10:08 CloCkWeRX