@@ -117,7 +117,12 @@ class SqliteSchemaManager extends AbstractSchemaManager
...
@@ -117,7 +117,12 @@ class SqliteSchemaManager extends AbstractSchemaManager
$tableForeignKeys=$this->_conn->fetchAll($sql);
$tableForeignKeys=$this->_conn->fetchAll($sql);
if(!empty($tableForeignKeys)){
if(!empty($tableForeignKeys)){
$createSql=$this->_conn->fetchAll("SELECT sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type = 'table' AND name = '$table'");
$createSql=$this->_conn->fetchAll(
sprintf(
"SELECT sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type = 'table' AND name = '%s'",
$table
)
);
$createSql=$createSql[0]['sql']??'';
$createSql=$createSql[0]['sql']??'';
if(preg_match_all(
if(preg_match_all(
...
@@ -169,7 +174,9 @@ class SqliteSchemaManager extends AbstractSchemaManager
...
@@ -169,7 +174,9 @@ class SqliteSchemaManager extends AbstractSchemaManager
@@ -263,7 +272,12 @@ class SqliteSchemaManager extends AbstractSchemaManager
...
@@ -263,7 +272,12 @@ class SqliteSchemaManager extends AbstractSchemaManager
}
}
// inspect column collation and comments
// inspect column collation and comments
$createSql=$this->_conn->fetchAll("SELECT sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type = 'table' AND name = '$table'");
$createSql=$this->_conn->fetchAll(
sprintf(
"SELECT sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type = 'table' AND name = '%s'",