diff options
Diffstat (limited to 'backyard/php-api/trunk/database/migrations')
3 files changed, 69 insertions, 0 deletions
diff --git a/backyard/php-api/trunk/database/migrations/.gitkeep b/backyard/php-api/trunk/database/migrations/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/backyard/php-api/trunk/database/migrations/.gitkeep diff --git a/backyard/php-api/trunk/database/migrations/2014_10_12_000000_create_users_table.php b/backyard/php-api/trunk/database/migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 0000000..36a1db9 --- /dev/null +++ b/backyard/php-api/trunk/database/migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,36 @@ +<?php + +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', 60); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('users'); + } + +} diff --git a/backyard/php-api/trunk/database/migrations/2014_10_12_100000_create_password_resets_table.php b/backyard/php-api/trunk/database/migrations/2014_10_12_100000_create_password_resets_table.php new file mode 100644 index 0000000..679df38 --- /dev/null +++ b/backyard/php-api/trunk/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -0,0 +1,33 @@ +<?php + +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')->index(); + $table->timestamp('created_at'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('password_resets'); + } + +} |