diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb2137..f94f27f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ 1. Run `aerich init -t config.TORTOISE_ORM`. 2. Remove `aerich.ini`. - Remove `pydantic` dependency. (#198) +- `inspectdb` support `DATE`. (#215) ## 0.5 diff --git a/aerich/inspectdb.py b/aerich/inspectdb.py index b2eb3aa..d1a5246 100644 --- a/aerich/inspectdb.py +++ b/aerich/inspectdb.py @@ -16,6 +16,7 @@ class InspectDb: "TEXT": " {field} = fields.TextField({null}{default}{comment})", "DATETIME": " {field} = fields.DatetimeField({null}{default}{comment})", "FLOAT": " {field} = fields.FloatField({null}{default}{comment})", + "DATE": " {field} = fields.DateField({null}{default}{comment})", } def __init__(self, conn: BaseDBAsyncClient, tables: Optional[List[str]] = None):