Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] This is more noticiable if you move between branches or specially if you're testing PRs in the sense

[DiscordArchive] This is more noticiable if you move between branches or specially if you're testing PRs in the sense

[DiscordArchive] This is more noticiable if you move between branches or specially if you're testing PRs in the sense

rektbyfaith
Administrator
0
10-12-2025, 01:26 PM
#1
Archived author: Ryan Turner • Posted: 2025-10-12T13:26:29.884000+00:00
Original source

This is more noticiable if you move between branches or specially if you're testing PRs in the sense some of them are older than you master, so when testing it re-runs all the SQL again.

The problem some of that SQL are 1 time run type of things.

e.g
```sql
ALTER TABLE `petition` ADD COLUMN `petition_id` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `petitionguid`;
```

This only can be run once, and if you're unlucky to come to this (specially when testing PRs) can be an easy or a hassle to move foward without an error.

Easiest, drop the database (not feasible, can be an anooyance or re-setup everything e.g for auth).

Deleting the file(s), depending on how many files it is, cab seconds or minutes if you doing manually.

Reverting the chanes and letting SQL re-run properly, too much effort to it just so the SQL runs properly.

The only example I can give was for CC module we needed a way to update table similiar ot the command "IF NOT EXISTS" which doesn't exist for already existing tables.

So what we did some of crude way to use procedure, but this may make reading the core horrible.

Example: https://github.com/chromiecraft/mod-chro...sql#L3-L12

If the column `CategoryType` exists rename it to ParentCategory
otherwise just skip / ignore it.

Is possible to implement something in AC for this or the only way to achieve this (until MySQL provides that functinality) is to do the crude way as abovE?
rektbyfaith
10-12-2025, 01:26 PM #1

Archived author: Ryan Turner • Posted: 2025-10-12T13:26:29.884000+00:00
Original source

This is more noticiable if you move between branches or specially if you're testing PRs in the sense some of them are older than you master, so when testing it re-runs all the SQL again.

The problem some of that SQL are 1 time run type of things.

e.g
```sql
ALTER TABLE `petition` ADD COLUMN `petition_id` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `petitionguid`;
```

This only can be run once, and if you're unlucky to come to this (specially when testing PRs) can be an easy or a hassle to move foward without an error.

Easiest, drop the database (not feasible, can be an anooyance or re-setup everything e.g for auth).

Deleting the file(s), depending on how many files it is, cab seconds or minutes if you doing manually.

Reverting the chanes and letting SQL re-run properly, too much effort to it just so the SQL runs properly.

The only example I can give was for CC module we needed a way to update table similiar ot the command "IF NOT EXISTS" which doesn't exist for already existing tables.

So what we did some of crude way to use procedure, but this may make reading the core horrible.

Example: https://github.com/chromiecraft/mod-chro...sql#L3-L12

If the column `CategoryType` exists rename it to ParentCategory
otherwise just skip / ignore it.

Is possible to implement something in AC for this or the only way to achieve this (until MySQL provides that functinality) is to do the crude way as abovE?

rektbyfaith
Administrator
0
10-12-2025, 01:43 PM
#2
Archived author: Nyeriah • Posted: 2025-10-12T13:43:20.254000+00:00
Original source

the updater hashes files the first time they are ran and only runs them again if the file hash changes, so this shouldn't have been an issue unless that part broke or there is an issue with it
rektbyfaith
10-12-2025, 01:43 PM #2

Archived author: Nyeriah • Posted: 2025-10-12T13:43:20.254000+00:00
Original source

the updater hashes files the first time they are ran and only runs them again if the file hash changes, so this shouldn't have been an issue unless that part broke or there is an issue with it

rektbyfaith
Administrator
0
10-12-2025, 01:45 PM
#3
Archived author: Nyeriah • Posted: 2025-10-12T13:45:04.518000+00:00
Original source

In the module example, people would keep inadvertently changing files
rektbyfaith
10-12-2025, 01:45 PM #3

Archived author: Nyeriah • Posted: 2025-10-12T13:45:04.518000+00:00
Original source

In the module example, people would keep inadvertently changing files

rektbyfaith
Administrator
0
10-12-2025, 01:47 PM
#4
Archived author: Ryan Turner • Posted: 2025-10-12T13:47:06.059000+00:00
Original source

I used the module as a refernece a arond that issue, because if you test a PR that doesnt have the changes, but you already have ran those changes (your master), and you update that PR to updated, you will get errors for those SQLS that only can be ran 1 time.

E.g addition of Flags in accocunt, and the petitionID fix for the guild charts
rektbyfaith
10-12-2025, 01:47 PM #4

Archived author: Ryan Turner • Posted: 2025-10-12T13:47:06.059000+00:00
Original source

I used the module as a refernece a arond that issue, because if you test a PR that doesnt have the changes, but you already have ran those changes (your master), and you update that PR to updated, you will get errors for those SQLS that only can be ran 1 time.

E.g addition of Flags in accocunt, and the petitionID fix for the guild charts

rektbyfaith
Administrator
0
10-12-2025, 04:28 PM
#5
Archived author: sudlud • Posted: 2025-10-12T16:28:21.318000+00:00
Original source

I would also say that by design this should not be an issue, unless something is broken
rektbyfaith
10-12-2025, 04:28 PM #5

Archived author: sudlud • Posted: 2025-10-12T16:28:21.318000+00:00
Original source

I would also say that by design this should not be an issue, unless something is broken

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)