diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-10 09:34:57 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-10 15:36:27 +0100 |
commit | d5df033ede1f2b19b87c365b1f808130023edf17 (patch) | |
tree | d00503789c2e1188d59726e221dd9445e858f784 /lib/private/DB | |
parent | 5b5aebbf66e7559aac73eb82b236b052b6a1ae3e (diff) | |
download | nextcloud-server-d5df033ede1f2b19b87c365b1f808130023edf17.tar.gz nextcloud-server-d5df033ede1f2b19b87c365b1f808130023edf17.zip |
Create primary keys on all tables and add a command to create the afterwards
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB')
-rw-r--r-- | lib/private/DB/MissingPrimaryKeyInformation.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/private/DB/MissingPrimaryKeyInformation.php b/lib/private/DB/MissingPrimaryKeyInformation.php new file mode 100644 index 00000000000..c6b81ddba4e --- /dev/null +++ b/lib/private/DB/MissingPrimaryKeyInformation.php @@ -0,0 +1,42 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2018 Morris Jobke <hey@morrisjobke.de> + * + * @author Morris Jobke <hey@morrisjobke.de> + * @author Roeland Jago Douma <roeland@famdouma.nl> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OC\DB; + +class MissingPrimaryKeyInformation { + private $listOfMissingPrimaryKeys = []; + + public function addHintForMissingSubject(string $tableName) { + $this->listOfMissingPrimaryKeys[] = [ + 'tableName' => $tableName, + ]; + } + + public function getListOfMissingPrimaryKeys(): array { + return $this->listOfMissingPrimaryKeys; + } +} |