Skip to content

Commit 12b420a

Browse files
committed
优化获取插件创建表功能逻辑
1 parent 4293502 commit 12b420a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"homepage": "https://github.com/karsonzhang/fastadmin-addons",
55
"license": "Apache-2.0",
66
"minimum-stability": "dev",
7-
"version": "1.2.1",
7+
"version": "1.2.2",
88
"authors": [
99
{
1010
"name": "Karson",

src/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ function get_addon_tables($name)
351351
if (!$addonInfo) {
352352
return [];
353353
}
354-
$regex = "/^CREATE TABLE (IF NOT EXISTS )?`?([a-zA-Z_]+)`?/mi";
354+
$regex = "/^CREATE\s+TABLE\s+(IF\s+NOT\s+EXISTS\s+)?`?([a-zA-Z_]+)`?/mi";
355355
$sqlFile = ADDON_PATH . $name . DS . 'install.sql';
356356
$tables = [];
357357
if (is_file($sqlFile)) {

0 commit comments

Comments
 (0)