Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ class Migration1754897550AddFieldsToMigrationLogs extends MigrationStep

public const OPTIONAL_FIELDS = [
'entity_name' => 'VARCHAR(64) NULL',
'entity_id' => 'BINARY(16) NULL',
'field_name' => 'VARCHAR(64) NULL',
'field_source_path' => 'VARCHAR(255) NULL',
'source_data' => 'JSON NULL',
'converted_data' => 'JSON NULL',
'used_mapping' => 'JSON NULL',
'exception_message' => 'VARCHAR(255) NULL',
'exception_trace' => 'JSON NULL',
];
Expand Down Expand Up @@ -163,6 +163,16 @@ private function ensureRelations(Connection $connection, AbstractSchemaManager $
)
);

// ensure entity_id index
if (!$this->indexExists($connection, self::MIGRATION_LOGGING_TABLE, 'idx.entity_id')) {
$connection->executeStatement(
\sprintf(
'ALTER TABLE `%s` ADD INDEX `idx.entity_id` (`entity_id`);',
self::MIGRATION_LOGGING_TABLE
)
);
}

// ensure foreign key constraint
$connection->executeStatement(
\sprintf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Migration1757598733AddMigrationFixesTable extends MigrationStep
public const FIELDS = [
'id' => 'BINARY(16) NOT NULL',
'connection_id' => 'BINARY(16) NOT NULL',
'main_mapping_id' => 'BINARY(16) NOT NULL',
'value' => 'JSON NOT NULL',
'path' => 'VARCHAR(255) NOT NULL',
'entity_name' => 'VARCHAR(255) NULL',
Expand All @@ -49,7 +48,7 @@ public function update(Connection $connection): void
%s,
PRIMARY KEY (`id`),
CONSTRAINT `fk.swag_migration_fix.connection_id` FOREIGN KEY (`connection_id`) REFERENCES `swag_migration_connection` (`id`) ON DELETE CASCADE,
CONSTRAINT `fk.swag_migration_fix.main_mapping_id` FOREIGN KEY (`main_mapping_id`) REFERENCES `swag_migration_mapping` (`id`) ON DELETE CASCADE
INDEX `idx.entity_id` (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
', self::MIGRATION_FIXES_TABLE, implode(', ', $columns));

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading