Skip to content

Commit

Permalink
Record when a migration was executed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwage committed May 12, 2018
1 parent ead7322 commit 093347f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Doctrine/Migrations/MigrationTableCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public function createMigrationTable() : bool

$columns = [
$migrationsColumnName => $this->getMigrationsColumn(),
'createdAt' => new Column('createdAt', Type::getType('datetime'), ['notnull' => false]),
];

$table = new Table($migrationsTableName, $columns);
Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/Migrations/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public function markVersion(string $direction) : void
$this->configuration->getMigrationsTableName(),
[
$migrationsColumnName => $this->version,
'createdAt' => (new DateTime())->format('Y-m-d H:i:s'),
]
);
} else {
Expand Down

0 comments on commit 093347f

Please sign in to comment.