1 | <?php |
||
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 |