You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2017/09/19 02:00:21 UTC

[3/6] james-project git commit: MAILBOX-306 Binding new migration which move attachment ids from message to messageAttachmentId

MAILBOX-306 Binding new migration which move attachment ids from message to messageAttachmentId


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/8c82a856
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/8c82a856
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/8c82a856

Branch: refs/heads/master
Commit: 8c82a8560fc86a1bfd947ed4e0dd05e22fc9cefd
Parents: f111e62
Author: quynhn <qn...@linagora.com>
Authored: Wed Sep 13 14:16:08 2017 +0700
Committer: benwa <bt...@linagora.com>
Committed: Tue Sep 19 08:59:35 2017 +0700

----------------------------------------------------------------------
 .../org/apache/james/modules/server/CassandraRoutesModule.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/8c82a856/server/container/guice/protocols/webadmin-cassandra/src/main/java/org/apache/james/modules/server/CassandraRoutesModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/webadmin-cassandra/src/main/java/org/apache/james/modules/server/CassandraRoutesModule.java b/server/container/guice/protocols/webadmin-cassandra/src/main/java/org/apache/james/modules/server/CassandraRoutesModule.java
index 96f807c..ae2340f 100644
--- a/server/container/guice/protocols/webadmin-cassandra/src/main/java/org/apache/james/modules/server/CassandraRoutesModule.java
+++ b/server/container/guice/protocols/webadmin-cassandra/src/main/java/org/apache/james/modules/server/CassandraRoutesModule.java
@@ -20,6 +20,7 @@
 package org.apache.james.modules.server;
 
 import org.apache.james.backends.cassandra.versions.CassandraSchemaVersionManager;
+import org.apache.james.mailbox.cassandra.mail.migration.AttachmentMessageIdCreation;
 import org.apache.james.mailbox.cassandra.mail.migration.AttachmentV2Migration;
 import org.apache.james.mailbox.cassandra.mail.migration.Migration;
 import org.apache.james.webadmin.Routes;
@@ -35,6 +36,7 @@ import com.google.inject.name.Names;
 public class CassandraRoutesModule extends AbstractModule {
     private static final int FROM_V2_TO_V3 = 2;
     private static final int FROM_V3_TO_V4 = 3;
+    private static final int FROM_V4_TO_V5 = 4;
 
     @Override
     protected void configure() {
@@ -47,6 +49,7 @@ public class CassandraRoutesModule extends AbstractModule {
         MapBinder<Integer, Migration> allMigrationClazzBinder = MapBinder.newMapBinder(binder(), Integer.class, Migration.class);
         allMigrationClazzBinder.addBinding(FROM_V2_TO_V3).toInstance(() -> Migration.MigrationResult.COMPLETED);
         allMigrationClazzBinder.addBinding(FROM_V3_TO_V4).to(AttachmentV2Migration.class);
+        allMigrationClazzBinder.addBinding(FROM_V4_TO_V5).to(AttachmentMessageIdCreation.class);
 
         bindConstant()
             .annotatedWith(Names.named(CassandraMigrationService.LATEST_VERSION))


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org