Bug in schema migration

  • Goal: migrate retool db from production to staging

  • Steps: click the migrate from prod to staging button

  • Details: Error: type "status_enum_6684b6c8" does not exist. Defined as CREATE TYPE "Status_enum_6684b6c8" AS ENUM ('IN_PROGRESS', 'COMPLETED', 'CANCELLED', 'NEEDS_REVIEW'); Later used in create table order( ... "Status" Status_enum_6684b6c8 NOT NULL,...). Note SQL is case insensitive, all variables/types with upper case or space should be used like "Var", as Var will be parsed to var. Clearly this is known by someone, as the definition is quoted. The usage should be too. Quoting the type and rerunning fixes the problem.