chore(merge): merge develop into main for 9.4.0 cycle

Brings 53 develop commits (i18n, Diva, campaign, guild invites, save
transfer, return/rookie guilds, hunting tournament, JSON quest/scenario
loaders, Ghidra-derived user binary parsing, and misc fixes) onto main
now that 9.3.2 has been tagged and released.

Resolves two overlap zones:

1. Migration number collision. Main shipped 0010_fix_zero_rasta_id and
   0011_fix_stale_boost_time in 9.3.2; develop had independently
   numbered 0010_campaign..0015_tournament. The migration runner keys
   applied versions by integer, so coexisting files with the same
   numeric prefix would silently skip each other. Develop's files have
   been renumbered to 0016..0021, leaving main's 0010/0011 intact. A
   schema_version rename script is required on any server that had
   already applied the old develop numbers (only frontier.mogapedia.fr
   at the time of this merge).

2. CHANGELOG.md. Develop's in-progress feature entries move into
   [Unreleased] with updated migration references; the [9.3.2] section
   is preserved verbatim.

main.go version string bumped to 9.4.0-dev to mark the new cycle.

Full test suite (go test -race ./...) passes.
This commit is contained in:
Houmgaor
2026-04-06 19:06:09 +02:00
105 changed files with 16933 additions and 769 deletions

View File

@@ -0,0 +1,66 @@
-- Campaign / Event Tent system tables.
CREATE TABLE IF NOT EXISTS public.campaigns (
id INTEGER PRIMARY KEY,
min_hr INTEGER,
max_hr INTEGER,
min_sr INTEGER,
max_sr INTEGER,
min_gr INTEGER,
max_gr INTEGER,
reward_type INTEGER,
stamps INTEGER,
receive_type INTEGER,
background_id INTEGER,
start_time TIMESTAMP WITH TIME ZONE,
end_time TIMESTAMP WITH TIME ZONE,
title TEXT,
reward TEXT,
link TEXT,
code_prefix TEXT
);
CREATE TABLE IF NOT EXISTS public.campaign_categories (
id SERIAL PRIMARY KEY,
type INTEGER,
title TEXT,
description TEXT
);
CREATE TABLE IF NOT EXISTS public.campaign_category_links (
id SERIAL PRIMARY KEY,
campaign_id INTEGER REFERENCES public.campaigns(id) ON DELETE CASCADE,
category_id INTEGER REFERENCES public.campaign_categories(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS public.campaign_rewards (
id SERIAL PRIMARY KEY,
campaign_id INTEGER REFERENCES public.campaigns(id) ON DELETE CASCADE,
item_type INTEGER,
quantity INTEGER,
item_id INTEGER
);
CREATE TABLE IF NOT EXISTS public.campaign_rewards_claimed (
character_id INTEGER REFERENCES public.characters(id) ON DELETE CASCADE,
reward_id INTEGER REFERENCES public.campaign_rewards(id) ON DELETE CASCADE,
PRIMARY KEY (character_id, reward_id)
);
CREATE TABLE IF NOT EXISTS public.campaign_state (
id SERIAL PRIMARY KEY,
campaign_id INTEGER REFERENCES public.campaigns(id) ON DELETE CASCADE,
character_id INTEGER REFERENCES public.characters(id) ON DELETE CASCADE,
code TEXT
);
CREATE TABLE IF NOT EXISTS public.campaign_codes (
code TEXT PRIMARY KEY,
campaign_id INTEGER REFERENCES public.campaigns(id) ON DELETE CASCADE,
multi BOOLEAN NOT NULL DEFAULT FALSE
);
CREATE TABLE IF NOT EXISTS public.campaign_quest (
campaign_id INTEGER REFERENCES public.campaigns(id) ON DELETE CASCADE,
character_id INTEGER REFERENCES public.characters(id) ON DELETE CASCADE,
PRIMARY KEY (campaign_id, character_id)
);