first commit
This commit is contained in:
commit
0baac018a2
1011 changed files with 145854 additions and 0 deletions
88
database/migrations/2019_09_31_000000_create_users_table.php
Normal file
88
database/migrations/2019_09_31_000000_create_users_table.php
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
|
||||
$table->unsignedInteger('account_id')->nullable();
|
||||
$table->unsignedInteger('m_level')->nullable();
|
||||
$table->unsignedInteger('m_sponsor')->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('admin')->default(0);
|
||||
$table->unsignedTinyInteger('wizard')->default(0);
|
||||
$table->boolean('blocked')->default(false);
|
||||
|
||||
$table->boolean('confirmed')->default(false);
|
||||
$table->string('confirmation_code', 30)->index()->nullable();
|
||||
$table->timestamp('confirmation_date')->nullable();
|
||||
$table->dateTime('confirmation_code_to')->nullable();
|
||||
$table->unsignedTinyInteger('confirmation_code_remider')->default(0);
|
||||
|
||||
$table->boolean('active')->default(false);
|
||||
$table->timestamp('active_date')->nullable();
|
||||
$table->dateTime('agreement')->nullable();
|
||||
|
||||
$table->char('lang', 2)->nullable();
|
||||
$table->text('notes')->nullable();
|
||||
|
||||
$table->timestamp('last_login')->nullable();
|
||||
|
||||
$table->timestamp('release_account')->nullable();
|
||||
$table->timestamp('account_payment')->nullable();
|
||||
$table->string('payment_methods')->nullable();
|
||||
$table->unsignedInteger('next_m_level')->nullable();
|
||||
$table->boolean('abo_options')->default(false);
|
||||
|
||||
$table->boolean('test_mode')->default(false);
|
||||
$table->text('settings')->nullable();
|
||||
|
||||
$table->rememberToken();
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('account_id')
|
||||
->references('id')
|
||||
->on('user_accounts');
|
||||
|
||||
$table->foreign('m_level')
|
||||
->references('id')
|
||||
->on('user_levels');
|
||||
|
||||
$table->foreign('next_m_level')
|
||||
->references('id')
|
||||
->on('user_levels');
|
||||
|
||||
$table->foreign('m_sponsor')
|
||||
->references('id')
|
||||
->on('users');
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue