diff --git a/database/migrations/2014_10_12_000000_create_collaborators_table.php b/database/migrations/2014_10_12_000000_create_collaborators_table.php new file mode 100644 index 0000000..57dfa34 --- /dev/null +++ b/database/migrations/2014_10_12_000000_create_collaborators_table.php @@ -0,0 +1,36 @@ +id(); + $table->string('name'); + $table->string('email')->unique(); + $table->string('password'); + $table->string('avatar')->nullable(); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('collaborators'); + } +} diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2020_06_06_201558_create_associates_table.php similarity index 69% rename from database/migrations/2014_10_12_000000_create_users_table.php rename to database/migrations/2020_06_06_201558_create_associates_table.php index 35c7e22..a1d031c 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2020_06_06_201558_create_associates_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateUsersTable extends Migration +class CreateAssociatesTable extends Migration { /** * Run the migrations. @@ -13,24 +13,21 @@ class CreateUsersTable extends Migration */ public function up() { - Schema::create('users', function (Blueprint $table) { + Schema::create('associates', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('email')->unique(); $table->string('password'); - - // User profile - $table->foreignId('user_category_id'); - $table->foreignId('user_nature_id'); - $table->foreignId('user_type_id'); -// $table->string('avatar')->nullable(); + $table->foreignId('associate_category_id'); + $table->foreignId('associate_nature_id'); + $table->foreignId('associate_type_id'); + $table->string('avatar')->nullable(); $table->date('birthday'); $table->json('document')->nullable(); $table->json('address'); $table->string('discussion'); $table->integer('contribution'); $table->json('profile'); - $table->rememberToken(); $table->timestamps(); }); @@ -43,6 +40,6 @@ class CreateUsersTable extends Migration */ public function down() { - Schema::dropIfExists('users'); + Schema::dropIfExists('associates'); } }