Skip to content

Commit

Permalink
Add migration on forgotten license CC-BY-SA (#2416)
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria authored Apr 28, 2024
1 parent 40059a8 commit 5f26d12
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions database/migrations/2024_04_28_135546_fix_license_again.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class() extends Migration {
/**
* Run the migrations.
*/
public function up(): void
{
DB::table('albums')->where('license', '=', 'CC-BY-SA')->update(['license' => 'CC-BY-SA-4.0']);
DB::table('albums')->where('license', '=', 'CC-BY-NC-SA')->update(['license' => 'CC-BY-NC-SA-4.0']);
}

/**
* Reverse the migrations.
*/
public function down(): void
{
}
};

0 comments on commit 5f26d12

Please sign in to comment.