sqlalchemy / sqlalchemy/alembic

Support for Manual Migrations

Open
#517 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Migrated issue, originally created by Glen Fletcher

I'm not sure whether this is a problem with the documentation or the code. However I suspect its the documentation that is at fault.

The Documentation, only talks about automatic migration using change scripts, however this isn't always an suitable for a problem.

I would like to see a clearly defined may of manually altering a specific database, lets say I have a Database connection through SQLAlchemy, open on an interactive console. I then want to be able run commands like those used in the change scripts to alter the database. I can't find how to achieve this in the documentation. It should be possible since the framework is effectively doing that but it is designed to work from the migration environment rather than explaining how to open the connection from an interactive session, and setup the state so I can run the requited commands to alter the database.

Such functivity is important for plugin based projects where plugins may require extra columns or tables in the database, it this case there is no linear series of versions, as every instance of the application will have different plugins and therefore different database migrations.

Please update the documentation to cover such usage (and if necessary update the code to provide necessary support)

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 by reviewing the documentation for automatic migrations, change scripts, and the migration environment, then compare it with the SQLAlchemy interactive-console workflow described here. Define what manual database changes and migration state must be documented, and verify that the resulting guidance covers plugin-specific schemas without a linear migration history.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlalchemy
Domain
databases, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.