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

feat: add commands for exporting current and expected database schema #46194

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

icewind1991
Copy link
Member

Can be useful when investigating database related issue.

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Jun 28, 2024
@icewind1991 icewind1991 added this to the Nextcloud 30 milestone Jun 28, 2024
@icewind1991 icewind1991 requested review from come-nc, a team, yemkareems and sorbaugh and removed request for a team June 28, 2024 15:11
core/Command/Db/SchemaEncoder.php Fixed Show resolved Hide resolved
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good apart from deprecated method call.

core/Command/Db/SchemaEncoder.php Fixed Show resolved Hide resolved
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
core/Command/Db/SchemaEncoder.php Fixed Show fixed Hide fixed
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good addition!

$output->writeln($schema->toSql($this->connection->getDatabasePlatform()));
} else {
$encoder = new SchemaEncoder();
$this->writeArrayInOutputFormat($input, $output, $encoder->encodeSchema($schema, $this->connection->getDatabasePlatform()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add support for iterables in there to some day be able to output while computing when not using json output.

@icewind1991 icewind1991 merged commit 5f7b33f into master Jul 2, 2024
165 checks passed
@icewind1991 icewind1991 deleted the schema-export-cmnd branch July 2, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants