So this is a newly created project and I haven’t touched any of the other files except the migrations I tried to add into the existing users table alongside with the laravel breeze package but to no avail
here is the content of the migration file:
<?php
use IlluminateDatabaseMigrationsMigration;
use IlluminateDatabaseSchemaBlueprint;
use IlluminateSupportFacadesSchema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->date ('birth_date');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
//
});
}
};
then here is the terminal saying that it has been migrated:
`C:xampphtdocslaravel8new_app>php artisan migrate
INFO Running migrations.
2024_06_25_105407_add_birthdate_to_users_table ………………………………………………………………………….. 47.34ms DONE
`
On another note whenever I register a new user the database seem to have no problem with the connection just the adding of new columns through migration.
I did a lot of refresh and rollbacks to my previous projects but no changes to the database still.
here is when I tried to create a lot of migration files just to make sure if any of them gets past
INFO Running migrations.
0001_01_01_000000_create_users_table ..................................................................................................... 1s DONE
0001_01_01_000001_create_cache_table ............................................................................................... 472.43ms DONE
0001_01_01_000002_create_jobs_table ...................................................................................................... 1s DONE
2024_06_25_085519_add_gender_and_birthdate_to_users .................................................................................. 0.11ms DONE
2024_06_25_085730_add_gender_and_birthdate_to_users_2 ................................................................................ 0.40ms DONE
2024_06_25_085737_add_gender_and_birthdate_to_users_3 ................................................................................ 0.11ms DONE
2024_06_25_085740_add_gender_and_birthdate_to_users_4 ................................................................................ 0.16ms DONE
there are no errors at all
Backup Camvids is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.