Initial Commit

This commit is contained in:
shibafu
2017-08-27 04:44:53 +09:00
commit be2cf3328a
114 changed files with 32069 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEjaculationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ejaculations', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id');
$table->timestamp('ejaculated_date');
$table->string('note', 500)->default('');
$table->double('geo_latitude')->nullable();
$table->double('geo_longitude')->nullable();
$table->boolean('is_private')->default(false);
$table->timestamps();
$table->index('user_id');
$table->unique(['user_id', 'ejaculated_date']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ejaculations');
}
}