Interface Yiisoft\Db\Migration\RevertibleMigrationInterface
| Extends | Yiisoft\ |
|---|---|
| Implemented by | M231108183919NotCoveredByPsr4 |
The RevertibleMigrationInterface defines the minimum set of methods to be implemented
by a revertible database migration.
Each migration class should provide the {@see \
Public Methods
| Method | Description | Defined By |
|---|---|---|
| down() | This method contains the logic to be executed when removing this migration. | Yiisoft\ |
| up() | This method contains the logic to be executed when applying this migration. | Yiisoft\ |
Method Details
This method contains the logic to be executed when removing this migration.
The DB logic implemented here will be enclosed within a DB transaction.
Child classes may implement this method instead of {@see \
Note: Not all DBMS support transactions. And some DB queries cannot be put into a transaction. For some examples, please refer to implicit commit.
| public abstract void down ( Yiisoft\ | ||
| $b | Yiisoft\ |
|
public function down(MigrationBuilder $b): void;
Defined in:
Yiisoft\
This method contains the logic to be executed when applying this migration.
The DB logic implemented here will be enclosed within a DB transaction.
Child classes may implement this method instead of {@see \
Note: Not all DBMS support transactions. And some DB queries cannot be put into a transaction. For some examples, please refer to implicit commit.
| public abstract void up ( Yiisoft\ | ||
| $b | Yiisoft\ |
|
public function up(MigrationBuilder $b): void;
User Contributed Notes
Leave a comment
Join the conversation to share a note.