Promociones para cada subdivicion

This commit is contained in:
Juan Pablo Vial
2025-04-03 16:32:40 -03:00
parent b5d6d0acb9
commit 7b2df74e4d
19 changed files with 495 additions and 247 deletions

View File

@ -17,11 +17,15 @@ final class AlterPromotionsRemovePrice extends AbstractMigration
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function change(): void
public function up(): void
{
$this->table('promotions')
->dropForeignKey('price_id')
->removeColumn('price_id')
->update();
if ($this->table('promotions')->hasColumn('price_id')) {
$this->table('promotions')
->dropForeignKey('price_id')
->removeColumn('price_id')
->update();
}
}
public function down(): void {}
}