Add subcommand to delete old records
This commit is contained in:
parent
a7513e6ca0
commit
c817dd4979
|
|
@ -498,13 +498,13 @@ def fix_location_models():
|
|||
fix_tag_category()
|
||||
fix_chosen_tag()
|
||||
|
||||
|
||||
def remove_old_records():
|
||||
clean_old_records(City, {"mysql_id__isnull": True})
|
||||
clean_old_records(Region, {"mysql_ids__isnull": True})
|
||||
clean_old_records(City, {"mysql_ids__isnull": True})
|
||||
|
||||
|
||||
|
||||
|
||||
def transfer_city_gallery():
|
||||
created_counter = 0
|
||||
cities_not_exists = {}
|
||||
|
|
@ -563,6 +563,7 @@ data_types = {
|
|||
"fix_location": [
|
||||
fix_location_models
|
||||
],
|
||||
"remove_old_locations":[remove_old_records],
|
||||
|
||||
"fill_city_gallery": [transfer_city_gallery]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user