Skip to content

Commit

Permalink
Fix latest_referrered_at column default value
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba committed Dec 28, 2023
1 parent 812b425 commit 362209f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion migrations/2023-12-28-131316_statistics_v3/up.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ALTER TABLE
`statistics`
ADD
latest_referrered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL;
latest_referrered_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ async fn main() {

tracing::info!(
"migration {:?}",
db_pool.get().unwrap().run_pending_migrations(MIGRATIONS)
db_pool
.get()
.unwrap()
.run_pending_migrations(MIGRATIONS)
.unwrap()
);

let context = Arc::new(Context::default(db_pool).await) as DynContext;
Expand Down

0 comments on commit 362209f

Please sign in to comment.