-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CORE-16329 - Avro and DB schema for new Scheduler component. (#1218)
Avro and DB schema for new Scheduler component.
- Loading branch information
1 parent
9fdb8b7
commit 14819c0
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
data/avro-schema/src/main/resources/avro/net/corda/data/scheduler/ScheduledTaskTrigger.avsc
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,20 @@ | ||
{ | ||
"type": "record", | ||
"name": "ScheduledTaskTrigger", | ||
"namespace": "net.corda.data.scheduler", | ||
"fields": [ | ||
{ | ||
"name": "name", | ||
"type": "string", | ||
"doc": "Name of the scheduled task." | ||
}, | ||
{ | ||
"name": "timestamp", | ||
"type": { | ||
"type": "long", | ||
"logicalType": "timestamp-millis" | ||
}, | ||
"doc": "Timestamp for the trigger." | ||
} | ||
] | ||
} |
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
25 changes: 25 additions & 0 deletions
25
...chema/src/main/resources/net/corda/db/schema/config/migration/scheduler-creation-v5.1.xml
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,25 @@ | ||
<?xml version="1.1" encoding="UTF-8" standalone="no"?> | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> | ||
|
||
<property name="now" value="now()" dbms="hsqldb"/> | ||
<property name="now" value="now()" dbms="postgresql"/> | ||
|
||
<changeSet author="R3.Corda" id="scheduler-creation-v5.1"> | ||
|
||
<createTable tableName="task_scheduler_log"> | ||
<column name="task_name" type="VARCHAR(255)"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="last_scheduled" type="TIMESTAMP WITH TIME ZONE" defaultValueDate="${now}"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="scheduler_id" type="VARCHAR(255)"> | ||
<constraints nullable="false"/> | ||
</column> | ||
</createTable> | ||
|
||
<addPrimaryKey columnNames="task_name" constraintName="task_scheduler_log_task_name_pk" tableName="task_scheduler_log"/> | ||
</changeSet> | ||
</databaseChangeLog> |