Skip to content

Commit c3894ba

Browse files
committed
improve tou_acceptances table
1 parent cbd82d6 commit c3894ba

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration {
8+
/**
9+
* Run the migrations.
10+
*/
11+
public function up(): void {
12+
Schema::table('tou_acceptances', function (Blueprint $table) {
13+
$table->string('tou_version', 10)->change();
14+
$table->foreign('tou_version')
15+
->references('version')
16+
->on('tou_versions')
17+
->cascadeOnUpdate()
18+
->restrictOnDelete();
19+
});
20+
}
21+
22+
/**
23+
* Reverse the migrations.
24+
*/
25+
public function down(): void {
26+
Schema::dropIfExists('tou_acceptances');
27+
}
28+
};

0 commit comments

Comments
 (0)