migrations

  • What the regulation actually asks of a schema

    The deadline is in May and the work is not a cookie banner. An inventory first, because everything else depends on knowing which tables hold what.

  • The 8.0 collation change is a silent behaviour change

    8.0 defaults to utf8mb4_0900_ai_ci, which sorts and compares differently from the utf8mb4_general_ci a 5.7 database is almost certainly using — and a join between two columns with different…

  • Reindexing without downtime, using an alias

    A mapping change usually cannot be applied in place, so it means building a new index — and if the application names the index directly, that is a…

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