jjn1056 / DBIx-Class-Migration

Use DBIC::DeploymentHandler and DBIC::Fixtures together for a sane database versioning workflow
33 stars 41 forks source link

dbic-migration prepare - warning message when Schema version from package declaration #113

Closed kivilahtio closed 5 years ago

kivilahtio commented 6 years ago

Hi!

To reproduce the warning:

Initially Having no database installed yet, running dbic-migration status prints

Schema is 1
Database is not currently installed

Given my MusicBase/Schema.pm has package declaration package MusicBase::Schema 1; instead of using our $VERSION = 1;

When running command dbic-migration prepare I get a warning operation not supported with version object at /usr/local/share/perl/5.26.1/DBIx/Class/Migration.pm line 274. But it looks like the files generated in the share-dir are the same when using package or $VERSION versioning scheme. When running dbic-migration prepare with the versioning scheme our $VERSION = 1; I get the expected warning There is no current database deployed, so I can't prepare upgrades or downgrades

What I was expecting: To not see a warning, but still receive correct functionality. OR The warning to be escalated to an exception and the program to stop doing anything useful looking.

KES777 commented 6 years ago

Please read this. If I wrong, please provide further comments.

KES777 commented 6 years ago

This is not belongs to your problem. but may you please comment this idea: #95?

mohawk2 commented 5 years ago

I've made a branch (handle-version-obj) with DBICM's half of the required fixes. However, until https://github.com/frioux/DBIx-Class-DeploymentHandler/pull/63 is merged and released, it can't be merged (with updated dependency requirement) and released.

mohawk2 commented 5 years ago

Now released as 0.065. DBICDH released as 0.002223.