update version
This commit is contained in:
parent
24c1f4cb7d
commit
b1521c4cc7
@ -1,8 +1,8 @@
|
||||
# ChangeLog
|
||||
|
||||
## 0.5
|
||||
## 0.6
|
||||
|
||||
### 0.5.9
|
||||
### 0.6.0
|
||||
|
||||
- Change default config file from `aerich.ini` to `pyproject.toml`. (#197)
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
1. Run `aerich init -t config.TORTOISE_ORM`.
|
||||
2. Remove `aerich.ini`.
|
||||
|
||||
## 0.5
|
||||
|
||||
### 0.5.8
|
||||
|
||||
- Support `indexes` change. (#193)
|
||||
|
12
README.md
12
README.md
@ -15,7 +15,7 @@ it\'s own migration solution.
|
||||
Just install from pypi:
|
||||
|
||||
```shell
|
||||
> pip install aerich
|
||||
pip install aerich
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
@ -27,11 +27,10 @@ Usage: aerich [OPTIONS] COMMAND [ARGS]...
|
||||
|
||||
Options:
|
||||
-V, --version Show the version and exit.
|
||||
-c, --config TEXT Config file. [default: aerich.ini]
|
||||
-c, --config TEXT Config file. [default: pyproject.toml]
|
||||
--app TEXT Tortoise-ORM app name.
|
||||
-n, --name TEXT Name of section in .ini file to use for aerich config.
|
||||
[default: aerich]
|
||||
|
||||
[default: tool.aerich]
|
||||
-h, --help Show this message and exit.
|
||||
|
||||
Commands:
|
||||
@ -70,10 +69,9 @@ Usage: aerich init [OPTIONS]
|
||||
|
||||
Init config file and generate root migrate location.
|
||||
|
||||
OOptions:
|
||||
Options:
|
||||
-t, --tortoise-orm TEXT Tortoise-ORM config module dict variable, like
|
||||
settings.TORTOISE_ORM. [required]
|
||||
|
||||
--location TEXT Migrate store location. [default: ./migrations]
|
||||
-s, --src_folder TEXT Folder of the source, relative to the project root.
|
||||
-h, --help Show this message and exit.
|
||||
@ -85,7 +83,7 @@ Initialize the config file and migrations location:
|
||||
> aerich init -t tests.backends.mysql.TORTOISE_ORM
|
||||
|
||||
Success create migrate location ./migrations
|
||||
Success generate config file aerich.ini
|
||||
Success write config to pyproject.toml
|
||||
```
|
||||
|
||||
### Init db
|
||||
|
@ -7,6 +7,7 @@ from typing import List
|
||||
import click
|
||||
import tomlkit
|
||||
from click import Context, UsageError
|
||||
from tomlkit.exceptions import NonExistentKey
|
||||
from tortoise import Tortoise
|
||||
|
||||
from aerich.exceptions import DowngradeError
|
||||
@ -67,9 +68,12 @@ async def cli(ctx: Context, config, app, name):
|
||||
with open(config, "r") as f:
|
||||
content = f.read()
|
||||
doc = tomlkit.parse(content)
|
||||
location = doc[name]["location"]
|
||||
tortoise_orm = doc[name]["tortoise_orm"]
|
||||
src_folder = doc[name].get("src_folder", CONFIG_DEFAULT_VALUES["src_folder"])
|
||||
try:
|
||||
location = doc[name]["location"]
|
||||
tortoise_orm = doc[name]["tortoise_orm"]
|
||||
src_folder = doc[name].get("src_folder", CONFIG_DEFAULT_VALUES["src_folder"])
|
||||
except NonExistentKey:
|
||||
raise UsageError("You need run aerich init again when upgrade to 0.6.0+")
|
||||
add_src_path(src_folder)
|
||||
tortoise_config = get_tortoise_config(ctx, tortoise_orm)
|
||||
app = app or list(tortoise_config.get("apps").keys())[0]
|
||||
|
@ -1 +1 @@
|
||||
__version__ = "0.5.9"
|
||||
__version__ = "0.6.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "aerich"
|
||||
version = "0.5.9"
|
||||
version = "0.6.0"
|
||||
description = "A database migrations tool for Tortoise ORM."
|
||||
authors = ["long2ice <long2ice@gmail.com>"]
|
||||
license = "Apache-2.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user