mpociot/versionable

Issues with sql server

richbreton opened this issue · 0 comments

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