fix: handle migration rename errors for v444→v445 upgrades (#7320)

This commit is contained in:
Andras Bacsai 2025-11-24 15:13:49 +01:00 committed by GitHub
commit c0ee56d987
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -11,6 +11,12 @@
*/
public function up(): void
{
// Check if table already exists (handles upgrades from v444 where this migration
// was named 2025_10_10_120000_create_cloud_init_scripts_table.php)
if (Schema::hasTable('cloud_init_scripts')) {
return;
}
Schema::create('cloud_init_scripts', function (Blueprint $table) {
$table->id();
$table->foreignId('team_id')->constrained()->onDelete('cascade');

View file

@ -11,6 +11,12 @@
*/
public function up(): void
{
// Check if table already exists (handles upgrades from v444 where this migration
// was named 2025_10_10_120000_create_webhook_notification_settings_table.php)
if (Schema::hasTable('webhook_notification_settings')) {
return;
}
Schema::create('webhook_notification_settings', function (Blueprint $table) {
$table->id();
$table->foreignId('team_id')->constrained()->cascadeOnDelete();