Trinitycore: re-id game_tele

Created on 25 Mar 2021  路  10Comments  路  Source: TrinityCore/TrinityCore

Description:

to be sure ids doesn't adds tele "holes" on db i want to re-id
40000-49999 for cata locations,
50000-59999 for mop,
60000-69999 for wod,
70000-79999,
80000-89999,
90000-99999

some may think, why this is needed with auto increment?
easy, if we have 4.3.4 game_tele ie with id 1433 and we add a 3.3.5a game tele with id 1433, when the commit adding 3.3.5a game_tele 4.3.4 game tele will be deleted.

Branch(es):

master / 4.3.4

TC rev. hash/commit:

abaeb12 N/R

Operating system:

N/R

Branch-4.3.4 Branch-master Good First Issue 馃弳 Priority-FutureFeatureRequest

All 10 comments

Why we do even want an id? let's just drop it and use name the column as PK.

Why we do even want an id? let's just drop it and use name the column as PK.

Fair point, seeing that the .tele location name can sometimes be written in more than one way (a few examples exist). Not sure if that is unique enough, but it should be enough to sort the rows and to know that it is unique enough for the table content.

because it's more hard to find if some locations are missing if you remove ids.

Fair point, seeing that the .tele location name can sometimes be written in more than one way (a few examples exist). Not sure if that is unique enough, but it should be enough to sort the rows and to know that it is unique enough for the table content.

What do you mean not unique enough?
There was an idea to add a expansion/wowversion column (I think it was @mdX7 and @Aokromes ideas actually)

because it's more hard to find if some locations are missing if you remove ids.
Missing how? can you give an example? Specifically:

  1. Locations missing from where? retail vs tc, master vs 335, or other ?
  2. A specific query you would use with ids to check for missing locations, and against which db ?

What do you mean not unique enough?

Sorry, I wasn't thinking about that detail deeply enough when I wrote that sentence, I was being precautious. My apologies. Nothing to worry about.

What do you mean not unique enough?

Sorry, I wasn't thinking about that detail deeply enough when I wrote that sentence, I was being precautious. My apologies. Nothing to worry about.

No worries, better safe than sorry :)

forget about it.

Just for the record, I think it's a good issue and we shouldn't use IDs in that table.

while I'm still not sure why, @Aokromes doesn't seem to like the idea so I'm gonna let it go.

@matanshukry : TC (and in particular Aokromes) have been using specific sets of ID series divided into groups depending on type and expansion, using separate high number groups for custom IDs (GUIDs, temp creature IDs and so on). For those of us who have been using that form of categorization, it is a bit difficult to let go of it without a good reason. I have become used to that idea myself, so this scenario surprised me a bit, opened my eyes to the idea that this specific table could actually work without any fixed numbering.

This reminds me of when I started using Gmail in 2004, accompanied by the slogan "Search, don't sort", which in some way could describe the game_tele table.

@illfated nice, awesome explanation and example, and lesson in general! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cbcs picture cbcs  路  3Comments

besplash picture besplash  路  3Comments

funjoker picture funjoker  路  3Comments

chilito picture chilito  路  3Comments

Lopfest picture Lopfest  路  3Comments