[Groonga-commit] groonga/gcs at 0711743 [master] Remove data column before removing lexicon table

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Mar 2 15:49:27 JST 2014


Kouhei Sutou	2014-03-02 15:49:27 +0900 (Sun, 02 Mar 2014)

  New Revision: 07117436e9b428b0ba4a665e7bea168fe7acc80b
  https://github.com/groonga/gcs/commit/07117436e9b428b0ba4a665e7bea168fe7acc80b

  Message:
    Remove data column before removing lexicon table
    
    Because data column may refer lexicon table. If lexicon table is
    referred, remove operation is failed to keep consistency.

  Modified files:
    lib/database/index-field.js

  Modified: lib/database/index-field.js (+4 -4)
===================================================================
--- lib/database/index-field.js    2014-03-02 15:32:11 +0900 (ef2d423)
+++ lib/database/index-field.js    2014-03-02 15:49:27 +0900 (8301039)
@@ -622,15 +622,15 @@ IndexField.prototype = {
     this._updatedAt = this.updatedAt;
     this._updateVersion = this.updateVersion;
 
+    this.context.commandSync('column_remove', {
+      table: this.domain.tableName,
+      name: this.columnName
+    });
     if (this._type == 'uint' || this._type == 'literal') {
       this.context.commandSync('table_remove', {
         name: this.indexTableName
       });
     }
-    this.context.commandSync('column_remove', {
-      table: this.domain.tableName,
-      name: this.columnName
-    });
 
     this.domain.deleteConfiguration(this.facetEnabledConfigurationKey);
     this.domain.deleteConfiguration(this.resultEnabledConfigurationKey);
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index