Skip to content

Commit

Permalink
stores: change to 766
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Nov 4, 2023
1 parent 0754505 commit fd2fc7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stores/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ func initSchema(tx *gorm.DB) error {

// Change the collation of columns that we need to be case sensitive.
if !isSQLite(tx) {
err = tx.Exec("ALTER TABLE objects MODIFY COLUMN object_id VARCHAR(767) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;").Error
err = tx.Exec("ALTER TABLE objects MODIFY COLUMN object_id VARCHAR(766) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;").Error
if err != nil {
return fmt.Errorf("failed to change object_id collation: %w", err)
}
err = tx.Exec("ALTER TABLE buckets MODIFY COLUMN name VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;").Error
if err != nil {
return fmt.Errorf("failed to change buckets_name collation: %w", err)
}
err = tx.Exec("ALTER TABLE multipart_uploads MODIFY COLUMN object_id VARCHAR(767) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;").Error
err = tx.Exec("ALTER TABLE multipart_uploads MODIFY COLUMN object_id VARCHAR(766) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;").Error
if err != nil {
return fmt.Errorf("failed to change object_id collation: %w", err)
}
Expand Down

0 comments on commit fd2fc7f

Please sign in to comment.