Pull request #530: RED-4512: Run quarz schedular on master db
Merge in RED/persistence-service from RED-4512 to master * commit '4ba63081b889ab9fcf621ffe77f8208bd61c5b01': RED-4512: Run quarz schedular on master db
This commit is contained in:
commit
ec0aab6a32
@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
@ -30,7 +31,7 @@ import com.iqser.red.service.persistence.management.v1.processor.PersistenceServ
|
||||
@EnableRetry
|
||||
@EnableScheduling
|
||||
@EnableConfigurationProperties(FileManagementServiceSettings.class)
|
||||
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class, CassandraAutoConfiguration.class, DataSourceAutoConfiguration.class, LiquibaseAutoConfiguration.class})
|
||||
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class, CassandraAutoConfiguration.class, DataSourceAutoConfiguration.class, LiquibaseAutoConfiguration.class, QuartzAutoConfiguration.class})
|
||||
@Import({MultiTenancyWebConfiguration.class, PersistenceServiceProcessorConfiguration.class, MessagingConfiguration.class, CleanupDownloadSchedulerConfiguration.class, AsyncConfig.class})
|
||||
@EnableFeignClients(basePackageClasses = {RedactionClient.class})
|
||||
public class Application {
|
||||
|
||||
@ -0,0 +1,147 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.iqser.red.service.peristence.v1.server.jobs;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.quartz.Calendar;
|
||||
import org.quartz.JobDetail;
|
||||
import org.quartz.Scheduler;
|
||||
import org.quartz.Trigger;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.quartz.QuartzDataSource;
|
||||
import org.springframework.boot.autoconfigure.quartz.QuartzDataSourceInitializer;
|
||||
import org.springframework.boot.autoconfigure.quartz.QuartzDataSourceScriptDatabaseInitializer;
|
||||
import org.springframework.boot.autoconfigure.quartz.QuartzProperties;
|
||||
import org.springframework.boot.autoconfigure.quartz.QuartzTransactionManager;
|
||||
import org.springframework.boot.autoconfigure.quartz.SchedulerFactoryBeanCustomizer;
|
||||
import org.springframework.boot.autoconfigure.sql.init.OnDatabaseInitializationCondition;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
|
||||
import org.springframework.scheduling.quartz.SpringBeanJobFactory;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@Configuration(
|
||||
proxyBeanMethods = false
|
||||
)
|
||||
@ConditionalOnClass({Scheduler.class, SchedulerFactoryBean.class, PlatformTransactionManager.class})
|
||||
@EnableConfigurationProperties({QuartzProperties.class})
|
||||
@AutoConfigureAfter({DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, LiquibaseAutoConfiguration.class, FlywayAutoConfiguration.class})
|
||||
public class CustomQuartzConfiguration {
|
||||
public CustomQuartzConfiguration() {
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public SchedulerFactoryBean quartzScheduler(QuartzProperties properties, ObjectProvider<SchedulerFactoryBeanCustomizer> customizers, ObjectProvider<JobDetail> jobDetails, Map<String, Calendar> calendars, ObjectProvider<Trigger> triggers, ApplicationContext applicationContext) {
|
||||
SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean();
|
||||
SpringBeanJobFactory jobFactory = new SpringBeanJobFactory();
|
||||
jobFactory.setApplicationContext(applicationContext);
|
||||
schedulerFactoryBean.setJobFactory(jobFactory);
|
||||
if (properties.getSchedulerName() != null) {
|
||||
schedulerFactoryBean.setSchedulerName(properties.getSchedulerName());
|
||||
}
|
||||
|
||||
schedulerFactoryBean.setAutoStartup(properties.isAutoStartup());
|
||||
schedulerFactoryBean.setStartupDelay((int)properties.getStartupDelay().getSeconds());
|
||||
schedulerFactoryBean.setWaitForJobsToCompleteOnShutdown(properties.isWaitForJobsToCompleteOnShutdown());
|
||||
schedulerFactoryBean.setOverwriteExistingJobs(properties.isOverwriteExistingJobs());
|
||||
if (!properties.getProperties().isEmpty()) {
|
||||
schedulerFactoryBean.setQuartzProperties(this.asProperties(properties.getProperties()));
|
||||
}
|
||||
|
||||
schedulerFactoryBean.setJobDetails((JobDetail[])jobDetails.orderedStream().toArray((x$0) -> {
|
||||
return new JobDetail[x$0];
|
||||
}));
|
||||
schedulerFactoryBean.setCalendars(calendars);
|
||||
schedulerFactoryBean.setTriggers((Trigger[])triggers.orderedStream().toArray((x$0) -> {
|
||||
return new Trigger[x$0];
|
||||
}));
|
||||
customizers.orderedStream().forEach((customizer) -> {
|
||||
customizer.customize(schedulerFactoryBean);
|
||||
});
|
||||
return schedulerFactoryBean;
|
||||
}
|
||||
|
||||
private Properties asProperties(Map<String, String> source) {
|
||||
Properties properties = new Properties();
|
||||
properties.putAll(source);
|
||||
return properties;
|
||||
}
|
||||
|
||||
@Configuration(
|
||||
proxyBeanMethods = false
|
||||
)
|
||||
@ConditionalOnSingleCandidate(DataSource.class)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "spring.quartz",
|
||||
name = {"job-store-type"},
|
||||
havingValue = "jdbc"
|
||||
)
|
||||
@Import({DatabaseInitializationDependencyConfigurer.class})
|
||||
protected static class JdbcStoreTypeConfiguration {
|
||||
protected JdbcStoreTypeConfiguration() {
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Order(0)
|
||||
public SchedulerFactoryBeanCustomizer dataSourceCustomizer(QuartzProperties properties, @Qualifier("masterDataSource") DataSource dataSource, @QuartzDataSource ObjectProvider<DataSource> quartzDataSource, @Qualifier("masterTransactionManager") ObjectProvider<PlatformTransactionManager> transactionManager, @QuartzTransactionManager ObjectProvider<PlatformTransactionManager> quartzTransactionManager) {
|
||||
return (schedulerFactoryBean) -> {
|
||||
DataSource dataSourceToUse = this.getDataSource(dataSource, quartzDataSource);
|
||||
schedulerFactoryBean.setDataSource(dataSourceToUse);
|
||||
PlatformTransactionManager txManager = this.getTransactionManager(transactionManager, quartzTransactionManager);
|
||||
if (txManager != null) {
|
||||
schedulerFactoryBean.setTransactionManager(txManager);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
private DataSource getDataSource(DataSource dataSource, ObjectProvider<DataSource> quartzDataSource) {
|
||||
DataSource dataSourceIfAvailable = (DataSource)quartzDataSource.getIfAvailable();
|
||||
return dataSourceIfAvailable != null ? dataSourceIfAvailable : dataSource;
|
||||
}
|
||||
|
||||
private PlatformTransactionManager getTransactionManager(ObjectProvider<PlatformTransactionManager> transactionManager, ObjectProvider<PlatformTransactionManager> quartzTransactionManager) {
|
||||
PlatformTransactionManager transactionManagerIfAvailable = (PlatformTransactionManager)quartzTransactionManager.getIfAvailable();
|
||||
return transactionManagerIfAvailable != null ? transactionManagerIfAvailable : (PlatformTransactionManager)transactionManager.getIfUnique();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean({QuartzDataSourceScriptDatabaseInitializer.class, QuartzDataSourceInitializer.class})
|
||||
@Conditional({CustomQuartzConfiguration.JdbcStoreTypeConfiguration.OnQuartzDatasourceInitializationCondition.class})
|
||||
public QuartzDataSourceScriptDatabaseInitializer quartzDataSourceScriptDatabaseInitializer(DataSource dataSource, @QuartzDataSource ObjectProvider<DataSource> quartzDataSource, QuartzProperties properties) {
|
||||
DataSource dataSourceToUse = this.getDataSource(dataSource, quartzDataSource);
|
||||
return new QuartzDataSourceScriptDatabaseInitializer(dataSourceToUse, properties);
|
||||
}
|
||||
|
||||
static class OnQuartzDatasourceInitializationCondition extends OnDatabaseInitializationCondition {
|
||||
OnQuartzDatasourceInitializationCondition() {
|
||||
super("Quartz", new String[]{"spring.quartz.jdbc.initialize-schema"});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,5 @@
|
||||
databaseChangeLog:
|
||||
- include:
|
||||
file: db/changelog/master/1-initial-schema.changelog.yaml
|
||||
- include:
|
||||
file: db/changelog/master/2-quartz.changelog.yaml
|
||||
|
||||
@ -98,4 +98,6 @@ databaseChangeLog:
|
||||
- include:
|
||||
file: db/changelog/tenant/release-3.3.13/1-update-soft-deleted-processed-flag.sql
|
||||
- include:
|
||||
file: db/changelog/tenant/release-3.3.14/1-bump-rules-version.sql
|
||||
file: db/changelog/tenant/release-3.3.14/1-bump-rules-version.sql
|
||||
- include:
|
||||
file: db/changelog/tenant/40-remove-quartz.changelog.yaml
|
||||
@ -0,0 +1,536 @@
|
||||
databaseChangeLog:
|
||||
- changeSet:
|
||||
id: 1646818341589-1
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_GROUP
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
name: BLOB_DATA
|
||||
type: BYTEA
|
||||
tableName: QRTZ_BLOB_TRIGGERS
|
||||
- changeSet:
|
||||
id: 1646818341589-2
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: CALENDAR_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: CALENDAR
|
||||
type: BYTEA
|
||||
tableName: QRTZ_CALENDARS
|
||||
- changeSet:
|
||||
id: 1646818341589-3
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_GROUP
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: CRON_EXPRESSION
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
name: TIME_ZONE_ID
|
||||
type: VARCHAR(80)
|
||||
tableName: QRTZ_CRON_TRIGGERS
|
||||
- changeSet:
|
||||
id: 1646818341589-4
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: ENTRY_ID
|
||||
type: VARCHAR(95)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: TRIGGER_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: TRIGGER_GROUP
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: INSTANCE_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: FIRED_TIME
|
||||
type: BIGINT
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: SCHED_TIME
|
||||
type: BIGINT
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: PRIORITY
|
||||
type: INT
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: STATE
|
||||
type: VARCHAR(16)
|
||||
- column:
|
||||
name: JOB_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
name: JOB_GROUP
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
name: IS_NONCONCURRENT
|
||||
type: BOOL
|
||||
- column:
|
||||
name: REQUESTS_RECOVERY
|
||||
type: BOOL
|
||||
tableName: QRTZ_FIRED_TRIGGERS
|
||||
- changeSet:
|
||||
id: 1646818341589-5
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: JOB_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: JOB_GROUP
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
name: DESCRIPTION
|
||||
type: VARCHAR(250)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: JOB_CLASS_NAME
|
||||
type: VARCHAR(250)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: IS_DURABLE
|
||||
type: BOOL
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: IS_NONCONCURRENT
|
||||
type: BOOL
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: IS_UPDATE_DATA
|
||||
type: BOOL
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: REQUESTS_RECOVERY
|
||||
type: BOOL
|
||||
- column:
|
||||
name: JOB_DATA
|
||||
type: BYTEA
|
||||
tableName: QRTZ_JOB_DETAILS
|
||||
- changeSet:
|
||||
id: 1646818341589-6
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: LOCK_NAME
|
||||
type: VARCHAR(40)
|
||||
tableName: QRTZ_LOCKS
|
||||
- changeSet:
|
||||
id: 1646818341589-7
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_GROUP
|
||||
type: VARCHAR(200)
|
||||
tableName: QRTZ_PAUSED_TRIGGER_GRPS
|
||||
- changeSet:
|
||||
id: 1646818341589-8
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: INSTANCE_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: LAST_CHECKIN_TIME
|
||||
type: BIGINT
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: CHECKIN_INTERVAL
|
||||
type: BIGINT
|
||||
tableName: QRTZ_SCHEDULER_STATE
|
||||
- changeSet:
|
||||
id: 1646818341589-9
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_GROUP
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: REPEAT_COUNT
|
||||
type: BIGINT
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: REPEAT_INTERVAL
|
||||
type: BIGINT
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: TIMES_TRIGGERED
|
||||
type: BIGINT
|
||||
tableName: QRTZ_SIMPLE_TRIGGERS
|
||||
- changeSet:
|
||||
id: 1646818341589-10
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_GROUP
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
name: STR_PROP_1
|
||||
type: VARCHAR(512)
|
||||
- column:
|
||||
name: STR_PROP_2
|
||||
type: VARCHAR(512)
|
||||
- column:
|
||||
name: STR_PROP_3
|
||||
type: VARCHAR(512)
|
||||
- column:
|
||||
name: INT_PROP_1
|
||||
type: INT
|
||||
- column:
|
||||
name: INT_PROP_2
|
||||
type: INT
|
||||
- column:
|
||||
name: LONG_PROP_1
|
||||
type: BIGINT
|
||||
- column:
|
||||
name: LONG_PROP_2
|
||||
type: BIGINT
|
||||
- column:
|
||||
name: DEC_PROP_1
|
||||
type: DECIMAL(13, 4)
|
||||
- column:
|
||||
name: DEC_PROP_2
|
||||
type: DECIMAL(13, 4)
|
||||
- column:
|
||||
name: BOOL_PROP_1
|
||||
type: BOOL
|
||||
- column:
|
||||
name: BOOL_PROP_2
|
||||
type: BOOL
|
||||
tableName: QRTZ_SIMPROP_TRIGGERS
|
||||
- changeSet:
|
||||
id: 1646818341589-11
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createTable:
|
||||
columns:
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: SCHED_NAME
|
||||
type: VARCHAR(120)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
primaryKey: true
|
||||
name: TRIGGER_GROUP
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: JOB_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: JOB_GROUP
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
name: DESCRIPTION
|
||||
type: VARCHAR(250)
|
||||
- column:
|
||||
name: NEXT_FIRE_TIME
|
||||
type: BIGINT
|
||||
- column:
|
||||
name: PREV_FIRE_TIME
|
||||
type: BIGINT
|
||||
- column:
|
||||
name: PRIORITY
|
||||
type: INT
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: TRIGGER_STATE
|
||||
type: VARCHAR(16)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: TRIGGER_TYPE
|
||||
type: VARCHAR(8)
|
||||
- column:
|
||||
constraints:
|
||||
nullable: false
|
||||
name: START_TIME
|
||||
type: BIGINT
|
||||
- column:
|
||||
name: END_TIME
|
||||
type: BIGINT
|
||||
- column:
|
||||
name: CALENDAR_NAME
|
||||
type: VARCHAR(200)
|
||||
- column:
|
||||
name: MISFIRE_INSTR
|
||||
type: SMALLINT
|
||||
- column:
|
||||
name: JOB_DATA
|
||||
type: BYTEA
|
||||
tableName: QRTZ_TRIGGERS
|
||||
- changeSet:
|
||||
id: 1646818341589-95
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- createIndex:
|
||||
columns:
|
||||
- column:
|
||||
name: SCHED_NAME
|
||||
- column:
|
||||
name: JOB_NAME
|
||||
- column:
|
||||
name: JOB_GROUP
|
||||
indexName: SCHED_NAME
|
||||
tableName: QRTZ_TRIGGERS
|
||||
- changeSet:
|
||||
id: 1646818341589-218
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- addForeignKeyConstraint:
|
||||
baseColumnNames: SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP
|
||||
baseTableName: QRTZ_BLOB_TRIGGERS
|
||||
constraintName: QRTZ_BLOB_TRIGGERS_ibfk_1
|
||||
deferrable: false
|
||||
initiallyDeferred: false
|
||||
onDelete: RESTRICT
|
||||
onUpdate: RESTRICT
|
||||
referencedColumnNames: SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP
|
||||
referencedTableName: QRTZ_TRIGGERS
|
||||
validate: true
|
||||
- changeSet:
|
||||
id: 1646818341589-219
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- addForeignKeyConstraint:
|
||||
baseColumnNames: SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP
|
||||
baseTableName: QRTZ_CRON_TRIGGERS
|
||||
constraintName: QRTZ_CRON_TRIGGERS_ibfk_1
|
||||
deferrable: false
|
||||
initiallyDeferred: false
|
||||
onDelete: RESTRICT
|
||||
onUpdate: RESTRICT
|
||||
referencedColumnNames: SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP
|
||||
referencedTableName: QRTZ_TRIGGERS
|
||||
validate: true
|
||||
- changeSet:
|
||||
id: 1646818341589-220
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- addForeignKeyConstraint:
|
||||
baseColumnNames: SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP
|
||||
baseTableName: QRTZ_SIMPLE_TRIGGERS
|
||||
constraintName: QRTZ_SIMPLE_TRIGGERS_ibfk_1
|
||||
deferrable: false
|
||||
initiallyDeferred: false
|
||||
onDelete: RESTRICT
|
||||
onUpdate: RESTRICT
|
||||
referencedColumnNames: SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP
|
||||
referencedTableName: QRTZ_TRIGGERS
|
||||
validate: true
|
||||
- changeSet:
|
||||
id: 1646818341589-221
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- addForeignKeyConstraint:
|
||||
baseColumnNames: SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP
|
||||
baseTableName: QRTZ_SIMPROP_TRIGGERS
|
||||
constraintName: QRTZ_SIMPROP_TRIGGERS_ibfk_1
|
||||
deferrable: false
|
||||
initiallyDeferred: false
|
||||
onDelete: RESTRICT
|
||||
onUpdate: RESTRICT
|
||||
referencedColumnNames: SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP
|
||||
referencedTableName: QRTZ_TRIGGERS
|
||||
validate: true
|
||||
- changeSet:
|
||||
id: 1646818341589-222
|
||||
author: timobejan (generated)
|
||||
changes:
|
||||
- addForeignKeyConstraint:
|
||||
baseColumnNames: SCHED_NAME,JOB_NAME,JOB_GROUP
|
||||
baseTableName: QRTZ_TRIGGERS
|
||||
constraintName: QRTZ_TRIGGERS_ibfk_1
|
||||
deferrable: false
|
||||
initiallyDeferred: false
|
||||
onDelete: RESTRICT
|
||||
onUpdate: RESTRICT
|
||||
referencedColumnNames: SCHED_NAME,JOB_NAME,JOB_GROUP
|
||||
referencedTableName: QRTZ_JOB_DETAILS
|
||||
validate: true
|
||||
@ -0,0 +1,38 @@
|
||||
databaseChangeLog:
|
||||
- changeSet:
|
||||
id: delete-quarztables
|
||||
author: dom
|
||||
changes:
|
||||
- dropTable:
|
||||
tableName: QRTZ_BLOB_TRIGGERS
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_CALENDARS
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_CRON_TRIGGERS
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_FIRED_TRIGGERS
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_JOB_DETAILS
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_LOCKS
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_PAUSED_TRIGGER_GRPS
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_SCHEDULER_STATE
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_SIMPLE_TRIGGERS
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_SIMPROP_TRIGGERS
|
||||
cascadeConstraints: true
|
||||
- dropTable:
|
||||
tableName: QRTZ_TRIGGERS
|
||||
cascadeConstraints: true
|
||||
Loading…
x
Reference in New Issue
Block a user