Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't change postgres varchar type to integer #866

Open
debu99 opened this issue Feb 3, 2023 · 0 comments
Open

can't change postgres varchar type to integer #866

debu99 opened this issue Feb 3, 2023 · 0 comments

Comments

@debu99
Copy link

debu99 commented Feb 3, 2023

Generated DDL Statement (generated at 2023-02-03T12:40:07+08:00):
create table "demoTbl" ("id" character varying (12), "title" text not null, primary key ("id"))

Generated DDL Statement (generated at 2023-02-03T13:44:30+08:00):
alter table "demoTbl" alter column "id" type integer

And the table is no data yet.

{"level":"error","msg":"ERROR: column \"id\" cannot be cast automatically to type integer (SQLSTATE 42804)"}
Executing query "alter table \"demoTbl\" alter column \"id\" type integer"
{"level":"error","msg":"ERROR: column \"id\" cannot be cast automatically to type integer (SQLSTATE 42804)"}
Executing query "alter table \"demoTbl\" alter column \"id\" type integer"
{"level":"error","msg":"ERROR: column \"id\" cannot be cast automatically to type integer (SQLSTATE 42804)"}
Executing query "alter table \"demoTbl\" alter column \"id\" type integer"
{"level":"error","msg":"ERROR: column \"id\" cannot be cast automatically to type integer (SQLSTATE 42804)"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant