diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-12-14 18:42:36 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-12-14 18:42:36 +0000 |
| commit | d56a64a7f4421cf114ac18859e37461f5c90c2b3 (patch) | |
| tree | 52c59a06a4700316ee37489ff453066bf048a641 | |
| parent | 4bf73289691e1183e9f5535a9206b4effdca9d9c (diff) | |
| download | webtrees-d56a64a7f4421cf114ac18859e37461f5c90c2b3.tar.gz webtrees-d56a64a7f4421cf114ac18859e37461f5c90c2b3.tar.bz2 webtrees-d56a64a7f4421cf114ac18859e37461f5c90c2b3.zip | |
Remove remote linking (missed a file!)
| -rw-r--r-- | includes/db_schema/db_schema_6_7.php | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/includes/db_schema/db_schema_6_7.php b/includes/db_schema/db_schema_6_7.php new file mode 100644 index 0000000000..3099b4828c --- /dev/null +++ b/includes/db_schema/db_schema_6_7.php @@ -0,0 +1,66 @@ +<?php +/** + * Update the database schema from version 6 to 7 + * - remove tables/columns relating to remote linking + * + * The script should assume that it can be interrupted at + * any point, and be able to continue by re-running the script. + * Fatal errors, however, should be allowed to throw exceptions, + * which will be caught by the framework. + * It shouldn't do anything that might take more than a few + * seconds, for systems with low timeout values. + * + * phpGedView: Genealogy Viewer + * Copyright (C) 2010 Greg Roach + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @version $Id$ + */ + +if (!defined('WT_WEBTREES')) { + header('HTTP/1.0 403 Forbidden'); + exit; +} + +define('WT_DB_SCHEMA_6_7', ''); + +try { + self::exec( + "DROP TABLE `##remotelinks`" + ); +} catch (PDOException $ex) { + // already been done? +} + +try { + self::exec( + "ALTER TABLE `##sources` DROP INDEX ix2" + ); +} catch (PDOException $ex) { + // already been done? +} + +try { + self::exec( + "ALTER TABLE `##sources` DROP COLUMN s_dbid" + ); +} catch (PDOException $ex) { + // already been done? +} + +// Update the version to indicate success +set_site_setting($schema_name, $next_version); + |
