feat(sociallikes3): migrate persisted timestamps to epoch millis - #914
Merged
Conversation
Add a versioned offline SQLite migration, fail-closed startup checks, and a guarded production release workflow with backup, verification, and rollback. Co-Authored-By: Codex Sonnet 4.6 <noreply@anthropic.com>
Remove the protected production workflow and infrastructure wiring. Keep the timestamp migration scoped to SocialLikes3 with an operator-run stopped-server cutover. Co-Authored-By: Codex Sonnet 4.6 <noreply@anthropic.com>
shunueda
previously requested changes
Sep 7, 2026
shunueda
left a comment
Member
There was a problem hiding this comment.
Migrationをインフラの一環として管理するのは無理。マニュアルでMigrationしよう
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.
Summary
builds.created_at,builds.deleted_at,publicity_history.timestamp, andsl_event_log.occurred_atFollowBuild/SLtptimestamps and make the rank-up cutoff explicitly UTCplugins/SocialLikes3/tools/This PR no longer changes GitHub Actions, Nix image construction, CDKTF, or ordinary production deployment behavior. It does not add a production deployment gate or request a CODEOWNER review.
Manual cutover
Merging this PR does not modify the production database or stop the server. The existing deployment workflow is left unchanged.
For the one-time production cutover, an operator will:
save-all flush, and stopoyasai-minecraft-mainSocialLikes3.jarasSL3_MIGRATOR_JARrelease-timestamps.sh prepare, which performs preflight checks, creates a full plugin-data backup and candidate DB, then runs transactional dry-run, apply, and verification on the candidaterelease-timestamps.sh activateto swap in the verified candidate DB/sldataop timestamp-health, migration state, and startup logs before accepting trafficIf a cutover step fails, the operator keeps traffic closed and runs
release-timestamps.sh rollbackbefore restoring the previous application release.Existing populated databases are never rewritten during plugin startup. A genuinely empty new database may initialize the schema marker automatically. YAML readers remain backward compatible and rewrite touched values in epoch form.
The existing
VARCHARcolumns are intentionally retained for this compatibility release; their values become 13-digit epoch milliseconds. A future clean-schema revision can change the in-memory model toInstantand the SQLite affinity toINTEGERindependently.Validation
nix fmt./gradlew :plugins:SocialLikes3:buildnix flake check -L --max-jobs 2 --cores 2Production evidence used
The production SQLite database was inspected read-only before implementation: integrity check passed,
user_versionwas 0, and all four target columns still contained legacy ISO local timestamps. No production files, containers, or database rows were changed while preparing this PR.Generated with Codex.