<?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 Version20241018094823 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("CREATE TABLE `dp_manage_holidays` (
`id` int NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`date` date NOT NULL,
`board` int DEFAULT NULL,
`is_allBoard` int NOT NULL DEFAULT '0',
`company_id` int NOT NULL,
`created_by` int NOT NULL,
`created_at` datetime NOT NULL,
`updated_by` int DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`is_deleted` int NOT NULL DEFAULT '0',
`deleted_by` int DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `company_id` (`company_id`),
KEY `board_id` (`board`),
KEY `created_by` (`created_by`),
KEY `updated_by` (`updated_by`),
KEY `deleted_by` (`deleted_by`),
CONSTRAINT `dp_manage_holidays_ibfk_1` FOREIGN KEY (`board`) REFERENCES `dp_levels` (`level_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `dp_manage_holidays_ibfk_2` FOREIGN KEY (`company_id`) REFERENCES `company` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `dp_manage_holidays_ibfk_3` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `dp_manage_holidays_ibfk_4` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `dp_manage_holidays_ibfk_5` FOREIGN KEY (`deleted_by`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci");
}
public function down(Schema $schema): void
{
$this->addSql("DROP TABLE IF EXISTS `dp_manage_holidays`");
}
}