summaryrefslogtreecommitdiff
path: root/taskflow/persistence/backends/sqlalchemy/tables.py
Commit message (Collapse)AuthorAgeFilesLines
* Use custom JSONType columnsPavlo Shchelokovskyy2021-07-131-8/+27
| | | | | | | | | | | | | | | the JSONType from sqlalchemy_utils is quite brittle as it only does primitive json.dumps on values. This leads to various sorts of StorageFailure exceptions in taskflow when, for example, an unserializable exception bubbles up to the 'failure' field of AtomDetails. This patch sublclasses the JSONType from sqlalchemy_utils and overrides two of its methods that do (de)serialization to work via oslo.serialization functions. They deal with such occurencies much better, for example, by providing 'str' as a fallback default. Change-Id: I3b9e9498b155199a4e707006a0cf22cda0567c06 Related-Bug: #1935957
* Use the sqlalchemy-utils json type instead of our ownJoshua Harlow2015-09-091-23/+8
| | | | Change-Id: Ie01ea85e74f1daed6bfa5158c0faa476d06873ba
* Retain atom 'revert' result (or failure)Joshua Harlow2015-07-101-0/+2
| | | | | | | | | When a atom is reverted it can be useful to retain the result of that 'revert' method being called, so that it can be later analyzed (or used for various purposes) so adjust the storage, and actions to enable it to be stored. Change-Id: I38a9a5f3bf7550e924468bb4a86652cb8beb306c
* Rename logbook module -> models moduleJoshua Harlow2015-07-081-2/+2
| | | | | | | | | | | Since this module contains more than the logbook class and really is a our generic models that are used to hold the runtime structure it is more appropriate to place it under a models module and deprecate the usage of the old module by placing a warning there (so that when it is imported that warning is triggered). Change-Id: I79def5ee08f560d38f2c9dcefd0b33becc2a4d36
* Fix updated_at column of sqlalchemy tablesFredrik Bergroth2015-05-211-3/+3
| | | | | | | | The column updated_at does not update its value after the refactoring made in 687ec913790653f79badc8f5d656c86792e94271. Closes-Bug: #1457309 Change-Id: Iff45f386b5dc8efc3fe82ca3b1e961a0c23d7ac7
* Switch to non-namespaced module importsDavanum Srinivas2015-03-121-3/+3
| | | | Change-Id: I25686df6a05bf69a89b9b6be169db72eab89d32a
* Rework the sqlalchemy backendJoshua Harlow2015-02-101-0/+99
We can just simplify the usage of an sqlalchemy if we just use (we already have our own ORM like objects anyway) sqlalchemy core in the first place and have a very tiny layer that converts back and forth from our very limited object model that we use in our persistence layer. This change makes that adjustment, which makes it easier to read and understand the actions the sqlalchemy backend is doing when saving, reading and updating data, and avoids yet another layer that isn't useful for our purposes anyway. Change-Id: I911c509f65e7845aee86fed1622eaa56970741f2