Tabel "user_password_history" does not exist

Tabel "user_password_history" does not exist

by Bas van Kollenburg -
Number of replies: 3

When i want to delete a user i get this error

Tabel "user_password_history" does not exist.

When i check the database there is no tabel with this name

How can i fix this ?

I use Moodle 2.9.1+ (Build: 20150828)

Thanks

Bas

 

Average of ratings: -
In reply to Bas van Kollenburg

Re: Tabel "user_password_history" does not exist

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Bas,
how did you install your Moodle instance?

That table is there since some months, when 2.9 has been released: MDL-47830 and https://docs.moodle.org/29/en/Site_policies#Password_rotation_limit.

To re-create it, you can go to Site administration > Development > XMLDB editor:

  1. Click Load lib/db
  2. Then Edit lib/db
  3. Click on the table named user_password_history
  4. Click on [View SQL code], e.g.:
    CREATE TABLE mdl_user_password_history (
        id BIGINT(10) NOT NULL auto_increment,
        userid BIGINT(10) NOT NULL,
        hash VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
        timecreated BIGINT(10) NOT NULL,
    CONSTRAINT  PRIMARY KEY (id)
    , KEY mdl_userpasshist_use2_ix (userid)
    )
     ENGINE = InnoDB
     DEFAULT CHARACTER SET utf8
     DEFAULT COLLATE = utf8_general_ci
     COMMENT='A rotating log of hashes of previously used passwords for each user.';

HTH,
Matteo

Average of ratings: Useful (1)
In reply to Bas van Kollenburg

Re: Tabel "user_password_history" does not exist

by William Lu -
Picture of Particularly helpful Moodlers

Moving to 'General help forum'