-
Notifications
You must be signed in to change notification settings - Fork 18
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
wrap column names in quotes for numeric & hyphen based column names #13
base: master
Are you sure you want to change the base?
Conversation
Hi @rubengmurray, thanks for the contribution! Could you add some tests for this? A unit test and also an integration test? For general cleanliness of the output, it would be nice to only quote properties that really need it. |
Completely forgot about this @danvk - I've added it to my todos to circle back on when I can. |
…n-names-as-string
@danvk when I run the test suite locally (on
Can you confirm? |
Haven't done what the README says. I will take a look actually 👀 |
yeah I'm still seeing the same report via the |
Hi @rubengmurray -- what errors are you getting? How are you running the tests? Do you have an instance of Postgres running that the tests can connect to? If not, that would explain why most of the tests are failing. The tests are failing on CI because the snapshots haven't been updated. You can update snapshots with Just to reiterate what I said earlier:
Here's how I run the tests locally and the output that I see:
|
Yeah, definitely have
Interestingly, this seems to be a difference between the outputted
vs
I'm not really familiar with Update: not really sure where those artefacts came from but I've deleted them and I'm now at
I'll continue to work through. And your point about |
Looks now like it's failing because of an in-built Postgres function which I don't have access to. It appears to have been added in Postgres 13, but I'm running 12 locally (https://pgpedia.info/g/gen_random_uuid-function.html) Might need a docker-compose adding with Postgres 13 to spin up for the integration tests.
|
Thanks for digging into this @rubengmurray. Your docker-compose idea makes sense to me. I'd suggest removing the UUIDs since they're somewhat incidental to the test and I didn't realize they required Postgres 13. But I use UUIDs quite extensively on my work project, so I actually kinda like having them tested. Could you add a note to the README saying that running the tests requires Postgres 13. And if you make a Dockerfile or docker-compose command that sets this up, that'd be lovely to commit as well. |
I'll see if i can get around to doing the docker bit over the next few days. |
I'm actually not too familiar with As an aside, I'm using this package now (based on your previous changes) as part of an automated script, post knex migration, which keeps all types up-to date on every database change. Very happy with this. |
No description provided.