<?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 Version20241104133540 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("CREATE TABLE `dp_data_temp` (
`id` int NOT NULL AUTO_INCREMENT,
`level_id` int NOT NULL,
`kpi_id` int NOT NULL,
`import_id` int NOT NULL,
`customer_jit_call_no` varchar(255) NOT NULL,
`data_date` datetime NOT NULL,
`data_value` int NOT NULL,
`created_by` int NOT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `level_id` (`level_id`),
KEY `kpi_id` (`kpi_id`),
KEY `created_by` (`created_by`),
KEY `import_id` (`import_id`),
CONSTRAINT `dp_data_temp_ibfk_1` FOREIGN KEY (`level_id`) REFERENCES `dp_levels` (`level_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `dp_data_temp_ibfk_2` FOREIGN KEY (`kpi_id`) REFERENCES `dp_kpi` (`kpi_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `dp_data_temp_ibfk_3` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `dp_data_temp_ibfk_4` FOREIGN KEY (`import_id`) REFERENCES `tc_imports` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4");
}
public function down(Schema $schema): void
{
$this->addSql("DROP TABLE IF EXISTS `dp_data_temp`");
}
}