Closed benkamphaus closed 9 months ago
The issue here is a little less trivial. Ensure-db was wired into the old logic, which expected that pret (now the Unify CLI) would have a full schema directory along with it in resources, so that if the schema was compatible, it could update it during the ensure-db
step. To enable this behavior, though, we need a snapshot of the schema directory at the time prepare was created. It probably makes the most sense to just copy the schema directory contents into the working directory when the prepare task executes.
Currently this looks like it's an unintended side effect of using the same machinery as prepare for cross-checking database vs schema versions. Instead, some schema metadata should be written to the import working directory (if it's not already there) and parsed by transact at import time to ensure schema compatibility.