Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9257

duplicate key violates unique constraint "posts_pkey"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 3.0.x
    • phpBB 2.0 convertor
    • None
    • PHP Environment:
      Database:

      The two databases are running on PostgreSQL 7.4. Database of phpBB2 is in LATIN1 while database of phpBB3 is in UNICODE.

      When converting a forum with 7873 messages, I get 1126 errors like this one :

      Error while processing INSERT query
      » SQL:INSERT INTO posts (post_id, topic_id, forum_id, poster_id, icon_id, poster_ip, post_time, enable_bbcode, enable_smilies, enable_sig, enable_magic_url, post_username, post_subject, post_attachment, post_edit_time, post_edit_count, post_edit_reason, post_edit_user, bbcode_uid, post_text, bbcode_bitfield, post_checksum) VALUES ('1639', '62', '9', '8', 0, '193.52.32.157', '1133805480', '1', '1', '1', 1, '', '', 0, 0, '0', '', '8', 'c30fe', 'certains considérerait la chose comme de l''art !! d''où droit d''auteur !!', 'EA==', '')
       
      Array ( [message] => ERROR: duplicate key violates unique constraint "posts_pkey" [code] => )

      After conversion ends, statistics say I only have 6748 messages on my new forum (so I've lost about 1126 messages).

      But when adding number of posts of all the categories, I get 7881.

      When analysing table phpbb_post, there is a difference of 1126 entries between phpBB2 and phpBB3 forums.

      phpBB2 :

      • number of messages (bottom of the page) : 7873
      • number of messages (addition of categories' number) : 7873
      • number of rows in phpbb_post : 7874

      phpBB3 :

      • number of messages (bottom of the page) : 6748
      • number of messages (addition of categories' number) : 7881
      • number of rows in phpbb_post : 6748

            Kellanved Kellanved [X] (Inactive)
            ondex ondex
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: