This repository has been archived by the owner on Sep 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bad spelling mistakes in database schema and standardize plurals
- Loading branch information
Jamie Snape
committed
Nov 20, 2014
1 parent
b8d8de3
commit f181b0a
Showing
22 changed files
with
342 additions
and
259 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
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
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
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,48 @@ | ||
<?php | ||
/*========================================================================= | ||
MIDAS Server | ||
Copyright (c) Kitware SAS. 26 rue Louis Guérin. 69100 Villeurbanne, FRANCE | ||
All rights reserved. | ||
More information http://www.kitware.com | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0.txt | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
=========================================================================*/ | ||
|
||
/** Upgrade the core to version 3.2.18. */ | ||
class Upgrade_3_2_18 extends MIDASUpgrade | ||
{ | ||
|
||
/** Upgrade a MySQL database. */ | ||
public function mysql() | ||
{ | ||
$this->db->query("ALTER TABLE `folder` DROP KEY `left_indice`;"); | ||
$this->db->query("ALTER TABLE `folder` DROP KEY `right_indice`;"); | ||
$this->db->query("ALTER TABLE `folder` CHANGE `left_indice` `left_index` bigint(20) NOT NULL;"); | ||
$this->db->query("ALTER TABLE `folder` CHANGE `right_indice` `right_index` bigint(20) NOT NULL;"); | ||
$this->db->query("ALTER TABLE `folder` ADD KEY (`left_index`);"); | ||
$this->db->query("ALTER TABLE `folder` ADD KEY (`right_index`);"); | ||
$this->db->query("ALTER TABLE `feed` CHANGE `ressource` `resource` varchar(255) NOT NULL;"); | ||
} | ||
|
||
/** Upgrade a PostgreSQL database. */ | ||
public function pgsql() | ||
{ | ||
$this->db->query("DROP INDEX IF EXISTS folder_idx_left_indice;"); | ||
$this->db->query("DROP INDEX IF EXISTS folder_idx_right_indice;"); | ||
$this->db->query("ALTER TABLE folder RENAME left_indice TO left_index;"); | ||
$this->db->query("ALTER TABLE folder RENAME right_indice TO right_index;"); | ||
$this->db->query("CREATE INDEX folder_idx_left_index ON folder (left_index);"); | ||
$this->db->query("CREATE INDEX folder_idx_right_index ON folder (right_index);"); | ||
$this->db->query("ALTER TABLE feed RENAME ressource TO resource;"); | ||
} | ||
} |
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
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
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
Oops, something went wrong.