Page MenuHomestyx hydra

No OneTemporary

diff --git a/resources/sql/autopatches/20180214.harbor.01.aborted.php b/resources/sql/autopatches/20180214.harbor.01.aborted.php
new file mode 100644
index 0000000000..689d5625f5
--- /dev/null
+++ b/resources/sql/autopatches/20180214.harbor.01.aborted.php
@@ -0,0 +1,27 @@
+<?php
+
+$table = new HarbormasterBuildable();
+$conn = $table->establishConnection('w');
+
+foreach (new LiskMigrationIterator($table) as $buildable) {
+ if ($buildable->getBuildableStatus() !== 'building') {
+ continue;
+ }
+
+ $aborted = queryfx_one(
+ $conn,
+ 'SELECT * FROM %T WHERE buildablePHID = %s AND buildStatus = %s',
+ id(new HarbormasterBuild())->getTableName(),
+ $buildable->getPHID(),
+ 'aborted');
+ if (!$aborted) {
+ continue;
+ }
+
+ queryfx(
+ $conn,
+ 'UPDATE %T SET buildableStatus = %s WHERE id = %d',
+ $table->getTableName(),
+ 'failed',
+ $buildable->getID());
+}

File Metadata

Mime Type
text/x-diff
Expires
Fri, Mar 14, 3:37 PM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71999
Default Alt Text
(909 B)

Event Timeline