You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using atlas schema apply with 2 DBs, one has the column lang_code defined as TEXT another as ENUM, so Atlas generates the ALTER TABLE but it can't proceed. Is that a bug in convergence code?
-- modify "characteristics_localization" table
-> ALTER TABLE "public"."characteristics_localization" ALTER COLUMN "lang_code" TYPE "public"."lang_code";
pq: column "lang_code" cannot be cast automatically to type lang_code
-------------------------
-- 24.95230433s
-- 1 migration with errors
-- 16 sql statements ok, 1 with errors
Error: executing statement "ALTER TABLE \"public\".\"characteristics_localization\" ALTER COLUMN \"lang_code\" TYPE \"public\".\"lang_code\";": pq: column "lang_code" cannot be cast automatically to type lang_code
What I mean by that is that it could easily see that this won't work and warn me some time earlier on, or is it by design?
The text was updated successfully, but these errors were encountered:
The planner can be smarter here, by adding pre-migration checks and let you control the type conversion. For now, I'll suggest you to run schema apply with the --edit flag and modify this statement.
I'll keep this issue open and assign it to myself.
I'm using
atlas schema apply
with 2 DBs, one has the column lang_code defined as TEXT another as ENUM, so Atlas generates the ALTER TABLE but it can't proceed. Is that a bug in convergence code?What I mean by that is that it could easily see that this won't work and warn me some time earlier on, or is it by design?
The text was updated successfully, but these errors were encountered: