Skip to content
Snippets Groups Projects
Commit 57065964 authored by Felix Chadwick-Smith's avatar Felix Chadwick-Smith
Browse files

changed Debug to False

parent c32fbc64
Branches
No related tags found
1 merge request!5Master
Showing
with 512 additions and 1 deletion
No preview for this file type
No preview for this file type
......@@ -82,4 +82,4 @@ if __name__ == '__main__':
with app.app_context():
db.create_all()
app.run(debug=True, host='0.0.0.0')
\ No newline at end of file
app.run(debug=False, host='0.0.0.0')
\ No newline at end of file
pip
The MIT License (MIT)
Copyright (c) 2013 Miguel Grinberg
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Metadata-Version: 2.1
Name: Flask-Migrate
Version: 4.0.5
Summary: SQLAlchemy database migrations for Flask applications using Alembic.
Home-page: https://github.com/miguelgrinberg/flask-migrate
Author: Miguel Grinberg
Author-email: miguel.grinberg@gmail.com
License: MIT
Project-URL: Bug Tracker, https://github.com/miguelgrinberg/flask-migrate/issues
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Flask >=0.9
Requires-Dist: Flask-SQLAlchemy >=1.0
Requires-Dist: alembic >=1.9.0
Flask-Migrate
=============
[![Build status](https://github.com/miguelgrinberg/flask-migrate/workflows/build/badge.svg)](https://github.com/miguelgrinberg/flask-migrate/actions)
Flask-Migrate is an extension that handles SQLAlchemy database migrations for Flask applications using Alembic. The database operations are provided as command-line arguments under the `flask db` command.
Installation
------------
Install Flask-Migrate with `pip`:
pip install Flask-Migrate
Example
-------
This is an example application that handles database migrations through Flask-Migrate:
```python
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///app.db'
db = SQLAlchemy(app)
migrate = Migrate(app, db)
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(128))
```
With the above application you can create the database or enable migrations if the database already exists with the following command:
$ flask db init
Note that the `FLASK_APP` environment variable must be set according to the Flask documentation for this command to work. This will add a `migrations` folder to your application. The contents of this folder need to be added to version control along with your other source files.
You can then generate an initial migration:
$ flask db migrate
The migration script needs to be reviewed and edited, as Alembic currently does not detect every change you make to your models. In particular, Alembic is currently unable to detect indexes. Once finalized, the migration script also needs to be added to version control.
Then you can apply the migration to the database:
$ flask db upgrade
Then each time the database models change repeat the `migrate` and `upgrade` commands.
To sync the database in another system just refresh the `migrations` folder from source control and run the `upgrade` command.
To see all the commands that are available run this command:
$ flask db --help
Resources
---------
- [Documentation](http://flask-migrate.readthedocs.io/en/latest/)
- [pypi](https://pypi.python.org/pypi/Flask-Migrate)
- [Change Log](https://github.com/miguelgrinberg/Flask-Migrate/blob/master/CHANGES.md)
Flask_Migrate-4.0.5.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
Flask_Migrate-4.0.5.dist-info/LICENSE,sha256=kfkXGlJQvKy3Y__6tAJ8ynIp1HQfeROXhL8jZU1d-DI,1082
Flask_Migrate-4.0.5.dist-info/METADATA,sha256=d-EcnhZa_vyVAph2u84OpGIteJaBmqLQxO5Rf6wUI7Y,3095
Flask_Migrate-4.0.5.dist-info/RECORD,,
Flask_Migrate-4.0.5.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
Flask_Migrate-4.0.5.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
Flask_Migrate-4.0.5.dist-info/top_level.txt,sha256=jLoPgiMG6oR4ugNteXn3IHskVVIyIXVStZOVq-AWLdU,14
flask_migrate/__init__.py,sha256=-JFdExGtr7UrwCpmjYvTfzFHqMjE7AmP0Rr3T53tBNU,10037
flask_migrate/__pycache__/__init__.cpython-311.pyc,,
flask_migrate/__pycache__/cli.cpython-311.pyc,,
flask_migrate/cli.py,sha256=H-N4NNS5HyEB61HpUADLU8pW3naejyDPgeEbzEqG5-w,10298
flask_migrate/templates/aioflask-multidb/README,sha256=Ek4cJqTaxneVjtkue--BXMlfpfp3MmJRjqoZvnSizww,43
flask_migrate/templates/aioflask-multidb/__pycache__/env.cpython-311.pyc,,
flask_migrate/templates/aioflask-multidb/alembic.ini.mako,sha256=SjYEmJKzz6K8QfuZWtLJAJWcCKOdRbfUhsVlpgv8ock,857
flask_migrate/templates/aioflask-multidb/env.py,sha256=UcjeqkAbyUjTkuQFmCFPG7QOvqhco8-uGp8QEbto0T8,6573
flask_migrate/templates/aioflask-multidb/script.py.mako,sha256=198VPxVEN3NZ3vHcRuCxSoI4XnOYirGWt01qkbPKoJw,1246
flask_migrate/templates/aioflask/README,sha256=KKqWGl4YC2RqdOdq-y6quTDW0b7D_UZNHuM8glM1L-c,44
flask_migrate/templates/aioflask/__pycache__/env.cpython-311.pyc,,
flask_migrate/templates/aioflask/alembic.ini.mako,sha256=SjYEmJKzz6K8QfuZWtLJAJWcCKOdRbfUhsVlpgv8ock,857
flask_migrate/templates/aioflask/env.py,sha256=m6ZtBhdpwuq89vVeLTWmNT-1NfJZqarC_hsquCdR9bw,3478
flask_migrate/templates/aioflask/script.py.mako,sha256=8_xgA-gm_OhehnO7CiIijWgnm00ZlszEHtIHrAYFJl0,494
flask_migrate/templates/flask-multidb/README,sha256=AfiP5foaV2odZxXxuUuSIS6YhkIpR7CsOo2mpuxwHdc,40
flask_migrate/templates/flask-multidb/__pycache__/env.cpython-311.pyc,,
flask_migrate/templates/flask-multidb/alembic.ini.mako,sha256=SjYEmJKzz6K8QfuZWtLJAJWcCKOdRbfUhsVlpgv8ock,857
flask_migrate/templates/flask-multidb/env.py,sha256=F44iqsAxLTVBN_zD8CMUkdE7Aub4niHMmo5wl9mY4Uw,6190
flask_migrate/templates/flask-multidb/script.py.mako,sha256=198VPxVEN3NZ3vHcRuCxSoI4XnOYirGWt01qkbPKoJw,1246
flask_migrate/templates/flask/README,sha256=JL0NrjOrscPcKgRmQh1R3hlv1_rohDot0TvpmdM27Jk,41
flask_migrate/templates/flask/__pycache__/env.cpython-311.pyc,,
flask_migrate/templates/flask/alembic.ini.mako,sha256=SjYEmJKzz6K8QfuZWtLJAJWcCKOdRbfUhsVlpgv8ock,857
flask_migrate/templates/flask/env.py,sha256=ibK1hsdOsOBzXNU2yQoAIza7f_EFzaVSWwON_NSpNzQ,3344
flask_migrate/templates/flask/script.py.mako,sha256=8_xgA-gm_OhehnO7CiIijWgnm00ZlszEHtIHrAYFJl0,494
Wheel-Version: 1.0
Generator: bdist_wheel (0.41.2)
Root-Is-Purelib: true
Tag: py3-none-any
flask_migrate
pip
Copyright 2006-2023 the Mako authors and contributors <see AUTHORS file>.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Metadata-Version: 2.1
Name: Mako
Version: 1.3.0
Summary: A super-fast templating language that borrows the best ideas from the existing templating languages.
Home-page: https://www.makotemplates.org/
Author: Mike Bayer
Author-email: mike@zzzcomputing.com
License: MIT
Project-URL: Documentation, https://docs.makotemplates.org
Project-URL: Issue Tracker, https://github.com/sqlalchemy/mako
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: MarkupSafe >=0.9.2
Provides-Extra: babel
Requires-Dist: Babel ; extra == 'babel'
Provides-Extra: lingua
Requires-Dist: lingua ; extra == 'lingua'
Provides-Extra: testing
Requires-Dist: pytest ; extra == 'testing'
=========================
Mako Templates for Python
=========================
Mako is a template library written in Python. It provides a familiar, non-XML
syntax which compiles into Python modules for maximum performance. Mako's
syntax and API borrows from the best ideas of many others, including Django
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
Python (i.e. Python Server Page) language, which refines the familiar ideas
of componentized layout and inheritance to produce one of the most
straightforward and flexible models available, while also maintaining close
ties to Python calling and scoping semantics.
Nutshell
========
::
<%inherit file="base.html"/>
<%
rows = [[v for v in range(0,10)] for row in range(0,10)]
%>
<table>
% for row in rows:
${makerow(row)}
% endfor
</table>
<%def name="makerow(row)">
<tr>
% for name in row:
<td>${name}</td>\
% endfor
</tr>
</%def>
Philosophy
===========
Python is a great scripting language. Don't reinvent the wheel...your templates can handle it !
Documentation
==============
See documentation for Mako at https://docs.makotemplates.org/en/latest/
License
========
Mako is licensed under an MIT-style license (see LICENSE).
Other incorporated projects may be licensed under different licenses.
All licenses allow for non-commercial and commercial use.
../../Scripts/mako-render.exe,sha256=ci7yA_2_jWVZk-66Ebgx8lxwUj8iNqHX1-jZYg8Sm9c,108409
Mako-1.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
Mako-1.3.0.dist-info/LICENSE,sha256=CjJuRI3SLyIN0weWZ33b3z3apkJ6l0T-qd6qUdnXT9k,1098
Mako-1.3.0.dist-info/METADATA,sha256=gFHrHTKQc9wK1f8a2KoWXWWA7HRWg_qKydnHpOOn268,2900
Mako-1.3.0.dist-info/RECORD,,
Mako-1.3.0.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
Mako-1.3.0.dist-info/entry_points.txt,sha256=LsKkUsOsJQYbJ2M72hZCm968wi5K8Ywb5uFxCuN8Obk,512
Mako-1.3.0.dist-info/top_level.txt,sha256=LItdH8cDPetpUu8rUyBG3DObS6h9Gcpr9j_WLj2S-R0,5
mako/__init__.py,sha256=gqzc5_SJeF8RrCRDx0wRjcNG0TM8M6COf3h88sRfGJA,242
mako/__pycache__/__init__.cpython-311.pyc,,
mako/__pycache__/_ast_util.cpython-311.pyc,,
mako/__pycache__/ast.cpython-311.pyc,,
mako/__pycache__/cache.cpython-311.pyc,,
mako/__pycache__/cmd.cpython-311.pyc,,
mako/__pycache__/codegen.cpython-311.pyc,,
mako/__pycache__/compat.cpython-311.pyc,,
mako/__pycache__/exceptions.cpython-311.pyc,,
mako/__pycache__/filters.cpython-311.pyc,,
mako/__pycache__/lexer.cpython-311.pyc,,
mako/__pycache__/lookup.cpython-311.pyc,,
mako/__pycache__/parsetree.cpython-311.pyc,,
mako/__pycache__/pygen.cpython-311.pyc,,
mako/__pycache__/pyparser.cpython-311.pyc,,
mako/__pycache__/runtime.cpython-311.pyc,,
mako/__pycache__/template.cpython-311.pyc,,
mako/__pycache__/util.cpython-311.pyc,,
mako/_ast_util.py,sha256=w-UTrb7VIVQvKvQvvPcg_gIlgJlnit2XEjlIm7JIrUM,20247
mako/ast.py,sha256=qsUPb0VJFqbxXtsBnAIjyKUJVmNV2GWM5X7PuB2No1U,6642
mako/cache.py,sha256=K4jECv4MyDyf6e-Y_NHpgNHmBBBfQglC6WQgJF5xtWA,7680
mako/cmd.py,sha256=UBIPOgOOhwJJsWBDnEENqtkRIUwgU5JdMb7q-fkabkk,2813
mako/codegen.py,sha256=yxvuOPoK4ojW_z2LNUyWGfxybVfrtNsP0L2pHPPvMZI,47307
mako/compat.py,sha256=fEdnnyNvf9pLe9nHT0kp1rPcf7W6XLN8wvBvw5P9zuc,1820
mako/exceptions.py,sha256=gzyhUpLgaCkRNW7pHosTswXYQ-Iamx_3p4Eg7-2ERfM,12530
mako/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
mako/ext/__pycache__/__init__.cpython-311.pyc,,
mako/ext/__pycache__/autohandler.cpython-311.pyc,,
mako/ext/__pycache__/babelplugin.cpython-311.pyc,,
mako/ext/__pycache__/beaker_cache.cpython-311.pyc,,
mako/ext/__pycache__/extract.cpython-311.pyc,,
mako/ext/__pycache__/linguaplugin.cpython-311.pyc,,
mako/ext/__pycache__/preprocessors.cpython-311.pyc,,
mako/ext/__pycache__/pygmentplugin.cpython-311.pyc,,
mako/ext/__pycache__/turbogears.cpython-311.pyc,,
mako/ext/autohandler.py,sha256=4AzItz08tNY3NX9SRcknXPAWmZSP4KJE2OgV2I3uIQs,1885
mako/ext/babelplugin.py,sha256=j11aT7ASthmej7Rwdh7Wx8gY7uuHEjVy1tDFks3uDmE,2091
mako/ext/beaker_cache.py,sha256=vBAq9cKkadcTZ0C_GOKfoy5d-1oa8HJ3d_OvuK_GCyc,2578
mako/ext/extract.py,sha256=emNVqQJNDMVWxpSmbIJWfiQpvBeyrlTb3vjf0LXLir0,4659
mako/ext/linguaplugin.py,sha256=vluF2V6eW0y3C_QVTiTVnRLAMheje7FiTlg3p2mU3Lc,1935
mako/ext/preprocessors.py,sha256=VdZ3-wW-5Bl1Gn7Ekzr7QBO_I7qToCLNOtmumUJh8TQ,576
mako/ext/pygmentplugin.py,sha256=T57_uHzGi4ULI_wBOdXCq_JtrRKkp498OqQwwoHNL68,4753
mako/ext/turbogears.py,sha256=34Q-pPPHvBTgbukcJ71YdxcEj0VY1vVeSS8HPCPS0tI,2141
mako/filters.py,sha256=4PLsUBegJHypYF0KVEMNku5nxK4jYZN1HQfqpNDMMec,4658
mako/lexer.py,sha256=gsrn8BHSk42K97RsCHy8xutdX2_HxpuvUDPnp85ogbA,15982
mako/lookup.py,sha256=ueXJ7bIVvAxJaiawkSkv7xbGLrePwHzHvEtDlty-1Fs,12428
mako/parsetree.py,sha256=eYCga2ONqrr_AJPTUtHg-LxBIiwSCZyh9Zs7tIZaOJo,19007
mako/pygen.py,sha256=jyMpoPpuR4_XWitv4KmQDzJSdH0-w_nIRORIRAillOM,10416
mako/pyparser.py,sha256=wpUtzfy0ssSs0gjh7VOIYZYQYZL5jODw4hvKID3Qbqg,7029
mako/runtime.py,sha256=ZsUEN22nX3d3dECQujF69mBKDQS6yVv2nvz_0eTvFGg,27804
mako/template.py,sha256=Jk45aBTC7JoeB3vFViJn3JZR6InA69oBuCE3Z2ZnkiM,23857
mako/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
mako/testing/__pycache__/__init__.cpython-311.pyc,,
mako/testing/__pycache__/_config.cpython-311.pyc,,
mako/testing/__pycache__/assertions.cpython-311.pyc,,
mako/testing/__pycache__/config.cpython-311.pyc,,
mako/testing/__pycache__/exclusions.cpython-311.pyc,,
mako/testing/__pycache__/fixtures.cpython-311.pyc,,
mako/testing/__pycache__/helpers.cpython-311.pyc,,
mako/testing/_config.py,sha256=k-qpnsnbXUoN-ykMN5BRpg84i1x0p6UsAddKQnrIytU,3566
mako/testing/assertions.py,sha256=pfbGl84QlW7QWGg3_lo3wP8XnBAVo9AjzNp2ajmn7FA,5161
mako/testing/config.py,sha256=wmYVZfzGvOK3mJUZpzmgO8-iIgvaCH41Woi4yDpxq6E,323
mako/testing/exclusions.py,sha256=_t6ADKdatk3f18tOfHV_ZY6u_ZwQsKphZ2MXJVSAOcI,1553
mako/testing/fixtures.py,sha256=nEp7wTusf7E0n3Q-BHJW2s_t1vx0KB9poadQ1BmIJzE,3044
mako/testing/helpers.py,sha256=kTaIg8OL1uvcuLptbRA_aJtGndIDDaxAzacYbv_Km1Q,1521
mako/util.py,sha256=a1o6otEPqbE7KeO-8YJXv5ifTIG-Iu_k1NkI4GKAm44,10638
Wheel-Version: 1.0
Generator: bdist_wheel (0.41.3)
Root-Is-Purelib: true
Tag: py3-none-any
[babel.extractors]
mako = mako.ext.babelplugin:extract [babel]
[console_scripts]
mako-render = mako.cmd:cmdline
[lingua.extractors]
mako = mako.ext.linguaplugin:LinguaMakoExtractor [lingua]
[pygments.lexers]
css+mako = mako.ext.pygmentplugin:MakoCssLexer
html+mako = mako.ext.pygmentplugin:MakoHtmlLexer
js+mako = mako.ext.pygmentplugin:MakoJavascriptLexer
mako = mako.ext.pygmentplugin:MakoLexer
xml+mako = mako.ext.pygmentplugin:MakoXmlLexer
[python.templating.engines]
mako = mako.ext.turbogears:TGPlugin
mako
pip
Copyright 2009-2023 Michael Bayer.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
Metadata-Version: 2.1
Name: alembic
Version: 1.13.1
Summary: A database migration tool for SQLAlchemy.
Home-page: https://alembic.sqlalchemy.org
Author: Mike Bayer
Author-email: mike_mp@zzzcomputing.com
License: MIT
Project-URL: Documentation, https://alembic.sqlalchemy.org/en/latest/
Project-URL: Changelog, https://alembic.sqlalchemy.org/en/latest/changelog.html
Project-URL: Source, https://github.com/sqlalchemy/alembic/
Project-URL: Issue Tracker, https://github.com/sqlalchemy/alembic/issues/
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Database :: Front-Ends
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: SQLAlchemy >=1.3.0
Requires-Dist: Mako
Requires-Dist: typing-extensions >=4
Requires-Dist: importlib-metadata ; python_version < "3.9"
Requires-Dist: importlib-resources ; python_version < "3.9"
Provides-Extra: tz
Requires-Dist: backports.zoneinfo ; (python_version < "3.9") and extra == 'tz'
Alembic is a database migrations tool written by the author
of `SQLAlchemy <http://www.sqlalchemy.org>`_. A migrations tool
offers the following functionality:
* Can emit ALTER statements to a database in order to change
the structure of tables and other constructs
* Provides a system whereby "migration scripts" may be constructed;
each script indicates a particular series of steps that can "upgrade" a
target database to a new version, and optionally a series of steps that can
"downgrade" similarly, doing the same steps in reverse.
* Allows the scripts to execute in some sequential manner.
The goals of Alembic are:
* Very open ended and transparent configuration and operation. A new
Alembic environment is generated from a set of templates which is selected
among a set of options when setup first occurs. The templates then deposit a
series of scripts that define fully how database connectivity is established
and how migration scripts are invoked; the migration scripts themselves are
generated from a template within that series of scripts. The scripts can
then be further customized to define exactly how databases will be
interacted with and what structure new migration files should take.
* Full support for transactional DDL. The default scripts ensure that all
migrations occur within a transaction - for those databases which support
this (Postgresql, Microsoft SQL Server), migrations can be tested with no
need to manually undo changes upon failure.
* Minimalist script construction. Basic operations like renaming
tables/columns, adding/removing columns, changing column attributes can be
performed through one line commands like alter_column(), rename_table(),
add_constraint(). There is no need to recreate full SQLAlchemy Table
structures for simple operations like these - the functions themselves
generate minimalist schema structures behind the scenes to achieve the given
DDL sequence.
* "auto generation" of migrations. While real world migrations are far more
complex than what can be automatically determined, Alembic can still
eliminate the initial grunt work in generating new migration directives
from an altered schema. The ``--autogenerate`` feature will inspect the
current status of a database using SQLAlchemy's schema inspection
capabilities, compare it to the current state of the database model as
specified in Python, and generate a series of "candidate" migrations,
rendering them into a new migration script as Python directives. The
developer then edits the new file, adding additional directives and data
migrations as needed, to produce a finished migration. Table and column
level changes can be detected, with constraints and indexes to follow as
well.
* Full support for migrations generated as SQL scripts. Those of us who
work in corporate environments know that direct access to DDL commands on a
production database is a rare privilege, and DBAs want textual SQL scripts.
Alembic's usage model and commands are oriented towards being able to run a
series of migrations into a textual output file as easily as it runs them
directly to a database. Care must be taken in this mode to not invoke other
operations that rely upon in-memory SELECTs of rows - Alembic tries to
provide helper constructs like bulk_insert() to help with data-oriented
operations that are compatible with script-based DDL.
* Non-linear, dependency-graph versioning. Scripts are given UUID
identifiers similarly to a DVCS, and the linkage of one script to the next
is achieved via human-editable markers within the scripts themselves.
The structure of a set of migration files is considered as a
directed-acyclic graph, meaning any migration file can be dependent
on any other arbitrary set of migration files, or none at
all. Through this open-ended system, migration files can be organized
into branches, multiple roots, and mergepoints, without restriction.
Commands are provided to produce new branches, roots, and merges of
branches automatically.
* Provide a library of ALTER constructs that can be used by any SQLAlchemy
application. The DDL constructs build upon SQLAlchemy's own DDLElement base
and can be used standalone by any application or script.
* At long last, bring SQLite and its inability to ALTER things into the fold,
but in such a way that SQLite's very special workflow needs are accommodated
in an explicit way that makes the most of a bad situation, through the
concept of a "batch" migration, where multiple changes to a table can
be batched together to form a series of instructions for a single, subsequent
"move-and-copy" workflow. You can even use "move-and-copy" workflow for
other databases, if you want to recreate a table in the background
on a busy system.
Documentation and status of Alembic is at https://alembic.sqlalchemy.org/
The SQLAlchemy Project
======================
Alembic is part of the `SQLAlchemy Project <https://www.sqlalchemy.org>`_ and
adheres to the same standards and conventions as the core project.
Development / Bug reporting / Pull requests
___________________________________________
Please refer to the
`SQLAlchemy Community Guide <https://www.sqlalchemy.org/develop.html>`_ for
guidelines on coding and participating in this project.
Code of Conduct
_______________
Above all, SQLAlchemy places great emphasis on polite, thoughtful, and
constructive communication between users and developers.
Please see our current Code of Conduct at
`Code of Conduct <https://www.sqlalchemy.org/codeofconduct.html>`_.
License
=======
Alembic is distributed under the `MIT license
<https://opensource.org/licenses/MIT>`_.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment