From 268548faedd01299c9ab0a47c78f89779f456173 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 22 Jun 2026 00:00:49 -0400 Subject: [PATCH] Add AUTOINCREMENT to SqliteCompat PRIMARY KEY for SQLite compatibility --- app/Support/SqliteCompat.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 );