migrations

  • Elasticsearch 6 allows one mapping type per index

    An index could hold several types — product and review in one index — and they shared a Lucene field space underneath, so two types with a field…

  • WooCommerce 3.0 turned products into objects

    Every plugin reading _price from post meta is now reading a private field. The mechanical half, the half that is not, and the compatibility layer for code you…

  • The keyword type replaced not_analyzed

    Expressing “index this exactly, do not tokenise it” used to be “type”: “string”, “index”: “not_analyzed”. From 5.0 the string type is split in two and the intent is…

  • Compose file v3 dropped volumes_from

    A version 2 file could share a container’s volumes with volumes_from, which is how the data-container pattern worked. Version 3 removes it, because a scheduler placing containers on…

  • Find tables with no primary key

  • 5.7 turned strict mode on, and old inserts started failing

    The default sql_mode changed, and with it a decade of behaviour: inserting a string into a numeric column, a date of 0000-00-00, or more characters than the column…

  • An online schema change for the ALTER that would lock

    5.6 made many ALTER operations online, and the ones that are not — changing a column type, adding a full-text index — still copy the table while holding…

  • ONLY_FULL_GROUP_BY will break your reports

    MySQL used to allow selecting a column that is neither grouped nor aggregated, returning an arbitrary row’s value for it. 5.7 turns that off by default, and every…

  • Moving catalogue search off MySQL and onto Elasticsearch

    LIKE cannot use an index and everyone knows it. The mapping, the analyzers that decide what matching means, the indexing pipeline, and the drift it introduces.

  • An alias is what makes a reindex atomic

    Reindexing into a new index leaves two: the old one still serving and the new one ready. Pointing the application at the new one by editing configuration means…