Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate error #799

Open
Sky01Zero opened this issue Jul 6, 2023 · 0 comments
Open

Migrate error #799

Sky01Zero opened this issue Jul 6, 2023 · 0 comments

Comments

@Sky01Zero
Copy link

Sky01Zero commented Jul 6, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant