mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
Added db init script. Combined all schemas under schemas. Persisted
updates and init
This commit is contained in:
26
schemas/patch-schema/09-fix-guild-treasure.sql
Normal file
26
schemas/patch-schema/09-fix-guild-treasure.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE IF EXISTS public.guild_hunts DROP COLUMN IF EXISTS hunters;
|
||||
|
||||
ALTER TABLE IF EXISTS public.guild_characters
|
||||
ADD COLUMN treasure_hunt integer;
|
||||
|
||||
ALTER TABLE IF EXISTS public.guild_hunts
|
||||
ADD COLUMN start timestamp with time zone NOT NULL DEFAULT now();
|
||||
|
||||
UPDATE guild_hunts SET start=to_timestamp(return);
|
||||
|
||||
ALTER TABLE IF EXISTS public.guild_hunts DROP COLUMN IF EXISTS "return";
|
||||
|
||||
ALTER TABLE IF EXISTS public.guild_hunts
|
||||
RENAME claimed TO collected;
|
||||
|
||||
CREATE TABLE public.guild_hunts_claimed
|
||||
(
|
||||
hunt_id integer NOT NULL,
|
||||
character_id integer NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE IF EXISTS public.guild_hunts DROP COLUMN IF EXISTS treasure;
|
||||
|
||||
END;
|
||||
Reference in New Issue
Block a user