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
First migration is successful but second migration failed.
「::(cast)」 statement is converted to 「collate」statement in second migration.
Please confirm this error.
$ psqldef --version
v0.13.7
--export output
CREATETABLE "public"."hoge" (
"amount"text
);
CREATEVIEWpublic.hoge_view ASSELECT (hoge.amount)::numeric(10,2) AS amount_num FROM hoge;
Input SQL
createtablehoge (
amount text
);
createviewhoge_viewasselect
amount::numeric(10,2) as amount_num
from hoge;
Current output
CREATE OR REPLACEVIEW "public"."hoge_view"ASselect amount collate as amount_num from hoge;
2022/08/2619:26:57 pq: syntax error at or near "as"
Expected output
No errors.
The text was updated successfully, but these errors were encountered:
you8-hz
changed the title
[psqldef] 「cast(::)」 statement is converted to 「collate」statement in second migration
[psqldef] 「::(cast)」 statement is converted to 「collate」statement in second migration
Aug 26, 2022
Thanks for reporting it. Now that we have the original PostgreSQL parser #241, which is currently just partially applied, I think this one is much easier to fix than before. However, as I need to focus on conference preparations for a few weeks, please allow me to have a look at this after Sep 10th or so. I could also look at a pull request if filed.
First migration is successful but second migration failed.
「::(cast)」 statement is converted to 「collate」statement in second migration.
Please confirm this error.
--export output
Input SQL
Current output
Expected output
No errors.
The text was updated successfully, but these errors were encountered: