Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

Commit

Permalink
Update realurl to 2.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
dreadwarrior committed Oct 10, 2016
1 parent ac1c69c commit 2e80267
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 17 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"php": ">=5.5.9",
"arg/tagcloud": "*@dev",
"typo3/cms": "~7.6",
"typo3-ter/realurl": "1.13.6",
"typo3-ter/realurl": "~2.1.4",
"dreadlabs/vantomas-website": "7.0.0",
"dreadlabs/app-migration-typo3": "~0.1.3",
"vlucas/phpdotenv": "~2.2.0",
Expand Down
27 changes: 11 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions migrations/20161010205136_realurl2x_upgrade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Phinx\Migration\AbstractMigration;

class Realurl2xUpgrade extends AbstractMigration
{
/**
* Up
*
* @return void
*/
public function up()
{
$this->query("ALTER TABLE tx_realurl_pathcache CHANGE cache_id uid int(11) NOT NULL");
$this->query("ALTER TABLE tx_realurl_pathcache DROP PRIMARY KEY");
$this->query("ALTER TABLE tx_realurl_pathcache MODIFY uid int(11) NOT NULL auto_increment primary key");
$this->query("DROP TABLE tx_realurl_chashcache");
$this->query("DROP TABLE tx_realurl_urldecodecache");
$this->query("DROP TABLE tx_realurl_urlencodecache");
$this->query("DROP TABLE tx_realurl_errorlog");
}
}
26 changes: 26 additions & 0 deletions migrations/20161010205702_realurl2x_install.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

use Phinx\Migration\AbstractMigration;

class Realurl2xInstall extends AbstractMigration
{
/**
* Up
*
* @return void
*/
public function up()
{
$this->query("CREATE TABLE tx_realurl_uniqalias_cache_map ( alias_uid int(11) NOT NULL default '0', url_cache_id int(11) NOT NULL default '0', KEY check_existence (alias_uid,url_cache_id) ) ENGINE=InnoDB");
$this->query("CREATE TABLE tx_realurl_urldata ( uid int(11) NOT NULL auto_increment, pid int(11) NOT NULL default '0', crdate int(11) NOT NULL default '0', page_id int(11) NOT NULL default '0', rootpage_id int(11) NOT NULL default '0', original_url text, speaking_url text, request_variables text, expire int(11) NOT NULL default '0', PRIMARY KEY (uid), KEY parent (pid), KEY pathq1 (rootpage_id,original_url(32),expire), KEY pathq2 (rootpage_id,speaking_url(32)), KEY page_id (page_id) ) ENGINE=InnoDB");
$this->query("CREATE TABLE tx_realurl_pathdata ( uid int(11) NOT NULL auto_increment, pid int(11) NOT NULL default '0', page_id int(11) NOT NULL default '0', language_id int(11) NOT NULL default '0', rootpage_id int(11) NOT NULL default '0', mpvar tinytext, pagepath text, expire int(11) NOT NULL default '0', PRIMARY KEY (uid), KEY parent (pid), KEY pathq1 (rootpage_id,pagepath(32),expire), KEY pathq2 (page_id,language_id,rootpage_id,expire), KEY expire (expire) ) ENGINE=InnoDB");
$this->query("ALTER TABLE tx_realurl_uniqalias ADD pid int(11) NOT NULL default '0'");
$this->query("ALTER TABLE tx_realurl_uniqalias ADD KEY parent (pid)");
$this->query("ALTER TABLE tx_realurl_uniqalias ENGINE=InnoDB");
$this->query("DROP TABLE tx_realurl_pathcache");
$this->query("DROP TABLE tx_realurl_redirects");
$this->query("ALTER TABLE tx_realurl_uniqalias DROP COLUMN tstamp");
$this->query("ALTER TABLE sys_domain DROP KEY tx_realurl");
$this->query("ALTER TABLE sys_template DROP KEY tx_realurl");
}
}

0 comments on commit 2e80267

Please sign in to comment.