Class constructor
Mvblog_upgrade
__construct
()
Apply a specific database patch
void
apply_dbpatch
(int $patch, [ $mode = "release"])
-
int
$patch: The patch to apply
-
$mode
Create a database backup before running the pathes against it so we can rollback when something goes wrong
void
create_backups
()
Find out what patchfiles we need to commit.
array
get_patchfiles
([string $mode = "release"])
-
string
$mode: Can be svn or release and is used to pick the filenameformat.
Update/create dbversion setting in the database
void
set_latest_version
([int $version = 0])
-
int
$version: The latest patchlevel we applied to the database
Better addslashes for SQL queries.
Taken from phpMyAdmin and modified by me.
void
sql_addslashes
([ $a_string = ''], [ $is_like = FALSE])
Create mysql backup
bool
_mysql_backup_db
(string $database, string $backuplocation)
-
string
$database: The database name to backup
-
string
$backuplocation: The directory to store the backup in
Create postgresql backup. Code and ideas borrowed from phpPgAdmin.
bool
_psql_backup_db
(string $database, string $backuplocation)
-
string
$database: The database name to backup
-
string
$backuplocation: The directory to store the backup in