Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
make oauth2 client secret column larger
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Jun 14, 2023
commit 24e517c5b3c67a5d88923a8e59b285886cdefa5b
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
$table = $schema->getTable('oauth2_clients');
if ($table->hasColumn('secret')) {
$column = $table->getColumn('secret');
$column->setLength(256);
$column->setLength(512);
Copy link
Member

Choose a reason for hiding this comment

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

Changing migrations later on feels iffy

Copy link
Member Author

Choose a reason for hiding this comment

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

@rullzer Not sure what to do here.

If we keep Version011601Date20230522143227 with 256 and add a step that just changes the column length we don't prevent problems when the existing secrets will be encrypted and the update will fail because we try to store values that are too long.

We could:

  • change the value in Version011601Date20230522143227 so that people who never ran it have the correct column length before encrypting the existing values
  • add a step that changes the column length to 512 again for people who already ran the previous step successfully

What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I see the trouble
But you need indeed another one for people that did already run the migration

return $schema;
}
}
Expand Down