Skip to content

DB Select statement do not return data in migration pretend mode #45050

Closed
@lebedevsergey

Description

@lebedevsergey
  • Laravel Version: 9.0
  • PHP Version: 8.0.21
  • Database Driver & Version:
    Mysql

Description:

In database Laravel migration pretend mode Select statement do not return data which leads to errors in those migrations that read database. For example it could be a migration that extends values list in database field of enum type. To avoid hard-coded values lists such migration could first read enum type values list from database, then extend it and write the result back to database. Which works correctly in normal database migration mode but gives error when migration is launched in pretend mode.

Steps To Reproduce:

Create a database migration that launch Select query and then uses its result in some way - for example to compose then next database query. This gives when migration is launched in pretend mode because in that mode Select query returns empty data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions