BootstrapMigrations extends Migrations implements BootstrapMigrationsInterface

Class BootstrapMigrations

Action specific migrations extend this class. The function runModuleMigrations is what the migration manager is looking for. Log and error are shown on the web interface and / or emailed.

public properties
$action
$shortname
$path
$title
$description
$icon
public function runModuleMigrations()

This function is called by the migration manager and should include calls to all needed migration functions.

public function runMigrationFromFile($filename)

Runs migrations from an sql file inside the Migrations directory of your action. Will replace {{app_id}} with the ID of the app when run from the web.

variable

$filename
public function helperAddAction()

This is run automatically

public static function helperDropRelation($table,$relation)

For removing an existing relation. Not always 100% reliable if you have duplicate relations.

variable

$table
$relation
public static function helperDropTable($table_name)

Delete table. I hope you know what you are doing.

variable

$table_name
public static function helperGetRelationName($table,$target)

In some cases you might need to know the name of relation. This is a helper for finding that out.

variable

$table
$target
public static function helperRelationExists($table,$column,$target)

Check whether relation exists. Unfortunately not 100% reliable in all cases.

variable

$table
$column
$target
public static function helperTableExists($tablename,$debug)

Check whether given table exists.

variable

$tablename
$debug
public static function helperColumnExists($column,$table)

Check whether column exists for a given table.

variable

$column
$table
public static function helperActionExists($shortname)

Check whether action exists in the database

variable

$shortname