From: mike bayer Date: Sun, 22 Mar 2020 15:04:59 +0000 (+0000) Subject: Merge "Deprecate plain string in execute and introduce `exec_driver_sql`" X-Git-Tag: rel_1_4_0b1~452 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ff3e3f2e73e7f17c0a352dacf5c0ccfa2ef7be9;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Merge "Deprecate plain string in execute and introduce `exec_driver_sql`" --- 7ff3e3f2e73e7f17c0a352dacf5c0ccfa2ef7be9 diff --cc doc/build/core/metadata.rst index 3d219ec069,e4dcc071d7..c5865ae27d --- a/doc/build/core/metadata.rst +++ b/doc/build/core/metadata.rst @@@ -233,23 -233,25 +233,24 @@@ To enable the "check first for the tabl Altering Schemas through Migrations ----------------------------------- - While SQLAlchemy directly supports emitting CREATE and DROP statements for schema - constructs, the ability to alter those constructs, usually via the ALTER statement - as well as other database-specific constructs, is outside of the scope of SQLAlchemy - itself. While it's easy enough to emit ALTER statements and similar by hand, - such as by passing a string to :meth:`.Connection.execute` or by using the - :class:`.DDL` construct, it's a common practice to automate the maintenance of - database schemas in relation to application code using schema migration tools. + While SQLAlchemy directly supports emitting CREATE and DROP statements for + schema constructs, the ability to alter those constructs, usually via the ALTER + statement as well as other database-specific constructs, is outside of the + scope of SQLAlchemy itself. While it's easy enough to emit ALTER statements + and similar by hand, such as by passing a :func:`.text` construct to + :meth:`.Connection.execute` or by using the :class:`.DDL` construct, it's a + common practice to automate the maintenance of database schemas in relation to + application code using schema migration tools. -There are two major migration tools available for SQLAlchemy: - -* `Alembic `_ - Written by the author of SQLAlchemy, - Alembic features a highly customizable environment and a minimalistic usage pattern, - supporting such features as transactional DDL, automatic generation of "candidate" - migrations, an "offline" mode which generates SQL scripts, and support for branch - resolution. -* `SQLAlchemy-Migrate `_ - The original - migration tool for SQLAlchemy, SQLAlchemy-Migrate is still used by projects - such as Openstack, however is being superseded by Alembic. +The SQLAlchemy project offers the `Alembic `_ +migration tool for this purpose. Alembic features a highly customizable +environment and a minimalistic usage pattern, supporting such features as +transactional DDL, automatic generation of "candidate" migrations, an "offline" +mode which generates SQL scripts, and support for branch resolution. + +Alembic supersedes the `SQLAlchemy-Migrate +`_ project, which is the +original migration tool for SQLAlchemy and is now considered legacy. Specifying the Schema Name