Skip to content

Commit

Permalink
changed migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
anne-maina committed Nov 13, 2024
1 parent 405908e commit 2b09728
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class UpdateUsersTable extends Migration
public function up()
{
// TASK: add an if-statement in this file to NOT add column if it already exists

if (!Schema::hasColumn('users', 'name')) {
Schema::table('users', function (Blueprint $table) {
$table->string('name');
Expand All @@ -28,6 +29,6 @@ public function up()
*/
public function down()
{
Schema::dropIfExists('users');
//
}
}

0 comments on commit 2b09728

Please sign in to comment.