Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions app/libs/Auth/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ public function __construct()
$this->email_verified = false;
$this->public_profile_show_photo = false;
$this->public_profile_show_email = false;
$this->public_profile_show_fullname = false;
$this->public_profile_allow_chat_with_me = false;
$this->public_profile_show_fullname = true;
$this->public_profile_allow_chat_with_me = true;
$this->password = "";
$this->identifier = null;
$this->gender_specify = "";
Expand Down
43 changes: 43 additions & 0 deletions database/migrations/Version20230601162315.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* Copyright 2023 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

namespace Database\Migrations;

use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema as Schema;

/**
* Class Version20230601162315
* @package Database\Migrations
*/
final class Version20230601162315 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE users MODIFY public_profile_show_fullname tinyint(1) DEFAULT '1' NOT NULL;");
$this->addSql("ALTER TABLE users MODIFY public_profile_allow_chat_with_me tinyint(1) DEFAULT '1' NOT NULL;");
}

/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE users MODIFY public_profile_show_fullname tinyint(1) DEFAULT '0' NOT NULL;");
$this->addSql("ALTER TABLE users MODIFY public_profile_allow_chat_with_me tinyint(1) DEFAULT '0' NOT NULL;");
}
}