schema-builder
schema-builder copied to clipboard
Foreign keys migration name
i use multiple packages with generated migrations.
Then the foreign key migrations are not unique, so error.
This creates the foreign keys migrations as a unique filename and class.
(there are numerous commits but the end result is just 2 files changed)
good point.
Noud On Mon, 2021-05-31 at 06:30 -0700, Iftekhar Rifat wrote:
@Agontuk commented on this pull request.
In src/Migrations/MigrationCreator.php:
{// Update time interval each time so that migration // files are created with different timestamp. $this->setTimeInterval($this->getTimeInterval() + 60);
$path = $this->getDatePrefix() . '_create_foreign_keys_table.php';
$schemaPart = $classPart = '';if ($schemaName) {$schemaPart = '_for_' . str_replace(' ', '_', $schemaName);Maybe we need to convert $schemaName to lowercase here in case anyone provides uppercase name. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.