Skip to content

Commit

Permalink
Embiggen ml_items.itcode, so certain computed codes actually fit
Browse files Browse the repository at this point in the history
Also mark itcode as ASCII, as they're internal names anyway.

Fixes #1787.
  • Loading branch information
Pixie committed May 22, 2016
1 parent 75dfba1 commit bb68a6f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions bin/upgrading/deadphrases.dat
Original file line number Diff line number Diff line change
Expand Up @@ -1676,3 +1676,6 @@ contentflag.viewingconcepts.byposter
contentflag.viewingexplicit.bycommunity
contentflag.viewingexplicit.byjournal
contentflag.viewingexplicit.byposter

general /customize/options.bml.widget.navstripchooser.option.color.control_strip_borderc
general /customize/options.bml.widget.navstripchooser.option.color.control_strip_linkcol
8 changes: 7 additions & 1 deletion bin/upgrading/update-db-general.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@
dmid TINYINT UNSIGNED NOT NULL,
itid MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL,
PRIMARY KEY (dmid, itid),
itcode VARCHAR(80) NOT NULL,
itcode VARCHAR(120) CHARACTER SET ascii NOT NULL,
UNIQUE (dmid, itcode),
proofed TINYINT NOT NULL DEFAULT 0, -- boolean, really
INDEX (proofed),
Expand Down Expand Up @@ -4151,6 +4151,12 @@
"ALTER TABLE spamreports ".
"MODIFY ip VARCHAR(45)" );
}

unless ( column_type( 'ml_items', 'itcode' ) =~ /120/ ) {
do_alter( 'ml_items',
"ALTER TABLE ml_items MODIFY COLUMN itcode VARCHAR(120) CHARACTER SET ascii NOT NULL" );
}

});


Expand Down
2 changes: 1 addition & 1 deletion cgi-bin/LJ/Lang.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use strict;
use LJ::LangDatFile;


use constant MAXIMUM_ITCODE_LENGTH => 80;
use constant MAXIMUM_ITCODE_LENGTH => 120;

my @day_short = (qw[Sun Mon Tue Wed Thu Fri Sat]);
my @day_long = (qw[Sunday Monday Tuesday Wednesday Thursday Friday Saturday]);
Expand Down

0 comments on commit bb68a6f

Please sign in to comment.