From f4f28f74f637ea57d62aec5951a5b65176ef3164 Mon Sep 17 00:00:00 2001 From: Brutus5000 Date: Thu, 15 Jun 2023 17:57:53 +0200 Subject: [PATCH] Add GDPR deletion processing queues --- migrations/V131__gdpr_delete_handling.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 migrations/V131__gdpr_delete_handling.sql diff --git a/migrations/V131__gdpr_delete_handling.sql b/migrations/V131__gdpr_delete_handling.sql new file mode 100644 index 00000000..908b5b19 --- /dev/null +++ b/migrations/V131__gdpr_delete_handling.sql @@ -0,0 +1,15 @@ +create table account_deletion_requests +( + id varchar(36) null comment 'random uuid (as it''s also used for lookup of state by user)', + account_id mediumint not null, + state enum ('NEW', 'IN_PROCESS', 'FINISHED', 'ERROR') default 'NEW' not null, + full_delete boolean not null comment 'full_delete=true means the whole account was deleted. This requires no games to be played.', + processed_by mediumint null comment 'Refers to the admin manually processing. Should be null if automatically processed', + comment text null comment 'Allows manual comments for manual processing', + created_at timestamp null, + updated_at timestamp null, + constraint account_deletion_requests_pk + primary key (id), + constraint account_deletion_requests_account_unique_key + unique (account_id) +);