|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace NilPortugues\Tests\Laravel5\JsonApi\Migrations; |
|
4
|
|
|
|
|
5
|
|
|
use Illuminate\Database\Migrations\Migration; |
|
6
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
7
|
|
|
use Illuminate\Support\Facades\Schema; |
|
8
|
|
|
|
|
9
|
|
|
class CreateEmployeesTable extends Migration |
|
10
|
|
|
{ |
|
11
|
|
|
/** |
|
12
|
|
|
* Run the migrations. |
|
13
|
|
|
*/ |
|
14
|
|
|
public function up() |
|
15
|
|
|
{ |
|
16
|
|
|
Schema::create('employees', function (Blueprint $table) { |
|
|
|
|
|
|
17
|
|
|
$table->integer('id', true); |
|
18
|
|
|
|
|
19
|
|
|
$table->string('company', 50)->nullable()->index('company'); |
|
20
|
|
|
$table->string('last_name', 50)->nullable()->index('last_name'); |
|
21
|
|
|
$table->string('first_name', 50)->nullable()->index('first_name'); |
|
22
|
|
|
$table->string('email_address', 50)->nullable(); |
|
23
|
|
|
$table->string('job_title', 50)->nullable(); |
|
24
|
|
|
$table->string('business_phone', 25)->nullable(); |
|
25
|
|
|
$table->string('home_phone', 25)->nullable(); |
|
26
|
|
|
$table->string('mobile_phone', 25)->nullable(); |
|
27
|
|
|
$table->string('fax_number', 25)->nullable(); |
|
28
|
|
|
$table->text('address')->nullable(); |
|
29
|
|
|
$table->string('city', 50)->nullable()->index('city'); |
|
30
|
|
|
$table->string('state_province', 50)->nullable()->index('state_province'); |
|
31
|
|
|
$table->string('zip_postal_code', 15)->nullable()->index('zip_postal_code'); |
|
32
|
|
|
$table->string('country_region', 50)->nullable(); |
|
33
|
|
|
$table->text('web_page')->nullable(); |
|
34
|
|
|
$table->text('notes')->nullable(); |
|
35
|
|
|
$table->binary('attachments')->nullable(); |
|
36
|
|
|
}); |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Reverse the migrations. |
|
41
|
|
|
*/ |
|
42
|
|
|
public function down() |
|
43
|
|
|
{ |
|
44
|
|
|
if (Schema::hasTable('employees')) { |
|
45
|
|
|
Schema::drop('employees'); |
|
46
|
|
|
} |
|
47
|
|
|
} |
|
48
|
|
|
} |
|
49
|
|
|
|
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.