Skip to content

Commit

Permalink
fix test case error: add default value for timestamp column
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 authored and Liber Wang committed Aug 8, 2022
1 parent fdd659e commit 2869439
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/common/features/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,14 @@ pub async fn create_check_table(db: &DbConn) -> Result<ExecResult, DbErr> {
.col(
ColumnDef::new(check::Column::UpdatedAt)
.timestamp_with_time_zone()
.not_null(),
.not_null()
.extra("DEFAULT CURRENT_TIMESTAMP".to_owned()),
)
.col(
ColumnDef::new(check::Column::CreatedAt)
.timestamp_with_time_zone()
.not_null(),
.not_null()
.extra("DEFAULT CURRENT_TIMESTAMP".to_owned()),
)
.to_owned();

Expand Down

0 comments on commit 2869439

Please sign in to comment.