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

feat: implement ColumnTypeTrait for ColumnDef #1576

Merged
merged 1 commit into from
May 29, 2023

Conversation

billy1624
Copy link
Member

@billy1624 billy1624 commented Apr 3, 2023

PR Info

New Features

  • Implement ColumnTypeTrait for ColumnDef

Bug Fixes

  • Following code is being generated by the codegen. Implement ColumnTypeTrait for ColumnDef will fix it.
impl ColumnTrait for Column {
    type EntityName = Entity;
    fn def(&self) -> ColumnDef {
        match self {
...
            // `db_type()` returns `ColumnDef` but `ColumnDef` doesn't implement `ColumnTypeTrait`
            Self::Thing => AnActiveEnumThing::db_type().def(),
...
        }
    }
}

@billy1624 billy1624 self-assigned this Apr 3, 2023
@billy1624 billy1624 marked this pull request as ready for review April 8, 2023 13:58
@billy1624 billy1624 requested a review from tyt2y3 April 8, 2023 13:58
@tyt2y3
Copy link
Member

tyt2y3 commented May 15, 2023

Although this should be a bug fix

@billy1624 billy1624 merged commit 33f3f92 into master May 29, 2023
@billy1624 billy1624 deleted the impl-column-type-trait-for-column-def branch May 29, 2023 12:35
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

🎉 Released In 0.12.1 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants