Procedural File: _functions_evoupgrade.php
Source Location: /blogs/install/_functions_evoupgrade.php
Functions
convert_lang_to_locale [line 160]
void convert_lang_to_locale(
string $table, string $columnlang, string $columnID
)
|
|
Converts languages in a given table into according locales
Parameters:
|
string |
$table: |
name of the table |
|
string |
$columnlang: |
name of the column where lang is stored |
|
string |
$columnID: |
name of the table's ID column |
boolean db_add_col(
$table, $col_name, $col_desc
)
|
|
Add a column, if it does not already exist.
If it exists already, a "ALTER TABLE" statement will get executed instead.
Parameters:
|
|
$table: |
|
|
|
$col_name: |
|
|
|
$col_desc: |
|
API Tags:
| Return: | True if the column has been added, False if not. |
void db_add_index(
$table, $name, $def, [ $type = 'INDEX']
)
|
|
Add an INDEX. If another index with the same name already exists, it will get dropped before.
Parameters:
|
|
$table: |
|
|
|
$name: |
|
|
|
$def: |
|
|
|
$type: |
|
boolean db_cols_exist(
string $table, array $col_names
)
|
|
Parameters:
|
string |
$table: |
Table name |
|
array |
$col_names: |
Column names |
API Tags:
| Return: | Does a list of given column names exist in DB? |
void db_drop_col(
$table, $col_name
)
|
|
Drops a column, if it exists.
Parameters:
db_index_exists [line 67]
boolean db_index_exists(
$table, $index_name
)
|
|
Parameters:
API Tags:
| Return: | Does a given index key name exist in DB? |
set_upgrade_checkpoint [line 30]
void set_upgrade_checkpoint(
string $version
)
|
|
Create a DB version checkpoint
This is useful when the next operation might timeout or fail! The checkpoint will allow to restart the script and continue where it stopped
Parameters:
|
string |
$version: |
version of DB at checkpoint |
upgrade_b2evo_tables [line 223]
void upgrade_b2evo_tables(
)
|
|
upgrade_b2evo_tables(-)