Compare commits
	
		
			14 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | fc914acc80 | ||
|  | ac03ecb002 | ||
|  | 235ef3f7ea | ||
|  | e00eb7f3d9 | ||
|  | d6c8941676 | ||
|  | cf062c9310 | ||
|  | 309adec8c9 | ||
|  | 8674142ba8 | ||
|  | cda9bd1c47 | ||
|  | 198e4e0032 | ||
|  | 1b440477a2 | ||
|  | 1263c6f735 | ||
|  | 6504384879 | ||
|  | 17ab0a1421 | 
| @@ -1,71 +1,74 @@ | |||||||
| ========= | # ChangeLog | ||||||
| ChangeLog | 
 | ||||||
| ========= | ## 0.2 | ||||||
| 0.2 | 
 | ||||||
| === | ### 0.2.3 | ||||||
|  | 
 | ||||||
|  | - Fix tortoise ssl config. | ||||||
|  | - PostgreSQL add/drop index/unique. | ||||||
|  | 
 | ||||||
|  | ### 0.2.2 | ||||||
| 
 | 
 | ||||||
| 0.2.2 |  | ||||||
| ----- |  | ||||||
| - Fix postgres drop fk. | - Fix postgres drop fk. | ||||||
| - Fix version sort. | - Fix version sort. | ||||||
| 
 | 
 | ||||||
| 0.2.1 | ### 0.2.1 | ||||||
| ----- | 
 | ||||||
| - Fix bug in windows. | - Fix bug in windows. | ||||||
| - Enhance PostgreSQL support. | - Enhance PostgreSQL support. | ||||||
| 
 | 
 | ||||||
| 0.2.0 | ### 0.2.0 | ||||||
| ----- | 
 | ||||||
| - Update model file find method. | - Update model file find method. | ||||||
| - Set ``--safe`` bool. | - Set `--safe` bool. | ||||||
|  | 
 | ||||||
|  | ## 0.1 | ||||||
|  | 
 | ||||||
|  | ### 0.1.9 | ||||||
| 
 | 
 | ||||||
| 0.1 |  | ||||||
| === |  | ||||||
| 0.1.9 |  | ||||||
| ----- |  | ||||||
| - Fix default_connection when upgrade | - Fix default_connection when upgrade | ||||||
| - Find default app instead of default. | - Find default app instead of default. | ||||||
| - Diff MySQL ddl. | - Diff MySQL ddl. | ||||||
| - Check tortoise config. | - Check tortoise config. | ||||||
| 
 | 
 | ||||||
| 0.1.8 | ### 0.1.8 | ||||||
| ----- | 
 | ||||||
| - Fix upgrade error when migrate. | - Fix upgrade error when migrate. | ||||||
| - Fix init db sql error. | - Fix init db sql error. | ||||||
| - Support change column. | - Support change column. | ||||||
| 
 | 
 | ||||||
| 0.1.7 | ### 0.1.7 | ||||||
| ----- | 
 | ||||||
| - Exclude models.Aerich. | - Exclude models.Aerich. | ||||||
| - Add init record when init-db. | - Add init record when init-db. | ||||||
| - Fix version num str. | - Fix version num str. | ||||||
| 
 | 
 | ||||||
| 0.1.6 | ### 0.1.6 | ||||||
| ----- | 
 | ||||||
| - update dependency_links | - update dependency_links | ||||||
| 
 | 
 | ||||||
| 0.1.5 | ### 0.1.5 | ||||||
| ----- | 
 | ||||||
| - Add sqlite and postgres support. | - Add sqlite and postgres support. | ||||||
| - Fix dependency import. | - Fix dependency import. | ||||||
| - Store versions in db. | - Store versions in db. | ||||||
| 
 | 
 | ||||||
| 0.1.4 | ### 0.1.4 | ||||||
| ----- | 
 | ||||||
| - Fix transaction and fields import. | - Fix transaction and fields import. | ||||||
| - Make unique index worked. | - Make unique index worked. | ||||||
| - Add cli --version. | - Add cli --version. | ||||||
| 
 | 
 | ||||||
| 0.1.3 | ### 0.1.3 | ||||||
| ----- | 
 | ||||||
| - Support indexes and unique_together. | - Support indexes and unique_together. | ||||||
| 
 | 
 | ||||||
| 0.1.2 | ### 0.1.2 | ||||||
| ----- | 
 | ||||||
| - Now aerich support m2m. | - Now aerich support m2m. | ||||||
| - Add cli cmd init-db. | - Add cli cmd init-db. | ||||||
| - Change cli options. | - Change cli options. | ||||||
| 
 | 
 | ||||||
| 0.1.1 | ### 0.1.1 | ||||||
| ----- | 
 | ||||||
| - Now aerich is basic worked. | - Now aerich is basic worked. | ||||||
							
								
								
									
										3
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								Makefile
									
									
									
									
									
								
							| @@ -50,7 +50,4 @@ testall: deps test_sqlite test_postgres test_mysql | |||||||
| build: deps | build: deps | ||||||
| 	@poetry build | 	@poetry build | ||||||
|  |  | ||||||
| publish: deps |  | ||||||
| 	@poetry publish --build |  | ||||||
|  |  | ||||||
| ci: check testall | ci: check testall | ||||||
							
								
								
									
										28
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								README.md
									
									
									
									
									
								
							| @@ -5,8 +5,6 @@ | |||||||
| [](https://github.com/long2ice/aerich/actions?query=workflow:pypi) | [](https://github.com/long2ice/aerich/actions?query=workflow:pypi) | ||||||
| [](https://github.com/long2ice/aerich/actions?query=workflow:test) | [](https://github.com/long2ice/aerich/actions?query=workflow:test) | ||||||
|  |  | ||||||
| <a href="https://tracking.gitads.io/?repo=aerich"><img src="https://images.gitads.io/aerich" alt="GitAds"/></a> |  | ||||||
|  |  | ||||||
| ## Introduction | ## Introduction | ||||||
|  |  | ||||||
| Tortoise-ORM is the best asyncio ORM now, but it lacks a database | Tortoise-ORM is the best asyncio ORM now, but it lacks a database | ||||||
| @@ -99,14 +97,8 @@ Success create app migrate location ./migrations/models | |||||||
| Success generate schema for app "models" | Success generate schema for app "models" | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ::: {.note} |  | ||||||
| ::: {.title} |  | ||||||
| Note |  | ||||||
| ::: |  | ||||||
|  |  | ||||||
| If your Tortoise-ORM app is not default `models`, you must specify | If your Tortoise-ORM app is not default `models`, you must specify | ||||||
| `--app` like `aerich --app other_models init-db`. | `--app` like `aerich --app other_models init-db`. | ||||||
| ::: |  | ||||||
|  |  | ||||||
| ### Update models and make migrate | ### Update models and make migrate | ||||||
|  |  | ||||||
| @@ -155,28 +147,14 @@ $ aerich heads | |||||||
| 1_202029051520102929_drop_column.json | 1_202029051520102929_drop_column.json | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ## Limitations |  | ||||||
|  |  | ||||||
| - Not support `rename column` now. |  | ||||||
| - `Sqlite` and `Postgres` may not work as expected because I don\'t |  | ||||||
|   use those in my work. |  | ||||||
|  |  | ||||||
| ## Support this project | ## Support this project | ||||||
|  |  | ||||||
| - Just give a star! | - Just give a star! | ||||||
| - Donation. | - Donation. | ||||||
|  |  | ||||||
| ### AliPay | | AliPay                                                                                 | WeChatPay                                                                                 | PayPal                                                           | | ||||||
|  | | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | ||||||
| <img width="200" src="https://github.com/long2ice/aerich/raw/dev/images/alipay.jpeg"/> | | <img width="200" src="https://github.com/long2ice/aerich/raw/dev/images/alipay.jpeg"/> | <img width="200" src="https://github.com/long2ice/aerich/raw/dev/images/wechatpay.jpeg"/> | [PayPal](https://www.paypal.me/long2ice) to my account long2ice. | | ||||||
|  |  | ||||||
| ### WeChat Pay |  | ||||||
|  |  | ||||||
| <img width="200" src="https://github.com/long2ice/aerich/raw/dev/images/wechatpay.jpeg"/> |  | ||||||
|  |  | ||||||
| ### PayPal |  | ||||||
|  |  | ||||||
| Donate money by [paypal](https://www.paypal.me/long2ice) to my account long2ice. |  | ||||||
|  |  | ||||||
| ## License | ## License | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1 +1 @@ | |||||||
| __version__ = "0.2.2" | __version__ = "0.2.3" | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| from typing import Type | from typing import List, Type | ||||||
|  |  | ||||||
| from tortoise import Model | from tortoise import Model | ||||||
| from tortoise.backends.asyncpg.schema_generator import AsyncpgSchemaGenerator | from tortoise.backends.asyncpg.schema_generator import AsyncpgSchemaGenerator | ||||||
| @@ -10,6 +10,12 @@ from aerich.ddl import BaseDDL | |||||||
| class PostgresDDL(BaseDDL): | class PostgresDDL(BaseDDL): | ||||||
|     schema_generator_cls = AsyncpgSchemaGenerator |     schema_generator_cls = AsyncpgSchemaGenerator | ||||||
|     DIALECT = AsyncpgSchemaGenerator.DIALECT |     DIALECT = AsyncpgSchemaGenerator.DIALECT | ||||||
|  |     _ADD_INDEX_TEMPLATE = 'CREATE INDEX "{index_name}" ON "{table_name}" ({column_names})' | ||||||
|  |     _ADD_UNIQUE_TEMPLATE = ( | ||||||
|  |         'ALTER TABLE "{table_name}" ADD CONSTRAINT "{index_name}" UNIQUE ({column_names})' | ||||||
|  |     ) | ||||||
|  |     _DROP_INDEX_TEMPLATE = 'DROP INDEX "{index_name}"' | ||||||
|  |     _DROP_UNIQUE_TEMPLATE = 'ALTER TABLE "{table_name}" DROP CONSTRAINT "{index_name}"' | ||||||
|     _ALTER_DEFAULT_TEMPLATE = 'ALTER TABLE "{table_name}" ALTER COLUMN "{column}" {default}' |     _ALTER_DEFAULT_TEMPLATE = 'ALTER TABLE "{table_name}" ALTER COLUMN "{column}" {default}' | ||||||
|     _ALTER_NULL_TEMPLATE = 'ALTER TABLE "{table_name}" ALTER COLUMN "{column}" {set_drop} NOT NULL' |     _ALTER_NULL_TEMPLATE = 'ALTER TABLE "{table_name}" ALTER COLUMN "{column}" {set_drop} NOT NULL' | ||||||
|     _MODIFY_COLUMN_TEMPLATE = 'ALTER TABLE "{table_name}" ALTER COLUMN "{column}" TYPE {datatype}' |     _MODIFY_COLUMN_TEMPLATE = 'ALTER TABLE "{table_name}" ALTER COLUMN "{column}" TYPE {datatype}' | ||||||
| @@ -41,6 +47,25 @@ class PostgresDDL(BaseDDL): | |||||||
|             datatype=field_object.get_for_dialect(self.DIALECT, "SQL_TYPE"), |             datatype=field_object.get_for_dialect(self.DIALECT, "SQL_TYPE"), | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|  |     def add_index(self, model: "Type[Model]", field_names: List[str], unique=False): | ||||||
|  |         template = self._ADD_UNIQUE_TEMPLATE if unique else self._ADD_INDEX_TEMPLATE | ||||||
|  |         return template.format( | ||||||
|  |             index_name=self.schema_generator._generate_index_name( | ||||||
|  |                 "uid" if unique else "idx", model, field_names | ||||||
|  |             ), | ||||||
|  |             table_name=model._meta.db_table, | ||||||
|  |             column_names=", ".join([self.schema_generator.quote(f) for f in field_names]), | ||||||
|  |         ) | ||||||
|  |  | ||||||
|  |     def drop_index(self, model: "Type[Model]", field_names: List[str], unique=False): | ||||||
|  |         template = self._DROP_UNIQUE_TEMPLATE if unique else self._DROP_INDEX_TEMPLATE | ||||||
|  |         return template.format( | ||||||
|  |             index_name=self.schema_generator._generate_index_name( | ||||||
|  |                 "uid" if unique else "idx", model, field_names | ||||||
|  |             ), | ||||||
|  |             table_name=model._meta.db_table, | ||||||
|  |         ) | ||||||
|  |  | ||||||
|     def set_comment(self, model: "Type[Model]", field_object: Field): |     def set_comment(self, model: "Type[Model]", field_object: Field): | ||||||
|         db_table = model._meta.db_table |         db_table = model._meta.db_table | ||||||
|         return self._SET_COMMENT_TEMPLATE.format( |         return self._SET_COMMENT_TEMPLATE.format( | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| import json | import json | ||||||
| import os | import os | ||||||
| import re | import re | ||||||
| from copy import deepcopy |  | ||||||
| from datetime import datetime | from datetime import datetime | ||||||
| from importlib import import_module | from importlib import import_module | ||||||
| from typing import Dict, List, Tuple, Type | from typing import Dict, List, Tuple, Type | ||||||
| @@ -46,7 +45,7 @@ class Migrate: | |||||||
|     def get_all_version_files(cls) -> List[str]: |     def get_all_version_files(cls) -> List[str]: | ||||||
|         return sorted( |         return sorted( | ||||||
|             filter(lambda x: x.endswith("json"), os.listdir(cls.migrate_location)), |             filter(lambda x: x.endswith("json"), os.listdir(cls.migrate_location)), | ||||||
|             key=lambda x: x.split("_")[0], |             key=lambda x: int(x.split("_")[0]), | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|     @classmethod |     @classmethod | ||||||
| @@ -88,7 +87,7 @@ class Migrate: | |||||||
|  |  | ||||||
|     @classmethod |     @classmethod | ||||||
|     async def generate_version(cls, name=None): |     async def generate_version(cls, name=None): | ||||||
|         now = datetime.now().strftime("%Y%M%D%H%M%S").replace("/", "") |         now = datetime.now().strftime("%Y%m%d%H%M%S").replace("/", "") | ||||||
|         last_version_num = await cls._get_last_version_num() |         last_version_num = await cls._get_last_version_num() | ||||||
|         if last_version_num is None: |         if last_version_num is None: | ||||||
|             return f"0_{now}_init.json" |             return f"0_{now}_init.json" | ||||||
| @@ -178,14 +177,13 @@ class Migrate: | |||||||
|         :param location: |         :param location: | ||||||
|         :return: |         :return: | ||||||
|         """ |         """ | ||||||
|         temp_config = deepcopy(config) |  | ||||||
|         path = os.path.join(location, app, cls.old_models) |         path = os.path.join(location, app, cls.old_models) | ||||||
|         path = path.replace(os.sep, ".").lstrip(".") |         path = path.replace(os.sep, ".").lstrip(".") | ||||||
|         temp_config["apps"][cls.diff_app] = { |         config["apps"][cls.diff_app] = { | ||||||
|             "models": [path], |             "models": [path], | ||||||
|             "default_connection": config.get("apps").get(app).get("default_connection", "default"), |             "default_connection": config.get("apps").get(app).get("default_connection", "default"), | ||||||
|         } |         } | ||||||
|         return temp_config |         return config | ||||||
|  |  | ||||||
|     @classmethod |     @classmethod | ||||||
|     def write_old_models(cls, config: dict, app: str, location: str): |     def write_old_models(cls, config: dict, app: str, location: str): | ||||||
|   | |||||||
							
								
								
									
										191
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										191
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							| @@ -158,7 +158,7 @@ description = "Foreign Function Interface for Python calling C code." | |||||||
| name = "cffi" | name = "cffi" | ||||||
| optional = true | optional = true | ||||||
| python-versions = "*" | python-versions = "*" | ||||||
| version = "1.14.0" | version = "1.14.1" | ||||||
|  |  | ||||||
| [package.dependencies] | [package.dependencies] | ||||||
| pycparser = "*" | pycparser = "*" | ||||||
| @@ -186,17 +186,18 @@ description = "cryptography is a package which provides cryptographic recipes an | |||||||
| name = "cryptography" | name = "cryptography" | ||||||
| optional = true | optional = true | ||||||
| python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" | python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" | ||||||
| version = "2.9.2" | version = "3.0" | ||||||
|  |  | ||||||
| [package.dependencies] | [package.dependencies] | ||||||
| cffi = ">=1.8,<1.11.3 || >1.11.3" | cffi = ">=1.8,<1.11.3 || >1.11.3" | ||||||
| six = ">=1.4.1" | six = ">=1.4.1" | ||||||
|  |  | ||||||
| [package.extras] | [package.extras] | ||||||
| docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0)", "sphinx-rtd-theme"] | docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0,<3.1.0 || >3.1.0,<3.1.1 || >3.1.1)", "sphinx-rtd-theme"] | ||||||
| docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] | docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] | ||||||
| idna = ["idna (>=2.1)"] | idna = ["idna (>=2.1)"] | ||||||
| pep8test = ["flake8", "flake8-import-order", "pep8-naming"] | pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] | ||||||
|  | ssh = ["bcrypt (>=3.1.5)"] | ||||||
| test = ["pytest (>=3.6.0,<3.9.0 || >3.9.0,<3.9.1 || >3.9.1,<3.9.2 || >3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] | test = ["pytest (>=3.6.0,<3.9.0 || >3.9.0,<3.9.1 || >3.9.1,<3.9.2 || >3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] | ||||||
|  |  | ||||||
| [[package]] | [[package]] | ||||||
| @@ -276,6 +277,14 @@ zipp = ">=0.5" | |||||||
| docs = ["sphinx", "rst.linker"] | docs = ["sphinx", "rst.linker"] | ||||||
| testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] | testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] | ||||||
|  |  | ||||||
|  | [[package]] | ||||||
|  | category = "dev" | ||||||
|  | description = "iniconfig: brain-dead simple config-ini parsing" | ||||||
|  | name = "iniconfig" | ||||||
|  | optional = false | ||||||
|  | python-versions = "*" | ||||||
|  | version = "1.0.1" | ||||||
|  |  | ||||||
| [[package]] | [[package]] | ||||||
| category = "main" | category = "main" | ||||||
| description = "Simple module to parse ISO 8601 dates" | description = "Simple module to parse ISO 8601 dates" | ||||||
| @@ -290,9 +299,10 @@ description = "A Python utility / library to sort Python imports." | |||||||
| name = "isort" | name = "isort" | ||||||
| optional = false | optional = false | ||||||
| python-versions = ">=3.6,<4.0" | python-versions = ">=3.6,<4.0" | ||||||
| version = "5.1.3" | version = "5.3.2" | ||||||
|  |  | ||||||
| [package.extras] | [package.extras] | ||||||
|  | colors = ["colorama (>=0.4.3,<0.5.0)"] | ||||||
| pipfile_deprecated_finder = ["pipreqs", "requirementslib", "tomlkit (>=0.5.3)"] | pipfile_deprecated_finder = ["pipreqs", "requirementslib", "tomlkit (>=0.5.3)"] | ||||||
| requirements_deprecated_finder = ["pipreqs", "pip-api"] | requirements_deprecated_finder = ["pipreqs", "pip-api"] | ||||||
|  |  | ||||||
| @@ -426,7 +436,7 @@ description = "A SQL query builder API for Python" | |||||||
| name = "pypika" | name = "pypika" | ||||||
| optional = false | optional = false | ||||||
| python-versions = "*" | python-versions = "*" | ||||||
| version = "0.37.16" | version = "0.38.0" | ||||||
|  |  | ||||||
| [[package]] | [[package]] | ||||||
| category = "dev" | category = "dev" | ||||||
| @@ -434,24 +444,25 @@ description = "pytest: simple powerful testing with Python" | |||||||
| name = "pytest" | name = "pytest" | ||||||
| optional = false | optional = false | ||||||
| python-versions = ">=3.5" | python-versions = ">=3.5" | ||||||
| version = "5.4.3" | version = "6.0.1" | ||||||
|  |  | ||||||
| [package.dependencies] | [package.dependencies] | ||||||
| atomicwrites = ">=1.0" | atomicwrites = ">=1.0" | ||||||
| attrs = ">=17.4.0" | attrs = ">=17.4.0" | ||||||
| colorama = "*" | colorama = "*" | ||||||
|  | iniconfig = "*" | ||||||
| more-itertools = ">=4.0.0" | more-itertools = ">=4.0.0" | ||||||
| packaging = "*" | packaging = "*" | ||||||
| pluggy = ">=0.12,<1.0" | pluggy = ">=0.12,<1.0" | ||||||
| py = ">=1.5.0" | py = ">=1.8.2" | ||||||
| wcwidth = "*" | toml = "*" | ||||||
|  |  | ||||||
| [package.dependencies.importlib-metadata] | [package.dependencies.importlib-metadata] | ||||||
| python = "<3.8" | python = "<3.8" | ||||||
| version = ">=0.12" | version = ">=0.12" | ||||||
|  |  | ||||||
| [package.extras] | [package.extras] | ||||||
| checkqa-mypy = ["mypy (v0.761)"] | checkqa_mypy = ["mypy (0.780)"] | ||||||
| testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] | testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] | ||||||
|  |  | ||||||
| [[package]] | [[package]] | ||||||
| @@ -474,10 +485,25 @@ description = "run tests in isolated forked subprocesses" | |||||||
| name = "pytest-forked" | name = "pytest-forked" | ||||||
| optional = false | optional = false | ||||||
| python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" | ||||||
| version = "1.2.0" | version = "1.3.0" | ||||||
|  |  | ||||||
| [package.dependencies] | [package.dependencies] | ||||||
| pytest = ">=3.1.0" | py = "*" | ||||||
|  | pytest = ">=3.10" | ||||||
|  |  | ||||||
|  | [[package]] | ||||||
|  | category = "dev" | ||||||
|  | description = "Thin-wrapper around the mock package for easier use with pytest" | ||||||
|  | name = "pytest-mock" | ||||||
|  | optional = false | ||||||
|  | python-versions = ">=3.5" | ||||||
|  | version = "3.2.0" | ||||||
|  |  | ||||||
|  | [package.dependencies] | ||||||
|  | pytest = ">=2.7" | ||||||
|  |  | ||||||
|  | [package.extras] | ||||||
|  | dev = ["pre-commit", "tox", "pytest-asyncio"] | ||||||
|  |  | ||||||
| [[package]] | [[package]] | ||||||
| category = "dev" | category = "dev" | ||||||
| @@ -485,7 +511,7 @@ description = "pytest xdist plugin for distributed testing and loop-on-failing m | |||||||
| name = "pytest-xdist" | name = "pytest-xdist" | ||||||
| optional = false | optional = false | ||||||
| python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" | ||||||
| version = "1.33.0" | version = "1.34.0" | ||||||
|  |  | ||||||
| [package.dependencies] | [package.dependencies] | ||||||
| execnet = ">=1.1" | execnet = ">=1.1" | ||||||
| @@ -565,7 +591,7 @@ description = "Easy async ORM for python, built with relations in mind" | |||||||
| name = "tortoise-orm" | name = "tortoise-orm" | ||||||
| optional = false | optional = false | ||||||
| python-versions = "*" | python-versions = "*" | ||||||
| version = "0.16.13" | version = "0.16.14" | ||||||
|  |  | ||||||
| [package.dependencies] | [package.dependencies] | ||||||
| aiosqlite = ">=0.11.0" | aiosqlite = ">=0.11.0" | ||||||
| @@ -592,14 +618,6 @@ optional = false | |||||||
| python-versions = "*" | python-versions = "*" | ||||||
| version = "3.7.4.2" | version = "3.7.4.2" | ||||||
|  |  | ||||||
| [[package]] |  | ||||||
| category = "dev" |  | ||||||
| description = "Measures the displayed width of unicode strings in a terminal" |  | ||||||
| name = "wcwidth" |  | ||||||
| optional = false |  | ||||||
| python-versions = "*" |  | ||||||
| version = "0.2.5" |  | ||||||
|  |  | ||||||
| [[package]] | [[package]] | ||||||
| category = "dev" | category = "dev" | ||||||
| description = "Backport of pathlib-compatible object wrapper for zip files" | description = "Backport of pathlib-compatible object wrapper for zip files" | ||||||
| @@ -617,7 +635,8 @@ testing = ["jaraco.itertools", "func-timeout"] | |||||||
| dbdrivers = ["aiomysql", "asyncpg"] | dbdrivers = ["aiomysql", "asyncpg"] | ||||||
|  |  | ||||||
| [metadata] | [metadata] | ||||||
| content-hash = "2e02de89517b7461909007ef09e1697e78a4202ffe086444e6027a0a91db58b7" | content-hash = "06f00778f783c4ad5b174a9c9ee80f4f0e38db9da9ff1012f09c7d306eaa0975" | ||||||
|  | lock-version = "1.0" | ||||||
| python-versions = "^3.7" | python-versions = "^3.7" | ||||||
|  |  | ||||||
| [metadata.files] | [metadata.files] | ||||||
| @@ -688,34 +707,34 @@ black = [ | |||||||
|     {file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, |     {file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, | ||||||
| ] | ] | ||||||
| cffi = [ | cffi = [ | ||||||
|     {file = "cffi-1.14.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1cae98a7054b5c9391eb3249b86e0e99ab1e02bb0cc0575da191aedadbdf4384"}, |     {file = "cffi-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:66dd45eb9530e3dde8f7c009f84568bc7cac489b93d04ac86e3111fb46e470c2"}, | ||||||
|     {file = "cffi-1.14.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:cf16e3cf6c0a5fdd9bc10c21687e19d29ad1fe863372b5543deaec1039581a30"}, |     {file = "cffi-1.14.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:4f53e4128c81ca3212ff4cf097c797ab44646a40b42ec02a891155cd7a2ba4d8"}, | ||||||
|     {file = "cffi-1.14.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:f2b0fa0c01d8a0c7483afd9f31d7ecf2d71760ca24499c8697aeb5ca37dc090c"}, |     {file = "cffi-1.14.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:833401b15de1bb92791d7b6fb353d4af60dc688eaa521bd97203dcd2d124a7c1"}, | ||||||
|     {file = "cffi-1.14.0-cp27-cp27m-win32.whl", hash = "sha256:99f748a7e71ff382613b4e1acc0ac83bf7ad167fb3802e35e90d9763daba4d78"}, |     {file = "cffi-1.14.1-cp27-cp27m-win32.whl", hash = "sha256:26f33e8f6a70c255767e3c3f957ccafc7f1f706b966e110b855bfe944511f1f9"}, | ||||||
|     {file = "cffi-1.14.0-cp27-cp27m-win_amd64.whl", hash = "sha256:c420917b188a5582a56d8b93bdd8e0f6eca08c84ff623a4c16e809152cd35793"}, |     {file = "cffi-1.14.1-cp27-cp27m-win_amd64.whl", hash = "sha256:b87dfa9f10a470eee7f24234a37d1d5f51e5f5fa9eeffda7c282e2b8f5162eb1"}, | ||||||
|     {file = "cffi-1.14.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:399aed636c7d3749bbed55bc907c3288cb43c65c4389964ad5ff849b6370603e"}, |     {file = "cffi-1.14.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:effd2ba52cee4ceff1a77f20d2a9f9bf8d50353c854a282b8760ac15b9833168"}, | ||||||
|     {file = "cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:cab50b8c2250b46fe738c77dbd25ce017d5e6fb35d3407606e7a4180656a5a6a"}, |     {file = "cffi-1.14.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bac0d6f7728a9cc3c1e06d4fcbac12aaa70e9379b3025b27ec1226f0e2d404cf"}, | ||||||
|     {file = "cffi-1.14.0-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:001bf3242a1bb04d985d63e138230802c6c8d4db3668fb545fb5005ddf5bb5ff"}, |     {file = "cffi-1.14.1-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:d6033b4ffa34ef70f0b8086fd4c3df4bf801fee485a8a7d4519399818351aa8e"}, | ||||||
|     {file = "cffi-1.14.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:e56c744aa6ff427a607763346e4170629caf7e48ead6921745986db3692f987f"}, |     {file = "cffi-1.14.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:8416ed88ddc057bab0526d4e4e9f3660f614ac2394b5e019a628cdfff3733849"}, | ||||||
|     {file = "cffi-1.14.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:b8c78301cefcf5fd914aad35d3c04c2b21ce8629b5e4f4e45ae6812e461910fa"}, |     {file = "cffi-1.14.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:892daa86384994fdf4856cb43c93f40cbe80f7f95bb5da94971b39c7f54b3a9c"}, | ||||||
|     {file = "cffi-1.14.0-cp35-cp35m-win32.whl", hash = "sha256:8c0ffc886aea5df6a1762d0019e9cb05f825d0eec1f520c51be9d198701daee5"}, |     {file = "cffi-1.14.1-cp35-cp35m-win32.whl", hash = "sha256:c991112622baee0ae4d55c008380c32ecfd0ad417bcd0417ba432e6ba7328caa"}, | ||||||
|     {file = "cffi-1.14.0-cp35-cp35m-win_amd64.whl", hash = "sha256:8a6c688fefb4e1cd56feb6c511984a6c4f7ec7d2a1ff31a10254f3c817054ae4"}, |     {file = "cffi-1.14.1-cp35-cp35m-win_amd64.whl", hash = "sha256:fcf32bf76dc25e30ed793145a57426064520890d7c02866eb93d3e4abe516948"}, | ||||||
|     {file = "cffi-1.14.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:95cd16d3dee553f882540c1ffe331d085c9e629499ceadfbda4d4fde635f4b7d"}, |     {file = "cffi-1.14.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f960375e9823ae6a07072ff7f8a85954e5a6434f97869f50d0e41649a1c8144f"}, | ||||||
|     {file = "cffi-1.14.0-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:66e41db66b47d0d8672d8ed2708ba91b2f2524ece3dee48b5dfb36be8c2f21dc"}, |     {file = "cffi-1.14.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:a6d28e7f14ecf3b2ad67c4f106841218c8ab12a0683b1528534a6c87d2307af3"}, | ||||||
|     {file = "cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:028a579fc9aed3af38f4892bdcc7390508adabc30c6af4a6e4f611b0c680e6ac"}, |     {file = "cffi-1.14.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:cda422d54ee7905bfc53ee6915ab68fe7b230cacf581110df4272ee10462aadc"}, | ||||||
|     {file = "cffi-1.14.0-cp36-cp36m-win32.whl", hash = "sha256:cef128cb4d5e0b3493f058f10ce32365972c554572ff821e175dbc6f8ff6924f"}, |     {file = "cffi-1.14.1-cp36-cp36m-win32.whl", hash = "sha256:4a03416915b82b81af5502459a8a9dd62a3c299b295dcdf470877cb948d655f2"}, | ||||||
|     {file = "cffi-1.14.0-cp36-cp36m-win_amd64.whl", hash = "sha256:337d448e5a725bba2d8293c48d9353fc68d0e9e4088d62a9571def317797522b"}, |     {file = "cffi-1.14.1-cp36-cp36m-win_amd64.whl", hash = "sha256:4ce1e995aeecf7cc32380bc11598bfdfa017d592259d5da00fc7ded11e61d022"}, | ||||||
|     {file = "cffi-1.14.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e577934fc5f8779c554639376beeaa5657d54349096ef24abe8c74c5d9c117c3"}, |     {file = "cffi-1.14.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e23cb7f1d8e0f93addf0cae3c5b6f00324cccb4a7949ee558d7b6ca973ab8ae9"}, | ||||||
|     {file = "cffi-1.14.0-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:62ae9af2d069ea2698bf536dcfe1e4eed9090211dbaafeeedf5cb6c41b352f66"}, |     {file = "cffi-1.14.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:ddff0b2bd7edcc8c82d1adde6dbbf5e60d57ce985402541cd2985c27f7bec2a0"}, | ||||||
|     {file = "cffi-1.14.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:14491a910663bf9f13ddf2bc8f60562d6bc5315c1f09c704937ef17293fb85b0"}, |     {file = "cffi-1.14.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f90c2267101010de42f7273c94a1f026e56cbc043f9330acd8a80e64300aba33"}, | ||||||
|     {file = "cffi-1.14.0-cp37-cp37m-win32.whl", hash = "sha256:c43866529f2f06fe0edc6246eb4faa34f03fe88b64a0a9a942561c8e22f4b71f"}, |     {file = "cffi-1.14.1-cp37-cp37m-win32.whl", hash = "sha256:3cd2c044517f38d1b577f05927fb9729d3396f1d44d0c659a445599e79519792"}, | ||||||
|     {file = "cffi-1.14.0-cp37-cp37m-win_amd64.whl", hash = "sha256:2089ed025da3919d2e75a4d963d008330c96751127dd6f73c8dc0c65041b4c26"}, |     {file = "cffi-1.14.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fa72a52a906425416f41738728268072d5acfd48cbe7796af07a923236bcf96"}, | ||||||
|     {file = "cffi-1.14.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3b911c2dbd4f423b4c4fcca138cadde747abdb20d196c4a48708b8a2d32b16dd"}, |     {file = "cffi-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:267adcf6e68d77ba154334a3e4fc921b8e63cbb38ca00d33d40655d4228502bc"}, | ||||||
|     {file = "cffi-1.14.0-cp38-cp38-manylinux1_i686.whl", hash = "sha256:7e63cbcf2429a8dbfe48dcc2322d5f2220b77b2e17b7ba023d6166d84655da55"}, |     {file = "cffi-1.14.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:d3148b6ba3923c5850ea197a91a42683f946dba7e8eb82dfa211ab7e708de939"}, | ||||||
|     {file = "cffi-1.14.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:3d311bcc4a41408cf5854f06ef2c5cab88f9fded37a3b95936c9879c1640d4c2"}, |     {file = "cffi-1.14.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:98be759efdb5e5fa161e46d404f4e0ce388e72fbf7d9baf010aff16689e22abe"}, | ||||||
|     {file = "cffi-1.14.0-cp38-cp38-win32.whl", hash = "sha256:675686925a9fb403edba0114db74e741d8181683dcf216be697d208857e04ca8"}, |     {file = "cffi-1.14.1-cp38-cp38-win32.whl", hash = "sha256:6923d077d9ae9e8bacbdb1c07ae78405a9306c8fd1af13bfa06ca891095eb995"}, | ||||||
|     {file = "cffi-1.14.0-cp38-cp38-win_amd64.whl", hash = "sha256:00789914be39dffba161cfc5be31b55775de5ba2235fe49aa28c148236c4e06b"}, |     {file = "cffi-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:b1d6ebc891607e71fd9da71688fcf332a6630b7f5b7f5549e6e631821c0e5d90"}, | ||||||
|     {file = "cffi-1.14.0.tar.gz", hash = "sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6"}, |     {file = "cffi-1.14.1.tar.gz", hash = "sha256:b2a2b0d276a136146e012154baefaea2758ef1f56ae9f4e01c612b0831e0bd2f"}, | ||||||
| ] | ] | ||||||
| click = [ | click = [ | ||||||
|     {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, |     {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, | ||||||
| @@ -726,25 +745,25 @@ colorama = [ | |||||||
|     {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, |     {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, | ||||||
| ] | ] | ||||||
| cryptography = [ | cryptography = [ | ||||||
|     {file = "cryptography-2.9.2-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:daf54a4b07d67ad437ff239c8a4080cfd1cc7213df57d33c97de7b4738048d5e"}, |     {file = "cryptography-3.0-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:ab49edd5bea8d8b39a44b3db618e4783ef84c19c8b47286bf05dfdb3efb01c83"}, | ||||||
|     {file = "cryptography-2.9.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:3b3eba865ea2754738616f87292b7f29448aec342a7c720956f8083d252bf28b"}, |     {file = "cryptography-3.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:124af7255ffc8e964d9ff26971b3a6153e1a8a220b9a685dc407976ecb27a06a"}, | ||||||
|     {file = "cryptography-2.9.2-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:c447cf087cf2dbddc1add6987bbe2f767ed5317adb2d08af940db517dd704365"}, |     {file = "cryptography-3.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:51e40123083d2f946794f9fe4adeeee2922b581fa3602128ce85ff813d85b81f"}, | ||||||
|     {file = "cryptography-2.9.2-cp27-cp27m-win32.whl", hash = "sha256:f118a95c7480f5be0df8afeb9a11bd199aa20afab7a96bcf20409b411a3a85f0"}, |     {file = "cryptography-3.0-cp27-cp27m-win32.whl", hash = "sha256:dea0ba7fe6f9461d244679efa968d215ea1f989b9c1957d7f10c21e5c7c09ad6"}, | ||||||
|     {file = "cryptography-2.9.2-cp27-cp27m-win_amd64.whl", hash = "sha256:c4fd17d92e9d55b84707f4fd09992081ba872d1a0c610c109c18e062e06a2e55"}, |     {file = "cryptography-3.0-cp27-cp27m-win_amd64.whl", hash = "sha256:8ecf9400d0893836ff41b6f977a33972145a855b6efeb605b49ee273c5e6469f"}, | ||||||
|     {file = "cryptography-2.9.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d0d5aeaedd29be304848f1c5059074a740fa9f6f26b84c5b63e8b29e73dfc270"}, |     {file = "cryptography-3.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:0c608ff4d4adad9e39b5057de43657515c7da1ccb1807c3a27d4cf31fc923b4b"}, | ||||||
|     {file = "cryptography-2.9.2-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:1e4014639d3d73fbc5ceff206049c5a9a849cefd106a49fa7aaaa25cc0ce35cf"}, |     {file = "cryptography-3.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:bec7568c6970b865f2bcebbe84d547c52bb2abadf74cefce396ba07571109c67"}, | ||||||
|     {file = "cryptography-2.9.2-cp35-abi3-macosx_10_9_x86_64.whl", hash = "sha256:96c080ae7118c10fcbe6229ab43eb8b090fccd31a09ef55f83f690d1ef619a1d"}, |     {file = "cryptography-3.0-cp35-abi3-macosx_10_10_x86_64.whl", hash = "sha256:0cbfed8ea74631fe4de00630f4bb592dad564d57f73150d6f6796a24e76c76cd"}, | ||||||
|     {file = "cryptography-2.9.2-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:e993468c859d084d5579e2ebee101de8f5a27ce8e2159959b6673b418fd8c785"}, |     {file = "cryptography-3.0-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:a09fd9c1cca9a46b6ad4bea0a1f86ab1de3c0c932364dbcf9a6c2a5eeb44fa77"}, | ||||||
|     {file = "cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl", hash = "sha256:88c881dd5a147e08d1bdcf2315c04972381d026cdb803325c03fe2b4a8ed858b"}, |     {file = "cryptography-3.0-cp35-abi3-manylinux2010_x86_64.whl", hash = "sha256:ce82cc06588e5cbc2a7df3c8a9c778f2cb722f56835a23a68b5a7264726bb00c"}, | ||||||
|     {file = "cryptography-2.9.2-cp35-cp35m-win32.whl", hash = "sha256:651448cd2e3a6bc2bb76c3663785133c40d5e1a8c1a9c5429e4354201c6024ae"}, |     {file = "cryptography-3.0-cp35-cp35m-win32.whl", hash = "sha256:9367d00e14dee8d02134c6c9524bb4bd39d4c162456343d07191e2a0b5ec8b3b"}, | ||||||
|     {file = "cryptography-2.9.2-cp35-cp35m-win_amd64.whl", hash = "sha256:726086c17f94747cedbee6efa77e99ae170caebeb1116353c6cf0ab67ea6829b"}, |     {file = "cryptography-3.0-cp35-cp35m-win_amd64.whl", hash = "sha256:384d7c681b1ab904fff3400a6909261cae1d0939cc483a68bdedab282fb89a07"}, | ||||||
|     {file = "cryptography-2.9.2-cp36-cp36m-win32.whl", hash = "sha256:091d31c42f444c6f519485ed528d8b451d1a0c7bf30e8ca583a0cac44b8a0df6"}, |     {file = "cryptography-3.0-cp36-cp36m-win32.whl", hash = "sha256:4d355f2aee4a29063c10164b032d9fa8a82e2c30768737a2fd56d256146ad559"}, | ||||||
|     {file = "cryptography-2.9.2-cp36-cp36m-win_amd64.whl", hash = "sha256:bb1f0281887d89617b4c68e8db9a2c42b9efebf2702a3c5bf70599421a8623e3"}, |     {file = "cryptography-3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:45741f5499150593178fc98d2c1a9c6722df88b99c821ad6ae298eff0ba1ae71"}, | ||||||
|     {file = "cryptography-2.9.2-cp37-cp37m-win32.whl", hash = "sha256:18452582a3c85b96014b45686af264563e3e5d99d226589f057ace56196ec78b"}, |     {file = "cryptography-3.0-cp37-cp37m-win32.whl", hash = "sha256:8ecef21ac982aa78309bb6f092d1677812927e8b5ef204a10c326fc29f1367e2"}, | ||||||
|     {file = "cryptography-2.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:22e91636a51170df0ae4dcbd250d318fd28c9f491c4e50b625a49964b24fe46e"}, |     {file = "cryptography-3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:4b9303507254ccb1181d1803a2080a798910ba89b1a3c9f53639885c90f7a756"}, | ||||||
|     {file = "cryptography-2.9.2-cp38-cp38-win32.whl", hash = "sha256:844a76bc04472e5135b909da6aed84360f522ff5dfa47f93e3dd2a0b84a89fa0"}, |     {file = "cryptography-3.0-cp38-cp38-win32.whl", hash = "sha256:8713ddb888119b0d2a1462357d5946b8911be01ddbf31451e1d07eaa5077a261"}, | ||||||
|     {file = "cryptography-2.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:1dfa985f62b137909496e7fc182dac687206d8d089dd03eaeb28ae16eec8e7d5"}, |     {file = "cryptography-3.0-cp38-cp38-win_amd64.whl", hash = "sha256:bea0b0468f89cdea625bb3f692cd7a4222d80a6bdafd6fb923963f2b9da0e15f"}, | ||||||
|     {file = "cryptography-2.9.2.tar.gz", hash = "sha256:a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229"}, |     {file = "cryptography-3.0.tar.gz", hash = "sha256:8e924dbc025206e97756e8903039662aa58aa9ba357d8e1d8fc29e3092322053"}, | ||||||
| ] | ] | ||||||
| execnet = [ | execnet = [ | ||||||
|     {file = "execnet-1.7.1-py2.py3-none-any.whl", hash = "sha256:d4efd397930c46415f62f8a31388d6be4f27a91d7550eb79bc64a756e0056547"}, |     {file = "execnet-1.7.1-py2.py3-none-any.whl", hash = "sha256:d4efd397930c46415f62f8a31388d6be4f27a91d7550eb79bc64a756e0056547"}, | ||||||
| @@ -770,14 +789,18 @@ importlib-metadata = [ | |||||||
|     {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, |     {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, | ||||||
|     {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, |     {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, | ||||||
| ] | ] | ||||||
|  | iniconfig = [ | ||||||
|  |     {file = "iniconfig-1.0.1-py3-none-any.whl", hash = "sha256:80cf40c597eb564e86346103f609d74efce0f6b4d4f30ec8ce9e2c26411ba437"}, | ||||||
|  |     {file = "iniconfig-1.0.1.tar.gz", hash = "sha256:e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69"}, | ||||||
|  | ] | ||||||
| iso8601 = [ | iso8601 = [ | ||||||
|     {file = "iso8601-0.1.12-py2.py3-none-any.whl", hash = "sha256:210e0134677cc0d02f6028087fee1df1e1d76d372ee1db0bf30bf66c5c1c89a3"}, |     {file = "iso8601-0.1.12-py2.py3-none-any.whl", hash = "sha256:210e0134677cc0d02f6028087fee1df1e1d76d372ee1db0bf30bf66c5c1c89a3"}, | ||||||
|     {file = "iso8601-0.1.12-py3-none-any.whl", hash = "sha256:bbbae5fb4a7abfe71d4688fd64bff70b91bbd74ef6a99d964bab18f7fdf286dd"}, |     {file = "iso8601-0.1.12-py3-none-any.whl", hash = "sha256:bbbae5fb4a7abfe71d4688fd64bff70b91bbd74ef6a99d964bab18f7fdf286dd"}, | ||||||
|     {file = "iso8601-0.1.12.tar.gz", hash = "sha256:49c4b20e1f38aa5cf109ddcd39647ac419f928512c869dc01d5c7098eddede82"}, |     {file = "iso8601-0.1.12.tar.gz", hash = "sha256:49c4b20e1f38aa5cf109ddcd39647ac419f928512c869dc01d5c7098eddede82"}, | ||||||
| ] | ] | ||||||
| isort = [ | isort = [ | ||||||
|     {file = "isort-5.1.3-py3-none-any.whl", hash = "sha256:001ab55382453892ddb6956f65c6331f610041eed7ddc9c6bdf7975cb504f66f"}, |     {file = "isort-5.3.2-py3-none-any.whl", hash = "sha256:5196bd2f5b23dc91215734b1c96c6d28390061d69860a948094c12635d6d64e6"}, | ||||||
|     {file = "isort-5.1.3.tar.gz", hash = "sha256:9be41d107294ddf25ef6af83979cb3dfa1b5752311b6d50611c8f8d321d4a4eb"}, |     {file = "isort-5.3.2.tar.gz", hash = "sha256:ba83762132a8661d3525f87a86549712fb7d8da79eeb452e01f327ada9e87920"}, | ||||||
| ] | ] | ||||||
| mccabe = [ | mccabe = [ | ||||||
|     {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, |     {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, | ||||||
| @@ -847,23 +870,27 @@ pyparsing = [ | |||||||
|     {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, |     {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, | ||||||
| ] | ] | ||||||
| pypika = [ | pypika = [ | ||||||
|     {file = "PyPika-0.37.16.tar.gz", hash = "sha256:42b86fc00d767fe8d4d3d82acb3b55f76b32c211cc5dff9337fc0fbfe3d121cb"}, |     {file = "PyPika-0.38.0.tar.gz", hash = "sha256:abf85d7fc3da6c4213125b58ca989a1eabfcc1e9b1f5fc3f524eba5cd7a25107"}, | ||||||
| ] | ] | ||||||
| pytest = [ | pytest = [ | ||||||
|     {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, |     {file = "pytest-6.0.1-py3-none-any.whl", hash = "sha256:8b6007800c53fdacd5a5c192203f4e531eb2a1540ad9c752e052ec0f7143dbad"}, | ||||||
|     {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, |     {file = "pytest-6.0.1.tar.gz", hash = "sha256:85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4"}, | ||||||
| ] | ] | ||||||
| pytest-asyncio = [ | pytest-asyncio = [ | ||||||
|     {file = "pytest-asyncio-0.14.0.tar.gz", hash = "sha256:9882c0c6b24429449f5f969a5158b528f39bde47dc32e85b9f0403965017e700"}, |     {file = "pytest-asyncio-0.14.0.tar.gz", hash = "sha256:9882c0c6b24429449f5f969a5158b528f39bde47dc32e85b9f0403965017e700"}, | ||||||
|     {file = "pytest_asyncio-0.14.0-py3-none-any.whl", hash = "sha256:2eae1e34f6c68fc0a9dc12d4bea190483843ff4708d24277c41568d6b6044f1d"}, |     {file = "pytest_asyncio-0.14.0-py3-none-any.whl", hash = "sha256:2eae1e34f6c68fc0a9dc12d4bea190483843ff4708d24277c41568d6b6044f1d"}, | ||||||
| ] | ] | ||||||
| pytest-forked = [ | pytest-forked = [ | ||||||
|     {file = "pytest-forked-1.2.0.tar.gz", hash = "sha256:65f96334863d9cbe53d21f73e8febc4dd61b8d1fdcac7b487d9af07a5d02a938"}, |     {file = "pytest-forked-1.3.0.tar.gz", hash = "sha256:6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca"}, | ||||||
|     {file = "pytest_forked-1.2.0-py2.py3-none-any.whl", hash = "sha256:42a438336731465c5bd76ab38e1645647ac55914a08b507efbabe8783a08aa6c"}, |     {file = "pytest_forked-1.3.0-py2.py3-none-any.whl", hash = "sha256:dc4147784048e70ef5d437951728825a131b81714b398d5d52f17c7c144d8815"}, | ||||||
|  | ] | ||||||
|  | pytest-mock = [ | ||||||
|  |     {file = "pytest-mock-3.2.0.tar.gz", hash = "sha256:7122d55505d5ed5a6f3df940ad174b3f606ecae5e9bc379569cdcbd4cd9d2b83"}, | ||||||
|  |     {file = "pytest_mock-3.2.0-py3-none-any.whl", hash = "sha256:5564c7cd2569b603f8451ec77928083054d8896046830ca763ed68f4112d17c7"}, | ||||||
| ] | ] | ||||||
| pytest-xdist = [ | pytest-xdist = [ | ||||||
|     {file = "pytest-xdist-1.33.0.tar.gz", hash = "sha256:833b902b16473162cc0572d5bd7b63f8b843df63a4ada9c8af1270d31db17607"}, |     {file = "pytest-xdist-1.34.0.tar.gz", hash = "sha256:340e8e83e2a4c0d861bdd8d05c5d7b7143f6eea0aba902997db15c2a86be04ee"}, | ||||||
|     {file = "pytest_xdist-1.33.0-py2.py3-none-any.whl", hash = "sha256:9149b4010240643a5e206fd0ece6f0a1cd5955dae014cf04610d359e22e22453"}, |     {file = "pytest_xdist-1.34.0-py2.py3-none-any.whl", hash = "sha256:ba5d10729372d65df3ac150872f9df5d2ed004a3b0d499cc0164aafedd8c7b66"}, | ||||||
| ] | ] | ||||||
| pyyaml = [ | pyyaml = [ | ||||||
|     {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, |     {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, | ||||||
| @@ -921,7 +948,7 @@ toml = [ | |||||||
|     {file = "toml-0.10.1.tar.gz", hash = "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f"}, |     {file = "toml-0.10.1.tar.gz", hash = "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f"}, | ||||||
| ] | ] | ||||||
| tortoise-orm = [ | tortoise-orm = [ | ||||||
|     {file = "tortoise-orm-0.16.13.tar.gz", hash = "sha256:5f6fa4430a570172cb49517a97d45338dbfb1a690ed707030467efd154e67855"}, |     {file = "tortoise-orm-0.16.14.tar.gz", hash = "sha256:d6ffd4f4cd46d469fa946ca5309768f381640b65d5f5c9e848fb9b50185febee"}, | ||||||
| ] | ] | ||||||
| typed-ast = [ | typed-ast = [ | ||||||
|     {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3"}, |     {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3"}, | ||||||
| @@ -951,10 +978,6 @@ typing-extensions = [ | |||||||
|     {file = "typing_extensions-3.7.4.2-py3-none-any.whl", hash = "sha256:6e95524d8a547a91e08f404ae485bbb71962de46967e1b71a0cb89af24e761c5"}, |     {file = "typing_extensions-3.7.4.2-py3-none-any.whl", hash = "sha256:6e95524d8a547a91e08f404ae485bbb71962de46967e1b71a0cb89af24e761c5"}, | ||||||
|     {file = "typing_extensions-3.7.4.2.tar.gz", hash = "sha256:79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962a1e6a1815969ae"}, |     {file = "typing_extensions-3.7.4.2.tar.gz", hash = "sha256:79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962a1e6a1815969ae"}, | ||||||
| ] | ] | ||||||
| wcwidth = [ |  | ||||||
|     {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, |  | ||||||
|     {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, |  | ||||||
| ] |  | ||||||
| zipp = [ | zipp = [ | ||||||
|     {file = "zipp-3.1.0-py3-none-any.whl", hash = "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b"}, |     {file = "zipp-3.1.0-py3-none-any.whl", hash = "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b"}, | ||||||
|     {file = "zipp-3.1.0.tar.gz", hash = "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"}, |     {file = "zipp-3.1.0.tar.gz", hash = "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"}, | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| [tool.poetry] | [tool.poetry] | ||||||
| name = "aerich" | name = "aerich" | ||||||
| version = "0.2.2" | version = "0.2.3" | ||||||
| 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" | ||||||
| @@ -12,7 +12,7 @@ keywords = ["migrate", "Tortoise-ORM", "mysql"] | |||||||
| packages = [ | packages = [ | ||||||
|     { include = "aerich" } |     { include = "aerich" } | ||||||
| ] | ] | ||||||
| include = ["CHANGELOG.rst", "LICENSE", "README.md"] | include = ["CHANGELOG.md", "LICENSE", "README.md"] | ||||||
|  |  | ||||||
| [tool.poetry.dependencies] | [tool.poetry.dependencies] | ||||||
| python = "^3.7" | python = "^3.7" | ||||||
| @@ -30,6 +30,7 @@ pytest = "*" | |||||||
| pytest-xdist = "*" | pytest-xdist = "*" | ||||||
| pytest-asyncio = "*" | pytest-asyncio = "*" | ||||||
| bandit = "*" | bandit = "*" | ||||||
|  | pytest-mock = "*" | ||||||
|  |  | ||||||
| [tool.poetry.extras] | [tool.poetry.extras] | ||||||
| dbdrivers = ["aiomysql", "asyncpg"] | dbdrivers = ["aiomysql", "asyncpg"] | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ class Status(IntEnum): | |||||||
|  |  | ||||||
|  |  | ||||||
| class User(Model): | class User(Model): | ||||||
|     username = fields.CharField(max_length=20,) |     username = fields.CharField(max_length=20) | ||||||
|     password = fields.CharField(max_length=200) |     password = fields.CharField(max_length=200) | ||||||
|     last_login = fields.DatetimeField(description="Last Login", default=datetime.datetime.now) |     last_login = fields.DatetimeField(description="Last Login", default=datetime.datetime.now) | ||||||
|     is_active = fields.BooleanField(default=True, description="Is Active") |     is_active = fields.BooleanField(default=True, description="Is Active") | ||||||
|   | |||||||
| @@ -146,6 +146,12 @@ def test_add_index(): | |||||||
|         assert ( |         assert ( | ||||||
|             index_u == "ALTER TABLE `category` ADD UNIQUE INDEX `uid_category_name_8b0cb9` (`name`)" |             index_u == "ALTER TABLE `category` ADD UNIQUE INDEX `uid_category_name_8b0cb9` (`name`)" | ||||||
|         ) |         ) | ||||||
|  |     elif isinstance(Migrate.ddl, PostgresDDL): | ||||||
|  |         assert index == 'CREATE INDEX "idx_category_name_8b0cb9" ON "category" ("name")' | ||||||
|  |         assert ( | ||||||
|  |             index_u | ||||||
|  |             == 'ALTER TABLE "category" ADD CONSTRAINT "uid_category_name_8b0cb9" UNIQUE ("name")' | ||||||
|  |         ) | ||||||
|     else: |     else: | ||||||
|         assert index == 'ALTER TABLE "category" ADD  INDEX "idx_category_name_8b0cb9" ("name")' |         assert index == 'ALTER TABLE "category" ADD  INDEX "idx_category_name_8b0cb9" ("name")' | ||||||
|         assert ( |         assert ( | ||||||
| @@ -155,10 +161,16 @@ def test_add_index(): | |||||||
|  |  | ||||||
| def test_drop_index(): | def test_drop_index(): | ||||||
|     ret = Migrate.ddl.drop_index(Category, ["name"]) |     ret = Migrate.ddl.drop_index(Category, ["name"]) | ||||||
|  |     ret_u = Migrate.ddl.drop_index(Category, ["name"], True) | ||||||
|     if isinstance(Migrate.ddl, MysqlDDL): |     if isinstance(Migrate.ddl, MysqlDDL): | ||||||
|         assert ret == "ALTER TABLE `category` DROP INDEX `idx_category_name_8b0cb9`" |         assert ret == "ALTER TABLE `category` DROP INDEX `idx_category_name_8b0cb9`" | ||||||
|  |         assert ret_u == "ALTER TABLE `category` DROP INDEX `uid_category_name_8b0cb9`" | ||||||
|  |     elif isinstance(Migrate.ddl, PostgresDDL): | ||||||
|  |         assert ret == 'DROP INDEX "idx_category_name_8b0cb9"' | ||||||
|  |         assert ret_u == 'ALTER TABLE "category" DROP CONSTRAINT "uid_category_name_8b0cb9"' | ||||||
|     else: |     else: | ||||||
|         assert ret == 'ALTER TABLE "category" DROP INDEX "idx_category_name_8b0cb9"' |         assert ret == 'ALTER TABLE "category" DROP INDEX "idx_category_name_8b0cb9"' | ||||||
|  |         assert ret_u == 'ALTER TABLE "category" DROP INDEX "uid_category_name_8b0cb9"' | ||||||
|  |  | ||||||
|  |  | ||||||
| def test_add_fk(): | def test_add_fk(): | ||||||
|   | |||||||
| @@ -1,6 +1,7 @@ | |||||||
| from tortoise import Tortoise | from tortoise import Tortoise | ||||||
|  |  | ||||||
| from aerich.ddl.mysql import MysqlDDL | from aerich.ddl.mysql import MysqlDDL | ||||||
|  | from aerich.ddl.postgres import PostgresDDL | ||||||
| from aerich.migrate import Migrate | from aerich.migrate import Migrate | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -19,6 +20,15 @@ def test_migrate(): | |||||||
|             "ALTER TABLE `category` DROP COLUMN `name`", |             "ALTER TABLE `category` DROP COLUMN `name`", | ||||||
|             "ALTER TABLE `user` DROP INDEX `uid_user_usernam_9987ab`", |             "ALTER TABLE `user` DROP INDEX `uid_user_usernam_9987ab`", | ||||||
|         ] |         ] | ||||||
|  |     elif isinstance(Migrate.ddl, PostgresDDL): | ||||||
|  |         assert Migrate.upgrade_operators == [ | ||||||
|  |             'ALTER TABLE "category" ADD "name" VARCHAR(200) NOT NULL', | ||||||
|  |             'ALTER TABLE "user" ADD CONSTRAINT "uid_user_usernam_9987ab" UNIQUE ("username")', | ||||||
|  |         ] | ||||||
|  |         assert Migrate.downgrade_operators == [ | ||||||
|  |             'ALTER TABLE "category" DROP COLUMN "name"', | ||||||
|  |             'ALTER TABLE "user" DROP CONSTRAINT "uid_user_usernam_9987ab"', | ||||||
|  |         ] | ||||||
|     else: |     else: | ||||||
|         assert Migrate.upgrade_operators == [ |         assert Migrate.upgrade_operators == [ | ||||||
|             'ALTER TABLE "category" ADD "name" VARCHAR(200) NOT NULL', |             'ALTER TABLE "category" ADD "name" VARCHAR(200) NOT NULL', | ||||||
| @@ -28,3 +38,24 @@ def test_migrate(): | |||||||
|             'ALTER TABLE "category" DROP COLUMN "name"', |             'ALTER TABLE "category" DROP COLUMN "name"', | ||||||
|             'ALTER TABLE "user" DROP INDEX "uid_user_usernam_9987ab"', |             'ALTER TABLE "user" DROP INDEX "uid_user_usernam_9987ab"', | ||||||
|         ] |         ] | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def test_sort_all_version_files(mocker): | ||||||
|  |     mocker.patch( | ||||||
|  |         "os.listdir", | ||||||
|  |         return_value=[ | ||||||
|  |             "1_datetime_update.json", | ||||||
|  |             "11_datetime_update.json", | ||||||
|  |             "10_datetime_update.json", | ||||||
|  |             "2_datetime_update.json", | ||||||
|  |         ], | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     Migrate.migrate_location = "." | ||||||
|  |  | ||||||
|  |     assert Migrate.get_all_version_files() == [ | ||||||
|  |         "1_datetime_update.json", | ||||||
|  |         "2_datetime_update.json", | ||||||
|  |         "10_datetime_update.json", | ||||||
|  |         "11_datetime_update.json", | ||||||
|  |     ] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user