001package de.deepamehta.core.migrations;
002
003import de.deepamehta.core.model.IndexMode;
004import de.deepamehta.core.service.Migration;
005
006
007
008/**
009 * Add index modes to Core types.
010 * Runs ALWAYS.
011 * <p>
012 * Part of DM 4.8.5
013 */
014public class Migration6 extends Migration {
015
016    @Override
017    public void run() {
018        dm4.getTopicType("dm4.core.meta_type")
019            .addIndexMode(IndexMode.FULLTEXT)
020            .addIndexMode(IndexMode.FULLTEXT_KEY);
021        dm4.getTopicType("dm4.core.topic_type")
022            .addIndexMode(IndexMode.FULLTEXT)
023            .addIndexMode(IndexMode.FULLTEXT_KEY);
024        dm4.getTopicType("dm4.core.assoc_type")
025            .addIndexMode(IndexMode.FULLTEXT)
026            .addIndexMode(IndexMode.FULLTEXT_KEY);
027        dm4.getTopicType("dm4.core.data_type")
028            .addIndexMode(IndexMode.FULLTEXT)
029            .addIndexMode(IndexMode.FULLTEXT_KEY);
030        dm4.getTopicType("dm4.core.role_type")
031            .addIndexMode(IndexMode.FULLTEXT)
032            .addIndexMode(IndexMode.FULLTEXT_KEY);
033        dm4.getTopicType("dm4.core.cardinality")
034            .addIndexMode(IndexMode.FULLTEXT)
035            .addIndexMode(IndexMode.FULLTEXT_KEY);
036        dm4.getTopicType("dm4.core.plugin")
037            .addIndexMode(IndexMode.FULLTEXT)
038            .addIndexMode(IndexMode.FULLTEXT_KEY);
039    }
040}