diff --git a/docs/models.md b/docs/models.md index b4ac905..be91d12 100644 --- a/docs/models.md +++ b/docs/models.md @@ -189,6 +189,8 @@ def run_migrations_offline(): literal_binds=True, dialect_opts={"paramstyle": "named"}, # if you use UUID field set also this param + # the prefix has to match sqlalchemy import name in alembic + # that can be set by sqlalchemy_module_prefix option (default 'sa.') user_module_prefix='sa.' ) @@ -210,6 +212,8 @@ def run_migrations_online(): connection=connection, target_metadata=target_metadata, # if you use UUID field set also this param + # the prefix has to match sqlalchemy import name in alembic + # that can be set by sqlalchemy_module_prefix option (default 'sa.') user_module_prefix='sa.' ) diff --git a/docs/releases.md b/docs/releases.md index 0bc4a00..f44d9d8 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -1,3 +1,8 @@ +# 0.5.5 + +* Fix for alembic autogenaration of migration `UUID` columns. It should just produce sqlalchemy `CHAR(32)` or `CHAR(36)` +* In order for this to work you have to set user_module_prefix='sa.' (must be equal to sqlalchemy_module_prefix option (default 'sa.')) + # 0.5.4 * Allow to pass `uuid_format` (allowed 'hex'(default) or 'string') to `UUID` field to change the format in which it's saved. diff --git a/ormar/__init__.py b/ormar/__init__.py index e2d78c8..73d614f 100644 --- a/ormar/__init__.py +++ b/ormar/__init__.py @@ -30,7 +30,7 @@ class UndefinedType: # pragma no cover Undefined = UndefinedType() -__version__ = "0.5.4" +__version__ = "0.5.5" __all__ = [ "Integer", "BigInteger",