migrations

  • An invisible index tests a drop without doing it

    Dropping an index that turns out to be load-bearing means rebuilding it on a large table under pressure, so unused-looking indexes accumulate for years because nobody wants to…

  • WooCommerce 3.0 deprecated direct property access

    Reading $product->id or $order->billing_email has worked since the plugin existed, because they were public properties on an object wrapping a post. 3.0 makes them private with a magic…

  • PHPUnit 6 renamed the classes into a namespace

    Version 6 moved everything under PHPUnitFramework and left aliases for the old names, which are deprecated. Every test file extending PHPUnit_Framework_TestCase needs a line changing. The rename is…

  • Order item meta moved and the old table is a view

    3.0 moved order item data into its own tables and left the old access functions working, which means a query written against the old shape returns results and…

  • Laravel 5.4 dropped the model events you were using

    5.4 removed the string-based model events fired through the event dispatcher — eloquent.saved: AppOrder and its relatives — in favour of an $dispatchesEvents map to real classes. The…

  • Schema changes that do not need a maintenance window

    An ALTER on a 40 million row table held a metadata lock behind every query. Expand, migrate, contract turns one blocking release into three safe ones.

  • The each() deprecation is a whole class of loop

    each() is deprecated in 7.2 and the notice appears once per call, which on a loop means once per iteration and a log file measured in megabytes. The…

  • 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…