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

Issues with sql server #53

Open
richbreton opened this issue Oct 7, 2019 · 0 comments
Open

Issues with sql server #53

richbreton opened this issue Oct 7, 2019 · 0 comments

Comments

@richbreton
Copy link

Trying to save to a model breaks after adding VersionTrait. It seems to not like the datatype for model possibly here is an error I get:

Illuminate\Database\QueryException: SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query. (SQL: insert into [versions] ([versionable_id], [versionable_type], [user_id], [model_data], [updated_at], [created_at]) values (1, App\Database\Models\Operational\Runbook, 133, a:11:{s:2:"id";i:1;s:7:"user_id";i:133;s:4:"name";s:37:"How to be LALAs";s:4:"body";s:10:"This isBAD";s:8:"category";i:3;s:11:"subcategory";i:3;s:10:"attachment";i:1245;s:9:"published";O:13:"Carbon\Carbon":3:{s:4:"date";s:26:"2019-10-07 14:33:32.378148";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}s:8:"archived";i:0;s:10:"created_at";s:23:"2019-09-26 21:35:22.373";s:10:"updated_at";s:23:"2019-10-07 14:33:32.378";}, 2019-10-07 14:33:32.387, 2019-10-07 14:33:32.387)) in file /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 664

Caused by
Doctrine\DBAL\Driver\PDOException: SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query. in file /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 119

Caused by
PDOException: SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query. in file /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 117

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