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

Watching additional sql files (referenced in afterCurrent) #209

Open
janm6k opened this issue Feb 25, 2024 · 1 comment
Open

Watching additional sql files (referenced in afterCurrent) #209

janm6k opened this issue Feb 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@janm6k
Copy link

janm6k commented Feb 25, 2024

Summary

In the project I work on, we have a "seed.sql" included in afterCurrent field of the .gmrc config file.

The seed.sql contains testing data that I need to edit from time to time. When I edit it, and I have graphile-migrate watch running, it would be very handy if the current migration run again (like if the current migration was edited), and the seed data updated in database. My workaround is to actually edit the current migration by adding "select 1" there and then removing it :)

Is there a way to specify that watch command should also watch some additional files?

If there isn't a way, would it be a good opportunity for me to try to add it and submit PR?

@benjie
Copy link
Member

benjie commented Mar 4, 2024

No, we don't have that; yes, this would be a good opportunity to make that change.

Ideally it would work like magic, which we could accomplish by determining the SQL files that the gmrc references and automatically monitoring those.

Failing that, adding a "watchFiles: [...]" list to the config with paths to the relevant files to watch in addition would also be effective.

@benjie benjie added the enhancement New feature or request label Mar 4, 2024
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