inital commit

This commit is contained in:
2024-02-01 09:53:53 +00:00
commit 9743fce12b
19771 changed files with 4230637 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<?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('username')->unique();
$table->string('password');
$table->string('name')->nullable();
$table->string('first_name', 100)->nullable();
$table->string('last_name', 100)->nullable();
$table->string('email')->nullable();
$table->char('mobile', 11)->nullable();
$table->string('position')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->unsignedSmallInteger('city_id')->nullable();
$table->foreign('city_id')
->references('id')
->on('cities');
$table->rememberToken();
$table->boolean('confirmed')->default(0);
$table->boolean('enabled')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}