Rum
Rum copied to clipboard
DB: check if a db was actually created before issuing an OK message
Rum says a db/db user where created based on the output of the shell command, while the db objects themselves were not created at all. This is confusing. We should actually make sure they were created and bork otherwise.
Probably a good idea to check the db after importing caching tables (if possible) since they usually bork the import.
Your remark made me realize I actually need 2 checks:
- If the MySQL server exists and we can connect/access it.
- If the DB dump was succesfully stored.
Creation of the DB and a user is assured if the first can be asserted since the commands completely drop and recreate the user/db at this time.
On the code site: these are now "dirty" drush_shell_exec() commands that run mysql as a separate process. So no real way to verify if the SQL actually did fire correctly. Drush itself doesn't come with DB drivers: it relies on those from Drupal. Yet Rum might also be able to create a DB without relying on a Drupal codebase. That's a blocker right now, unless we accept that downloading a codebase is compulsory anyway (origin: vanilla, repository).
This would mean I have to rework the fresh skeleton origin option I implemented.