ProjectFlask/Documentation/source/Plugin_Project_Flask.ProjectFlask.FlaskMigrateExtension.MigrateProjectExtension.html

changeset 37
1bd8d19a3aa7
child 61
fe1e8783a95f
equal deleted inserted replaced
36:548dea93941c 37:1bd8d19a3aa7
1 <!DOCTYPE html>
2 <html><head>
3 <title>Plugin_Project_Flask.ProjectFlask.FlaskMigrateExtension.MigrateProjectExtension</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body>
22 <a NAME="top" ID="top"></a>
23 <h1>Plugin_Project_Flask.ProjectFlask.FlaskMigrateExtension.MigrateProjectExtension</h1>
24
25 <p>
26 Module implementing the project support for flask-migrate.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36
37 <tr>
38 <td><a href="#MigrateProject">MigrateProject</a></td>
39 <td>Class implementing the flask-migrate project support.</td>
40 </tr>
41 </table>
42 <h3>Functions</h3>
43
44 <table>
45 <tr><td>None</td></tr>
46 </table>
47 <hr />
48 <hr />
49 <a NAME="MigrateProject" ID="MigrateProject"></a>
50 <h2>MigrateProject</h2>
51
52 <p>
53 Class implementing the flask-migrate project support.
54 </p>
55 <h3>Derived from</h3>
56 QObject
57 <h3>Class Attributes</h3>
58
59 <table>
60 <tr><td>None</td></tr>
61 </table>
62 <h3>Class Methods</h3>
63
64 <table>
65 <tr><td>None</td></tr>
66 </table>
67 <h3>Methods</h3>
68
69 <table>
70
71 <tr>
72 <td><a href="#MigrateProject.__init__">MigrateProject</a></td>
73 <td>Constructor</td>
74 </tr>
75 <tr>
76 <td><a href="#MigrateProject.__checkAvailability">__checkAvailability</a></td>
77 <td>Private slot to check the availability of the 'flask-babel' extension.</td>
78 </tr>
79 <tr>
80 <td><a href="#MigrateProject.__configureMigrate">__configureMigrate</a></td>
81 <td>Private slot to show a dialog to edit the migrate configuration.</td>
82 </tr>
83 <tr>
84 <td><a href="#MigrateProject.__createMigration">__createMigration</a></td>
85 <td>Private slot to create a new database migration.</td>
86 </tr>
87 <tr>
88 <td><a href="#MigrateProject.__ensureMigrateConfigured">__ensureMigrateConfigured</a></td>
89 <td>Private method to ensure, that flask-migrate has been configured.</td>
90 </tr>
91 <tr>
92 <td><a href="#MigrateProject.__flaskMigrateAvailable">__flaskMigrateAvailable</a></td>
93 <td>Private method to check, if the 'flask-babel' package is available.</td>
94 </tr>
95 <tr>
96 <td><a href="#MigrateProject.__initMigrations">__initMigrations</a></td>
97 <td>Private slot to initialize the database migration system.</td>
98 </tr>
99 <tr>
100 <td><a href="#MigrateProject.__installFlaskMigrate">__installFlaskMigrate</a></td>
101 <td>Private slot to install the flask-migrate extension into the configured environment.</td>
102 </tr>
103 <tr>
104 <td><a href="#MigrateProject.__migrationsDirectory">__migrationsDirectory</a></td>
105 <td>Private method to calculate the path of the configured migrations directory.</td>
106 </tr>
107 <tr>
108 <td><a href="#MigrateProject.__showMigrationsHistory">__showMigrationsHistory</a></td>
109 <td>Private slot to show the full migrations history.</td>
110 </tr>
111 <tr>
112 <td><a href="#MigrateProject.__showMigrationsSummary">__showMigrationsSummary</a></td>
113 <td>Private slot to show a migrations history summary.</td>
114 </tr>
115 <tr>
116 <td><a href="#MigrateProject.determineCapability">determineCapability</a></td>
117 <td>Public method to determine the availability of flask-migrate.</td>
118 </tr>
119 <tr>
120 <td><a href="#MigrateProject.downgradeDatabase">downgradeDatabase</a></td>
121 <td>Public slot to downgrade the database to the previous version.</td>
122 </tr>
123 <tr>
124 <td><a href="#MigrateProject.initActions">initActions</a></td>
125 <td>Public method to define the flask-migrate actions.</td>
126 </tr>
127 <tr>
128 <td><a href="#MigrateProject.initMenu">initMenu</a></td>
129 <td>Public method to initialize the flask-migrate menu.</td>
130 </tr>
131 <tr>
132 <td><a href="#MigrateProject.projectClosed">projectClosed</a></td>
133 <td>Public method to handle the closing of a project.</td>
134 </tr>
135 <tr>
136 <td><a href="#MigrateProject.upgradeDatabase">upgradeDatabase</a></td>
137 <td>Public slot to upgrade the database to the current migration.</td>
138 </tr>
139 </table>
140 <h3>Static Methods</h3>
141
142 <table>
143 <tr><td>None</td></tr>
144 </table>
145
146 <a NAME="MigrateProject.__init__" ID="MigrateProject.__init__"></a>
147 <h4>MigrateProject (Constructor)</h4>
148 <b>MigrateProject</b>(<i>plugin, project, parent=None</i>)
149
150 <p>
151 Constructor
152 </p>
153 <dl>
154
155 <dt><i>plugin</i> (ProjectFlaskPlugin)</dt>
156 <dd>
157 reference to the plugin object
158 </dd>
159 <dt><i>project</i> (Project)</dt>
160 <dd>
161 reference to the project object
162 </dd>
163 <dt><i>parent</i> (QObject)</dt>
164 <dd>
165 parent
166 </dd>
167 </dl>
168 <a NAME="MigrateProject.__checkAvailability" ID="MigrateProject.__checkAvailability"></a>
169 <h4>MigrateProject.__checkAvailability</h4>
170 <b>__checkAvailability</b>(<i></i>)
171
172 <p>
173 Private slot to check the availability of the 'flask-babel' extension.
174 </p>
175 <a NAME="MigrateProject.__configureMigrate" ID="MigrateProject.__configureMigrate"></a>
176 <h4>MigrateProject.__configureMigrate</h4>
177 <b>__configureMigrate</b>(<i></i>)
178
179 <p>
180 Private slot to show a dialog to edit the migrate configuration.
181 </p>
182 <a NAME="MigrateProject.__createMigration" ID="MigrateProject.__createMigration"></a>
183 <h4>MigrateProject.__createMigration</h4>
184 <b>__createMigration</b>(<i></i>)
185
186 <p>
187 Private slot to create a new database migration.
188 </p>
189 <a NAME="MigrateProject.__ensureMigrateConfigured" ID="MigrateProject.__ensureMigrateConfigured"></a>
190 <h4>MigrateProject.__ensureMigrateConfigured</h4>
191 <b>__ensureMigrateConfigured</b>(<i></i>)
192
193 <p>
194 Private method to ensure, that flask-migrate has been configured.
195 </p>
196 <a NAME="MigrateProject.__flaskMigrateAvailable" ID="MigrateProject.__flaskMigrateAvailable"></a>
197 <h4>MigrateProject.__flaskMigrateAvailable</h4>
198 <b>__flaskMigrateAvailable</b>(<i></i>)
199
200 <p>
201 Private method to check, if the 'flask-babel' package is available.
202 </p>
203 <dl>
204 <dt>Returns:</dt>
205 <dd>
206 flag indicating the availability of 'flask-babel'
207 </dd>
208 </dl>
209 <dl>
210 <dt>Return Type:</dt>
211 <dd>
212 bool
213 </dd>
214 </dl>
215 <a NAME="MigrateProject.__initMigrations" ID="MigrateProject.__initMigrations"></a>
216 <h4>MigrateProject.__initMigrations</h4>
217 <b>__initMigrations</b>(<i></i>)
218
219 <p>
220 Private slot to initialize the database migration system.
221 </p>
222 <a NAME="MigrateProject.__installFlaskMigrate" ID="MigrateProject.__installFlaskMigrate"></a>
223 <h4>MigrateProject.__installFlaskMigrate</h4>
224 <b>__installFlaskMigrate</b>(<i></i>)
225
226 <p>
227 Private slot to install the flask-migrate extension into the configured
228 environment.
229 </p>
230 <a NAME="MigrateProject.__migrationsDirectory" ID="MigrateProject.__migrationsDirectory"></a>
231 <h4>MigrateProject.__migrationsDirectory</h4>
232 <b>__migrationsDirectory</b>(<i>abspath=False</i>)
233
234 <p>
235 Private method to calculate the path of the configured migrations
236 directory.
237 </p>
238 <dl>
239
240 <dt><i>abspath</i> (bool)</dt>
241 <dd>
242 flag indicating to return an absolute path
243 </dd>
244 </dl>
245 <dl>
246 <dt>Returns:</dt>
247 <dd>
248 path of the migrations directory
249 </dd>
250 </dl>
251 <dl>
252 <dt>Return Type:</dt>
253 <dd>
254 str
255 </dd>
256 </dl>
257 <a NAME="MigrateProject.__showMigrationsHistory" ID="MigrateProject.__showMigrationsHistory"></a>
258 <h4>MigrateProject.__showMigrationsHistory</h4>
259 <b>__showMigrationsHistory</b>(<i></i>)
260
261 <p>
262 Private slot to show the full migrations history.
263 </p>
264 <a NAME="MigrateProject.__showMigrationsSummary" ID="MigrateProject.__showMigrationsSummary"></a>
265 <h4>MigrateProject.__showMigrationsSummary</h4>
266 <b>__showMigrationsSummary</b>(<i></i>)
267
268 <p>
269 Private slot to show a migrations history summary.
270 </p>
271 <a NAME="MigrateProject.determineCapability" ID="MigrateProject.determineCapability"></a>
272 <h4>MigrateProject.determineCapability</h4>
273 <b>determineCapability</b>(<i></i>)
274
275 <p>
276 Public method to determine the availability of flask-migrate.
277 </p>
278 <a NAME="MigrateProject.downgradeDatabase" ID="MigrateProject.downgradeDatabase"></a>
279 <h4>MigrateProject.downgradeDatabase</h4>
280 <b>downgradeDatabase</b>(<i>revision=None</i>)
281
282 <p>
283 Public slot to downgrade the database to the previous version.
284 </p>
285 <dl>
286
287 <dt><i>revision</i> (str)</dt>
288 <dd>
289 migration revision to downgrade to
290 </dd>
291 </dl>
292 <a NAME="MigrateProject.initActions" ID="MigrateProject.initActions"></a>
293 <h4>MigrateProject.initActions</h4>
294 <b>initActions</b>(<i></i>)
295
296 <p>
297 Public method to define the flask-migrate actions.
298 </p>
299 <a NAME="MigrateProject.initMenu" ID="MigrateProject.initMenu"></a>
300 <h4>MigrateProject.initMenu</h4>
301 <b>initMenu</b>(<i></i>)
302
303 <p>
304 Public method to initialize the flask-migrate menu.
305 </p>
306 <dl>
307 <dt>Returns:</dt>
308 <dd>
309 the menu generated
310 </dd>
311 </dl>
312 <dl>
313 <dt>Return Type:</dt>
314 <dd>
315 QMenu
316 </dd>
317 </dl>
318 <a NAME="MigrateProject.projectClosed" ID="MigrateProject.projectClosed"></a>
319 <h4>MigrateProject.projectClosed</h4>
320 <b>projectClosed</b>(<i></i>)
321
322 <p>
323 Public method to handle the closing of a project.
324 </p>
325 <a NAME="MigrateProject.upgradeDatabase" ID="MigrateProject.upgradeDatabase"></a>
326 <h4>MigrateProject.upgradeDatabase</h4>
327 <b>upgradeDatabase</b>(<i>revision=None</i>)
328
329 <p>
330 Public slot to upgrade the database to the current migration.
331 </p>
332 <dl>
333
334 <dt><i>revision</i> (str)</dt>
335 <dd>
336 migration revision to upgrade to
337 </dd>
338 </dl>
339 <div align="right"><a href="#top">Up</a></div>
340 <hr />
341 </body></html>

eric ide

mercurial