In the modules of Laravel 6, the rollback of the database migration (tip: migration not found) and remigration
1. In the Git library, it is found that the database migration file has some changes, such as: the field MINE_TYPE is changed to MIME_TYPE. as shown in Figure 1
2. 2 database migration files, just in the last migration. as shown in Figure 2
To roll back the migration, if you want to roll back the last migration operation, you can use the artisan command rollback. This command will roll back the last “batch” of migration, which may contain multiple migration files, prompting: Migration not found. as shown in Figure 3
PS E:\wwwroot\object> php artisan migrate:rollback
Migration not found: 2021_12_13_145303_create_theme_asset_version_table
Migration not found: 2021_12_06_133918_create_theme_asset_table
PS E:\wwwroot\object>
4. The reason should be that these 2 migration files are placed in the module, and the path is: /modules/themestore/database/migrations, which does not exist under the default path: /database/migrations.
5. The implementation of the module is based on: nwidart/laravel-modules, and execute the module:migrate-rollback command. The execution is successful, as shown in Figure 4
PS E:\wwwroot\object> php artisan module:migrate-rollback ThemeStore
Rollback: 2021_12_13_145303_create_theme_asset_version_table
Rollback: 2021_12_06_133918_create_theme_asset_table
PS E:\wwwroot\object> php artisan module:migrate ThemeStore
Migrating: 2021_12_06_133918_create_theme_asset_table
Migrated: 2021_12_06_133918_create_theme_asset_table (0.26 seconds)
Migrating: 2021_12_13_145303_create_theme_asset_version_table
Migrated: 2021_12_13_145303_create_theme_asset_version_table (0.02 seconds)
PS E:\wwwroot\object>
6. Check the data table, the field name has been changed to: MIME_TYPE. as shown in Figure 5




