Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: exit status for dbic-migration #99

Closed
KES777 opened this issue Jul 6, 2018 · 3 comments
Closed

Q: exit status for dbic-migration #99

KES777 opened this issue Jul 6, 2018 · 3 comments

Comments

@KES777
Copy link

KES777 commented Jul 6, 2018

I use dbic-migration in Makefile:

MIGRATION_CMD :=  $$(which dbic-migration)
dbprepare:
	${MIGRATION_CMD} --force --schema_class ${APP_NAMESPACE} --database ${DB_TYPE} -Ilib prepare

But when this is first migration the recipe for target failed:

Overwriting existing DDL-YML file - /home/kes/work/projects/tucha/monkeyman/share/migrations/_source/deploy/2/001-auto.yml at inline delegation in DBIx::Class::DeploymentHandler for deploy_method->prepare_deploy (attribute declared in /home/kes/work/projects/tucha/monkeyman/local/lib/perl5/DBIx/Class/DeploymentHandler/WithApplicatorDumple.pm at line 51) line 18.
Overwriting existing DDL file - /home/kes/work/projects/tucha/monkeyman/share/migrations/PostgreSQL/deploy/2/001-auto.sql at inline delegation in DBIx::Class::DeploymentHandler for deploy_method->prepare_deploy (attribute declared in /home/kes/work/projects/tucha/monkeyman/local/lib/perl5/DBIx/Class/DeploymentHandler/WithApplicatorDumple.pm at line 51) line 18.
Overwriting existing DDL-YML file - /home/kes/work/projects/tucha/monkeyman/share/migrations/_source/deploy/2/001-auto-__VERSION.yml at inline delegation in DBIx::Class::DeploymentHandler for deploy_method->prepare_resultsource_install (attribute declared in /home/kes/work/projects/tucha/monkeyman/local/lib/perl5/DBIx/Class/DeploymentHandler/WithApplicatorDumple.pm at line 51) line 18.
Overwriting existing DDL file - /home/kes/work/projects/tucha/monkeyman/share/migrations/PostgreSQL/deploy/2/001-auto-__VERSION.sql at inline delegation in DBIx::Class::DeploymentHandler for deploy_method->prepare_resultsource_install (attribute declared in /home/kes/work/projects/tucha/monkeyman/local/lib/perl5/DBIx/Class/DeploymentHandler/WithApplicatorDumple.pm at line 51) line 18.
No Database to create up or downgrades from! at /home/kes/work/projects/tucha/monkeyman/local/lib/perl5/DBIx/Class/Migration.pm line 293.
Makefile:119: recipe for target 'dbprepare' failed
make: *** [dbprepare] Error 255

Does No Database to create up or downgrades from! should be just warning? This is not error in this case.

@mohawk2
Copy link
Collaborator

mohawk2 commented Feb 25, 2019

This seems like a category error. DBICM is for migrations, which implies the existence of something to migrate from, hence the error. Your automation needs to do the initial deploy by other means.

@KES777
Copy link
Author

KES777 commented Feb 26, 2019

How to migrate to first version?

@KES777
Copy link
Author

KES777 commented Feb 26, 2019

belongs to #95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants