From 0fa0beacb465c61e792c97d530a0e8fdd7139256 Mon Sep 17 00:00:00 2001 From: jonathan vanasco Date: Mon, 27 Sep 2021 12:41:24 -0400 Subject: Add new sections regarding schemas and reflection * add a new section to reflection.rst `Schemas and Reflection`. * this contains some text from the ticket * migrate some text from `Specifying the Schema Name` to new section * migrate some text from PostgreSQL dialect to new section * target text is made more generic * cross-reference the postgres and new sections to one another, to avoid duplication of docs * update some docs 'meta' to 'metadata_obj' Fixes: #4387 Co-authored-by: Mike Bayer Change-Id: I2b08672753fb2575d30ada07ead77587468fdade --- lib/sqlalchemy/sql/schema.py | 4 ++-- lib/sqlalchemy/sql/type_api.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index 641e62be3..c8f26f906 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -4877,7 +4877,7 @@ class Computed(FetchedValue, SchemaItem): from sqlalchemy import Computed - Table('square', meta, + Table('square', metadata_obj, Column('side', Float, nullable=False), Column('area', Float, Computed('side * side')) ) @@ -4974,7 +4974,7 @@ class Identity(IdentityOptions, FetchedValue, SchemaItem): from sqlalchemy import Identity - Table('foo', meta, + Table('foo', metadata_obj, Column('id', Integer, Identity()) Column('description', Text), ) diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index f58851268..34f23fb0c 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -838,7 +838,7 @@ class UserDefinedType(util.with_metaclass(VisitableCheckKWArg, TypeEngine)): Once the type is made, it's immediately usable:: - table = Table('foo', meta, + table = Table('foo', metadata_obj, Column('id', Integer, primary_key=True), Column('data', MyType(16)) ) -- cgit v1.2.1