From 97dccafc05ccd505bc3724d4b5eada20879ddc50 Mon Sep 17 00:00:00 2001 From: Teddy Middleton-Smith Date: Sun, 15 Mar 2026 19:52:21 +0000 Subject: [PATCH] Fix: Login. --- __init__.py | 4 +- app.py | 4 +- business_objects/__init__.py | 4 +- business_objects/api.py | 4 +- business_objects/base.py | 4 +- business_objects/db_base.py | 4 +- business_objects/sql_error.py | 13 +- business_objects/tcg/mtg_deck.py | 48 +- .../tcg/mtg_deck_commander_bracket.py | 31 +- business_objects/tcg/mtg_game.py | 19 +- business_objects/tcg/mtg_game_player.py | 19 +- business_objects/tcg/mtg_game_round.py | 19 +- .../tcg/mtg_game_round_player_damage.py | 19 +- .../tcg/mtg_game_session_member.py | 19 +- business_objects/tcg/statistic.py | 21 +- business_objects/tcg/user.py | 34 +- business_objects/tcg/user_relationship.py | 19 +- config.py | 4 +- controllers/legal/legal.py | 4 +- controllers/tcg/mtg_game.py | 6 +- controllers/user/user.py | 4 +- datastores/__init__.py | 4 +- datastores/datastore_base.py | 4 +- datastores/datastore_mtg.py | 10 +- datastores/datastore_user.py | 4 +- forms/base.py | 4 +- forms/tcg/game.py | 25 +- forms/tcg/user.py | 4 +- helpers/__init__.py | 4 +- helpers/helper_app.py | 4 +- helpers/helper_db_sql.py | 4 +- lib/__init__.py | 4 +- models/__init__.py | 4 +- models/model_view_accessibility_report.py | 4 +- models/model_view_accessibility_statement.py | 4 +- models/model_view_base.py | 4 +- models/model_view_license.py | 4 +- models/model_view_mtg_base.py | 4 +- models/model_view_mtg_decks.py | 8 +- models/model_view_mtg_game.py | 6 +- models/model_view_mtg_games.py | 4 +- models/model_view_mtg_home.py | 4 +- models/model_view_privacy_policy.py | 4 +- models/model_view_retention_schedule.py | 4 +- models/model_view_user.py | 4 +- run.py | 4 +- .../11202_tbl_TCG_MTG_Deck_Temp.sql | 15 + static/PostgreSQL/30504_tri_TCG_User.sql | 14 +- .../30508_tri_TCG_User_Relationship.sql | 10 +- static/PostgreSQL/30510_tri_Error_Type.sql | 6 +- static/PostgreSQL/30514_tri_Error.sql | 10 +- static/PostgreSQL/31001_tri_TCG_Condition.sql | 16 +- .../PostgreSQL/31101_tri_TCG_MTG_Finish.sql | 10 +- static/PostgreSQL/31130_tri_TCG_MTG_Card.sql | 224 ++++---- .../31150_tri_TCG_MTG_Inventory.sql | 66 +-- ...196_tri_TCG_MTG_Deck_Commander_Bracket.sql | 8 +- static/PostgreSQL/31200_tri_TCG_MTG_Deck.sql | 8 +- .../31204_tri_TCG_MTG_Deck_Inventory_Link.sql | 8 +- static/PostgreSQL/31208_tri_TCG_MTG_Game.sql | 18 +- .../31212_tri_TCG_MTG_Game_Player.sql | 14 +- .../31216_tri_TCG_MTG_Game_Round.sql | 8 +- ...0_tri_TCG_MTG_Game_Round_Player_Damage.sql | 16 +- .../31224_tri_TCG_MTG_Game_Session_Member.sql | 6 +- static/PostgreSQL/31300_tri_TCG_Statistic.sql | 16 +- .../PostgreSQL/70504_fn_TCG_User_Get_Many.sql | 18 +- ...0508_fn_TCG_User_Relationship_Get_Many.sql | 43 +- ...G_Deck_Commander_Bracket_Get_Many copy.sql | 15 +- .../71200_fn_TCG_MTG_Deck_Get_Many.sql | 137 +++-- .../71201_usp_TCG_MTG_Deck_Save.sql | 511 ++++++++++++++++++ .../71208_fn_TCG_MTG_Game_Get_Many.sql | 69 ++- .../71212_fn_TCG_MTG_Game_Player_Get_Many.sql | 98 +++- .../71216_fn_TCG_MTG_Game_Round_Get_Many.sql | 81 ++- ..._MTG_Game_Round_Player_Damage_Get_Many.sql | 56 +- ...n_TCG_MTG_Game_Get_Many_Session_Member.sql | 39 +- .../71300_fn_TCG_Statistic_Get_Many.sql | 17 +- .../deprecated/31101_tri_TCG_MTG_Rarity.sql | 10 +- ...technology-systems-limited-evaluation.json | 2 +- ...rch-technology-systems-limited-report.html | 2 +- templates/pages/legal/_license.html | 2 +- .../pages/legal/accessibility_report.html | 2 +- 80 files changed, 1475 insertions(+), 536 deletions(-) create mode 100644 static/PostgreSQL/11202_tbl_TCG_MTG_Deck_Temp.sql create mode 100644 static/PostgreSQL/71201_usp_TCG_MTG_Deck_Save.sql diff --git a/__init__.py b/__init__.py index c561f4a..4ee8c29 100644 --- a/__init__.py +++ b/__init__.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Backend Feature: Initialisation diff --git a/app.py b/app.py index 7eaec7a..af28406 100644 --- a/app.py +++ b/app.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: App General Feature: App diff --git a/business_objects/__init__.py b/business_objects/__init__.py index 0ed1a26..6fcbfbd 100644 --- a/business_objects/__init__.py +++ b/business_objects/__init__.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Module Initialisation Feature: Business Objects diff --git a/business_objects/api.py b/business_objects/api.py index 4f004b8..1f7014c 100644 --- a/business_objects/api.py +++ b/business_objects/api.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: Base Business Object diff --git a/business_objects/base.py b/business_objects/base.py index ce4fc12..4b52cbe 100644 --- a/business_objects/base.py +++ b/business_objects/base.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: Base Business Object diff --git a/business_objects/db_base.py b/business_objects/db_base.py index cb1899f..97460ea 100644 --- a/business_objects/db_base.py +++ b/business_objects/db_base.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: Database Base Business Objects diff --git a/business_objects/sql_error.py b/business_objects/sql_error.py index 8dc1162..3faeb58 100644 --- a/business_objects/sql_error.py +++ b/business_objects/sql_error.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: SQL Error Business Object @@ -23,6 +23,7 @@ from datetime import datetime, timedelta import locale from flask_sqlalchemy import SQLAlchemy from sqlalchemy import Uuid +from sqlalchemy.types import Integer from typing import ClassVar # db = SQLAlchemy() @@ -126,22 +127,22 @@ class Parameters_SQL_Error(Get_Many_Parameters_Base): @classmethod def get_default(cls, guid): return cls( - guid = guid + guid = guid ) @classmethod def from_json(cls, json): return cls( - guid = json.get('a_guid', None) + guid = json.get('a_guid', None) ) def to_json(self): return { - 'a_guid': self.guid + 'a_guid': self.guid } @staticmethod def get_type_hints(): return { - 'a_guid': Uuid + 'a_guid': Uuid } \ No newline at end of file diff --git a/business_objects/tcg/mtg_deck.py b/business_objects/tcg/mtg_deck.py index 849af69..6222e4a 100644 --- a/business_objects/tcg/mtg_deck.py +++ b/business_objects/tcg/mtg_deck.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: MTG Deck Business Object @@ -17,7 +17,7 @@ from helpers.helper_app import Helper_App # external from dataclasses import dataclass from typing import ClassVar -from sqlalchemy.types import Text, Boolean +from sqlalchemy.types import Text, Boolean, Integer class MTG_Deck(SQLAlchemy_ABC, Base): @@ -108,36 +108,40 @@ class MTG_Deck(SQLAlchemy_ABC, Base): class Parameters_MTG_Deck(Get_Many_Parameters_Base): + access_user_id: int get_all_deck: bool get_inactive_deck: bool deck_ids: str deck_names: str commander_bracket_ids: str include_commander_option: bool - created_by_user_ids: str get_all_game: bool get_inactive_game: bool game_ids: str - filter_by_game_session_not_player: bool + get_all_user: bool + get_inactive_user: bool + user_ids: str require_all_id_filters_met: bool require_any_id_filters_met: bool require_all_non_id_filters_met: bool require_any_non_id_filters_met: bool @classmethod - def get_default(cls, user_id): + def get_default(cls, user_id_session): return cls( - get_all_deck = False + access_user_id = user_id_session + , get_all_deck = False , get_inactive_deck = False , deck_ids = '' , deck_names = '' , commander_bracket_ids = '' , include_commander_option = True - , created_by_user_ids = str(user_id) - , get_all_game = False + , get_all_game = True , get_inactive_game = False , game_ids = '' - , filter_by_game_session_not_player = False + , get_all_user = True + , get_inactive_user = False + , user_ids = '' , require_all_id_filters_met = False , require_any_id_filters_met = True , require_all_non_id_filters_met = False @@ -147,17 +151,19 @@ class Parameters_MTG_Deck(Get_Many_Parameters_Base): @classmethod def from_json(cls, json): return cls( - get_all_deck = json.get('a_get_all_deck', False) + access_user_id = json.get('a_access_user_id', None) + , get_all_deck = json.get('a_get_all_deck', False) , get_inactive_deck = json.get('a_get_inactive_deck', False) , deck_ids = json.get('a_deck_ids', '') , deck_names = json.get('a_deck_names', '') , commander_bracket_ids = json.get('a_commander_bracket_ids', '') , include_commander_option = json.get('a_include_commander_option', True) - , created_by_user_ids = json.get('a_created_by_user_ids', '') , get_all_game = json.get('a_get_all_game', False) , get_inactive_game = json.get('a_get_inactive_game', False) , game_ids = json.get('a_game_ids', '') - , filter_by_game_session_not_player = json.get('a_filter_by_game_session_not_player', True) + , get_all_user = json.get('a_get_all_user', False) + , get_inactive_user = json.get('a_get_inactive_user', False) + , user_ids = json.get('a_user_ids', '') , require_all_id_filters_met = json.get('a_require_all_id_filters_met', True) , require_any_id_filters_met = json.get('a_require_any_id_filters_met', True) , require_all_non_id_filters_met = json.get('a_require_all_non_id_filters_met', False) @@ -166,17 +172,19 @@ class Parameters_MTG_Deck(Get_Many_Parameters_Base): def to_json(self): return { - 'a_get_all_deck': self.get_all_deck + 'a_access_user_id': self.access_user_id + , 'a_get_all_deck': self.get_all_deck , 'a_get_inactive_deck': self.get_inactive_deck , 'a_deck_ids': self.deck_ids , 'a_deck_names': self.deck_names , 'a_commander_bracket_ids': self.commander_bracket_ids , 'a_include_commander_option': self.include_commander_option - , 'a_created_by_user_ids': self.created_by_user_ids , 'a_get_all_game': self.get_all_game , 'a_get_inactive_game': self.get_inactive_game , 'a_game_ids': self.game_ids - , 'a_filter_by_game_session_not_player': self.filter_by_game_session_not_player + , 'a_get_all_user': self.get_all_user + , 'a_get_inactive_user': self.get_inactive_user + , 'a_user_ids': self.user_ids , 'a_require_all_id_filters_met': self.require_all_id_filters_met , 'a_require_any_id_filters_met': self.require_any_id_filters_met , 'a_require_all_non_id_filters_met': self.require_all_non_id_filters_met @@ -186,17 +194,19 @@ class Parameters_MTG_Deck(Get_Many_Parameters_Base): @staticmethod def get_type_hints(): return { - 'a_get_all_deck': Boolean + 'a_access_user_id': Integer + , 'a_get_all_deck': Boolean , 'a_get_inactive_deck': Boolean , 'a_deck_ids': Text , 'a_deck_names': Text , 'a_commander_bracket_ids': Text , 'a_include_commander_option': Boolean - , 'a_created_by_user_ids': Text , 'a_get_all_game': Boolean , 'a_get_inactive_game': Boolean , 'a_game_ids': Text - , 'a_filter_by_game_session_not_player': Boolean + , 'a_get_all_user': Boolean + , 'a_get_inactive_user': Boolean + , 'a_user_ids': Text , 'a_require_all_id_filters_met': Boolean , 'a_require_any_id_filters_met': Boolean , 'a_require_all_non_id_filters_met': Boolean diff --git a/business_objects/tcg/mtg_deck_commander_bracket.py b/business_objects/tcg/mtg_deck_commander_bracket.py index 224a146..674f22d 100644 --- a/business_objects/tcg/mtg_deck_commander_bracket.py +++ b/business_objects/tcg/mtg_deck_commander_bracket.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: MTG Deck Commander Bracket Business Object @@ -16,6 +16,7 @@ from helpers.helper_app import Helper_App # external from dataclasses import dataclass from typing import ClassVar +from sqlalchemy.types import Text, Boolean, Integer class MTG_Deck_Commander_Bracket(SQLAlchemy_ABC, Base): @@ -100,6 +101,7 @@ class MTG_Deck_Commander_Bracket(SQLAlchemy_ABC, Base): class Parameters_MTG_Deck_Commander_Bracket(Get_Many_Parameters_Base): + access_user_id: int get_all_commander_bracket: bool get_inactive_commander_bracket: bool commander_bracket_ids: str @@ -110,9 +112,10 @@ class Parameters_MTG_Deck_Commander_Bracket(Get_Many_Parameters_Base): require_any_non_id_filters_met: bool @classmethod - def get_default(cls): + def get_default(cls, user_id_session): return cls( - get_all_commander_bracket = True + access_user_id = user_id_session + , get_all_commander_bracket = True , get_inactive_commander_bracket = False , commander_bracket_ids = '' , commander_bracket_names = '' @@ -125,7 +128,8 @@ class Parameters_MTG_Deck_Commander_Bracket(Get_Many_Parameters_Base): @classmethod def from_json(cls, json): return cls( - get_all_commander_bracket = json.get('a_get_all_commander_bracket', True) + access_user_id = json.get('a_access_user_id', None) + , get_all_commander_bracket = json.get('a_get_all_commander_bracket', True) , get_inactive_commander_bracket = json.get('a_get_inactive_commander_bracket', False) , commander_bracket_ids = json.get('a_commander_bracket_ids', '') , commander_bracket_names = json.get('a_commander_bracket_names', '') @@ -137,7 +141,8 @@ class Parameters_MTG_Deck_Commander_Bracket(Get_Many_Parameters_Base): def to_json(self): return { - 'a_get_all_commander_bracket': self.get_all_commander_bracket + 'a_access_user_id': self.access_user_id + , 'a_get_all_commander_bracket': self.get_all_commander_bracket , 'a_get_inactive_commander_bracket': self.get_inactive_commander_bracket , 'a_commander_bracket_ids': self.commander_bracket_ids , 'a_commander_bracket_names': self.commander_bracket_names @@ -146,3 +151,17 @@ class Parameters_MTG_Deck_Commander_Bracket(Get_Many_Parameters_Base): , 'a_require_all_non_id_filters_met': self.require_all_non_id_filters_met , 'a_require_any_non_id_filters_met': self.require_any_non_id_filters_met } + + @staticmethod + def get_type_hints(): + return { + 'a_access_user_id': Integer + , 'a_get_all_commander_bracket': Boolean + , 'a_get_inactive_commander_bracket': Boolean + , 'a_commander_bracket_ids': Text + , 'a_commander_bracket_names': Text + , 'a_require_all_id_filters_met': Boolean + , 'a_require_any_id_filters_met': Boolean + , 'a_require_all_non_id_filters_met': Boolean + , 'a_require_any_non_id_filters_met': Boolean + } diff --git a/business_objects/tcg/mtg_game.py b/business_objects/tcg/mtg_game.py index 68ee1ac..948fd3b 100644 --- a/business_objects/tcg/mtg_game.py +++ b/business_objects/tcg/mtg_game.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: MTG Game Business Object @@ -18,7 +18,7 @@ from datetime import datetime from dataclasses import dataclass from typing import ClassVar from sqlalchemy import bindparam -from sqlalchemy.types import Text, Boolean +from sqlalchemy.types import Text, Boolean, Integer class MTG_Game(SQLAlchemy_ABC, Base): @@ -147,6 +147,7 @@ class MTG_Game(SQLAlchemy_ABC, Base): ''' class Parameters_MTG_Game(Get_Many_Parameters_Base): + access_user_id: int get_all_game: bool get_inactive_game: bool game_ids: str @@ -159,7 +160,8 @@ class Parameters_MTG_Game(Get_Many_Parameters_Base): @classmethod def get_default(cls, user_id_session): return cls( - get_all_game = True + access_user_id = user_id_session + , get_all_game = True , get_inactive_game = False , game_ids = '' , get_all_user = False @@ -172,7 +174,8 @@ class Parameters_MTG_Game(Get_Many_Parameters_Base): @classmethod def from_json(cls, json): return cls( - get_all_game = json.get('a_get_all_game', False) + access_user_id = json.get('a_access_user_id', None) + , get_all_game = json.get('a_get_all_game', False) , get_inactive_game = json.get('a_get_inactive_game', False) , game_ids = json.get('a_game_ids', '') , get_all_user = json.get('a_get_all_user', False) @@ -184,7 +187,8 @@ class Parameters_MTG_Game(Get_Many_Parameters_Base): def to_json(self): return { - 'a_get_all_game': self.get_all_game + 'a_access_user_id': self.access_user_id + , 'a_get_all_game': self.get_all_game , 'a_get_inactive_game': self.get_inactive_game , 'a_game_ids': str(self.game_ids) , 'a_get_all_user': self.get_all_user @@ -196,7 +200,8 @@ class Parameters_MTG_Game(Get_Many_Parameters_Base): @staticmethod def get_type_hints(): return { - 'a_get_all_game': Boolean + 'a_access_user_id': Integer + , 'a_get_all_game': Boolean , 'a_get_inactive_game': Boolean , 'a_game_ids': Text , 'a_get_all_user': Boolean diff --git a/business_objects/tcg/mtg_game_player.py b/business_objects/tcg/mtg_game_player.py index ce1b67f..cfd1c5c 100644 --- a/business_objects/tcg/mtg_game_player.py +++ b/business_objects/tcg/mtg_game_player.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: MTG Game Player Business Object @@ -19,7 +19,7 @@ from helpers.helper_app import Helper_App from dataclasses import dataclass from typing import ClassVar from sqlalchemy import Uuid -from sqlalchemy.types import Text, Boolean +from sqlalchemy.types import Text, Boolean, Integer # import uuid class MTG_Game_Player(SQLAlchemy_ABC, Base): @@ -151,6 +151,7 @@ class MTG_Game_Player_Temp(db.Model, Base): class Parameters_MTG_Game_Player(Get_Many_Parameters_Base): + access_user_id: int get_all_game: bool get_inactive_game: bool game_ids: str @@ -160,7 +161,8 @@ class Parameters_MTG_Game_Player(Get_Many_Parameters_Base): @classmethod def get_default(cls, user_id_session): return cls( - get_all_game = True + access_user_id = user_id_session + , get_all_game = True , get_inactive_game = False , game_ids = '' , require_all_id_filters_met = True @@ -170,7 +172,8 @@ class Parameters_MTG_Game_Player(Get_Many_Parameters_Base): @classmethod def from_json(cls, json): return cls( - get_all_game = json.get('a_get_all_game', False) + access_user_id = json.get('a_access_user_id', None) + , get_all_game = json.get('a_get_all_game', False) , get_inactive_game = json.get('a_get_inactive_game', False) , game_ids = json.get('a_game_ids', '') , require_all_id_filters_met = json.get('a_require_all_id_filters_met', True) @@ -179,7 +182,8 @@ class Parameters_MTG_Game_Player(Get_Many_Parameters_Base): def to_json(self): return { - 'a_get_all_game': self.get_all_game + 'a_access_user_id': self.access_user_id + , 'a_get_all_game': self.get_all_game , 'a_get_inactive_game': self.get_inactive_game , 'a_game_ids': self.game_ids , 'a_require_all_id_filters_met': self.require_all_id_filters_met @@ -189,7 +193,8 @@ class Parameters_MTG_Game_Player(Get_Many_Parameters_Base): @staticmethod def get_type_hints(): return { - 'a_get_all_game': Boolean + 'a_access_user_id': Integer + , 'a_get_all_game': Boolean , 'a_get_inactive_game': Boolean , 'a_game_ids': Text , 'a_require_all_id_filters_met': Boolean diff --git a/business_objects/tcg/mtg_game_round.py b/business_objects/tcg/mtg_game_round.py index c61edcc..76d07dc 100644 --- a/business_objects/tcg/mtg_game_round.py +++ b/business_objects/tcg/mtg_game_round.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: MTG Game Round Business Object @@ -17,7 +17,7 @@ from helpers.helper_app import Helper_App from dataclasses import dataclass from typing import ClassVar from sqlalchemy import Uuid -from sqlalchemy.types import Text, Boolean +from sqlalchemy.types import Text, Boolean, Integer class MTG_Game_Round(SQLAlchemy_ABC, Base): @@ -130,6 +130,7 @@ class MTG_Game_Round_Temp(db.Model, Base): class Parameters_MTG_Game_Round(Get_Many_Parameters_Base): + access_user_id: int get_all_game: bool get_inactive_game: bool game_ids: str @@ -139,7 +140,8 @@ class Parameters_MTG_Game_Round(Get_Many_Parameters_Base): @classmethod def get_default(cls, user_id_session): return cls( - get_all_game = True + access_user_id = user_id_session + , get_all_game = True , get_inactive_game = False , game_ids = '' , require_all_id_filters_met = True @@ -149,7 +151,8 @@ class Parameters_MTG_Game_Round(Get_Many_Parameters_Base): @classmethod def from_json(cls, json): return cls( - get_all_game = json.get('a_get_all_game', False) + access_user_id = json.get('a_access_user_id', None) + , get_all_game = json.get('a_get_all_game', False) , get_inactive_game = json.get('a_get_inactive_game', False) , game_ids = json.get('a_game_ids', '') , require_all_id_filters_met = json.get('a_require_all_id_filters_met', True) @@ -158,7 +161,8 @@ class Parameters_MTG_Game_Round(Get_Many_Parameters_Base): def to_json(self): return { - 'a_get_all_game': self.get_all_game + 'a_access_user_id': self.access_user_id + , 'a_get_all_game': self.get_all_game , 'a_get_inactive_game': self.get_inactive_game , 'a_game_ids': self.game_ids , 'a_require_all_id_filters_met': self.require_all_id_filters_met @@ -168,7 +172,8 @@ class Parameters_MTG_Game_Round(Get_Many_Parameters_Base): @staticmethod def get_type_hints(): return { - 'a_get_all_game': Boolean + 'a_access_user_id': Integer + , 'a_get_all_game': Boolean , 'a_get_inactive_game': Boolean , 'a_game_ids': Text , 'a_require_all_id_filters_met': Boolean diff --git a/business_objects/tcg/mtg_game_round_player_damage.py b/business_objects/tcg/mtg_game_round_player_damage.py index 135c48f..ef8e0b1 100644 --- a/business_objects/tcg/mtg_game_round_player_damage.py +++ b/business_objects/tcg/mtg_game_round_player_damage.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: MTG Game Round Player Damage Business Object @@ -17,7 +17,7 @@ from helpers.helper_app import Helper_App from dataclasses import dataclass from typing import ClassVar from sqlalchemy import Uuid -from sqlalchemy.types import Text, Boolean +from sqlalchemy.types import Text, Boolean, Integer class MTG_Game_Round_Player_Damage(SQLAlchemy_ABC, Base): @@ -163,6 +163,7 @@ class MTG_Game_Round_Player_Damage_Temp(db.Model, Base): class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base): + access_user_id: int get_all_game: bool get_inactive_game: bool game_ids: str @@ -172,7 +173,8 @@ class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base): @classmethod def get_default(cls, user_id_session): return cls( - get_all_game = True + access_user_id = user_id_session + , get_all_game = True , get_inactive_game = False , game_ids = '' , require_all_id_filters_met = True @@ -182,7 +184,8 @@ class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base): @classmethod def from_json(cls, json): return cls( - get_all_game = json.get('a_get_all_game', False) + access_user_id = json.get('a_access_user_id', None) + , get_all_game = json.get('a_get_all_game', False) , get_inactive_game = json.get('a_get_inactive_game', False) , game_ids = json.get('a_game_ids', '') , require_all_id_filters_met = json.get('a_require_all_id_filters_met', True) @@ -191,7 +194,8 @@ class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base): def to_json(self): return { - 'a_get_all_game': self.get_all_game + 'a_access_user_id': self.access_user_id + , 'a_get_all_game': self.get_all_game , 'a_get_inactive_game': self.get_inactive_game , 'a_game_ids': self.game_ids , 'a_require_all_id_filters_met': self.require_all_id_filters_met @@ -201,7 +205,8 @@ class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base): @staticmethod def get_type_hints(): return { - 'a_get_all_game': Boolean + 'a_access_user_id': Integer + , 'a_get_all_game': Boolean , 'a_get_inactive_game': Boolean , 'a_game_ids': Text , 'a_require_all_id_filters_met': Boolean diff --git a/business_objects/tcg/mtg_game_session_member.py b/business_objects/tcg/mtg_game_session_member.py index b3f3c0c..2142d51 100644 --- a/business_objects/tcg/mtg_game_session_member.py +++ b/business_objects/tcg/mtg_game_session_member.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: MTG Game Session Member Business Object @@ -19,7 +19,7 @@ from helpers.helper_app import Helper_App from dataclasses import dataclass from typing import ClassVar from sqlalchemy import Uuid -from sqlalchemy.types import Text, Boolean +from sqlalchemy.types import Text, Boolean, Integer # import uuid class MTG_Game_Session_Member(SQLAlchemy_ABC, Base): @@ -128,6 +128,7 @@ class MTG_Game_Session_Member_Temp(db.Model, Base): class Parameters_MTG_Game_Session_Member(Get_Many_Parameters_Base): + access_user_id: int get_inactive_session_member: bool get_all_game: bool get_inactive_game: bool @@ -141,7 +142,8 @@ class Parameters_MTG_Game_Session_Member(Get_Many_Parameters_Base): @classmethod def get_default(cls, user_id_session): return cls( - get_inactive_session_member = False + access_user_id = user_id_session + , get_inactive_session_member = False , get_all_game = True , get_inactive_game = False , game_ids = '' @@ -155,7 +157,8 @@ class Parameters_MTG_Game_Session_Member(Get_Many_Parameters_Base): @classmethod def from_json(cls, json): return cls( - get_inactive_session_member = json.get('a_get_inactive_session_member', False) + access_user_id = json.get('a_access_user_id', None) + , get_inactive_session_member = json.get('a_get_inactive_session_member', False) , get_all_game = json.get('a_get_all_game', False) , get_inactive_game = json.get('a_get_inactive_game', False) , game_ids = json.get('a_game_ids', '') @@ -168,7 +171,8 @@ class Parameters_MTG_Game_Session_Member(Get_Many_Parameters_Base): def to_json(self): return { - 'a_get_inactive_session_member': self.get_inactive_session_member + 'a_access_user_id': self.access_user_id + , 'a_get_inactive_session_member': self.get_inactive_session_member , 'a_get_all_game': self.get_all_game , 'a_get_inactive_game': self.get_inactive_game , 'a_game_ids': self.game_ids @@ -182,7 +186,8 @@ class Parameters_MTG_Game_Session_Member(Get_Many_Parameters_Base): @staticmethod def get_type_hints(): return { - 'a_get_inactive_session_member': Boolean + 'a_access_user_id': Integer + , 'a_get_inactive_session_member': Boolean , 'a_get_all_game': Boolean , 'a_get_inactive_game': Boolean , 'a_game_ids': Text diff --git a/business_objects/tcg/statistic.py b/business_objects/tcg/statistic.py index b4cb248..c9b15a8 100644 --- a/business_objects/tcg/statistic.py +++ b/business_objects/tcg/statistic.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: Statistic Business Object @@ -17,7 +17,7 @@ from helpers.helper_app import Helper_App from dataclasses import dataclass from typing import ClassVar from sqlalchemy import Uuid, Interval -from sqlalchemy.types import Text, Boolean +from sqlalchemy.types import Text, Boolean, Integer class Statistic(SQLAlchemy_ABC, Base): @@ -231,6 +231,7 @@ class Statistic_Temp(db.Model, Base): class Parameters_Statistic(Get_Many_Parameters_Base): + access_user_id: int get_all_statistic: bool get_inactive_statistic: bool statistic_ids: str @@ -240,9 +241,10 @@ class Parameters_Statistic(Get_Many_Parameters_Base): require_any_id_filters_met: bool @classmethod - def get_default(cls): + def get_default(cls, user_id_session): return cls( - get_all_statistic = True + access_user_id = user_id_session + , get_all_statistic = True , get_inactive_statistic = False , statistic_ids = '' , entity_type_codes = '' @@ -254,7 +256,8 @@ class Parameters_Statistic(Get_Many_Parameters_Base): @classmethod def from_json(cls, json): return cls( - get_all_statistic = json.get('a_get_all_statistic', False) + access_user_id = json.get('a_access_user_id', None) + , get_all_statistic = json.get('a_get_all_statistic', False) , get_inactive_statistic = json.get('a_get_inactive_statistic', False) , statistic_ids = json.get('a_statistic_ids', '') , entity_type_codes = json.get('a_entity_type_codes', '') @@ -265,7 +268,8 @@ class Parameters_Statistic(Get_Many_Parameters_Base): def to_json(self): return { - 'a_get_all_statistic': self.get_all_statistic + 'a_access_user_id': self.access_user_id + , 'a_get_all_statistic': self.get_all_statistic , 'a_get_inactive_statistic': self.get_inactive_statistic , 'a_statistic_ids': self.statistic_ids , 'a_entity_type_codes': self.entity_type_codes @@ -277,7 +281,8 @@ class Parameters_Statistic(Get_Many_Parameters_Base): @staticmethod def get_type_hints(): return { - 'a_get_all_statistic': Boolean + 'a_access_user_id': Integer + , 'a_get_all_statistic': Boolean , 'a_get_inactive_statistic': Boolean , 'a_statistic_ids': Text , 'a_entity_type_codes': Text diff --git a/business_objects/tcg/user.py b/business_objects/tcg/user.py index 1914411..82f1dd0 100644 --- a/business_objects/tcg/user.py +++ b/business_objects/tcg/user.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: User Business Object @@ -17,7 +17,7 @@ from helpers.helper_app import Helper_App # external from dataclasses import dataclass from typing import ClassVar, Optional -from sqlalchemy.types import Text, Boolean +from sqlalchemy.types import Text, Boolean, Integer class User(SQLAlchemy_ABC, Base): @@ -138,6 +138,7 @@ User ( class Parameters_User(Get_Many_Parameters_Base): + access_user_id: int # user_id: Optional[int] # auth0_user_id: str get_all_user: bool @@ -155,12 +156,12 @@ class Parameters_User(Get_Many_Parameters_Base): @classmethod - def from_form_filters_user(cls, form): + def from_form_filters_user(cls, form, user_id_session): _m = f'{cls.__qualname__}.from_form_filters_user' av.val_instance(form, 'form', _m, Filters_User) get_inactive = not av.input_bool(form.active_only.data, "active", _m) # user_id = '' if form.user_id.data is None else form.user_id.data - filters = cls.get_default() + filters = cls.get_default(user_id_session) filters.get_all_user = True # (user_id == '') filters.get_inactive_user = get_inactive filters.user_ids = '' # user_id @@ -170,11 +171,11 @@ class Parameters_User(Get_Many_Parameters_Base): # filters.require_all_non_id_filters_met = False # filters.require_any_non_id_filters_met = True return filters - + @classmethod - def from_user(cls, user): + def from_user(cls, user, user_id_session): av.val_instance(user, 'user', 'Parameters_User.from_user', User) - filters = cls.get_default() + filters = cls.get_default(user_id_session) filters.get_all_user = ((user.user_id is None or user.user_id == 0) and user.user_auth0_id is None) filters.get_inactive_user = False filters.user_ids = '' if user.user_id is None else str(user.user_id) @@ -182,13 +183,14 @@ class Parameters_User(Get_Many_Parameters_Base): # filters.names_user = user.get_name() # filters.emails_user = user.email return filters - + @classmethod - def get_default(cls): + def get_default(cls, user_id_session): return cls( - # user_id = None + access_user_id = user_id_session + # , user_id = None # , auth0_user_id = '' - get_all_user = False + , get_all_user = False , get_inactive_user = False , user_ids = '' # , user_auth0_ids = '' @@ -205,9 +207,10 @@ class Parameters_User(Get_Many_Parameters_Base): pass def to_json(self): return { - # 'a_user_id': self.user_id + 'a_access_user_id': self.access_user_id + # , 'a_user_id': self.user_id # , 'a_auth0_user_id': self.auth0_user_id - 'a_get_all_user': self.get_all_user + , 'a_get_all_user': self.get_all_user , 'a_get_inactive_user': self.get_inactive_user , 'a_user_ids': self.user_ids # , 'a_user_auth0_ids': self.user_auth0_ids @@ -221,7 +224,8 @@ class Parameters_User(Get_Many_Parameters_Base): @staticmethod def get_type_hints(): return { - 'a_get_all_user': Boolean + 'a_access_user_id': Integer + , 'a_get_all_user': Boolean , 'a_get_inactive_user': Boolean , 'a_user_ids': Text , 'a_require_all_id_filters_met': Boolean diff --git a/business_objects/tcg/user_relationship.py b/business_objects/tcg/user_relationship.py index 8abe961..cf15510 100644 --- a/business_objects/tcg/user_relationship.py +++ b/business_objects/tcg/user_relationship.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Business Objects Feature: User Relationship Business Object @@ -17,7 +17,7 @@ from helpers.helper_app import Helper_App from dataclasses import dataclass from typing import ClassVar from sqlalchemy import Uuid -from sqlalchemy.types import Text, Boolean +from sqlalchemy.types import Text, Boolean, Integer # import uuid class User_Relationship(SQLAlchemy_ABC, Base): @@ -136,6 +136,7 @@ class User_Relationship_Temp(db.Model, Base): class Parameters_User_Relationship(Get_Many_Parameters_Base): + access_user_id: int get_inactive_user_relationship: bool get_all_user_follower: bool follower_user_ids: str @@ -148,7 +149,8 @@ class Parameters_User_Relationship(Get_Many_Parameters_Base): @classmethod def get_default(cls, user_id_session): return cls( - get_inactive_user_relationship = True + access_user_id = user_id_session + , get_inactive_user_relationship = True , get_all_user_follower = False , follower_user_ids = '' , get_all_user_following = True @@ -161,7 +163,8 @@ class Parameters_User_Relationship(Get_Many_Parameters_Base): @classmethod def from_json(cls, json): return cls( - get_inactive_user_relationship = json.get('a_get_inactive_user_relationship', False) + access_user_id = json.get('a_access_user_id', None) + , get_inactive_user_relationship = json.get('a_get_inactive_user_relationship', False) , get_all_user_follower = json.get('a_get_all_user_follower', False) , follower_user_ids = json.get('a_follower_user_ids', '') , get_all_user_following = json.get('a_get_all_user_following', False) @@ -173,7 +176,8 @@ class Parameters_User_Relationship(Get_Many_Parameters_Base): def to_json(self): return { - 'a_get_inactive_user_relationship': self.get_inactive_user_relationship + 'a_access_user_id': self.access_user_id + , 'a_get_inactive_user_relationship': self.get_inactive_user_relationship , 'a_get_all_user_follower': self.get_all_user_follower , 'a_follower_user_ids': self.follower_user_ids , 'a_get_all_user_following': self.get_all_user_following @@ -186,7 +190,8 @@ class Parameters_User_Relationship(Get_Many_Parameters_Base): @staticmethod def get_type_hints(): return { - 'a_get_inactive_user_relationship': Boolean + 'a_access_user_id': Integer + , 'a_get_inactive_user_relationship': Boolean , 'a_get_all_user_follower': Boolean , 'a_follower_user_ids': Text , 'a_get_all_user_following': Boolean diff --git a/config.py b/config.py index 243e1c4..1c62093 100644 --- a/config.py +++ b/config.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Backend Feature: Configuration diff --git a/controllers/legal/legal.py b/controllers/legal/legal.py index 7e0b4fb..733ceaf 100644 --- a/controllers/legal/legal.py +++ b/controllers/legal/legal.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: App Routing Feature: Legal Routes diff --git a/controllers/tcg/mtg_game.py b/controllers/tcg/mtg_game.py index deb7194..e4d3a0b 100644 --- a/controllers/tcg/mtg_game.py +++ b/controllers/tcg/mtg_game.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: App Routing Feature: TCG - MTG Game Routes @@ -451,7 +451,7 @@ def decks(): if not user_session.get_is_logged_in(): return redirect(url_for('routes_mtg_game.home')) - parameters_deck = form_filters.to_parameters() + parameters_deck = form_filters.to_parameters(user_id_session = user_session.user_id) model = Model_View_MTG_Decks(parameters_deck = parameters_deck) model.form_filters = form_filters diff --git a/controllers/user/user.py b/controllers/user/user.py index cbed57a..9822138 100644 --- a/controllers/user/user.py +++ b/controllers/user/user.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: App Routing Feature: User Routes diff --git a/datastores/__init__.py b/datastores/__init__.py index c05a52e..7c5b723 100644 --- a/datastores/__init__.py +++ b/datastores/__init__.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Module Initialisation Feature: DataStores diff --git a/datastores/datastore_base.py b/datastores/datastore_base.py index 874c135..d788f8c 100644 --- a/datastores/datastore_base.py +++ b/datastores/datastore_base.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: DataStores Feature: Base DataStore diff --git a/datastores/datastore_mtg.py b/datastores/datastore_mtg.py index 1d888db..fdef6ed 100644 --- a/datastores/datastore_mtg.py +++ b/datastores/datastore_mtg.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: DataStores Feature: MTG DataStore @@ -348,7 +348,7 @@ class DataStore_MTG(DataStore_Base): def get_many_mtg_deck_commander_bracket(cls, parameters_commander_bracket): _m = f'{cls.__qualname__}.get_many_mtg_deck_commander_bracket' argument_dict = parameters_commander_bracket.to_json() - argument_types = Parameters_MTG_Deck.get_type_hints() + argument_types = Parameters_MTG_Deck_Commander_Bracket.get_type_hints() # Helper_App.console_log(f'{_m}\nargument_dict: {argument_dict}') commander_brackets = [] @@ -374,7 +374,7 @@ class DataStore_MTG(DataStore_Base): def get_many_statistic(cls, parameters_statistic): _m = f'{cls.__qualname__}.get_many_statistic' argument_dict = parameters_statistic.to_json() - argument_types = Parameters_MTG_Deck.get_type_hints() + argument_types = Parameters_Statistic.get_type_hints() # Helper_App.console_log(f'{_m}\nargument_dict: {argument_dict}') statistics = [] @@ -393,7 +393,7 @@ class DataStore_MTG(DataStore_Base): error.msg = str(e) errors.append(error) - return statistics, + return statistics, errors @classmethod def get_many_mtg_game_session_member(cls, member_filters): diff --git a/datastores/datastore_user.py b/datastores/datastore_user.py index 3124777..1105b85 100644 --- a/datastores/datastore_user.py +++ b/datastores/datastore_user.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: DataStores Feature: User DataStore diff --git a/forms/base.py b/forms/base.py index 8a0d625..a2888dd 100644 --- a/forms/base.py +++ b/forms/base.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Backend Feature: Form Base and Meta Classes - data input diff --git a/forms/tcg/game.py b/forms/tcg/game.py index 5497734..61c732b 100644 --- a/forms/tcg/game.py +++ b/forms/tcg/game.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Backend Feature: MTG Game Form @@ -87,7 +87,8 @@ class Filters_MTG_Game(Form_Base): def to_parameters(self, user_id_session): return Parameters_MTG_Game ( - get_all_game = True + access_user_id = user_id_session + , get_all_game = True , get_inactive_game = not self.active_only.data , game_ids = '' , get_all_user = False @@ -95,8 +96,6 @@ class Filters_MTG_Game(Form_Base): , user_ids = '' if user_id_session is None else str(user_id_session) , require_all_id_filters_met = True , require_any_id_filters_met = True - , require_all_non_id_filters_met = False - , require_any_non_id_filters_met = True ) @@ -126,7 +125,8 @@ class Filters_MTG_Game_Player(Form_Base): def to_parameters(self, user_id_session, game_id=None): params = Parameters_MTG_Game_Player( - get_all_player = True + access_user_id = user_id_session + , get_all_player = True , get_inactive_player = not self.active_only.data , player_ids = '' , game_ids = str(game_id) if game_id else '' @@ -170,14 +170,21 @@ class Filters_MTG_Deck(Form_Base): , MTG_Deck.FLAG_IS_COMMANDER: self.is_commander.data } - def to_parameters(self): + def to_parameters(self, user_id_session): return Parameters_MTG_Deck( - get_all_deck = True + access_user_id = user_id_session + , get_all_deck = True , get_inactive_deck = not self.active_only.data , deck_ids = '' , deck_names = self.search.data - , include_commander_option = True + , include_commander_option = self.is_commander.data , commander_bracket_ids = '' + , get_all_game = False + , get_inactive_game = not self.active_only.data + , game_ids = '' + , get_all_user = False + , get_inactive_user = False + , user_ids = str(user_id_session) , require_all_id_filters_met = False , require_any_id_filters_met = True , require_all_non_id_filters_met = False diff --git a/forms/tcg/user.py b/forms/tcg/user.py index 3dbe4ed..813ea7c 100644 --- a/forms/tcg/user.py +++ b/forms/tcg/user.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Backend Feature: User Form diff --git a/helpers/__init__.py b/helpers/__init__.py index 54cd370..dfa2bc0 100644 --- a/helpers/__init__.py +++ b/helpers/__init__.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Module Initialisation Feature: Helpers diff --git a/helpers/helper_app.py b/helpers/helper_app.py index ef706ff..b06ce86 100644 --- a/helpers/helper_app.py +++ b/helpers/helper_app.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Helpers Feature: App Helper diff --git a/helpers/helper_db_sql.py b/helpers/helper_db_sql.py index ca86936..e09742d 100644 --- a/helpers/helper_db_sql.py +++ b/helpers/helper_db_sql.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Helpers Feature: MySQL Database Helper diff --git a/lib/__init__.py b/lib/__init__.py index 1b31e3f..6ae6eea 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Module Initialisation Feature: Library diff --git a/models/__init__.py b/models/__init__.py index 615f401..5d34627 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Module Initialisation Feature: Models diff --git a/models/model_view_accessibility_report.py b/models/model_view_accessibility_report.py index 3f50e7f..89f3ca5 100644 --- a/models/model_view_accessibility_report.py +++ b/models/model_view_accessibility_report.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Legal View Models Feature: Accessibility Report View Model diff --git a/models/model_view_accessibility_statement.py b/models/model_view_accessibility_statement.py index d5df88e..1acf0bc 100644 --- a/models/model_view_accessibility_statement.py +++ b/models/model_view_accessibility_statement.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Legal View Models Feature: Accessibility Statement View Model diff --git a/models/model_view_base.py b/models/model_view_base.py index 27b5790..d5251d0 100644 --- a/models/model_view_base.py +++ b/models/model_view_base.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: View Models Feature: Base View Model diff --git a/models/model_view_license.py b/models/model_view_license.py index 5edee06..0b02ff9 100644 --- a/models/model_view_license.py +++ b/models/model_view_license.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Legal View Models Feature: License View Model diff --git a/models/model_view_mtg_base.py b/models/model_view_mtg_base.py index 7964051..61448d5 100644 --- a/models/model_view_mtg_base.py +++ b/models/model_view_mtg_base.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: View Models Feature: MTG Parent View Model diff --git a/models/model_view_mtg_decks.py b/models/model_view_mtg_decks.py index 3f14770..19aded7 100644 --- a/models/model_view_mtg_decks.py +++ b/models/model_view_mtg_decks.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: View Models Feature: MTG Decks View Model @@ -45,7 +45,7 @@ class Model_View_MTG_Decks(Model_View_MTG_Base): # Helper_App.console_log(f'Decks IDs: {self.decks}') # Get all commander brackets - parameters_commander_bracket = Parameters_MTG_Deck_Commander_Bracket.get_default() + parameters_commander_bracket = Parameters_MTG_Deck_Commander_Bracket.get_default(self.user.user_id) parameters_commander_bracket.get_all_commander_bracket = True parameters_commander_bracket.require_all_id_filters_met = False parameters_commander_bracket.require_any_id_filters_met = False @@ -65,7 +65,7 @@ class Model_View_MTG_Decks(Model_View_MTG_Base): deck_index[self.decks[index_deck].deck_id] = self.decks[index_deck] # Get all statistics - parameters_statistic = Parameters_Statistic.get_default() + parameters_statistic = Parameters_Statistic.get_default(self.user.user_id) parameters_statistic.get_all_statistic = False parameters_statistic.entity_type_codes = Model_View_MTG_Decks.DECK_ENTITY_TYPE_CODE parameters_statistic.entity_record_ids = ','.join([str(d.deck_id) for d in self.decks]) diff --git a/models/model_view_mtg_game.py b/models/model_view_mtg_game.py index 03e449a..4446e42 100644 --- a/models/model_view_mtg_game.py +++ b/models/model_view_mtg_game.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: View Models Feature: MTG Games View Model @@ -79,7 +79,7 @@ class Model_View_MTG_Game(Model_View_MTG_Base): self.decks, errors = datastore.get_many_mtg_deck(parameters_deck) # Get all users - parameters_user = Parameters_User.get_default() + parameters_user = Parameters_User.get_default(self.user.user_id) parameters_user.get_all_user = True parameters_user.require_all_id_filters_met = False parameters_user.require_any_id_filters_met = False diff --git a/models/model_view_mtg_games.py b/models/model_view_mtg_games.py index eb49b3a..d9bcff2 100644 --- a/models/model_view_mtg_games.py +++ b/models/model_view_mtg_games.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: View Models Feature: MTG Games View Model diff --git a/models/model_view_mtg_home.py b/models/model_view_mtg_home.py index b183207..f05ed6c 100644 --- a/models/model_view_mtg_home.py +++ b/models/model_view_mtg_home.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: View Models Feature: MTG Games View Model diff --git a/models/model_view_privacy_policy.py b/models/model_view_privacy_policy.py index e94bbed..010a02d 100644 --- a/models/model_view_privacy_policy.py +++ b/models/model_view_privacy_policy.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Legal View Models Feature: Privacy Policy View Model diff --git a/models/model_view_retention_schedule.py b/models/model_view_retention_schedule.py index 9c68909..00e2337 100644 --- a/models/model_view_retention_schedule.py +++ b/models/model_view_retention_schedule.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Legal View Models Feature: Retention Schedule View Model diff --git a/models/model_view_user.py b/models/model_view_user.py index 28f8903..b87bb8e 100644 --- a/models/model_view_user.py +++ b/models/model_view_user.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: View Models Feature: User View Model diff --git a/run.py b/run.py index bac5ef0..03cba7f 100644 --- a/run.py +++ b/run.py @@ -1,7 +1,7 @@ """ -Project: PARTS Website +Project: Magic Tracker Author: Edward Middleton-Smith - Precision And Research Technology Systems Limited + Shuffle & Skirmish Technology: Backend Feature: Launcher diff --git a/static/PostgreSQL/11202_tbl_TCG_MTG_Deck_Temp.sql b/static/PostgreSQL/11202_tbl_TCG_MTG_Deck_Temp.sql new file mode 100644 index 0000000..e1eeb6c --- /dev/null +++ b/static/PostgreSQL/11202_tbl_TCG_MTG_Deck_Temp.sql @@ -0,0 +1,15 @@ + +CREATE TABLE tcg.public.TCG_MTG_Deck_Temp ( + temp_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY + , deck_id INT + , name TEXT NOT NULL + , is_commander BOOLEAN + , commander_bracket_id INT + , active BOOLEAN + , created_on TIMESTAMP + , created_by_user_id INT + , updated_last_on TIMESTAMP + , updated_last_by_user_id INT + , change_set_id INT + , guid UUID +); diff --git a/static/PostgreSQL/30504_tri_TCG_User.sql b/static/PostgreSQL/30504_tri_TCG_User.sql index 08dd792..1e5d6fa 100644 --- a/static/PostgreSQL/30504_tri_TCG_User.sql +++ b/static/PostgreSQL/30504_tri_TCG_User.sql @@ -32,31 +32,31 @@ BEGIN ) -- Changed user_auth0_id SELECT NEW.user_id, 'user_auth0_id', OLD.user_auth0_id, NEW.user_auth0_id, NEW.change_set_id - WHERE OLD.user_auth0_id IS NOT DISTINCT FROM NEW.user_auth0_id + WHERE OLD.user_auth0_id IS DISTINCT FROM NEW.user_auth0_id UNION -- Changed firstname SELECT NEW.user_id, 'firstname', OLD.firstname, NEW.firstname, NEW.change_set_id - WHERE OLD.firstname IS NOT DISTINCT FROM NEW.firstname + WHERE OLD.firstname IS DISTINCT FROM NEW.firstname UNION -- Changed surname SELECT NEW.user_id, 'surname', OLD.surname, NEW.surname, NEW.change_set_id - WHERE OLD.surname IS NOT DISTINCT FROM NEW.surname + WHERE OLD.surname IS DISTINCT FROM NEW.surname UNION -- Changed email SELECT NEW.user_id, 'email', OLD.email, NEW.email, NEW.change_set_id - WHERE OLD.email IS NOT DISTINCT FROM NEW.email + WHERE OLD.email IS DISTINCT FROM NEW.email UNION -- Changed is_email_verified SELECT NEW.user_id, 'is_email_verified', OLD.is_email_verified::TEXT, NEW.is_email_verified::TEXT, NEW.change_set_id - WHERE OLD.is_email_verified IS NOT DISTINCT FROM NEW.is_email_verified + WHERE OLD.is_email_verified IS DISTINCT FROM NEW.is_email_verified UNION -- Changed is_super_user SELECT NEW.user_id, 'is_super_user', OLD.is_super_user::TEXT, NEW.is_super_user::TEXT, NEW.change_set_id - WHERE OLD.is_super_user IS NOT DISTINCT FROM NEW.is_super_user + WHERE OLD.is_super_user IS DISTINCT FROM NEW.is_super_user UNION -- Changed active SELECT NEW.user_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/30508_tri_TCG_User_Relationship.sql b/static/PostgreSQL/30508_tri_TCG_User_Relationship.sql index afe95f1..0ce2f15 100644 --- a/static/PostgreSQL/30508_tri_TCG_User_Relationship.sql +++ b/static/PostgreSQL/30508_tri_TCG_User_Relationship.sql @@ -48,23 +48,23 @@ BEGIN ) -- Changed follower_user_id SELECT NEW.relationship_id, 'follower_user_id', OLD.follower_user_id::TEXT, NEW.follower_user_id::TEXT, NEW.change_set_id - WHERE OLD.follower_user_id IS NOT DISTINCT FROM NEW.follower_user_id + WHERE OLD.follower_user_id IS DISTINCT FROM NEW.follower_user_id UNION -- Changed following_user_id SELECT NEW.relationship_id, 'following_user_id', OLD.following_user_id::TEXT, NEW.following_user_id::TEXT, NEW.change_set_id - WHERE OLD.following_user_id IS NOT DISTINCT FROM NEW.following_user_id + WHERE OLD.following_user_id IS DISTINCT FROM NEW.following_user_id UNION -- Changed is_following SELECT NEW.relationship_id, 'is_following', OLD.is_following::TEXT, NEW.is_following::TEXT, NEW.change_set_id - WHERE OLD.is_following IS NOT DISTINCT FROM NEW.is_following + WHERE OLD.is_following IS DISTINCT FROM NEW.is_following UNION -- Changed is_blocked SELECT NEW.relationship_id, 'is_blocked', OLD.is_blocked::TEXT, NEW.is_blocked::TEXT, NEW.change_set_id - WHERE OLD.is_blocked IS NOT DISTINCT FROM NEW.is_blocked + WHERE OLD.is_blocked IS DISTINCT FROM NEW.is_blocked UNION -- Changed active SELECT NEW.relationship_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/30510_tri_Error_Type.sql b/static/PostgreSQL/30510_tri_Error_Type.sql index 9f74c28..e708b5f 100644 --- a/static/PostgreSQL/30510_tri_Error_Type.sql +++ b/static/PostgreSQL/30510_tri_Error_Type.sql @@ -48,15 +48,15 @@ BEGIN ) -- Changed code SELECT NEW.error_type_id, 'code', OLD.code, NEW.code, NEW.change_set_id - WHERE OLD.code IS NOT DISTINCT FROM NEW.code + WHERE OLD.code IS DISTINCT FROM NEW.code UNION -- Changed name SELECT NEW.error_type_id, 'name', OLD.name, NEW.name, NEW.change_set_id - WHERE OLD.name IS NOT DISTINCT FROM NEW.name + WHERE OLD.name IS DISTINCT FROM NEW.name UNION -- Changed active SELECT NEW.error_type_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/30514_tri_Error.sql b/static/PostgreSQL/30514_tri_Error.sql index 66507ca..7a5806e 100644 --- a/static/PostgreSQL/30514_tri_Error.sql +++ b/static/PostgreSQL/30514_tri_Error.sql @@ -48,23 +48,23 @@ BEGIN ) -- Changed guid SELECT NEW.error_id, 'guid', OLD.guid::TEXT, NEW.guid::TEXT, NEW.change_set_id - WHERE OLD.guid IS NOT DISTINCT FROM NEW.guid + WHERE OLD.guid IS DISTINCT FROM NEW.guid UNION -- Changed error_type_id SELECT NEW.error_id, 'error_type_id', OLD.error_type_id::TEXT, NEW.error_type_id::TEXT, NEW.change_set_id - WHERE OLD.error_type_id IS NOT DISTINCT FROM NEW.error_type_id + WHERE OLD.error_type_id IS DISTINCT FROM NEW.error_type_id UNION -- Changed message SELECT NEW.error_id, 'message', OLD.message, NEW.message, NEW.change_set_id - WHERE OLD.message IS NOT DISTINCT FROM NEW.message + WHERE OLD.message IS DISTINCT FROM NEW.message UNION -- Changed display_order SELECT NEW.error_id, 'display_order', OLD.display_order::TEXT, NEW.display_order::TEXT, NEW.change_set_id - WHERE OLD.display_order IS NOT DISTINCT FROM NEW.display_order + WHERE OLD.display_order IS DISTINCT FROM NEW.display_order UNION -- Changed active SELECT NEW.error_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31001_tri_TCG_Condition.sql b/static/PostgreSQL/31001_tri_TCG_Condition.sql index 3cc07b5..8ef12d3 100644 --- a/static/PostgreSQL/31001_tri_TCG_Condition.sql +++ b/static/PostgreSQL/31001_tri_TCG_Condition.sql @@ -48,35 +48,35 @@ BEGIN ) -- Changed name SELECT NEW.condition_id, 'name', OLD.name, NEW.name, NEW.change_set_id - WHERE OLD.name IS NOT DISTINCT FROM NEW.name + WHERE OLD.name IS DISTINCT FROM NEW.name UNION -- Changed code SELECT NEW.condition_id, 'code', OLD.code, NEW.code, NEW.change_set_id - WHERE OLD.code IS NOT DISTINCT FROM NEW.code + WHERE OLD.code IS DISTINCT FROM NEW.code UNION -- Changed description SELECT NEW.condition_id, 'description', OLD.description, NEW.description, NEW.change_set_id - WHERE OLD.description IS NOT DISTINCT FROM NEW.description + WHERE OLD.description IS DISTINCT FROM NEW.description UNION -- Changed summary SELECT NEW.condition_id, 'summary', OLD.summary, NEW.summary, NEW.change_set_id - WHERE OLD.summary IS NOT DISTINCT FROM NEW.summary + WHERE OLD.summary IS DISTINCT FROM NEW.summary UNION -- Changed us_name SELECT NEW.condition_id, 'us_name', OLD.us_name, NEW.us_name, NEW.change_set_id - WHERE OLD.us_name IS NOT DISTINCT FROM NEW.us_name + WHERE OLD.us_name IS DISTINCT FROM NEW.us_name UNION -- Changed price_ratio_min SELECT NEW.condition_id, 'price_ratio_min', OLD.price_ratio_min::TEXT, NEW.price_ratio_min::TEXT, NEW.change_set_id - WHERE OLD.price_ratio_min IS NOT DISTINCT FROM NEW.price_ratio_min + WHERE OLD.price_ratio_min IS DISTINCT FROM NEW.price_ratio_min UNION -- Changed price_ratio_max SELECT NEW.condition_id, 'price_ratio_max', OLD.price_ratio_max::TEXT, NEW.price_ratio_max::TEXT, NEW.change_set_id - WHERE OLD.price_ratio_max IS NOT DISTINCT FROM NEW.price_ratio_max + WHERE OLD.price_ratio_max IS DISTINCT FROM NEW.price_ratio_max UNION -- Changed active SELECT NEW.condition_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31101_tri_TCG_MTG_Finish.sql b/static/PostgreSQL/31101_tri_TCG_MTG_Finish.sql index c0cb488..f2ba595 100644 --- a/static/PostgreSQL/31101_tri_TCG_MTG_Finish.sql +++ b/static/PostgreSQL/31101_tri_TCG_MTG_Finish.sql @@ -48,23 +48,23 @@ BEGIN ) -- Changed name SELECT NEW.finish_id, 'name', OLD.name, NEW.name, NEW.change_set_id - WHERE OLD.name IS NOT DISTINCT FROM NEW.name + WHERE OLD.name IS DISTINCT FROM NEW.name UNION -- Changed description SELECT NEW.finish_id, 'description', OLD.description, NEW.description, NEW.change_set_id - WHERE OLD.description IS NOT DISTINCT FROM NEW.description + WHERE OLD.description IS DISTINCT FROM NEW.description UNION -- Changed price_ratio_min SELECT NEW.finish_id, 'price_ratio_min', OLD.price_ratio_min::TEXT, NEW.price_ratio_min::TEXT, NEW.change_set_id - WHERE OLD.price_ratio_min IS NOT DISTINCT FROM NEW.price_ratio_min + WHERE OLD.price_ratio_min IS DISTINCT FROM NEW.price_ratio_min UNION -- Changed price_ratio_max SELECT NEW.finish_id, 'price_ratio_max', OLD.price_ratio_max::TEXT, NEW.price_ratio_max::TEXT, NEW.change_set_id - WHERE OLD.price_ratio_max IS NOT DISTINCT FROM NEW.price_ratio_max + WHERE OLD.price_ratio_max IS DISTINCT FROM NEW.price_ratio_max UNION -- Changed active SELECT NEW.finish_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31130_tri_TCG_MTG_Card.sql b/static/PostgreSQL/31130_tri_TCG_MTG_Card.sql index baad354..5022575 100644 --- a/static/PostgreSQL/31130_tri_TCG_MTG_Card.sql +++ b/static/PostgreSQL/31130_tri_TCG_MTG_Card.sql @@ -48,451 +48,451 @@ BEGIN ) -- Changed all_parts SELECT NEW.card_id, 'all_parts', OLD.all_parts, NEW.all_parts, NEW.change_set_id - WHERE OLD.all_parts IS NOT DISTINCT FROM NEW.all_parts + WHERE OLD.all_parts IS DISTINCT FROM NEW.all_parts UNION -- Changed arena_id SELECT NEW.card_id, 'arena_id', OLD.arena_id::TEXT, NEW.arena_id::TEXT, NEW.change_set_id - WHERE OLD.arena_id IS NOT DISTINCT FROM NEW.arena_id + WHERE OLD.arena_id IS DISTINCT FROM NEW.arena_id UNION -- Changed artist SELECT NEW.card_id, 'artist', OLD.artist, NEW.artist, NEW.change_set_id - WHERE OLD.artist IS NOT DISTINCT FROM NEW.artist + WHERE OLD.artist IS DISTINCT FROM NEW.artist UNION -- Changed artist_ids SELECT NEW.card_id, 'artist_ids', OLD.artist_ids, NEW.artist_ids, NEW.change_set_id - WHERE OLD.artist_ids IS NOT DISTINCT FROM NEW.artist_ids + WHERE OLD.artist_ids IS DISTINCT FROM NEW.artist_ids UNION -- Changed booster SELECT NEW.card_id, 'booster', OLD.booster::TEXT, NEW.booster::TEXT, NEW.change_set_id - WHERE OLD.booster IS NOT DISTINCT FROM NEW.booster + WHERE OLD.booster IS DISTINCT FROM NEW.booster UNION -- Changed border_color SELECT NEW.card_id, 'border_color', OLD.border_color, NEW.border_color, NEW.change_set_id - WHERE OLD.border_color IS NOT DISTINCT FROM NEW.border_color + WHERE OLD.border_color IS DISTINCT FROM NEW.border_color UNION -- Changed card_back_id SELECT NEW.card_id, 'card_back_id', OLD.card_back_id, NEW.card_back_id, NEW.change_set_id - WHERE OLD.card_back_id IS NOT DISTINCT FROM NEW.card_back_id + WHERE OLD.card_back_id IS DISTINCT FROM NEW.card_back_id UNION -- Changed cmc SELECT NEW.card_id, 'cmc', OLD.cmc::TEXT, NEW.cmc::TEXT, NEW.change_set_id - WHERE OLD.cmc IS NOT DISTINCT FROM NEW.cmc + WHERE OLD.cmc IS DISTINCT FROM NEW.cmc UNION -- Changed collector_number SELECT NEW.card_id, 'collector_number', OLD.collector_number, NEW.collector_number, NEW.change_set_id - WHERE OLD.collector_number IS NOT DISTINCT FROM NEW.collector_number + WHERE OLD.collector_number IS DISTINCT FROM NEW.collector_number UNION -- Changed color_identity SELECT NEW.card_id, 'color_identity', OLD.color_identity, NEW.color_identity, NEW.change_set_id - WHERE OLD.color_identity IS NOT DISTINCT FROM NEW.color_identity + WHERE OLD.color_identity IS DISTINCT FROM NEW.color_identity UNION -- Changed colors SELECT NEW.card_id, 'colors', OLD.colors, NEW.colors, NEW.change_set_id - WHERE OLD.colors IS NOT DISTINCT FROM NEW.colors + WHERE OLD.colors IS DISTINCT FROM NEW.colors UNION -- Changed content_warning SELECT NEW.card_id, 'content_warning', OLD.content_warning::TEXT, NEW.content_warning::TEXT, NEW.change_set_id - WHERE OLD.content_warning IS NOT DISTINCT FROM NEW.content_warning + WHERE OLD.content_warning IS DISTINCT FROM NEW.content_warning UNION -- Changed digital SELECT NEW.card_id, 'digital', OLD.digital::TEXT, NEW.digital::TEXT, NEW.change_set_id - WHERE OLD.digital IS NOT DISTINCT FROM NEW.digital + WHERE OLD.digital IS DISTINCT FROM NEW.digital UNION -- Changed edhrec_rank SELECT NEW.card_id, 'edhrec_rank', OLD.edhrec_rank::TEXT, NEW.edhrec_rank::TEXT, NEW.change_set_id - WHERE OLD.edhrec_rank IS NOT DISTINCT FROM NEW.edhrec_rank + WHERE OLD.edhrec_rank IS DISTINCT FROM NEW.edhrec_rank UNION -- Changed finishes SELECT NEW.card_id, 'finishes', OLD.finishes, NEW.finishes, NEW.change_set_id - WHERE OLD.finishes IS NOT DISTINCT FROM NEW.finishes + WHERE OLD.finishes IS DISTINCT FROM NEW.finishes UNION -- Changed flavor_name SELECT NEW.card_id, 'flavor_name', OLD.flavor_name, NEW.flavor_name, NEW.change_set_id - WHERE OLD.flavor_name IS NOT DISTINCT FROM NEW.flavor_name + WHERE OLD.flavor_name IS DISTINCT FROM NEW.flavor_name UNION -- Changed flavor_text SELECT NEW.card_id, 'flavor_text', OLD.flavor_text, NEW.flavor_text, NEW.change_set_id - WHERE OLD.flavor_text IS NOT DISTINCT FROM NEW.flavor_text + WHERE OLD.flavor_text IS DISTINCT FROM NEW.flavor_text UNION -- Changed foil SELECT NEW.card_id, 'foil', OLD.foil::TEXT, NEW.foil::TEXT, NEW.change_set_id - WHERE OLD.foil IS NOT DISTINCT FROM NEW.foil + WHERE OLD.foil IS DISTINCT FROM NEW.foil UNION -- Changed frame SELECT NEW.card_id, 'frame', OLD.frame, NEW.frame, NEW.change_set_id - WHERE OLD.frame IS NOT DISTINCT FROM NEW.frame + WHERE OLD.frame IS DISTINCT FROM NEW.frame UNION -- Changed full_art SELECT NEW.card_id, 'full_art', OLD.full_art::TEXT, NEW.full_art::TEXT, NEW.change_set_id - WHERE OLD.full_art IS NOT DISTINCT FROM NEW.full_art + WHERE OLD.full_art IS DISTINCT FROM NEW.full_art UNION -- Changed game_changer SELECT NEW.card_id, 'game_changer', OLD.game_changer::TEXT, NEW.game_changer::TEXT, NEW.change_set_id - WHERE OLD.game_changer IS NOT DISTINCT FROM NEW.game_changer + WHERE OLD.game_changer IS DISTINCT FROM NEW.game_changer UNION -- Changed games SELECT NEW.card_id, 'games', OLD.games, NEW.games, NEW.change_set_id - WHERE OLD.games IS NOT DISTINCT FROM NEW.games + WHERE OLD.games IS DISTINCT FROM NEW.games UNION -- Changed hand_modifier SELECT NEW.card_id, 'hand_modifier', OLD.hand_modifier, NEW.hand_modifier, NEW.change_set_id - WHERE OLD.hand_modifier IS NOT DISTINCT FROM NEW.hand_modifier + WHERE OLD.hand_modifier IS DISTINCT FROM NEW.hand_modifier UNION -- Changed highres_image SELECT NEW.card_id, 'highres_image', OLD.highres_image::TEXT, NEW.highres_image::TEXT, NEW.change_set_id - WHERE OLD.highres_image IS NOT DISTINCT FROM NEW.highres_image + WHERE OLD.highres_image IS DISTINCT FROM NEW.highres_image UNION -- Changed id SELECT NEW.card_id, 'id', OLD.id::TEXT, NEW.id::TEXT, NEW.change_set_id - WHERE OLD.id IS NOT DISTINCT FROM NEW.id + WHERE OLD.id IS DISTINCT FROM NEW.id UNION -- Changed image_status SELECT NEW.card_id, 'image_status', OLD.image_status, NEW.image_status, NEW.change_set_id - WHERE OLD.image_status IS NOT DISTINCT FROM NEW.image_status + WHERE OLD.image_status IS DISTINCT FROM NEW.image_status UNION -- Changed image_uri_art_crop SELECT NEW.card_id, 'image_uri_art_crop', OLD.image_uri_art_crop, NEW.image_uri_art_crop, NEW.change_set_id - WHERE OLD.image_uri_art_crop IS NOT DISTINCT FROM NEW.image_uri_art_crop + WHERE OLD.image_uri_art_crop IS DISTINCT FROM NEW.image_uri_art_crop UNION -- Changed image_uri_border_crop SELECT NEW.card_id, 'image_uri_border_crop', OLD.image_uri_border_crop, NEW.image_uri_border_crop, NEW.change_set_id - WHERE OLD.image_uri_border_crop IS NOT DISTINCT FROM NEW.image_uri_border_crop + WHERE OLD.image_uri_border_crop IS DISTINCT FROM NEW.image_uri_border_crop UNION -- Changed image_uri_large SELECT NEW.card_id, 'image_uri_large', OLD.image_uri_large, NEW.image_uri_large, NEW.change_set_id - WHERE OLD.image_uri_large IS NOT DISTINCT FROM NEW.image_uri_large + WHERE OLD.image_uri_large IS DISTINCT FROM NEW.image_uri_large UNION -- Changed image_uri_normal SELECT NEW.card_id, 'image_uri_normal', OLD.image_uri_normal, NEW.image_uri_normal, NEW.change_set_id - WHERE OLD.image_uri_normal IS NOT DISTINCT FROM NEW.image_uri_normal + WHERE OLD.image_uri_normal IS DISTINCT FROM NEW.image_uri_normal UNION -- Changed image_uri_png SELECT NEW.card_id, 'image_uri_png', OLD.image_uri_png, NEW.image_uri_png, NEW.change_set_id - WHERE OLD.image_uri_png IS NOT DISTINCT FROM NEW.image_uri_png + WHERE OLD.image_uri_png IS DISTINCT FROM NEW.image_uri_png UNION -- Changed image_uri_small SELECT NEW.card_id, 'image_uri_small', OLD.image_uri_small, NEW.image_uri_small, NEW.change_set_id - WHERE OLD.image_uri_small IS NOT DISTINCT FROM NEW.image_uri_small + WHERE OLD.image_uri_small IS DISTINCT FROM NEW.image_uri_small UNION -- Changed keywords SELECT NEW.card_id, 'keywords', OLD.keywords, NEW.keywords, NEW.change_set_id - WHERE OLD.keywords IS NOT DISTINCT FROM NEW.keywords + WHERE OLD.keywords IS DISTINCT FROM NEW.keywords UNION -- Changed lang SELECT NEW.card_id, 'lang', OLD.lang, NEW.lang, NEW.change_set_id - WHERE OLD.lang IS NOT DISTINCT FROM NEW.lang + WHERE OLD.lang IS DISTINCT FROM NEW.lang UNION -- Changed layout SELECT NEW.card_id, 'layout', OLD.layout, NEW.layout, NEW.change_set_id - WHERE OLD.layout IS NOT DISTINCT FROM NEW.layout + WHERE OLD.layout IS DISTINCT FROM NEW.layout UNION -- Changed legal_alchemy SELECT NEW.card_id, 'legal_alchemy', OLD.legal_alchemy::TEXT, NEW.legal_alchemy::TEXT, NEW.change_set_id - WHERE OLD.legal_alchemy IS NOT DISTINCT FROM NEW.legal_alchemy + WHERE OLD.legal_alchemy IS DISTINCT FROM NEW.legal_alchemy UNION -- Changed legal_brawl SELECT NEW.card_id, 'legal_brawl', OLD.legal_brawl::TEXT, NEW.legal_brawl::TEXT, NEW.change_set_id - WHERE OLD.legal_brawl IS NOT DISTINCT FROM NEW.legal_brawl + WHERE OLD.legal_brawl IS DISTINCT FROM NEW.legal_brawl UNION -- Changed legal_commander SELECT NEW.card_id, 'legal_commander', OLD.legal_commander::TEXT, NEW.legal_commander::TEXT, NEW.change_set_id - WHERE OLD.legal_commander IS NOT DISTINCT FROM NEW.legal_commander + WHERE OLD.legal_commander IS DISTINCT FROM NEW.legal_commander UNION -- Changed legal_duel SELECT NEW.card_id, 'legal_duel', OLD.legal_duel::TEXT, NEW.legal_duel::TEXT, NEW.change_set_id - WHERE OLD.legal_duel IS NOT DISTINCT FROM NEW.legal_duel + WHERE OLD.legal_duel IS DISTINCT FROM NEW.legal_duel UNION -- Changed legal_future SELECT NEW.card_id, 'legal_future', OLD.legal_future::TEXT, NEW.legal_future::TEXT, NEW.change_set_id - WHERE OLD.legal_future IS NOT DISTINCT FROM NEW.legal_future + WHERE OLD.legal_future IS DISTINCT FROM NEW.legal_future UNION -- Changed legal_gladiator SELECT NEW.card_id, 'legal_gladiator', OLD.legal_gladiator::TEXT, NEW.legal_gladiator::TEXT, NEW.change_set_id - WHERE OLD.legal_gladiator IS NOT DISTINCT FROM NEW.legal_gladiator + WHERE OLD.legal_gladiator IS DISTINCT FROM NEW.legal_gladiator UNION -- Changed legal_historic SELECT NEW.card_id, 'legal_historic', OLD.legal_historic::TEXT, NEW.legal_historic::TEXT, NEW.change_set_id - WHERE OLD.legal_historic IS NOT DISTINCT FROM NEW.legal_historic + WHERE OLD.legal_historic IS DISTINCT FROM NEW.legal_historic UNION -- Changed legal_legacy SELECT NEW.card_id, 'legal_legacy', OLD.legal_legacy::TEXT, NEW.legal_legacy::TEXT, NEW.change_set_id - WHERE OLD.legal_legacy IS NOT DISTINCT FROM NEW.legal_legacy + WHERE OLD.legal_legacy IS DISTINCT FROM NEW.legal_legacy UNION -- Changed legal_modern SELECT NEW.card_id, 'legal_modern', OLD.legal_modern::TEXT, NEW.legal_modern::TEXT, NEW.change_set_id - WHERE OLD.legal_modern IS NOT DISTINCT FROM NEW.legal_modern + WHERE OLD.legal_modern IS DISTINCT FROM NEW.legal_modern UNION -- Changed legal_oathbreaker SELECT NEW.card_id, 'legal_oathbreaker', OLD.legal_oathbreaker::TEXT, NEW.legal_oathbreaker::TEXT, NEW.change_set_id - WHERE OLD.legal_oathbreaker IS NOT DISTINCT FROM NEW.legal_oathbreaker + WHERE OLD.legal_oathbreaker IS DISTINCT FROM NEW.legal_oathbreaker UNION -- Changed legal_oldschool SELECT NEW.card_id, 'legal_oldschool', OLD.legal_oldschool::TEXT, NEW.legal_oldschool::TEXT, NEW.change_set_id - WHERE OLD.legal_oldschool IS NOT DISTINCT FROM NEW.legal_oldschool + WHERE OLD.legal_oldschool IS DISTINCT FROM NEW.legal_oldschool UNION -- Changed legal_pauper SELECT NEW.card_id, 'legal_pauper', OLD.legal_pauper::TEXT, NEW.legal_pauper::TEXT, NEW.change_set_id - WHERE OLD.legal_pauper IS NOT DISTINCT FROM NEW.legal_pauper + WHERE OLD.legal_pauper IS DISTINCT FROM NEW.legal_pauper UNION -- Changed legal_paupercommander SELECT NEW.card_id, 'legal_paupercommander', OLD.legal_paupercommander::TEXT, NEW.legal_paupercommander::TEXT, NEW.change_set_id - WHERE OLD.legal_paupercommander IS NOT DISTINCT FROM NEW.legal_paupercommander + WHERE OLD.legal_paupercommander IS DISTINCT FROM NEW.legal_paupercommander UNION -- Changed legal_penny SELECT NEW.card_id, 'legal_penny', OLD.legal_penny::TEXT, NEW.legal_penny::TEXT, NEW.change_set_id - WHERE OLD.legal_penny IS NOT DISTINCT FROM NEW.legal_penny + WHERE OLD.legal_penny IS DISTINCT FROM NEW.legal_penny UNION -- Changed legal_pioneer SELECT NEW.card_id, 'legal_pioneer', OLD.legal_pioneer::TEXT, NEW.legal_pioneer::TEXT, NEW.change_set_id - WHERE OLD.legal_pioneer IS NOT DISTINCT FROM NEW.legal_pioneer + WHERE OLD.legal_pioneer IS DISTINCT FROM NEW.legal_pioneer UNION -- Changed legal_predh SELECT NEW.card_id, 'legal_predh', OLD.legal_predh::TEXT, NEW.legal_predh::TEXT, NEW.change_set_id - WHERE OLD.legal_predh IS NOT DISTINCT FROM NEW.legal_predh + WHERE OLD.legal_predh IS DISTINCT FROM NEW.legal_predh UNION -- Changed legal_premodern SELECT NEW.card_id, 'legal_premodern', OLD.legal_premodern::TEXT, NEW.legal_premodern::TEXT, NEW.change_set_id - WHERE OLD.legal_premodern IS NOT DISTINCT FROM NEW.legal_premodern + WHERE OLD.legal_premodern IS DISTINCT FROM NEW.legal_premodern UNION -- Changed legal_standard SELECT NEW.card_id, 'legal_standard', OLD.legal_standard::TEXT, NEW.legal_standard::TEXT, NEW.change_set_id - WHERE OLD.legal_standard IS NOT DISTINCT FROM NEW.legal_standard + WHERE OLD.legal_standard IS DISTINCT FROM NEW.legal_standard UNION -- Changed legal_standardbrawl SELECT NEW.card_id, 'legal_standardbrawl', OLD.legal_standardbrawl::TEXT, NEW.legal_standardbrawl::TEXT, NEW.change_set_id - WHERE OLD.legal_standardbrawl IS NOT DISTINCT FROM NEW.legal_standardbrawl + WHERE OLD.legal_standardbrawl IS DISTINCT FROM NEW.legal_standardbrawl UNION -- Changed legal_timeless SELECT NEW.card_id, 'legal_timeless', OLD.legal_timeless::TEXT, NEW.legal_timeless::TEXT, NEW.change_set_id - WHERE OLD.legal_timeless IS NOT DISTINCT FROM NEW.legal_timeless + WHERE OLD.legal_timeless IS DISTINCT FROM NEW.legal_timeless UNION -- Changed legal_vintage SELECT NEW.card_id, 'legal_vintage', OLD.legal_vintage::TEXT, NEW.legal_vintage::TEXT, NEW.change_set_id - WHERE OLD.legal_vintage IS NOT DISTINCT FROM NEW.legal_vintage + WHERE OLD.legal_vintage IS DISTINCT FROM NEW.legal_vintage UNION -- Changed life_modifier SELECT NEW.card_id, 'life_modifier', OLD.life_modifier, NEW.life_modifier, NEW.change_set_id - WHERE OLD.life_modifier IS NOT DISTINCT FROM NEW.life_modifier + WHERE OLD.life_modifier IS DISTINCT FROM NEW.life_modifier UNION -- Changed loyalty SELECT NEW.card_id, 'loyalty', OLD.loyalty, NEW.loyalty, NEW.change_set_id - WHERE OLD.loyalty IS NOT DISTINCT FROM NEW.loyalty + WHERE OLD.loyalty IS DISTINCT FROM NEW.loyalty UNION -- Changed mana_cost SELECT NEW.card_id, 'mana_cost', OLD.mana_cost, NEW.mana_cost, NEW.change_set_id - WHERE OLD.mana_cost IS NOT DISTINCT FROM NEW.mana_cost + WHERE OLD.mana_cost IS DISTINCT FROM NEW.mana_cost UNION -- Changed mtgo_id SELECT NEW.card_id, 'mtgo_id', OLD.mtgo_id::TEXT, NEW.mtgo_id::TEXT, NEW.change_set_id - WHERE OLD.mtgo_id IS NOT DISTINCT FROM NEW.mtgo_id + WHERE OLD.mtgo_id IS DISTINCT FROM NEW.mtgo_id UNION -- Changed multiverse_ids SELECT NEW.card_id, 'multiverse_ids', OLD.multiverse_ids, NEW.multiverse_ids, NEW.change_set_id - WHERE OLD.multiverse_ids IS NOT DISTINCT FROM NEW.multiverse_ids + WHERE OLD.multiverse_ids IS DISTINCT FROM NEW.multiverse_ids UNION -- Changed name SELECT NEW.card_id, 'name', OLD.name, NEW.name, NEW.change_set_id - WHERE OLD.name IS NOT DISTINCT FROM NEW.name + WHERE OLD.name IS DISTINCT FROM NEW.name UNION -- Changed nonfoil SELECT NEW.card_id, 'nonfoil', OLD.nonfoil::TEXT, NEW.nonfoil::TEXT, NEW.change_set_id - WHERE OLD.nonfoil IS NOT DISTINCT FROM NEW.nonfoil + WHERE OLD.nonfoil IS DISTINCT FROM NEW.nonfoil UNION -- Changed oracle_id SELECT NEW.card_id, 'oracle_id', OLD.oracle_id::TEXT, NEW.oracle_id::TEXT, NEW.change_set_id - WHERE OLD.oracle_id IS NOT DISTINCT FROM NEW.oracle_id + WHERE OLD.oracle_id IS DISTINCT FROM NEW.oracle_id UNION -- Changed oracle_text SELECT NEW.card_id, 'oracle_text', OLD.oracle_text, NEW.oracle_text, NEW.change_set_id - WHERE OLD.oracle_text IS NOT DISTINCT FROM NEW.oracle_text + WHERE OLD.oracle_text IS DISTINCT FROM NEW.oracle_text UNION -- Changed oversized SELECT NEW.card_id, 'oversized', OLD.oversized::TEXT, NEW.oversized::TEXT, NEW.change_set_id - WHERE OLD.oversized IS NOT DISTINCT FROM NEW.oversized + WHERE OLD.oversized IS DISTINCT FROM NEW.oversized UNION -- Changed penny_rank SELECT NEW.card_id, 'penny_rank', OLD.penny_rank::TEXT, NEW.penny_rank::TEXT, NEW.change_set_id - WHERE OLD.penny_rank IS NOT DISTINCT FROM NEW.penny_rank + WHERE OLD.penny_rank IS DISTINCT FROM NEW.penny_rank UNION -- Changed power SELECT NEW.card_id, 'power', OLD.power, NEW.power, NEW.change_set_id - WHERE OLD.power IS NOT DISTINCT FROM NEW.power + WHERE OLD.power IS DISTINCT FROM NEW.power UNION -- Changed preview_date SELECT NEW.card_id, 'preview_date', TO_CHAR(OLD.preview_date, 'YYYY-MM-DD'), TO_CHAR(NEW.preview_date, 'YYYY-MM-DD'), NEW.change_set_id - WHERE OLD.preview_date IS NOT DISTINCT FROM NEW.preview_date + WHERE OLD.preview_date IS DISTINCT FROM NEW.preview_date UNION -- Changed preview_source SELECT NEW.card_id, 'preview_source', OLD.preview_source, NEW.preview_source, NEW.change_set_id - WHERE OLD.preview_source IS NOT DISTINCT FROM NEW.preview_source + WHERE OLD.preview_source IS DISTINCT FROM NEW.preview_source UNION -- Changed preview_source_uri SELECT NEW.card_id, 'preview_source_uri', OLD.preview_source_uri, NEW.preview_source_uri, NEW.change_set_id - WHERE OLD.preview_source_uri IS NOT DISTINCT FROM NEW.preview_source_uri + WHERE OLD.preview_source_uri IS DISTINCT FROM NEW.preview_source_uri UNION -- Changed price_eur SELECT NEW.card_id, 'price_eur', OLD.price_eur::TEXT, NEW.price_eur::TEXT, NEW.change_set_id - WHERE OLD.price_eur IS NOT DISTINCT FROM NEW.price_eur + WHERE OLD.price_eur IS DISTINCT FROM NEW.price_eur UNION -- Changed price_eur_foil SELECT NEW.card_id, 'price_eur_foil', OLD.price_eur_foil::TEXT, NEW.price_eur_foil::TEXT, NEW.change_set_id - WHERE OLD.price_eur_foil IS NOT DISTINCT FROM NEW.price_eur_foil + WHERE OLD.price_eur_foil IS DISTINCT FROM NEW.price_eur_foil UNION -- Changed price_tix SELECT NEW.card_id, 'price_tix', OLD.price_tix::TEXT, NEW.price_tix::TEXT, NEW.change_set_id - WHERE OLD.price_tix IS NOT DISTINCT FROM NEW.price_tix + WHERE OLD.price_tix IS DISTINCT FROM NEW.price_tix UNION -- Changed price_usd SELECT NEW.card_id, 'price_usd', OLD.price_usd::TEXT, NEW.price_usd::TEXT, NEW.change_set_id - WHERE OLD.price_usd IS NOT DISTINCT FROM NEW.price_usd + WHERE OLD.price_usd IS DISTINCT FROM NEW.price_usd UNION -- Changed price_usd_etched SELECT NEW.card_id, 'price_usd_etched', OLD.price_usd_etched::TEXT, NEW.price_usd_etched::TEXT, NEW.change_set_id - WHERE OLD.price_usd_etched IS NOT DISTINCT FROM NEW.price_usd_etched + WHERE OLD.price_usd_etched IS DISTINCT FROM NEW.price_usd_etched UNION -- Changed price_usd_foil SELECT NEW.card_id, 'price_usd_foil', OLD.price_usd_foil::TEXT, NEW.price_usd_foil::TEXT, NEW.change_set_id - WHERE OLD.price_usd_foil IS NOT DISTINCT FROM NEW.price_usd_foil + WHERE OLD.price_usd_foil IS DISTINCT FROM NEW.price_usd_foil UNION -- Changed printed_name SELECT NEW.card_id, 'printed_name', OLD.printed_name, NEW.printed_name, NEW.change_set_id - WHERE OLD.printed_name IS NOT DISTINCT FROM NEW.printed_name + WHERE OLD.printed_name IS DISTINCT FROM NEW.printed_name UNION -- Changed printed_text SELECT NEW.card_id, 'printed_text', OLD.printed_text, NEW.printed_text, NEW.change_set_id - WHERE OLD.printed_text IS NOT DISTINCT FROM NEW.printed_text + WHERE OLD.printed_text IS DISTINCT FROM NEW.printed_text UNION -- Changed printed_type_line SELECT NEW.card_id, 'printed_type_line', OLD.printed_type_line, NEW.printed_type_line, NEW.change_set_id - WHERE OLD.printed_type_line IS NOT DISTINCT FROM NEW.printed_type_line + WHERE OLD.printed_type_line IS DISTINCT FROM NEW.printed_type_line UNION -- Changed prints_search_uri SELECT NEW.card_id, 'printed_search_uri', OLD.printed_search_uri, NEW.printed_search_uri, NEW.change_set_id - WHERE OLD.printed_search_uri IS NOT DISTINCT FROM NEW.printed_search_uri + WHERE OLD.printed_search_uri IS DISTINCT FROM NEW.printed_search_uri UNION -- Changed produced_mana SELECT NEW.card_id, 'produced_mana', OLD.produced_mana, NEW.produced_mana, NEW.change_set_id - WHERE OLD.produced_mana IS NOT DISTINCT FROM NEW.produced_mana + WHERE OLD.produced_mana IS DISTINCT FROM NEW.produced_mana UNION -- Changed promo SELECT NEW.card_id, 'promo', OLD.promo::TEXT, NEW.promo::TEXT, NEW.change_set_id - WHERE OLD.promo IS NOT DISTINCT FROM NEW.promo + WHERE OLD.promo IS DISTINCT FROM NEW.promo UNION -- Changed purchase_cardhoarder SELECT NEW.card_id, 'purchase_cardhoarder', OLD.purchase_cardhoarder, NEW.purchase_cardhoarder, NEW.change_set_id - WHERE OLD.purchase_cardhoarder IS NOT DISTINCT FROM NEW.purchase_cardhoarder + WHERE OLD.purchase_cardhoarder IS DISTINCT FROM NEW.purchase_cardhoarder UNION -- Changed purchase_cardmarket SELECT NEW.card_id, 'purchase_cardmarket', OLD.purchase_cardmarket, NEW.purchase_cardmarket, NEW.change_set_id - WHERE OLD.purchase_cardmarket IS NOT DISTINCT FROM NEW.purchase_cardmarket + WHERE OLD.purchase_cardmarket IS DISTINCT FROM NEW.purchase_cardmarket UNION -- Changed purchase_tcgplayer SELECT NEW.card_id, 'purchase_tcgplayer', OLD.purchase_tcgplayer, NEW.purchase_tcgplayer, NEW.change_set_id - WHERE OLD.purchase_tcgplayer IS NOT DISTINCT FROM NEW.purchase_tcgplayer + WHERE OLD.purchase_tcgplayer IS DISTINCT FROM NEW.purchase_tcgplayer UNION -- Changed rarity SELECT NEW.card_id, 'rarity', OLD.rarity, NEW.rarity, NEW.change_set_id - WHERE OLD.rarity IS NOT DISTINCT FROM NEW.rarity + WHERE OLD.rarity IS DISTINCT FROM NEW.rarity UNION -- Changed released_at SELECT NEW.card_id, 'released_at', TO_CHAR(OLD.released_at, 'YYYY-MM-DD'), TO_CHAR(NEW.released_at, 'YYYY-MM-DD'), NEW.change_set_id - WHERE OLD.released_at IS NOT DISTINCT FROM NEW.released_at + WHERE OLD.released_at IS DISTINCT FROM NEW.released_at UNION -- Changed reprint SELECT NEW.card_id, 'reprint', OLD.reprint::TEXT, NEW.reprint::TEXT, NEW.change_set_id - WHERE OLD.reprint IS NOT DISTINCT FROM NEW.reprint + WHERE OLD.reprint IS DISTINCT FROM NEW.reprint UNION -- Changed reserved SELECT NEW.card_id, 'reserved', OLD.reserved::TEXT, NEW.reserved::TEXT, NEW.change_set_id - WHERE OLD.reserved IS NOT DISTINCT FROM NEW.reserved + WHERE OLD.reserved IS DISTINCT FROM NEW.reserved UNION -- Changed rulings_uri SELECT NEW.card_id, 'rulings_uri', OLD.rulings_uri, NEW.rulings_uri, NEW.change_set_id - WHERE OLD.rulings_uri IS NOT DISTINCT FROM NEW.rulings_uri + WHERE OLD.rulings_uri IS DISTINCT FROM NEW.rulings_uri UNION -- Changed scryfall_set_uri SELECT NEW.card_id, 'scryfall_set_uri', OLD.scryfall_set_uri, NEW.scryfall_set_uri, NEW.change_set_id - WHERE OLD.scryfall_set_uri IS NOT DISTINCT FROM NEW.scryfall_set_uri + WHERE OLD.scryfall_set_uri IS DISTINCT FROM NEW.scryfall_set_uri UNION -- Changed scryfall_uri SELECT NEW.card_id, 'scryfall_uri', OLD.scryfall_uri, NEW.scryfall_uri, NEW.change_set_id - WHERE OLD.scryfall_uri IS NOT DISTINCT FROM NEW.scryfall_uri + WHERE OLD.scryfall_uri IS DISTINCT FROM NEW.scryfall_uri UNION -- Changed security_stamp SELECT NEW.card_id, 'security_stamp', OLD.security_stamp, NEW.security_stamp, NEW.change_set_id - WHERE OLD.security_stamp IS NOT DISTINCT FROM NEW.security_stamp + WHERE OLD.security_stamp IS DISTINCT FROM NEW.security_stamp UNION -- Changed set SELECT NEW.card_id, 'set', OLD.set, NEW.set, NEW.change_set_id - WHERE OLD.set IS NOT DISTINCT FROM NEW.set + WHERE OLD.set IS DISTINCT FROM NEW.set UNION -- Changed set_id SELECT NEW.card_id, 'set_id', OLD.set_id::TEXT, NEW.set_id::TEXT, NEW.change_set_id - WHERE OLD.set_id IS NOT DISTINCT FROM NEW.set_id + WHERE OLD.set_id IS DISTINCT FROM NEW.set_id UNION -- Changed set_name SELECT NEW.card_id, 'set_name', OLD.set_name, NEW.set_name, NEW.change_set_id - WHERE OLD.set_name IS NOT DISTINCT FROM NEW.set_name + WHERE OLD.set_name IS DISTINCT FROM NEW.set_name UNION -- Changed set_search_uri SELECT NEW.card_id, 'set_search_uri', OLD.set_search_uri, NEW.set_search_uri, NEW.change_set_id - WHERE OLD.set_search_uri IS NOT DISTINCT FROM NEW.set_search_uri + WHERE OLD.set_search_uri IS DISTINCT FROM NEW.set_search_uri UNION -- Changed set_type SELECT NEW.card_id, 'set_type', OLD.set_type, NEW.set_type, NEW.change_set_id - WHERE OLD.set_type IS NOT DISTINCT FROM NEW.set_type + WHERE OLD.set_type IS DISTINCT FROM NEW.set_type UNION -- Changed set_uri SELECT NEW.card_id, 'set_uri', OLD.set_uri, NEW.set_uri, NEW.change_set_id - WHERE OLD.set_uri IS NOT DISTINCT FROM NEW.set_uri + WHERE OLD.set_uri IS DISTINCT FROM NEW.set_uri UNION -- Changed story_spotlight SELECT NEW.card_id, 'story_spotlight', OLD.story_spotlight::TEXT, NEW.story_spotlight::TEXT, NEW.change_set_id - WHERE OLD.story_spotlight IS NOT DISTINCT FROM NEW.story_spotlight + WHERE OLD.story_spotlight IS DISTINCT FROM NEW.story_spotlight UNION -- Changed tcgplayer_id SELECT NEW.card_id, 'tcgplayer_id', OLD.tcgplayer_id::TEXT, NEW.tcgplayer_id::TEXT, NEW.change_set_id - WHERE OLD.tcgplayer_id IS NOT DISTINCT FROM NEW.tcgplayer_id + WHERE OLD.tcgplayer_id IS DISTINCT FROM NEW.tcgplayer_id UNION -- Changed textless SELECT NEW.card_id, 'textless', OLD.textless::TEXT, NEW.textless::TEXT, NEW.change_set_id - WHERE OLD.textless IS NOT DISTINCT FROM NEW.textless + WHERE OLD.textless IS DISTINCT FROM NEW.textless UNION -- Changed toughness SELECT NEW.card_id, 'toughness', OLD.toughness, NEW.toughness, NEW.change_set_id - WHERE OLD.toughness IS NOT DISTINCT FROM NEW.toughness + WHERE OLD.toughness IS DISTINCT FROM NEW.toughness UNION -- Changed type_line SELECT NEW.card_id, 'type_line', OLD.type_line, NEW.type_line, NEW.change_set_id - WHERE OLD.type_line IS NOT DISTINCT FROM NEW.type_line + WHERE OLD.type_line IS DISTINCT FROM NEW.type_line UNION -- Changed uri SELECT NEW.card_id, 'uri', OLD.uri, NEW.uri, NEW.change_set_id - WHERE OLD.uri IS NOT DISTINCT FROM NEW.uri + WHERE OLD.uri IS DISTINCT FROM NEW.uri UNION -- Changed uri_edhrec SELECT NEW.card_id, 'uri_edhrec', OLD.uri_edhrec, NEW.uri_edhrec, NEW.change_set_id - WHERE OLD.uri_edhrec IS NOT DISTINCT FROM NEW.uri_edhrec + WHERE OLD.uri_edhrec IS DISTINCT FROM NEW.uri_edhrec UNION -- Changed uri_gatherer SELECT NEW.card_id, 'uri_gatherer', OLD.uri_gatherer, NEW.uri_gatherer, NEW.change_set_id - WHERE OLD.uri_gatherer IS NOT DISTINCT FROM NEW.uri_gatherer + WHERE OLD.uri_gatherer IS DISTINCT FROM NEW.uri_gatherer UNION -- Changed uri_tcgplayer_infinite_articles SELECT NEW.card_id, 'uri_tcgplayer_infinite_articles', OLD.uri_tcgplayer_infinite_articles, NEW.uri_tcgplayer_infinite_articles, NEW.change_set_id - WHERE OLD.uri_tcgplayer_infinite_articles IS NOT DISTINCT FROM NEW.uri_tcgplayer_infinite_articles + WHERE OLD.uri_tcgplayer_infinite_articles IS DISTINCT FROM NEW.uri_tcgplayer_infinite_articles UNION -- Changed uri_tcgplayer_infinite_decks SELECT NEW.card_id, 'uri_tcgplayer_infinite_decks', OLD.uri_tcgplayer_infinite_decks, NEW.uri_tcgplayer_infinite_decks, NEW.change_set_id - WHERE OLD.uri_tcgplayer_infinite_decks IS NOT DISTINCT FROM NEW.uri_tcgplayer_infinite_decks + WHERE OLD.uri_tcgplayer_infinite_decks IS DISTINCT FROM NEW.uri_tcgplayer_infinite_decks UNION -- Changed variation SELECT NEW.card_id, 'variation', OLD.variation::TEXT, NEW.variation::TEXT, NEW.change_set_id - WHERE OLD.variation IS NOT DISTINCT FROM NEW.variation + WHERE OLD.variation IS DISTINCT FROM NEW.variation UNION -- Changed active SELECT NEW.card_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31150_tri_TCG_MTG_Inventory.sql b/static/PostgreSQL/31150_tri_TCG_MTG_Inventory.sql index 9a9b7ca..b377f6a 100644 --- a/static/PostgreSQL/31150_tri_TCG_MTG_Inventory.sql +++ b/static/PostgreSQL/31150_tri_TCG_MTG_Inventory.sql @@ -48,135 +48,135 @@ BEGIN ) -- Changed card_id SELECT NEW.inventory_id, 'card_id', OLD.card_id::TEXT, NEW.card_id::TEXT, NEW.change_set_id - WHERE OLD.card_id IS NOT DISTINCT FROM NEW.card_id + WHERE OLD.card_id IS DISTINCT FROM NEW.card_id UNION -- Changed finish_id SELECT NEW.inventory_id, 'finish_id', OLD.finish_id::TEXT, NEW.finish_id::TEXT, NEW.change_set_id - WHERE OLD.finish_id IS NOT DISTINCT FROM NEW.finish_id + WHERE OLD.finish_id IS DISTINCT FROM NEW.finish_id UNION -- Changed condition_id SELECT NEW.inventory_id, 'condition_id', OLD.condition_id::TEXT, NEW.condition_id::TEXT, NEW.change_set_id - WHERE OLD.condition_id IS NOT DISTINCT FROM NEW.condition_id + WHERE OLD.condition_id IS DISTINCT FROM NEW.condition_id UNION -- Changed sleeve_colour_name SELECT NEW.inventory_id, 'sleeve_colour_name', OLD.sleeve_colour_name, NEW.sleeve_colour_name, NEW.change_set_id - WHERE OLD.sleeve_colour_name IS NOT DISTINCT FROM NEW.sleeve_colour_name + WHERE OLD.sleeve_colour_name IS DISTINCT FROM NEW.sleeve_colour_name UNION -- Changed location_name SELECT NEW.inventory_id, 'location_name', OLD.location_name, NEW.location_name, NEW.change_set_id - WHERE OLD.location_name IS NOT DISTINCT FROM NEW.location_name + WHERE OLD.location_name IS DISTINCT FROM NEW.location_name UNION -- Changed acquired_from SELECT NEW.inventory_id, 'acquired_from', OLD.acquired_from, NEW.acquired_from, NEW.change_set_id - WHERE OLD.acquired_from IS NOT DISTINCT FROM NEW.acquired_from + WHERE OLD.acquired_from IS DISTINCT FROM NEW.acquired_from UNION -- Changed acquired_on SELECT NEW.inventory_id, 'acquired_on', TO_CHAR(OLD.acquired_on, 'YYYY-MM-DD'), TO_CHAR(NEW.acquired_on, 'YYYY-MM-DD'), NEW.change_set_id - WHERE OLD.acquired_on IS NOT DISTINCT FROM NEW.acquired_on + WHERE OLD.acquired_on IS DISTINCT FROM NEW.acquired_on UNION -- Changed cost_gbp SELECT NEW.inventory_id, 'cost_gbp', OLD.cost_gbp::TEXT, NEW.cost_gbp::TEXT, NEW.change_set_id - WHERE OLD.cost_gbp IS NOT DISTINCT FROM NEW.cost_gbp + WHERE OLD.cost_gbp IS DISTINCT FROM NEW.cost_gbp UNION -- Changed sale_price_gbp SELECT NEW.inventory_id, 'sale_price_gbp', OLD.sale_price_gbp::TEXT, NEW.sale_price_gbp::TEXT, NEW.change_set_id - WHERE OLD.sale_price_gbp IS NOT DISTINCT FROM NEW.sale_price_gbp + WHERE OLD.sale_price_gbp IS DISTINCT FROM NEW.sale_price_gbp UNION -- Changed is_sold SELECT NEW.inventory_id, 'is_sold', OLD.is_sold::TEXT, NEW.is_sold::TEXT, NEW.change_set_id - WHERE OLD.is_sold IS NOT DISTINCT FROM NEW.is_sold + WHERE OLD.is_sold IS DISTINCT FROM NEW.is_sold UNION -- Changed is_destroyed SELECT NEW.inventory_id, 'is_destroyed', OLD.is_destroyed::TEXT, NEW.is_destroyed::TEXT, NEW.change_set_id - WHERE OLD.is_destroyed IS NOT DISTINCT FROM NEW.is_destroyed + WHERE OLD.is_destroyed IS DISTINCT FROM NEW.is_destroyed UNION -- Changed notes SELECT NEW.inventory_id, 'notes', OLD.notes, NEW.notes, NEW.change_set_id - WHERE OLD.notes IS NOT DISTINCT FROM NEW.notes + WHERE OLD.notes IS DISTINCT FROM NEW.notes UNION -- Changed alterations_customisations SELECT NEW.inventory_id, 'alterations_customisations', OLD.alterations_customisations, NEW.alterations_customisations, NEW.change_set_id - WHERE OLD.alterations_customisations IS NOT DISTINCT FROM NEW.alterations_customisations + WHERE OLD.alterations_customisations IS DISTINCT FROM NEW.alterations_customisations UNION -- Changed grading_company_name SELECT NEW.inventory_id, 'grading_company_name', OLD.grading_company_name, NEW.grading_company_name, NEW.change_set_id - WHERE OLD.grading_company_name IS NOT DISTINCT FROM NEW.grading_company_name + WHERE OLD.grading_company_name IS DISTINCT FROM NEW.grading_company_name UNION -- Changed grading_score SELECT NEW.inventory_id, 'grading_score', OLD.grading_score, NEW.grading_score, NEW.change_set_id - WHERE OLD.grading_score IS NOT DISTINCT FROM NEW.grading_score + WHERE OLD.grading_score IS DISTINCT FROM NEW.grading_score UNION -- Changed subgrades SELECT NEW.inventory_id, 'subgrades', OLD.subgrades, NEW.subgrades, NEW.change_set_id - WHERE OLD.subgrades IS NOT DISTINCT FROM NEW.subgrades + WHERE OLD.subgrades IS DISTINCT FROM NEW.subgrades UNION -- Changed misprint_errors SELECT NEW.inventory_id, 'misprint_errors', OLD.misprint_errors, NEW.misprint_errors, NEW.change_set_id - WHERE OLD.misprint_errors IS NOT DISTINCT FROM NEW.misprint_errors + WHERE OLD.misprint_errors IS DISTINCT FROM NEW.misprint_errors UNION -- Changed miscut_errors SELECT NEW.inventory_id, 'miscut_errors', OLD.miscut_errors, NEW.miscut_errors, NEW.change_set_id - WHERE OLD.miscut_errors IS NOT DISTINCT FROM NEW.miscut_errors + WHERE OLD.miscut_errors IS DISTINCT FROM NEW.miscut_errors UNION -- Changed playability SELECT NEW.inventory_id, 'playability', OLD.playability, NEW.playability, NEW.change_set_id - WHERE OLD.playability IS NOT DISTINCT FROM NEW.playability + WHERE OLD.playability IS DISTINCT FROM NEW.playability UNION -- Changed owner_user_id SELECT NEW.inventory_id, 'owner_user_id', OLD.owner_user_id::TEXT, NEW.owner_user_id::TEXT, NEW.change_set_id - WHERE OLD.owner_user_id IS NOT DISTINCT FROM NEW.owner_user_id + WHERE OLD.owner_user_id IS DISTINCT FROM NEW.owner_user_id UNION -- Changed ownership_status_name SELECT NEW.inventory_id, 'ownership_status_name', OLD.ownership_status_name, NEW.ownership_status_name, NEW.change_set_id - WHERE OLD.ownership_status_name IS NOT DISTINCT FROM NEW.ownership_status_name + WHERE OLD.ownership_status_name IS DISTINCT FROM NEW.ownership_status_name UNION -- Changed trading_status_name SELECT NEW.inventory_id, 'trading_status_name', OLD.trading_status_name, NEW.trading_status_name, NEW.change_set_id - WHERE OLD.trading_status_name IS NOT DISTINCT FROM NEW.trading_status_name + WHERE OLD.trading_status_name IS DISTINCT FROM NEW.trading_status_name UNION -- Changed loaned_to_user_id SELECT NEW.inventory_id, 'loaned_to_user_id', OLD.loaned_to_user_id::TEXT, NEW.loaned_to_user_id::TEXT, NEW.change_set_id - WHERE OLD.loaned_to_user_id IS NOT DISTINCT FROM NEW.loaned_to_user_id + WHERE OLD.loaned_to_user_id IS DISTINCT FROM NEW.loaned_to_user_id UNION -- Changed acquired_on SELECT NEW.inventory_id, 'acquired_on', TO_CHAR(OLD.acquired_on, 'YYYY-MM-DD'), TO_CHAR(NEW.acquired_on, 'YYYY-MM-DD'), NEW.change_set_id - WHERE OLD.acquired_on IS NOT DISTINCT FROM NEW.acquired_on + WHERE OLD.acquired_on IS DISTINCT FROM NEW.acquired_on UNION -- Changed acquired_on SELECT NEW.inventory_id, 'acquired_on', TO_CHAR(OLD.acquired_on, 'YYYY-MM-DD'), TO_CHAR(NEW.acquired_on, 'YYYY-MM-DD'), NEW.change_set_id - WHERE OLD.acquired_on IS NOT DISTINCT FROM NEW.acquired_on + WHERE OLD.acquired_on IS DISTINCT FROM NEW.acquired_on UNION -- Changed provenance SELECT NEW.inventory_id, 'provenance', OLD.provenance, NEW.provenance, NEW.change_set_id - WHERE OLD.provenance IS NOT DISTINCT FROM NEW.provenance + WHERE OLD.provenance IS DISTINCT FROM NEW.provenance UNION -- Changed signed_by_names SELECT NEW.inventory_id, 'signed_by_names', OLD.signed_by_names, NEW.signed_by_names, NEW.change_set_id - WHERE OLD.signed_by_names IS NOT DISTINCT FROM NEW.signed_by_names + WHERE OLD.signed_by_names IS DISTINCT FROM NEW.signed_by_names UNION -- Changed signature_condition_name SELECT NEW.inventory_id, 'signature_condition_name', OLD.signature_condition_name, NEW.signature_condition_name, NEW.change_set_id - WHERE OLD.signature_condition_name IS NOT DISTINCT FROM NEW.signature_condition_name + WHERE OLD.signature_condition_name IS DISTINCT FROM NEW.signature_condition_name UNION -- Changed token_rear_side_card_id SELECT NEW.inventory_id, 'token_rear_side_card_id', OLD.token_rear_side_card_id::TEXT, NEW.token_rear_side_card_id::TEXT, NEW.change_set_id - WHERE OLD.token_rear_side_card_id IS NOT DISTINCT FROM NEW.token_rear_side_card_id + WHERE OLD.token_rear_side_card_id IS DISTINCT FROM NEW.token_rear_side_card_id UNION -- Changed front_name SELECT NEW.inventory_id, 'front_name', OLD.front_name, NEW.front_name, NEW.change_set_id - WHERE OLD.front_name IS NOT DISTINCT FROM NEW.front_name + WHERE OLD.front_name IS DISTINCT FROM NEW.front_name UNION -- Changed rear_name SELECT NEW.inventory_id, 'rear_name', OLD.rear_name, NEW.rear_name, NEW.change_set_id - WHERE OLD.rear_name IS NOT DISTINCT FROM NEW.rear_name + WHERE OLD.rear_name IS DISTINCT FROM NEW.rear_name UNION -- Changed display_order SELECT NEW.inventory_id, 'display_order', OLD.display_order::TEXT, NEW.display_order::TEXT, NEW.change_set_id - WHERE OLD.display_order IS NOT DISTINCT FROM NEW.display_order + WHERE OLD.display_order IS DISTINCT FROM NEW.display_order UNION -- Changed active SELECT NEW.inventory_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31196_tri_TCG_MTG_Deck_Commander_Bracket.sql b/static/PostgreSQL/31196_tri_TCG_MTG_Deck_Commander_Bracket.sql index db6eb96..ebb234e 100644 --- a/static/PostgreSQL/31196_tri_TCG_MTG_Deck_Commander_Bracket.sql +++ b/static/PostgreSQL/31196_tri_TCG_MTG_Deck_Commander_Bracket.sql @@ -48,19 +48,19 @@ BEGIN ) -- Changed name SELECT NEW.commander_bracket_id, 'name', OLD.name::TEXT, NEW.name::TEXT, NEW.change_set_id - WHERE OLD.name IS NOT DISTINCT FROM NEW.name + WHERE OLD.name IS DISTINCT FROM NEW.name UNION -- Changed description SELECT NEW.commander_bracket_id, 'description', OLD.description::TEXT, NEW.description::TEXT, NEW.change_set_id - WHERE OLD.description IS NOT DISTINCT FROM NEW.description + WHERE OLD.description IS DISTINCT FROM NEW.description UNION -- Changed display_order SELECT NEW.commander_bracket_id, 'display_order', OLD.display_order::TEXT, NEW.display_order::TEXT, NEW.change_set_id - WHERE OLD.display_order IS NOT DISTINCT FROM NEW.display_order + WHERE OLD.display_order IS DISTINCT FROM NEW.display_order UNION -- Changed active SELECT NEW.commander_bracket_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31200_tri_TCG_MTG_Deck.sql b/static/PostgreSQL/31200_tri_TCG_MTG_Deck.sql index 21bce65..5f775e2 100644 --- a/static/PostgreSQL/31200_tri_TCG_MTG_Deck.sql +++ b/static/PostgreSQL/31200_tri_TCG_MTG_Deck.sql @@ -48,19 +48,19 @@ BEGIN ) -- Changed name SELECT NEW.deck_id, 'name', OLD.name::TEXT, NEW.name::TEXT, NEW.change_set_id - WHERE OLD.name IS NOT DISTINCT FROM NEW.name + WHERE OLD.name IS DISTINCT FROM NEW.name UNION -- Changed is_commander SELECT NEW.deck_id, 'is_commander', OLD.is_commander::TEXT, NEW.is_commander::TEXT, NEW.change_set_id - WHERE OLD.is_commander IS NOT DISTINCT FROM NEW.is_commander + WHERE OLD.is_commander IS DISTINCT FROM NEW.is_commander UNION -- Changed commander_bracket_id SELECT NEW.deck_id, 'commander_bracket_id', OLD.commander_bracket_id::TEXT, NEW.commander_bracket_id::TEXT, NEW.change_set_id - WHERE OLD.commander_bracket_id IS NOT DISTINCT FROM NEW.commander_bracket_id + WHERE OLD.commander_bracket_id IS DISTINCT FROM NEW.commander_bracket_id UNION -- Changed active SELECT NEW.deck_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31204_tri_TCG_MTG_Deck_Inventory_Link.sql b/static/PostgreSQL/31204_tri_TCG_MTG_Deck_Inventory_Link.sql index 69ad5ca..18200c1 100644 --- a/static/PostgreSQL/31204_tri_TCG_MTG_Deck_Inventory_Link.sql +++ b/static/PostgreSQL/31204_tri_TCG_MTG_Deck_Inventory_Link.sql @@ -48,19 +48,19 @@ BEGIN ) -- Changed deck_id SELECT NEW.link_id, 'deck_id', OLD.deck_id::TEXT, NEW.deck_id::TEXT, NEW.change_set_id - WHERE OLD.deck_id IS NOT DISTINCT FROM NEW.deck_id + WHERE OLD.deck_id IS DISTINCT FROM NEW.deck_id UNION -- Changed inventory_id SELECT NEW.link_id, 'inventory_id', OLD.inventory_id::TEXT, NEW.inventory_id::TEXT, NEW.change_set_id - WHERE OLD.inventory_id IS NOT DISTINCT FROM NEW.inventory_id + WHERE OLD.inventory_id IS DISTINCT FROM NEW.inventory_id UNION -- Changed display_order SELECT NEW.link_id, 'display_order', OLD.display_order::TEXT, NEW.display_order::TEXT, NEW.change_set_id - WHERE OLD.display_order IS NOT DISTINCT FROM NEW.display_order + WHERE OLD.display_order IS DISTINCT FROM NEW.display_order UNION -- Changed active SELECT NEW.link_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31208_tri_TCG_MTG_Game.sql b/static/PostgreSQL/31208_tri_TCG_MTG_Game.sql index 834c1fc..036681d 100644 --- a/static/PostgreSQL/31208_tri_TCG_MTG_Game.sql +++ b/static/PostgreSQL/31208_tri_TCG_MTG_Game.sql @@ -48,39 +48,39 @@ BEGIN ) -- Changed notes SELECT NEW.game_id, 'notes', OLD.notes::TEXT, NEW.notes::TEXT, NEW.change_set_id - WHERE OLD.notes IS NOT DISTINCT FROM NEW.notes + WHERE OLD.notes IS DISTINCT FROM NEW.notes UNION -- Changed is_commander SELECT NEW.game_id, 'is_commander', OLD.is_commander::TEXT, NEW.is_commander::TEXT, NEW.change_set_id - WHERE OLD.is_commander IS NOT DISTINCT FROM NEW.is_commander + WHERE OLD.is_commander IS DISTINCT FROM NEW.is_commander UNION -- Changed is_draft SELECT NEW.game_id, 'is_draft', OLD.is_draft::TEXT, NEW.is_draft::TEXT, NEW.change_set_id - WHERE OLD.is_draft IS NOT DISTINCT FROM NEW.is_draft + WHERE OLD.is_draft IS DISTINCT FROM NEW.is_draft UNION -- Changed is_sealed SELECT NEW.game_id, 'is_sealed', OLD.is_sealed::TEXT, NEW.is_sealed::TEXT, NEW.change_set_id - WHERE OLD.is_sealed IS NOT DISTINCT FROM NEW.is_sealed + WHERE OLD.is_sealed IS DISTINCT FROM NEW.is_sealed UNION -- Changed location_name SELECT NEW.game_id, 'location_name', OLD.location_name, NEW.location_name, NEW.change_set_id - WHERE OLD.location_name IS NOT DISTINCT FROM NEW.location_name + WHERE OLD.location_name IS DISTINCT FROM NEW.location_name UNION -- Changed start_on SELECT NEW.game_id, 'start_on', OLD.start_on::TEXT, NEW.start_on::TEXT, NEW.change_set_id - WHERE OLD.start_on IS NOT DISTINCT FROM NEW.start_on + WHERE OLD.start_on IS DISTINCT FROM NEW.start_on UNION -- Changed end_on SELECT NEW.game_id, 'end_on', OLD.end_on::TEXT, NEW.end_on::TEXT, NEW.change_set_id - WHERE OLD.end_on IS NOT DISTINCT FROM NEW.end_on + WHERE OLD.end_on IS DISTINCT FROM NEW.end_on UNION -- Changed starting_life SELECT NEW.game_id, 'starting_life', OLD.starting_life::TEXT, NEW.starting_life::TEXT, NEW.change_set_id - WHERE OLD.starting_life IS NOT DISTINCT FROM NEW.starting_life + WHERE OLD.starting_life IS DISTINCT FROM NEW.starting_life UNION -- Changed active SELECT NEW.game_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31212_tri_TCG_MTG_Game_Player.sql b/static/PostgreSQL/31212_tri_TCG_MTG_Game_Player.sql index 215cce1..86d7f4a 100644 --- a/static/PostgreSQL/31212_tri_TCG_MTG_Game_Player.sql +++ b/static/PostgreSQL/31212_tri_TCG_MTG_Game_Player.sql @@ -48,31 +48,31 @@ BEGIN ) -- Changed game_id SELECT NEW.player_id, 'game_id', OLD.game_id::TEXT, NEW.game_id::TEXT, NEW.change_set_id - WHERE OLD.game_id IS NOT DISTINCT FROM NEW.game_id + WHERE OLD.game_id IS DISTINCT FROM NEW.game_id UNION -- Changed user_id SELECT NEW.player_id, 'user_id', OLD.user_id::TEXT, NEW.user_id::TEXT, NEW.change_set_id - WHERE OLD.user_id IS NOT DISTINCT FROM NEW.user_id + WHERE OLD.user_id IS DISTINCT FROM NEW.user_id UNION -- Changed deck_id SELECT NEW.player_id, 'deck_id', OLD.deck_id::TEXT, NEW.deck_id::TEXT, NEW.change_set_id - WHERE OLD.deck_id IS NOT DISTINCT FROM NEW.deck_id + WHERE OLD.deck_id IS DISTINCT FROM NEW.deck_id UNION -- Changed name SELECT NEW.player_id, 'name', OLD.name, NEW.name, NEW.change_set_id - WHERE OLD.name IS NOT DISTINCT FROM NEW.name + WHERE OLD.name IS DISTINCT FROM NEW.name UNION -- Changed notes SELECT NEW.player_id, 'notes', OLD.notes, NEW.notes, NEW.change_set_id - WHERE OLD.notes IS NOT DISTINCT FROM NEW.notes + WHERE OLD.notes IS DISTINCT FROM NEW.notes UNION -- Changed display_order SELECT NEW.player_id, 'display_order', OLD.display_order::TEXT, NEW.display_order::TEXT, NEW.change_set_id - WHERE OLD.display_order IS NOT DISTINCT FROM NEW.display_order + WHERE OLD.display_order IS DISTINCT FROM NEW.display_order UNION -- Changed active SELECT NEW.player_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31216_tri_TCG_MTG_Game_Round.sql b/static/PostgreSQL/31216_tri_TCG_MTG_Game_Round.sql index 1ae0201..5e88d86 100644 --- a/static/PostgreSQL/31216_tri_TCG_MTG_Game_Round.sql +++ b/static/PostgreSQL/31216_tri_TCG_MTG_Game_Round.sql @@ -48,19 +48,19 @@ BEGIN ) -- Changed game_id SELECT NEW.round_id, 'game_id', OLD.game_id::TEXT, NEW.game_id::TEXT, NEW.change_set_id - WHERE OLD.game_id IS NOT DISTINCT FROM NEW.game_id + WHERE OLD.game_id IS DISTINCT FROM NEW.game_id UNION -- Changed notes SELECT NEW.round_id, 'notes', OLD.notes::TEXT, NEW.notes::TEXT, NEW.change_set_id - WHERE OLD.notes IS NOT DISTINCT FROM NEW.notes + WHERE OLD.notes IS DISTINCT FROM NEW.notes UNION -- Changed display_order SELECT NEW.round_id, 'display_order', OLD.display_order::TEXT, NEW.display_order::TEXT, NEW.change_set_id - WHERE OLD.display_order IS NOT DISTINCT FROM NEW.display_order + WHERE OLD.display_order IS DISTINCT FROM NEW.display_order UNION -- Changed active SELECT NEW.round_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31220_tri_TCG_MTG_Game_Round_Player_Damage.sql b/static/PostgreSQL/31220_tri_TCG_MTG_Game_Round_Player_Damage.sql index 05f79c8..e5ff502 100644 --- a/static/PostgreSQL/31220_tri_TCG_MTG_Game_Round_Player_Damage.sql +++ b/static/PostgreSQL/31220_tri_TCG_MTG_Game_Round_Player_Damage.sql @@ -48,35 +48,35 @@ BEGIN ) -- Changed round_id SELECT NEW.damage_id, 'round_id', OLD.round_id::TEXT, NEW.round_id::TEXT, NEW.change_set_id - WHERE OLD.round_id IS NOT DISTINCT FROM NEW.round_id + WHERE OLD.round_id IS DISTINCT FROM NEW.round_id UNION -- Changed player_id SELECT NEW.damage_id, 'player_id', OLD.player_id::TEXT, NEW.player_id::TEXT, NEW.change_set_id - WHERE OLD.player_id IS NOT DISTINCT FROM NEW.player_id + WHERE OLD.player_id IS DISTINCT FROM NEW.player_id UNION -- Changed received_from_commander_player_id SELECT NEW.damage_id, 'received_from_commander_player_id', OLD.received_from_commander_player_id::TEXT, NEW.received_from_commander_player_id::TEXT, NEW.change_set_id - WHERE OLD.received_from_commander_player_id IS NOT DISTINCT FROM NEW.received_from_commander_player_id + WHERE OLD.received_from_commander_player_id IS DISTINCT FROM NEW.received_from_commander_player_id UNION -- Changed life_gain SELECT NEW.damage_id, 'life_gain', OLD.life_gain::TEXT, NEW.life_gain::TEXT, NEW.change_set_id - WHERE OLD.life_gain IS NOT DISTINCT FROM NEW.life_gain + WHERE OLD.life_gain IS DISTINCT FROM NEW.life_gain UNION -- Changed life_loss SELECT NEW.damage_id, 'life_loss', OLD.life_loss::TEXT, NEW.life_loss::TEXT, NEW.change_set_id - WHERE OLD.life_loss IS NOT DISTINCT FROM NEW.life_loss + WHERE OLD.life_loss IS DISTINCT FROM NEW.life_loss UNION -- Changed commander_deaths SELECT NEW.damage_id, 'commander_deaths', OLD.commander_deaths::TEXT, NEW.commander_deaths::TEXT, NEW.change_set_id - WHERE OLD.commander_deaths IS NOT DISTINCT FROM NEW.commander_deaths + WHERE OLD.commander_deaths IS DISTINCT FROM NEW.commander_deaths UNION -- Changed is_eliminated SELECT NEW.damage_id, 'is_eliminated', OLD.is_eliminated::TEXT, NEW.is_eliminated::TEXT, NEW.change_set_id - WHERE OLD.is_eliminated IS NOT DISTINCT FROM NEW.is_eliminated + WHERE OLD.is_eliminated IS DISTINCT FROM NEW.is_eliminated UNION -- Changed active SELECT NEW.damage_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31224_tri_TCG_MTG_Game_Session_Member.sql b/static/PostgreSQL/31224_tri_TCG_MTG_Game_Session_Member.sql index 3caa25a..3f0b74b 100644 --- a/static/PostgreSQL/31224_tri_TCG_MTG_Game_Session_Member.sql +++ b/static/PostgreSQL/31224_tri_TCG_MTG_Game_Session_Member.sql @@ -48,15 +48,15 @@ BEGIN ) -- Changed user_id SELECT NEW.member_id, 'user_id', OLD.user_id::TEXT, NEW.user_id::TEXT, NEW.change_set_id - WHERE OLD.user_id IS NOT DISTINCT FROM NEW.user_id + WHERE OLD.user_id IS DISTINCT FROM NEW.user_id UNION -- Changed is_permitted SELECT NEW.member_id, 'is_permitted', OLD.is_permitted::TEXT, NEW.is_permitted::TEXT, NEW.change_set_id - WHERE OLD.is_permitted IS NOT DISTINCT FROM NEW.is_permitted + WHERE OLD.is_permitted IS DISTINCT FROM NEW.is_permitted UNION -- Changed active SELECT NEW.member_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/31300_tri_TCG_Statistic.sql b/static/PostgreSQL/31300_tri_TCG_Statistic.sql index 72e80fd..21bb6f4 100644 --- a/static/PostgreSQL/31300_tri_TCG_Statistic.sql +++ b/static/PostgreSQL/31300_tri_TCG_Statistic.sql @@ -48,35 +48,35 @@ BEGIN ) -- Changed entity_type_code SELECT NEW.statistic_id, 'entity_type_code', OLD.entity_type_code, NEW.entity_type_code, NEW.change_set_id - WHERE OLD.entity_type_code IS NOT DISTINCT FROM NEW.entity_type_code + WHERE OLD.entity_type_code IS DISTINCT FROM NEW.entity_type_code UNION -- Changed entity_record_id SELECT NEW.statistic_id, 'entity_record_id', OLD.entity_record_id::TEXT, NEW.entity_record_id::TEXT, NEW.change_set_id - WHERE OLD.entity_record_id IS NOT DISTINCT FROM NEW.entity_record_id + WHERE OLD.entity_record_id IS DISTINCT FROM NEW.entity_record_id UNION -- Changed name SELECT NEW.statistic_id, 'name', OLD.name, NEW.name, NEW.change_set_id - WHERE OLD.name IS NOT DISTINCT FROM NEW.name + WHERE OLD.name IS DISTINCT FROM NEW.name UNION -- Changed value_bool SELECT NEW.statistic_id, 'value_bool', OLD.value_bool::TEXT, NEW.value_bool::TEXT, NEW.change_set_id - WHERE OLD.value_bool IS NOT DISTINCT FROM NEW.value_bool + WHERE OLD.value_bool IS DISTINCT FROM NEW.value_bool UNION -- Changed value_float SELECT NEW.statistic_id, 'value_float', OLD.value_float::TEXT, NEW.value_float::TEXT, NEW.change_set_id - WHERE OLD.value_float IS NOT DISTINCT FROM NEW.value_float + WHERE OLD.value_float IS DISTINCT FROM NEW.value_float UNION -- Changed value_text SELECT NEW.statistic_id, 'value_text', OLD.value_text, NEW.value_text, NEW.change_set_id - WHERE OLD.value_text IS NOT DISTINCT FROM NEW.value_text + WHERE OLD.value_text IS DISTINCT FROM NEW.value_text UNION -- Changed value_timestamp SELECT NEW.statistic_id, 'value_timestamp', OLD.value_timestamp::TEXT, NEW.value_timestamp::TEXT, NEW.change_set_id - WHERE OLD.value_timestamp IS NOT DISTINCT FROM NEW.value_timestamp + WHERE OLD.value_timestamp IS DISTINCT FROM NEW.value_timestamp UNION -- Changed active SELECT NEW.statistic_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/PostgreSQL/70504_fn_TCG_User_Get_Many.sql b/static/PostgreSQL/70504_fn_TCG_User_Get_Many.sql index b298db2..3308486 100644 --- a/static/PostgreSQL/70504_fn_TCG_User_Get_Many.sql +++ b/static/PostgreSQL/70504_fn_TCG_User_Get_Many.sql @@ -1,6 +1,7 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_User_Get_Many ( - a_get_all_user BOOLEAN + a_access_user_id INT + , a_get_all_user BOOLEAN , a_get_inactive_user BOOLEAN , a_user_ids TEXT , a_require_all_id_filters_met BOOLEAN @@ -24,20 +25,30 @@ RETURNS TABLE ( LANGUAGE plpgsql AS $$ DECLARE + v_access_user_id INT; + v_can_admin BOOLEAN; v_get_all_user BOOLEAN; v_get_inactive_user BOOLEAN; v_require_all_id_filters_met BOOLEAN; v_require_any_id_filters_met BOOLEAN; v_user_ids TEXT; BEGIN + v_access_user_id := a_access_user_id; v_get_all_user := COALESCE(a_get_all_user, FALSE); v_get_inactive_user := COALESCE(a_get_inactive_user, FALSE); v_user_ids := TRIM(COALESCE(a_user_ids, '')); v_require_all_id_filters_met := COALESCE(a_require_all_id_filters_met, FALSE); v_require_any_id_filters_met := COALESCE(a_require_any_id_filters_met, FALSE); + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + + v_can_admin := COALESCE((SELECT TCG_USER.is_super_user FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1), FALSE); + -- Outputs - RETURN QUERY SELECT + RETURN QUERY + SELECT TCG_USER.user_id , TCG_USER.user_auth0_id , TCG_USER.firstname @@ -86,7 +97,8 @@ $$; SELECT * FROM tcg.public.FN_TCG_User_Get_Many ( - a_get_all_user := TRUE + a_access_user_id := 3 + , a_get_all_user := TRUE , a_get_inactive_user := FALSE , a_user_ids := '' , a_require_all_id_filters_met := TRUE diff --git a/static/PostgreSQL/70508_fn_TCG_User_Relationship_Get_Many.sql b/static/PostgreSQL/70508_fn_TCG_User_Relationship_Get_Many.sql index e5405fa..129e2f6 100644 --- a/static/PostgreSQL/70508_fn_TCG_User_Relationship_Get_Many.sql +++ b/static/PostgreSQL/70508_fn_TCG_User_Relationship_Get_Many.sql @@ -1,6 +1,7 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_User_Relationship_Get_Many ( - a_get_inactive_user_relationship BOOLEAN + a_access_user_id INT + , a_get_inactive_user_relationship BOOLEAN , a_get_all_user_follower BOOLEAN , a_user_follower_ids TEXT , a_get_all_user_following BOOLEAN @@ -25,6 +26,8 @@ RETURNS TABLE ( LANGUAGE plpgsql AS $$ DECLARE + v_access_user_id INT; + v_can_admin BOOLEAN; v_get_inactive_user_relationship BOOLEAN; v_get_all_user_follower BOOLEAN; v_user_follower_ids TEXT; @@ -34,6 +37,7 @@ DECLARE v_require_all_id_filters_met BOOLEAN; v_require_any_id_filters_met BOOLEAN; BEGIN + v_access_user_id := a_access_user_id; v_get_inactive_user_relationship := COALESCE(a_get_inactive_user_relationship, FALSE); v_get_all_user_follower := COALESCE(a_get_all_user_follower, FALSE); v_user_follower_ids := TRIM(COALESCE(a_user_follower_ids, '')); @@ -43,8 +47,31 @@ BEGIN v_require_all_id_filters_met := COALESCE(a_require_all_id_filters_met, FALSE); v_require_any_id_filters_met := COALESCE(a_require_any_id_filters_met, FALSE); + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + + v_can_admin := COALESCE((SELECT TCG_USER.is_super_user FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1), FALSE); + -- Outputs - RETURN QUERY SELECT + RETURN QUERY + WITH Access_Relationship AS ( + SELECT DISTINCT + RELATIONSHIP.relationship_id + FROM tcg.public.TCG_User_Relationship RELATIONSHIP + WHERE + ( + v_can_admin + OR RELATIONSHIP.follower_user_id = v_access_user_id + OR RELATIONSHIP.following_user_id = v_access_user_id + ) + AND ( + v_get_inactive_user_relationship + OR RELATIONSHIP.active + ) + + ) + SELECT DISTINCT RELATIONSHIP.relationship_id , RELATIONSHIP.follower_user_id , RELATIONSHIP.following_user_id @@ -57,6 +84,7 @@ BEGIN , RELATIONSHIP.updated_last_by_user_id , RELATIONSHIP.change_set_id FROM tcg.public.TCG_User_Relationship RELATIONSHIP + INNER JOIN Access_Relationship ACCESS_RELATIONSHIP ON RELATIONSHIP.relationship_id = ACCESS_RELATIONSHIP.relationship_id INNER JOIN tcg.public.TCG_User USER_FOLLOWER ON RELATIONSHIP.follower_user_id = USER_FOLLOWER.user_id INNER JOIN tcg.public.TCG_User USER_FOLLOWING ON RELATIONSHIP.following_user_id = USER_FOLLOWING.user_id WHERE @@ -91,10 +119,6 @@ BEGIN ) ) ) - AND ( - v_get_inactive_user_relationship - OR RELATIONSHIP.active - ) AND ( v_get_inactive_user OR ( @@ -104,8 +128,8 @@ BEGIN ) ORDER BY RELATIONSHIP.follower_user_id - , NOT RELATIONSHIP.is_following - , NOT RELATIONSHIP.is_blocked + , RELATIONSHIP.is_following DESC + , RELATIONSHIP.is_blocked DESC , RELATIONSHIP.following_user_id ; END; @@ -114,7 +138,8 @@ $$; SELECT * FROM tcg.public.FN_TCG_User_Relationship_Get_Many ( - a_get_inactive_user_relationship := FALSE + a_access_user_id := 3 + , a_get_inactive_user_relationship := FALSE , a_get_all_user_follower := TRUE , a_user_follower_ids := '' , a_get_all_user_following := TRUE diff --git a/static/PostgreSQL/71196_fn_TCG_MTG_Deck_Commander_Bracket_Get_Many copy.sql b/static/PostgreSQL/71196_fn_TCG_MTG_Deck_Commander_Bracket_Get_Many copy.sql index 2ab0aea..5d69d1a 100644 --- a/static/PostgreSQL/71196_fn_TCG_MTG_Deck_Commander_Bracket_Get_Many copy.sql +++ b/static/PostgreSQL/71196_fn_TCG_MTG_Deck_Commander_Bracket_Get_Many copy.sql @@ -1,6 +1,7 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_MTG_Deck_Commander_Bracket_Get_Many ( - a_get_all_commander_bracket BOOLEAN + a_access_user_id INT + , a_get_all_commander_bracket BOOLEAN , a_get_inactive_commander_bracket BOOLEAN , a_commander_bracket_ids TEXT , a_commander_bracket_names TEXT @@ -24,6 +25,8 @@ RETURNS TABLE ( LANGUAGE plpgsql AS $$ DECLARE + v_access_user_id INT; + v_can_admin BOOLEAN; v_get_all_commander_bracket BOOLEAN; v_get_inactive_commander_bracket BOOLEAN; v_commander_bracket_ids TEXT; @@ -33,6 +36,7 @@ DECLARE v_require_all_non_id_filters_met BOOLEAN; v_require_any_non_id_filters_met BOOLEAN; BEGIN + v_access_user_id := a_access_user_id; v_get_all_commander_bracket := COALESCE(a_get_all_commander_bracket, TRUE); v_get_inactive_commander_bracket := COALESCE(a_get_inactive_commander_bracket, FALSE); v_commander_bracket_ids := TRIM(COALESCE(a_commander_bracket_ids, '')); @@ -42,6 +46,12 @@ BEGIN v_require_all_non_id_filters_met := COALESCE(a_require_all_non_id_filters_met, FALSE); v_require_any_non_id_filters_met := COALESCE(a_require_any_non_id_filters_met, TRUE); + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + + v_can_admin := COALESCE((SELECT TCG_USER.is_super_user FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1), FALSE); + -- Outputs RETURN QUERY SELECT COMMANDER_BRACKET.commander_bracket_id @@ -110,7 +120,8 @@ $$; SELECT * FROM tcg.public.FN_TCG_MTG_Deck_Commander_Bracket_Get_Many ( - a_get_all_commander_bracket := TRUE + a_access_user_id := 3 + , a_get_all_commander_bracket := TRUE , a_get_inactive_commander_bracket := FALSE , a_commander_bracket_ids := CAST(NULL AS TEXT) , a_commander_bracket_names := CAST(NULL AS TEXT) diff --git a/static/PostgreSQL/71200_fn_TCG_MTG_Deck_Get_Many.sql b/static/PostgreSQL/71200_fn_TCG_MTG_Deck_Get_Many.sql index fe49403..4fcbe33 100644 --- a/static/PostgreSQL/71200_fn_TCG_MTG_Deck_Get_Many.sql +++ b/static/PostgreSQL/71200_fn_TCG_MTG_Deck_Get_Many.sql @@ -1,16 +1,20 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_MTG_Deck_Get_Many ( - a_get_all_deck BOOLEAN + a_access_user_id INT + , a_get_all_deck BOOLEAN , a_get_inactive_deck BOOLEAN , a_deck_ids TEXT , a_deck_names TEXT , a_commander_bracket_ids TEXT - , a_created_by_user_ids TEXT + -- , a_created_by_user_ids TEXT , a_include_commander_option BOOLEAN , a_get_all_game BOOLEAN , a_get_inactive_game BOOLEAN , a_game_ids TEXT - , a_filter_by_game_session_not_player BOOLEAN + , a_get_all_user BOOLEAN + , a_get_inactive_user BOOLEAN + , a_user_ids TEXT + -- , a_filter_by_game_session_not_player BOOLEAN , a_require_all_id_filters_met BOOLEAN , a_require_any_id_filters_met BOOLEAN , a_require_all_non_id_filters_met BOOLEAN @@ -31,38 +35,109 @@ RETURNS TABLE ( LANGUAGE plpgsql AS $$ DECLARE + v_access_user_id INT; + v_can_admin BOOLEAN; v_get_all_deck BOOLEAN; v_get_inactive_deck BOOLEAN; v_deck_ids TEXT; v_deck_names TEXT; - v_created_by_user_ids TEXT; v_include_commander_option BOOLEAN; v_get_all_game BOOLEAN; v_get_inactive_game BOOLEAN; v_game_ids TEXT; - v_filter_by_game_session_not_player BOOLEAN; + v_get_all_user BOOLEAN; + v_get_inactive_user BOOLEAN; + v_user_ids TEXT; + -- v_filter_by_game_session_not_player BOOLEAN; v_require_all_id_filters_met BOOLEAN; v_require_any_id_filters_met BOOLEAN; v_require_all_non_id_filters_met BOOLEAN; v_require_any_non_id_filters_met BOOLEAN; BEGIN + v_access_user_id := a_access_user_id; v_get_all_deck := COALESCE(a_get_all_deck, FALSE); v_get_inactive_deck := COALESCE(a_get_inactive_deck, FALSE); v_deck_ids := TRIM(COALESCE(a_deck_ids, '')); v_deck_names := TRIM(COALESCE(a_deck_names, '')); v_include_commander_option := COALESCE(a_include_commander_option, TRUE); - v_created_by_user_ids := TRIM(COALESCE(a_created_by_user_ids, '')); + -- v_created_by_user_ids := TRIM(COALESCE(a_created_by_user_ids, '')); v_get_all_game := COALESCE(a_get_all_game, FALSE); v_get_inactive_game := COALESCE(a_get_inactive_game, FALSE); v_game_ids := TRIM(COALESCE(a_game_ids, '')); - v_filter_by_game_session_not_player := COALESCE(a_filter_by_game_session_not_player, TRUE); + v_get_all_user := COALESCE(a_get_all_user, FALSE); + v_get_inactive_user := COALESCE(a_get_inactive_user, FALSE); + v_user_ids := TRIM(COALESCE(a_user_ids, '')); + -- v_filter_by_game_session_not_player := COALESCE(a_filter_by_game_session_not_player, TRUE); v_require_all_id_filters_met := COALESCE(a_require_all_id_filters_met, FALSE); v_require_any_id_filters_met := COALESCE(a_require_any_id_filters_met, FALSE); v_require_all_non_id_filters_met := COALESCE(a_require_all_non_id_filters_met, FALSE); v_require_any_non_id_filters_met := COALESCE(a_require_any_non_id_filters_met, FALSE); + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + + v_can_admin := COALESCE((SELECT TCG_USER.is_super_user FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1), FALSE); + -- Outputs RETURN QUERY + WITH + Access_Game AS ( + SELECT DISTINCT + GAME.game_id + , GAME.active + FROM tcg.public.FN_TCG_MTG_Game_Get_Many ( + a_access_user_id := v_access_user_id + , a_get_all_game := v_get_all_game + , a_get_inactive_game := v_get_inactive_game + , a_game_ids := v_game_ids + , a_get_all_user := v_get_all_user + , a_get_inactive_user := v_get_inactive_user + , a_user_ids := v_user_ids + , a_require_all_id_filters_met := v_require_all_id_filters_met + , a_require_any_id_filters_met := v_require_any_id_filters_met + ) GAME + ) + , Access_Player AS ( + SELECT + PLAYER.player_id + , PLAYER.game_id + , PLAYER.user_id + , PLAYER.deck_id + , PLAYER.active + FROM tcg.public.FN_TCG_MTG_Game_Player_Get_Many ( + a_access_user_id := v_access_user_id + , a_get_all_game := v_get_all_game + , a_get_inactive_game := v_get_inactive_game + , a_game_ids := v_game_ids + , a_get_all_user := v_get_all_user + , a_get_inactive_user := v_get_inactive_user + , a_user_ids := v_user_ids + , a_require_all_id_filters_met := v_require_all_id_filters_met + , a_require_any_id_filters_met := v_require_any_id_filters_met + ) PLAYER + ) + , Access_User AS ( + SELECT DISTINCT TCG_USER.user_id + FROM tcg.public.TCG_User TCG_USER + LEFT JOIN Access_Player ACCESS_PLAYER ON TCG_USER.user_id = ACCESS_PLAYER.user_id + LEFT JOIN tcg.public.TCG_MTG_Game_Session_Member SESSION_MEMBER + ON TCG_USER.user_id = SESSION_MEMBER.user_id + AND SESSION_MEMBER.is_permitted + AND SESSION_MEMBER.active + LEFT JOIN Access_Game GAME ON SESSION_MEMBER.game_id = GAME.game_id + WHERE + ( + v_can_admin + OR TCG_USER.user_id = v_access_user_id + OR ACCESS_PLAYER.player_id IS NOT NULL + OR GAME.game_id IS NOT NULL + ) + AND ( + v_get_inactive_user + OR TCG_USER.active + ) + ) SELECT DISTINCT DECK.deck_id , DECK.name @@ -75,7 +150,9 @@ BEGIN , DECK.updated_last_by_user_id , DECK.change_set_id FROM tcg.public.TCG_MTG_Deck DECK - LEFT JOIN tcg.public.TCG_MTG_Game SESSION_GAME ON DECK.game_id = SESSION_GAME.game_id + INNER JOIN Access_User ACCESS_USER ON DECK.created_by_user_id = ACCESS_USER.user_id + LEFT JOIN tcg.public.TCG_MTG_Game_Session_Member SESSION_MEMBER ON DECK.created_by_user_id = SESSION_MEMBER.user_id + LEFT JOIN tcg.public.TCG_MTG_Game SESSION_GAME ON SESSION_MEMBER.game_id = SESSION_GAME.game_id LEFT JOIN tcg.public.TCG_MTG_Game_Player PLAYER ON DECK.deck_id = PLAYER.deck_id LEFT JOIN tcg.public.TCG_MTG_Game PLAYER_GAME ON PLAYER.game_id = PLAYER_GAME.game_id WHERE @@ -90,17 +167,11 @@ BEGIN v_get_all_deck OR ( DECK.deck_id = ANY(string_to_array(v_deck_ids, ',')::INT[]) - AND DECK.created_by_user_id = ANY(string_to_array(v_created_by_user_ids, ',')::INT[]) + AND DECK.created_by_user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) AND ( v_get_all_game - OR ( - v_filter_by_game_session_not_player - AND SESSION_GAME.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) - ) - OR ( - NOT v_filter_by_game_session_not_player - AND PLAYER.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) - ) + OR SESSION_GAME.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) + OR PLAYER.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) ) ) ) @@ -111,17 +182,11 @@ BEGIN AND ( v_get_all_deck OR DECK.deck_id = ANY(string_to_array(v_deck_ids, ',')::INT[]) - OR DECK.created_by_user_id = ANY(string_to_array(v_created_by_user_ids, ',')::INT[]) + OR DECK.created_by_user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) OR ( v_get_all_game - OR ( - v_filter_by_game_session_not_player - AND SESSION_GAME.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) - ) - OR ( - NOT v_filter_by_game_session_not_player - AND PLAYER.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) - ) + OR SESSION_GAME.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) + OR PLAYER.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) ) ) ) @@ -160,14 +225,8 @@ BEGIN ) AND ( v_get_inactive_game - OR ( - v_filter_by_game_session_not_player - AND SESSION_GAME.active - ) - OR ( - NOT v_filter_by_game_session_not_player - AND PLAYER_GAME.active - ) + OR SESSION_GAME.active + OR PLAYER_GAME.active ) ORDER BY DECK.name ; @@ -177,17 +236,21 @@ $$; SELECT * FROM tcg.public.FN_TCG_MTG_Deck_Get_Many ( - a_get_all_deck := TRUE + a_access_user_id := 5 + , a_get_all_deck := TRUE , a_get_inactive_deck := FALSE , a_deck_ids := CAST(NULL AS TEXT) , a_deck_names := CAST(NULL AS TEXT) , a_commander_bracket_ids := CAST(NULL AS TEXT) , a_include_commander_option := true - , a_created_by_user_ids := '3' + -- , a_created_by_user_ids := '3' , a_get_all_game := FALSE , a_get_inactive_game := FALSE , a_game_ids := CAST(NULL AS TEXT) - , a_filter_by_game_session_not_player := TRUE + , a_get_all_user := FALSE + , a_get_inactive_user := FALSE + , a_user_ids := CAST(NULL AS TEXT) + -- , a_filter_by_game_session_not_player := TRUE , a_require_all_id_filters_met := TRUE , a_require_any_id_filters_met := FALSE , a_require_all_non_id_filters_met := FALSE diff --git a/static/PostgreSQL/71201_usp_TCG_MTG_Deck_Save.sql b/static/PostgreSQL/71201_usp_TCG_MTG_Deck_Save.sql new file mode 100644 index 0000000..350022a --- /dev/null +++ b/static/PostgreSQL/71201_usp_TCG_MTG_Deck_Save.sql @@ -0,0 +1,511 @@ + +CREATE OR REPLACE PROCEDURE tcg.public.USP_TCG_MTG_Deck_Save ( + a_comment TEXT + , a_guid UUID + , a_user_id INT + , OUT o_success BOOLEAN +) +LANGUAGE plpgsql +AS $$ +DECLARE + v_bad_data_error_type_id INT; + v_change_set_id INT; + v_comment TEXT; + -- v_error_message TEXT; + v_guid UUID; + v_time_start TIMESTAMP; + v_user_id INT; + v_warning_error_type_id INT; +BEGIN + v_comment := TRIM(COALESCE(a_comment, '')); + v_guid := a_guid; + v_user_id := a_user_id; + + v_bad_data_error_type_id := (SELECT ERROR_TYPE.error_type_id FROM tcg.public.Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = 'BAD_DATA' LIMIT 1); + v_warning_error_type_id := (SELECT ERROR_TYPE.error_type_id FROM tcg.public.Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = 'WARNING' LIMIT 1); + v_time_start := CURRENT_TIMESTAMP; + + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + + DROP TABLE IF EXISTS Temp_MTG_Deck_Save_Deck; + DROP TABLE IF EXISTS Temp_MTG_Deck_Save_Commander_Bracket; + DROP TABLE IF EXISTS Temp_MTG_Deck_Save_Error; + + CREATE TEMP TABLE Temp_MTG_Deck_Save_Deck ( + temp_id INT NOT NULL + , deck_id INT + , name TEXT + , is_commander BOOLEAN + , commander_bracket_id INT + , active BOOLEAN + , created_on TIMESTAMP + , created_by_user_id INT + , updated_last_on TIMESTAMP + , updated_last_by_user_id INT + + , is_new BOOLEAN + , error_name TEXT + , is_duplicate BOOLEAN + ); + + CREATE TEMP TABLE Temp_MTG_Deck_Save_Commander_Bracket ( + commander_bracket_id INT NOT NULL + , name TEXT + , description TEXT + , display_order INT + , active BOOLEAN + , created_on TIMESTAMP + , created_by_user_id INT + , updated_last_on TIMESTAMP + , updated_last_by_user_id INT + , change_set_id INT + ); + + CREATE TEMP TABLE Temp_MTG_Deck_Save_Error ( + temp_id INT GENERATED ALWAYS AS IDENTITY + , error_type_id INT + , message TEXT + ); + + INSERT INTO Temp_MTG_Deck_Save_Commander_Bracket ( + commander_bracket_id + , name + , description + , display_order + , active + , created_on + , created_by_user_id + , updated_last_on + , updated_last_by_user_id + , change_set_id + ) + SELECT + COMMANDER_BRACKET.commander_bracket_id + , COMMANDER_BRACKET.name + , COMMANDER_BRACKET.description + , COMMANDER_BRACKET.display_order + , COMMANDER_BRACKET.active + , COMMANDER_BRACKET.created_on + , COMMANDER_BRACKET.created_by_user_id + , COMMANDER_BRACKET.updated_last_on + , COMMANDER_BRACKET.updated_last_by_user_id + , COMMANDER_BRACKET.change_set_id + FROM tcg.public.TCG_MTG_Deck_Commander_Bracket COMMANDER_BRACKET + ; + + WITH Temp_Deck AS ( + SELECT + DECK_T.temp_id + , CASE + WHEN + COALESCE(DECK_T.deck_id, 0) < 1 + OR DECK.deck_id IS NULL + THEN DECK.deck_id + ELSE DECK_T.deck_id + END AS deck_id + , TRIM(COALESCE(DECK_T.name, '')) AS name + , COALESCE(DECK_T.is_commander, TRUE) AS is_commander + , DECK_T.commander_bracket_id + , COALESCE(DECK_T.active, TRUE) AS active + , COALESCE(DECK_T.created_on, v_time_start) AS created_on + , COALESCE(DECK_T.created_by_user_id, v_user_id) AS created_by_user_id + , COALESCE(DECK_T.updated_last_on, v_time_start) AS updated_last_on + , COALESCE(DECK_T.updated_last_by_user_id, v_user_id) AS updated_last_by_user_id + FROM tcg.public.TCG_MTG_Deck_Temp DECK_T + LEFT JOIN tcg.public.TCG_MTG_Deck DECK + ON DECK.deck_id = DECK_T.deck_id + AND DECK.created_by_user_id = v_user_id + WHERE DECK_T.guid = v_guid + ) + INSERT INTO Temp_MTG_Deck_Save_Deck ( + temp_id + , deck_id + , name + , is_commander + , commander_bracket_id + , active + , created_on + , created_by_user_id + , updated_last_on + , updated_last_by_user_id + + , is_new + , error_name + ) + SELECT + T_DECK.temp_id + , T_DECK.deck_id + , T_DECK.name + , T_DECK.is_commander + , T_DECK.commander_bracket_id + , T_DECK.active + , T_DECK.created_on + , T_DECK.created_by_user_id + , T_DECK.updated_last_on + , T_DECK.updated_last_by_user_id + + , CASE WHEN T_DECK.deck_id IS NULL THEN TRUE ELSE FALSE END AS is_new + , CONCAT( + 'Deck { id: ' + , CAST(T_DECK.deck_id AS VARCHAR) + , ', temp id: ' + , CAST(T_DECK.temp_id AS VARCHAR) + , ', name: ' + , T_DECK.name + , ' }' + ) -- error_name + FROM Temp_Deck T_DECK + LEFT JOIN tcg.public.TCG_MTG_Deck DECK + ON DECK.deck_id = T_DECK.deck_id + AND DECK.created_by_user_id = v_user_id + ; + + -- Missing fields + WITH Deck_Missing_Field AS ( + SELECT + T_DECK.temp_id + , 'name' AS field + FROM Temp_MTG_Deck_Save_Deck T_DECK + WHERE T_DECK.name = '' + UNION + SELECT + T_DECK.temp_id + , 'commander_bracket_id' AS field + FROM Temp_MTG_Deck_Save_Deck T_DECK + WHERE + T_DECK.commander_bracket_id IS NULL + AND T_DECK.is_commander + ) + INSERT INTO Temp_MTG_Deck_Save_Error ( + error_type_id + , message + ) + SELECT + v_bad_data_error_type_id -- error_type_id + , CONCAT( + 'Missing mandatory field: ' + , DECK_MISSING_FIELD.field + , ' on ' + , T_DECK.error_name + , '.' + ) -- message + FROM Temp_MTG_Deck_Save_Deck T_DECK + INNER JOIN Deck_Missing_Field DECK_MISSING_FIELD ON T_DECK.temp_id = DECK_MISSING_FIELD.temp_id + ; + + -- Failed join fields + WITH Deck_Failed_Join_Field AS ( + SELECT + T_DECK.temp_id + , 'commander_bracket_id' AS field + FROM Temp_MTG_Deck_Save_Deck T_DECK + LEFT JOIN Temp_MTG_Deck_Save_Commander_Bracket T_COMMANDER_BRACKET + ON T_DECK.commander_bracket_id = T_COMMANDER_BRACKET.commander_bracket_id + AND T_COMMANDER_BRACKET.active + WHERE + T_COMMANDER_BRACKET.commander_bracket_id IS NULL + AND T_DECK.commander_bracket_id IS NOT NULL + ) + INSERT INTO Temp_MTG_Deck_Save_Error ( + error_type_id + , message + ) + SELECT + v_bad_data_error_type_id -- error_type_id + , CONCAT( + 'Failed relationship: ' + , DECK_FAILED_JOIN_FIELD.field + , ' on ' + , T_DECK.error_name + , '.' + ) -- message + FROM Temp_MTG_Deck_Save_Deck T_DECK + INNER JOIN Deck_Failed_Join_Field DECK_FAILED_JOIN_FIELD ON T_DECK.temp_id = DECK_FAILED_JOIN_FIELD.temp_id + ; + + -- Duplicate Deck + WITH + All_Deck AS ( + SELECT + T_DECK.temp_id + , T_DECK.created_by_user_id + , T_DECK.name + , TRUE AS is_save_record + FROM Temp_MTG_Deck_Save_Deck T_DECK + UNION + SELECT + NULL AS temp_id + , DECK.created_by_user_id + , DECK.name + , FALSE AS is_save_record + FROM tcg.public.TCG_MTG_Deck DECK + LEFT JOIN Temp_MTG_Deck_Save_Deck T_DECK ON DECK.deck_id = T_DECK.deck_id + WHERE T_DECK.deck_id IS NULL + ) + , Deck_Name_Count AS ( + SELECT + ALL_DECK.created_by_user_id + , ALL_DECK.name + , COUNT(*) AS count_deck + FROM All_Deck ALL_DECK + GROUP BY + ALL_DECK.created_by_user_id + , ALL_DECK.name + ) + , Duplicate_Deck AS ( + SELECT + ALL_DECK.temp_id + , ALL_DECK.name + , ALL_DECK.created_by_user_id + , CASE WHEN COALESCE(DECK_NAME_COUNT.count_deck, 0) <= 1 THEN TRUE ELSE FALSE END AS is_unique + FROM All_Deck ALL_DECK + INNER JOIN Deck_Name_Count DECK_NAME_COUNT + ON ALL_DECK.name = DECK_NAME_COUNT.name + AND ALL_DECK.created_by_user_id = DECK_NAME_COUNT.created_by_user_id + ) + UPDATE Temp_MTG_Deck_Save_Deck T_DECK + SET is_duplicate = NOT DUPLICATE_DECK.is_unique + FROM Duplicate_Deck DUPLICATE_DECK + WHERE T_DECK.temp_id = DUPLICATE_DECK.temp_id + ; + + IF EXISTS ( + SELECT * + FROM Temp_MTG_Deck_Save_Deck T_DECK + WHERE T_DECK.is_duplicate + LIMIT 1 + ) THEN + INSERT INTO Temp_MTG_Deck_Save_Error ( + error_type_id + , message + ) + SELECT + v_bad_data_error_type_id -- error_type_id + , CONCAT( + 'Duplicate on ' + , T_DECK.error_name + ) -- message + FROM Temp_MTG_Deck_Save_Deck T_DECK + WHERE T_DECK.is_duplicate + ; + END IF; + + -- Nothing to save + IF NOT EXISTS (SELECT * FROM Temp_MTG_Deck_Save_Deck LIMIT 1) THEN + INSERT INTO Temp_MTG_Deck_Save_Error ( + error_type_id + , message + ) + VALUES ( + v_warning_error_type_id + , 'Nothing to save.' + ); + END IF; + + /* + INSERT INTO Temp_MTG_Deck_Save_Error ( + error_type_id + , message + ) + SELECT + v_warning_error_type_id AS error_type_id + , CONCAT( + 'Decks: ' + , STRING_AGG(T_DECK.error_name, ', ') + ) AS message + FROM Temp_MTG_Deck_Save_Deck T_DECK + ; + */ + + -- Outputs + -- Change Set + INSERT INTO tcg.public.TCG_Change_Set ( + comment + , updated_last_by_user_id + ) + VALUES ( + v_comment + , v_user_id + ) + RETURNING change_set_id INTO v_change_set_id + ; + + IF NOT EXISTS (SELECT * FROM Temp_MTG_Deck_Save_Error T_ERROR WHERE T_ERROR.error_type_id <> v_warning_error_type_id LIMIT 1) THEN + + -- Deck + INSERT INTO tcg.public.TCG_MTG_Deck ( + name + , is_commander + , commander_bracket_id + , active + , created_on + , created_by_user_id + , updated_last_on + , updated_last_by_user_id + , change_set_id + ) + SELECT + T_DECK.name + , T_DECK.is_commander + , T_DECK.commander_bracket_id + , T_DECK.active + , T_DECK.created_on + , T_DECK.created_by_user_id + , T_DECK.updated_last_on + , T_DECK.updated_last_by_user_id + , v_change_set_id -- change_set_id + FROM Temp_MTG_Deck_Save_Deck T_DECK + WHERE + T_DECK.is_new + AND T_DECK.active + ; + + UPDATE tcg.public.TCG_MTG_Deck DECK + SET + name = T_DECK.name + , is_commander = T_DECK.is_commander + , commander_bracket_id = T_DECK.commander_bracket_id + , active = T_DECK.active + , updated_last_on = v_time_start + , updated_last_by_user_id = v_user_id + , change_set_id = v_change_set_id + FROM Temp_MTG_Deck_Save_Deck T_DECK + WHERE + DECK.deck_id = T_DECK.deck_id + AND NOT T_DECK.is_new + ; + + END IF; + + -- Error + INSERT INTO tcg.public.Error ( + guid + , error_type_id + , message + , display_order + , created_on + , created_by_user_id + , updated_last_on + , updated_last_by_user_id + , change_set_id + ) + SELECT + v_guid + , T_ERROR.error_type_id + , T_ERROR.message + , T_ERROR.temp_id + , v_time_start + , v_user_id + , v_time_start + , v_user_id + , v_change_set_id + FROM Temp_MTG_Deck_Save_Error T_ERROR + LEFT JOIN tcg.public.Error_Type ERROR_TYPE ON T_ERROR.error_type_id = ERROR_TYPE.error_type_id + ORDER BY T_ERROR.temp_id + ; + + COMMIT; + + o_success := NOT EXISTS ( + SELECT * + FROM Temp_MTG_Deck_Save_Error T_ERROR + WHERE T_ERROR.error_type_id <> v_warning_error_type_id + LIMIT 1 + ); + + DELETE FROM tcg.public.TCG_MTG_Deck_Temp DECK_T WHERE DECK_T.guid = v_guid; + + DROP TABLE IF EXISTS Temp_MTG_Deck_Save_Deck; + DROP TABLE IF EXISTS Temp_MTG_Deck_Save_Commander_Bracket; + DROP TABLE IF EXISTS Temp_MTG_Deck_Save_Error; +END; +$$; + + + +-- Call it with: +DO $$ +DECLARE + v_comment TEXT := 'MTG Deck Save.'; + v_guid UUID; + v_user_id INT := 3; + v_success BOOLEAN; +BEGIN + v_guid := gen_random_uuid(); + + INSERT INTO tcg.public.TCG_MTG_Deck_Temp ( + guid + , deck_id + , name + , is_commander + , commander_bracket_id + , active + ) + VALUES + ( + v_guid + , 1 -- deck_id + , 'Final Fantasy: Counter Blitz' -- name + , TRUE -- is_commander + , 2 -- commander_bracket_id + , TRUE -- active + ) + , ( + v_guid + , 2 -- deck_id + , 'Tarkir Dragonstorm: Jeskai Striker' -- name + , TRUE -- is_commander + , 2 -- commander_bracket_id + , TRUE -- active + ) + , ( + v_guid + , 3 -- deck_id + , 'The Lost Caverns of Ixalan: Blood Rites' -- name + , TRUE -- is_commander + , 2 -- commander_bracket_id + , TRUE -- active + ) + ; + + CALL tcg.public.USP_TCG_MTG_Deck_Save ( + v_comment -- a_comment + , v_guid -- a_guid + , v_user_id -- a_user_id + , v_success -- o_success + ); + RAISE NOTICE 'Success: %', CASE WHEN v_success THEN 'TRUE' ELSE 'FALSE' END; +END; +$$; + +SELECT * +-- DELETE +FROM tcg.public.Error ERROR +LEFT JOIN tcg.public.Error_Type ERROR_TYPE ON ERROR.error_type_id = ERROR_TYPE.error_type_id +; +SELECT * +FROM tcg.public.Error_Type ERROR_TYPE +; +SELECT * +FROM tcg.public.TCG_Change_Set CHANGE_SET +ORDER BY CHANGE_SET.change_set_id DESC +; + +SELECT * +-- DELETE +FROM tcg.public.TCG_MTG_Deck_Temp +; +SELECT * +-- DELETE +FROM tcg.public.TCG_MTG_Deck DECK +; +SELECT * +-- DELETE +FROM tcg.public.TCG_MTG_Deck_Audit DECK_AUDIT +; +-- 1 - Final Fantasy: Counter Blitz +-- 2 - Tarkir Dragonstorm: Jeskai Striker + + diff --git a/static/PostgreSQL/71208_fn_TCG_MTG_Game_Get_Many.sql b/static/PostgreSQL/71208_fn_TCG_MTG_Game_Get_Many.sql index 0425852..55a172f 100644 --- a/static/PostgreSQL/71208_fn_TCG_MTG_Game_Get_Many.sql +++ b/static/PostgreSQL/71208_fn_TCG_MTG_Game_Get_Many.sql @@ -1,6 +1,7 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_MTG_Game_Get_Many ( - a_get_all_game BOOLEAN + a_access_user_id INT + , a_get_all_game BOOLEAN , a_get_inactive_game BOOLEAN , a_game_ids TEXT , a_get_all_user BOOLEAN @@ -28,7 +29,9 @@ RETURNS TABLE ( LANGUAGE plpgsql AS $$ DECLARE + v_access_user_id INT; -- v_bad_data_error_type_id INT; + v_can_admin BOOLEAN; -- v_warning_error_type_id INT; v_get_all_game BOOLEAN; v_get_inactive_game BOOLEAN; @@ -41,6 +44,7 @@ DECLARE -- , v_require_all_non_id_filters_met BOOLEAN -- , v_require_any_non_id_filters_met BOOLEAN BEGIN + v_access_user_id := a_access_user_id; -- v_bad_data_error_type_id := (SELECT ERROR_TYPE.error_type_id FROM tcg.public.Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = 'BAD_DATA' LIMIT 1); -- v_warning_error_type_id := (SELECT ERROR_TYPE.error_type_id FROM tcg.public.Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = 'WARNING' LIMIT 1); v_get_all_game := COALESCE(a_get_all_game, FALSE); @@ -52,9 +56,43 @@ BEGIN v_require_all_id_filters_met := COALESCE(a_require_all_id_filters_met, FALSE); v_require_any_id_filters_met := COALESCE(a_require_any_id_filters_met, FALSE); - -- Outputs + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; - RETURN QUERY SELECT + v_can_admin := COALESCE((SELECT TCG_USER.is_super_user FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1), FALSE); + + -- Outputs + RETURN QUERY + WITH Access_Game AS ( + SELECT DISTINCT GAME.game_id + FROM tcg.public.TCG_MTG_Game GAME + LEFT JOIN tcg.public.TCG_MTG_Game_Player PLAYER + ON GAME.game_id = PLAYER.game_id + AND ( + v_get_inactive_user + OR PLAYER.active + ) + LEFT JOIN tcg.public.TCG_MTG_Game_Session_Member SESSION_MEMBER + ON GAME.game_id = SESSION_MEMBER.game_id + AND SESSION_MEMBER.is_permitted + AND ( + v_get_inactive_user + OR SESSION_MEMBER.active + ) + WHERE + ( + v_can_admin + OR GAME.created_by_user_id = v_access_user_id + OR PLAYER.user_id = v_access_user_id + OR SESSION_MEMBER.user_id = v_access_user_id + ) + AND ( + v_get_inactive_game + OR GAME.active + ) + ) + SELECT DISTINCT GAME.game_id , GAME.notes , GAME.is_commander @@ -70,7 +108,9 @@ BEGIN , GAME.updated_last_on , GAME.updated_last_by_user_id FROM tcg.public.TCG_MTG_Game GAME + INNER JOIN Access_Game ACCESS_GAME ON GAME.game_id = ACCESS_GAME.game_id INNER JOIN tcg.public.TCG_User CREATOR_USER ON GAME.created_by_user_id = CREATOR_USER.user_id + LEFT JOIN tcg.public.TCG_MTG_Game_Player PLAYER ON GAME.game_id = PLAYER.game_id WHERE ( ( @@ -86,6 +126,7 @@ BEGIN AND ( a_get_all_user OR CREATOR_USER.user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) + OR PLAYER.user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) ) ) OR ( @@ -98,17 +139,10 @@ BEGIN AND ( v_get_all_user OR CREATOR_USER.user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) + OR PLAYER.user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) ) ) ) - AND ( - v_get_inactive_game - OR GAME.active - ) - AND ( - v_get_inactive_user - OR CREATOR_USER.active - ) ORDER BY GAME.created_on DESC ; END; @@ -117,14 +151,15 @@ $$; SELECT * FROM tcg.public.FN_TCG_MTG_Game_Get_Many ( - a_get_all_game := TRUE + a_access_user_id := 4 + , a_get_all_game := TRUE , a_get_inactive_game := FALSE , a_game_ids := '' - , a_get_all_user := TRUE - , a_get_inactive_user := FALSE - , a_user_ids := '' - , a_require_all_id_filters_met := TRUE - , a_require_any_id_filters_met := FALSE + , a_get_all_user := FALSE + , a_get_inactive_user := FALSE + , a_user_ids := '4' + , a_require_all_id_filters_met := TRUE + , a_require_any_id_filters_met := TRUE ) ; diff --git a/static/PostgreSQL/71212_fn_TCG_MTG_Game_Player_Get_Many.sql b/static/PostgreSQL/71212_fn_TCG_MTG_Game_Player_Get_Many.sql index b5289ff..046d938 100644 --- a/static/PostgreSQL/71212_fn_TCG_MTG_Game_Player_Get_Many.sql +++ b/static/PostgreSQL/71212_fn_TCG_MTG_Game_Player_Get_Many.sql @@ -1,8 +1,12 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_MTG_Game_Player_Get_Many ( - a_get_all_game BOOLEAN + a_access_user_id INT + , a_get_all_game BOOLEAN , a_get_inactive_game BOOLEAN , a_game_ids TEXT + , a_get_all_user BOOLEAN + , a_get_inactive_user BOOLEAN + , a_user_ids TEXT , a_require_all_id_filters_met BOOLEAN , a_require_any_id_filters_met BOOLEAN ) @@ -24,38 +28,69 @@ RETURNS TABLE ( LANGUAGE plpgsql AS $$ DECLARE + v_access_user_id INT; v_get_all_game BOOLEAN; v_get_inactive_game BOOLEAN; v_game_ids TEXT; + v_get_all_user BOOLEAN; + v_get_inactive_user BOOLEAN; + v_user_ids TEXT; v_require_all_id_filters_met BOOLEAN; v_require_any_id_filters_met BOOLEAN; BEGIN + v_access_user_id := a_access_user_id; v_get_all_game := COALESCE(a_get_all_game, FALSE); v_get_inactive_game := COALESCE(a_get_inactive_game, FALSE); v_game_ids := TRIM(COALESCE(a_game_ids, '')); + v_get_all_user := COALESCE(a_get_all_user, FALSE); + v_get_inactive_user := COALESCE(a_get_inactive_user, FALSE); + v_user_ids := TRIM(COALESCE(a_user_ids, '')); v_require_all_id_filters_met := COALESCE(a_require_all_id_filters_met, FALSE); v_require_any_id_filters_met := COALESCE(a_require_any_id_filters_met, FALSE); + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + -- Outputs RETURN QUERY - WITH User_Name AS ( - SELECT - TCG_USER.user_id - , CASE - WHEN - TRIM(COALESCE(TCG_USER.firstname, '')) <> '' - AND TRIM(COALESCE(TCG_USER.surname, '')) <> '' - THEN CONCAT( - TRIM(COALESCE(TCG_USER.firstname, '')) - , ' ' - , TRIM(COALESCE(TCG_USER.surname, '')) - ) - WHEN TRIM(COALESCE(TCG_USER.firstname, '')) <> '' - THEN TRIM(COALESCE(TCG_USER.firstname, '')) - ELSE TRIM(COALESCE(TCG_USER.surname, '')) - END AS name - FROM tcg.public.TCG_User TCG_USER - ) + WITH + User_Name AS ( + SELECT + TCG_USER.user_id + , CASE + WHEN + TRIM(COALESCE(TCG_USER.firstname, '')) <> '' + AND TRIM(COALESCE(TCG_USER.surname, '')) <> '' + THEN CONCAT( + TRIM(COALESCE(TCG_USER.firstname, '')) + , ' ' + , TRIM(COALESCE(TCG_USER.surname, '')) + ) + WHEN TRIM(COALESCE(TCG_USER.firstname, '')) <> '' + THEN TRIM(COALESCE(TCG_USER.firstname, '')) + ELSE TRIM(COALESCE(TCG_USER.surname, '')) + END AS name + FROM tcg.public.TCG_User TCG_USER + ) + , Access_Game AS ( + SELECT + GAME.game_id + , GAME.active + , GAME.created_on + , GAME.created_by_user_id + FROM tcg.public.FN_TCG_MTG_Game_Get_Many ( + a_access_user_id := v_access_user_id + , a_get_all_game := v_get_all_game + , a_get_inactive_game := v_get_inactive_game + , a_game_ids := v_game_ids + , a_get_all_user := v_get_all_user + , a_get_inactive_user := v_get_inactive_user + , a_user_ids := v_user_ids + , a_require_all_id_filters_met := v_require_all_id_filters_met + , a_require_any_id_filters_met := v_require_any_id_filters_met + ) GAME + ) SELECT PLAYER.player_id , PLAYER.game_id @@ -86,7 +121,7 @@ BEGIN , PLAYER.updated_last_by_user_id , PLAYER.change_set_id FROM tcg.public.TCG_MTG_Game_Player PLAYER - INNER JOIN tcg.public.TCG_MTG_Game GAME ON PLAYER.game_id = GAME.game_id + INNER JOIN Access_Game GAME ON PLAYER.game_id = GAME.game_id -- LEFT JOIN tcg.public.TCG_User TCG_USER ON PLAYER.user_id = TCG_USER.user_id LEFT JOIN User_Name USER_NAME ON PLAYER.user_id = USER_NAME.user_id LEFT JOIN tcg.public.TCG_MTG_Deck DECK ON PLAYER.deck_id = DECK.deck_id @@ -102,6 +137,11 @@ BEGIN v_get_all_game OR PLAYER.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) ) + AND ( + v_get_all_user + OR GAME.created_by_user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) + OR PLAYER.user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) + ) ) OR ( NOT v_require_all_id_filters_met @@ -110,12 +150,24 @@ BEGIN v_get_all_game OR PLAYER.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) ) + AND ( + v_get_all_user + OR GAME.created_by_user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) + OR PLAYER.user_id = ANY(string_to_array(v_user_ids, ',')::INT[]) + ) ) ) AND ( v_get_inactive_game OR GAME.active ) + AND ( + ( + v_get_inactive_game + AND v_get_inactive_user + ) + OR PLAYER.active + ) ORDER BY GAME.created_on DESC , PLAYER.display_order @@ -126,9 +178,13 @@ $$; SELECT * FROM tcg.public.FN_TCG_MTG_Game_Player_Get_Many ( - a_get_all_game := FALSE + a_access_user_id := 5 + , a_get_all_game := TRUE , a_get_inactive_game := FALSE , a_game_ids := '34' + , a_get_all_user := FALSE + , a_get_inactive_user := FALSE + , a_user_ids := '5' , a_require_all_id_filters_met := TRUE , a_require_any_id_filters_met := FALSE ) diff --git a/static/PostgreSQL/71216_fn_TCG_MTG_Game_Round_Get_Many.sql b/static/PostgreSQL/71216_fn_TCG_MTG_Game_Round_Get_Many.sql index 26ebbf6..ac78ae2 100644 --- a/static/PostgreSQL/71216_fn_TCG_MTG_Game_Round_Get_Many.sql +++ b/static/PostgreSQL/71216_fn_TCG_MTG_Game_Round_Get_Many.sql @@ -1,8 +1,12 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_MTG_Game_Round_Get_Many ( - a_get_all_game BOOLEAN + a_access_user_id INT + , a_get_all_game BOOLEAN , a_get_inactive_game BOOLEAN , a_game_ids TEXT + , a_get_all_user BOOLEAN + , a_get_inactive_user BOOLEAN + , a_user_ids TEXT , a_require_all_id_filters_met BOOLEAN , a_require_any_id_filters_met BOOLEAN ) @@ -21,33 +25,68 @@ RETURNS TABLE ( LANGUAGE plpgsql AS $$ DECLARE + v_access_user_id INT; + v_can_admin BOOLEAN; v_get_all_game BOOLEAN; v_get_inactive_game BOOLEAN; v_game_ids TEXT; + v_get_all_user BOOLEAN; + v_get_inactive_user BOOLEAN; + v_user_ids TEXT; v_require_all_id_filters_met BOOLEAN; v_require_any_id_filters_met BOOLEAN; BEGIN + v_access_user_id := a_access_user_id; v_get_all_game := COALESCE(a_get_all_game, FALSE); v_get_inactive_game := COALESCE(a_get_inactive_game, FALSE); v_game_ids := TRIM(COALESCE(a_game_ids, '')); + v_get_all_user := COALESCE(a_get_all_user, FALSE); + v_get_inactive_user := COALESCE(a_get_inactive_user, FALSE); + v_user_ids := TRIM(COALESCE(a_user_ids, '')); v_require_all_id_filters_met := COALESCE(a_require_all_id_filters_met, FALSE); v_require_any_id_filters_met := COALESCE(a_require_any_id_filters_met, FALSE); + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + + v_can_admin := COALESCE((SELECT TCG_USER.is_super_user FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1), FALSE); + -- Outputs - RETURN QUERY SELECT - ROUND.round_id - , ROUND.game_id - , ROUND.notes - , ROUND.display_order - , ROUND.active - , ROUND.created_on - , ROUND.created_by_user_id - , ROUND.updated_last_on - , ROUND.updated_last_by_user_id - , ROUND.change_set_id - FROM tcg.public.TCG_MTG_Game_Round ROUND - INNER JOIN tcg.public.TCG_MTG_Game GAME ON ROUND.game_id = GAME.game_id + RETURN QUERY + WITH Access_Game AS ( + SELECT + GAME.game_id + , GAME.active + , GAME.created_on + , GAME.created_by_user_id + FROM tcg.public.FN_TCG_MTG_Game_Get_Many ( + a_access_user_id := v_access_user_id + , a_get_all_game := v_get_all_game + , a_get_inactive_game := v_get_inactive_game + , a_game_ids := v_game_ids + , a_get_all_user := v_get_all_user + , a_get_inactive_user := v_get_inactive_user + , a_user_ids := v_user_ids + , a_require_all_id_filters_met := v_require_all_id_filters_met + , a_require_any_id_filters_met := v_require_any_id_filters_met + ) GAME + ) + SELECT + TCG_ROUND.round_id + , TCG_ROUND.game_id + , TCG_ROUND.notes + , TCG_ROUND.display_order + , TCG_ROUND.active + , TCG_ROUND.created_on + , TCG_ROUND.created_by_user_id + , TCG_ROUND.updated_last_on + , TCG_ROUND.updated_last_by_user_id + , TCG_ROUND.change_set_id + FROM tcg.public.TCG_MTG_Game_Round TCG_ROUND + INNER JOIN Access_Game ACCESS_GAME ON TCG_ROUND.game_id = ACCESS_GAME.game_id + INNER JOIN tcg.public.TCG_MTG_Game GAME ON TCG_ROUND.game_id = GAME.game_id WHERE ( ( @@ -58,7 +97,7 @@ BEGIN v_require_all_id_filters_met AND ( v_get_all_game - OR ROUND.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) + OR TCG_ROUND.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) ) ) OR ( @@ -66,17 +105,17 @@ BEGIN AND v_require_any_id_filters_met AND ( v_get_all_game - OR ROUND.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) + OR TCG_ROUND.game_id = ANY(string_to_array(v_game_ids, ',')::INT[]) ) ) ) AND ( v_get_inactive_game - OR ROUND.active + OR TCG_ROUND.active ) ORDER BY GAME.created_on DESC - , ROUND.display_order + , TCG_ROUND.display_order ; END; $$; @@ -84,9 +123,13 @@ $$; SELECT * FROM tcg.public.FN_TCG_MTG_Game_Round_Get_Many ( - a_get_all_game := FALSE + a_access_user_id := 3 + , a_get_all_game := FALSE , a_get_inactive_game := FALSE , a_game_ids := '11' + , a_get_all_user := TRUE + , a_get_inactive_user := FALSE + , a_user_ids := '' , a_require_all_id_filters_met := TRUE , a_require_any_id_filters_met := FALSE ) diff --git a/static/PostgreSQL/71220_fn_TCG_MTG_Game_Round_Player_Damage_Get_Many.sql b/static/PostgreSQL/71220_fn_TCG_MTG_Game_Round_Player_Damage_Get_Many.sql index df94614..b412910 100644 --- a/static/PostgreSQL/71220_fn_TCG_MTG_Game_Round_Player_Damage_Get_Many.sql +++ b/static/PostgreSQL/71220_fn_TCG_MTG_Game_Round_Player_Damage_Get_Many.sql @@ -1,8 +1,12 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_MTG_Game_Round_Player_Damage_Get_Many ( - a_get_all_game BOOLEAN + a_access_user_id INT + , a_get_all_game BOOLEAN , a_get_inactive_game BOOLEAN , a_game_ids TEXT + , a_get_all_user BOOLEAN + , a_get_inactive_user BOOLEAN + , a_user_ids TEXT , a_require_all_id_filters_met BOOLEAN , a_require_any_id_filters_met BOOLEAN ) @@ -21,24 +25,62 @@ RETURNS TABLE ( , updated_last_on TIMESTAMP , updated_last_by_user_id INT , change_set_id INT + , game_created_on TIMESTAMP + , round_display_order INT + , player_display_order INT ) LANGUAGE plpgsql AS $$ DECLARE + v_access_user_id INT; + v_can_admin BOOLEAN; v_get_all_game BOOLEAN; v_get_inactive_game BOOLEAN; v_game_ids TEXT; + v_get_all_user BOOLEAN; + v_get_inactive_user BOOLEAN; + v_user_ids TEXT; v_require_all_id_filters_met BOOLEAN; v_require_any_id_filters_met BOOLEAN; BEGIN + v_access_user_id := a_access_user_id; v_get_all_game := COALESCE(a_get_all_game, FALSE); v_get_inactive_game := COALESCE(a_get_inactive_game, FALSE); v_game_ids := TRIM(COALESCE(a_game_ids, '')); + v_get_all_user := COALESCE(a_get_all_user, FALSE); + v_get_inactive_user := COALESCE(a_get_inactive_user, FALSE); + v_user_ids := TRIM(COALESCE(a_user_ids, '')); v_require_all_id_filters_met := COALESCE(a_require_all_id_filters_met, FALSE); v_require_any_id_filters_met := COALESCE(a_require_any_id_filters_met, FALSE); + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + + v_can_admin := COALESCE((SELECT TCG_USER.is_super_user FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1), FALSE); + -- Outputs - RETURN QUERY SELECT + RETURN QUERY + WITH Access_Player AS ( + SELECT + PLAYER.player_id + , PLAYER.game_id + , PLAYER.user_id + , PLAYER.deck_id + , PLAYER.active + FROM tcg.public.FN_TCG_MTG_Game_Player_Get_Many ( + a_access_user_id := v_access_user_id + , a_get_all_game := v_get_all_game + , a_get_inactive_game := v_get_inactive_game + , a_game_ids := v_game_ids + , a_get_all_user := v_get_all_user + , a_get_inactive_user := v_get_inactive_user + , a_user_ids := v_user_ids + , a_require_all_id_filters_met := v_require_all_id_filters_met + , a_require_any_id_filters_met := v_require_any_id_filters_met + ) PLAYER + ) + SELECT DISTINCT PLAYER_DAMAGE.damage_id , PLAYER_DAMAGE.round_id , PLAYER_DAMAGE.player_id @@ -53,7 +95,11 @@ BEGIN , PLAYER_DAMAGE.updated_last_on , PLAYER_DAMAGE.updated_last_by_user_id , PLAYER_DAMAGE.change_set_id + , GAME.created_on AS game_created_on + , GAME_ROUND.display_order AS round_display_order + , PLAYER.display_order AS player_display_order FROM tcg.public.TCG_MTG_Game_Round_Player_Damage PLAYER_DAMAGE + INNER JOIN Access_Player ACCESS_PLAYER ON PLAYER_DAMAGE.player_id = ACCESS_PLAYER.player_id INNER JOIN tcg.public.TCG_MTG_Game_Round GAME_ROUND ON PLAYER_DAMAGE.round_id = GAME_ROUND.round_id INNER JOIN tcg.public.TCG_MTG_Game GAME ON GAME_ROUND.game_id = GAME.game_id INNER JOIN tcg.public.TCG_MTG_Game_Player PLAYER ON PLAYER_DAMAGE.player_id = PLAYER.player_id @@ -95,9 +141,13 @@ $$; SELECT * FROM tcg.public.FN_TCG_MTG_Game_Round_Player_Damage_Get_Many ( - a_get_all_game := FALSE + a_access_user_id := 3 + , a_get_all_game := FALSE , a_get_inactive_game := FALSE , a_game_ids := '30' + , a_get_all_user := TRUE + , a_get_inactive_user := FALSE + , a_user_ids := '' , a_require_all_id_filters_met := TRUE , a_require_any_id_filters_met := FALSE ) diff --git a/static/PostgreSQL/71224_fn_TCG_MTG_Game_Get_Many_Session_Member.sql b/static/PostgreSQL/71224_fn_TCG_MTG_Game_Get_Many_Session_Member.sql index 221bb80..b456dab 100644 --- a/static/PostgreSQL/71224_fn_TCG_MTG_Game_Get_Many_Session_Member.sql +++ b/static/PostgreSQL/71224_fn_TCG_MTG_Game_Get_Many_Session_Member.sql @@ -1,6 +1,7 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_MTG_Game_Session_Member_Get_Many ( - a_get_inactive_session_member BOOLEAN + a_access_user_id INT + , a_get_inactive_session_member BOOLEAN , a_get_all_game BOOLEAN , a_get_inactive_game BOOLEAN , a_game_ids TEXT @@ -24,6 +25,8 @@ RETURNS TABLE ( LANGUAGE plpgsql AS $$ DECLARE + v_access_user_id INT; + v_can_admin BOOLEAN; v_get_inactive_session_member BOOLEAN; v_get_all_game BOOLEAN; v_get_inactive_game BOOLEAN; @@ -36,6 +39,7 @@ DECLARE -- , v_require_all_non_id_filters_met BOOLEAN -- , v_require_any_non_id_filters_met BOOLEAN BEGIN + v_access_user_id := a_access_user_id; v_get_inactive_session_member := COALESCE(a_get_inactive_session_member, FALSE); v_get_all_game := COALESCE(a_get_all_game, FALSE); v_get_inactive_game := COALESCE(a_get_inactive_game, FALSE); @@ -46,8 +50,33 @@ BEGIN v_require_all_id_filters_met := COALESCE(a_require_all_id_filters_met, FALSE); v_require_any_id_filters_met := COALESCE(a_require_any_id_filters_met, FALSE); + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + + v_can_admin := COALESCE((SELECT TCG_USER.is_super_user FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1), FALSE); + -- Outputs - RETURN QUERY SELECT + RETURN QUERY + WITH Access_Game AS ( + SELECT + GAME.game_id + , GAME.active + , GAME.created_on + , GAME.created_by_user_id + FROM tcg.public.FN_TCG_MTG_Game_Get_Many ( + a_access_user_id := v_access_user_id + , a_get_all_game := v_get_all_game + , a_get_inactive_game := v_get_inactive_game + , a_game_ids := v_game_ids + , a_get_all_user := v_get_all_user + , a_get_inactive_user := v_get_inactive_user + , a_user_ids := v_user_ids + , a_require_all_id_filters_met := v_require_all_id_filters_met + , a_require_any_id_filters_met := v_require_any_id_filters_met + ) GAME + ) + SELECT SESSION_MEMBER.member_id , SESSION_MEMBER.game_id , SESSION_MEMBER.user_id @@ -58,6 +87,7 @@ BEGIN , SESSION_MEMBER.updated_last_on , SESSION_MEMBER.updated_last_by_user_id FROM tcg.public.TCG_MTG_Game_Session_Member SESSION_MEMBER + INNER JOIN Access_Game ACCESS_GAME ON SESSION_MEMBER.game_id = ACCESS_GAME.game_id INNER JOIN tcg.public.TCG_MTG_Game GAME ON SESSION_MEMBER.game_id = GAME.game_id INNER JOIN tcg.public.TCG_User MEMBER_USER ON SESSION_MEMBER.user_id = MEMBER_USER.user_id WHERE @@ -113,7 +143,8 @@ $$; SELECT * FROM tcg.public.FN_TCG_MTG_Game_Session_Member_Get_Many ( - a_get_inactive_session_member := FALSE + a_access_user_id := 4 + , a_get_inactive_session_member := FALSE , a_get_all_game := TRUE , a_get_inactive_game := FALSE , a_game_ids := '' @@ -125,11 +156,11 @@ FROM tcg.public.FN_TCG_MTG_Game_Session_Member_Get_Many ( ) ; -/* SELECT * FROM tcg.public.TCG_MTG_Game_Session_Member ; +/* SELECT * FROM tcg.public.TCG_User ; diff --git a/static/PostgreSQL/71300_fn_TCG_Statistic_Get_Many.sql b/static/PostgreSQL/71300_fn_TCG_Statistic_Get_Many.sql index 111bf66..c1bea67 100644 --- a/static/PostgreSQL/71300_fn_TCG_Statistic_Get_Many.sql +++ b/static/PostgreSQL/71300_fn_TCG_Statistic_Get_Many.sql @@ -1,6 +1,7 @@ CREATE OR REPLACE FUNCTION tcg.public.FN_TCG_Statistic_Get_Many ( - a_get_all_statistic BOOLEAN + a_access_user_id INT + , a_get_all_statistic BOOLEAN , a_get_inactive_statistic BOOLEAN , a_statistic_ids TEXT , a_entity_type_codes TEXT @@ -34,7 +35,9 @@ RETURNS TABLE ( LANGUAGE plpgsql AS $$ DECLARE - v_get_all_statistic BOOLEAN; + v_access_user_id INT; + v_can_admin BOOLEAN; + v_get_all_statistic BOOLEAN; v_get_inactive_statistic BOOLEAN; v_statistic_ids TEXT; v_entity_type_codes TEXT; @@ -42,6 +45,7 @@ DECLARE v_require_all_id_filters_met BOOLEAN; v_require_any_id_filters_met BOOLEAN; BEGIN + v_access_user_id := a_access_user_id; v_get_all_statistic := COALESCE(a_get_all_statistic, FALSE); v_get_inactive_statistic := COALESCE(a_get_inactive_statistic, FALSE); v_statistic_ids := TRIM(COALESCE(a_statistic_ids, '')); @@ -50,6 +54,12 @@ BEGIN v_require_all_id_filters_met := COALESCE(a_require_all_id_filters_met, FALSE); v_require_any_id_filters_met := COALESCE(a_require_any_id_filters_met, FALSE); + IF NOT EXISTS (SELECT * FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1) THEN + RAISE EXCEPTION 'Access User ID required.'; + END IF; + + v_can_admin := COALESCE((SELECT TCG_USER.is_super_user FROM tcg.public.TCG_User TCG_USER WHERE TCG_USER.user_id = v_access_user_id LIMIT 1), FALSE); + -- Outputs RETURN QUERY SELECT STATISTIC.statistic_id @@ -113,7 +123,8 @@ $$; SELECT * FROM tcg.public.FN_TCG_Statistic_Get_Many ( - a_get_all_statistic := FALSE + a_access_user_id := 3 + , a_get_all_statistic := FALSE , a_get_inactive_statistic := FALSE , a_statistic_ids := '' , a_entity_type_codes := 'deck' diff --git a/static/PostgreSQL/deprecated/31101_tri_TCG_MTG_Rarity.sql b/static/PostgreSQL/deprecated/31101_tri_TCG_MTG_Rarity.sql index e78bd6c..c4ef06b 100644 --- a/static/PostgreSQL/deprecated/31101_tri_TCG_MTG_Rarity.sql +++ b/static/PostgreSQL/deprecated/31101_tri_TCG_MTG_Rarity.sql @@ -32,23 +32,23 @@ BEGIN ) -- Changed name SELECT NEW.rarity_id, 'name', OLD.name, NEW.name, NEW.change_set_id - WHERE OLD.name IS NOT DISTINCT FROM NEW.name + WHERE OLD.name IS DISTINCT FROM NEW.name UNION -- Changed colour_name SELECT NEW.rarity_id, 'colour_name', OLD.colour_name, NEW.colour_name, NEW.change_set_id - WHERE OLD.colour_name IS NOT DISTINCT FROM NEW.colour_name + WHERE OLD.colour_name IS DISTINCT FROM NEW.colour_name UNION -- Changed price_ratio_min SELECT NEW.rarity_id, 'price_ratio_min', OLD.price_ratio_min::TEXT, NEW.price_ratio_min::TEXT, NEW.change_set_id - WHERE OLD.price_ratio_min IS NOT DISTINCT FROM NEW.price_ratio_min + WHERE OLD.price_ratio_min IS DISTINCT FROM NEW.price_ratio_min UNION -- Changed price_ratio_max SELECT NEW.rarity_id, 'price_ratio_max', OLD.price_ratio_max::TEXT, NEW.price_ratio_max::TEXT, NEW.change_set_id - WHERE OLD.price_ratio_max IS NOT DISTINCT FROM NEW.price_ratio_max + WHERE OLD.price_ratio_max IS DISTINCT FROM NEW.price_ratio_max UNION -- Changed active SELECT NEW.rarity_id, 'active', OLD.active::TEXT, NEW.active::TEXT, NEW.change_set_id - WHERE OLD.active IS NOT DISTINCT FROM NEW.active + WHERE OLD.active IS DISTINCT FROM NEW.active ; RETURN NEW; diff --git a/static/docs/wcag_2.2AA_public-website-of-precision-and-research-technology-systems-limited-evaluation.json b/static/docs/wcag_2.2AA_public-website-of-precision-and-research-technology-systems-limited-evaluation.json index dc84958..065f7f0 100644 --- a/static/docs/wcag_2.2AA_public-website-of-precision-and-research-technology-systems-limited-evaluation.json +++ b/static/docs/wcag_2.2AA_public-website-of-precision-and-research-technology-systems-limited-evaluation.json @@ -1 +1 @@ -{"@context":{"reporter":"http://github.com/w3c/wai-wcag-em-report-tool/","wcagem":"http://www.w3.org/TR/WCAG-EM/#","Evaluation":"wcagem:procedure","defineScope":"wcagem:step1","scope":"wcagem:step1a","step1b":{"@id":"wcagem:step1b","@type":"@id"},"conformanceTarget":"step1b","accessibilitySupportBaseline":"wcagem:step1c","additionalEvaluationRequirements":"wcagem:step1d","exploreTarget":"wcagem:step2","essentialFunctionality":"wcagem:step2b","pageTypeVariety":"wcagem:step2c","technologiesReliedUpon":"wcagem:step2d","selectSample":"wcagem:step3","structuredSample":"wcagem:step3a","randomSample":"wcagem:step3b","Website":"wcagem:website","Webpage":"wcagem:webpage","auditSample":"wcagem:step4","reportFindings":"wcagem:step5","documentSteps":"wcagem:step5a","commissioner":"wcagem:commissioner","evaluator":"wcagem:evaluator","evaluationSpecifics":"wcagem:step5b","WCAG":"http://www.w3.org/TR/WCAG/#","WCAG20":"http://www.w3.org/TR/WCAG20/#","WCAG21":"http://www.w3.org/TR/WCAG21/#","WAI":"http://www.w3.org/WAI/","A":"WAI:WCAG2A-Conformance","AA":"WAI:WCAG2AA-Conformance","AAA":"WAI:WCAG2AAA-Conformance","wcagVersion":"WAI:standards-guidelines/wcag/#versions","reportToolVersion":"wcagem:reportToolVersion","earl":"http://www.w3.org/ns/earl#","Assertion":"earl:Assertion","TestMode":"earl:TestMode","TestCriterion":"earl:TestCriterion","TestCase":"earl:TestCase","TestRequirement":"earl:TestRequirement","TestSubject":"earl:TestSubject","TestResult":"earl:TestResult","OutcomeValue":"earl:OutcomeValue","Pass":"earl:Pass","Fail":"earl:Fail","CannotTell":"earl:CannotTell","NotApplicable":"earl:NotApplicable","NotTested":"earl:NotTested","assertedBy":"earl:assertedBy","mode":"earl:mode","result":"earl:result","subject":"earl:subject","test":"earl:test","outcome":"earl:outcome","dcterms":"http://purl.org/dc/terms/","title":"dcterms:title","description":"dcterms:description","summary":"dcterms:summary","date":"dcterms:date","hasPart":"dcterms:hasPart","isPartOf":"dcterms:isPartOf","id":"@id","type":"@type","language":"@language"},"language":"en","type":"Evaluation","reportToolVersion":"3.0.3","defineScope":{"id":"_:defineScope","scope":{"description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"conformanceTarget":"AA","accessibilitySupportBaseline":"Google Chrome with NVDA, FireFox with NVDA, Ecosia mobile browser with TalkBack.","additionalEvaluationRequirements":"","wcagVersion":"2.2"},"exploreTarget":{"id":"_:exploreTarget","essentialFunctionality":"1. Navigation\n2. User input form\n3. Scripted text","pageTypeVariety":"1. Navigation\n2. User input form\n3. Scripted text","technologiesReliedUpon":["HTML","CSS","JavaScript","python Flask"]},"selectSample":{"id":"_:selectSample","structuredSample":[{"id":"_:subject_2","type":["TestSubject","Webpage"],"date":"2024-04-30T16:11:16.199Z","description":"https://commander.mtg.teddy.org.uk/","title":"Home"},{"id":"_:subject_3","type":["TestSubject","Webpage"],"date":"2024-04-30T16:11:32.890Z","description":"https://commander.mtg.teddy.org.uk/contact","title":"Contact us"},{"id":"_:subject_4","type":["TestSubject","Webpage"],"date":"2024-04-30T16:11:48.238Z","description":"https://commander.mtg.teddy.org.uk/services","title":"Services"}],"randomSample":{"id":"_:subject_5","type":["TestSubject","Webpage"],"date":"2024-04-30T16:12:19.332Z","description":"","title":""}},"auditSample":[{"type":"Assertion","date":"2024-04-30T15:48:00.008Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:19:30.651Z","description":"All user input controls have descriptive names and v2 Google reCaptcha used with text label to identify to user that they must check the box to prove they are not a bot.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:non-text-content","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:00.306Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:audio-only-and-video-only-prerecorded","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:04.748Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:captions-prerecorded","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:08.119Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:audio-description-or-media-alternative-prerecorded","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:10.538Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:captions-live","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:14.224Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:audio-description-prerecorded","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:11:01.128Z","description":"Elements change in response to zoom and viewport dimensions properly. Aria-label provided for all images.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:info-and-relationships","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:32:41.865Z","description":"Flow layout keeps associated sections together but allows dynamic structure depending on size of elements relative to screen.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:meaningful-sequence","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:11:04.668Z","description":"Content reads properly as raw text in default order. Aria-label provided for all images and names for all form input components.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:sensory-characteristics","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:35:31.858Z","description":"Orientation of content is not locked.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:orientation","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:38:55.478Z","description":"Appropriate visible labels used alongside name attributes for form input elements.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:identify-input-purpose","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:40:53.059Z","description":"Colour only used to convey meaning for text hyperlinks, which have alt-text attributes to identify their purpose and presence.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:use-of-color","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:39:24.368Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:audio-control","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:46:29.787Z","description":"Webpage text contrast assessed with tool at this website: https://accessibleweb.com/color-contrast-checker/","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:contrast-minimum","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:47:26.364Z","description":"All webpages can be scaled to up to 500% while maintaining structure and visible components.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:resize-text","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:47:30.067Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:images-of-text","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:50:44.949Z","description":"Flex layout forces only vertical scrolling at required viewport dimensions.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:reflow","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:51:34.482Z","description":"Strong borders used for form input components.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:non-text-contrast","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:55:05.024Z","description":"Content becomes vertically scrollable as necessary.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:text-spacing","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:57:32.588Z","description":"Hamburger menu button for navigation overlay used. The button remains stationary with no elements above it, throughout use of navigation.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:content-on-hover-or-focus","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:58:42.536Z","description":"Tab indices set to enable correct transition around page by keyboard. Other keyboard shortcuts not changed.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:keyboard","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:58:59.976Z","description":"Tab indices set to enable correct transition around page by keyboard.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:no-keyboard-trap","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:59:38.989Z","description":"Tab indices set to enable correct transition around page by keyboard. Other keyboard shortcuts not changed, and can be set by user's device settings.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:character-key-shortcuts","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:00:42.868Z","description":"No session time limits imposed on user.","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:timing-adjustable","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:01:05.985Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:pause-stop-hide","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:01:18.827Z","description":"","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:three-flashes-or-below-threshold","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:01:53.694Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:bypass-blocks","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:02:13.542Z","description":"Descriptive titles used on all webpages.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:page-titled","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:02:30.677Z","description":"Keyboard tab indices set for logical navigation around pages.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:focus-order","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:11:09.564Z","description":"Descriptive aria-label provided for all text hyperlinks.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:link-purpose-in-context","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:03:56.473Z","description":"Navigation on all webpages and company logo links to home page.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:multiple-ways","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:06:48.832Z","description":"","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:headings-and-labels","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:06:52.238Z","description":"","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:focus-visible","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:07:05.561Z","description":"","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:focus-not-obscured-minimum","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:07:25.308Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:pointer-gestures","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:08:50.776Z","description":"Up event used to trigger events across website.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:pointer-cancellation","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:13:48.959Z","description":"Input label for attributes used to associate with input elements.\nAria-label attributes used for text hyperlinks.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:label-in-name","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:13:54.759Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:motion-actuation","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:13:56.851Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:dragging-movements","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:18:22.901Z","description":"Minimum control dimension is 27 CSS pixels.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:target-size-minimum","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:19:45.079Z","description":"English - Great Britain on all pages.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:language-of-page","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:20:10.271Z","description":"No language changes across website.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:language-of-parts","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:23:41.854Z","description":"No change of context initiated except by button click to navigate to submit a form and/or navigate to a new page.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:on-focus","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:23:56.660Z","description":"No change of context initiated except by button click to navigate to submit a form and/or navigate to a new page.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:on-input","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:24:11.721Z","description":"Navigation component and mechanisms shared across all pages.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:consistent-navigation","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:25:13.874Z","description":"Classes and CSS styles used to group collections of elements by purpose and functionality.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:consistent-identification","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:26:06.583Z","description":"Contact us button provided in a consistent format.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:consistent-help","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:26:47.172Z","description":"Each input element has an associated error display label which are triggered when input validation is not met.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:error-identification","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:27:08.142Z","description":"Each user input has a descriptive label.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:labels-or-instructions","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:30:48.127Z","description":"Text description of incomplete required fields is provided. Description of what caused error is issued when it involves simple regular expression validation.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:error-suggestion","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:31:12.544Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:error-prevention-legal-financial-data","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:33:08.124Z","description":"No redundant data entry required. User's browser cache stores form data for rapid re-entry on crash or any other occasion.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:redundant-entry","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:34:17.347Z","description":"Alternative sign in methods provided, including recovery by code by phone and email.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:accessible-authentication-minimum","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:37:16.977Z","description":"Aria-label attribute maintained for all images and text hyperlinks. Label for attribute used to associate input elements with descriptive labels.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:name-role-value","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:38:13.227Z","description":"Success feedback provided on form submission, with descriptive errors on failure.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Precision And Research Technology Systems Limited"},"test":{"id":"WCAG22:status-messages","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}}],"reportFindings":{"date":{"type":"http://www.w3.org/TR/NOTE-datetime","@value":"Tue Apr 30 2024"},"summary":"","title":"","commissioner":"Lord Edward Middleton-Smith","evaluator":"Lord Edward Middleton-Smith","documentSteps":[{"id":"_:about"},{"id":"_:defineScope"},{"id":"_:exploreTarget"},{"id":"_:selectSample"}],"evaluationSpecifics":""}} \ No newline at end of file +{"@context":{"reporter":"http://github.com/w3c/wai-wcag-em-report-tool/","wcagem":"http://www.w3.org/TR/WCAG-EM/#","Evaluation":"wcagem:procedure","defineScope":"wcagem:step1","scope":"wcagem:step1a","step1b":{"@id":"wcagem:step1b","@type":"@id"},"conformanceTarget":"step1b","accessibilitySupportBaseline":"wcagem:step1c","additionalEvaluationRequirements":"wcagem:step1d","exploreTarget":"wcagem:step2","essentialFunctionality":"wcagem:step2b","pageTypeVariety":"wcagem:step2c","technologiesReliedUpon":"wcagem:step2d","selectSample":"wcagem:step3","structuredSample":"wcagem:step3a","randomSample":"wcagem:step3b","Website":"wcagem:website","Webpage":"wcagem:webpage","auditSample":"wcagem:step4","reportFindings":"wcagem:step5","documentSteps":"wcagem:step5a","commissioner":"wcagem:commissioner","evaluator":"wcagem:evaluator","evaluationSpecifics":"wcagem:step5b","WCAG":"http://www.w3.org/TR/WCAG/#","WCAG20":"http://www.w3.org/TR/WCAG20/#","WCAG21":"http://www.w3.org/TR/WCAG21/#","WAI":"http://www.w3.org/WAI/","A":"WAI:WCAG2A-Conformance","AA":"WAI:WCAG2AA-Conformance","AAA":"WAI:WCAG2AAA-Conformance","wcagVersion":"WAI:standards-guidelines/wcag/#versions","reportToolVersion":"wcagem:reportToolVersion","earl":"http://www.w3.org/ns/earl#","Assertion":"earl:Assertion","TestMode":"earl:TestMode","TestCriterion":"earl:TestCriterion","TestCase":"earl:TestCase","TestRequirement":"earl:TestRequirement","TestSubject":"earl:TestSubject","TestResult":"earl:TestResult","OutcomeValue":"earl:OutcomeValue","Pass":"earl:Pass","Fail":"earl:Fail","CannotTell":"earl:CannotTell","NotApplicable":"earl:NotApplicable","NotTested":"earl:NotTested","assertedBy":"earl:assertedBy","mode":"earl:mode","result":"earl:result","subject":"earl:subject","test":"earl:test","outcome":"earl:outcome","dcterms":"http://purl.org/dc/terms/","title":"dcterms:title","description":"dcterms:description","summary":"dcterms:summary","date":"dcterms:date","hasPart":"dcterms:hasPart","isPartOf":"dcterms:isPartOf","id":"@id","type":"@type","language":"@language"},"language":"en","type":"Evaluation","reportToolVersion":"3.0.3","defineScope":{"id":"_:defineScope","scope":{"description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"conformanceTarget":"AA","accessibilitySupportBaseline":"Google Chrome with NVDA, FireFox with NVDA, Ecosia mobile browser with TalkBack.","additionalEvaluationRequirements":"","wcagVersion":"2.2"},"exploreTarget":{"id":"_:exploreTarget","essentialFunctionality":"1. Navigation\n2. User input form\n3. Scripted text","pageTypeVariety":"1. Navigation\n2. User input form\n3. Scripted text","technologiesReliedUpon":["HTML","CSS","JavaScript","python Flask"]},"selectSample":{"id":"_:selectSample","structuredSample":[{"id":"_:subject_2","type":["TestSubject","Webpage"],"date":"2024-04-30T16:11:16.199Z","description":"https://commander.mtg.teddy.org.uk/","title":"Home"},{"id":"_:subject_3","type":["TestSubject","Webpage"],"date":"2024-04-30T16:11:32.890Z","description":"https://commander.mtg.teddy.org.uk/contact","title":"Contact us"},{"id":"_:subject_4","type":["TestSubject","Webpage"],"date":"2024-04-30T16:11:48.238Z","description":"https://commander.mtg.teddy.org.uk/services","title":"Services"}],"randomSample":{"id":"_:subject_5","type":["TestSubject","Webpage"],"date":"2024-04-30T16:12:19.332Z","description":"","title":""}},"auditSample":[{"type":"Assertion","date":"2024-04-30T15:48:00.008Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:19:30.651Z","description":"All user input controls have descriptive names and v2 Google reCaptcha used with text label to identify to user that they must check the box to prove they are not a bot.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:non-text-content","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:00.306Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:audio-only-and-video-only-prerecorded","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:04.748Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:captions-prerecorded","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:08.119Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:audio-description-or-media-alternative-prerecorded","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:10.538Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:captions-live","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:20:14.224Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:audio-description-prerecorded","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:11:01.128Z","description":"Elements change in response to zoom and viewport dimensions properly. Aria-label provided for all images.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:info-and-relationships","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:32:41.865Z","description":"Flow layout keeps associated sections together but allows dynamic structure depending on size of elements relative to screen.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:meaningful-sequence","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:11:04.668Z","description":"Content reads properly as raw text in default order. Aria-label provided for all images and names for all form input components.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:sensory-characteristics","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:35:31.858Z","description":"Orientation of content is not locked.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:orientation","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:38:55.478Z","description":"Appropriate visible labels used alongside name attributes for form input elements.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:identify-input-purpose","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:40:53.059Z","description":"Colour only used to convey meaning for text hyperlinks, which have alt-text attributes to identify their purpose and presence.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:use-of-color","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:39:24.368Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:audio-control","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:46:29.787Z","description":"Webpage text contrast assessed with tool at this website: https://accessibleweb.com/color-contrast-checker/","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:contrast-minimum","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:47:26.364Z","description":"All webpages can be scaled to up to 500% while maintaining structure and visible components.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:resize-text","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:47:30.067Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:images-of-text","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:50:44.949Z","description":"Flex layout forces only vertical scrolling at required viewport dimensions.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:reflow","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:51:34.482Z","description":"Strong borders used for form input components.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:non-text-contrast","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:55:05.024Z","description":"Content becomes vertically scrollable as necessary.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:text-spacing","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:57:32.588Z","description":"Hamburger menu button for navigation overlay used. The button remains stationary with no elements above it, throughout use of navigation.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:content-on-hover-or-focus","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:58:42.536Z","description":"Tab indices set to enable correct transition around page by keyboard. Other keyboard shortcuts not changed.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:keyboard","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:58:59.976Z","description":"Tab indices set to enable correct transition around page by keyboard.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:no-keyboard-trap","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T16:59:38.989Z","description":"Tab indices set to enable correct transition around page by keyboard. Other keyboard shortcuts not changed, and can be set by user's device settings.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:character-key-shortcuts","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:00:42.868Z","description":"No session time limits imposed on user.","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:timing-adjustable","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:01:05.985Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:pause-stop-hide","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:01:18.827Z","description":"","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:three-flashes-or-below-threshold","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:01:53.694Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:bypass-blocks","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:02:13.542Z","description":"Descriptive titles used on all webpages.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:page-titled","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:02:30.677Z","description":"Keyboard tab indices set for logical navigation around pages.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:focus-order","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:11:09.564Z","description":"Descriptive aria-label provided for all text hyperlinks.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:link-purpose-in-context","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:03:56.473Z","description":"Navigation on all webpages and company logo links to home page.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:multiple-ways","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:06:48.832Z","description":"","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:headings-and-labels","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:06:52.238Z","description":"","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:focus-visible","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:07:05.561Z","description":"","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:focus-not-obscured-minimum","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:07:25.308Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:pointer-gestures","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:08:50.776Z","description":"Up event used to trigger events across website.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:pointer-cancellation","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:13:48.959Z","description":"Input label for attributes used to associate with input elements.\nAria-label attributes used for text hyperlinks.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:label-in-name","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:13:54.759Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:motion-actuation","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:13:56.851Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:dragging-movements","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.865Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:18:22.901Z","description":"Minimum control dimension is 27 CSS pixels.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:target-size-minimum","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.009Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:19:45.079Z","description":"English - Great Britain on all pages.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:language-of-page","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:20:10.271Z","description":"No language changes across website.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:language-of-parts","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:23:41.854Z","description":"No change of context initiated except by button click to navigate to submit a form and/or navigate to a new page.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:on-focus","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:23:56.660Z","description":"No change of context initiated except by button click to navigate to submit a form and/or navigate to a new page.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:on-input","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:24:11.721Z","description":"Navigation component and mechanisms shared across all pages.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:consistent-navigation","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:25:13.874Z","description":"Classes and CSS styles used to group collections of elements by purpose and functionality.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:consistent-identification","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:26:06.583Z","description":"Contact us button provided in a consistent format.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:consistent-help","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:26:47.172Z","description":"Each input element has an associated error display label which are triggered when input validation is not met.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:error-identification","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:27:08.142Z","description":"Each user input has a descriptive label.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:labels-or-instructions","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:30:48.127Z","description":"Text description of incomplete required fields is provided. Description of what caused error is issued when it involves simple regular expression validation.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:error-suggestion","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:31:12.544Z","description":"","outcome":{"id":"earl:inapplicable","type":["OutcomeValue","NotApplicable"],"title":"Not present"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:error-prevention-legal-financial-data","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:33:08.124Z","description":"No redundant data entry required. User's browser cache stores form data for rapid re-entry on crash or any other occasion.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:redundant-entry","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:34:17.347Z","description":"Alternative sign in methods provided, including recovery by code by phone and email.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:accessible-authentication-minimum","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:37:16.977Z","description":"Aria-label attribute maintained for all images and text hyperlinks. Label for attribute used to associate input elements with descriptive labels.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:name-role-value","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}},{"type":"Assertion","date":"2024-04-30T15:48:00.010Z","mode":{"type":"TestMode","@value":"earl:manual"},"result":{"type":"TestResult","date":"2024-04-30T17:38:13.227Z","description":"Success feedback provided on form submission, with descriptive errors on failure.","outcome":{"id":"earl:passed","type":["OutcomeValue","Pass"],"title":"Passed"}},"subject":{"id":"_:subject_1","type":["TestSubject","Website"],"date":"2024-04-30T15:47:59.864Z","description":"'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/","title":"Public Website of Shuffle & Skirmish"},"test":{"id":"WCAG22:status-messages","type":["TestCriterion","TestRequirement"],"date":"2024-04-30T15:47:59.866Z"}}],"reportFindings":{"date":{"type":"http://www.w3.org/TR/NOTE-datetime","@value":"Tue Apr 30 2024"},"summary":"","title":"","commissioner":"Lord Edward Middleton-Smith","evaluator":"Lord Edward Middleton-Smith","documentSteps":[{"id":"_:about"},{"id":"_:defineScope"},{"id":"_:exploreTarget"},{"id":"_:selectSample"}],"evaluationSpecifics":""}} \ No newline at end of file diff --git a/static/docs/wcag_2.2AA_public-website-of-precision-and-research-technology-systems-limited-report.html b/static/docs/wcag_2.2AA_public-website-of-precision-and-research-technology-systems-limited-report.html index 8cce5a3..76d028f 100644 --- a/static/docs/wcag_2.2AA_public-website-of-precision-and-research-technology-systems-limited-report.html +++ b/static/docs/wcag_2.2AA_public-website-of-precision-and-research-technology-systems-limited-report.html @@ -17,7 +17,7 @@ td:not([class]):last-child { padding: 0 1em; } -

Report

About the Evaluation

Report Creator
Lord Edward Middleton-Smith
Evaluation Commissioner
Lord Edward Middleton-Smith
Evaluation date
Tue Apr 30 2024

Executive Summary

Not provided

Scope of the Evaluation

Website name
Public Website of Precision And Research Technology Systems Limited
Scope of the website
'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/
WCAG Version
2.2
Conformance target
AA
Accessibility support baseline
Google Chrome with NVDA, FireFox with NVDA, Ecosia mobile browser with TalkBack.
Additional evaluation requirements
Not provided

Detailed Audit Results

Summary

Reported on 55 of 55 WCAG 2.2 AA +

Report

About the Evaluation

Report Creator
Lord Edward Middleton-Smith
Evaluation Commissioner
Lord Edward Middleton-Smith
Evaluation date
Tue Apr 30 2024

Executive Summary

Not provided

Scope of the Evaluation

Website name
Public Website of Shuffle & Skirmish
Scope of the website
'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/
WCAG Version
2.2
Conformance target
AA
Accessibility support baseline
Google Chrome with NVDA, FireFox with NVDA, Ecosia mobile browser with TalkBack.
Additional evaluation requirements
Not provided

Detailed Audit Results

Summary

Reported on 55 of 55 WCAG 2.2 AA Success Criteria.

  • 41 Passed
  • 0 Failed
  • 0 Cannot tell
  • 14 Not present
  • 0 Not checked

All Results

1 Perceivable

1.1 Text Alternatives
Success Criterion Result Observations
1.1.1: Non-text Content

Result: Passed

Observations:

All user input controls have descriptive names and v2 Google reCaptcha used with text label to identify to user that they must check the box to prove they are not a bot.

1.2 Time-based Media
Success Criterion Result Observations
1.2.1: Audio-only and Video-only (Prerecorded)

Result: Not present

1.2.2: Captions (Prerecorded)

Result: Not present

1.2.3: Audio Description or Media Alternative (Prerecorded)

Result: Not present

1.2.4: Captions (Live)

Result: Not present

1.2.5: Audio Description (Prerecorded)

Result: Not present

1.3 Adaptable
Success Criterion Result Observations
1.3.1: Info and Relationships

Result: Passed

Observations:

Elements change in response to zoom and viewport dimensions properly. Aria-label provided for all images.

1.3.2: Meaningful Sequence

Result: Passed

Observations:

Flow layout keeps associated sections together but allows dynamic structure depending on size of elements relative to screen.

diff --git a/templates/pages/legal/_license.html b/templates/pages/legal/_license.html index 95fb915..fab85e2 100644 --- a/templates/pages/legal/_license.html +++ b/templates/pages/legal/_license.html @@ -11,7 +11,7 @@
-

Copyright © 2024 Precision And Research Technology Systems Limited +

Copyright © 2024 Shuffle & Skirmish

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

diff --git a/templates/pages/legal/accessibility_report.html b/templates/pages/legal/accessibility_report.html index 8cce5a3..76d028f 100644 --- a/templates/pages/legal/accessibility_report.html +++ b/templates/pages/legal/accessibility_report.html @@ -17,7 +17,7 @@ td:not([class]):last-child { padding: 0 1em; } -

Report

About the Evaluation

Report Creator
Lord Edward Middleton-Smith
Evaluation Commissioner
Lord Edward Middleton-Smith
Evaluation date
Tue Apr 30 2024

Executive Summary

Not provided

Scope of the Evaluation

Website name
Public Website of Precision And Research Technology Systems Limited
Scope of the website
'All web content of the public mobile and desktop website of Precision And Research Technology Systems Limited located at https://commander.mtg.teddy.org.uk/
WCAG Version
2.2
Conformance target
AA
Accessibility support baseline
Google Chrome with NVDA, FireFox with NVDA, Ecosia mobile browser with TalkBack.
Additional evaluation requirements
Not provided

Detailed Audit Results

Summary

Reported on 55 of 55 WCAG 2.2 AA +

Report

About the Evaluation

Report Creator
Lord Edward Middleton-Smith
Evaluation Commissioner
Lord Edward Middleton-Smith
Evaluation date
Tue Apr 30 2024

Executive Summary

Not provided

Scope of the Evaluation

Website name
Public Website of Shuffle & Skirmish
Scope of the website
'All web content of the public mobile and desktop website of Shuffle & Skirmish located at https://commander.mtg.teddy.org.uk/
WCAG Version
2.2
Conformance target
AA
Accessibility support baseline
Google Chrome with NVDA, FireFox with NVDA, Ecosia mobile browser with TalkBack.
Additional evaluation requirements
Not provided

Detailed Audit Results

Summary

Reported on 55 of 55 WCAG 2.2 AA Success Criteria.

  • 41 Passed
  • 0 Failed
  • 0 Cannot tell
  • 14 Not present
  • 0 Not checked

All Results

1 Perceivable

1.1 Text Alternatives
Success Criterion Result Observations
1.1.1: Non-text Content

Result: Passed

Observations:

All user input controls have descriptive names and v2 Google reCaptcha used with text label to identify to user that they must check the box to prove they are not a bot.

1.2 Time-based Media
Success Criterion Result Observations
1.2.1: Audio-only and Video-only (Prerecorded)

Result: Not present

1.2.2: Captions (Prerecorded)

Result: Not present

1.2.3: Audio Description or Media Alternative (Prerecorded)

Result: Not present

1.2.4: Captions (Live)

Result: Not present

1.2.5: Audio Description (Prerecorded)

Result: Not present

1.3 Adaptable
Success Criterion Result Observations
1.3.1: Info and Relationships

Result: Passed

Observations:

Elements change in response to zoom and viewport dimensions properly. Aria-label provided for all images.

1.3.2: Meaningful Sequence

Result: Passed

Observations:

Flow layout keeps associated sections together but allows dynamic structure depending on size of elements relative to screen.