Passed
Pull Request — main (#443)
by MusikAnimal
13:59 queued 09:36
created

Version20171208040821::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace DoctrineMigrations;
6
7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\Migrations\AbstractMigration;
9
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
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
    }
27
28
    /**
29
     * @param Schema $schema
30
     */
31
    public function down(Schema $schema): void
32
    {
33
        $schema->dropTable('usage_api_timeline');
34
    }
35
}
36