Skip to content

Re-timestamp migrations due to 4.79 cherry pick. - #37993

Merged
getvictor merged 1 commit into
mainfrom
victor/30876-migration-timestamp
Jan 7, 2026
Merged

Re-timestamp migrations due to 4.79 cherry pick.#37993
getvictor merged 1 commit into
mainfrom
victor/30876-migration-timestamp

Conversation

@getvictor

Copy link
Copy Markdown
Member

Related issue: Resolves #30876

@getvictor
getvictor marked this pull request as ready for review January 7, 2026 16:33
@getvictor
getvictor requested a review from a team as a code owner January 7, 2026 16:33
@JordanMontgomery

Copy link
Copy Markdown
Member

This looks good but would you mind dropping something into help-engineering to make devs and particularly infra aware so the qa-wolf instances can be fixed up(they'll likely need some DB surgery)

@codecov

codecov Bot commented Jan 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.14%. Comparing base (4a24626) to head (910c73a).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...ables/20251229000010_AddSoftwareAutoUpdateTable.go 66.66% 1 Missing ⚠️
...9000020_AddHostMDMAppleBootstrapPackagesSkipped.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #37993   +/-   ##
=======================================
  Coverage   64.14%   64.14%           
=======================================
  Files        2385     2385           
  Lines      190035   190064   +29     
  Branches     8391     8391           
=======================================
+ Hits       121896   121923   +27     
- Misses      56884    56885    +1     
- Partials    11255    11256    +1     
Flag Coverage Δ
backend 65.72% <66.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@getvictor
getvictor merged commit 458c31b into main Jan 7, 2026
42 of 45 checks passed
@getvictor
getvictor deleted the victor/30876-migration-timestamp branch January 7, 2026 18:20
oleksandrd-flamingo added a commit to flamingo-stack/fleetmdm that referenced this pull request Jun 17, 2026
Upstream PR fleetdm#37993 re-timestamped two migrations to round timestamps
(20251229000010 AddSoftwareAutoUpdateTable, 20251229000020
AddHostMDMAppleBootstrapPackagesSkipped). The fork already carries its
own copies of these under the original timestamps (20251219201524,
20251222163753) which are idempotent and already applied on existing
tenants. The merge kept both, but upstream's copies did bare,
non-idempotent ALTER TABLE ... ADD COLUMN, so 'fleet prepare db' aborted
mid-migration with 'Duplicate column name' on any DB that already ran the
fork's copies (i.e. every existing tenant).

Guard both with the fork's existing columnExists() helper, matching the
pattern already used by the fork-timestamped copies. No-ops on existing
tenants (column present), still creates the schema on fresh DBs.

Verified: dumped a real tenant DB, restored locally, ran prepare db ->
all ~90 upstream + data + openframe migrations complete; server boots
clean in FLEET_OPENFRAME_MODE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy/delete certificates on Android hosts via UI/API

3 participants