Closed Altreus closed 5 years ago
I can "fix" it with an extra line in __ddl_consume_with_prefix
, to skip __VERSION
DDL.
The bad thing is, this is not discovered from version_rs->result_source->source_name
, because this DeployMethod object isn't given that information.
The good thing is, this DeployMethod class is already hard-coding __VERSION
instead of trying to look the name up dynamically, so there's prior art to doing it improperly.
However, if the DeployMethod object can get to the version RS somehow, both of these lines should be fixed.
@Altreus Where are we with this? What would you like DH do? So long as it still passes its tests (ie back-compat), I'll be happy to accommodate.
I think this became an architectural discussion that would be best put on the list of things to consider in a new version. I managed to refactor my module to not require this change any more.
I don't think this would be backwardly compatible because people may already be using these methods as they are, and they're the public API.
With both of those in mind I'm just going to close it :)
prepare_install
runsprepare_deploy
and thenprepare_version_storage_install
, which implies the concept of deployment does not include the concept of version storage install.It follows that
deploy
should skip the__VERSION
DDL, or the__VERSION
DDL should not be in the same directory as the001
st deploy - and theninstall
itself should first discover the__VERSION
DDL and then run the first deployment.The current setup makes it impossible to have multiple schemata in the same database. I've created a HandlesVersionStorage implementation that stores the class name of the schema being installed as well as the version, but I can't use it, because every schema contains a
__VERSION
DDL and so I can't currently install the second one.