Pattern Apply4 used to split a single-region multi-tenant database into per-region databases. An integer 'bucket' column is added to every relevant table (via a shared base-class Rails enum with values not_bucketed / region_1 / region_2 / shared). Records are then assigned a bucket value based on their domain relationship to an Authority (which has a country attribute). The team tried both bottom-up (from leaf records up to the Authority) and top-down (starting from each Authority and walking associations down) — top-down was significantly faster and simpler. A default_scope filtered by bucket lets you preview what each region's data will look like before physically separating. Physical separation is done by creating an empty copy of the table, inserting only records for the target bucket, renaming the originals to `_old`, and swapping names — which proved faster than deleting cross-region rows from the existing table.