Refactor: move migrations over to new db package.#815
Merged
arabcoders merged 11 commits intomasterfrom May 2, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a major update to WatchState, focusing on migrating to a new versioned database schema (
v02), updating related configuration and documentation, and improving the system command API. The changes also enhance the pruning configuration, update task scheduling, and refactor database initialization and dependency injection for better maintainability and extensibility.Database migration and configuration:
v02format, updating the default database file location, migration logic, and related configuration. Old database files are preserved as.migratedbackups after upgrade.PdoFactory, and updated dependency injection to improve modularity and future extensibility.watchstate_v02.db.System command API improvements:
GET /v1/api/system/commandendpoint to list recent command sessions, and clarified session replay, expiry, and error handling in the API documentation.system:indextodb:indexto match the new schema and command structure.Pruning and task scheduling:
-7 DAYS) and added validation to ensure only valid, past times are accepted.config/config.php, config/config.phpL373-R386)