Merge innodb-tablas-nuevas: las tablas nuevas del CMS nacen en InnoDB

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jordan Diaz
2026-09-22 16:41:10 +00:00
co-authored by Claude Opus 5
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -74,7 +74,12 @@ function createMissingSchemaTablesAndFields() {
$mysqlTableName = $TABLE_PREFIX . $tableName;
if (!in_array($mysqlTableName, $mysqlTables)) {
notice("Creating MySQL table for schema table: $tableName<br/>\n");
$result = mysql_query("CREATE TABLE `".mysql_real_escape_string($mysqlTableName)."` (num int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (num)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;");
// InnoDB (antes MyISAM): las tablas nuevas nacen con recuperacion
// ante caida y bloqueo por fila. El sql_mode de Forge no es
// estricto, asi que los INSERT parciales del CMS (AcaiAPI no
// rellena dragSortOrder ni los checkboxes) siguen colando igual
// que con MyISAM. Ver docs/motor-innodb.md del repo de Forge.
$result = mysql_query("CREATE TABLE `".mysql_real_escape_string($mysqlTableName)."` (num int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (num)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;");
if (!$result) { alert("Error creating MySQL table: $mysqlTableName<br/>\MySQL error was: ". htmlspecialchars(mysql_error()) . "\n"); }
}
+1 -1
View File
@@ -210,7 +210,7 @@ function addTablePlugin($path,$file) {
$result = mysql_query("CREATE TABLE `".mysql_real_escape_string($tableNameWithPrefix)."` (
num int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (num)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
if (!$result) {
print "Error creating MySQL table.\n\nMySQL error was: ". htmlspecialchars(mysql_error()) . "\n";
exit;