Add latest changes

Dieser Commit ist enthalten in:
2025-07-03 20:38:33 +00:00
Ursprung 63f3d92724
Commit 6f6cde65db
129 geänderte Dateien mit 3998 neuen und 1199 gelöschten Zeilen

Datei anzeigen

@@ -0,0 +1,23 @@
-- Migration: Cleanup session_history hardware_id column
-- Date: 2025-01-03
-- Description: Migrate hardware_id data to hardware_fingerprint and remove old column
BEGIN;
-- Copy data from hardware_id to hardware_fingerprint where it's null
UPDATE session_history
SET hardware_fingerprint = hardware_id
WHERE hardware_fingerprint IS NULL AND hardware_id IS NOT NULL;
-- Make hardware_fingerprint NOT NULL
ALTER TABLE session_history
ALTER COLUMN hardware_fingerprint SET NOT NULL;
-- Drop the old hardware_id column
ALTER TABLE session_history
DROP COLUMN hardware_id CASCADE;
-- Add comment
COMMENT ON COLUMN session_history.hardware_fingerprint IS 'Unique hardware identifier for the session';
COMMIT;