1
0
Fork 0

upsize guid storage to allow for Diaspora future growth

This commit is contained in:
Friendika 2011-08-07 16:24:20 -07:00
parent 48ffa880f0
commit eea493d1f5
2 changed files with 5 additions and 1 deletions

View file

@ -575,7 +575,7 @@ CREATE TABLE IF NOT EXISTS `attach` (
CREATE TABLE IF NOT EXISTS `guid` ( CREATE TABLE IF NOT EXISTS `guid` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`guid` CHAR( 16 ) NOT NULL , `guid` CHAR( 64 ) NOT NULL ,
INDEX ( `guid` ) INDEX ( `guid` )
) ENGINE = MYISAM DEFAULT CHARSET=utf8; ) ENGINE = MYISAM DEFAULT CHARSET=utf8;

View file

@ -632,10 +632,14 @@ function update_1076() {
} }
// There was a typo in 1076 so we'll try again in 1077 to make sure // There was a typo in 1076 so we'll try again in 1077 to make sure
// We'll also make it big enough to allow for future growth, I seriously
// doubt Diaspora will be able to leave guids at 16 bytes,
// and we can also use the same structure for our own larger guids
function update_1077() { function update_1077() {
q("CREATE TABLE IF NOT EXISTS `guid` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , q("CREATE TABLE IF NOT EXISTS `guid` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`guid` CHAR( 16 ) NOT NULL , INDEX ( `guid` ) ) ENGINE = MYISAM "); `guid` CHAR( 16 ) NOT NULL , INDEX ( `guid` ) ) ENGINE = MYISAM ");
q("ALTER TABLE `guid` CHANGE `guid` `guid` CHAR( 64 ) NOT NULL");
} }