Die nachfolgenden Inhalte sind nur in englischer Sprache verfügbar.
This topic discusses the dependency API provided by the migration framework.
-
A migration packet can have dependencies that are evaluated during migration to determine wheter the packet should run or not
-
When the dependencies are not met, the packet is marked as pending
-
The
MinVersionandMaxVersiondependencies as well as theDBMSDependencywill mark a packet as unnecessary instead
-
Classes
BaseDependency
The base class.
-
All dependencies must subclass this class.
Methods
|
Function |
Parameters |
Return Value |
Description |
|---|---|---|---|
|
BaseDependency.__init__ |
|
|
Initializes the dependency |
|
BaseDependency.get_log_content |
|
|
Retrieves a list of all log statements in the buffer and clears it |
|
BaseDependency.log |
text: String |
|
Writes into the internal log buffer |
Properties
|
Property |
Getter |
Setter |
Description |
|---|---|---|---|
|
BaseDependency.is_met |
This property is abstract and must be implemented in a subclass. It must be returned if the condition of the dependency is satisfied |
DBMSDependency
Dependency on the type of database used.
Methods
|
Function |
Parameters |
Return Value |
Description |
|---|---|---|---|
|
DBMSDependency.__init__ |
expected_dbms: |
|
Initializes the dependency |
MaxVersionDependency
Dependency on database changeset
-
Will check whether the value in database changeset is greater or equal to the version this dependency was initialized with
Methods
|
Function |
Parameters |
Return Value |
Description |
|---|---|---|---|
|
MaxVersionDependency.__init__ |
version: Customizing version like |
|
Initializes the dependency |
MinVersionDependency
Dependency on database changeset
-
Will check whether the value in database changeset is less or equal to the version this dependency was initialized with
Methods
|
Function |
Parameters |
Return Value |
Description |
|---|---|---|---|
|
MinVersionDependency.__init__ |
version: Customizing version like |
|
Initializes the dependency |
PacketDependency
Methods
|
Function |
Parameters |
Return Value |
Description |
|---|---|---|---|
|
PacketDependency.__init__ |
packet_path: Python path
PacketState |
|
Initializes the dependency |