{"id":19134551,"url":"https://github.com/azerothcore/tool-tc-migration","last_synced_at":"2025-05-06T19:28:36.399Z","repository":{"id":140478555,"uuid":"78538446","full_name":"azerothcore/tool-tc-migration","owner":"azerothcore","description":" [EXPERIMENTAL] Some tools to migrate characters database from TrinityCore to AzerothCore.","archived":false,"fork":false,"pushed_at":"2023-09-03T01:57:08.000Z","size":155,"stargazers_count":16,"open_issues_count":4,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-30T01:37:06.747Z","etag":null,"topics":["azerothcore-tools"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azerothcore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-01-10T13:59:46.000Z","updated_at":"2025-03-15T08:40:06.000Z","dependencies_parsed_at":"2023-06-28T09:57:19.739Z","dependency_job_id":null,"html_url":"https://github.com/azerothcore/tool-tc-migration","commit_stats":{"total_commits":26,"total_committers":5,"mean_commits":5.2,"dds":0.5769230769230769,"last_synced_commit":"8c3628dce82ef2dc98f0fc7d7bf7f36929a82851"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azerothcore%2Ftool-tc-migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azerothcore%2Ftool-tc-migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azerothcore%2Ftool-tc-migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azerothcore%2Ftool-tc-migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azerothcore","download_url":"https://codeload.github.com/azerothcore/tool-tc-migration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252752374,"owners_count":21798788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azerothcore-tools"],"created_at":"2024-11-09T06:27:06.901Z","updated_at":"2025-05-06T19:28:36.374Z","avatar_url":"https://github.com/azerothcore.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tool-tc-migration\n\n**[EXPERIMENTAL]**\n\nSome tools to migrate the `characters` and `auth` database from TrinityCore to AzerothCore.\n\n**IMPORTANT**: backup your database **before** using this tool.\n\nWe cannot guarantee that the operation succeeds without side effects.\n\n## Instructions\nIn order to take benefit of the scripts we highly recomand to use Unix systems to execute \nthe following script (Linux / Mac / Linux subsystem on windows etc)\n\n### Secure your server data\nIn order to avoid damaging your production server it's highly recomanded to save your data locally,\nand work on your data locally.\n\n### Using migration script on unix systems\n\nCreate an env file like  following:\n\n**env.sh**\n```bash\n# TrinityCore Characters DBs separated by colon symbol (:)\nexport CHARACTERS_DBS=\"characters:characters_test\"\n\n# TrinityCore Auth DB\nexport AUTH_DB=auth\n\n# DB user / password\nexport DB_USER=trinity\nexport DB_PASS=trinity\n\n# Hostname\nexport DB_HOSTNAME=arthas\nexport DB_PORT=3306\n\n# Location of your dump files (sql) for characters DBs separated by colon symbol (:) you should use absolute path\nexport DUMP_CHARACTERS_FILES_PATH=\"/home/johndoe/dumps/characters_mysql_22_10_29_00_30.sql:/home/johndoe/dumps/characters_test_mysql_22_10_29_00_30.sql\"\n\n# Location of your dump file for auth DB\nexport DUMP_AUTH_FILE_PATH=~/dumps/auth_mysql_22_10_29_00_30.sql\n```\n\nUse it as source and execute the migration:\n```bash\nsource env.sh\n./migration.sh -a\n```\n\nYou have several option for the migration:\n- `-a`: restore and migrate\n- `-r`: restore only\n- `-m`: migrate only\n\n### Restore on windows\nOn Windows the restore have to be done manually after that, you have to execute the migration scripts\non each DB manually.\n\nFile 1_xxx.sql to 5_xxx.sql needs to be executed **in numeral order** on characters DBs. \n6.xxx and 7.xxx have to be executed on auth DB. \n\n### Check data integrity\nTo check the data integrity I highly recomand to create an AzerothCore server with his own dbs:\n\nEx in my case:\n- `characters`: DB for TrinityCore characters data to migrate\n- `auth`: DB for TrinityCore auth data to migrate\n- `acore_characters`: Clean AzerothCore characters table\n- `acore_auth`: Clean AzerothCore auth table\n\nThe following queries will help you to compare the DBs of a same kind:\n\n#### Check what is missing in your migrated `auth` db\n```sql\n-- AUTH =\u003e columns and table IN AzerothCore and missing in TrinityCore\nSELECT col_az.TABLE_NAME, col_az.COLUMN_NAME, col_tc.TABLE_NAME, col_tc.COLUMN_NAME\nFROM information_schema.columns col_az\nLEFT JOIN information_schema.columns col_tc on col_az.TABLE_NAME = col_tc.TABLE_NAME and col_az.COLUMN_NAME = col_tc.COLUMN_NAME\nWHERE col_az.table_schema = 'acore_auth'\nAND col_az.table_name = 'auth' AND col_tc.COLUMN_NAME is null;\n```\nIf this query returns results it means that some table or columns are missing in your auth table. You can\nuse `git log -S [my table name]` to find when this table have been created / modified.\n\n#### Check what you should remove in your migrated `auth` db\n```sql\n-- AUTH =\u003e columns and table IN TrinityCore not in AzerothCore\nselect col_tc.TABLE_NAME, col_tc.COLUMN_NAME FROM information_schema.columns col_tc\nLEFT JOIN information_schema.columns col_az on\n    col_az.TABLE_NAME = col_tc.TABLE_NAME and\n    col_az.COLUMN_NAME = col_tc.COLUMN_NAME and\n    col_az.TABLE_SCHEMA = 'acore_auth'\nWHERE col_tc.TABLE_SCHEMA = 'auth' and col_az.COLUMN_NAME is null;\n```\nThe columns / table returned in this query have to be removed in your migrated db.\n\n#### Check what is missing in your migrated `characters` db\n\n```sql\n-- AUTH =\u003e columns and table IN AzerothCore and missing in TrinityCore\nSELECT col_az.TABLE_NAME, col_az.COLUMN_NAME, col_tc.TABLE_NAME, col_tc.COLUMN_NAME\nFROM information_schema.columns col_az\nLEFT JOIN information_schema.columns col_tc on col_az.TABLE_NAME = col_tc.TABLE_NAME and col_az.COLUMN_NAME = col_tc.COLUMN_NAME\nWHERE col_az.table_schema = 'acore_characters'\nAND col_az.table_name = 'characters' AND col_tc.COLUMN_NAME is null;\n```\n\n#### Check what you should remove in your migrated `characters` db\n```sql\n-- AUTH =\u003e columns and table IN TrinityCore not in AzerothCore\nselect col_tc.TABLE_NAME, col_tc.COLUMN_NAME FROM information_schema.columns col_tc\nLEFT JOIN information_schema.columns col_az on\n    col_az.TABLE_NAME = col_tc.TABLE_NAME and\n    col_az.COLUMN_NAME = col_tc.COLUMN_NAME and\n    col_az.TABLE_SCHEMA = 'acore_characters'\nWHERE col_tc.TABLE_SCHEMA = 'characters' and col_az.COLUMN_NAME is null;\n```\nThe columns / table returned in this query have to be removed in your migrated db.\n**The current script dosn't remove migration tables those which starts with `__`**\n\n**I hope that everything goes well, good fortune my friend.**\n\n\n## OLD Instructions\n\nhttp://www.azerothcore.org/wiki/TrinityCore-to-AzerothCore-characters-migration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazerothcore%2Ftool-tc-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazerothcore%2Ftool-tc-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazerothcore%2Ftool-tc-migration/lists"}