<?php
/*
 * Copyright (c) 2012, webvariants GbR, http://www.webvariants.de
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 */

sly_Core::cache()->flush('realurl2', true);

function realurl2DropColumn($name) {
	$pdo = sly_DB_Persistence::getInstance();
	$pre = sly_Core::getTablePrefix();

	$pdo->query('SHOW COLUMNS FROM '.$pre.'article WHERE Field = ?', array($name));

	if ($pdo->affectedRows() == 1) {
		$pdo->query('ALTER TABLE '.$pre.'article DROP COLUMN '.$name);
	}
}

realurl2DropColumn('wv24_fragment');
realurl2DropColumn('wv24_skip');
