You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think it should ever drop the database - it's too dangerous. The DB may have unrelated table data outside of the Rails model scope. The pros and cons of such a setup may be discussed elsewhere but for historic reasons I am running such a database with one project. You can instruct mysqldump to add DROP TABLE IF EXISTS during export instead. It should be much more safe. Also, it may be better to wrap the export into one transaction, so on import it is either imported completely or aborted completely.
The import cmd (at least for mysql) is
mysql #{credentials} -D #{database} < #{file}
which will result in the file being appended to the current database.
Is there an option to drop the database before import? If not, can there be?
The text was updated successfully, but these errors were encountered: