Skip to content

Commit

Permalink
Rename "available_update" table to "availableupdate"
Browse files Browse the repository at this point in the history
This is needed to follow naming convention
  • Loading branch information
JustBlackBird committed Jun 5, 2015
1 parent 4b74ceb commit 6bf331b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/mibew/configs/database_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ plugin:
name: [name]

# Contains info about all available updates
available_update:
availableupdate:
fields:
# Artificial ID
id: "INT NOT NULL auto_increment PRIMARY KEY"
Expand Down
12 changes: 6 additions & 6 deletions src/mibew/libs/classes/Mibew/Maintenance/AvailableUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static function load($id)

// Load update's info
$info = Database::getInstance()->query(
"SELECT * FROM {available_update} WHERE id = :id",
"SELECT * FROM {availableupdate} WHERE id = :id",
array(':id' => $id),
array('return_rows' => Database::RETURN_ONE_ROW)
);
Expand Down Expand Up @@ -112,7 +112,7 @@ public static function loadByTarget($target)

// Load update info
$info = Database::getInstance()->query(
"SELECT * FROM {available_update} WHERE target = :target",
"SELECT * FROM {availableupdate} WHERE target = :target",
array(':target' => $target),
array('return_rows' => Database::RETURN_ONE_ROW)
);
Expand Down Expand Up @@ -140,7 +140,7 @@ public static function loadByTarget($target)
public static function all()
{
$rows = Database::getInstance()->query(
"SELECT * FROM {available_update}",
"SELECT * FROM {availableupdate}",
null,
array('return_rows' => Database::RETURN_ALL_ROWS)
);
Expand Down Expand Up @@ -182,7 +182,7 @@ public function delete()
}

Database::getInstance()->query(
"DELETE FROM {available_update} WHERE id = :id LIMIT 1",
"DELETE FROM {availableupdate} WHERE id = :id LIMIT 1",
array(':id' => $this->id)
);
}
Expand All @@ -209,7 +209,7 @@ public function save()
if (!$this->id) {
// This update is new.
$db->query(
("INSERT INTO {available_update} (target, version, url, description) "
("INSERT INTO {availableupdate} (target, version, url, description) "
. "VALUES (:target, :version, :url, :description)"),
array(
':target' => $this->target,
Expand All @@ -222,7 +222,7 @@ public function save()
} else {
// Update existing update
$db->query(
("UPDATE {available_update} SET target = :target, url = :url, "
("UPDATE {availableupdate} SET target = :target, url = :url, "
. "version = :version, description = :description "
. "WHERE id = :id"),
array(
Expand Down
2 changes: 1 addition & 1 deletion src/mibew/libs/classes/Mibew/Maintenance/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ protected function update20100()
$db->query('ALTER TABLE {locale} ADD UNIQUE KEY code (code)');

// Create a table for available updates.
$db->query('CREATE TABLE {available_update} ( '
$db->query('CREATE TABLE {availableupdate} ( '
. 'id INT NOT NULL auto_increment PRIMARY KEY, '
. 'target varchar(255) NOT NULL, '
. 'version varchar(255) NOT NULL, '
Expand Down

0 comments on commit 6bf331b

Please sign in to comment.