Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2023_02_14_100000_spamassassin_tables.php
- This file was added.
<?php | |||||
use Illuminate\Support\Facades\Schema; | |||||
use Illuminate\Database\Schema\Blueprint; | |||||
use Illuminate\Database\Migrations\Migration; | |||||
return new class extends Migration | |||||
{ | |||||
/** | |||||
* Run the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function up() | |||||
{ | |||||
Schema::create('spamassassin_userprefs', function (Blueprint $table) { | |||||
$table->bigIncrements('id'); | |||||
$table->string('username'); | |||||
$table->string('preference', 64); | |||||
$table->text('value'); | |||||
$table->timestamps(); | |||||
$table->index('preference'); | |||||
$table->unique(['username', 'preference']); | |||||
}); | |||||
} | |||||
/** | |||||
* Reverse the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function down() | |||||
{ | |||||
Schema::dropIfExists('spamassassin_userprefs'); | |||||
} | |||||
}; |