2018_04_05_054510_create_employees_table.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CreateEmployeesTable extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. if (!Schema::hasTable('employees')){
  14. Schema::create('employees', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name',255);
  17. $table->string('personal_email',255);
  18. $table->string('phone',17);
  19. $table->text('present_address');
  20. $table->text('per_address')->nullable();
  21. $table->string('facebook',255)->nullable();
  22. $table->string('skype',255)->nullable();
  23. $table->string('linkedin',255)->nullable();
  24. $table->string('image',255)->nullable();
  25. $table->tinyInteger('ref_id');
  26. $table->tinyInteger('added_by')->nullable();
  27. $table->tinyInteger('updated_by')->nullable();
  28. $table->tinyInteger('status')->nullable();
  29. $table->tinyInteger('approved_by')->nullable();
  30. $table->softDeletes();
  31. $table->timestamps();
  32. });
  33. }
  34. }
  35. /**
  36. * Reverse the migrations.
  37. *
  38. * @return void
  39. */
  40. public function down()
  41. {
  42. Schema::drop('employees');
  43. }
  44. }