forge->addColumn('organization_subscriptions', [ 'trial_ends_at' => [ 'type' => 'DATETIME', 'null' => true, 'after' => 'status', 'comment' => 'Дата окончания триального периода', ], ]); // Обновляем существующие триальные подписки (14 дней от created_at) $this->db->query(" UPDATE organization_subscriptions SET trial_ends_at = DATE_ADD(created_at, INTERVAL 14 DAY) WHERE status = 'trial' AND trial_ends_at IS NULL "); } public function down() { $this->forge->dropColumn('organization_subscriptions', 'trial_ends_at'); } }