\Dewdrop\Db\Dbdeploy\CommandBackfill

Backfill the dbdeploy changelog without actually running SQL scripts. This can be useful if your DB schema is out of sync with your changelog table because someone, for example, applied a schema change manually rather than using dbdeploy's Apply command.

This command works on a single named changeset and will back fill up to a maximum revision number that you specify.

Summary

Methods
Properties
Constants
__construct()
execute()
getChangesAppliedCount()
getAppliedFiles()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$changelogGateway
$changesets
$changesetName
$revision
$changesAppliedCount
$appliedFiles
N/A

Properties

$changesets

$changesets : array

The array of available changesets.

Type

array

$changesetName

$changesetName : string

The name of the changeset you'd like to backfill in the changelog table (e.g. "plugin").

Type

string

$revision

$revision : integer

The maximum revision number for which you'd like to backfill the log. For example, if you specify a revision of 7 and the log is currently at revision 2 for the given changeset, then revisions 3-7 will be added to the log, leaving revisions 8 and greater to be applied later.

Type

integer

$changesAppliedCount

$changesAppliedCount : integer

The number of changes that were logged during the previous call to execute().

Type

integer

$appliedFiles

$appliedFiles : array

An array of the files that were logged during the previous call to execute().

Type

array

Methods

__construct()

__construct(\Dewdrop\Db\Dbdeploy\ChangelogGateway  $changelogGateway, array  $changesets, string  $changesetName, integer  $revision) 

Note that $changsetName and $revision are required to run the backfill command.

Parameters

\Dewdrop\Db\Dbdeploy\ChangelogGateway $changelogGateway
array $changesets
string $changesetName
integer $revision

Throws

\Dewdrop\Db\Dbdeploy\Exception

execute()

execute() : boolean

Find the changeset to backfill and then backfill the changelog up to maximum revision number. Note that the start and end times for the log entry will be identical.

Throws

\Dewdrop\Db\Dbdeploy\Exception

Returns

boolean

getChangesAppliedCount()

getChangesAppliedCount() : integer

Get the number of changes added to the changelog during the last call to execute().

Returns

integer

getAppliedFiles()

getAppliedFiles() : array

Get an array of the file names applied during the previous call to execute().

Returns

array