diff --git a/dev/src/dev/migrate.clj b/dev/src/dev/migrate.clj
index 5fd93808978fad51371ce4c581749194a68cade9..1c3d4e6f3df51a885f6bec30d88f88ec2ec3647b 100644
--- a/dev/src/dev/migrate.clj
+++ b/dev/src/dev/migrate.clj
@@ -42,7 +42,7 @@
                       :where  [:> :orderexecuted {:select   [:orderexecuted]
                                                   :from     [:databasechangelog]
                                                   :where    [:like :id (format "%s%%" id)]
-                                                  :order-by [:orderexecuted :desc]
+                                                  :order-by [[:orderexecuted :desc]]
                                                   :limit    1}]
                       :limit 1})
        :count
diff --git a/resources/migrations/001_update_migrations.yaml b/resources/migrations/001_update_migrations.yaml
index e8b3b4f1f14b3d32f2a82b666d24a0551e87a6f2..b5dba921c88a025f2c0e06a16bdc207686941f84 100644
--- a/resources/migrations/001_update_migrations.yaml
+++ b/resources/migrations/001_update_migrations.yaml
@@ -7564,6 +7564,7 @@ databaseChangeLog:
             tableName: task_history
             columnDataType: ${timestamp_type}
             columnName: ended_at
+      rollback: # we can't reliably add back the constraint while downgrading
 
   - changeSet:
       id: v50.2024-05-08T09:00:04
@@ -7574,6 +7575,7 @@ databaseChangeLog:
             tableName: task_history
             columnDataType: int
             columnName: duration
+      rollback: # we can't reliably add back the constraint while downgrading
 
   - changeSet:
       id: v50.2024-05-08T09:00:05