Skip to content

Cannot add a NOT NULL column with default value NULL #621

@stefanorumi7

Description

@stefanorumi7

I am running for the first time my project on a real Android device (Android 8.1 bc I need to target old phones). And I am getting this error: Cannot add a NOT NULL column with default value NULL. It is crashing when adding the first ID from the migrations

const List<MigrationCommand> _migration_xxx_up = [
  InsertTable('EntityA'),
  InsertColumn(
    'id',
    Column.varchar,
    onTable: 'EntityA',
    nullable: false,
    unique: true,
  ),
  ...
  CreateIndex(columns: ['id'], onTable: 'EntityA', unique: true),
];

No matter how I change the code and migrations I still get that same error.
Could it be that the project is not compatible with SQLite version 3.19.4?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions