20230316122259_fix_user_location_reject_foreign_key.php 335 B

123456789101112
  1. <?php
  2. use Phinx\Migration\AbstractMigration;
  3. class FixUserLocationRejectForeignKey extends AbstractMigration {
  4. public function change() {
  5. $this->table("user_location_reject")
  6. ->dropForeignKey("location_id")
  7. ->addForeignKey("location_id", "location", "id", ["update" => "CASCADE", "delete" => "CASCADE"])
  8. ->update();
  9. }
  10. }