Skip to content

fix(sqlite): enumAsString generates varchar column instead of integer #597#604

Merged
tshedor merged 4 commits intomainfrom
enum-as-string-migration
Jun 23, 2025
Merged

fix(sqlite): enumAsString generates varchar column instead of integer #597#604
tshedor merged 4 commits intomainfrom
enum-as-string-migration

Conversation

@tshedor
Copy link
Collaborator

@tshedor tshedor commented Jun 20, 2025

No description provided.

@tshedor tshedor requested a review from mateominato June 21, 2025 17:36
Copy link
Collaborator

@mateominato mateominato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving cause no context but 95% of this PR seems to be regenerated test output thats only reformatted, and a bunch of print statements that i assume were meant to be removed

Comment on lines +92 to +95
if (generated.trim() != output.trim()) {
// ignore: avoid_print
print(generated);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this debugging code you meant to remove?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's intentional for tests. Helps to update the test cases faster

return SchemaColumn(
column.name!,
Column.integer,
column.enumAsString ? Column.varchar : Column.integer,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the only real change in this PR? the rest looks like line length regeneration and a bunch of debug print statements

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well build released a "minor" version with breaking changes. This affected build_test as it was reaching out for a class that no longer existed. So I had to run dart pub upgrade and the new tests had a bunch of formatting changes that were included. It's annoying, but I figured it'd be better to do this in one PR than be surprised later

@tshedor tshedor merged commit d55a38f into main Jun 23, 2025
22 checks passed
@tshedor tshedor deleted the enum-as-string-migration branch June 23, 2025 17:14
@jbienzss
Copy link

jbienzss commented Jul 7, 2025

Thank @mateominato and @tshedor for getting this fixed. I ran into the issue today. When can we expect to see updates to the brick_sqlite_generators, brick_graphql_generators, etc packages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants