Skip to content

Updating Versions

Software Magico edited this page Oct 20, 2024 · 10 revisions

From 2.14.1 to 2.14.2

Guidance for upgrading from version 2.14.1 to 2.14.2:

Changes have been made to the database encryption, resulting in modifications to certain column types in the database structure. If you are currently using a version older than 2.14.2, make sure to update the following columns:

Database

Table 'duels'

startedAt has type timestamp.

finishedAt has type Date.

Table 'fights'

shiaijo is now a number.

level is now a number.

Table 'groups'

shiaijo is now a number.

number_of_winners is now a number.

Table 'tournament_groups_links'

winner_index is now a number.

Table 'tournaments'

locked is now a boolean.

All Tables

createdAt has type timestamp.

updatedAt has type timestamp.

An example of a script for migrating from 2.14.1 to 2.14.2 on a PostgreSQL database can be found here.

Users

The login process for users has been updated, requiring new data. To update the system, all users in the authenticated_users table need to be removed, along with their associated roles in the authenticated_user_roles table. Users can then be re-added using the frontend following the instructions provided at this link: First Access Instructions.

From 2.14.X to 2.15.0

New properties for a tournament must be included:

alter table public.tournament_extra_properties
    drop constraint tournament_extra_properties_property_key_check;

alter table public.tournament_extra_properties
    add constraint tournament_extra_properties_property_key_check
        check ((property_key)::text = ANY
               (ARRAY [('MAXIMIZE_FIGHTS'::character varying)::text, ('AVOID_DUPLICATES'::character varying)::text, ('KING_INDEX'::character varying)::text, ('KING_DRAW_RESOLUTION'::character varying)::text, ('DIPLOMA_NAME_HEIGHT'::character varying)::text, ('NUMBER_OF_WINNERS'::character varying)::text, ('LEAGUE_FIGHTS_ORDER_GENERATION'::character varying)::text, ('ODD_FIGHTS_RESOLVED_ASAP'::character varying)::text]));

From version 2.15.X to 2.16.0

Add the constraints needed for the new tournament types:

alter table public.tournaments
    drop constraint tournaments_tournament_type_check;

alter table public.tournaments
    add constraint tournaments_tournament_type_check
        check ((tournament_type)::text = ANY
               (ARRAY [('CHAMPIONSHIP'::character varying)::text, ('TREE'::character varying)::text, ('LEAGUE'::character varying)::text, ('LOOP'::character varying)::text, ('CUSTOM_CHAMPIONSHIP'::character varying)::text, ('KING_OF_THE_MOUNTAIN'::character varying)::text, ('CUSTOMIZED'::character varying)::text, ('BUBBLE_SORT'::character varying)::text]));

From version 2.16.0 to 2.17.0

Add the constraints needed for the new tournament types:

alter table public.tournaments
    drop constraint tournaments_tournament_type_check;

alter table public.tournaments
    add constraint tournaments_tournament_type_check
        check ((tournament_type)::text = ANY
               (ARRAY [('CHAMPIONSHIP'::character varying)::text, ('TREE'::character varying)::text, ('LEAGUE'::character varying)::text, ('LOOP'::character varying)::text, ('CUSTOM_CHAMPIONSHIP'::character varying)::text, ('KING_OF_THE_MOUNTAIN'::character varying)::text, ('CUSTOMIZED'::character varying)::text, ('SENBATSU'::character varying)::text, ('BUBBLE_SORT'::character varying)::text]));
               
               
alter table public.tournament_extra_properties
    drop constraint tournament_extra_properties_property_key_check;

alter table public.tournament_extra_properties
    add constraint tournament_extra_properties_property_key_check
        check ((property_key)::text = ANY
               (ARRAY [('MAXIMIZE_FIGHTS'::character varying)::text, ('AVOID_DUPLICATES'::character varying)::text, ('KING_INDEX'::character varying)::text, ('KING_DRAW_RESOLUTION'::character varying)::text, ('DIPLOMA_NAME_HEIGHT'::character varying)::text, ('NUMBER_OF_WINNERS'::character varying)::text, ('LEAGUE_FIGHTS_ORDER_GENERATION'::character varying)::text, ('ODD_FIGHTS_RESOLVED_ASAP'::character varying)::text, ('SENBATSU_CHALLENGE_DISTANCE'::character varying)::text]));

Clone this wiki locally