sqlalchemy / sqlalchemy/alembic
Add support for temporal table migrations (`WITH SYSTEM VERSIONING`)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 375
- PR merge metrics
- No merged PRs in 30d
Description
Describe the use case
Upgrade/downgrade temporal tables once implemented here https://github.com/sqlalchemy/sqlalchemy/issues/4797
Databases / Backends / Drivers targeted
All, specifics for SQL Server
Additional context
Some code can be taken from here (needs to get removed from SQLA core) https://github.com/tgross35/sqlalchemy/compare/master...tgross35:review-1
def visit_add_system_versioning(self, create, **kw):
return (
"ALTER TABLE %s ADD SYSTEM VERSIONING"
% self.preparer.format_table(create.element)
)
def visit_drop_system_versioning(self, drop, **kw):
return (
"ALTER TABLE %s ADD SYSTEM VERSIONING"
% self.preparer.format_table(drop.element)
)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked SQLAlchemy issue 4797 and the referenced review-1 comparison for the existing temporal-table code. Determine the upgrade and downgrade operations needed for temporal tables, with SQL Server specifics, and verify that both migration directions are supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sql, sqlalchemy
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100