show_warnings => $translator->show_warnings,
trace => $translator->trace,
version => $translator->version,
- }
+ },
+ keys %{$schema->extra} ? ('extra' => { $schema->extra } ) : (),
});
}
map { ($_->name => view_field($_)) }
$table->get_fields
},
+ keys %{$table->extra} ? ('extra' => { $table->extra } ) : (),
};
}
'options' => scalar $constraint->options,
'on_delete' => scalar $constraint->on_delete,
'on_update' => scalar $constraint->on_update,
- 'reference_fields' => scalar $constraint->reference_fields,
+ 'reference_fields' => [ map { ref $_ ? $_->name : $_ } $constraint->reference_fields ],
'reference_table' => scalar $constraint->reference_table,
'type' => scalar $constraint->type,
+ keys %{$constraint->extra} ? ('extra' => { $constraint->extra } ) : (),
};
}
'is_unique' => scalar $field->is_unique,
$field->is_auto_increment ? ('is_auto_increment' => 1) : (),
$field->comments ? ('comments' => $field->comments) : (),
- 'extra' => { $field->extra },
+ keys %{$field->extra} ? ('extra' => { $field->extra } ) : (),
};
}
'parameters' => scalar $procedure->parameters,
'owner' => scalar $procedure->owner,
'comments' => scalar $procedure->comments,
+ keys %{$procedure->extra} ? ('extra' => { $procedure->extra } ) : (),
};
}
'fields' => scalar $trigger->fields,
'on_table' => scalar $trigger->on_table,
'action' => scalar $trigger->action,
+ keys %{$trigger->extra} ? ('extra' => { $trigger->extra } ) : (),
};
}
'name' => scalar $view->name,
'sql' => scalar $view->sql,
'fields' => scalar $view->fields,
+ keys %{$view->extra} ? ('extra' => { $view->extra } ) : (),
};
}
'type' => scalar $index->type,
'fields' => scalar $index->fields,
'options' => scalar $index->options,
+ keys %{$index->extra} ? ('extra' => { $index->extra } ) : (),
};
}