-
Notifications
You must be signed in to change notification settings - Fork 278
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
2.14.0 SQL server incompatible queries #177
Comments
Note that since Laravel 5 you can simply append i.e. on line 65/66, adding |
Due to long-lasting laravel/framework#8840 as they both blame each other (a doctrine member claims tinyint is barely supported, although everything but postgres supports it) Alternatively, perhaps we should consider implementing a custom type for tinyint example? As an intermediate solution (source), use the following snippet instead of the original $connection = config('database.default');
$driver = config("database.connections.{$connection}.driver");
switch($driver)
{
case 'sqlsrv':
\DB::statement('ALTER TABLE data_imports ALTER COLUMN status TINYINT NOT NULL');
break;
case 'mysql':
\DB::statement('ALTER TABLE data_imports MODIFY status TINYINT NOT NULL');
//mysql syntax
break;
case 'sqlite':
//sqlite syntax
break;
default:
throw new \Exception("Driver not supported: $driver");
break;
} |
Let's simply ignore it and in the future when we will need changes on unsupported types where we will add raw queries we'll try to write a note in the changelog / upgrade steps. |
👍 |
We have several apps with multiple connections: mysql1, mysql2 etc. (more representative names) |
I'm sorry but I'm not sure how that's related? |
I think I read between the lines, you're right |
The workaround works on a connection basis, that's probably what caused the mix-up. added a notice above it to clarify that. |
This is a bug.
Prerequisites
(enso is made of many specialized packages: https://github.com/laravel-enso)
Description
the new
enso:upgrade
contains queries not compatible with SQL ServerSteps to Reproduce
enso:upgrade
during 2.14.0 upgrade processExpected behavior
upgrade to execute
Actual behavior
docs: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-table-transact-sql?view=sql-server-2017#alter_column
The text was updated successfully, but these errors were encountered: