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

Implement support for "strict" mode #56

Merged
merged 15 commits into from
Nov 25, 2023

Conversation

turbohz
Copy link
Contributor

@turbohz turbohz commented Oct 30, 2023

Fixes #55

Many tests work with the assumption that the database is in "sloppy" mode, and though I managed to fix plenty of them by tweaking helper functions, some would need more involved changes.

I'd need feedback on how to make more progress with this.

@turbohz turbohz changed the title Implement support for "--strict" mode Implement support for "strict" mode Oct 30, 2023
@turbohz turbohz marked this pull request as draft October 30, 2023 18:39
@Odonno
Copy link
Owner

Odonno commented Nov 4, 2023

This is really nice. Thank you for your effort @turbohz

Like I said, you can add --strict option in https://github.com/Odonno/surrealdb-migrations/blob/main/before-integration-tests.sh and then run tests to ensure they are still all green.

…xist

Fixes first migration failing in --strict mode
Note:

- Bindings for queries not used because of:
surrealdb/surrealdb#1911

 - Backticks required for the randomized names the tests use
Fixes tests made for "sloppy" mode
Fixes tests made for "sloppy" mode
@turbohz turbohz force-pushed the implement-support-strict-mode branch 2 times, most recently from 712e17f to 5617fb5 Compare November 6, 2023 19:49
@turbohz turbohz force-pushed the implement-support-strict-mode branch from 3264867 to 0bad7b0 Compare November 9, 2023 19:09
Migration was applied to the wrong (random named table) that was not
used to perform the assertions.

Again, sloppy mode allowed this to pass unnoticed.
@turbohz turbohz marked this pull request as ready for review November 13, 2023 19:51
@turbohz
Copy link
Contributor Author

turbohz commented Nov 13, 2023

All tests are passing in both strict and sloppy mode.

@Odonno Odonno merged commit ffcf8dd into Odonno:main Nov 25, 2023
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

Successfully merging this pull request may close these issues.

Strict mode apparently unsupported
2 participants