fix: convert EVERY column in a MySQL baseline, not just the first per line
The quoting fix was necessary but not sufficient: "column 'op_name' can't have a default value" persisted. The translation worked line by line and rewrote only the FIRST column on each line. Our own migrations put one column per line, so nothing showed there — but sqlite_master stores a table's CREATE statement with every ALTER-added column appended to the SAME line, and the baseline is built from exactly that. On a logbook that had been through upgrades, most columns therefore kept their TEXT type and MySQL rejected the schema. Two consequences fixed together: every match is now rewritten, and each one is decided from ITS OWN declaration — the text between the surrounding commas — rather than from the whole line. Deciding per line would have made every column sharing a line with a default-bearing one into VARCHAR(255), which breaches the InnoDB row-size limit the TEXT rule exists to respect. Tests cover the many-columns-on-one-line shape and pin that a neighbour's DEFAULT does not leak.
This commit is contained in:
+2
-2
@@ -5,12 +5,12 @@
|
||||
"en": [
|
||||
"Clicking a cluster spot while listening on the SUB VFO no longer pulls the radio back to MAIN. The command used to tune sets the main VFO by definition; on SUB the sub VFO is now written directly and the VFO selection is left alone.",
|
||||
"Split showed the opposite of the radio on some Yaesus. Where the rig reports which VFO transmits rather than a split flag, that has to be compared with the VFO you are listening to — so it read backwards for an operator working on SUB and correctly for one on MAIN. Setting split had the same fault.",
|
||||
"A shared MySQL logbook could fail to build its schema, leaving OpsLog on the local SQLite database with a message that only said the connection failed. Quoted column declarations escaped the SQLite-to-MySQL type conversion, so MySQL refused an index and a default value."
|
||||
"A shared MySQL logbook could fail to build its schema, leaving OpsLog on the local SQLite database with a message that only said the connection failed. Column declarations that are quoted, or share a line with others, escaped the SQLite-to-MySQL type conversion — so MySQL refused an index and a default value."
|
||||
],
|
||||
"fr": [
|
||||
"Cliquer sur un spot du cluster en écoutant sur le VFO SUB ne ramène plus la radio sur le VFO principal. La commande utilisée pour s'accorder agit par définition sur le VFO principal ; sur SUB, c'est désormais le VFO secondaire qui est écrit, sans toucher à la sélection.",
|
||||
"Le split affichait l'inverse de la radio sur certains Yaesu. Quand la radio indique quel VFO émet plutôt qu'un indicateur de split, il faut le comparer au VFO écouté — l'affichage était donc inversé pour un opérateur travaillant sur SUB et correct pour un autre sur MAIN. Le réglage du split souffrait du même défaut.",
|
||||
"Un carnet MySQL partagé pouvait échouer à créer son schéma, laissant OpsLog sur la base SQLite locale avec un message indiquant seulement l'échec de la connexion. Les déclarations de colonnes entre guillemets échappaient à la conversion de types SQLite vers MySQL, d'où le refus d'un index et d'une valeur par défaut."
|
||||
"Un carnet MySQL partagé pouvait échouer à créer son schéma, laissant OpsLog sur la base SQLite locale avec un message indiquant seulement l'échec de la connexion. Les déclarations de colonnes entre guillemets, ou partageant une ligne avec d'autres, échappaient à la conversion de types SQLite vers MySQL — d'où le refus d'un index et d'une valeur par défaut."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user