mirror of
https://github.com/flarum/core.git
synced 2025-08-19 06:41:44 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Flarum\Migrations\Approval;
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Flarum\Migrations\Migration;
|
||||
|
||||
class AddIsApprovedToDiscussions extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$this->schema->table('discussions', function (Blueprint $table) {
|
||||
$table->boolean('is_approved')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$this->schema->table('discussions', function (Blueprint $table) {
|
||||
$table->dropColumn('is_approved');
|
||||
});
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Flarum\Migrations\Approval;
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Flarum\Migrations\Migration;
|
||||
|
||||
class AddIsApprovedToPosts extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$this->schema->table('posts', function (Blueprint $table) {
|
||||
$table->boolean('is_approved')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$this->schema->table('posts', function (Blueprint $table) {
|
||||
$table->dropColumn('is_approved');
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user