-
-
Notifications
You must be signed in to change notification settings - Fork 59
How to define column with DEFAULT CURRENT_TIMESTAMP? #52
Copy link
Copy link
Closed
Description
manager
.create_table(
sea_query::Table::create()
.table(scene::Entity)
.if_not_exists()
.col(
ColumnDef::new(scene::Column::Id)
.integer()
.not_null()
.auto_increment()
.primary_key(),
)
.col(
ColumnDef::new(scene::Column::CreatedAt)
.date_time()
.not_null()
.default("CURRENT_TIMESTAMP"),
)
.col(
ColumnDef::new(scene::Column::UpdatedAt)
.date_time()
.not_null()
.default("CURRENT_TIMESTAMP"),
)
.to_owned(),
)default("CURRENT_TIMESTAMP") can't work.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels