forked from yakamara/yrewrite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.php
More file actions
31 lines (24 loc) · 747 Bytes
/
uninstall.php
File metadata and controls
31 lines (24 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* YREWRITE Addon.
*
* @author jan.kristinus@yakamara.de
*
* @package redaxo\yrewrite
*
* @var rex_addon $this
*/
rex_sql_table::get(rex::getTable('article'))
->removeColumn('yrewrite_url')
->removeColumn('yrewrite_priority')
->removeColumn('yrewrite_changefreq')
->removeColumn('yrewrite_title')
->removeColumn('yrewrite_description')
->removeColumn('yrewrite_index')
->alter()
;
$sql = rex_sql::factory();
$sql->setQuery(sprintf('DROP TABLE IF EXISTS `%s`;', rex::getTable('yrewrite_domain')));
$sql->setQuery(sprintf('DROP TABLE IF EXISTS `%s`;', rex::getTable('yrewrite_alias')));
$sql->setQuery(sprintf('DROP TABLE IF EXISTS `%s`;', rex::getTable('yrewrite_forward')));
rex_delete_cache();