Monica: Error on fresh install with SQLite

Created on 8 Jul 2017  路  6Comments  路  Source: monicahq/monica

When trying to perform a fresh installation using SQLite I have an error during the php artisan migrate command.
The errors are the following :

Migration table created successfully.


  [Illuminate\Database\QueryException]                                                                 
  SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (SQL: alter   
  table "users" add column "account_id" integer not null)                                              



  [Doctrine\DBAL\Driver\PDOException]                                                     
  SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL  



  [PDOException]                                                                          
  SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL

Most helpful comment

Duplicate of #137 (dont know why it was closed, as it is not fixed obviously).

All 6 comments

Duplicate of #137 (dont know why it was closed, as it is not fixed obviously).

Any update on this? At the moment Monica cannot be used with SQLite

The main reason why it cannot be used with sqlite is the usage of ENUM Type-field in databases/2017_06_07_173437_add_multiple_genders_choices.php

I was able to fix everything else in the migration-table up to this point. Wouldn't it make sense to use a enum-table instead of the enum-type? This would help in ways to be more compatible with other db drivers?

I need to correct myself. Enum-types are used more often in the migration-files. So I can't say how much effort it takes to change the stuff in the background.

Still. Why using enums at all? :-) Aren't enums considered "evil" anyways? (https://www.planetgeek.ch/2009/07/01/enums-are-evil/)

Duplicate of #137

Was this page helpful?
0 / 5 - 0 ratings

Related issues

scheidm picture scheidm  路  3Comments

mattdavenport picture mattdavenport  路  3Comments

stralsi picture stralsi  路  4Comments

jkbecker picture jkbecker  路  3Comments

baisong picture baisong  路  3Comments