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

data and schema migrations fails for source=postgresql due to a field named "order" #450

Open
muhammadsherief24 opened this issue Jan 23, 2023 · 0 comments

Comments

@muhammadsherief24
Copy link

muhammadsherief24 commented Jan 23, 2023

Expected Behavior

Schema and data migration succeeds for source=postgresql and target dialect=postgresql for fields with the name order.

Actual Behavior

Schema and data migration fails for source=postgresql and target dialect=postgresql when there is a field named order.

Guess

Field names for postgresql should be surrounded by ".

Steps to Reproduce the Problem

  1. Create a table with the a field named order in a cloud SQL postgresql database.
  2. pg_dump the database: pg_dump -U <user> -h <host> -p <port> <db_name> -n public --format=p > pg_dump.txt.
  3. Run harbourbridge schema-and-data -source=postgresql -target-profile="dialect=postgresql" < pg_dump.txt.
  4. Error
can't migrate database: can't create/update database: can't create database: can't build UpdateDatabaseDdlRequest: rpc error: code = InvalidArgument desc = [ERROR] syntax error at or near \"order\"; failed to parse the DDL statements."}

Specifications

  • Version:
  • Platform: Ubuntu 20 LTS Linux 5.15.0-58-generic
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