Added created_by and updated_by to entities. Fixes #3

This commit is contained in:
Dan Brown
2015-08-08 21:28:50 +01:00
parent fc50a1400d
commit 52033f3a6f
13 changed files with 132 additions and 3 deletions

View File

@ -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');
});
}
}