Skip to content

MSSQL migration Default values adds quotes #57650

@ChrisSantiago82

Description

@ChrisSantiago82

Laravel Version

12

PHP Version

8.3

Database Driver & Version

sqlsrv

Description

I have a project that was written for Mysql, now it was decided that it should run with an MSSQL Server.

The change was painless but one issue I can not get ressolved:

I have a migration that sets a default value to a field:
$table->string('currency', 6)->default('chf');

The issue is that the quotes are added to the default value.
Image

So the default value is 'chf' and if I updated the field it's only chf without the quotes.
Image

Steps To Reproduce

Create a migration, set a default value and run migration (on a MSSQL Database).

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