Commit 9a68dc7
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 f4b0258 commit 9a68dc7
1 file changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
1104 | 1115 | | |
1105 | 1116 | | |
1106 | 1117 | | |
1107 | | - | |
| 1118 | + | |
1108 | 1119 | | |
1109 | | - | |
1110 | | - | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1111 | 1124 | | |
1112 | 1125 | | |
1113 | 1126 | | |
1114 | | - | |
1115 | | - | |
| 1127 | + | |
| 1128 | + | |
1116 | 1129 | | |
1117 | 1130 | | |
1118 | 1131 | | |
1119 | 1132 | | |
1120 | | - | |
1121 | | - | |
| 1133 | + | |
| 1134 | + | |
1122 | 1135 | | |
1123 | 1136 | | |
1124 | 1137 | | |
| |||
0 commit comments