-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6388 from kuzmany/points-each-page
Add repeatable points action
- Loading branch information
Showing
7 changed files
with
97 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
/* | ||
* @package Mautic | ||
* @copyright 2018 Mautic Contributors. All rights reserved. | ||
* @author Mautic | ||
* @link http://mautic.org | ||
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html | ||
*/ | ||
|
||
namespace Mautic\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\SkipMigrationException; | ||
use Doctrine\DBAL\Schema\Schema; | ||
use Mautic\CoreBundle\Doctrine\AbstractMauticMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20180730070549 extends AbstractMauticMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
* | ||
* @throws SkipMigrationException | ||
* @throws \Doctrine\DBAL\Schema\SchemaException | ||
*/ | ||
public function preUp(Schema $schema) | ||
{ | ||
if ($schema->getTable($this->prefix.'points')->hasColumn('repeatable')) { | ||
throw new SkipMigrationException('Schema includes this migration'); | ||
} | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
$this->addSql('ALTER TABLE '.$this->prefix.'points ADD repeatable TINYINT(1) NOT NULL;'); | ||
} | ||
} |