18ba7feca1
feat(db): update docstrings
2023-12-12 13:35:46 +11:00
55b0c7cdc9
feat(db): tidy migration_2
2023-12-12 13:30:29 +11:00
713a83e7da
Merge branch 'main' into install/release-tools
2023-12-11 21:20:51 -05:00
f3a97e06ec
add the tag_release.sh script
2023-12-11 21:11:37 -05:00
50815d36c6
feat(db): add tests for migration dependencies
2023-12-12 13:09:24 +11:00
a69f518c76
feat(db): tidy dependencies for migrations
2023-12-12 13:09:09 +11:00
18093c4f1d
split installer zipfile script from tagging script; add make commands
2023-12-11 21:08:03 -05:00
0cf7fe43af
feat(db): refactor migrate callbacks to use dependencies, remote pre/post callbacks
2023-12-12 12:35:42 +11:00
6063760ce2
feat(db): tweak docstring
2023-12-12 11:13:40 +11:00
c5ba4f2ea5
feat(db): remove file backups
...
Instead of mucking about with the filesystem, we rely on SQLite transactions to handle failed migrations.
2023-12-12 11:12:46 +11:00
3414437eea
feat(db): instantiate SqliteMigrator with a SqliteDatabase
...
Simplifies a couple things:
- Init is more straightforward
- It's clear in the migrator that the connection we are working with is related to the SqliteDatabase
2023-12-12 10:46:08 +11:00
417db71471
feat(db): decouple SqliteDatabase from config object
...
- Simplify init args to path (None means use memory), logger, and verbose
- Add docstrings to SqliteDatabase (it had almost none)
- Update all usages of the class
2023-12-12 10:30:37 +11:00
afe4e55bf9
feat(db): simplify migration registration validation
...
With the previous change to assert that the to_version == from_version + 1, this validation can be simpler.
2023-12-12 09:52:03 +11:00
55acc16b2d
feat(db): require migration versions to be consecutive
2023-12-12 09:43:09 +11:00
535ce10e99
Merge branch 'main' into tiled-upscaling-graph
2023-12-11 14:40:55 -05:00
11f4a48144
Add container GID
2023-12-11 14:30:40 -05:00
67ed4a0245
Respect CONTAINER_UID in Dockerfile chown
...
CONTAINER_UID is used for the user ID within the container, however I noticed the UID was hard coded to 1000 in the Dockerfile chown -R command.
This leaves the default as 1000, but allows it to be overrriden by setting CONTAINER_UID.
2023-12-11 14:30:40 -05:00
fbbc1037cd
missed a rename of overlap to overlap_fraction in test for even_spilt
2023-12-11 17:23:28 +00:00
0852fd4e88
Updated tests for even_split overlap renamed to overlap_fraction
2023-12-11 17:17:29 +00:00
c84526fae5
Fixed Tests that where using round_to_8 and removed redundant tests
2023-12-11 17:05:45 +00:00
f762940335
Merge branch 'main' into tiled-upscaling-graph
2023-12-11 16:57:36 +00:00
fefb78795f
- Even_spilt overlap renamed to overlap_fraction
...
- min_overlap removed * restrictions and round_to_8
- min_overlap handles tile size > image size by clipping the num tiles to 1.
- Updated assert test on min_overlap.
2023-12-11 16:55:27 +00:00
ef8284f009
fix(db): fix tests
2023-12-11 16:41:47 +11:00
290851016e
feat(db): move sqlite_migrator into its own module
2023-12-11 16:41:30 +11:00
fa7d002175
fix(tests): fix typing issues
2023-12-11 16:22:29 +11:00
f1b6f78319
fix(db): fix windows db migrator tests
...
- Ensure db files are closed before manipulating them
- Use contextlib.closing() so that sqlite connections are closed on existing the context
2023-12-11 16:14:25 +11:00
26ab917021
fix(tests): add sqlite migrator to test fixtures
2023-12-11 16:14:25 +11:00
4f3c32a2ee
fix(db): remove errant print stmts
2023-12-11 16:14:25 +11:00
77065b1ce1
feat(db): update test for migration chain for missing from 0
2023-12-11 16:14:25 +11:00
41db92b9e8
feat(db): add check for missing migration from 0
2023-12-11 16:14:25 +11:00
c823f5667b
feat(db): update sqlite migrator tests
2023-12-11 16:14:25 +11:00
3227b30430
feat(db): extract non-stateful logic to class methods
2023-12-11 16:14:25 +11:00
567f107a81
feat(db): return backup_db_path, move log stmt to run_migrations
2023-12-11 16:14:25 +11:00
b3d5955bc7
fix(db): rename Migrator._migrations -> _migration_set
2023-12-11 16:14:25 +11:00
8726b203d4
fix(db): fix migration chain validation
2023-12-11 16:14:25 +11:00
b3f92e0547
fix(db): fix docstring
2023-12-11 16:14:25 +11:00
72c9a7663f
fix(db): add docstring
2023-12-11 16:14:25 +11:00
fcb9e89bd7
feat(db): tidy db naming utils
2023-12-11 16:14:25 +11:00
56966d6d05
feat(db): only reinit db if migrations occurred
2023-12-11 16:14:25 +11:00
e46dc9b34e
fix(db): close db conn before reinitializing
2023-12-11 16:14:25 +11:00
e461f9925e
feat(db): invert backup/restore logic
...
Do the migration on a temp copy of the db, then back up the original and move the temp into its file.
2023-12-11 16:14:25 +11:00
abeb1bd3b3
feat(db): reduce power MigrateCallback, only gets cursor
...
use partial to provide extra dependencies for the image workflow migration function
2023-12-11 16:14:25 +11:00
83e820d721
feat(db): decouple from SqliteDatabase
2023-12-11 16:14:25 +11:00
f8e4b93a74
feat(db): add migration lock file
2023-12-11 16:14:25 +11:00
0710ec30cf
feat(db): incorporate feedback
2023-12-11 16:14:25 +11:00
c382329e8c
feat(db): move migrator out of SqliteDatabase
2023-12-11 16:14:25 +11:00
a2dc780188
feat: add script to migrate image workflows
2023-12-11 16:14:25 +11:00
abc9dc4d17
fix(tests): fix sqlite migrator backup and restore test
...
On Windows, we must ensure the connection to the database is closed before exiting the tempfile context.
Also, rejiggered the thing to use the file directly.
2023-12-11 16:14:25 +11:00
3c692018cd
fix(db): make idempotency test actually test something
2023-12-11 16:14:25 +11:00
3ba3c1918c
fix(db): remove duplicated test case
2023-12-11 16:14:25 +11:00