Skip to content

only check the changed tables for oracle compliance - #10554

Closed
icewind1991 wants to merge 1 commit into
masterfrom
migration-table-check-diff
Closed

only check the changed tables for oracle compliance#10554
icewind1991 wants to merge 1 commit into
masterfrom
migration-table-check-diff

Conversation

@icewind1991

Copy link
Copy Markdown
Member

this prevents a migration from being blocked by tables from a disabled app

Note that this still checks all parts of the touched tables, not just the changes made to the table.

Comment threadlib/private/DB/MigrationService.php Outdated
$this->ensureOracleIdentifierLengthLimit($targetSchema, strlen($this->connection->getPrefix()));

$comparator = new Comparator();
$diff = $comparator->compare((new SchemaWrapper($this->connection))->getWrappedSchema(), $targetSchema);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of (new SchemaWrapper($this->connection))->getWrappedSchema() just do $this->connection->createSchema()

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

🙈

this prevents a migration from being blocked by tables from a disabled app
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991
icewind1991force-pushed the migration-table-check-diff branch from d28005d to 0ad4750CompareAugust 6, 2018 16:03
/** @var \Doctrine\DBAL\Schema\TableDiff[] $tables */
$tables = array_merge($schema->changedTables, $schema->newTables);
foreach ($tables as $tableDiff) {
$table = $targetSchema->getTable($tableDiff->name);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Doesn't work on mysql because the database name is added.
I will finish my manual comparing PR instead

@nickvergessen

Copy link
Copy Markdown
Member

Replaced by #10555

@rullzerrullzer closed this Aug 8, 2018
@rullzer
rullzer deleted the migration-table-check-diff branch August 8, 2018 06:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@icewind1991@nickvergessen@rullzer