SQLite - bad migration
Opened this issue · 2 comments
fimion commented
So, after seeing y'all super great talk at the Atlanta Vue.js meetup, I figured I'd give it a go. I have a few notes about your install instructions and or your package requirements... that said,
when running the migration i get the following error:
Migrating: 2018_07_24_162758_alter_dvs_slice_instances_add_settings_drop_enabled
Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (SQL: alter table "dvs_slice_instances" add column "settings" text not null)
at C:\Users\fimio\PHPStormProjects\devise-project\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL")
C:\Users\fimio\PHPStormProjects\devise-project\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:63
2 PDOException::("SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL")
C:\Users\fimio\PHPStormProjects\devise-project\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:61
I'm doing a sqlite db on a windows 10 machine. php 7.3
cinco-de-mauro commented
Thanks @fimion Seems like an issue with sqlite. We'll investigate the appropriate action here.
Based on:
https://laracasts.com/discuss/channels/general-discussion/migrations-sqlite-general-error-1-cannot-add-a-not-null-column-with-default-value-null
https://stackoverflow.com/questions/20822159/laravel-migration-with-sqlite-cannot-add-a-not-null-column-with-default-value-n