chibenwa commented on code in PR #1698:
URL: https://github.com/apache/james-project/pull/1698#discussion_r1303072472


##########
server/data/data-jmap-cassandra/src/main/java/org/apache/james/jmap/cassandra/upload/UploadModule.java:
##########
@@ -47,11 +48,12 @@ public interface UploadModule {
                 .withCompactionWindow(7, DAYS))
             .withCaching(true, rows(DEFAULT_CACHED_ROW_PER_PARTITION)))
         .statement(statement -> types -> statement
-            .withPartitionKey(ID, DataTypes.TIMEUUID)
+            .withPartitionKey(USER, DataTypes.TEXT)
+            .withClusteringColumn(ID, DataTypes.TIMEUUID)
             .withColumn(CONTENT_TYPE, DataTypes.TEXT)
             .withColumn(SIZE, DataTypes.BIGINT)
             .withColumn(BUCKET_ID, DataTypes.TEXT)
             .withColumn(BLOB_ID, DataTypes.TEXT)
-            .withColumn(USER, DataTypes.TEXT))
+            .withColumn(UPLOAD_DATE, DataTypes.TIMESTAMP))

Review Comment:
   Please change the table name: `String TABLE_NAME = "uploads_2";`
   
   Please indicate in upgrade instructions that the `upload` table can be 
deleted. That pending uploads will be lost during the migration.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to