fat_free_crm
fat_free_crm copied to clipboard
Installing fat free crm as an engine destroys your database.
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.
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]: "
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.
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.
Patches welcome