diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index 68dec9a..28fa7b4 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -17,7 +17,6 @@ public function up(): void $table->id(); $table->foreignId('role_id')->default(1)->constrained(); $table->string('name'); - $table->string('username')->unique(); $table->string('email')->unique(); $table->string('azure_id')->nullable()->unique(); $table->string('photo')->nullable(); diff --git a/database/migrations/2026_03_19_000000_add_username_to_users_table.php b/database/migrations/2026_03_19_000000_add_username_to_users_table.php new file mode 100644 index 0000000..fa3bf19 --- /dev/null +++ b/database/migrations/2026_03_19_000000_add_username_to_users_table.php @@ -0,0 +1,31 @@ +string('username')->unique()->nullable()->after('name'); + }); + } + + /** + * Remove the username column from the users table. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table): void { + $table->dropColumn('username'); + }); + } +};