Migration 004 fix: pg_type catalog table, not pg_typname
All checks were successful
build-and-deploy / build (push) Successful in 1m37s
All checks were successful
build-and-deploy / build (push) Successful in 1m37s
This commit is contained in:
parent
c1a19ecf06
commit
1ce3da4403
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ def upgrade() -> None:
|
||||||
BEGIN
|
BEGIN
|
||||||
IF NOT EXISTS (
|
IF NOT EXISTS (
|
||||||
SELECT 1 FROM pg_enum e
|
SELECT 1 FROM pg_enum e
|
||||||
JOIN pg_typname t ON t.oid = e.enumtypid
|
JOIN pg_type t ON t.oid = e.enumtypid
|
||||||
WHERE t.typname = 'event_source_type' AND e.enumlabel = 'camera'
|
WHERE t.typname = 'event_source_type' AND e.enumlabel = 'camera'
|
||||||
) THEN
|
) THEN
|
||||||
ALTER TYPE event_source_type ADD VALUE 'camera';
|
ALTER TYPE event_source_type ADD VALUE 'camera';
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue