diff options
| author | horus_arch | 2018-02-07 18:07:53 +0100 |
|---|---|---|
| committer | horus_arch | 2018-02-07 18:07:53 +0100 |
| commit | 92eb8143762e116e8959f6270271fd5540ca50ac (patch) | |
| tree | a9fdc5009b9816fb448431b24bac38f7a215d40d /site/database/migrations | |
| parent | 71950479fbd6088f249e5fda3b180f294d1d745d (diff) | |
| download | alkobote-92eb8143762e116e8959f6270271fd5540ca50ac.tar.gz | |
Adds basic site in laravel.
Diffstat (limited to 'site/database/migrations')
| -rw-r--r-- | site/database/migrations/2014_10_12_000000_create_users_table.php | 35 | ||||
| -rw-r--r-- | site/database/migrations/2014_10_12_100000_create_password_resets_table.php | 32 |
2 files changed, 67 insertions, 0 deletions
diff --git a/site/database/migrations/2014_10_12_000000_create_users_table.php b/site/database/migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 0000000..689cbee --- /dev/null +++ b/site/database/migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,35 @@ +<?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() + { + Schema::create('users', function (Blueprint $table) { + $table->increments('id'); + $table->string('name'); + $table->string('email')->unique(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('users'); + } +} diff --git a/site/database/migrations/2014_10_12_100000_create_password_resets_table.php b/site/database/migrations/2014_10_12_100000_create_password_resets_table.php new file mode 100644 index 0000000..0d5cb84 --- /dev/null +++ b/site/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreatePasswordResetsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('password_resets', function (Blueprint $table) { + $table->string('email')->index(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('password_resets'); + } +} |
