Commit a11d862
committed
[FIX] models.remove_model: MemoryError
```
Traceback (most recent call last):
[...]
File "/tmp/tmpipxrg2eq/migrations/util/models.py", line 563, in merge_model
remove_model(cr, source, drop_table=drop_table, ignore_m2m=ignore_m2m)
File "/tmp/tmpipxrg2eq/migrations/util/models.py", line 138, in remove_model
it = chunks([id for (id,) in cr.fetchall()], chunk_size, fmt=tuple)
MemoryError
```
Some IR tables can be large. Avoid `cr.fetchall()` when getting ids by use of
pg.query_ids()1 parent 5c804b9 commit a11d862
1 file changed
+12
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
0 commit comments