Wondering why sqlmigrate needs a connection to an existing database.
I understand that for certain commands, it needs the database to generate the migration. But for most (basic) commands, no connection is really needed.
For example, I created a
test project and generated migration files. Without ever running the `migrate` command, I was able to use `sqlmigrate` perfectly well on all migrations, save the last, which drops a `unique_together`.
I'm sure there are other commands which actually need a database connection (though I haven't found them yet). Seems to me sqlmigrate could be rewritten along the lines of:
- Try to generate sql from migration file
- If it hits a command it needs the database, attempt to connect
Or else:
- If no connection, check if migration file needs connection to database
Is there something I'm unaware of?
This email may contain confidential material; unintended recipients must not disseminate, use, or act upon any information in it. If you received this email in error, please contact the sender and permanently delete the email.