The core-upgrade command needs to drop the target database (if it exists), and recreate it from scratch. Or it needs to drop all tables right at the start. I forgot to to put this feature in so far. If we don't do this, we leave behind tables which the upgrade path tries to recreate and errors ensue.

I'm thinking this DROP DATABASE should happen whenever a create-db has been specified. This way, we don't add new options.

If we don't want this feature in sql sync, I can do it in upgrade command.

I'll write the code - just looking for some input from greg and others.

Comments

greg.1.anderson’s picture

I think this is a very good idea. If the database does not exist, you'll just get a warning that can be ignored. I have similar bash scripts that work the same way.

moshe weitzman’s picture

Title: Sql sync - Optionally drop target database and recreate » Sql sync - drop target database and recreate
Status: Active » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.