Skip to content

Commit

Permalink
fix: only add column when it doesn't exist (#167)
Browse files Browse the repository at this point in the history
* fix: only add column when it doesn't exist

* style: formatting
  • Loading branch information
64knl authored Nov 22, 2023
1 parent b12e502 commit 5e6a9b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
*/
public function up(): void
{
if (Schema::hasColumn('menu', 'created_at')) {
return;
}
Schema::table('menu', function (Blueprint $table) {
$table->timestamp('created_at')->nullable();
});
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Editor/FieldsProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private function addLayoutFields(array $properties, LayoutForm &$form)
// $checkboxField->setValue(true);
// } else {
$checkboxField->setValue(false);
// }
// }
} else {
$checkboxField->setValue($value ?? false);
}
Expand Down

0 comments on commit 5e6a9b2

Please sign in to comment.