Skip to content

Migration table not found error in SQL Server despite existence of migrations table when running migrate command #50842

Closed
@kou-tech

Description

@kou-tech

Laravel Version

11.1.0

PHP Version

8.2.17

Database Driver & Version

SQL Server 2022

Description

I am in the process of upgrading Laravel from version 10 to 11 for a project that uses SQLServer as the database. In Laravel 10, after executing php artisan migrate command, the migrations table is successfully created, and running php artisan migrate:status yields the expected output.

However, after upgrading to Laravel 11, while the php artisan migrate command still creates the migrations table as expected, running php artisan migrate:status results in an error message stating ERROR Migration table not found.
This issue arises despite the fact that the migrations table does indeed exist in the SQLServer database, as confirmed through manual inspection.

This behavior is inconsistent with the expected outcome and differs from the results in Laravel 10 under the same conditions. It suggests there might be an issue with how the migration status command interacts with the SQLServer database in Laravel 11, specifically in recognizing the existence of the migrations table.

I am looking for guidance on resolving this error and understanding whether this is a known issue with a workaround or a newly introduced bug in Laravel 11.

Steps To Reproduce

  1. Create a fresh Laravel 11 project and configure it to use SQLServer.
  2. Execute php artisan migrate to initialize the database schemas, including the creation of the migrations table in your SQLServer database.
  3. Immediately following the successful migration, run php artisan migrate:status to assess the migration status. Despite the migrations table clearly existing in the SQLServer database, this command unexpectedly results in an error stating ERROR Migration table not found.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions