This repository has been archived by the owner on Mar 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac1c69c
commit 2e80267
Showing
4 changed files
with
60 additions
and
17 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,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"); | ||
} | ||
} |
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,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"); | ||
} | ||
} |