Skip to content

Commit 8c4d6f5

Browse files
author
HugoFara
committed
fix(migration): preserve default values for language boolean columns
The migration was modifying LgRemoveSpaces, LgSplitEachChar, and LgRightToLeft columns without preserving their DEFAULT '0' values, causing INSERT statements that omit these columns to fail.
1 parent c8d97c8 commit 8c4d6f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

db/migrations/19700102_000001_lwt_fork.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ ALTER TABLE archivedtexts
1111

1212
ALTER TABLE languages
1313
MODIFY COLUMN LgID tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
14-
MODIFY COLUMN LgRemoveSpaces tinyint(1) unsigned NOT NULL,
15-
MODIFY COLUMN LgSplitEachChar tinyint(1) unsigned NOT NULL,
16-
MODIFY COLUMN LgRightToLeft tinyint(1) unsigned NOT NULL;
14+
MODIFY COLUMN LgRemoveSpaces tinyint(1) unsigned NOT NULL DEFAULT '0',
15+
MODIFY COLUMN LgSplitEachChar tinyint(1) unsigned NOT NULL DEFAULT '0',
16+
MODIFY COLUMN LgRightToLeft tinyint(1) unsigned NOT NULL DEFAULT '0';
1717

1818
ALTER TABLE sentences
1919
MODIFY COLUMN SeID mediumint(8) unsigned NOT NULL AUTO_INCREMENT,

0 commit comments

Comments
 (0)