From 72d714497e896005796d2161b0857447d7741185 Mon Sep 17 00:00:00 2001 From: Mayank Chugh Date: Wed, 25 Dec 2024 13:37:03 +0000 Subject: [PATCH] Fixes regex --- src/lib/validations/sql.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/validations/sql.ts b/src/lib/validations/sql.ts index 151d5763c..75172fad9 100644 --- a/src/lib/validations/sql.ts +++ b/src/lib/validations/sql.ts @@ -378,7 +378,7 @@ const checks: Checks = { "We suggest you search for all 'ENGINE=X' entries and replace them with 'ENGINE=InnoDB'!", }, autoIncrement: { - matcher: /^CREATE TABLE IF NOT EXISTS `?([a-z0-9_]+)`?\s+\(.*?AUTO_INCREMENT.*?\)/i, + matcher: /\s(NOT NULL AUTO_INCREMENT,)/i, matchHandler: ( _, results ) => ( { text: results[ 1 ] } ), outputFormatter: requiredCheckFormatter, results: [],