about summary refs log tree commit diff
path: root/laravel/database/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'laravel/database/migrations')
-rw-r--r--laravel/database/migrations/2014_10_12_000000_create_users_table.php36
-rw-r--r--laravel/database/migrations/2014_10_12_100000_create_password_resets_table.php32
2 files changed, 68 insertions, 0 deletions
diff --git a/laravel/database/migrations/2014_10_12_000000_create_users_table.php b/laravel/database/migrations/2014_10_12_000000_create_users_table.php
new file mode 100644
index 0000000..16a6108
--- /dev/null
+++ b/laravel/database/migrations/2014_10_12_000000_create_users_table.php
@@ -0,0 +1,36 @@
+<?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->timestamp('email_verified_at')->nullable();
+            $table->string('password');
+            $table->rememberToken();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('users');
+    }
+}
diff --git a/laravel/database/migrations/2014_10_12_100000_create_password_resets_table.php b/laravel/database/migrations/2014_10_12_100000_create_password_resets_table.php
new file mode 100644
index 0000000..0d5cb84
--- /dev/null
+++ b/laravel/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');
+    }
+}