Fix pyproject.toml
not existing error. (#217)
This commit is contained in:
parent
63e8d06157
commit
c60c1610f0
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## 0.6
|
## 0.6
|
||||||
|
|
||||||
|
### 0.6.1
|
||||||
|
|
||||||
|
- Fix `pyproject.toml` not existing error. (#217)
|
||||||
|
|
||||||
### 0.6.0
|
### 0.6.0
|
||||||
|
|
||||||
- Change default config file from `aerich.ini` to `pyproject.toml`. (#197)
|
- Change default config file from `aerich.ini` to `pyproject.toml`. (#197)
|
||||||
|
@ -193,10 +193,12 @@ async def init(ctx: Context, tortoise_orm, location, src_folder):
|
|||||||
# check that we can find the configuration, if not we can fail before the config file gets created
|
# check that we can find the configuration, if not we can fail before the config file gets created
|
||||||
add_src_path(src_folder)
|
add_src_path(src_folder)
|
||||||
get_tortoise_config(ctx, tortoise_orm)
|
get_tortoise_config(ctx, tortoise_orm)
|
||||||
|
if Path(config_file).exists():
|
||||||
with open(config_file, "r") as f:
|
with open(config_file, "r") as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
doc = tomlkit.parse(content)
|
doc = tomlkit.parse(content)
|
||||||
|
else:
|
||||||
|
doc = tomlkit.parse("[tool.aerich]")
|
||||||
table = tomlkit.table()
|
table = tomlkit.table()
|
||||||
table["tortoise_orm"] = tortoise_orm
|
table["tortoise_orm"] = tortoise_orm
|
||||||
table["location"] = location
|
table["location"] = location
|
||||||
|
@ -1 +1 @@
|
|||||||
__version__ = "0.6.0"
|
__version__ = "0.6.1"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "aerich"
|
name = "aerich"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
description = "A database migrations tool for Tortoise ORM."
|
description = "A database migrations tool for Tortoise ORM."
|
||||||
authors = ["long2ice <long2ice@gmail.com>"]
|
authors = ["long2ice <long2ice@gmail.com>"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user