Skip to content
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

Messengers fields from user settings where removed #746

Merged
merged 5 commits into from
Dec 15, 2020
Merged

Messengers fields from user settings where removed #746

merged 5 commits into from
Dec 15, 2020

Conversation

MekDrop
Copy link
Member

@MekDrop MekDrop commented Aug 21, 2020

It seems messenger settings for user were previously removed from database but there were no migrations for that and fields were visible but no data were possible to edit. This pull request fixes that.

@MekDrop MekDrop added this to the 2.0.0 Beta 1 milestone Aug 21, 2020
@MekDrop MekDrop requested review from skenow and fiammybe August 21, 2020 22:07
$this->execute(
sprintf('ALTER TABLE %s ADD COLUMN `user_msnm` varchar(100) NOT NULL default \'\'', $this->prefix('users'))
);
$this->execute(
Copy link

Choose a reason for hiding this comment

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

Call to undeclared method \RemoveOldMessangersFromUserIfExists::execute

*/
private function prefix(string $table): string
{
return \icms::getInstance()->get('db-connection-1')->prefix($table);
Copy link

Choose a reason for hiding this comment

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

Call to undeclared method \icms::get

$this->execute(
sprintf('ALTER TABLE %s ADD COLUMN `user_aim` varchar(18) NOT NULL default \'\'', $this->prefix('users'))
);
$this->execute(
Copy link

Choose a reason for hiding this comment

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

Call to undeclared method \RemoveOldMessangersFromUserIfExists::execute

$this->execute(
sprintf('ALTER TABLE %s ADD COLUMN `user_yim` varchar(25) NOT NULL default \'\'', $this->prefix('users'))
);
$this->execute(
Copy link

Choose a reason for hiding this comment

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

Call to undeclared method \RemoveOldMessangersFromUserIfExists::execute


protected function down(): void
{
$this->execute(
Copy link

Choose a reason for hiding this comment

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

Call to undeclared method \RemoveOldMessangersFromUserIfExists::execute


protected function down(): void
{
$this->execute(
Copy link

Choose a reason for hiding this comment

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

Tabs must be used to indent lines; spaces are not allowed

protected function down(): void
{
$this->execute(
sprintf('ALTER TABLE %s ADD COLUMN `user_msnm` varchar(100) NOT NULL default \'\'', $this->prefix('users'))
Copy link

Choose a reason for hiding this comment

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

Tabs must be used to indent lines; spaces are not allowed

$this->execute(
sprintf('ALTER TABLE %s ADD COLUMN `user_icq` varchar(15) NOT NULL default \'\'', $this->prefix('users'))
);
}
Copy link

Choose a reason for hiding this comment

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

Tabs must be used to indent lines; spaces are not allowed

* @return string
*/
private function prefix(string $table): string
{
Copy link

Choose a reason for hiding this comment

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

Opening brace should be on the same line as the declaration


class RemoveOldMessangersFromUserIfExists extends AbstractMigration
{
protected function up(): void
Copy link

Choose a reason for hiding this comment

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

Avoid using short method names like RemoveOldMessangersFromUserIfExists::up(). The configured minimum method name length is 3.

@fiammybe fiammybe merged commit a407d93 into ImpressCMS:master Dec 15, 2020
@MekDrop MekDrop deleted the improvement/remove-old-messengers-fields-from-user-settings branch December 15, 2020 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants