Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/Phinx/Db/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use Exception;
use InvalidArgumentException;
use Phinx\Config\FeatureFlags;
use Phinx\Db\Table;
use Phinx\Db\Table\Column;
use Phinx\Util\Literal;
Expand Down Expand Up @@ -307,11 +308,15 @@ public function createSchemaTable(): void
'primary_key' => 'version',
];

$columnType = FeatureFlags::$addTimestampsUseDateTime
? AdapterInterface::PHINX_TYPE_DATETIME
: AdapterInterface::PHINX_TYPE_TIMESTAMP;

$table = new Table($this->getSchemaTableName(), $options, $this);
$table->addColumn('version', 'biginteger', ['null' => false])
->addColumn('migration_name', 'string', ['limit' => 100, 'default' => null, 'null' => true])
->addColumn('start_time', 'timestamp', ['default' => null, 'null' => true])
->addColumn('end_time', 'timestamp', ['default' => null, 'null' => true])
->addColumn('start_time', $columnType, ['default' => null, 'null' => true])
->addColumn('end_time', $columnType, ['default' => null, 'null' => true])
->addColumn('breakpoint', 'boolean', ['default' => false, 'null' => false])
->save();
} catch (Exception $exception) {
Expand Down