spiff-arena/spiffworkflow-backend/migrations/env.py

111 lines
3.2 KiB
Python
Raw Normal View History

import logging
from logging.config import fileConfig
2022-11-18 20:50:20 +00:00
from flask import current_app
Squashed 'spiffworkflow-backend/' changes from 55f5c8113..52fad891c 52fad891c update spiff 3e21b7e2e Support reporting on task data (#47) 915fde676 Merge pull request #43 from sartography/send_filters 5c4e633bb Searching for call activities seems to be working now. I had the clear_caches in the wrong place previously - fixing. fa4c8cfbf Pre-pr cleanup 59c71401d Get ./bin/pyl to pass 66e8ad455 Fix status not being a list 62da25810 Add flag to indicate if user filtered 5cb7dce9d It's good to clear out he cache, but we can't do that with correlation properties due to foreign key constraints that are built up over time. So we'll just leave bad messages and correlations in the database for now -- we aren't doing a lot with messages yet anyway. 55020ed38 Merge branch 'main' of github.com:sartography/spiff-arena into send_filters 3334c7f9d update spiff 93526b03e pyl w/ burnettk cullerton 073ffb2ad added development permission for test user w/ burnettk cullerton 53a3f4c97 added some permissions for tasks 7415710d5 fixed broken test w/ burnettk f648f3999 pyl w/ burnettk b7ee3d24b added some permissions to the process model show page w/ burnettk a77ee31b4 Merge pull request #39 from sartography/feature/call_activity_selection 324f58d3f need to filter on process here, or a DMN with the same name will obscure the BPMN. 4ed558470 use id_for_file_path when using the process model id as a path for windows and added some more permission stuff to the frontend w/ burnettk 5d06af147 Assure changes to process ids are updated in the cache on a file save, and remove old references that no longer exist. Still some work to do here. 320a9c41a Getting ./bin/pyl to pass 51f02b20c Send filters back to client 167021e23 filters to_dict ec68bcb24 Merge pull request #38 from sartography/feature/call_activity_selection 71b4f65b9 pyl 866c3699e Merge process_instance_list query filters with report filters (#37) ed9936bfe Fixing a bug in SpiffWorkflow (new version in poetry.lock) fixing a test 89c17b7aa Fixing a bug in SpiffWorkflow (new version in poetry.lock) Don't explode when back-filling process models and hitting and error Assure processes are executable when setting them as the default primary process. The SpecReferenceCache now uses a unique constraint across two fields. (requires a new db) 18f45e90f added permission service to frontend to allow checking for permissions w/ burnettk bd37cfefa added configuration nav item to help reduce nav items w/ burnettk 5fcc6fc87 fix mypy typing stuff. w/ jasquat 5008626b1 run_pyl a3dcae016 Merge remote-tracking branch 'origin/main' into feature/call_activity_selection 2df8dd32d A little quick code cleanup. 58b702fa6 Adding a very simple api endpoint that just returns a list of every process known to the system. a2a0ccac2 Assure that the list of cached Spec References includes all Process Instances and DMNs (even those that are not primary) 5dcdc225a fixed failing tests w/ burnettk c121361d7 more refactoring for process instance list w/ burnettk 9bfb0f9e8 refactored pagination table to allow prefixing page options w/ burnettk b03d531ab Mostly a name change from BpmnProcessIdLookup to SpecReferenceCache. I landed on this unfortunate name because: f7698c0ed use the same file path method in spec file service w/ burnettk 2482827c4 some fixes for windows and python 3.9 w/ burnettk 822c40525 merged in main and resolved pyl issues w/ burnettk 1cdf2af95 Merge remote-tracking branch 'origin/main' into feature/task_page 66b994efd added remaining task tables w/ burnettk b7b6a97df work in spiff is approved and merged, updating dependency 37d9f7cc6 pyl w/ burnettk d96aaa846 added message correlations to message instance list api call w/ burnettk 828e41c4d Adding a display name to the BPMN Process ID Lookup Table Removing (very nearly, except for script unit tests) all the XML Parsing we were doing, see related PR on SpiffWorkflow Moved the Custom Parser into its own file to solve some circular import issues 53d5a7b44 Merge branch 'main' into feature/call_activity_selection 5161fb6e7 Merge branch 'main' of github.com:sartography/spiff-arena into main a2a203e8c add a search button to the call activity to allow finding a process id through some sort of admin interface. 430c03a58 noop, testing pre-commit hook. git-subtree-dir: spiffworkflow-backend git-subtree-split: 52fad891c58132ec8b64f56ac814409bb9e4ea4f
2022-11-21 00:48:30 +00:00
from alembic import context
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config file for Python logging.
# This line sets up loggers basically.
fileConfig(config.config_file_name)
Squashed 'spiffworkflow-backend/' changes from 55f5c8113..52fad891c 52fad891c update spiff 3e21b7e2e Support reporting on task data (#47) 915fde676 Merge pull request #43 from sartography/send_filters 5c4e633bb Searching for call activities seems to be working now. I had the clear_caches in the wrong place previously - fixing. fa4c8cfbf Pre-pr cleanup 59c71401d Get ./bin/pyl to pass 66e8ad455 Fix status not being a list 62da25810 Add flag to indicate if user filtered 5cb7dce9d It's good to clear out he cache, but we can't do that with correlation properties due to foreign key constraints that are built up over time. So we'll just leave bad messages and correlations in the database for now -- we aren't doing a lot with messages yet anyway. 55020ed38 Merge branch 'main' of github.com:sartography/spiff-arena into send_filters 3334c7f9d update spiff 93526b03e pyl w/ burnettk cullerton 073ffb2ad added development permission for test user w/ burnettk cullerton 53a3f4c97 added some permissions for tasks 7415710d5 fixed broken test w/ burnettk f648f3999 pyl w/ burnettk b7ee3d24b added some permissions to the process model show page w/ burnettk a77ee31b4 Merge pull request #39 from sartography/feature/call_activity_selection 324f58d3f need to filter on process here, or a DMN with the same name will obscure the BPMN. 4ed558470 use id_for_file_path when using the process model id as a path for windows and added some more permission stuff to the frontend w/ burnettk 5d06af147 Assure changes to process ids are updated in the cache on a file save, and remove old references that no longer exist. Still some work to do here. 320a9c41a Getting ./bin/pyl to pass 51f02b20c Send filters back to client 167021e23 filters to_dict ec68bcb24 Merge pull request #38 from sartography/feature/call_activity_selection 71b4f65b9 pyl 866c3699e Merge process_instance_list query filters with report filters (#37) ed9936bfe Fixing a bug in SpiffWorkflow (new version in poetry.lock) fixing a test 89c17b7aa Fixing a bug in SpiffWorkflow (new version in poetry.lock) Don't explode when back-filling process models and hitting and error Assure processes are executable when setting them as the default primary process. The SpecReferenceCache now uses a unique constraint across two fields. (requires a new db) 18f45e90f added permission service to frontend to allow checking for permissions w/ burnettk bd37cfefa added configuration nav item to help reduce nav items w/ burnettk 5fcc6fc87 fix mypy typing stuff. w/ jasquat 5008626b1 run_pyl a3dcae016 Merge remote-tracking branch 'origin/main' into feature/call_activity_selection 2df8dd32d A little quick code cleanup. 58b702fa6 Adding a very simple api endpoint that just returns a list of every process known to the system. a2a0ccac2 Assure that the list of cached Spec References includes all Process Instances and DMNs (even those that are not primary) 5dcdc225a fixed failing tests w/ burnettk c121361d7 more refactoring for process instance list w/ burnettk 9bfb0f9e8 refactored pagination table to allow prefixing page options w/ burnettk b03d531ab Mostly a name change from BpmnProcessIdLookup to SpecReferenceCache. I landed on this unfortunate name because: f7698c0ed use the same file path method in spec file service w/ burnettk 2482827c4 some fixes for windows and python 3.9 w/ burnettk 822c40525 merged in main and resolved pyl issues w/ burnettk 1cdf2af95 Merge remote-tracking branch 'origin/main' into feature/task_page 66b994efd added remaining task tables w/ burnettk b7b6a97df work in spiff is approved and merged, updating dependency 37d9f7cc6 pyl w/ burnettk d96aaa846 added message correlations to message instance list api call w/ burnettk 828e41c4d Adding a display name to the BPMN Process ID Lookup Table Removing (very nearly, except for script unit tests) all the XML Parsing we were doing, see related PR on SpiffWorkflow Moved the Custom Parser into its own file to solve some circular import issues 53d5a7b44 Merge branch 'main' into feature/call_activity_selection 5161fb6e7 Merge branch 'main' of github.com:sartography/spiff-arena into main a2a203e8c add a search button to the call activity to allow finding a process id through some sort of admin interface. 430c03a58 noop, testing pre-commit hook. git-subtree-dir: spiffworkflow-backend git-subtree-split: 52fad891c58132ec8b64f56ac814409bb9e4ea4f
2022-11-21 00:48:30 +00:00
logger = logging.getLogger('alembic.env')
def get_engine():
try:
# this works with Flask-SQLAlchemy<3 and Alchemical
return current_app.extensions['migrate'].db.get_engine()
except TypeError:
# this works with Flask-SQLAlchemy>=3
return current_app.extensions['migrate'].db.engine
def get_engine_url():
try:
return get_engine().url.render_as_string(hide_password=False).replace(
'%', '%%')
except AttributeError:
return str(get_engine().url).replace('%', '%%')
# add your model's MetaData object here
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
config.set_main_option('sqlalchemy.url', get_engine_url())
target_db = current_app.extensions['migrate'].db
# other values from the config, defined by the needs of env.py,
# can be acquired:
# my_important_option = config.get_main_option("my_important_option")
# ... etc.
def get_metadata():
if hasattr(target_db, 'metadatas'):
return target_db.metadatas[None]
return target_db.metadata
def run_migrations_offline():
"""Run migrations in 'offline' mode.
This configures the context with just a URL
and not an Engine, though an Engine is acceptable
here as well. By skipping the Engine creation
we don't even need a DBAPI to be available.
Calls to context.execute() here emit the given string to the
script output.
"""
url = config.get_main_option("sqlalchemy.url")
Squashed 'spiffworkflow-backend/' changes from 55f5c8113..52fad891c 52fad891c update spiff 3e21b7e2e Support reporting on task data (#47) 915fde676 Merge pull request #43 from sartography/send_filters 5c4e633bb Searching for call activities seems to be working now. I had the clear_caches in the wrong place previously - fixing. fa4c8cfbf Pre-pr cleanup 59c71401d Get ./bin/pyl to pass 66e8ad455 Fix status not being a list 62da25810 Add flag to indicate if user filtered 5cb7dce9d It's good to clear out he cache, but we can't do that with correlation properties due to foreign key constraints that are built up over time. So we'll just leave bad messages and correlations in the database for now -- we aren't doing a lot with messages yet anyway. 55020ed38 Merge branch 'main' of github.com:sartography/spiff-arena into send_filters 3334c7f9d update spiff 93526b03e pyl w/ burnettk cullerton 073ffb2ad added development permission for test user w/ burnettk cullerton 53a3f4c97 added some permissions for tasks 7415710d5 fixed broken test w/ burnettk f648f3999 pyl w/ burnettk b7ee3d24b added some permissions to the process model show page w/ burnettk a77ee31b4 Merge pull request #39 from sartography/feature/call_activity_selection 324f58d3f need to filter on process here, or a DMN with the same name will obscure the BPMN. 4ed558470 use id_for_file_path when using the process model id as a path for windows and added some more permission stuff to the frontend w/ burnettk 5d06af147 Assure changes to process ids are updated in the cache on a file save, and remove old references that no longer exist. Still some work to do here. 320a9c41a Getting ./bin/pyl to pass 51f02b20c Send filters back to client 167021e23 filters to_dict ec68bcb24 Merge pull request #38 from sartography/feature/call_activity_selection 71b4f65b9 pyl 866c3699e Merge process_instance_list query filters with report filters (#37) ed9936bfe Fixing a bug in SpiffWorkflow (new version in poetry.lock) fixing a test 89c17b7aa Fixing a bug in SpiffWorkflow (new version in poetry.lock) Don't explode when back-filling process models and hitting and error Assure processes are executable when setting them as the default primary process. The SpecReferenceCache now uses a unique constraint across two fields. (requires a new db) 18f45e90f added permission service to frontend to allow checking for permissions w/ burnettk bd37cfefa added configuration nav item to help reduce nav items w/ burnettk 5fcc6fc87 fix mypy typing stuff. w/ jasquat 5008626b1 run_pyl a3dcae016 Merge remote-tracking branch 'origin/main' into feature/call_activity_selection 2df8dd32d A little quick code cleanup. 58b702fa6 Adding a very simple api endpoint that just returns a list of every process known to the system. a2a0ccac2 Assure that the list of cached Spec References includes all Process Instances and DMNs (even those that are not primary) 5dcdc225a fixed failing tests w/ burnettk c121361d7 more refactoring for process instance list w/ burnettk 9bfb0f9e8 refactored pagination table to allow prefixing page options w/ burnettk b03d531ab Mostly a name change from BpmnProcessIdLookup to SpecReferenceCache. I landed on this unfortunate name because: f7698c0ed use the same file path method in spec file service w/ burnettk 2482827c4 some fixes for windows and python 3.9 w/ burnettk 822c40525 merged in main and resolved pyl issues w/ burnettk 1cdf2af95 Merge remote-tracking branch 'origin/main' into feature/task_page 66b994efd added remaining task tables w/ burnettk b7b6a97df work in spiff is approved and merged, updating dependency 37d9f7cc6 pyl w/ burnettk d96aaa846 added message correlations to message instance list api call w/ burnettk 828e41c4d Adding a display name to the BPMN Process ID Lookup Table Removing (very nearly, except for script unit tests) all the XML Parsing we were doing, see related PR on SpiffWorkflow Moved the Custom Parser into its own file to solve some circular import issues 53d5a7b44 Merge branch 'main' into feature/call_activity_selection 5161fb6e7 Merge branch 'main' of github.com:sartography/spiff-arena into main a2a203e8c add a search button to the call activity to allow finding a process id through some sort of admin interface. 430c03a58 noop, testing pre-commit hook. git-subtree-dir: spiffworkflow-backend git-subtree-split: 52fad891c58132ec8b64f56ac814409bb9e4ea4f
2022-11-21 00:48:30 +00:00
context.configure(
url=url, target_metadata=get_metadata(), literal_binds=True
Squashed 'spiffworkflow-backend/' changes from 55f5c8113..52fad891c 52fad891c update spiff 3e21b7e2e Support reporting on task data (#47) 915fde676 Merge pull request #43 from sartography/send_filters 5c4e633bb Searching for call activities seems to be working now. I had the clear_caches in the wrong place previously - fixing. fa4c8cfbf Pre-pr cleanup 59c71401d Get ./bin/pyl to pass 66e8ad455 Fix status not being a list 62da25810 Add flag to indicate if user filtered 5cb7dce9d It's good to clear out he cache, but we can't do that with correlation properties due to foreign key constraints that are built up over time. So we'll just leave bad messages and correlations in the database for now -- we aren't doing a lot with messages yet anyway. 55020ed38 Merge branch 'main' of github.com:sartography/spiff-arena into send_filters 3334c7f9d update spiff 93526b03e pyl w/ burnettk cullerton 073ffb2ad added development permission for test user w/ burnettk cullerton 53a3f4c97 added some permissions for tasks 7415710d5 fixed broken test w/ burnettk f648f3999 pyl w/ burnettk b7ee3d24b added some permissions to the process model show page w/ burnettk a77ee31b4 Merge pull request #39 from sartography/feature/call_activity_selection 324f58d3f need to filter on process here, or a DMN with the same name will obscure the BPMN. 4ed558470 use id_for_file_path when using the process model id as a path for windows and added some more permission stuff to the frontend w/ burnettk 5d06af147 Assure changes to process ids are updated in the cache on a file save, and remove old references that no longer exist. Still some work to do here. 320a9c41a Getting ./bin/pyl to pass 51f02b20c Send filters back to client 167021e23 filters to_dict ec68bcb24 Merge pull request #38 from sartography/feature/call_activity_selection 71b4f65b9 pyl 866c3699e Merge process_instance_list query filters with report filters (#37) ed9936bfe Fixing a bug in SpiffWorkflow (new version in poetry.lock) fixing a test 89c17b7aa Fixing a bug in SpiffWorkflow (new version in poetry.lock) Don't explode when back-filling process models and hitting and error Assure processes are executable when setting them as the default primary process. The SpecReferenceCache now uses a unique constraint across two fields. (requires a new db) 18f45e90f added permission service to frontend to allow checking for permissions w/ burnettk bd37cfefa added configuration nav item to help reduce nav items w/ burnettk 5fcc6fc87 fix mypy typing stuff. w/ jasquat 5008626b1 run_pyl a3dcae016 Merge remote-tracking branch 'origin/main' into feature/call_activity_selection 2df8dd32d A little quick code cleanup. 58b702fa6 Adding a very simple api endpoint that just returns a list of every process known to the system. a2a0ccac2 Assure that the list of cached Spec References includes all Process Instances and DMNs (even those that are not primary) 5dcdc225a fixed failing tests w/ burnettk c121361d7 more refactoring for process instance list w/ burnettk 9bfb0f9e8 refactored pagination table to allow prefixing page options w/ burnettk b03d531ab Mostly a name change from BpmnProcessIdLookup to SpecReferenceCache. I landed on this unfortunate name because: f7698c0ed use the same file path method in spec file service w/ burnettk 2482827c4 some fixes for windows and python 3.9 w/ burnettk 822c40525 merged in main and resolved pyl issues w/ burnettk 1cdf2af95 Merge remote-tracking branch 'origin/main' into feature/task_page 66b994efd added remaining task tables w/ burnettk b7b6a97df work in spiff is approved and merged, updating dependency 37d9f7cc6 pyl w/ burnettk d96aaa846 added message correlations to message instance list api call w/ burnettk 828e41c4d Adding a display name to the BPMN Process ID Lookup Table Removing (very nearly, except for script unit tests) all the XML Parsing we were doing, see related PR on SpiffWorkflow Moved the Custom Parser into its own file to solve some circular import issues 53d5a7b44 Merge branch 'main' into feature/call_activity_selection 5161fb6e7 Merge branch 'main' of github.com:sartography/spiff-arena into main a2a203e8c add a search button to the call activity to allow finding a process id through some sort of admin interface. 430c03a58 noop, testing pre-commit hook. git-subtree-dir: spiffworkflow-backend git-subtree-split: 52fad891c58132ec8b64f56ac814409bb9e4ea4f
2022-11-21 00:48:30 +00:00
)
with context.begin_transaction():
context.run_migrations()
def run_migrations_online():
"""Run migrations in 'online' mode.
In this scenario we need to create an Engine
and associate a connection with the context.
"""
# this callback is used to prevent an auto-migration from being generated
# when there are no changes to the schema
# reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html
def process_revision_directives(context, revision, directives):
Squashed 'spiffworkflow-backend/' changes from 55f5c8113..52fad891c 52fad891c update spiff 3e21b7e2e Support reporting on task data (#47) 915fde676 Merge pull request #43 from sartography/send_filters 5c4e633bb Searching for call activities seems to be working now. I had the clear_caches in the wrong place previously - fixing. fa4c8cfbf Pre-pr cleanup 59c71401d Get ./bin/pyl to pass 66e8ad455 Fix status not being a list 62da25810 Add flag to indicate if user filtered 5cb7dce9d It's good to clear out he cache, but we can't do that with correlation properties due to foreign key constraints that are built up over time. So we'll just leave bad messages and correlations in the database for now -- we aren't doing a lot with messages yet anyway. 55020ed38 Merge branch 'main' of github.com:sartography/spiff-arena into send_filters 3334c7f9d update spiff 93526b03e pyl w/ burnettk cullerton 073ffb2ad added development permission for test user w/ burnettk cullerton 53a3f4c97 added some permissions for tasks 7415710d5 fixed broken test w/ burnettk f648f3999 pyl w/ burnettk b7ee3d24b added some permissions to the process model show page w/ burnettk a77ee31b4 Merge pull request #39 from sartography/feature/call_activity_selection 324f58d3f need to filter on process here, or a DMN with the same name will obscure the BPMN. 4ed558470 use id_for_file_path when using the process model id as a path for windows and added some more permission stuff to the frontend w/ burnettk 5d06af147 Assure changes to process ids are updated in the cache on a file save, and remove old references that no longer exist. Still some work to do here. 320a9c41a Getting ./bin/pyl to pass 51f02b20c Send filters back to client 167021e23 filters to_dict ec68bcb24 Merge pull request #38 from sartography/feature/call_activity_selection 71b4f65b9 pyl 866c3699e Merge process_instance_list query filters with report filters (#37) ed9936bfe Fixing a bug in SpiffWorkflow (new version in poetry.lock) fixing a test 89c17b7aa Fixing a bug in SpiffWorkflow (new version in poetry.lock) Don't explode when back-filling process models and hitting and error Assure processes are executable when setting them as the default primary process. The SpecReferenceCache now uses a unique constraint across two fields. (requires a new db) 18f45e90f added permission service to frontend to allow checking for permissions w/ burnettk bd37cfefa added configuration nav item to help reduce nav items w/ burnettk 5fcc6fc87 fix mypy typing stuff. w/ jasquat 5008626b1 run_pyl a3dcae016 Merge remote-tracking branch 'origin/main' into feature/call_activity_selection 2df8dd32d A little quick code cleanup. 58b702fa6 Adding a very simple api endpoint that just returns a list of every process known to the system. a2a0ccac2 Assure that the list of cached Spec References includes all Process Instances and DMNs (even those that are not primary) 5dcdc225a fixed failing tests w/ burnettk c121361d7 more refactoring for process instance list w/ burnettk 9bfb0f9e8 refactored pagination table to allow prefixing page options w/ burnettk b03d531ab Mostly a name change from BpmnProcessIdLookup to SpecReferenceCache. I landed on this unfortunate name because: f7698c0ed use the same file path method in spec file service w/ burnettk 2482827c4 some fixes for windows and python 3.9 w/ burnettk 822c40525 merged in main and resolved pyl issues w/ burnettk 1cdf2af95 Merge remote-tracking branch 'origin/main' into feature/task_page 66b994efd added remaining task tables w/ burnettk b7b6a97df work in spiff is approved and merged, updating dependency 37d9f7cc6 pyl w/ burnettk d96aaa846 added message correlations to message instance list api call w/ burnettk 828e41c4d Adding a display name to the BPMN Process ID Lookup Table Removing (very nearly, except for script unit tests) all the XML Parsing we were doing, see related PR on SpiffWorkflow Moved the Custom Parser into its own file to solve some circular import issues 53d5a7b44 Merge branch 'main' into feature/call_activity_selection 5161fb6e7 Merge branch 'main' of github.com:sartography/spiff-arena into main a2a203e8c add a search button to the call activity to allow finding a process id through some sort of admin interface. 430c03a58 noop, testing pre-commit hook. git-subtree-dir: spiffworkflow-backend git-subtree-split: 52fad891c58132ec8b64f56ac814409bb9e4ea4f
2022-11-21 00:48:30 +00:00
if getattr(config.cmd_opts, 'autogenerate', False):
script = directives[0]
if script.upgrade_ops.is_empty():
directives[:] = []
Squashed 'spiffworkflow-backend/' changes from 55f5c8113..52fad891c 52fad891c update spiff 3e21b7e2e Support reporting on task data (#47) 915fde676 Merge pull request #43 from sartography/send_filters 5c4e633bb Searching for call activities seems to be working now. I had the clear_caches in the wrong place previously - fixing. fa4c8cfbf Pre-pr cleanup 59c71401d Get ./bin/pyl to pass 66e8ad455 Fix status not being a list 62da25810 Add flag to indicate if user filtered 5cb7dce9d It's good to clear out he cache, but we can't do that with correlation properties due to foreign key constraints that are built up over time. So we'll just leave bad messages and correlations in the database for now -- we aren't doing a lot with messages yet anyway. 55020ed38 Merge branch 'main' of github.com:sartography/spiff-arena into send_filters 3334c7f9d update spiff 93526b03e pyl w/ burnettk cullerton 073ffb2ad added development permission for test user w/ burnettk cullerton 53a3f4c97 added some permissions for tasks 7415710d5 fixed broken test w/ burnettk f648f3999 pyl w/ burnettk b7ee3d24b added some permissions to the process model show page w/ burnettk a77ee31b4 Merge pull request #39 from sartography/feature/call_activity_selection 324f58d3f need to filter on process here, or a DMN with the same name will obscure the BPMN. 4ed558470 use id_for_file_path when using the process model id as a path for windows and added some more permission stuff to the frontend w/ burnettk 5d06af147 Assure changes to process ids are updated in the cache on a file save, and remove old references that no longer exist. Still some work to do here. 320a9c41a Getting ./bin/pyl to pass 51f02b20c Send filters back to client 167021e23 filters to_dict ec68bcb24 Merge pull request #38 from sartography/feature/call_activity_selection 71b4f65b9 pyl 866c3699e Merge process_instance_list query filters with report filters (#37) ed9936bfe Fixing a bug in SpiffWorkflow (new version in poetry.lock) fixing a test 89c17b7aa Fixing a bug in SpiffWorkflow (new version in poetry.lock) Don't explode when back-filling process models and hitting and error Assure processes are executable when setting them as the default primary process. The SpecReferenceCache now uses a unique constraint across two fields. (requires a new db) 18f45e90f added permission service to frontend to allow checking for permissions w/ burnettk bd37cfefa added configuration nav item to help reduce nav items w/ burnettk 5fcc6fc87 fix mypy typing stuff. w/ jasquat 5008626b1 run_pyl a3dcae016 Merge remote-tracking branch 'origin/main' into feature/call_activity_selection 2df8dd32d A little quick code cleanup. 58b702fa6 Adding a very simple api endpoint that just returns a list of every process known to the system. a2a0ccac2 Assure that the list of cached Spec References includes all Process Instances and DMNs (even those that are not primary) 5dcdc225a fixed failing tests w/ burnettk c121361d7 more refactoring for process instance list w/ burnettk 9bfb0f9e8 refactored pagination table to allow prefixing page options w/ burnettk b03d531ab Mostly a name change from BpmnProcessIdLookup to SpecReferenceCache. I landed on this unfortunate name because: f7698c0ed use the same file path method in spec file service w/ burnettk 2482827c4 some fixes for windows and python 3.9 w/ burnettk 822c40525 merged in main and resolved pyl issues w/ burnettk 1cdf2af95 Merge remote-tracking branch 'origin/main' into feature/task_page 66b994efd added remaining task tables w/ burnettk b7b6a97df work in spiff is approved and merged, updating dependency 37d9f7cc6 pyl w/ burnettk d96aaa846 added message correlations to message instance list api call w/ burnettk 828e41c4d Adding a display name to the BPMN Process ID Lookup Table Removing (very nearly, except for script unit tests) all the XML Parsing we were doing, see related PR on SpiffWorkflow Moved the Custom Parser into its own file to solve some circular import issues 53d5a7b44 Merge branch 'main' into feature/call_activity_selection 5161fb6e7 Merge branch 'main' of github.com:sartography/spiff-arena into main a2a203e8c add a search button to the call activity to allow finding a process id through some sort of admin interface. 430c03a58 noop, testing pre-commit hook. git-subtree-dir: spiffworkflow-backend git-subtree-split: 52fad891c58132ec8b64f56ac814409bb9e4ea4f
2022-11-21 00:48:30 +00:00
logger.info('No changes in schema detected.')
connectable = get_engine()
with connectable.connect() as connection:
context.configure(
connection=connection,
target_metadata=get_metadata(),
process_revision_directives=process_revision_directives,
Squashed 'spiffworkflow-backend/' changes from 55f5c8113..52fad891c 52fad891c update spiff 3e21b7e2e Support reporting on task data (#47) 915fde676 Merge pull request #43 from sartography/send_filters 5c4e633bb Searching for call activities seems to be working now. I had the clear_caches in the wrong place previously - fixing. fa4c8cfbf Pre-pr cleanup 59c71401d Get ./bin/pyl to pass 66e8ad455 Fix status not being a list 62da25810 Add flag to indicate if user filtered 5cb7dce9d It's good to clear out he cache, but we can't do that with correlation properties due to foreign key constraints that are built up over time. So we'll just leave bad messages and correlations in the database for now -- we aren't doing a lot with messages yet anyway. 55020ed38 Merge branch 'main' of github.com:sartography/spiff-arena into send_filters 3334c7f9d update spiff 93526b03e pyl w/ burnettk cullerton 073ffb2ad added development permission for test user w/ burnettk cullerton 53a3f4c97 added some permissions for tasks 7415710d5 fixed broken test w/ burnettk f648f3999 pyl w/ burnettk b7ee3d24b added some permissions to the process model show page w/ burnettk a77ee31b4 Merge pull request #39 from sartography/feature/call_activity_selection 324f58d3f need to filter on process here, or a DMN with the same name will obscure the BPMN. 4ed558470 use id_for_file_path when using the process model id as a path for windows and added some more permission stuff to the frontend w/ burnettk 5d06af147 Assure changes to process ids are updated in the cache on a file save, and remove old references that no longer exist. Still some work to do here. 320a9c41a Getting ./bin/pyl to pass 51f02b20c Send filters back to client 167021e23 filters to_dict ec68bcb24 Merge pull request #38 from sartography/feature/call_activity_selection 71b4f65b9 pyl 866c3699e Merge process_instance_list query filters with report filters (#37) ed9936bfe Fixing a bug in SpiffWorkflow (new version in poetry.lock) fixing a test 89c17b7aa Fixing a bug in SpiffWorkflow (new version in poetry.lock) Don't explode when back-filling process models and hitting and error Assure processes are executable when setting them as the default primary process. The SpecReferenceCache now uses a unique constraint across two fields. (requires a new db) 18f45e90f added permission service to frontend to allow checking for permissions w/ burnettk bd37cfefa added configuration nav item to help reduce nav items w/ burnettk 5fcc6fc87 fix mypy typing stuff. w/ jasquat 5008626b1 run_pyl a3dcae016 Merge remote-tracking branch 'origin/main' into feature/call_activity_selection 2df8dd32d A little quick code cleanup. 58b702fa6 Adding a very simple api endpoint that just returns a list of every process known to the system. a2a0ccac2 Assure that the list of cached Spec References includes all Process Instances and DMNs (even those that are not primary) 5dcdc225a fixed failing tests w/ burnettk c121361d7 more refactoring for process instance list w/ burnettk 9bfb0f9e8 refactored pagination table to allow prefixing page options w/ burnettk b03d531ab Mostly a name change from BpmnProcessIdLookup to SpecReferenceCache. I landed on this unfortunate name because: f7698c0ed use the same file path method in spec file service w/ burnettk 2482827c4 some fixes for windows and python 3.9 w/ burnettk 822c40525 merged in main and resolved pyl issues w/ burnettk 1cdf2af95 Merge remote-tracking branch 'origin/main' into feature/task_page 66b994efd added remaining task tables w/ burnettk b7b6a97df work in spiff is approved and merged, updating dependency 37d9f7cc6 pyl w/ burnettk d96aaa846 added message correlations to message instance list api call w/ burnettk 828e41c4d Adding a display name to the BPMN Process ID Lookup Table Removing (very nearly, except for script unit tests) all the XML Parsing we were doing, see related PR on SpiffWorkflow Moved the Custom Parser into its own file to solve some circular import issues 53d5a7b44 Merge branch 'main' into feature/call_activity_selection 5161fb6e7 Merge branch 'main' of github.com:sartography/spiff-arena into main a2a203e8c add a search button to the call activity to allow finding a process id through some sort of admin interface. 430c03a58 noop, testing pre-commit hook. git-subtree-dir: spiffworkflow-backend git-subtree-split: 52fad891c58132ec8b64f56ac814409bb9e4ea4f
2022-11-21 00:48:30 +00:00
**current_app.extensions['migrate'].configure_args
)
with context.begin_transaction():
context.run_migrations()
if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()