This is an automated email from the ASF dual-hosted git repository.

guanmingchiu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 14e811c9e1a Add index on task_reschedule ti_id (#60931)
14e811c9e1a is described below

commit 14e811c9e1a09b79876ec10475fdf15653bad8bb
Author: Guan-Ming (Wesley) Chiu <[email protected]>
AuthorDate: Fri Jan 23 23:51:23 2026 +0800

    Add index on task_reschedule ti_id (#60931)
---
 airflow-core/docs/img/airflow_erd.sha256           |   2 +-
 airflow-core/docs/img/airflow_erd.svg              | 352 ++++++++++-----------
 airflow-core/docs/migrations-ref.rst               |   4 +-
 ...100_3_2_0_add_index_to_task_reschedule_ti_id.py |  58 ++++
 airflow-core/src/airflow/models/taskreschedule.py  |   3 +
 airflow-core/src/airflow/utils/db.py               |   2 +-
 6 files changed, 242 insertions(+), 179 deletions(-)

diff --git a/airflow-core/docs/img/airflow_erd.sha256 
b/airflow-core/docs/img/airflow_erd.sha256
index ecbb6455edd..f45b51c561b 100644
--- a/airflow-core/docs/img/airflow_erd.sha256
+++ b/airflow-core/docs/img/airflow_erd.sha256
@@ -1 +1 @@
-ae3f3b6fd90d208442c42ecd3a3318a3da2ca4a5d8bb1691e57d44d245114e0b
\ No newline at end of file
+f0833aded6ef9098ee8b4f22800b72310d33ae51800a1aeda8edc0360d3195ca
\ No newline at end of file
diff --git a/airflow-core/docs/img/airflow_erd.svg 
b/airflow-core/docs/img/airflow_erd.svg
index 6807ea1786f..d22d11068b6 100644
--- a/airflow-core/docs/img/airflow_erd.svg
+++ b/airflow-core/docs/img/airflow_erd.svg
@@ -4,11 +4,11 @@
 <!-- Generated by graphviz version 2.43.0 (0)
  -->
 <!-- Title: %3 Pages: 1 -->
-<svg width="2945pt" height="3445pt"
- viewBox="0.00 0.00 2945.00 3445.00" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
-<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 
3441)">
+<svg width="2945pt" height="3444pt"
+ viewBox="0.00 0.00 2945.00 3444.00" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 
3440)">
 <title>%3</title>
-<polygon fill="white" stroke="transparent" points="-4,4 -4,-3441 2941,-3441 
2941,4 -4,4"/>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-3440 2941,-3440 
2941,4 -4,4"/>
 <!-- job -->
 <g id="node1" class="node">
 <title>job</title>
@@ -682,7 +682,7 @@
 <text text-anchor="start" x="2041" y="-2621.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- trigger&#45;&#45;asset_watcher -->
-<g id="edge9" class="edge">
+<g id="edge10" class="edge">
 <title>trigger:id&#45;&#45;asset_watcher:trigger_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1690,-2349C1843.25,-2349 1706.75,-2649 1860,-2649"/>
 <text text-anchor="start" x="1829" y="-2637.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -861,7 +861,7 @@
 <!-- trigger&#45;&#45;task_instance -->
 <g id="edge44" class="edge">
 <title>trigger:id&#45;&#45;task_instance:trigger_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1690,-2349C1758.26,-2349 1709.9,-2265.77 1718,-2198 1722.83,-2157.64 
1757.36,-737 1798,-737"/>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1690,-2349C1758.26,-2349 1709.9,-2265.77 1718,-2198 1720.41,-2177.82 
1777.68,-737 1798,-737"/>
 <text text-anchor="start" x="1767" y="-725.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="1690" y="-2352.8" font-family="Times,serif" 
font-size="14.00">{0,1}</text>
 </g>
@@ -954,7 +954,7 @@
 <text text-anchor="start" x="1149.5" y="-999.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- asset_alias&#45;&#45;asset_alias_asset -->
-<g id="edge5" class="edge">
+<g id="edge6" class="edge">
 <title>asset_alias:id&#45;&#45;asset_alias_asset:alias_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M785,-1027C882.56,-1027 906.94,-1027 1004.5,-1027"/>
 <text text-anchor="start" x="973.5" y="-1015.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -977,7 +977,7 @@
 <text text-anchor="start" x="1150.5" y="-895.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- asset_alias&#45;&#45;asset_alias_asset_event -->
-<g id="edge7" class="edge">
+<g id="edge8" class="edge">
 <title>asset_alias:id&#45;&#45;asset_alias_asset_event:alias_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M785,-1027C892.55,-1027 895.95,-923 1003.5,-923"/>
 <text text-anchor="start" x="972.5" y="-911.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1058,14 +1058,14 @@
 <text text-anchor="start" x="679" y="-1205.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- asset&#45;&#45;asset_alias_asset -->
-<g id="edge6" class="edge">
+<g id="edge5" class="edge">
 <title>asset:id&#45;&#45;asset_alias_asset:asset_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M787,-1359C972.79,-1359 818.71,-1002 1004.5,-1002"/>
 <text text-anchor="start" x="973.5" y="-990.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="787" y="-1347.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- asset&#45;&#45;asset_watcher -->
-<g id="edge10" class="edge">
+<g id="edge9" class="edge">
 <title>asset:id&#45;&#45;asset_watcher:asset_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M787,-1359C828.44,-1359 842.43,-1377.03 863,-1413 909.38,-1494.13 
890.44,-1738.94 899,-1832 914.43,-1999.65 897.01,-2045.22 936,-2209 
987.43,-2425.07 894.4,-2675 1116.5,-2675 1116.5,-2675 1116.5,-2675 1546,-2675 
1685.56,-2675 1720.44,-2675 1860,-2675"/>
 <text text-anchor="start" x="1829" y="-2663.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1128,7 +1128,7 @@
 <text text-anchor="start" x="1161.5" y="-1361.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- asset&#45;&#45;dag_schedule_asset_reference -->
-<g id="edge21" class="edge">
+<g id="edge20" class="edge">
 <title>asset:id&#45;&#45;dag_schedule_asset_reference:asset_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M787,-1359C878.19,-1359 884.31,-1440 975.5,-1440"/>
 <text text-anchor="start" x="944.5" y="-1428.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1168,7 +1168,7 @@
 <!-- asset&#45;&#45;task_outlet_asset_reference -->
 <g id="edge22" class="edge">
 <title>asset:id&#45;&#45;task_outlet_asset_reference:asset_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M787,-1359C828.44,-1359 839.13,-1379.13 863,-1413 897.45,-1461.88 
917.32,-1615.19 936,-1672 954.69,-1728.85 923.65,-1798 983.5,-1798"/>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M787,-1359C828.44,-1359 839.82,-1378.65 863,-1413 901.59,-1470.19 
879.8,-1497.73 899,-1564 913.12,-1612.73 918.83,-1624.26 936,-1672 
956.26,-1728.31 923.65,-1798 983.5,-1798"/>
 <text text-anchor="start" x="952.5" y="-1786.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="777" y="-1362.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
@@ -1206,7 +1206,7 @@
 <!-- asset&#45;&#45;task_inlet_asset_reference -->
 <g id="edge25" class="edge">
 <title>asset:id&#45;&#45;task_inlet_asset_reference:asset_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M787,-1359C828.44,-1359 835.02,-1382.43 863,-1413 934.61,-1491.25 
877.43,-1619 983.5,-1619"/>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M787,-1359C931.85,-1359 838.65,-1619 983.5,-1619"/>
 <text text-anchor="start" x="952.5" y="-1607.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="787" y="-1347.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
@@ -1232,7 +1232,7 @@
 <text text-anchor="start" x="1143.5" y="-1873.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- asset&#45;&#45;asset_dag_run_queue -->
-<g id="edge26" class="edge">
+<g id="edge27" class="edge">
 <title>asset:id&#45;&#45;asset_dag_run_queue:asset_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M787,-1359C828.44,-1359 841.02,-1377.87 863,-1413 924.73,-1511.66 
847.11,-1927 963.5,-1927"/>
 <text text-anchor="start" x="932.5" y="-1915.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1285,7 +1285,7 @@
 <text text-anchor="start" x="703" y="-173.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- asset_event&#45;&#45;asset_alias_asset_event -->
-<g id="edge8" class="edge">
+<g id="edge7" class="edge">
 <title>asset_event:id&#45;&#45;asset_alias_asset_event:event_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M785,-377C1036.09,-377 752.41,-898 1003.5,-898"/>
 <text text-anchor="start" x="972.5" y="-886.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1308,7 +1308,7 @@
 <text text-anchor="start" x="2015" y="-146.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- asset_event&#45;&#45;dagrun_asset_event -->
-<g id="edge39" class="edge">
+<g id="edge38" class="edge">
 <title>asset_event:id&#45;&#45;dagrun_asset_event:event_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M785,-377C963.57,-377 937.93,-150 1116.5,-150 1116.5,-150 1116.5,-150 
1546,-150 1689.11,-150 1724.89,-149 1868,-149"/>
 <text text-anchor="start" x="1837" y="-137.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1317,57 +1317,57 @@
 <!-- dag_schedule_asset_name_reference -->
 <g id="node22" class="node">
 <title>dag_schedule_asset_name_reference</title>
-<polygon fill="none" stroke="black" points="948.5,-3300 948.5,-3328 
1287.5,-3328 1287.5,-3300 948.5,-3300"/>
-<text text-anchor="start" x="953.5" y="-3311.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_schedule_asset_name_reference</text>
-<polygon fill="none" stroke="black" points="948.5,-3275 948.5,-3300 
1287.5,-3300 1287.5,-3275 948.5,-3275"/>
-<text text-anchor="start" x="953.5" y="-3284.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
-<text text-anchor="start" x="999.5" y="-3284.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1004.5" y="-3284.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
-<text text-anchor="start" x="1125.5" y="-3284.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="948.5,-3250 948.5,-3275 
1287.5,-3275 1287.5,-3250 948.5,-3250"/>
-<text text-anchor="start" x="953.5" y="-3259.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">name</text>
-<text text-anchor="start" x="993.5" y="-3259.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="998.5" y="-3259.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(1500)]</text>
-<text text-anchor="start" x="1128.5" y="-3259.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="948.5,-3225 948.5,-3250 
1287.5,-3250 1287.5,-3225 948.5,-3225"/>
-<text text-anchor="start" x="953.5" y="-3234.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">created_at</text>
-<text text-anchor="start" x="1026.5" y="-3234.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1031.5" y="-3234.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [TIMESTAMP]</text>
-<text text-anchor="start" x="1127.5" y="-3234.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="948.5,-3299 948.5,-3327 
1287.5,-3327 1287.5,-3299 948.5,-3299"/>
+<text text-anchor="start" x="953.5" y="-3310.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_schedule_asset_name_reference</text>
+<polygon fill="none" stroke="black" points="948.5,-3274 948.5,-3299 
1287.5,-3299 1287.5,-3274 948.5,-3274"/>
+<text text-anchor="start" x="953.5" y="-3283.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
+<text text-anchor="start" x="999.5" y="-3283.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1004.5" y="-3283.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
+<text text-anchor="start" x="1125.5" y="-3283.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="948.5,-3249 948.5,-3274 
1287.5,-3274 1287.5,-3249 948.5,-3249"/>
+<text text-anchor="start" x="953.5" y="-3258.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">name</text>
+<text text-anchor="start" x="993.5" y="-3258.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="998.5" y="-3258.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(1500)]</text>
+<text text-anchor="start" x="1128.5" y="-3258.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="948.5,-3224 948.5,-3249 
1287.5,-3249 1287.5,-3224 948.5,-3224"/>
+<text text-anchor="start" x="953.5" y="-3233.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">created_at</text>
+<text text-anchor="start" x="1026.5" y="-3233.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1031.5" y="-3233.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [TIMESTAMP]</text>
+<text text-anchor="start" x="1127.5" y="-3233.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- dag&#45;&#45;dag_schedule_asset_name_reference -->
 <g id="edge16" class="edge">
 <title>dag:dag_id&#45;&#45;dag_schedule_asset_name_reference:dag_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C917.04,-3029 886.46,-3288 947.5,-3288"/>
-<text text-anchor="start" x="916.5" y="-3276.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C916.83,-3029 886.67,-3287 947.5,-3287"/>
+<text text-anchor="start" x="916.5" y="-3275.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="856" y="-3017.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag_schedule_asset_uri_reference -->
 <g id="node23" class="node">
 <title>dag_schedule_asset_uri_reference</title>
-<polygon fill="none" stroke="black" points="960.5,-3171 960.5,-3199 
1275.5,-3199 1275.5,-3171 960.5,-3171"/>
-<text text-anchor="start" x="965.5" y="-3182.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_schedule_asset_uri_reference</text>
-<polygon fill="none" stroke="black" points="960.5,-3146 960.5,-3171 
1275.5,-3171 1275.5,-3146 960.5,-3146"/>
-<text text-anchor="start" x="965.5" y="-3155.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
-<text text-anchor="start" x="1011.5" y="-3155.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1016.5" y="-3155.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
-<text text-anchor="start" x="1137.5" y="-3155.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="960.5,-3121 960.5,-3146 
1275.5,-3146 1275.5,-3121 960.5,-3121"/>
-<text text-anchor="start" x="965.5" y="-3130.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">uri</text>
-<text text-anchor="start" x="984.5" y="-3130.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="989.5" y="-3130.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(1500)]</text>
-<text text-anchor="start" x="1119.5" y="-3130.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="960.5,-3096 960.5,-3121 
1275.5,-3121 1275.5,-3096 960.5,-3096"/>
-<text text-anchor="start" x="965.5" y="-3105.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">created_at</text>
-<text text-anchor="start" x="1038.5" y="-3105.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1043.5" y="-3105.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [TIMESTAMP]</text>
-<text text-anchor="start" x="1139.5" y="-3105.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="960.5,-3170 960.5,-3198 
1275.5,-3198 1275.5,-3170 960.5,-3170"/>
+<text text-anchor="start" x="965.5" y="-3181.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_schedule_asset_uri_reference</text>
+<polygon fill="none" stroke="black" points="960.5,-3145 960.5,-3170 
1275.5,-3170 1275.5,-3145 960.5,-3145"/>
+<text text-anchor="start" x="965.5" y="-3154.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
+<text text-anchor="start" x="1011.5" y="-3154.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1016.5" y="-3154.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
+<text text-anchor="start" x="1137.5" y="-3154.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="960.5,-3120 960.5,-3145 
1275.5,-3145 1275.5,-3120 960.5,-3120"/>
+<text text-anchor="start" x="965.5" y="-3129.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">uri</text>
+<text text-anchor="start" x="984.5" y="-3129.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="989.5" y="-3129.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(1500)]</text>
+<text text-anchor="start" x="1119.5" y="-3129.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="960.5,-3095 960.5,-3120 
1275.5,-3120 1275.5,-3095 960.5,-3095"/>
+<text text-anchor="start" x="965.5" y="-3104.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">created_at</text>
+<text text-anchor="start" x="1038.5" y="-3104.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1043.5" y="-3104.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [TIMESTAMP]</text>
+<text text-anchor="start" x="1139.5" y="-3104.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- dag&#45;&#45;dag_schedule_asset_uri_reference -->
 <g id="edge17" class="edge">
 <title>dag:dag_id&#45;&#45;dag_schedule_asset_uri_reference:dag_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C929.85,-3029 885.65,-3159 959.5,-3159"/>
-<text text-anchor="start" x="928.5" y="-3147.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C929.51,-3029 885.99,-3158 959.5,-3158"/>
+<text text-anchor="start" x="928.5" y="-3146.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="856" y="-3032.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag&#45;&#45;dag_schedule_asset_alias_reference -->
@@ -1378,7 +1378,7 @@
 <text text-anchor="start" x="846" y="-3017.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag&#45;&#45;dag_schedule_asset_reference -->
-<g id="edge20" class="edge">
+<g id="edge21" class="edge">
 <title>dag:dag_id&#45;&#45;dag_schedule_asset_reference:dag_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C898.72,-3029 925.11,-1534.31 936,-1493 946.01,-1455.04 
936.24,-1414 975.5,-1414"/>
 <text text-anchor="start" x="944.5" y="-1402.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1399,7 +1399,7 @@
 <text text-anchor="start" x="846" y="-3017.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag&#45;&#45;asset_dag_run_queue -->
-<g id="edge27" class="edge">
+<g id="edge26" class="edge">
 <title>dag:dag_id&#45;&#45;asset_dag_run_queue:target_dag_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C885.22,-3029 930.04,-2008.61 936,-1980 943.59,-1943.61 
926.32,-1901 963.5,-1901"/>
 <text text-anchor="start" x="932.5" y="-1889.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1454,108 +1454,108 @@
 <!-- dag_tag -->
 <g id="node30" class="node">
 <title>dag_tag</title>
-<polygon fill="none" stroke="black" points="988.5,-3042 988.5,-3070 
1246.5,-3070 1246.5,-3042 988.5,-3042"/>
-<text text-anchor="start" x="1082" y="-3053.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_tag</text>
-<polygon fill="none" stroke="black" points="988.5,-3017 988.5,-3042 
1246.5,-3042 1246.5,-3017 988.5,-3017"/>
-<text text-anchor="start" x="993.5" y="-3026.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
-<text text-anchor="start" x="1039.5" y="-3026.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1044.5" y="-3026.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
-<text text-anchor="start" x="1165.5" y="-3026.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="988.5,-2992 988.5,-3017 
1246.5,-3017 1246.5,-2992 988.5,-2992"/>
-<text text-anchor="start" x="993.5" y="-3001.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">name</text>
-<text text-anchor="start" x="1033.5" y="-3001.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1038.5" y="-3001.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(100)]</text>
-<text text-anchor="start" x="1159.5" y="-3001.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="988.5,-3041 988.5,-3069 
1246.5,-3069 1246.5,-3041 988.5,-3041"/>
+<text text-anchor="start" x="1082" y="-3052.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_tag</text>
+<polygon fill="none" stroke="black" points="988.5,-3016 988.5,-3041 
1246.5,-3041 1246.5,-3016 988.5,-3016"/>
+<text text-anchor="start" x="993.5" y="-3025.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
+<text text-anchor="start" x="1039.5" y="-3025.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1044.5" y="-3025.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
+<text text-anchor="start" x="1165.5" y="-3025.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="988.5,-2991 988.5,-3016 
1246.5,-3016 1246.5,-2991 988.5,-2991"/>
+<text text-anchor="start" x="993.5" y="-3000.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">name</text>
+<text text-anchor="start" x="1033.5" y="-3000.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1038.5" y="-3000.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(100)]</text>
+<text text-anchor="start" x="1159.5" y="-3000.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- dag&#45;&#45;dag_tag -->
 <g id="edge29" class="edge">
 <title>dag:dag_id&#45;&#45;dag_tag:dag_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C914.44,-3029 929.06,-3029 987.5,-3029"/>
-<text text-anchor="start" x="956.5" y="-3017.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C914.45,-3029 929.05,-3028 987.5,-3028"/>
+<text text-anchor="start" x="956.5" y="-3016.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="846" y="-3017.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag_owner_attributes -->
 <g id="node31" class="node">
 <title>dag_owner_attributes</title>
-<polygon fill="none" stroke="black" points="988.5,-2937 988.5,-2965 
1246.5,-2965 1246.5,-2937 988.5,-2937"/>
-<text text-anchor="start" x="1019.5" y="-2948.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_owner_attributes</text>
-<polygon fill="none" stroke="black" points="988.5,-2912 988.5,-2937 
1246.5,-2937 1246.5,-2912 988.5,-2912"/>
-<text text-anchor="start" x="993.5" y="-2921.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
-<text text-anchor="start" x="1039.5" y="-2921.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1044.5" y="-2921.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
-<text text-anchor="start" x="1165.5" y="-2921.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="988.5,-2887 988.5,-2912 
1246.5,-2912 1246.5,-2887 988.5,-2887"/>
-<text text-anchor="start" x="993.5" y="-2896.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">owner</text>
-<text text-anchor="start" x="1036.5" y="-2896.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1041.5" y="-2896.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(500)]</text>
-<text text-anchor="start" x="1162.5" y="-2896.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="988.5,-2862 988.5,-2887 
1246.5,-2887 1246.5,-2862 988.5,-2862"/>
-<text text-anchor="start" x="993.5" y="-2871.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">link</text>
-<text text-anchor="start" x="1018.5" y="-2871.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1023.5" y="-2871.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(500)]</text>
-<text text-anchor="start" x="1144.5" y="-2871.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="988.5,-2936 988.5,-2964 
1246.5,-2964 1246.5,-2936 988.5,-2936"/>
+<text text-anchor="start" x="1019.5" y="-2947.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_owner_attributes</text>
+<polygon fill="none" stroke="black" points="988.5,-2911 988.5,-2936 
1246.5,-2936 1246.5,-2911 988.5,-2911"/>
+<text text-anchor="start" x="993.5" y="-2920.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
+<text text-anchor="start" x="1039.5" y="-2920.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1044.5" y="-2920.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
+<text text-anchor="start" x="1165.5" y="-2920.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="988.5,-2886 988.5,-2911 
1246.5,-2911 1246.5,-2886 988.5,-2886"/>
+<text text-anchor="start" x="993.5" y="-2895.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">owner</text>
+<text text-anchor="start" x="1036.5" y="-2895.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1041.5" y="-2895.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(500)]</text>
+<text text-anchor="start" x="1162.5" y="-2895.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="988.5,-2861 988.5,-2886 
1246.5,-2886 1246.5,-2861 988.5,-2861"/>
+<text text-anchor="start" x="993.5" y="-2870.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">link</text>
+<text text-anchor="start" x="1018.5" y="-2870.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1023.5" y="-2870.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(500)]</text>
+<text text-anchor="start" x="1144.5" y="-2870.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- dag&#45;&#45;dag_owner_attributes -->
 <g id="edge30" class="edge">
 <title>dag:dag_id&#45;&#45;dag_owner_attributes:dag_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C930.51,-3029 912.99,-2925 987.5,-2925"/>
-<text text-anchor="start" x="956.5" y="-2913.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C930.79,-3029 912.71,-2924 987.5,-2924"/>
+<text text-anchor="start" x="956.5" y="-2912.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="856" y="-3017.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag_warning -->
 <g id="node32" class="node">
 <title>dag_warning</title>
-<polygon fill="none" stroke="black" points="969.5,-2808 969.5,-2836 
1266.5,-2836 1266.5,-2808 969.5,-2808"/>
-<text text-anchor="start" x="1060.5" y="-2819.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_warning</text>
-<polygon fill="none" stroke="black" points="969.5,-2783 969.5,-2808 
1266.5,-2808 1266.5,-2783 969.5,-2783"/>
-<text text-anchor="start" x="974.5" y="-2792.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
-<text text-anchor="start" x="1020.5" y="-2792.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1025.5" y="-2792.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
-<text text-anchor="start" x="1146.5" y="-2792.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="969.5,-2758 969.5,-2783 
1266.5,-2783 1266.5,-2758 969.5,-2758"/>
-<text text-anchor="start" x="974.5" y="-2767.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">warning_type</text>
-<text text-anchor="start" x="1068.5" y="-2767.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1073.5" y="-2767.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(50)]</text>
-<text text-anchor="start" x="1185.5" y="-2767.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="969.5,-2733 969.5,-2758 
1266.5,-2758 1266.5,-2733 969.5,-2733"/>
-<text text-anchor="start" x="974.5" y="-2742.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">message</text>
-<text text-anchor="start" x="1037.5" y="-2742.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1042.5" y="-2742.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [TEXT]</text>
-<text text-anchor="start" x="1092.5" y="-2742.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="969.5,-2708 969.5,-2733 
1266.5,-2733 1266.5,-2708 969.5,-2708"/>
-<text text-anchor="start" x="974.5" y="-2717.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">timestamp</text>
-<text text-anchor="start" x="1049.5" y="-2717.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1054.5" y="-2717.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [TIMESTAMP]</text>
-<text text-anchor="start" x="1150.5" y="-2717.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="969.5,-2807 969.5,-2835 
1266.5,-2835 1266.5,-2807 969.5,-2807"/>
+<text text-anchor="start" x="1060.5" y="-2818.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_warning</text>
+<polygon fill="none" stroke="black" points="969.5,-2782 969.5,-2807 
1266.5,-2807 1266.5,-2782 969.5,-2782"/>
+<text text-anchor="start" x="974.5" y="-2791.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
+<text text-anchor="start" x="1020.5" y="-2791.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1025.5" y="-2791.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
+<text text-anchor="start" x="1146.5" y="-2791.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="969.5,-2757 969.5,-2782 
1266.5,-2782 1266.5,-2757 969.5,-2757"/>
+<text text-anchor="start" x="974.5" y="-2766.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">warning_type</text>
+<text text-anchor="start" x="1068.5" y="-2766.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1073.5" y="-2766.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(50)]</text>
+<text text-anchor="start" x="1185.5" y="-2766.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="969.5,-2732 969.5,-2757 
1266.5,-2757 1266.5,-2732 969.5,-2732"/>
+<text text-anchor="start" x="974.5" y="-2741.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">message</text>
+<text text-anchor="start" x="1037.5" y="-2741.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1042.5" y="-2741.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [TEXT]</text>
+<text text-anchor="start" x="1092.5" y="-2741.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="969.5,-2707 969.5,-2732 
1266.5,-2732 1266.5,-2707 969.5,-2707"/>
+<text text-anchor="start" x="974.5" y="-2716.8" 
font-family="Helvetica,sans-Serif" font-size="14.00">timestamp</text>
+<text text-anchor="start" x="1049.5" y="-2716.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1054.5" y="-2716.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [TIMESTAMP]</text>
+<text text-anchor="start" x="1150.5" y="-2716.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- dag&#45;&#45;dag_warning -->
 <g id="edge31" class="edge">
 <title>dag:dag_id&#45;&#45;dag_warning:dag_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C911.82,-3029 875.04,-2961.41 899,-2911 912.78,-2882.02 
919.39,-2876.46 936,-2849 950.3,-2825.36 940.87,-2796 968.5,-2796"/>
-<text text-anchor="start" x="937.5" y="-2784.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C912.24,-3029 874.93,-2960.82 899,-2910 912.74,-2881 
919.39,-2875.46 936,-2848 950.3,-2824.36 940.87,-2795 968.5,-2795"/>
+<text text-anchor="start" x="937.5" y="-2783.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="846" y="-3032.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag_favorite -->
 <g id="node33" class="node">
 <title>dag_favorite</title>
-<polygon fill="none" stroke="black" points="986.5,-3405 986.5,-3433 
1249.5,-3433 1249.5,-3405 986.5,-3405"/>
-<text text-anchor="start" x="1062" y="-3416.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_favorite</text>
-<polygon fill="none" stroke="black" points="986.5,-3380 986.5,-3405 
1249.5,-3405 1249.5,-3380 986.5,-3380"/>
-<text text-anchor="start" x="991.5" y="-3389.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
-<text text-anchor="start" x="1037.5" y="-3389.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1042.5" y="-3389.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
-<text text-anchor="start" x="1163.5" y="-3389.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
-<polygon fill="none" stroke="black" points="986.5,-3355 986.5,-3380 
1249.5,-3380 1249.5,-3355 986.5,-3355"/>
-<text text-anchor="start" x="991.5" y="-3364.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">user_id</text>
-<text text-anchor="start" x="1042.5" y="-3364.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
-<text text-anchor="start" x="1047.5" y="-3364.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
-<text text-anchor="start" x="1168.5" y="-3364.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="986.5,-3404 986.5,-3432 
1249.5,-3432 1249.5,-3404 986.5,-3404"/>
+<text text-anchor="start" x="1062" y="-3415.2" 
font-family="Helvetica,sans-Serif" font-weight="bold" 
font-size="16.00">dag_favorite</text>
+<polygon fill="none" stroke="black" points="986.5,-3379 986.5,-3404 
1249.5,-3404 1249.5,-3379 986.5,-3379"/>
+<text text-anchor="start" x="991.5" y="-3388.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">dag_id</text>
+<text text-anchor="start" x="1037.5" y="-3388.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1042.5" y="-3388.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
+<text text-anchor="start" x="1163.5" y="-3388.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
+<polygon fill="none" stroke="black" points="986.5,-3354 986.5,-3379 
1249.5,-3379 1249.5,-3354 986.5,-3354"/>
+<text text-anchor="start" x="991.5" y="-3363.8" 
font-family="Helvetica,sans-Serif" text-decoration="underline" 
font-size="14.00">user_id</text>
+<text text-anchor="start" x="1042.5" y="-3363.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
+<text text-anchor="start" x="1047.5" y="-3363.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> [VARCHAR(250)]</text>
+<text text-anchor="start" x="1168.5" y="-3363.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- dag&#45;&#45;dag_favorite -->
 <g id="edge32" class="edge">
 <title>dag:dag_id&#45;&#45;dag_favorite:dag_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C873.95,-3029 927.16,-3326.38 936,-3342 951.41,-3369.21 
954.23,-3392 985.5,-3392"/>
-<text text-anchor="start" x="954.5" y="-3380.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M856,-3029C873.89,-3029 927.18,-3325.43 936,-3341 951.42,-3368.2 
954.23,-3391 985.5,-3391"/>
+<text text-anchor="start" x="954.5" y="-3379.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="846" y="-3017.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag_run -->
@@ -1683,7 +1683,7 @@
 <text text-anchor="start" x="1582" y="-191.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- dag_version&#45;&#45;dag_run -->
-<g id="edge33" class="edge">
+<g id="edge35" class="edge">
 <title>dag_version:id&#45;&#45;dag_run:created_dag_version_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1259.5,-2156C1422.54,-2156 1232.96,-695 1396,-695"/>
 <text text-anchor="start" x="1365" y="-683.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1827,14 +1827,14 @@
 <text text-anchor="start" x="1108.5" y="-387.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- log_template&#45;&#45;dag_run -->
-<g id="edge35" class="edge">
+<g id="edge34" class="edge">
 <title>log_template:id&#45;&#45;dag_run:log_template_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1248.5,-466C1318.16,-466 1326.34,-519 1396,-519"/>
 <text text-anchor="start" x="1365" y="-507.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="1248.5" y="-454.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag_run&#45;&#45;dagrun_asset_event -->
-<g id="edge38" class="edge">
+<g id="edge39" class="edge">
 <title>dag_run:id&#45;&#45;dagrun_asset_event:dag_run_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1694,-845C1763.4,-845 1754.28,-286.89 1791,-228 1813.12,-192.53 1826.2,-174 
1868,-174"/>
 <text text-anchor="start" x="1837" y="-162.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -1892,7 +1892,7 @@
 <!-- dag_run&#45;&#45;task_instance -->
 <g id="edge43" class="edge">
 <title>dag_run:dag_id&#45;&#45;task_instance:dag_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1694,-645C1739.81,-645 1752.19,-1463 1798,-1463"/>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1694,-645C1785.62,-645 1706.38,-1463 1798,-1463"/>
 <text text-anchor="start" x="1767" y="-1451.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="1694" y="-633.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
@@ -1974,9 +1974,9 @@
 <text text-anchor="start" x="1684" y="-833.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- dag_run&#45;&#45;deadline -->
-<g id="edge50" class="edge">
+<g id="edge51" class="edge">
 <title>dag_run:id&#45;&#45;deadline:dagrun_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1694,-845C1719.05,-845 1711.26,-871.87 1718,-896 1759.76,-1045.57 
1707.4,-1460.13 1791,-1591 1902.48,-1765.53 2077.44,-1656.82 2191,-1830 
2231.86,-1892.3 2202.5,-2495 2277,-2495"/>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1694,-845C1719.05,-845 1711.53,-871.8 1718,-896 1768.1,-1083.41 
1732.32,-1138.22 1754,-1331 1767.04,-1446.99 1726.37,-1493.8 1791,-1591 
1905.67,-1763.45 2077.44,-1656.82 2191,-1830 2231.86,-1892.3 2202.5,-2495 
2277,-2495"/>
 <text text-anchor="start" x="2246" y="-2483.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="1653" y="-848.8" font-family="Times,serif" 
font-size="14.00">{0,1}</text>
 </g>
@@ -2044,7 +2044,7 @@
 <text text-anchor="start" x="1129.5" y="-541.8" 
font-family="Helvetica,sans-Serif" font-size="14.00"> NOT NULL</text>
 </g>
 <!-- backfill&#45;&#45;dag_run -->
-<g id="edge34" class="edge">
+<g id="edge33" class="edge">
 <title>backfill:id&#45;&#45;dag_run:backfill_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M1292.5,-820C1338.5,-820 1350,-820 1396,-820"/>
 <text text-anchor="start" x="1365" y="-808.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
@@ -2216,26 +2216,26 @@
 </g>
 <!-- task_instance&#45;&#45;task_map -->
 <g id="edge53" class="edge">
-<title>task_instance:run_id&#45;&#45;task_map:run_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-912C2352.71,-912 2126.29,-549 2295,-549"/>
-<text text-anchor="start" x="2264" y="-537.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
-<text text-anchor="start" x="2184" y="-900.8" font-family="Times,serif" 
font-size="14.00">1</text>
-</g>
-<!-- task_instance&#45;&#45;task_map -->
-<g id="edge54" class="edge">
 <title>task_instance:dag_id&#45;&#45;task_map:dag_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1463C2223.31,-1463 2224.02,-1151.1 2228,-1112 2248.73,-908.43 
2202.79,-848.26 2264,-653 2272.16,-626.96 2267.71,-600 2295,-600"/>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1463C2224.63,-1463 2223.92,-1140.42 2228,-1100 2248,-901.7 
2204.19,-843.12 2264,-653 2272.19,-626.97 2267.71,-600 2295,-600"/>
 <text text-anchor="start" x="2264" y="-588.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="2184" y="-1451.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- task_instance&#45;&#45;task_map -->
-<g id="edge55" class="edge">
+<g id="edge54" class="edge">
 <title>task_instance:task_id&#45;&#45;task_map:task_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-762C2300.72,-762 2178.28,-524 2295,-524"/>
 <text text-anchor="start" x="2264" y="-512.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="2184" y="-750.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- task_instance&#45;&#45;task_map -->
+<g id="edge55" class="edge">
+<title>task_instance:run_id&#45;&#45;task_map:run_id</title>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-912C2352.71,-912 2126.29,-549 2295,-549"/>
+<text text-anchor="start" x="2264" y="-537.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<text text-anchor="start" x="2184" y="-900.8" font-family="Times,serif" 
font-size="14.00">1</text>
+</g>
+<!-- task_instance&#45;&#45;task_map -->
 <g id="edge56" class="edge">
 <title>task_instance:map_index&#45;&#45;task_map:map_index</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1238C2258.69,-1238 2220.31,-575 2295,-575"/>
@@ -2332,31 +2332,31 @@
 </g>
 <!-- task_instance&#45;&#45;xcom -->
 <g id="edge58" class="edge">
-<title>task_instance:task_id&#45;&#45;xcom:task_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-762C2256.81,-762 2221.19,-116 2294,-116"/>
-<text text-anchor="start" x="2263" y="-104.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
-<text text-anchor="start" x="2184" y="-765.8" font-family="Times,serif" 
font-size="14.00">1</text>
+<title>task_instance:run_id&#45;&#45;xcom:run_id</title>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-912C2202.66,-912 2261.35,-263.47 2264,-245 2275.47,-165.15 
2213.33,-66 2294,-66"/>
+<text text-anchor="start" x="2263" y="-54.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<text text-anchor="start" x="2184" y="-915.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- task_instance&#45;&#45;xcom -->
 <g id="edge59" class="edge">
-<title>task_instance:map_index&#45;&#45;xcom:map_index</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1238C2214.09,-1238 2224.58,-728 2227,-698 2243.24,-496.65 
2227.35,-443.65 2264,-245 2272.65,-198.11 2246.32,-142 2294,-142"/>
-<text text-anchor="start" x="2263" y="-130.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
-<text text-anchor="start" x="2184" y="-1241.8" font-family="Times,serif" 
font-size="14.00">1</text>
-</g>
-<!-- task_instance&#45;&#45;xcom -->
-<g id="edge60" class="edge">
 <title>task_instance:dag_id&#45;&#45;xcom:dag_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1463C2222.08,-1463 2224.49,-816.99 2227,-779 2242.69,-541.62 
2232.97,-480.87 2264,-245 2273.09,-175.86 2224.27,-91 2294,-91"/>
 <text text-anchor="start" x="2263" y="-79.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="2184" y="-1466.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- task_instance&#45;&#45;xcom -->
+<g id="edge60" class="edge">
+<title>task_instance:map_index&#45;&#45;xcom:map_index</title>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1238C2190.92,-1238 2262.75,-251.8 2264,-245 2272.63,-198.11 
2246.32,-142 2294,-142"/>
+<text text-anchor="start" x="2263" y="-130.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<text text-anchor="start" x="2184" y="-1241.8" font-family="Times,serif" 
font-size="14.00">1</text>
+</g>
+<!-- task_instance&#45;&#45;xcom -->
 <g id="edge61" class="edge">
-<title>task_instance:run_id&#45;&#45;xcom:run_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-912C2231.4,-912 2246.6,-66 2294,-66"/>
-<text text-anchor="start" x="2263" y="-54.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
-<text text-anchor="start" x="2184" y="-915.8" font-family="Times,serif" 
font-size="14.00">1</text>
+<title>task_instance:task_id&#45;&#45;xcom:task_id</title>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-762C2256.81,-762 2221.19,-116 2294,-116"/>
+<text text-anchor="start" x="2263" y="-104.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<text text-anchor="start" x="2184" y="-765.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- task_instance_note -->
 <g id="node50" class="node">
@@ -2569,18 +2569,18 @@
 </g>
 <!-- task_instance&#45;&#45;task_instance_history -->
 <g id="edge65" class="edge">
-<title>task_instance:map_index&#45;&#45;task_instance_history:map_index</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1238C2226.75,-1238 2228.25,-1279 2271,-1279"/>
-<text text-anchor="start" x="2240" y="-1267.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
-<text text-anchor="start" x="2174" y="-1226.8" font-family="Times,serif" 
font-size="14.00">1</text>
-</g>
-<!-- task_instance&#45;&#45;task_instance_history -->
-<g id="edge66" class="edge">
 <title>task_instance:task_id&#45;&#45;task_instance_history:task_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-762C2226.75,-762 2228.25,-803 2271,-803"/>
 <text text-anchor="start" x="2240" y="-791.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="2174" y="-750.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
+<!-- task_instance&#45;&#45;task_instance_history -->
+<g id="edge66" class="edge">
+<title>task_instance:map_index&#45;&#45;task_instance_history:map_index</title>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1238C2226.75,-1238 2228.25,-1279 2271,-1279"/>
+<text text-anchor="start" x="2240" y="-1267.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<text text-anchor="start" x="2174" y="-1226.8" font-family="Times,serif" 
font-size="14.00">1</text>
+</g>
 <!-- rendered_task_instance_fields -->
 <g id="node52" class="node">
 <title>rendered_task_instance_fields</title>
@@ -2618,34 +2618,34 @@
 </g>
 <!-- task_instance&#45;&#45;rendered_task_instance_fields -->
 <g id="edge67" class="edge">
-<title>task_instance:dag_id&#45;&#45;rendered_task_instance_fields:dag_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1463C2215.65,-1463 2224.5,-926.55 2227,-895 2242.73,-696.72 
2218.65,-642.66 2264,-449 2269.78,-424.33 2259.66,-396 2285,-396"/>
-<text text-anchor="start" x="2254" y="-384.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
-<text text-anchor="start" x="2174" y="-1466.8" font-family="Times,serif" 
font-size="14.00">1</text>
-</g>
-<!-- task_instance&#45;&#45;rendered_task_instance_fields -->
-<g id="edge68" class="edge">
 
<title>task_instance:map_index&#45;&#45;rendered_task_instance_fields:map_index</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1238C2195.01,-1238 2262.02,-459.83 2264,-449 2270.46,-413.68 
2249.1,-371 2285,-371"/>
 <text text-anchor="start" x="2254" y="-359.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="2174" y="-1241.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- task_instance&#45;&#45;rendered_task_instance_fields -->
-<g id="edge69" class="edge">
+<g id="edge68" class="edge">
 
<title>task_instance:task_id&#45;&#45;rendered_task_instance_fields:task_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-762C2284.75,-762 2184.25,-320 2285,-320"/>
 <text text-anchor="start" x="2254" y="-308.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="2174" y="-765.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
 <!-- task_instance&#45;&#45;rendered_task_instance_fields -->
-<g id="edge70" class="edge">
+<g id="edge69" class="edge">
 
<title>task_instance:run_id&#45;&#45;rendered_task_instance_fields:run_id</title>
-<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-912C2221.22,-912 2249.84,-534.42 2264,-449 2271.71,-402.48 
2237.84,-345 2285,-345"/>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-912C2247.99,-912 2221.01,-345 2285,-345"/>
 <text text-anchor="start" x="2254" y="-333.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
 <text text-anchor="start" x="2174" y="-915.8" font-family="Times,serif" 
font-size="14.00">1</text>
 </g>
+<!-- task_instance&#45;&#45;rendered_task_instance_fields -->
+<g id="edge70" class="edge">
+<title>task_instance:dag_id&#45;&#45;rendered_task_instance_fields:dag_id</title>
+<path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2184,-1463C2215.65,-1463 2224.5,-926.55 2227,-895 2242.73,-696.72 
2218.65,-642.66 2264,-449 2269.78,-424.33 2259.66,-396 2285,-396"/>
+<text text-anchor="start" x="2254" y="-384.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
+<text text-anchor="start" x="2174" y="-1466.8" font-family="Times,serif" 
font-size="14.00">1</text>
+</g>
 <!-- deadline_alert&#45;&#45;deadline -->
-<g id="edge51" class="edge">
+<g id="edge50" class="edge">
 <title>deadline_alert:id&#45;&#45;deadline:deadline_alert_id</title>
 <path fill="none" stroke="#7f7f7f" stroke-dasharray="5,2" 
d="M2142,-2267C2250.35,-2267 2168.65,-2470 2277,-2470"/>
 <text text-anchor="start" x="2246" y="-2458.8" font-family="Times,serif" 
font-size="14.00">0..N</text>
diff --git a/airflow-core/docs/migrations-ref.rst 
b/airflow-core/docs/migrations-ref.rst
index dc0be922e07..4dc64b8cb0d 100644
--- a/airflow-core/docs/migrations-ref.rst
+++ b/airflow-core/docs/migrations-ref.rst
@@ -39,7 +39,9 @@ Here's the list of all the Database Migrations that are 
executed via when you ru
 
+-------------------------+------------------+-------------------+--------------------------------------------------------------+
 | Revision ID             | Revises ID       | Airflow Version   | Description 
                                                 |
 
+=========================+==================+===================+==============================================================+
-| ``55297ae24532`` (head) | ``e79fc784f145`` | ``3.2.0``         | Add 
required fields to enable UI integrations for the        |
+| ``82dbd68e6171`` (head) | ``55297ae24532`` | ``3.2.0``         | Add index 
to task_reschedule ti_id .                         |
++-------------------------+------------------+-------------------+--------------------------------------------------------------+
+| ``55297ae24532``        | ``e79fc784f145`` | ``3.2.0``         | Add 
required fields to enable UI integrations for the        |
 |                         |                  |                   | Deadline 
Alerts feature.                                     |
 
+-------------------------+------------------+-------------------+--------------------------------------------------------------+
 | ``e79fc784f145``        | ``0b112f49112d`` | ``3.2.0``         | add 
timetable_type to dag table for filtering.               |
diff --git 
a/airflow-core/src/airflow/migrations/versions/0100_3_2_0_add_index_to_task_reschedule_ti_id.py
 
b/airflow-core/src/airflow/migrations/versions/0100_3_2_0_add_index_to_task_reschedule_ti_id.py
new file mode 100644
index 00000000000..ed4f1a10496
--- /dev/null
+++ 
b/airflow-core/src/airflow/migrations/versions/0100_3_2_0_add_index_to_task_reschedule_ti_id.py
@@ -0,0 +1,58 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""
+Add index to task_reschedule ti_id .
+
+Revision ID: 82dbd68e6171
+Revises: 55297ae24532
+Create Date: 2026-01-22 16:25:42.164449
+
+"""
+
+from __future__ import annotations
+
+from alembic import op
+
+# revision identifiers, used by Alembic.
+revision = "82dbd68e6171"
+down_revision = "55297ae24532"
+branch_labels = None
+depends_on = None
+airflow_version = "3.2.0"
+
+
+def upgrade():
+    """Add index to task_reschedule ti_id."""
+    with op.batch_alter_table("task_reschedule", schema=None) as batch_op:
+        batch_op.create_index("idx_task_reschedule_ti_id", ["ti_id"], 
unique=False)
+
+
+def downgrade():
+    """Remove index from task_reschedule ti_id."""
+    dialect_name = op.get_context().dialect.name
+    if dialect_name == "mysql":
+        with op.batch_alter_table("task_reschedule", schema=None) as batch_op:
+            batch_op.drop_constraint("task_reschedule_ti_fkey", 
type_="foreignkey")
+            batch_op.drop_index("idx_task_reschedule_ti_id")
+            batch_op.create_foreign_key(
+                "task_reschedule_ti_fkey", "task_instance", ["ti_id"], ["id"], 
ondelete="CASCADE"
+            )
+    else:
+        with op.batch_alter_table("task_reschedule", schema=None) as batch_op:
+            batch_op.drop_index("idx_task_reschedule_ti_id")
diff --git a/airflow-core/src/airflow/models/taskreschedule.py 
b/airflow-core/src/airflow/models/taskreschedule.py
index 5ed0ac30daa..1f3e031f4cb 100644
--- a/airflow-core/src/airflow/models/taskreschedule.py
+++ b/airflow-core/src/airflow/models/taskreschedule.py
@@ -25,6 +25,7 @@ from typing import TYPE_CHECKING
 
 from sqlalchemy import (
     ForeignKey,
+    Index,
     Integer,
     String,
     asc,
@@ -60,6 +61,8 @@ class TaskReschedule(Base):
     duration: Mapped[int] = mapped_column(Integer, nullable=False)
     reschedule_date: Mapped[datetime.datetime] = mapped_column(UtcDateTime, 
nullable=False)
 
+    __table_args__ = (Index("idx_task_reschedule_ti_id", ti_id),)
+
     task_instance = relationship(
         "TaskInstance", primaryjoin="TaskReschedule.ti_id == 
foreign(TaskInstance.id)", uselist=False
     )
diff --git a/airflow-core/src/airflow/utils/db.py 
b/airflow-core/src/airflow/utils/db.py
index d318d3a1b82..3dc4d4dc355 100644
--- a/airflow-core/src/airflow/utils/db.py
+++ b/airflow-core/src/airflow/utils/db.py
@@ -112,7 +112,7 @@ _REVISION_HEADS_MAP: dict[str, str] = {
     "3.0.0": "29ce7909c52b",
     "3.0.3": "fe199e1abd77",
     "3.1.0": "cc92b33c6709",
-    "3.2.0": "55297ae24532",
+    "3.2.0": "82dbd68e6171",
 }
 
 # Prefix used to identify tables holding data moved during migration.

Reply via email to