Promociones para cada subdivicion
This commit is contained in:
@ -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 {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user