| @@ 187-205 (lines=19) @@ | ||
| 184 | * |
|
| 185 | * @return void |
|
| 186 | */ |
|
| 187 | private function createMigrationsTable(AbstractSchemaManager $manager): void |
|
| 188 | { |
|
| 189 | $table = new Table(static::MIGRATIONS_TABLE); |
|
| 190 | ||
| 191 | $table |
|
| 192 | ->addColumn(static::MIGRATIONS_COLUMN_ID, Type::INTEGER) |
|
| 193 | ->setUnsigned(true) |
|
| 194 | ->setAutoincrement(true); |
|
| 195 | $table |
|
| 196 | ->addColumn(static::MIGRATIONS_COLUMN_CLASS, Type::STRING) |
|
| 197 | ->setLength(255); |
|
| 198 | $table |
|
| 199 | ->addColumn(static::MIGRATIONS_COLUMN_MIGRATED_AT, Type::DATETIME); |
|
| 200 | ||
| 201 | $table->setPrimaryKey([static::MIGRATIONS_COLUMN_ID]); |
|
| 202 | $table->addUniqueIndex([static::MIGRATIONS_COLUMN_CLASS]); |
|
| 203 | ||
| 204 | $manager->createTable($table); |
|
| 205 | } |
|
| 206 | ||
| 207 | /** |
|
| 208 | * @param Connection $connection |
|
| @@ 173-191 (lines=19) @@ | ||
| 170 | * |
|
| 171 | * @return void |
|
| 172 | */ |
|
| 173 | private function createSeedsTable(AbstractSchemaManager $manager): void |
|
| 174 | { |
|
| 175 | $table = new Table($this->getSeedsTable()); |
|
| 176 | ||
| 177 | $table |
|
| 178 | ->addColumn(static::SEEDS_COLUMN_ID, Type::INTEGER) |
|
| 179 | ->setUnsigned(true) |
|
| 180 | ->setAutoincrement(true); |
|
| 181 | $table |
|
| 182 | ->addColumn(static::SEEDS_COLUMN_CLASS, Type::STRING) |
|
| 183 | ->setLength(255); |
|
| 184 | $table |
|
| 185 | ->addColumn(static::SEEDS_COLUMN_SEEDED_AT, Type::DATETIME); |
|
| 186 | ||
| 187 | $table->setPrimaryKey([static::SEEDS_COLUMN_ID]); |
|
| 188 | $table->addUniqueIndex([static::SEEDS_COLUMN_CLASS]); |
|
| 189 | ||
| 190 | $manager->createTable($table); |
|
| 191 | } |
|
| 192 | ||
| 193 | /** |
|
| 194 | * @param Connection $connection |
|