sqlalchemy / sqlalchemy/alembic

Change the default `include_schemas` to be `"from_metadata"`

Open
#1,428 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.4k
Forks
375
PR merge metrics
No merged PRs in 30d

Description

I mean something the following:

  • False -> use only the default schema
  • True -> check all schemas
  • 'from_metadata' -> new default, behave as False if the metadata.schema is None or as True with a name filter to the schema specified in the metadata if the metadata.schema is defined?

I think this new default would do the correct thing in most cases, meaning that an user has to change the include_schemas only if having tables on multiple schemas at the same time

Originally posted by @CaselIT in https://github.com/sqlalchemy/alembic/discussions/1425#discussioncomment-8499832

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name implementation files or tests. Start by locating Alembic's handling and tests for the include_schemas option, then compare the existing False and True behavior with the proposed from_metadata cases; done means the default follows metadata.schema while explicit values retain their documented behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.