Skip to content

Commit

Permalink
Merge f60dcce into 2a4f544
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredup committed May 15, 2023
2 parents 2a4f544 + f60dcce commit 79776a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions migrations/Version20201.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,14 @@ public function up(Schema $schema): void
$this->schema->getTable('user_company')
->addForeignKeyConstraint('users', ['user_id'], ['id']);

$this->schema
->getTable('user_company')
->dropPrimaryKey();

$this->persistChanges();

$this->migrate('users', false);

$this->schema->getTable('user_company')
->dropPrimaryKey();
$this->schema->getTable('user_company')
->setPrimaryKey(['company_id', 'user_id']);

Expand Down

0 comments on commit 79776a2

Please sign in to comment.