You wrote that you run the migration's sql directly in the database, so I assume that for you running another 2 statements would be fine too.
With laravel 5.7 (and probably some lower versions) you need to populate the migration information in the database (in the migrations
table).
The information you need is the migration
(the filename without the .php
extension) and the batch
number (to decide which migrations to run at once when rollbacking a migration for instance)
First you have to see wich the last batch number is:
SELECT MAX(batch) from migrations;
Let's say the above query returns 42
, then we have to insert the data with batch number 42 + 1 = 43
Assuming that the migration that you want to mark as run is database/migrations/2019_01_29_091850_update_jobs_table_for_laravel_5_3.php
,
to populate the information you need to run:
-- note that you should not include the .php extension
INSERT INTO migrations VALUES ("2019_01_29_091850_update_jobs_table_for_laravel_5_3", 43);
Then running php artisan migrate:status
will report the migration as run.
May be you can accomplish the task with one query... I'll leave that task open for the comments from the sql experts.