Skip to content

Commit aedbdd6

Browse files
committed
Fixes duplicated PHP tag in published migration stub
Removes a duplicated opening PHP block that caused published migrations to contain two <?php tags and trigger parse errors during artisan migrate. Ensures the photometry migration stub is published by the service provider and that the published migration is idempotent and rollback-safe. Also removes a redundant generated migration to avoid duplicate migrations.
1 parent 58d5dc0 commit aedbdd6

3 files changed

Lines changed: 7 additions & 113 deletions

File tree

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to `laravel-astronomy-library` will be documented in this file.
44

5+
## Version 6.7.2
6+
7+
Fixed:
8+
9+
- Removed a duplicated PHP block from the photometry migration stub so published migrations no longer contain two `<?php` tags (preventing parse errors when host apps run `php artisan migrate`). The corrected stub is `src/database/migrations/add_photometry_to_comets_orbital_elements_table.php.stub` and contains a single idempotent migration class.
10+
- Ensured the package publishes the photometry migration stub (service provider updated) and verified the migration is idempotent and rollback-safe.
11+
512
## Version 6.7.1
613

714
Changed:

src/database/migrations/add_photometry_to_comets_orbital_elements_table.php.stub

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -65,45 +65,3 @@ class AddPhotometryToCometsTable extends Migration
6565
});
6666
}
6767
}
68-
<?php
69-
70-
use Illuminate\Support\Facades\Schema;
71-
use Illuminate\Database\Schema\Blueprint;
72-
use Illuminate\Database\Migrations\Migration;
73-
74-
class AddPhotometryToCometsOrbitalElementsTable extends Migration
75-
{
76-
/**
77-
* Run the migrations.
78-
*/
79-
public function up()
80-
{
81-
Schema::table('comets_orbital_elements', function (Blueprint $table) {
82-
if (!Schema::hasColumn('comets_orbital_elements', 'H')) {
83-
$table->float('H', 6, 3)->nullable()->after('Tp');
84-
}
85-
if (!Schema::hasColumn('comets_orbital_elements', 'n')) {
86-
$table->float('n', 6, 3)->nullable()->after('H');
87-
}
88-
if (!Schema::hasColumn('comets_orbital_elements', 'phase_coeff')) {
89-
$table->float('phase_coeff', 6, 4)->nullable()->after('n');
90-
}
91-
if (!Schema::hasColumn('comets_orbital_elements', 'n_pre')) {
92-
$table->float('n_pre', 6, 3)->nullable()->after('phase_coeff');
93-
}
94-
if (!Schema::hasColumn('comets_orbital_elements', 'n_post')) {
95-
$table->float('n_post', 6, 3)->nullable()->after('n_pre');
96-
}
97-
});
98-
}
99-
100-
/**
101-
* Reverse the migrations.
102-
*/
103-
public function down()
104-
{
105-
Schema::table('comets_orbital_elements', function (Blueprint $table) {
106-
$table->dropColumn(['H', 'n', 'phase_coeff', 'n_pre', 'n_post']);
107-
});
108-
}
109-
}

src/deepskylog/AstronomyLibrary/Database/Migrations/2025_11_20_000001_add_photometry_to_comets_table.php

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)