001package systems.dmx.core.migrations;
002
003import systems.dmx.core.model.IndexMode;
004import systems.dmx.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        dmx.getTopicType("dmx.core.meta_type")
019            .addIndexMode(IndexMode.KEY)
020            .addIndexMode(IndexMode.FULLTEXT)
021            .addIndexMode(IndexMode.FULLTEXT_KEY);
022        dmx.getTopicType("dmx.core.topic_type")
023            .addIndexMode(IndexMode.KEY)
024            .addIndexMode(IndexMode.FULLTEXT)
025            .addIndexMode(IndexMode.FULLTEXT_KEY);
026        dmx.getTopicType("dmx.core.assoc_type")
027            .addIndexMode(IndexMode.KEY)
028            .addIndexMode(IndexMode.FULLTEXT)
029            .addIndexMode(IndexMode.FULLTEXT_KEY);
030        dmx.getTopicType("dmx.core.data_type")
031            .addIndexMode(IndexMode.KEY)
032            .addIndexMode(IndexMode.FULLTEXT)
033            .addIndexMode(IndexMode.FULLTEXT_KEY);
034        dmx.getTopicType("dmx.core.role_type")
035            .addIndexMode(IndexMode.KEY)
036            .addIndexMode(IndexMode.FULLTEXT)
037            .addIndexMode(IndexMode.FULLTEXT_KEY);
038        dmx.getTopicType("dmx.core.cardinality")
039            .addIndexMode(IndexMode.KEY)
040            .addIndexMode(IndexMode.FULLTEXT)
041            .addIndexMode(IndexMode.FULLTEXT_KEY);
042        dmx.getTopicType("dmx.core.plugin")
043            .addIndexMode(IndexMode.KEY)
044            .addIndexMode(IndexMode.FULLTEXT)
045            .addIndexMode(IndexMode.FULLTEXT_KEY);
046    }
047}