Compare commits
9 commits
Author | SHA1 | Date | |
---|---|---|---|
|
e20ef31ff7 | ||
|
39dc66df40 | ||
|
6baca8c6b1 | ||
|
bec16f4de2 | ||
|
77d1b58160 | ||
![]() |
94a554ebc9 | ||
![]() |
2a6dbfacd3 | ||
![]() |
7dd4eb587b | ||
![]() |
8e78cd3253 |
16
CHANGELOG.md
16
CHANGELOG.md
|
@ -5,6 +5,22 @@ 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/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.2.0 (2024-12-07)
|
||||
|
||||
### Feat
|
||||
|
||||
- convert all uuid fields from str to proper UUID
|
||||
|
||||
### Fix
|
||||
|
||||
- add `User.prevent_edit` to schema
|
||||
|
||||
## v0.1.1 (2024-08-27)
|
||||
|
||||
### Fix
|
||||
|
||||
- fix nullable flags for initial version tables
|
||||
|
||||
## v0.1.0 (2024-08-27)
|
||||
|
||||
### Feat
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
# Wutta-Continuum
|
||||
|
||||
SQLAlchemy-Continuum versioning for WuttJamaican
|
||||
SQLAlchemy-Continuum versioning for Wutta Framework
|
||||
|
||||
See docs at https://rattailproject.org/docs/wutta-continuum/
|
||||
|
|
|
@ -28,7 +28,7 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|||
|
||||
intersphinx_mapping = {
|
||||
'sqlalchemy-continuum': ('https://sqlalchemy-continuum.readthedocs.io/en/latest/', None),
|
||||
'wuttjamaican': ('https://rattailproject.org/docs/wuttjamaican/', None),
|
||||
'wuttjamaican': ('https://docs.wuttaproject.org/wuttjamaican/', None),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "Wutta-Continuum"
|
||||
version = "0.1.0"
|
||||
description = "SQLAlchemy-Continuum versioning for WuttJamaican"
|
||||
version = "0.2.0"
|
||||
description = "SQLAlchemy-Continuum versioning for Wutta Framework"
|
||||
readme = "README.md"
|
||||
authors = [{name = "Lance Edgar", email = "lance@edbob.org"}]
|
||||
authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}]
|
||||
license = {text = "GNU GPL v3+"}
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
|
@ -27,7 +27,7 @@ classifiers = [
|
|||
requires-python = ">= 3.8"
|
||||
dependencies = [
|
||||
"SQLAlchemy-Continuum",
|
||||
"WuttJamaican[db]",
|
||||
"WuttJamaican[db]>=0.17.0",
|
||||
]
|
||||
|
||||
|
||||
|
@ -47,6 +47,7 @@ wutta_continuum = "wutta_continuum.conf:WuttaContinuumConfigExtension"
|
|||
[project.urls]
|
||||
Homepage = "https://wuttaproject.org/"
|
||||
Repository = "https://forgejo.wuttaproject.org/wutta/wutta-continuum"
|
||||
Issues = "https://forgejo.wuttaproject.org/wutta/wutta-continuum/issues"
|
||||
Changelog = "https://forgejo.wuttaproject.org/wutta/wutta-continuum/src/branch/master/CHANGELOG.md"
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
################################################################################
|
||||
#
|
||||
# Wutta-Continuum -- SQLAlchemy Versioning for WuttJamaican
|
||||
# Wutta-Continuum -- SQLAlchemy Versioning for Wutta Framework
|
||||
# Copyright © 2024 Lance Edgar
|
||||
#
|
||||
# This file is part of Wutta Framework.
|
||||
|
@ -21,7 +21,7 @@
|
|||
#
|
||||
################################################################################
|
||||
"""
|
||||
Wutta-Continuum -- SQLAlchemy-Continuum versioning for WuttJamaican
|
||||
Wutta-Continuum -- SQLAlchemy-Continuum versioning for Wutta Framework
|
||||
"""
|
||||
|
||||
from ._version import __version__
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
################################################################################
|
||||
#
|
||||
# Wutta-Continuum -- SQLAlchemy Versioning for WuttJamaican
|
||||
# Wutta-Continuum -- SQLAlchemy Versioning for Wutta Framework
|
||||
# Copyright © 2024 Lance Edgar
|
||||
#
|
||||
# This file is part of Wutta Framework.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
################################################################################
|
||||
#
|
||||
# Wutta-Continuum -- SQLAlchemy Versioning for WuttJamaican
|
||||
# Wutta-Continuum -- SQLAlchemy Versioning for Wutta Framework
|
||||
# Copyright © 2024 Lance Edgar
|
||||
#
|
||||
# This file is part of Wutta Framework.
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
"""add user.prevent_edit
|
||||
|
||||
Revision ID: 0a5f8ac0cd06
|
||||
Revises: 71406251b8e7
|
||||
Create Date: 2024-11-24 17:39:57.415425
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '0a5f8ac0cd06'
|
||||
down_revision: Union[str, None] = '71406251b8e7'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
|
||||
# user
|
||||
op.add_column('user_version', sa.Column('prevent_edit', sa.Boolean(), autoincrement=False, nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
|
||||
# user
|
||||
op.drop_column('user_version', 'prevent_edit')
|
|
@ -9,6 +9,7 @@ from typing import Sequence, Union
|
|||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import wuttjamaican.db.util
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
|
@ -25,7 +26,7 @@ def upgrade() -> None:
|
|||
sa.Column('issued_at', sa.DateTime(), nullable=True),
|
||||
sa.Column('id', sa.BigInteger(), autoincrement=True, nullable=False),
|
||||
sa.Column('remote_addr', sa.String(length=50), nullable=True),
|
||||
sa.Column('user_id', sa.String(length=32), nullable=True),
|
||||
sa.Column('user_id', wuttjamaican.db.util.UUID(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['user.uuid'], name=op.f('fk_transaction_user_id_user')),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_transaction'))
|
||||
)
|
||||
|
@ -33,8 +34,8 @@ def upgrade() -> None:
|
|||
|
||||
# person
|
||||
op.create_table('person_version',
|
||||
sa.Column('uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
||||
sa.Column('full_name', sa.String(length=100), autoincrement=False, nullable=False),
|
||||
sa.Column('uuid', wuttjamaican.db.util.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('full_name', sa.String(length=100), autoincrement=False, nullable=True),
|
||||
sa.Column('first_name', sa.String(length=50), autoincrement=False, nullable=True),
|
||||
sa.Column('middle_name', sa.String(length=50), autoincrement=False, nullable=True),
|
||||
sa.Column('last_name', sa.String(length=50), autoincrement=False, nullable=True),
|
||||
|
@ -49,11 +50,11 @@ def upgrade() -> None:
|
|||
|
||||
# user
|
||||
op.create_table('user_version',
|
||||
sa.Column('uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
||||
sa.Column('username', sa.String(length=25), autoincrement=False, nullable=False),
|
||||
sa.Column('uuid', wuttjamaican.db.util.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('username', sa.String(length=25), autoincrement=False, nullable=True),
|
||||
sa.Column('password', sa.String(length=60), autoincrement=False, nullable=True),
|
||||
sa.Column('person_uuid', sa.String(length=32), autoincrement=False, nullable=True),
|
||||
sa.Column('active', sa.Boolean(), autoincrement=False, nullable=False),
|
||||
sa.Column('person_uuid', wuttjamaican.db.util.UUID(), autoincrement=False, nullable=True),
|
||||
sa.Column('active', sa.Boolean(), autoincrement=False, nullable=True),
|
||||
sa.Column('transaction_id', sa.BigInteger(), autoincrement=False, nullable=False),
|
||||
sa.Column('end_transaction_id', sa.BigInteger(), nullable=True),
|
||||
sa.Column('operation_type', sa.SmallInteger(), nullable=False),
|
||||
|
@ -65,8 +66,8 @@ def upgrade() -> None:
|
|||
|
||||
# role
|
||||
op.create_table('role_version',
|
||||
sa.Column('uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
||||
sa.Column('name', sa.String(length=100), autoincrement=False, nullable=False),
|
||||
sa.Column('uuid', wuttjamaican.db.util.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('name', sa.String(length=100), autoincrement=False, nullable=True),
|
||||
sa.Column('notes', sa.Text(), autoincrement=False, nullable=True),
|
||||
sa.Column('transaction_id', sa.BigInteger(), autoincrement=False, nullable=False),
|
||||
sa.Column('end_transaction_id', sa.BigInteger(), nullable=True),
|
||||
|
@ -79,9 +80,9 @@ def upgrade() -> None:
|
|||
|
||||
# user_x_role
|
||||
op.create_table('user_x_role_version',
|
||||
sa.Column('uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
||||
sa.Column('user_uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
||||
sa.Column('role_uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
||||
sa.Column('uuid', wuttjamaican.db.util.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('user_uuid', wuttjamaican.db.util.UUID(), autoincrement=False, nullable=True),
|
||||
sa.Column('role_uuid', wuttjamaican.db.util.UUID(), autoincrement=False, nullable=True),
|
||||
sa.Column('transaction_id', sa.BigInteger(), autoincrement=False, nullable=False),
|
||||
sa.Column('end_transaction_id', sa.BigInteger(), nullable=True),
|
||||
sa.Column('operation_type', sa.SmallInteger(), nullable=False),
|
||||
|
@ -93,7 +94,7 @@ def upgrade() -> None:
|
|||
|
||||
# permission
|
||||
op.create_table('permission_version',
|
||||
sa.Column('role_uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
||||
sa.Column('role_uuid', wuttjamaican.db.util.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('permission', sa.String(length=254), autoincrement=False, nullable=False),
|
||||
sa.Column('transaction_id', sa.BigInteger(), autoincrement=False, nullable=False),
|
||||
sa.Column('end_transaction_id', sa.BigInteger(), nullable=True),
|
||||
|
|
24
tasks.py
Normal file
24
tasks.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
"""
|
||||
Tasks for Wutta-Continuum
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from invoke import task
|
||||
|
||||
|
||||
@task
|
||||
def release(c, skip_tests=False):
|
||||
"""
|
||||
Release a new version of Wutta-Continuum
|
||||
"""
|
||||
if not skip_tests:
|
||||
c.run('pytest')
|
||||
|
||||
if os.path.exists('dist'):
|
||||
shutil.rmtree('dist')
|
||||
|
||||
c.run('python -m build --sdist')
|
||||
c.run('twine upload dist/*')
|
Loading…
Reference in a new issue