Migrate
class Migrate
Helper class for migration related console commands.
Constants
| MIGRATIONS_PATH |
Path to database migration files. |
Methods
Test if a particular batch of migrations exists.
Drops all tables from the database without using down function.
Generates file/class name for migration.
Generates a migration class for creating a new table.
Generates a migration class for renaming an existing table.
Generates a migration class for updating existing table.
Performs migration operation.
Generates a new Migration class for creating a new table.
Generates a new Migration class for renaming an existing table.
Generates a new Migration class for updating a table.
Performs refresh operation.
Performs roll back operation
Perform step roll back.
Reports migration status.
Drops table one at a time.
Determines number of tables in database before performing migration operations.
Details
at line 31
static private bool
batchExists(int $batch)
Test if a particular batch of migrations exists.
at line 45
static int
dropAllTables()
Drops all tables from the database without using down function.
at line 78
static string
fileName()
Generates file/class name for migration.
at line 88
static int
makeMigration(InputInterface $input)
Generates a migration class for creating a new table.
at line 106
static int
makeRenameMigration(InputInterface $input)
Generates a migration class for renaming an existing table.
at line 125
static int
makeUpdateMigration(InputInterface $input)
Generates a migration class for updating existing table.
at line 142
static int
migrate()
Performs migration operation.
at line 214
static string
migrationClass(string $fileName, string $tableName)
Generates a new Migration class for creating a new table.
at line 259
static string
migrationRenameClass(string $fileName, string $from, string $to)
Generates a new Migration class for renaming an existing table.
at line 298
static string
migrationUpdateClass(string $fileName, string $tableName)
Generates a new Migration class for updating a table.
at line 341
static int
refresh(bool|int $step = false)
Performs refresh operation.
at line 396
static int
rollback(string|int|bool $batch = false)
Performs roll back operation
at line 444
static int
rollbackStep(string|int $step)
Perform step roll back.
at line 457
static int
status()
Reports migration status.
at line 513
static private bool|int
step(string $klassNamespace, bool|int $step = false)
Drops table one at a time.
at line 534
static private int
tableCount()
Determines number of tables in database before performing migration operations.