Compare commits
2 commits
e7d6a10751
...
d95a230848
| Author | SHA1 | Date | |
|---|---|---|---|
| d95a230848 | |||
| 665a9684af |
3 changed files with 113 additions and 1 deletions
|
|
@ -5,6 +5,12 @@ All notable changes to Wutta-Continuum will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## v0.3.2 (2026-02-01)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- add compose indexes to version tables, per upstream changes
|
||||||
|
|
||||||
## v0.3.1 (2025-12-31)
|
## v0.3.1 (2025-12-31)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "Wutta-Continuum"
|
name = "Wutta-Continuum"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
description = "SQLAlchemy-Continuum versioning for Wutta Framework"
|
description = "SQLAlchemy-Continuum versioning for Wutta Framework"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}]
|
authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
"""add composite indexes per upstream changes
|
||||||
|
|
||||||
|
Revision ID: f51330d1fa4d
|
||||||
|
Revises: 46fb4711411d
|
||||||
|
Create Date: 2026-02-01 18:24:25.713961
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from typing import Sequence, Union
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
import wuttjamaican.db.util
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision: str = "f51330d1fa4d"
|
||||||
|
down_revision: Union[str, None] = "46fb4711411d"
|
||||||
|
branch_labels: Union[str, Sequence[str], None] = None
|
||||||
|
depends_on: Union[str, Sequence[str], None] = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade() -> None:
|
||||||
|
|
||||||
|
# *_version
|
||||||
|
op.create_index(
|
||||||
|
"ix_permission_version_pk_transaction_id",
|
||||||
|
"permission_version",
|
||||||
|
["role_uuid", "permission", sa.literal_column("transaction_id DESC")],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
op.create_index(
|
||||||
|
"ix_permission_version_pk_validity",
|
||||||
|
"permission_version",
|
||||||
|
["role_uuid", "permission", "transaction_id", "end_transaction_id"],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
op.create_index(
|
||||||
|
"ix_person_version_pk_transaction_id",
|
||||||
|
"person_version",
|
||||||
|
["uuid", sa.literal_column("transaction_id DESC")],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
op.create_index(
|
||||||
|
"ix_person_version_pk_validity",
|
||||||
|
"person_version",
|
||||||
|
["uuid", "transaction_id", "end_transaction_id"],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
op.create_index(
|
||||||
|
"ix_role_version_pk_transaction_id",
|
||||||
|
"role_version",
|
||||||
|
["uuid", sa.literal_column("transaction_id DESC")],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
op.create_index(
|
||||||
|
"ix_role_version_pk_validity",
|
||||||
|
"role_version",
|
||||||
|
["uuid", "transaction_id", "end_transaction_id"],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
op.create_index(
|
||||||
|
"ix_user_version_pk_transaction_id",
|
||||||
|
"user_version",
|
||||||
|
["uuid", sa.literal_column("transaction_id DESC")],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
op.create_index(
|
||||||
|
"ix_user_version_pk_validity",
|
||||||
|
"user_version",
|
||||||
|
["uuid", "transaction_id", "end_transaction_id"],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
op.create_index(
|
||||||
|
"ix_user_x_role_version_pk_transaction_id",
|
||||||
|
"user_x_role_version",
|
||||||
|
["uuid", sa.literal_column("transaction_id DESC")],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
op.create_index(
|
||||||
|
"ix_user_x_role_version_pk_validity",
|
||||||
|
"user_x_role_version",
|
||||||
|
["uuid", "transaction_id", "end_transaction_id"],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade() -> None:
|
||||||
|
|
||||||
|
# *_version
|
||||||
|
op.drop_index(
|
||||||
|
"ix_user_x_role_version_pk_validity", table_name="user_x_role_version"
|
||||||
|
)
|
||||||
|
op.drop_index(
|
||||||
|
"ix_user_x_role_version_pk_transaction_id", table_name="user_x_role_version"
|
||||||
|
)
|
||||||
|
op.drop_index("ix_user_version_pk_validity", table_name="user_version")
|
||||||
|
op.drop_index("ix_user_version_pk_transaction_id", table_name="user_version")
|
||||||
|
op.drop_index("ix_role_version_pk_validity", table_name="role_version")
|
||||||
|
op.drop_index("ix_role_version_pk_transaction_id", table_name="role_version")
|
||||||
|
op.drop_index("ix_person_version_pk_validity", table_name="person_version")
|
||||||
|
op.drop_index("ix_person_version_pk_transaction_id", table_name="person_version")
|
||||||
|
op.drop_index("ix_permission_version_pk_validity", table_name="permission_version")
|
||||||
|
op.drop_index(
|
||||||
|
"ix_permission_version_pk_transaction_id", table_name="permission_version"
|
||||||
|
)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue