Multiple bugs with __tablename__ generation are fixed. Names will be
generated for models that define a primary key, but not for single-table
inheritance subclasses. Names will not override a declared_attr.
PrimaryKeyConstraint is detected. (#541)
Passing an existing declarative_base() as model_class to
SQLAlchemy.__init__ will use this as the base class instead of creating
one. This allows customizing the metaclass used to construct the base.
(#546)
The undocumented DeclarativeMeta internals that the extension uses for
binds and table name generation have been refactored to work as mixins.
Documentation is added about how to create a custom metaclass that does not
do table name generation. (#546)
Model and metaclass code has been moved to a new models module.
_BoundDeclarativeMeta is renamed to DefaultMeta; the old name will be
removed in 3.0. (#546)
Models have a default repr that shows the model name and primary key.
(#530)
Fixed a bug where using init_app would cause connectors to always use the
current_app rather than the app they were created for. This caused issues
when multiple apps were registered with the extension. (#547)
Hi!
A new version was just released of
Flask-SQLAlchemy
, so Doppins has upgraded your project's dependency ranges.Make sure that it doesn't break anything, and happy merging! :shipit:
Upgraded Flask-SQLAlchemy from
==2.2
to==2.3
Changelog:
Version 2.3.0
Install or upgrade
Install from PyPI with pip:
Changelog
__tablename__
generation are fixed. Names will be generated for models that define a primary key, but not for single-table inheritance subclasses. Names will not override adeclared_attr
.PrimaryKeyConstraint
is detected. (#541
)declarative_base()
asmodel_class
toSQLAlchemy.__init__
will use this as the base class instead of creating one. This allows customizing the metaclass used to construct the base. (#546
)DeclarativeMeta
internals that the extension uses for binds and table name generation have been refactored to work as mixins. Documentation is added about how to create a custom metaclass that does not do table name generation. (#546
)models
module._BoundDeclarativeMeta
is renamed toDefaultMeta
; the old name will be removed in 3.0. (#546
)repr
that shows the model name and primary key. (#530
)init_app
would cause connectors to always use thecurrent_app
rather than the app they were created for. This caused issues when multiple apps were registered with the extension. (#547
)