laravel-modules icon indicating copy to clipboard operation
laravel-modules copied to clipboard

Looking for command to rollback specific table and migrate that table again

Open JaberWiki opened this issue 3 years ago • 4 comments

Discussed in https://github.com/nWidart/laravel-modules/discussions/1422

Originally posted by JaberWiki July 27, 2022 How to rollback migration with step or --path like default Laravel rollback commands on Laravel modules? I've tried this command

php artisan migrate:rollback --path=/Modules/ModuleName/Database/Migrations/table_name.php

or

php artisan module:migrate-rollback --path=/Modules/ModuleName/Database/Migrations/table_name.php Blog

But it's not working. Is there any command to migrate or rollback specific table?

JaberWiki avatar Jul 27 '22 08:07 JaberWiki

Well, the path option is only to indicate the directory, not the file

moxerox avatar Jul 28 '22 17:07 moxerox

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 13 '22 02:08 stale[bot]

It should be like that

php artisan module:migrate-rollback Product

While Product is the module name you wish to rollback current migrations

Mello21century avatar Aug 15 '22 09:08 Mello21century

It should be like that

php artisan module:migrate-rollback Product

While Product is the module name you wish to rollback current migrations

Yeah, It’s also described in documentation. But I want to rollback an specific migration.

JaberWiki avatar Aug 15 '22 10:08 JaberWiki

I've looked into the inner workings into migrator there's no support for this as far as I can see.

dcblogdev avatar Aug 31 '22 03:08 dcblogdev