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

mysql create table add table and colunm comment #622

Merged
merged 16 commits into from
Apr 4, 2023
Merged

mysql create table add table and colunm comment #622

merged 16 commits into from
Apr 4, 2023

Conversation

Caisin
Copy link
Contributor

@Caisin Caisin commented Mar 19, 2023

New Features

mysql create table add table and colunm comment

Changes

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

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

Hey @Caisin, thanks for contributing!! Some comments for you :P

src/table/create.rs Outdated Show resolved Hide resolved
src/table/create.rs Outdated Show resolved Hide resolved
Copy link
Member

@ikrivosheev ikrivosheev left a comment

Choose a reason for hiding this comment

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

@Caisin thank you for the PR! Small comments.

src/backend/mysql/table.rs Outdated Show resolved Hide resolved
src/backend/table_builder.rs Outdated Show resolved Hide resolved
Copy link
Member

@ikrivosheev ikrivosheev left a comment

Choose a reason for hiding this comment

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

@Caisin can you move part with rbatist into other PR?

@Caisin Caisin requested a review from ikrivosheev March 27, 2023 00:51
Copy link
Member

@ikrivosheev ikrivosheev left a comment

Choose a reason for hiding this comment

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

@CaisinThank you! LGTM!

@ikrivosheev
Copy link
Member

@billy1624 do you want to include it into 0.29 release?)

src/table/create.rs Outdated Show resolved Hide resolved
Comment on lines 206 to 207
let comment = comment.replace('\'', "\\'");
write!(sql, "COMMENT '{comment}'").unwrap()
Copy link
Member

Choose a reason for hiding this comment

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

We have a standard way to escape string

Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution

Copy link
Contributor Author

@Caisin Caisin left a comment

Choose a reason for hiding this comment

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

done

@Caisin Caisin requested a review from tyt2y3 April 4, 2023 09:37
Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

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

Thank you again for your contribution.

/// r#"`character` varchar(255) NOT NULL,"#,
/// r#"`size_w` int NOT NULL,"#,
/// r#"`size_h` int NOT NULL,"#,
/// r#"`font_id` int DEFAULT NULL,"#,
/// r#"CONSTRAINT `FK_2e303c3a712662f1fc2a4d0aad6`"#,
/// r#"FOREIGN KEY (`font_id`) REFERENCES `font` (`id`)"#,
/// r#"ON DELETE CASCADE ON UPDATE CASCADE"#,
/// r#") COMMENT 'table comment'"#,
/// r#") COMMENT 'table\'s comment'"#,
Copy link
Member

Choose a reason for hiding this comment

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

I like the extra '

@tyt2y3 tyt2y3 merged commit 176db23 into SeaQL:master Apr 4, 2023
@pkjy
Copy link

pkjy commented Apr 19, 2023

sea-orm 0.11.2 still not working with comment ,is this feature published now ?

@tyt2y3
Copy link
Member

tyt2y3 commented Apr 19, 2023

No, it's been merged, but not yet released.

@github-actions
Copy link

🎉 Released In 0.29.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 ⭐.

@SeaQL SeaQL deleted a comment from github-actions bot Aug 11, 2023
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.

5 participants