Migrations to php code