forked from box/mojito
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SQL migration. Removed isAllowedExecutionOverlap, as the Disall…
…owConcurrentExecution annotation can be applied to the job.
- Loading branch information
1 parent
893f4af
commit fb4e02b
Showing
5 changed files
with
25 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
webapp/src/main/resources/db/migration/V68__Add_Scheduled_Job.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CREATE TABLE scheduled_job ( | ||
id bigint AUTO_INCREMENT PRIMARY KEY, | ||
repository_id bigint NOT NULL, | ||
job_type VARCHAR(255), | ||
cron VARCHAR(15), | ||
properties longtext NOT NULL, | ||
job_status VARCHAR(255) NOT NULL, | ||
start_date TIMESTAMP, | ||
end_date TIMESTAMP, | ||
created_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP | ||
); | ||
|
||
ALTER TABLE scheduled_job | ||
ADD UNIQUE KEY UK__REPOSITORY_ID__JOB_TYPE (repository_id, job_type); | ||
|
||
alter table `scheduled_job` | ||
add constraint FK__SCHEDULED_JOB__IMPORT_REPOSITORY__ID | ||
foreign key (repository_id) references repository (id); |