-
-
Notifications
You must be signed in to change notification settings - Fork 28
Description
First I want to thank you for this wonderful library. This is exactly what I was looking for: no query builders, heavy set of dependencies, and especially I want to thank you that symfony/console integration is put in a separate package, unlike the doctrine/migrations and phinx. My use-case is a separate library for domain objects, which I do re-use in my high-level app package, so no dependencies on CLI tools is great. π
Here is my question: I want to implement fully automatic database migration, whether it is first deployment or just an update. I use it like so:
$migrator = new Migration(
$this->psr7Uri,
self::MIGRATIONS_DIR
);
foreach (self::SUPPORTED_SCHEMES as $scheme => $className) {
$migrator->registerDatabase($scheme, $className);
}
$migrator->update(); // might throw DatabaseNotVersionedExceptionFor now I have to catch the DatabaseNotVersionedException and call $migrator->createVersion() when appropriate. However, I would like to not depend on exception catching and just be able to check if DB is already versioned via some convenience method, like $migrator->isDatabaseVersioned(). Is it not possible for now, or do I miss something?