설명 없음

2015_07_13_132620_add_ssn_and_employee_number_to_users_table.php 640B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class AddSsnAndEmployeeNumberToUsersTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::table('users', function(Blueprint $table)
  13. {
  14. $table->string('ssn', 9)->after('id')->nullable()->unique();
  15. $table->string('number', 10)->after('ssn')->nullable()->unique();
  16. });
  17. }
  18. /**
  19. * Reverse the migrations.
  20. *
  21. * @return void
  22. */
  23. public function down()
  24. {
  25. Schema::table('users', function(Blueprint $table)
  26. {
  27. $table->dropColumn(array('ssn', 'number'));
  28. });
  29. }
  30. }