chore: tests: use schema builder for columns setup #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will change the columns setup in tests to use the schema builder instead of the raw db-agnostic SQL.
The need for this change came from an attempt to add a "datetime" column, where PostgreSQL will throw an error
type "datetime" does not exist
. Action run example: https://github.com/mohannadnaj-forks/laravel-query-expressions/actions/runs/6211881746/job/16861481277#step:8:274Pros of this change: Expressive and a guaranteed db-agnostic setup. Cons of this change: More boilerplate for tests.
Looks like it's PostgreSQL not SQLite?
This change is not really necessary since we can just use an additional parameter for unsupported types, like what's currently applied in the pending date format PR #18
P.S: I wasn't familiar with the expression "special snowflake", and I laughed a lot when I read "The conviction that one (or often, one's child) is, in some way, special and should therefore be treated differently than others" lol 😹