This commit is contained in:
+8
@@ -8,6 +8,10 @@ class AddExternalParticipantFieldsToEventCharges extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (! $this->db->tableExists('event_charges')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fields = [
|
||||
'external_firstname' => [
|
||||
'type' => 'VARCHAR',
|
||||
@@ -34,6 +38,10 @@ class AddExternalParticipantFieldsToEventCharges extends Migration
|
||||
|
||||
public function down()
|
||||
{
|
||||
if (! $this->db->tableExists('event_charges')) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (['external_firstname', 'external_lastname', 'external_note'] as $field) {
|
||||
if ($this->db->fieldExists($field, 'event_charges')) {
|
||||
$this->forge->dropColumn('event_charges', $field);
|
||||
|
||||
Reference in New Issue
Block a user