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

migrations in modules #1776

Closed
dizews opened this issue Jan 4, 2014 · 4 comments
Closed

migrations in modules #1776

dizews opened this issue Jan 4, 2014 · 4 comments

Comments

@dizews
Copy link
Contributor

dizews commented Jan 4, 2014

I have 2 migrations. First is located in @app/migrations second @app/modules/modName/migrations

to apply them I run two command:
php yii migrate/up and php yii migrate/up --migrationPath=@app/modules/modName/migrations
but I can't rollback them like:
php yii migrate/down 2 or php yii migrate/down --migrationPath=@app/modules/modName/migrations

I think migration/down should keep path or module name to migration files for a transparency rollback.

@Ragazzo
Copy link
Contributor

Ragazzo commented Jan 4, 2014

@dizews
Copy link
Contributor Author

dizews commented Jan 4, 2014

@Ragazzo I see two migrations. but I can't rollback them because yii don't find all migration files.

@cebe
Copy link
Member

cebe commented Jan 4, 2014

duplicate of #384

@cebe cebe closed this as completed Jan 4, 2014
@praad
Copy link

praad commented Jul 25, 2018

Add your module's namespace to migrations in consol/config/main.php after that it will work like a charm

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

4 participants