Revert "feat: add template version creator (#2991)" (#2999)

This reverts commit aea3b3b83e.
This commit is contained in:
Colin Adler
2022-07-14 17:57:42 -04:00
committed by GitHub
parent 1033e02d79
commit 680e24a14b
14 changed files with 16 additions and 106 deletions

View File

@ -1 +0,0 @@
ALTER TABLE ONLY template_versions DROP COLUMN IF EXISTS created_by;

View File

@ -1,14 +0,0 @@
ALTER TABLE ONLY template_versions ADD COLUMN IF NOT EXISTS created_by uuid REFERENCES users (id) ON DELETE RESTRICT;
UPDATE
template_versions
SET
created_by = (
SELECT created_by FROM templates
WHERE template_versions.template_id = templates.id
LIMIT 1
)
WHERE
created_by IS NULL;
ALTER TABLE ONLY template_versions ALTER COLUMN created_by SET NOT NULL;