On Tue, Nov 17, 2015 at 2:58 PM Xavier Lamien <laxathom@fedoraproject.org> wrote:
On Tue, Nov 17, 2015 at 11:38 AM Pierre-Yves Chibon <pingou@pingoured.fr> wrote:
On Tue, Nov 17, 2015 at 11:04:20AM +0100, Pierre-Yves Chibon wrote:
> This is without checking the changes in unique constraints where we might have
> a few other surprises.

After looking more into this, it seems the only fields where we will run into
'problems' are `ircnick` and `email_token` that FAS3 requires to be unique while
FAS2 doesn't.

I run the following query on the DB:
SELECT username, ircnick, status
FROM people
WHERE ircnick IS NOT NULL
AND ircnick != ''
AND status = 'active'
AND ircnick IN (
        SELECT ircnick
        FROM people
        WHERE status = 'active'
        GROUP BY ircnick
        HAVING COUNT(ircnick) > 1
)
ORDER BY ircnick, username;

This returned 70 rows, so at least 35 persons have at minimum 2 accounts,
active, set with the same ircnick.

I propose that we contact them and kindly ask that they either remove the
ircnick from one of the accounts or just deactivate it.

For the email_token, we have two different account with the same token, and a
few with a token's whose value is ''.
(Also: FAS3 requires email_token to be unique, but not password_token, should we
make this consistent?)



Some more questions for the migration:
- Do we migrate disabled accounts?
yes. 
- Do we migrate accounts who last_seen date == the creation date ?
yes, since they will be set as inactive.

globally, as we do not delete any account, we should keep them.
They will no showed up in the UI for en-users but admin's panel.

Or were you thinking about clean up accounts?

--

Xavier