diff --git a/res/values/versions.xml b/res/values/versions.xml
index e82b79e..14c6b47 100644
--- a/res/values/versions.xml
+++ b/res/values/versions.xml
@@ -16,7 +16,7 @@
 -->
 <resources>
     <!-- DB version -->
-    <string name="database_version" translatable="false">1</string>
+    <string name="database_version" translatable="false">2</string>
 
     <!-- Version for shared preferences. This is used for handling prefs migration when old pref
          keys are moved or renamed. You don't need to bump up the version number if you are just
diff --git a/src/com/android/messaging/datamodel/BugleDatabaseOperations.java b/src/com/android/messaging/datamodel/BugleDatabaseOperations.java
index 8c40177..d30cec4 100644
--- a/src/com/android/messaging/datamodel/BugleDatabaseOperations.java
+++ b/src/com/android/messaging/datamodel/BugleDatabaseOperations.java
@@ -841,6 +841,11 @@
         values.put(ConversationColumns.NAME,
                 getDefaultConversationName(participants));
 
+        // Fill in IS_ENTERPRISE.
+        final boolean hasAnyEnterpriseContact =
+                ConversationListItemData.hasAnyEnterpriseContact(participants);
+        values.put(ConversationColumns.IS_ENTERPRISE, hasAnyEnterpriseContact);
+
         fillParticipantData(values, participants);
 
         // Used by background thread when refreshing conversation so conversation could be deleted.
diff --git a/src/com/android/messaging/datamodel/DatabaseHelper.java b/src/com/android/messaging/datamodel/DatabaseHelper.java
index f16bb3c..2025e2c 100644
--- a/src/com/android/messaging/datamodel/DatabaseHelper.java
+++ b/src/com/android/messaging/datamodel/DatabaseHelper.java
@@ -149,6 +149,9 @@
         // is present (TP-Reply-Path), so that we could use it for the subsequent message to send.
         // Refer to TS 23.040 D.6 and SmsMessageSender.java in Android Messaging app.
         public static final String SMS_SERVICE_CENTER = "sms_service_center";
+
+        // A conversation is enterprise if one of the participant is a enterprise contact.
+        public static final String IS_ENTERPRISE = "IS_ENTERPRISE";
     }
 
     // Conversation table SQL
@@ -182,7 +185,8 @@
                     + ConversationColumns.NOTIFICATION_SOUND_URI + " TEXT, "
                     + ConversationColumns.NOTIFICATION_VIBRATION + " INT DEFAULT(1), "
                     + ConversationColumns.INCLUDE_EMAIL_ADDRESS + " INT DEFAULT(0), "
-                    + ConversationColumns.SMS_SERVICE_CENTER + " TEXT "
+                    + ConversationColumns.SMS_SERVICE_CENTER + " TEXT ,"
+                    + ConversationColumns.IS_ENTERPRISE + " INT DEFAULT(0)"
                     + ");";
 
     private static final String CONVERSATIONS_TABLE_SMS_THREAD_ID_INDEX_SQL =
@@ -668,6 +672,12 @@
         }
     }
 
+    public static void rebuildAllViews(final DatabaseWrapper db) {
+        for (final String sql : DatabaseHelper.CREATE_VIEW_SQLS) {
+            db.execSQL(sql);
+        }
+    }
+
     /**
      * Drops all user-defined tables from the given database.
      */
@@ -733,7 +743,7 @@
     /**
      * Drops all user-defined views from the given database.
      */
-    private static void dropAllViews(final SQLiteDatabase db) {
+    public static void dropAllViews(final SQLiteDatabase db) {
         final Cursor viewCursor =
                 db.query(MASTER_TABLE, MASTER_COLUMNS, "type='view'", null, null, null, null);
         if (viewCursor != null) {
diff --git a/src/com/android/messaging/datamodel/DatabaseUpgradeHelper.java b/src/com/android/messaging/datamodel/DatabaseUpgradeHelper.java
index d112533..96aba86 100644
--- a/src/com/android/messaging/datamodel/DatabaseUpgradeHelper.java
+++ b/src/com/android/messaging/datamodel/DatabaseUpgradeHelper.java
@@ -15,8 +15,10 @@
  */
 package com.android.messaging.datamodel;
 
+import android.content.Context;
 import android.database.sqlite.SQLiteDatabase;
 
+import com.android.messaging.Factory;
 import com.android.messaging.util.Assert;
 import com.android.messaging.util.LogUtil;
 
@@ -30,8 +32,61 @@
         }
 
         LogUtil.i(TAG, "Database upgrade started from version " + oldVersion + " to " + newVersion);
+        try {
+            doUpgradeWithExceptions(db, oldVersion, newVersion);
+            LogUtil.i(TAG, "Finished database upgrade");
+        } catch (final Exception ex) {
+            LogUtil.e(TAG, "Failed to perform db upgrade from version " +
+                    oldVersion + " to version " + newVersion, ex);
+            DatabaseHelper.rebuildTables(db);
+        }
+    }
 
-        // Add future upgrade code here
+    public void doUpgradeWithExceptions(final SQLiteDatabase db, final int oldVersion,
+            final int newVersion) throws Exception {
+        int currentVersion = oldVersion;
+        if (currentVersion < 2) {
+            currentVersion = upgradeToVersion2(db);
+        }
+        // Rebuild all the views
+        final Context context = Factory.get().getApplicationContext();
+        DatabaseHelper.dropAllViews(db);
+        DatabaseHelper.rebuildAllViews(new DatabaseWrapper(context, db));
+        // Finally, check if we have arrived at the final version.
+        checkAndUpdateVersionAtReleaseEnd(currentVersion, Integer.MAX_VALUE, newVersion);
+    }
+
+    private int upgradeToVersion2(final SQLiteDatabase db) {
+        db.execSQL("ALTER TABLE " + DatabaseHelper.CONVERSATIONS_TABLE + " ADD COLUMN " +
+                DatabaseHelper.ConversationColumns.IS_ENTERPRISE + " INT DEFAULT(0)");
+        LogUtil.i(TAG, "Ugraded database to version 2");
+        return 2;
+    }
+
+    /**
+     * Checks db version correctness at the end of each milestone release. If target database
+     * version lies beyond the version range that the current release may handle, we snap the
+     * current version to the end of the release, so that we may go on to the next release' upgrade
+     * path. Otherwise, if target version is within reach of the current release, but we are not
+     * at the target version, then throw an exception to force a table rebuild.
+     */
+    private int checkAndUpdateVersionAtReleaseEnd(final int currentVersion,
+            final int maxVersionForRelease, final int targetVersion) throws Exception {
+        if (maxVersionForRelease < targetVersion) {
+            // Target version is beyond the current release. Snap to max version for the
+            // current release so we can go on to the upgrade path for the next release.
+            return maxVersionForRelease;
+        }
+
+        // If we are here, this means the current release' upgrade handler should upgrade to
+        // target version...
+        if (currentVersion != targetVersion) {
+            // No more upgrade handlers. So we can't possibly upgrade to the final version.
+            throw new Exception("Missing upgrade handler from version " +
+                    currentVersion + " to version " + targetVersion);
+        }
+        // Upgrade succeeded.
+        return targetVersion;
     }
 
     public void onDowngrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) {
diff --git a/src/com/android/messaging/datamodel/data/ConversationListItemData.java b/src/com/android/messaging/datamodel/data/ConversationListItemData.java
index 77da49e..f627a09 100644
--- a/src/com/android/messaging/datamodel/data/ConversationListItemData.java
+++ b/src/com/android/messaging/datamodel/data/ConversationListItemData.java
@@ -67,6 +67,7 @@
     private String mDraftSubject;
     private String mSnippetSenderFirstName;
     private String mSnippetSenderDisplayDestination;
+    private boolean mIsEnterprise;
 
     public ConversationListItemData() {
     }
@@ -118,6 +119,7 @@
         mSnippetSenderFirstName = cursor.getString(INDEX_SNIPPET_SENDER_FIRST_NAME);
         mSnippetSenderDisplayDestination =
                 cursor.getString(INDEX_SNIPPET_SENDER_DISPLAY_DESTINATION);
+        mIsEnterprise = cursor.getInt(INDEX_IS_ENTERPRISE) == 1;
     }
 
     public String getConversationId() {
@@ -157,20 +159,19 @@
     }
 
     /**
-     * @see DatabaseHelper.ConversationColumns#PARTICIPANT_CONTACT_ID
-     * @return the contact id of the participant if it is a 1:1 conversation, -1 for group.
-     */
+      * @see ConversationColumns#PARTICIPANT_CONTACT_ID
+      * @return the contact id of the participant if it is a 1:1 conversation, -1 for group.
+      */
     public long getParticipantContactId() {
         return mParticipantContactId;
     }
 
     /**
-     * TODO: support group conversation.
-     * @see android.provider.ContactsContract#isEnterpriseContactId(long)
-     * @return is the participant an enterprise contact. False if it is a group conversation.
+     * @see ConversationColumns#IS_ENTERPRISE
+     * @return whether the conversation is enterprise.
      */
-    public boolean isParticipantEnterpriseContact() {
-        return ContactUtil.isEnterpriseContactId(getParticipantContactId());
+    public boolean isEnterprise() {
+        return mIsEnterprise;
     }
 
     public String getParticipantLookupKey() {
@@ -345,7 +346,9 @@
             + DatabaseHelper.PARTICIPANTS_TABLE + '.' + ParticipantColumns.FIRST_NAME
             + " as " + ConversationListViewColumns.SNIPPET_SENDER_FIRST_NAME + ", "
             + DatabaseHelper.PARTICIPANTS_TABLE + '.' + ParticipantColumns.DISPLAY_DESTINATION
-            + " as " + ConversationListViewColumns.SNIPPET_SENDER_DISPLAY_DESTINATION;
+            + " as " + ConversationListViewColumns.SNIPPET_SENDER_DISPLAY_DESTINATION + ", "
+            + DatabaseHelper.CONVERSATIONS_TABLE + '.' + ConversationColumns.IS_ENTERPRISE
+            + " as " + ConversationListViewColumns.IS_ENTERPRISE;
 
     private static final String JOIN_PARTICIPANTS =
             " LEFT JOIN " + DatabaseHelper.PARTICIPANTS_TABLE + " ON ("
@@ -404,6 +407,7 @@
         static final String SNIPPET_SENDER_FIRST_NAME = "snippet_sender_first_name";
         static final String SNIPPET_SENDER_DISPLAY_DESTINATION =
                 "snippet_sender_display_destination";
+        static final String IS_ENTERPRISE = ConversationColumns.IS_ENTERPRISE;
     }
 
     public static final String[] PROJECTION = {
@@ -436,6 +440,7 @@
         ConversationListViewColumns.MESSAGE_RAW_TELEPHONY_STATUS,
         ConversationListViewColumns.SNIPPET_SENDER_FIRST_NAME,
         ConversationListViewColumns.SNIPPET_SENDER_DISPLAY_DESTINATION,
+        ConversationListViewColumns.IS_ENTERPRISE,
     };
 
     private static final int INDEX_ID = 0;
@@ -467,9 +472,20 @@
     private static final int INDEX_MESSAGE_RAW_TELEPHONY_STATUS = 26;
     private static final int INDEX_SNIPPET_SENDER_FIRST_NAME = 27;
     private static final int INDEX_SNIPPET_SENDER_DISPLAY_DESTINATION = 28;
+    private static final int INDEX_IS_ENTERPRISE = 29;
 
     private static final String DIVIDER_TEXT = ", ";
 
+    public static boolean hasAnyEnterpriseContact(
+             final List<ParticipantData> participants) {
+         for (final ParticipantData participant : participants) {
+             if (ContactUtil.isEnterpriseContactId(participant.getContactId())) {
+                 return true;
+             }
+         }
+         return false;
+     }
+
     /**
      * Get a conversation from the local DB based on the conversation id.
      *
diff --git a/src/com/android/messaging/ui/conversationlist/ConversationListItemView.java b/src/com/android/messaging/ui/conversationlist/ConversationListItemView.java
index 58c4e69..6b02eb3 100644
--- a/src/com/android/messaging/ui/conversationlist/ConversationListItemView.java
+++ b/src/com/android/messaging/ui/conversationlist/ConversationListItemView.java
@@ -186,8 +186,7 @@
     }
 
     private void setWorkProfileIcon() {
-        mWorkProfileIconView.setVisibility(
-                mData.isParticipantEnterpriseContact() ? View.VISIBLE : View.GONE);
+        mWorkProfileIconView.setVisibility(mData.isEnterprise() ? View.VISIBLE : View.GONE);
     }
 
     private void setConversationName() {
