Fix ci error
This commit is contained in:
parent
9879004fee
commit
a677d506a9
2
Makefile
2
Makefile
@ -6,7 +6,7 @@ MYSQL_PORT ?= 3306
|
|||||||
MYSQL_PASS ?= "123456"
|
MYSQL_PASS ?= "123456"
|
||||||
POSTGRES_HOST ?= "127.0.0.1"
|
POSTGRES_HOST ?= "127.0.0.1"
|
||||||
POSTGRES_PORT ?= 5432
|
POSTGRES_PORT ?= 5432
|
||||||
POSTGRES_PAS ?= "123456"
|
POSTGRES_PASS ?= "123456"
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Aerich development makefile"
|
@echo "Aerich development makefile"
|
||||||
|
@ -262,7 +262,9 @@ async def init_db(ctx: Context, safe):
|
|||||||
os.mkdir(dirname)
|
os.mkdir(dirname)
|
||||||
click.secho(f"Success create app migrate location {dirname}", fg=Color.green)
|
click.secho(f"Success create app migrate location {dirname}", fg=Color.green)
|
||||||
else:
|
else:
|
||||||
return click.secho(f"Inited {app} already", fg=Color.yellow)
|
return click.secho(
|
||||||
|
f"Inited {app} already, or delete {dirname} and try again.", fg=Color.yellow
|
||||||
|
)
|
||||||
|
|
||||||
await Tortoise.init(config=config)
|
await Tortoise.init(config=config)
|
||||||
connection = get_app_connection(config, app)
|
connection = get_app_connection(config, app)
|
||||||
|
@ -312,7 +312,11 @@ class Migrate:
|
|||||||
else:
|
else:
|
||||||
is_rename = diff_key in cls._rename_new
|
is_rename = diff_key in cls._rename_new
|
||||||
if is_rename:
|
if is_rename:
|
||||||
if cls.dialect == "mysql" and cls._db_version.major == 5:
|
if (
|
||||||
|
cls.dialect == "mysql"
|
||||||
|
and cls._db_version
|
||||||
|
and cls._db_version.major == 5
|
||||||
|
):
|
||||||
cls._add_operator(
|
cls._add_operator(
|
||||||
cls._change_field(new_model, old_field, new_field),
|
cls._change_field(new_model, old_field, new_field),
|
||||||
upgrade,
|
upgrade,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user