Shawn Maddock
02/13/2024, 12:59 AMfleet prepare db
, I'm getting what appears to be a non-recoverable errorShawn Maddock
02/13/2024, 12:59 AM################################################################################
# WARNING:
# This will perform Fleet database migrations. Please back up your data before
# continuing.
#
# Missing migrations: tables=[20240129162819 20240130115133], data=[].
#
# Press Enter to continue, or Control-c to exit.
################################################################################
2024/02/12 18:58:14 [2024-01-29] Add Prefix To Windows Updates Profiles
2024/02/12 18:58:14 FAIL 20240129162819_AddPrefixToWindowsUpdatesProfiles.go (add w prefix to windows updates profiles uuid: Error 1054 (42S22): Unknown column 'w%' in 'where clause'), quitting migration.
Shawn Maddock
02/13/2024, 1:04 AMShawn Maddock
02/13/2024, 1:25 AMShawn Maddock
02/13/2024, 1:26 AM"
with single '
causes the query to succeedShawn Maddock
02/13/2024, 1:34 AMmigration_status_tables
entry, that was hackyKathy Satterlee
02/13/2024, 3:43 PMShawn Maddock
02/13/2024, 3:55 PMKathy Satterlee
02/13/2024, 6:52 PMBrock Walters
02/13/2024, 9:53 PMKathy Satterlee
02/13/2024, 9:57 PMstmt = `
UPDATE
host_mdm_windows_profiles
SET
profile_uuid = CONCAT("w", profile_uuid)
WHERE
profile_uuid NOT LIKE "w%";
`
To this:
stmt = `
UPDATE
host_mdm_windows_profiles
SET
profile_uuid = CONCAT("w", profile_uuid)
WHERE
profile_uuid NOT LIKE 'w%'
`
Kathy Satterlee
02/13/2024, 9:57 PMShawn Maddock
02/13/2024, 9:57 PMShawn Maddock
02/13/2024, 9:58 PMShawn Maddock
04/04/2024, 9:29 PMUsing config file: /etc/fleet/server.yml
################################################################################
# WARNING:
# This will perform Fleet database migrations. Please back up your data before
# continuing.
#
# Missing migrations: tables=[20240327115617], data=[].
#
# Press Enter to continue, or Control-c to exit.
################################################################################
2024/04/04 16:28:20 [2024-03-27] Create Table Nano DDM Requests
2024/04/04 16:28:20 FAIL 20240327115617_CreateTableNanoDDMRequests.go (creating mdm_apple_declarative_requsts: Error 3780 (HY000): Referencing column 'enrollment_id' and referenced column 'id' in foreign key constraint 'mdm_apple_declarative_requests_enrollment_id' are incompatible.), quitting migration.
Shawn Maddock
04/04/2024, 9:50 PMCHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
to the enrollment_id
definition in https://github.com/fleetdm/fleet/blob/f476ddcfd69f7398e34d150ac8be738b6bc03d11/ser[…]/migrations/tables/20240327115617_CreateTableNanoDDMRequests.goShawn Maddock
04/04/2024, 9:52 PMShawn Maddock
04/10/2024, 2:01 PMJason Lewis
04/10/2024, 5:26 PMShawn Maddock
04/10/2024, 5:30 PM