summaryrefslogtreecommitdiff
path: root/site/database/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'site/database/migrations')
-rw-r--r--site/database/migrations/2014_10_12_000000_create_users_table.php35
-rw-r--r--site/database/migrations/2014_10_12_100000_create_password_resets_table.php32
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');
+ }
+}