Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MigrationBuilder::$maxSqlOutputLength is always 0 #205

Closed
Tigrov opened this issue Oct 14, 2023 · 2 comments
Closed

MigrationBuilder::$maxSqlOutputLength is always 0 #205

Tigrov opened this issue Oct 14, 2023 · 2 comments
Milestone

Comments

@Tigrov
Copy link
Member

Tigrov commented Oct 14, 2023

Any plans to use it? Or possible use it outside the pakage?

public function __construct(
private ConnectionInterface $db,
private MigrationInformerInterface $informer,
private int $maxSqlOutputLength = 0
) {

Used in one place

if ($this->maxSqlOutputLength > 0) {
$sqlOutput = StringHelper::truncateEnd($sql, $this->maxSqlOutputLength, '[... hidden]');
}

Initialized in one place

return new MigrationBuilder(
$this->db,
$informer ?? $this->informer,
);

@vjik
Copy link
Member

vjik commented Oct 14, 2023

This option must be configurable. Suggest so way:

  1. Add to Migrator constructor:
private ?int $maxSqlOutputLength = null
  1. $maxSqlOutputLength in MigrationBuilder make mandatory.

  2. Add this parameter to package configuration.

@vjik vjik added this to the 1.0.0 milestone Oct 14, 2023
@vjik
Copy link
Member

vjik commented Oct 16, 2023

Done by #211

@vjik vjik closed this as completed Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants