29 lines
1.1 KiB
PHP
29 lines
1.1 KiB
PHP
<?php declare(strict_types = 1);
|
|
|
|
namespace Entity\Migration;
|
|
|
|
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
|
|
/**
|
|
* Auto-generated Migration: Please modify to your needs!
|
|
*/
|
|
class Version20180204210633 extends AbstractMigration
|
|
{
|
|
public function up(Schema $schema)
|
|
{
|
|
// this up() migration is auto-generated, please modify it to your needs
|
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
|
|
|
|
$this->addSql('DROP TABLE api_keys');
|
|
}
|
|
|
|
public function down(Schema $schema)
|
|
{
|
|
// this down() migration is auto-generated, please modify it to your needs
|
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
|
|
|
|
$this->addSql('CREATE TABLE api_keys (id VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci, owner VARCHAR(150) DEFAULT \'NULL\' COLLATE utf8mb4_unicode_ci, calls_made INT NOT NULL, created INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
|
|
}
|
|
}
|