The feature basically works by running select * from migrations and compare this to the files in the datbase/migrations folder.
For migrations also found in the database we just display an icon stating that the migration ran. For pending migrations, the icon is different and can be used to easily apply all pending migration by running php artisan migrate via a run configuration.
Eventbus Connector
This PR also introduces a new component, which injects code into the projects source code, which enables us to listen for events emitted by the Laravel application. This enables us to listen for the MigrationsEnded event and refresh the migration status, as well as the manged data source schema.
Since some might see this as invasive, we should provide a setting to turn this off.
TODO
[x] Somehow detect, whether php artisan migrate was run and update the gutter icons
[x] Supply an Update Everything Laravel Make related action, so the user can manually update routes, commands, migrations, etc., as I am sure there will be some cases where the above cannot be reliably implemented Actually not needed
[ ] Setting for enabling the installation of the new eventbus connector
Further iterations could apply/reverse single migrations by utilizing the --step parameter, but for now this is out of scope.
Indicates whether the migration was run or not via a gutter icon next to the
class
keyword in a migration file.First iteration, only works if:
.php
in a folder namedmigrations
The feature basically works by running
select * from migrations
and compare this to the files in thedatbase/migrations
folder.For migrations also found in the database we just display an icon stating that the migration ran. For pending migrations, the icon is different and can be used to easily apply all pending migration by running
php artisan migrate
via a run configuration.Eventbus Connector
This PR also introduces a new component, which injects code into the projects source code, which enables us to listen for events emitted by the Laravel application. This enables us to listen for the
MigrationsEnded
event and refresh the migration status, as well as the manged data source schema.Since some might see this as invasive, we should provide a setting to turn this off.
TODO
php artisan migrate
was run and update the gutter iconsSupply anActually not neededUpdate Everything Laravel Make related
action, so the user can manually update routes, commands, migrations, etc., as I am sure there will be some cases where the above cannot be reliably implementedFurther iterations could apply/reverse single migrations by utilizing the
--step
parameter, but for now this is out of scope.