|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * Copyright 2023 OpenStack Foundation |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + * Unless required by applicable law or agreed to in writing, software |
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | + * See the License for the specific language governing permissions and |
| 12 | + * limitations under the License. |
| 13 | + **/ |
| 14 | + |
| 15 | +namespace Database\Migrations; |
| 16 | + |
| 17 | +use Doctrine\Migrations\AbstractMigration; |
| 18 | +use Doctrine\DBAL\Schema\Schema as Schema; |
| 19 | + |
| 20 | +/** |
| 21 | + * Class Version20230601162315 |
| 22 | + * @package Database\Migrations |
| 23 | + */ |
| 24 | +final class Version20230601162315 extends AbstractMigration |
| 25 | +{ |
| 26 | + /** |
| 27 | + * @param Schema $schema |
| 28 | + */ |
| 29 | + public function up(Schema $schema): void |
| 30 | + { |
| 31 | + $this->addSql("ALTER TABLE users MODIFY public_profile_show_fullname tinyint(1) DEFAULT '1' NOT NULL;"); |
| 32 | + $this->addSql("ALTER TABLE users MODIFY public_profile_allow_chat_with_me tinyint(1) DEFAULT '1' NOT NULL;"); |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * @param Schema $schema |
| 37 | + */ |
| 38 | + public function down(Schema $schema): void |
| 39 | + { |
| 40 | + $this->addSql("ALTER TABLE users MODIFY public_profile_show_fullname tinyint(1) DEFAULT '0' NOT NULL;"); |
| 41 | + $this->addSql("ALTER TABLE users MODIFY public_profile_allow_chat_with_me tinyint(1) DEFAULT '0' NOT NULL;"); |
| 42 | + } |
| 43 | +} |
0 commit comments