Skip to content

Commit

Permalink
Merge pull request #31735 from nextcloud/fix/noid/mig-generator-copyr…
Browse files Browse the repository at this point in the history
…ight

migration generator also includes copyright section
  • Loading branch information
come-nc authored Mar 29, 2022
2 parents b984cd1 + ee00656 commit 9191ca4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions core/Command/Db/Migrations/GenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,28 @@ class GenerateCommand extends Command implements CompletionAwareInterface {
declare(strict_types=1);
/**
* @copyright Copyright (c) {{year}} Your name <your@email.com>
*
* @author Your name <your@email.com>
*
* @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 {{namespace}};
use Closure;
Expand Down Expand Up @@ -173,11 +195,13 @@ protected function generateMigration(MigrationService $ms, $className, $schemaBo
'{{namespace}}',
'{{classname}}',
'{{schemabody}}',
'{{year}}',
];
$replacements = [
$ms->getMigrationsNamespace(),
$className,
$schemaBody,
date('Y')
];
$code = str_replace($placeHolders, $replacements, self::$_templateSimple);
$dir = $ms->getMigrationsDirectory();
Expand Down

0 comments on commit 9191ca4

Please sign in to comment.