PDA

View Full Version : creating empty users on update from database version 2 (see table dp_version in db)


opto
22-03-07, 07:59 AM
database status before upgrade: according to database, (table dpversion), the code_version is 2.0.1, the db version is 2. no code upgrade, db upgrade.


upgrading to dp2.1rc creates as many 'empty' contacts as there were users in the old database in upgrade_users.php.

If I understand this file correctly, it does 3 sql's for each user:

1) create a new contact which is supposed to be filled with the user's name etc. but which is actually empty
2) (re)sets the id user_contacts in table users to the newly created user id
3) in table user_preferences, enters a record: user_id, 'USERFORMAT', 'user'

Now, in my database version 2, code version 2.0.1, each user is already represented by a contact.

So I assume step 1 and 2 are not necessary for my upgrade?


But I have to do step 3 for each user, whatever this record may then mean to the user handling. Is this understanding correct?

Does anybody know?

If not, one has to retype all the user information, because the users that were related to contacts (filled with names) in the old db before upgrade, etc., will after the present upgrade be connected to new contacts all empty.

and for the upgrade dp2.0.1 to dp 2.1rc, steps 1 and 2 may be a bug? (= bug in upgrade script, which should distinguish different database versions and not always do all three sql's in upgrade_contacts.php?)

help is appreciated,

Klaus

php 4 or 5, Mysql 4 or 5, Win XP prof or home (different machines show same error). Some results of the sql's are in http://www.dotproject.net/mantis/view.php?id=1941