-
Notifications
You must be signed in to change notification settings - Fork 512
User: Remove user.registration_date #6045 #6059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,7 +93,7 @@ function confirmation(name) { | |
$user_data['old_password'] = $user_data['password']; | ||
//Convert the registration date of the user | ||
|
||
$user_data['registration_date'] = api_get_local_time($user_data['registration_date']); | ||
$user_data['created_at'] = api_get_local_time($user_data['created_at']); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Variable "user_data" is not in valid camel caps format |
||
unset($user_data['password']); | ||
|
||
// Create the form | ||
|
@@ -288,7 +288,7 @@ function confirmation(name) { | |
get_lang('Create by <a href="%s">%s</a> on %s'), | ||
'user_information.php?user_id='.$user_data['creator_id'], | ||
$creatorInfo['username'], | ||
$user_data['registration_date'] | ||
$user_data['created_at'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Variable "user_data" is not in valid camel caps format |
||
); | ||
$form->addElement('label', get_lang('Registration date'), $date); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a single space around assignment operators |
||
|
||
/* For licensing terms, see /license.txt */ | ||
|
||
namespace Chamilo\CoreBundle\Migrations\Schema\V200; | ||
|
||
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
final class Version20250129120000 extends AbstractMigrationChamilo | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing class doc comment |
||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Remove registration_date from user table and migrate data to created_at'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->addSql('UPDATE user SET created_at = registration_date WHERE created_at IS NULL'); | ||
|
||
$this->addSql('ALTER TABLE user DROP COLUMN registration_date'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE user ADD registration_date DATETIME DEFAULT NULL'); | ||
|
||
$this->addSql('UPDATE user SET registration_date = created_at WHERE registration_date IS NULL'); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable "user_data" is not in valid camel caps format