Commit 568311e
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 955dee1 commit 568311e
1 file changed
+15
-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 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| |||
0 commit comments