Wed, 02 Dec 2020 20:04:05 +0100
Updated source docu.
<!DOCTYPE html> <html><head> <title>Plugin_Project_Flask.ProjectFlask.FlaskMigrateExtension.MigrateProjectExtension</title> <meta charset="UTF-8"> <style> body { background: #EDECE6; margin: 0em 1em 10em 1em; color: black; } h1 { color: white; background: #85774A; } h2 { color: white; background: #85774A; } h3 { color: white; background: #9D936E; } h4 { color: white; background: #9D936E; } a { color: #BA6D36; } </style> </head> <body> <a NAME="top" ID="top"></a> <h1>Plugin_Project_Flask.ProjectFlask.FlaskMigrateExtension.MigrateProjectExtension</h1> <p> Module implementing the project support for flask-migrate. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#MigrateProject">MigrateProject</a></td> <td>Class implementing the flask-migrate project support.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /> <hr /> <a NAME="MigrateProject" ID="MigrateProject"></a> <h2>MigrateProject</h2> <p> Class implementing the flask-migrate project support. </p> <h3>Derived from</h3> QObject <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#MigrateProject.__init__">MigrateProject</a></td> <td>Constructor</td> </tr> <tr> <td><a href="#MigrateProject.__checkAvailability">__checkAvailability</a></td> <td>Private slot to check the availability of the 'flask-babel' extension.</td> </tr> <tr> <td><a href="#MigrateProject.__configureMigrate">__configureMigrate</a></td> <td>Private slot to show a dialog to edit the migrate configuration.</td> </tr> <tr> <td><a href="#MigrateProject.__createMigration">__createMigration</a></td> <td>Private slot to create a new database migration.</td> </tr> <tr> <td><a href="#MigrateProject.__ensureMigrateConfigured">__ensureMigrateConfigured</a></td> <td>Private method to ensure, that flask-migrate has been configured.</td> </tr> <tr> <td><a href="#MigrateProject.__flaskMigrateAvailable">__flaskMigrateAvailable</a></td> <td>Private method to check, if the 'flask-babel' package is available.</td> </tr> <tr> <td><a href="#MigrateProject.__initMigrations">__initMigrations</a></td> <td>Private slot to initialize the database migration system.</td> </tr> <tr> <td><a href="#MigrateProject.__installFlaskMigrate">__installFlaskMigrate</a></td> <td>Private slot to install the flask-migrate extension into the configured environment.</td> </tr> <tr> <td><a href="#MigrateProject.__migrationsDirectory">__migrationsDirectory</a></td> <td>Private method to calculate the path of the configured migrations directory.</td> </tr> <tr> <td><a href="#MigrateProject.__showMigrationsHistory">__showMigrationsHistory</a></td> <td>Private slot to show the full migrations history.</td> </tr> <tr> <td><a href="#MigrateProject.__showMigrationsSummary">__showMigrationsSummary</a></td> <td>Private slot to show a migrations history summary.</td> </tr> <tr> <td><a href="#MigrateProject.determineCapability">determineCapability</a></td> <td>Public method to determine the availability of flask-migrate.</td> </tr> <tr> <td><a href="#MigrateProject.downgradeDatabase">downgradeDatabase</a></td> <td>Public slot to downgrade the database to the previous version.</td> </tr> <tr> <td><a href="#MigrateProject.initActions">initActions</a></td> <td>Public method to define the flask-migrate actions.</td> </tr> <tr> <td><a href="#MigrateProject.initMenu">initMenu</a></td> <td>Public method to initialize the flask-migrate menu.</td> </tr> <tr> <td><a href="#MigrateProject.projectClosed">projectClosed</a></td> <td>Public method to handle the closing of a project.</td> </tr> <tr> <td><a href="#MigrateProject.upgradeDatabase">upgradeDatabase</a></td> <td>Public slot to upgrade the database to the current migration.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="MigrateProject.__init__" ID="MigrateProject.__init__"></a> <h4>MigrateProject (Constructor)</h4> <b>MigrateProject</b>(<i>plugin, project, parent=None</i>) <p> Constructor </p> <dl> <dt><i>plugin</i> (ProjectFlaskPlugin)</dt> <dd> reference to the plugin object </dd> <dt><i>project</i> (Project)</dt> <dd> reference to the project object </dd> <dt><i>parent</i> (QObject)</dt> <dd> parent </dd> </dl> <a NAME="MigrateProject.__checkAvailability" ID="MigrateProject.__checkAvailability"></a> <h4>MigrateProject.__checkAvailability</h4> <b>__checkAvailability</b>(<i></i>) <p> Private slot to check the availability of the 'flask-babel' extension. </p> <a NAME="MigrateProject.__configureMigrate" ID="MigrateProject.__configureMigrate"></a> <h4>MigrateProject.__configureMigrate</h4> <b>__configureMigrate</b>(<i></i>) <p> Private slot to show a dialog to edit the migrate configuration. </p> <a NAME="MigrateProject.__createMigration" ID="MigrateProject.__createMigration"></a> <h4>MigrateProject.__createMigration</h4> <b>__createMigration</b>(<i></i>) <p> Private slot to create a new database migration. </p> <a NAME="MigrateProject.__ensureMigrateConfigured" ID="MigrateProject.__ensureMigrateConfigured"></a> <h4>MigrateProject.__ensureMigrateConfigured</h4> <b>__ensureMigrateConfigured</b>(<i></i>) <p> Private method to ensure, that flask-migrate has been configured. </p> <a NAME="MigrateProject.__flaskMigrateAvailable" ID="MigrateProject.__flaskMigrateAvailable"></a> <h4>MigrateProject.__flaskMigrateAvailable</h4> <b>__flaskMigrateAvailable</b>(<i></i>) <p> Private method to check, if the 'flask-babel' package is available. </p> <dl> <dt>Returns:</dt> <dd> flag indicating the availability of 'flask-babel' </dd> </dl> <dl> <dt>Return Type:</dt> <dd> bool </dd> </dl> <a NAME="MigrateProject.__initMigrations" ID="MigrateProject.__initMigrations"></a> <h4>MigrateProject.__initMigrations</h4> <b>__initMigrations</b>(<i></i>) <p> Private slot to initialize the database migration system. </p> <a NAME="MigrateProject.__installFlaskMigrate" ID="MigrateProject.__installFlaskMigrate"></a> <h4>MigrateProject.__installFlaskMigrate</h4> <b>__installFlaskMigrate</b>(<i></i>) <p> Private slot to install the flask-migrate extension into the configured environment. </p> <a NAME="MigrateProject.__migrationsDirectory" ID="MigrateProject.__migrationsDirectory"></a> <h4>MigrateProject.__migrationsDirectory</h4> <b>__migrationsDirectory</b>(<i>abspath=False</i>) <p> Private method to calculate the path of the configured migrations directory. </p> <dl> <dt><i>abspath</i> (bool)</dt> <dd> flag indicating to return an absolute path </dd> </dl> <dl> <dt>Returns:</dt> <dd> path of the migrations directory </dd> </dl> <dl> <dt>Return Type:</dt> <dd> str </dd> </dl> <a NAME="MigrateProject.__showMigrationsHistory" ID="MigrateProject.__showMigrationsHistory"></a> <h4>MigrateProject.__showMigrationsHistory</h4> <b>__showMigrationsHistory</b>(<i></i>) <p> Private slot to show the full migrations history. </p> <a NAME="MigrateProject.__showMigrationsSummary" ID="MigrateProject.__showMigrationsSummary"></a> <h4>MigrateProject.__showMigrationsSummary</h4> <b>__showMigrationsSummary</b>(<i></i>) <p> Private slot to show a migrations history summary. </p> <a NAME="MigrateProject.determineCapability" ID="MigrateProject.determineCapability"></a> <h4>MigrateProject.determineCapability</h4> <b>determineCapability</b>(<i></i>) <p> Public method to determine the availability of flask-migrate. </p> <a NAME="MigrateProject.downgradeDatabase" ID="MigrateProject.downgradeDatabase"></a> <h4>MigrateProject.downgradeDatabase</h4> <b>downgradeDatabase</b>(<i>revision=None</i>) <p> Public slot to downgrade the database to the previous version. </p> <dl> <dt><i>revision</i> (str)</dt> <dd> migration revision to downgrade to </dd> </dl> <a NAME="MigrateProject.initActions" ID="MigrateProject.initActions"></a> <h4>MigrateProject.initActions</h4> <b>initActions</b>(<i></i>) <p> Public method to define the flask-migrate actions. </p> <a NAME="MigrateProject.initMenu" ID="MigrateProject.initMenu"></a> <h4>MigrateProject.initMenu</h4> <b>initMenu</b>(<i></i>) <p> Public method to initialize the flask-migrate menu. </p> <dl> <dt>Returns:</dt> <dd> the menu generated </dd> </dl> <dl> <dt>Return Type:</dt> <dd> QMenu </dd> </dl> <a NAME="MigrateProject.projectClosed" ID="MigrateProject.projectClosed"></a> <h4>MigrateProject.projectClosed</h4> <b>projectClosed</b>(<i></i>) <p> Public method to handle the closing of a project. </p> <a NAME="MigrateProject.upgradeDatabase" ID="MigrateProject.upgradeDatabase"></a> <h4>MigrateProject.upgradeDatabase</h4> <b>upgradeDatabase</b>(<i>revision=None</i>) <p> Public slot to upgrade the database to the current migration. </p> <dl> <dt><i>revision</i> (str)</dt> <dd> migration revision to upgrade to </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>