Skip to content

Commit

Permalink
fixing migration
Browse files Browse the repository at this point in the history
  • Loading branch information
glenmoreilagan committed Jun 15, 2024
1 parent 8a15fc8 commit aa16818
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
public function up(): void
{
Schema::table('purchases', function (Blueprint $table) {
$table->dropColumn('document_no');
if (Schema::hasColumn('purchases', 'document_no')) {
$table->dropColumn('document_no');
}
$table->after('id', function (Blueprint $table) {
$table->foreignId('document_id')->nullable()->constrained(
table: 'document_numbers',
Expand Down

0 comments on commit aa16818

Please sign in to comment.