From 3d46e85fa0a1ed5a02980dd652c5f8b0b8eb6fff Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Fri, 2 Feb 2024 20:28:36 +0800 Subject: [PATCH] mysql: `ColumnType::Year` changed --- src/mysql/writer/column.rs | 2 +- tests/live/mysql/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mysql/writer/column.rs b/src/mysql/writer/column.rs index 6588cbe..5b9d028 100644 --- a/src/mysql/writer/column.rs +++ b/src/mysql/writer/column.rs @@ -121,7 +121,7 @@ impl ColumnInfo { col_def.timestamp(); } Type::Year => { - col_def.year(None); + col_def.year(); } Type::Char(str_attr) => { match str_attr.length { diff --git a/tests/live/mysql/src/main.rs b/tests/live/mysql/src/main.rs index 86c56f9..f94a605 100644 --- a/tests/live/mysql/src/main.rs +++ b/tests/live/mysql/src/main.rs @@ -435,7 +435,7 @@ fn create_db_types_table() -> TableCreateStatement { .col(ColumnDef::new(Alias::new("bit_1")).bit(Some(1))) .col(ColumnDef::new(Alias::new("bit_2")).bit(Some(16))) .col(ColumnDef::new(Alias::new("bit_3")).bit(Some(32))) - .col(ColumnDef::new(Alias::new("year")).year(None)) + .col(ColumnDef::new(Alias::new("year")).year()) .primary_key(Index::create().col(Alias::new("id"))) .engine("InnoDB") .character_set("utf8mb4")