From 9f779fe60fd6a1f5bb9165164cf49c7c5d899a9b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 15 Jan 2025 11:01:09 -0600 Subject: [PATCH 1/2] fix: add latest schema columns on app startup, unless not supported this works around the issue where some CORE databases are too old (etc.) and are missing some schema columns. in such cases the config for "latest columns" should be disabled; otherwise we add them to schema on startup --- src/wutta_corepos/conf.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wutta_corepos/conf.py b/src/wutta_corepos/conf.py index ef4c917..77bb6cc 100644 --- a/src/wutta_corepos/conf.py +++ b/src/wutta_corepos/conf.py @@ -100,3 +100,9 @@ class WuttaCoreposConfigExtension(WuttaConfigExtension): config.core_office_arch_engines = engines config.core_office_arch_engine = engines.get('default') Session.configure(bind=config.core_office_arch_engine) + + # define some schema columns "late" unless not supported + if config.get_bool('corepos.db.office_op.use_latest_columns', + default=True, usedb=False): + from corepos.db.office_op.model import use_latest_columns + use_latest_columns() From ce145ed00f162417215b3d5c8198fbfe36ef3458 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 15 Jan 2025 11:02:28 -0600 Subject: [PATCH 2/2] =?UTF-8?q?bump:=20version=200.2.0=20=E2=86=92=200.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7feebeb..24f220b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to Wutta-COREPOS 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.1 (2025-01-15) + +### Fix + +- add latest schema columns on app startup, unless not supported + ## v0.2.0 (2025-01-13) ### Feat diff --git a/pyproject.toml b/pyproject.toml index 6f77e55..afb21c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "Wutta-COREPOS" -version = "0.2.0" +version = "0.2.1" description = "Wutta Framework integration for CORE-POS" readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}]