A set of tools which enhances ORMs written in Python with more features
Improvements:
Changes:
Bugfixes:
DB=all
environmental variabledefault
databasestring_firstchars
and string_lastchars
partition subtypes)NULL
, now if a column, that was used for partitioning, has NULL
value it will be inserted into a special partition with _null
postfix)default
attribute set to some valuedsn
partition option renamed to db
to cover more use casesDsnParseError
exception renamed to OptionValueError
to cover more use casesinteger
(thanks to Nikolay Yarovoy), string_firstchars
(thanks to Dmitry Brytkov) and string_lastchars
range partition subtypes, see docs for detailsrange
partition option renamed to constraint
to better suit new partition subtypespartition
command to apply new refactored triggers to the databasearchitect.uninstall
decorator wasn't able to restore modified model methods under Python 3architect.install
decorator which dynamically injects requested feature, e.g. partition, into a model under the architect
namespace, e.g. model.architect.partition
. No more mixins, inheritance and nested classes with settings that pollute model's namespace. More information is available in the docs
operation
feature which provide an abstraction layer to execute raw SQL statements which will work with any supported ORM, see docs
cannot import name string_literal
error with PonyORM and PyMySQL if pymysql.install_as_MySQLdb()
was used)autocommit cannot be used inside a transaction
error with Django if a model was used inside with transaction.atomic()
block)partition
command was unable to find module with models to partition)relation already exists
error when trying to insert data into non-existent partition simultaneously from several queries) (thanks to Daniel Kontsek)