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

Preserve comments for schema.sql #15

Open
110y opened this issue Dec 5, 2019 · 1 comment
Open

Preserve comments for schema.sql #15

110y opened this issue Dec 5, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@110y
Copy link
Collaborator

110y commented Dec 5, 2019

WHAT

  • Preserve comments for schema.sql
    • when execute migrations to DB, wrench should strip comments in the schema file.
    • when load schema from DB, wrench should preserve comments and then apply comments to the schema file.

WHY

  • would like to write comments to the schema file although Spanner does not recognize comments.
@110y 110y added the enhancement New feature or request label Dec 5, 2019
mookjp added a commit to mookjp/wrench that referenced this issue Jul 26, 2020
mookjp added a commit to mookjp/wrench that referenced this issue Oct 4, 2021
@halmai
Copy link
Contributor

halmai commented Oct 5, 2021

Can we expect any improvement with this issue in the near future?

We have lots of problems with documenting our migration SQLs in separate files. It would be much nicer to keep comments in the SQL scripts but currently wrench doesn't support them.

If this issue won't be solved, I would propose a different idea. I would also strip the comments but not with regexps. I don't think this approach is reliable enough. I would rather parse the input rune-by-rune and switch between string, comment and normal mode according to the subsequent characters.

Can I start working on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants