123456789101112131415161718192021222324252627282930313233343536 |
- <?php
-
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
-
- class AddSsnAndEmployeeNumberToUsersTable extends Migration {
-
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::table('users', function(Blueprint $table)
- {
- $table->string('ssn', 9)->after('id')->nullable()->unique();
- $table->string('number', 10)->after('ssn')->nullable()->unique();
- });
- }
-
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::table('users', function(Blueprint $table)
- {
- $table->dropColumn(array('ssn', 'number'));
- });
- }
-
- }
|