]> BookStack Code Mirror - bookstack/blob - database/migrations/2014_10_12_000000_create_users_table.php
5e060006e5c837f7e34ab79b0d2edbd92c83cec2
[bookstack] / database / migrations / 2014_10_12_000000_create_users_table.php
1 <?php
2
3 use Illuminate\Database\Schema\Blueprint;
4 use Illuminate\Database\Migrations\Migration;
5
6 class CreateUsersTable extends Migration
7 {
8     /**
9      * Run the migrations.
10      *
11      * @return void
12      */
13     public function up()
14     {
15         Schema::create('users', function (Blueprint $table) {
16             $table->increments('id');
17             $table->string('name');
18             $table->string('email')->unique();
19             $table->string('password', 60);
20             $table->rememberToken();
21             $table->nullableTimestamps();
22         });
23
24         \BookStack\User::forceCreate([
25             'name' => 'Admin',
26             'email' => '[email protected]',
27             'password' => bcrypt('password')
28         ]);
29     }
30
31     /**
32      * Reverse the migrations.
33      *
34      * @return void
35      */
36     public function down()
37     {
38         Schema::drop('users');
39     }
40 }