database adapters: Missing migration + Wrong documentation + Access to instance complex #1396
Labels
annoying
breaking-changes
This PR causes breaking changes
bug(fix)
Something isn't working or address a specific issue or vulnerability
Priority: High
After critical issues are fixed, these should be dealt with before any further issues.
Milestone
1. Missing Migrations
CustomDatabaseAdapter
-->DatabaseAdapter
Skeleton.customDatabaseAdapter = X
-->Skeleton.database_adapters = [X]
DatabaseAdapter
's methods itself2. Incorrect documentation
Furthermore the docstrings are wrong, they describe a not existing
action
parameter, but notis_add
.3. Missing deprecation hook
While there's a backward-compatibility on the
SkeletonInstance
, there's is no backward compatibility onSkeleton
cls.4. How to access a specific
DatabaseAdapter
instance?In v3.6 an earlier we had one
customDatabaseAdapter
, so you could access it and its attributes directly:Not it's wrapped by a list.
Either I memorize the index and make sure that nobody changes the order:
or iterate and compare the type
Both ways are super unwieldy.
5. How should the the
DatabaseAdapter
know in which skeleton he is located?In v3.6 an earlier I could implement
__set_name__
and store the Skeleton cls in an attribute of my adapter and I knew in every method in the adapter to whichSkeleton
cls it belonged:Now this is no longer possible, since
__set_name__
is called on the list, but not on the adapter itselfThe text was updated successfully, but these errors were encountered: