make ensure_ascii=False
This commit is contained in:
parent
cab56594d5
commit
23cbd12570
@ -100,7 +100,7 @@ async def upgrade(ctx: Context):
|
|||||||
|
|
||||||
with open(file_path, "w") as f:
|
with open(file_path, "w") as f:
|
||||||
content["migrate"] = True
|
content["migrate"] = True
|
||||||
json.dump(content, f, indent=4)
|
json.dump(content, f, indent=4, ensure_ascii=False)
|
||||||
click.secho(f"Success upgrade {file}", fg=Color.green)
|
click.secho(f"Success upgrade {file}", fg=Color.green)
|
||||||
|
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ async def downgrade(ctx: Context):
|
|||||||
continue
|
continue
|
||||||
with open(file_path, "w") as f:
|
with open(file_path, "w") as f:
|
||||||
content["migrate"] = False
|
content["migrate"] = False
|
||||||
json.dump(content, f, indent=4)
|
json.dump(content, f, indent=4, ensure_ascii=False)
|
||||||
return click.secho(f"Success downgrade {file}", fg=Color.green)
|
return click.secho(f"Success downgrade {file}", fg=Color.green)
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class Migrate:
|
|||||||
"migrate": False,
|
"migrate": False,
|
||||||
}
|
}
|
||||||
with open(os.path.join(cls.migrate_location, filename), "w") as f:
|
with open(os.path.join(cls.migrate_location, filename), "w") as f:
|
||||||
json.dump(content, f, indent=4)
|
json.dump(content, f, indent=4, ensure_ascii=False)
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -128,7 +128,7 @@ class Migrate:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def cp_models(
|
def cp_models(
|
||||||
cls, app: str, model_files: List[str], old_model_file,
|
cls, app: str, model_files: List[str], old_model_file,
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
cp currents models to old_model_files
|
cp currents models to old_model_files
|
||||||
@ -177,7 +177,7 @@ class Migrate:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _diff_models(
|
def _diff_models(
|
||||||
cls, old_models: Dict[str, Type[Model]], new_models: Dict[str, Type[Model]], upgrade=True
|
cls, old_models: Dict[str, Type[Model]], new_models: Dict[str, Type[Model]], upgrade=True
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
diff models and add operators
|
diff models and add operators
|
||||||
|
Loading…
x
Reference in New Issue
Block a user