2015_08_08_200447_add_users_to_entities.php
1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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');
});
}
}