<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220209101301 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
$this->addSql("CREATE TABLE IF NOT EXISTS `std_cookies` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier',
`unique_key` varchar(50) NOT NULL COMMENT 'Cookie unique key',
`funcional_accepted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Funcional cookies accepted',
`valid_until` datetime NOT NULL COMMENT 'Cookies valid until',
`webuser_id` int(10) unsigned DEFAULT NULL COMMENT 'Web user unique identifider',
`created_date` datetime NOT NULL COMMENT 'Date and time of the record creation',
`updated_date` datetime NOT NULL COMMENT 'Date and time the record was last updated',
`created_by` int(10) unsigned DEFAULT NULL COMMENT 'Unique identifier',
`updated_by` int(10) unsigned DEFAULT NULL COMMENT 'Unique identifier',
PRIMARY KEY (`id`),
UNIQUE KEY `uniqueKey` (`unique_key`) USING BTREE,
KEY `FK_std_cookies_std_web_users` (`webuser_id`),
KEY `FK_std_cookies_std_web_users_2` (`created_by`),
KEY `FK_std_cookies_std_web_users_3` (`updated_by`),
CONSTRAINT `FK_std_cookies_std_web_users` FOREIGN KEY (`webuser_id`) REFERENCES `std_web_users` (`id`),
CONSTRAINT `FK_std_cookies_std_web_users_2` FOREIGN KEY (`created_by`) REFERENCES `std_web_users` (`id`),
CONSTRAINT `FK_std_cookies_std_web_users_3` FOREIGN KEY (`updated_by`) REFERENCES `std_web_users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;");
}
public function down(Schema $schema) : void
{
$this->addSql("DROP TABLE `std_cookies`;");
}
}