Change the public schema name with ENV vars#445
Conversation
DZakh
left a comment
There was a problem hiding this comment.
Looks good. I left one comment regarding tests. Also, I remember there were some queries in the Rust code. Could you double check them as well 👌
|
|
||
| describe("Entity History Codegen", () => { | ||
| it("Creates a postgres insert function", () => { | ||
| let expected = `CREATE OR REPLACE FUNCTION "insert_TestEntity_history"(history_row "public"."TestEntity_history", should_copy_current_entity BOOLEAN) |
There was a problem hiding this comment.
Let's keep the expected as a plain string
There was a problem hiding this comment.
I agree here, the tests should not have dynamic environment values for assertions
70bcb85 to
e83badf
Compare
DZakh
left a comment
There was a problem hiding this comment.
Looks really good 👍 This is an amazing work and cool to see little improvements not related to the main problem. I left one comment regarding using EnvState in db.rs. Also, you're our first external contributor, so I need to share our Contributor License Agreement (CLA) with you, since we created it after you've started working on the PR 😅
I asked @JonoPrest to make a final review. I'll merge it and create a release after he approves 💪
JonoPrest
left a comment
There was a problem hiding this comment.
Hey @pavlovdog, thanks so much for the contribution 🔥
Before merging we just need to sanitise the the schema name on raw query strings to handle mixed casing. And it would be good to see a test that uses an alt schema name to validate everything works as expected. Perhaps it's just worth duplicating one of the integration tests where an alterenative schema name is set before start up.
JonoPrest
left a comment
There was a problem hiding this comment.
Approving since my comments are not blocking for merge, it's already an improvement 👍🏼
This reverts commit 1b3918d.
Co-authored-by: Jono Prest <65739024+JonoPrest@users.noreply.github.com>
|
Hey @JonoPrest, thanks so much for your review! I'm happy to be your first contributor :) I've updated the code with your comments, I'm happy to cover this with a test, do you think I can copy-paste |
Awesome, I think it can be as simple as duplicating this test in the integration test script hyperindex/codegenerator/integration_tests/tests/runAll.sh Lines 31 to 33 in 1eaf596 |
No description provided.