Skip to content

Commit

Permalink
Reverted key customizations w.r.t. requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaybokaderanium committed Feb 13, 2024
1 parent 4c63c8c commit 403cfa4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion database/migrations/create_user_consent_table.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ return new class extends Migration
{
Schema::create('consent_options', function (Blueprint $table) {
$table->id();
$table->string('key')->unique();
$table->string('key');
$table->unsignedBigInteger('version')->nullable()->default(1);
$table->string('title')->nullable()->default(null);
$table->string('label')->nullable()->default(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function handleRecordUpdate(Model $record, array $data): Model
if ($requiresNewVersion = $record->usersViewedThisVersion) {
//create a new version
$data['version'] = $record->nextVersionNumber;
$data['key'] = $record->key . '-' . $record->nextVersionNumber;
$data['key'] = $record->key;
$record = ConsentOption::create($data);
} else {
$record->update($data);
Expand Down

0 comments on commit 403cfa4

Please sign in to comment.