remove fake names from profile

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-05-06 09:20:45 +02:00
parent 2e2ee1422f
commit fc0a6a3c73
8 changed files with 55 additions and 41 deletions

View File

@@ -43,7 +43,6 @@ ORDER BY
CREATE TABLE openpanel.profiles (
`id` String,
`external_id` String,
`first_name` String,
`last_name` String,
`email` String,
@@ -90,4 +89,23 @@ FROM
events
GROUP BY
date,
project_id;
project_id;
-- DROP external_id and add is_external column
ALTER TABLE
profiles DROP COLUMN external_id;
ALTER TABLE
profiles
ADD
COLUMN is_external Boolean
AFTER
id;
ALTER TABLE
profiles
UPDATE
is_external = length(id) != 32
WHERE
true
and length(id) != 32;