View Issue Details

IDProjectCategoryView StatusLast Update
0017892phpList 3 applicationInstallationpublic11-05-17 19:55
Reporterdanwaterloo 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformOScentosOS Version6.5
Product Version3.0.0 
Target Versionnext minorFixed in Version 
Summary0017892: database conversion does not fix all tables
Descriptionwhen converting an existing 2.10.19 installation to 3.0.x, there are errors after the conversion.

several tables are not renamed to the table name in the new version.
Steps To Reproduceuse an existing database 2.10.19, with 2.10.19 code.
update the code to 3.0.6, and choose 'upgrade' when logging in.

verify the database, and see errors in tables.
Additional Informationthese commands renamed the tables... and fixed the errors...

ALTER TABLE `dbname`.`phplist_user_attribute`
RENAME TO `dbname`.`phplist_user_user_attribute` ;


ALTER TABLE `dbname`.`phplist_attribute`
RENAME TO `dbname`.`phplist_user_attribute` ;

ALTER TABLE `dbname`.`phplist_user`
RENAME TO `dbname`.`phplist_user_user` ;
TagsNo tags attached.

Activities

michiel

22-10-15 15:33

manager   ~0057074

but then you had different prefixes in the configuration.

danwaterloo

22-10-15 15:44

developer   ~0057075

this was the setting in the old config file:

# if you want a prefix to all your tables, specify it here,
$table_prefix = "phplist_";

# if you want to use a different prefix to user tables, specify it here.
# read README.usertables for more information
#$usertable_prefix = "phplist_user_";


and this is the setting in the new config.php file:

# if you want a prefix to all your tables, specify it here,
$table_prefix = "phplist_";

# if you want to use a different prefix to user tables, specify it here.
# read README.usertables for more information
# $usertable_prefix = "phplist_user_";

michiel

22-10-15 15:51

manager   ~0057076

ah, yes, if you do not define it, then it takes the default.

Better would have been

$usertable_prefix = '';

but it's true that it should have renamed the tables, if the default settings changed.

danwaterloo

22-10-15 15:57

developer   ~0057077

Thanks... just wanted to make a note.
I went from the default settings, to the default settings... and it didn't work.

I'll make a note for myself, I don't think it's a big issue going forward, unless a lot of users are on V2.x

michiel

22-10-15 16:04

manager   ~0057078

yes, you're right, it should have worked from default -> default and I need to look into it.

looks like the default for the usertable prefix changed from being the same as table_prefix to adding a "user_" in it.

danwaterloo

23-06-16 21:48

developer   ~0057830

on another conversion, I needed to also update the name of a field

ALTER TABLE `databasename`.`phplist_message`
CHANGE COLUMN `repeat` `repeatinterval` INT(11) NULL DEFAULT '0' ;

michiel

11-05-17 19:55

manager   ~0059056

these versions are too old now to be able to work with this.