|
1 | 1 | <?php |
2 | 2 |
|
3 | | -declare(strict_types = 1); |
| 3 | +declare( strict_types = 1 ); |
4 | 4 |
|
5 | 5 | namespace DoctrineMigrations; |
6 | 6 |
|
|
10 | 10 | /** |
11 | 11 | * Auto-generated Migration: Please modify to your needs! |
12 | 12 | */ |
13 | | -final class Version20171208040821 extends AbstractMigration |
14 | | -{ |
15 | | - /** |
16 | | - * @param Schema $schema |
17 | | - */ |
18 | | - public function up(Schema $schema): void |
19 | | - { |
20 | | - $table = $schema->createTable('usage_api_timeline'); |
21 | | - $table->addColumn('id', 'integer', ['autoincrement' => true]); |
22 | | - $table->addColumn('date', 'date'); |
23 | | - $table->addColumn('endpoint', 'string'); |
24 | | - $table->addColumn('count', 'integer'); |
25 | | - $table->setPrimaryKey(['id']); |
26 | | - } |
| 13 | +final class Version20171208040821 extends AbstractMigration { |
| 14 | + /** |
| 15 | + * @param Schema $schema |
| 16 | + */ |
| 17 | + public function up( Schema $schema ): void { |
| 18 | + $table = $schema->createTable( 'usage_api_timeline' ); |
| 19 | + $table->addColumn( 'id', 'integer', [ 'autoincrement' => true ] ); |
| 20 | + $table->addColumn( 'date', 'date' ); |
| 21 | + $table->addColumn( 'endpoint', 'string' ); |
| 22 | + $table->addColumn( 'count', 'integer' ); |
| 23 | + $table->setPrimaryKey( [ 'id' ] ); |
| 24 | + } |
27 | 25 |
|
28 | | - /** |
29 | | - * @param Schema $schema |
30 | | - */ |
31 | | - public function down(Schema $schema): void |
32 | | - { |
33 | | - $schema->dropTable('usage_api_timeline'); |
34 | | - } |
| 26 | + /** |
| 27 | + * @param Schema $schema |
| 28 | + */ |
| 29 | + public function down( Schema $schema ): void { |
| 30 | + $schema->dropTable( 'usage_api_timeline' ); |
| 31 | + } |
35 | 32 | } |
0 commit comments