Migrator (Database\Migrations)
Migrator
class Migrator (View source)
Methods
void | __construct( MigrationRepositoryInterface $repository, ConnectionResolverInterface $resolver, Filesystem $files) Create a new migrator instance. | |
void | run( string $path, bool $pretend = false) Run the outstanding migrations at a given path. | |
void | runMigrationList( array $migrations, bool $pretend = false) Run an array of migrations. | |
int | rollback( bool $pretend = false) Rollback the last migration operation. | |
int | reset( bool $pretend = false) Rolls all of the currently applied migrations back. | |
array | getMigrationFiles( string $path) Get all of the migration files in a given path. | |
void | requireFiles( string $path, array $files) Require in all the migration files in a given path. | |
object | resolve( string $file) Resolve a migration instance from a file. | |
array | getNotes() Get the notes for the last operation. | |
Connection | resolveConnection( string $connection) Resolve the database connection instance. | |
void | setConnection( string $name) Set the default connection name. | |
MigrationRepositoryInterface | getRepository() Get the migration repository instance. | |
bool | repositoryExists() Determine if the migration repository exists. | |
Filesystem | getFilesystem() Get the file system instance. |
Details
void __construct( MigrationRepositoryInterface $repository, ConnectionResolverInterface $resolver, Filesystem $files)
Create a new migrator instance.
void run( string $path, bool $pretend = false)
Run the outstanding migrations at a given path.
void runMigrationList( array $migrations, bool $pretend = false)
Run an array of migrations.
int rollback( bool $pretend = false)
Rollback the last migration operation.
int reset( bool $pretend = false)
Rolls all of the currently applied migrations back.
array getMigrationFiles( string $path)
Get all of the migration files in a given path.
void requireFiles( string $path, array $files)
Require in all the migration files in a given path.
object resolve( string $file)
Resolve a migration instance from a file.
array getNotes()
Get the notes for the last operation.
Connection resolveConnection( string $connection)
Resolve the database connection instance.
void setConnection( string $name)
Set the default connection name.
MigrationRepositoryInterface getRepository()
Get the migration repository instance.
bool repositoryExists()
Determine if the migration repository exists.
Filesystem getFilesystem()
Get the file system instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Database/Migrations/Migrator.html