Commit ad127be
fix: Preserve nullable and unique modifiers in describe() for FK attributes
The describe() method now correctly outputs FK options like [nullable],
[unique], or [nullable, unique] by:
1. Checking if any FK attribute has nullable=True in the heading
2. Combining nullable with existing index properties (unique, etc.)
3. Formatting all options into a single bracket notation
This fixes the round-trip issue where describe() output could not be
used to recreate an equivalent table definition.
Fixes: describe() tests that verify definition round-trips
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent ba702d3 commit ad127be
1 file changed
+18
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1127 | 1127 | | |
1128 | 1128 | | |
1129 | 1129 | | |
1130 | | - | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1131 | 1139 | | |
1132 | 1140 | | |
1133 | 1141 | | |
1134 | | - | |
| 1142 | + | |
1135 | 1143 | | |
1136 | | - | |
1137 | | - | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1138 | 1148 | | |
1139 | 1149 | | |
1140 | 1150 | | |
1141 | | - | |
1142 | | - | |
| 1151 | + | |
| 1152 | + | |
1143 | 1153 | | |
1144 | 1154 | | |
1145 | 1155 | | |
1146 | 1156 | | |
1147 | | - | |
1148 | | - | |
| 1157 | + | |
| 1158 | + | |
1149 | 1159 | | |
1150 | 1160 | | |
1151 | 1161 | | |
| |||
0 commit comments