harbor/make/migrations/postgresql/0052_2.2.2_schema.up.sql
Wenkai Yin c04f3a2aac Fix duplicate execution record issue
When the core service cannot response the checkin request in time, duplicated execution records may be created, this commit introduces the revision column to make sure there is only one record for one schedule trigger

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-12 15:40:52 +08:00

2 lines
97 B
SQL

ALTER TABLE schedule ADD COLUMN IF NOT EXISTS revision integer;
UPDATE schedule set revision = 0;