Skip to content

Commit

Permalink
refine docs
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Nov 1, 2024
1 parent d4a14b6 commit 78f28a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/meta/model/migration/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ use sea_orm_migration::prelude::*;
#[easy_ext::ext(ColumnDefExt)]
impl ColumnDef {
/// Set column type as `longblob` for MySQL, `bytea` for Postgres, and `blob` for Sqlite.
///
/// Should be preferred over [`binary`](ColumnDef::binary) or [`blob`](ColumnDef::blob) for large binary fields,
/// typically the fields wrapping protobuf or other serialized data. Otherwise, MySQL will return an error
/// when the length exceeds 65535 bytes.
pub fn rw_binary(&mut self, manager: &SchemaManager) -> &mut Self {
match manager.get_database_backend() {
DatabaseBackend::MySql => self.custom(extension::mysql::MySqlType::LongBlob),
Expand Down

0 comments on commit 78f28a7

Please sign in to comment.