mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-05 01:24:38 +08:00
Added created_by and updated_by to entities. Fixes #3
This commit is contained in:
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddUsersToEntities extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pages', function (Blueprint $table) {
|
||||
$table->integer('created_by');
|
||||
$table->integer('updated_by');
|
||||
});
|
||||
Schema::table('chapters', function (Blueprint $table) {
|
||||
$table->integer('created_by');
|
||||
$table->integer('updated_by');
|
||||
});
|
||||
Schema::table('images', function (Blueprint $table) {
|
||||
$table->integer('created_by');
|
||||
$table->integer('updated_by');
|
||||
});
|
||||
Schema::table('books', function (Blueprint $table) {
|
||||
$table->integer('created_by');
|
||||
$table->integer('updated_by');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pages', function (Blueprint $table) {
|
||||
$table->dropColumn('created_by');
|
||||
$table->dropColumn('updated_by');
|
||||
});
|
||||
Schema::table('chapters', function (Blueprint $table) {
|
||||
$table->dropColumn('created_by');
|
||||
$table->dropColumn('updated_by');
|
||||
});
|
||||
Schema::table('images', function (Blueprint $table) {
|
||||
$table->dropColumn('created_by');
|
||||
$table->dropColumn('updated_by');
|
||||
});
|
||||
Schema::table('books', function (Blueprint $table) {
|
||||
$table->dropColumn('created_by');
|
||||
$table->dropColumn('updated_by');
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user