diff --git a/app/Support/SqliteCompat.php b/app/Support/SqliteCompat.php index b5fcc5b9..524fc40d 100644 --- a/app/Support/SqliteCompat.php +++ b/app/Support/SqliteCompat.php @@ -36,8 +36,8 @@ class SqliteCompat // Promote `id` column to PRIMARY KEY if not already. $sql = preg_replace( - '/`id`\\s+integer\\s+NOT NULL/i', - '`id` integer PRIMARY KEY NOT NULL', + '/`id`\\s+integer\\s+NOT\\s*NULL/i', + '`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL', $sql, 1 );