Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
#346: Add migration script to install 404 redirect plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
allanpilarca committed Mar 1, 2018
1 parent f2b6708 commit 8283b62
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Phinx\Migration\AbstractMigration;

class InstallPlgSystem404 extends AbstractMigration
{
public function up()
{
$sql = <<<EOL
INSERT INTO `extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`)
VALUES
(450, 'plg_system_404', 'plugin', '404', 'system', 0, 1, 1, 0, '{}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
EOL;

$this->execute($sql);
}

public function down()
{
$this->execute("DELETE FROM `extensions` WHERE `extensions`.`name` = 'plg_system_404'");
}
}

0 comments on commit 8283b62

Please sign in to comment.