Skip to content

Commit 39c0b98

Browse files
Update rename v2 (#78)
* Activate github/workflow * Remove crashed marker/Merge import block * Bypass rabbit_consumer code * Bypass rabbit_consumer code * Update deploy procss * Update cosmic-sync-server health check * Update cosmic-sync-server health check * Update service loading delay/ Update related service env * Fix build error * Fix build error * Update builder rs * Fix static library issue * Fix static library issue * Fix static library issue * Update secret location * Check system76/cosmic-sync-server repo * Check system76/cosmic-sync-server repo * Fix Migration issue * Fix Migration issue * Fix Migration issue * Update schema * Fix grpc port connection * Fix grpc port connection * Fix grpc port connection * Fix grpc port connection * Fix grpc port connection * Fix grpc port connection * Update login process - fix OAUTH infos * Update login process - fix OAUTH infos * Update login process - fix saving auth token * Merge 443/50051 * Merge 443/50051 * Merge 443/50051 * Merge 443/50051 * Merge 443/50051 * Merge 443/50051 * Fix http size issue * Fix http size issue * Fix http size issue * Fix http size issue * Fix http size issue * Fix http size issue * Fix http size issue * Fix http size issue * Fix http size issue * Fix http size issue * Fix http size issue * Fix http size issue * Check point for 2024 * Check point for 2024 * Check point for 2024 - fmt * Check point for 2024 - dockerfile * Check point for streaming/key_id patch * Fix starting process * Fix mysql auth_token mismatch * Fix starting process * Migrate DB table * Update DELETE/UPDATE/MOVE * Update sync sequentional order * cargo fmt
1 parent 189080b commit 39c0b98

27 files changed

+1973
-207
lines changed

migrations/sql/20251119_add_deleted_file_id.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,3 @@ ADD COLUMN deleted_file_id BIGINT UNSIGNED NULL COMMENT 'Reference to original f
66

77
-- Add index for efficient lookup
88
CREATE INDEX idx_deleted_file_id ON files(deleted_file_id);
9-
10-
11-
12-
13-
14-
15-

migrations/sql/20251119_add_deleted_file_id_down.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ ALTER TABLE files DROP COLUMN IF EXISTS deleted_file_id;
1010

1111

1212

13+

migrations/sql/20251119_add_encrypted_data_to_files.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,3 @@
44

55
ALTER TABLE files
66
ADD COLUMN encrypted_data LONGBLOB NULL COMMENT 'Encrypted file data for recovery' AFTER key_id;
7-
8-
9-
10-
11-
12-
13-

migrations/sql/20251119_add_encrypted_data_to_files_down.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,3 @@
33

44
ALTER TABLE files
55
DROP COLUMN encrypted_data;
6-
7-
8-
9-
10-
11-
12-

migrations/sql/20251119_migrate_operation_types.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ WHERE is_deleted = 0
4040

4141

4242

43+

migrations/sql/20251119_migrate_operation_types_down.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ WHERE operation_type IN ('CREATE', 'UPDATE', 'DELETE', 'RESTORE');
1414

1515

1616

17+

migrations/sql/20251119_redefine_operation_type.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ ALTER TABLE files
77
CHANGE COLUMN operation_type operation_type ENUM('CREATE', 'UPDATE', 'DELETE', 'RENAME', 'RESTORE', 'UPLOAD')
88
DEFAULT 'CREATE'
99
COMMENT 'File operation type: CREATE=new file, UPDATE=new version, DELETE=deleted, RENAME=renamed, RESTORE=restored from deletion, UPLOAD=legacy';
10+

migrations/sql/20251119_redefine_operation_type_down.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ DEFAULT 'UPLOAD';
1111

1212

1313

14+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Add MOVE operation type to support cross-watcher file movements
2+
-- Date: 2025-11-25
3+
4+
-- Add MOVE to the operation_type ENUM
5+
ALTER TABLE files
6+
CHANGE COLUMN operation_type operation_type ENUM('CREATE', 'UPDATE', 'DELETE', 'RENAME', 'RESTORE', 'UPLOAD', 'MOVE')
7+
DEFAULT 'CREATE'
8+
COMMENT 'File operation type: CREATE=new file, UPDATE=new version, DELETE=deleted, RENAME=renamed within same watcher, RESTORE=restored from deletion, UPLOAD=legacy, MOVE=moved between watchers';
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- Rollback: Remove MOVE operation type
2+
-- Date: 2025-11-25
3+
4+
-- Before removing MOVE, migrate any MOVE operations back to RENAME
5+
UPDATE files
6+
SET operation_type = 'RENAME'
7+
WHERE operation_type = 'MOVE';
8+
9+
-- Remove MOVE from the operation_type ENUM
10+
ALTER TABLE files
11+
CHANGE COLUMN operation_type operation_type ENUM('CREATE', 'UPDATE', 'DELETE', 'RENAME', 'RESTORE', 'UPLOAD')
12+
DEFAULT 'CREATE'
13+
COMMENT 'File operation type: CREATE=new file, UPDATE=new version, DELETE=deleted, RENAME=renamed, RESTORE=restored from deletion, UPLOAD=legacy';

0 commit comments

Comments
 (0)