use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
8
use Doctrine\DBAL\Schema\Schema;
9
10
/**
11
* Auto-generated Migration: Please modify to your needs!
12
*/
13
final class Version20220628180435 extends AbstractMigrationChamilo
14
{
15
/**
16
* Return desription of the migration step.
17
*
18
* @return string
19
*/
20
public function getDescription(): string
21
{
22
return 'track login record';
23
}
24
25
public function up(Schema $schema): void
26
{
27
if (false === $schema->hasTable('track_e_login_record')) {
28
$this->addSql(
29
'CREATE TABLE track_e_login_record (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(100) NOT NULL, login_date DATETIME NOT NULL COMMENT "(DC2Type:datetime)", user_ip VARCHAR(39) NOT NULL, success TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB ROW_FORMAT = DYNAMIC;'
30
);
31
}
32
}
33
34
public function down(Schema $schema): void
35
{
36
// this down() migration is auto-generated, please modify it to your needs