Skip to content

Migrate error #799

@Sky01Zero

Description

@Sky01Zero

Hello, I got some issue when migrate some table success migrate, but I also got Error :

` Illuminate\Database\QueryException : SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near the keyword 'RESTRICT'. (SQL: alter table "permission_role" add constraint "permission_role_permission_id_foreign" foreign key ("permission_id") references "permissions" ("id") on delete CASCADE on update RESTRICT)

at C:\laragon\www\laravel\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {

669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|

Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near the keyword 'RESTRICT'.")
C:\laragon\www\laravel\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:129

2 PDOException::("SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near the keyword 'RESTRICT'.")
C:\laragon\www\laravel\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:127`

From steps installation 1-9 : Error on Migrate & npm run dev/npm run prod.
I using Laragon, PHP 7.4.25 x64, node v18.8.0, npm 8.18.0, SQLServer 12.0.x

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