db migration error

Issue #580 resolved
riverajo created an issue

Attempting to migrate the database. Current Rhodecode Version is 1.3.2, updateing to version 1.4.2. I think the current database version is 5 and it's trying to move to version 7. It gets through the schema upgrade, then says perfroming upgrade step 6. Re-checking permission I get "sqlalchemy.exc.IntegrityError: (IntegrityError) duplicate key value violates unique constraint "permissions_pkey"" DETAIL: Key (permission_id)=(11) already exists. 'INSERT INTO permissions (permission_name, permission_longname) VALUES (%(permission_name)s, %(permission_longname)s) RETURNING permissions.permission_id' {'permission_longname': 'hg.fork.none', 'permission_name': 'hg.fork.none'}

running on postgres version 9.1.5

Comments (2)

  1. riverajo reporter

    Figured it out, after the last migration I had to do a restore. The sequence number 'permissions_permission_id_seq' had been reset to 11. It was so long ago I had forgoten I did that.

  2. Log in to comment