Codewise
Courses
My learning
Ideas
Leaderboard
YouTube
Courses
My learning
Ideas
Leaderboard
YouTube
Sign in
db/migrations/0005_jobs_retry.down.sql · System Design in Go: Build a Social Network Backend | Codewise
System Design in Go: Build a Social Network Backend
murmur
/
db
/
migrations
/
0005_jobs_retry.down.sql
main
0005_jobs_retry.down.sql
12 lines, 362 B
Raw
1
drop
index
jobs_run_at_id_idx;
2
3
-- Two statuses again, so a dead job has to go.
4
delete
from
jobs
where
status
=
'dead'
;
5
6
alter
table
jobs
7
drop
constraint
jobs_status_check,
8
add
constraint
jobs_status_check
check
(
status
in
(
'waiting'
,
'running'
)),
9
drop
column attempts,
10
drop
column run_at,
11
drop
column claimed_at,
12
drop
column last_error;