schedule Update

@Modifying(clearAutomatically = true )
@Query(value = "INSERT INTO " + UPDATES_KEY + "( " + IDENTIFIER_KEY + "," + UPDATE_TARGET_VERSION_KEY + "," + UPDATE_CREATE_DATE_KEY + "," + UPDATE_PUBLISH_DATE_KEY + "," + UPDATE_START_DATE_KEY + "," + UPDATE_STATUS_KEY + "," + PROJECT_KEY + "," + AUTHOR_KEY + "," + UPDATE_PUBLISHED_BY_KEY + "," + UPDATE_STARTED_BY_KEY + ") VALUES " + "( " + ":" + IDENTIFIER_KEY + "," + ":" + UPDATE_TARGET_VERSION_KEY + "," + ":" + UPDATE_CREATE_DATE_KEY + "," + "-1," + "-1," + ":#{#" + UPDATE_STATUS_KEY + ".name()}," + ":" + PROJECT_KEY + "," + ":" + AUTHOR_KEY + "," + "NULL," + "NULL)", nativeQuery = true )
abstract fun scheduleUpdate(@Param(value = "id") updateId: String, @Param(value = "target_version") targetVersion: String, @Param(value = "create_date") createDate: Long, @Param(value = "status") updateStatus: UpdateStatus, @Param(value = "project") projectId: String, @Param(value = "author") author: String)

Method to execute the query to schedule a new ProjectUpdate

Parameters

updateId

: the update identifier

targetVersion

: the target project_version of the new update

createDate

: the creation date of the update

updateStatus

: the SCHEDULED status

projectId

: the project identifier

author

: the author of the update