Allow None for max_id during migrations
This allows empty databases with no max_id to run. fixes #869
This commit is contained in:
parent
fb483df1b9
commit
2e1b49b009
1 changed files with 1 additions and 0 deletions
|
@ -126,6 +126,7 @@ def yield_random_entries(batch_query, primary_key_field, batch_size, max_id):
|
||||||
an "id" field which can be inspected.
|
an "id" field which can be inspected.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
max_id = max(max_id, 1)
|
||||||
allocator = CompletedKeys(max_id + 1)
|
allocator = CompletedKeys(max_id + 1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Reference in a new issue