Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateUsersTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- // Account for existing users table.
- if (Schema::hasTable('users')) {
- return;
- }
- Schema::create('users', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('access_level')->unsigned()->default(10);
- $table->string('first_name');
- $table->string('last_name');
- $table->string('email')->unique();
- $table->string('password');
- $table->rememberToken();
- $table->timestamps();
- $table->softDeletes();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('users');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement