Not Solved MyBB Merge Still requiring php7.4?
#11
Not Solved
There is no real "purpose" and it may be possible to migrate using the same keys. But as a general rule there is no reason to keep the same, and doing so is more consuming (development work).

Assigning new primary keys and storing (linking) the old keys in a secondary (temporal) column is more practical.

Sites usually don't rely on the primary key for post ordering, instead using something else like a dateline. So as long as the order of posts is kept, keeping the primary keys is superfluous and even prone to more errors.

I suppose the only reason to worry about the primary keys would be for redirecting purposes. But since the migration system does keep the legacy keys stored in a secondary column, it may be easier to just code a redirect script for links that land in the old urls.

Regards.
Send me a DM or PM if you want to sponsor any update or addition to my plugins.

[Image: signature.png]

Discord omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#12
Not Solved
(2026-01-05, 11:17 PM)Omar G. Wrote: Sites usually don't rely on the primary key for post ordering, instead using something else like a dateline. So as long as the order of posts is kept, ....

Regards.


The problem with migrator was shuffling the post numbers.
Why cant post numbers be kept in same order as in SMF while migrating to MyBB.
Reply
#13
Not Solved
Well, it is called "Merge System" for a reason. It supports merging multiple forums so it makes sense to assign new IDs instead of trying to resuse existing IDs that may conflict.
[Image: banner.png]
Reply
#14
Not Solved
How do they conflict if old or new pid assigned according to dateline ?
Merger jumbled up post numbers..
A post made 5 years back gets 3000+ pid, while a post made last year gets 500+ pid
Reply
#15
Not Solved
(2026-01-06, 04:01 PM)DVK Wrote: How do they conflict  if old or new pid assigned according to dateline ?
Merger jumbled up post numbers..
A post made 5 years back gets 3000+ pid, while a post made last year gets 500+ pid

If you have 2 forums to merge into MyBB, 2 posts may have the same ID.

Keeping the old IDs may work for merging a single forum, but that is not the premise of the Merge System.

(2026-01-06, 04:01 PM)DVK Wrote: A post made 5 years back gets 3000+ pid, while a post made last year gets 500+ pid

(2026-01-03, 04:35 PM)Omar G. Wrote: When you migrate to MyBB from any script, the primary keys are reset, so what you describe is of no importance.

Regards.
Send me a DM or PM if you want to sponsor any update or addition to my plugins.

[Image: signature.png]

Discord omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#16
Not Solved
I feed Le Chat Mistral with the contents of this thread and managed to get it to generate a concise response:

Quote:Why Primary Keys Are Not Important for Content Display or Ordering

Primary keys are internal database identifiers, not meant for user-facing logic. Their purpose is to uniquely identify records and ensure data integrity, not to determine how content is displayed or ordered.

- Content ordering is handled by separate fields, such as timestamps (dateline, post_date) or explicit order columns. For example, forum posts are ordered by their creation date, not by their primary key. This ensures posts appear in the correct sequence regardless of their internal ID [1][2].

- Resetting primary keys during migration is standard practice to avoid conflicts, especially when merging multiple data sources. It simplifies the process and prevents errors from duplicate or overlapping IDs. The actual value of the primary key is irrelevant as long as relationships and order are preserved [3].

- Legacy IDs can be preserved in secondary columns if needed (e.g., for redirects), but this does not affect how content is displayed. The visual and functional order of posts is maintained by querying the correct fields, not by relying on primary keys [4].

- Performance and scalability are improved by using auto-incremented or system-generated primary keys, rather than meaningful or sequential IDs. This avoids issues with data entry errors, collisions, or gaps in sequences [2].

In summary: Primary keys are a database implementation detail. What matters for users is the logical order and integrity of the content, not the internal IDs.

Sources:

Hope this helps.

Regards.
Send me a DM or PM if you want to sponsor any update or addition to my plugins.

[Image: signature.png]

Discord omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#17
Not Solved
Quote:If you have 2 forums to merge into MyBB, 2 posts may have the same ID.

Keeping the old IDs may work for merging a single forum,

Okay i get this but if i have to convert (not actually merge) 1 forum (like SMF) into myBB, then what is the best way (without changing post IDs)
Reply
#18
Not Solved
Based on your questions and replies, the best suggestion would be to hire someone to do so for you.

Regards.
Send me a DM or PM if you want to sponsor any update or addition to my plugins.

[Image: signature.png]

Discord omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)