Implemented echoarea/filearea security
This commit is contained in:
46
database/migrations/2023_07_28_071914_echoarea_security.php
Normal file
46
database/migrations/2023_07_28_071914_echoarea_security.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
DB::statement('ALTER TABLE echoareas RENAME COLUMN public TO show');
|
||||
DB::statement('ALTER TABLE fileareas RENAME COLUMN public TO show');
|
||||
|
||||
Schema::table('echoareas',function (Blueprint $table) {
|
||||
$table->smallInteger('security')->unsigned()->nullable();
|
||||
});
|
||||
Schema::table('fileareas',function (Blueprint $table) {
|
||||
$table->smallInteger('security')->unsigned()->nullable();
|
||||
});
|
||||
Schema::table('addresses',function (Blueprint $table) {
|
||||
$table->smallInteger('security')->unsigned()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
DB::statement('ALTER TABLE echoareas RENAME COLUMN show TO public');
|
||||
DB::statement('ALTER TABLE fileareas RENAME COLUMN show TO public');
|
||||
|
||||
Schema::table('echoareas',function (Blueprint $table) {
|
||||
$table->dropColumn(['security']);
|
||||
});
|
||||
Schema::table('fileareas',function (Blueprint $table) {
|
||||
$table->dropColumn(['security']);
|
||||
});
|
||||
Schema::table('addresses',function (Blueprint $table) {
|
||||
$table->dropColumn(['security']);
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user