diff --git a/database/migrations/2022_08_17_185328_change_nullable_password_to_users_table.php b/database/migrations/2022_08_17_185328_change_nullable_password_to_users_table.php new file mode 100644 index 0000000..9b45895 --- /dev/null +++ b/database/migrations/2022_08_17_185328_change_nullable_password_to_users_table.php @@ -0,0 +1,32 @@ +string('password')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->string('password')->change(); + }); + } +}; diff --git a/database/migrations/2022_08_17_185432_create_providers_table.php b/database/migrations/2022_08_17_185432_create_providers_table.php new file mode 100644 index 0000000..ef07059 --- /dev/null +++ b/database/migrations/2022_08_17_185432_create_providers_table.php @@ -0,0 +1,37 @@ +id(); + $table->string('provider'); + $table->string('id_provider'); + $table->string('avatar')->nullable(); + $table->timestamps(); + $table->foreignId('id_user') + ->constrained('users') + ->onDelete('cascade');; + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('providers'); + } +};