[ticket/17208] Ensure to not run the previous migration with missing column

PHPBB3-17208
This commit is contained in:
Marc Alexander 2023-11-01 16:54:19 +01:00
parent 526c79d2e2
commit dd549a5e43
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -71,6 +71,12 @@ class profilefield_youtube_update extends \phpbb\db\migration\migration
. $this->db->get_any_char() . $this->db->get_any_char()
); );
// We're done if the profile field doesn't exist
if (!$this->db_tools->sql_column_exists($profile_fields_data, $yt_profile_field))
{
return;
}
$this->db->sql_query( $this->db->sql_query(
"UPDATE $profile_fields_data SET "UPDATE $profile_fields_data SET
$yt_profile_field = $prepend_legacy_youtube_url $yt_profile_field = $prepend_legacy_youtube_url