sqlalchemy / sqlalchemy/alembic

Improve template logging and cookbook

Open
#681 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

While using alembic I came across two areas that I think could be improved:

  • in the template evn.py before setting the log config we should check if it's not already setup.
    I think that we can do it by checking if the root logger has an handler configured.
    This is useful if alembic is used programmatically, since it avoids resetting the program logging config.
    I guess that an option may comment may be enough for this, if the update in the template is too much
  • Add a cookbook recipe on how to add a non nullable column without a server default value

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

Start with the template env.py and inspect how logging is configured before the migration setup. Then review the cookbook structure and add a recipe covering a non-nullable column without a server default; done means both the logging guidance and cookbook example address the two requested cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlalchemy
Domain
database, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.