<?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 Version20260224100726 extends AbstractMigration
{
    public function getDescription(): string
    {
        return '';
    }

    public function up(Schema $schema): void
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->addSql('CREATE TABLE api_token (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, token VARCHAR(255) NOT NULL, INDEX IDX_7BA2F5EBA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE tfinancial_years (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) DEFAULT NULL, status VARCHAR(15) DEFAULT NULL, current_year VARCHAR(15) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE tgroups (id INT AUTO_INCREMENT NOT NULL, group_name VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, type VARCHAR(60) DEFAULT NULL, dashboar_main TINYINT(1) DEFAULT NULL, dashboard_home TINYINT(1) DEFAULT NULL, dashboard_graphical TINYINT(1) DEFAULT NULL, dashboards_maps TINYINT(1) DEFAULT NULL, institution_view TINYINT(1) DEFAULT NULL, sector_priorities TINYINT(1) DEFAULT NULL, sector_strategies TINYINT(1) DEFAULT NULL, sector_objectives TINYINT(1) DEFAULT NULL, sector_cidp TINYINT(1) DEFAULT NULL, sector_adps TINYINT(1) DEFAULT NULL, department_priorities TINYINT(1) DEFAULT NULL, department_strategies TINYINT(1) DEFAULT NULL, department_projects TINYINT(1) DEFAULT NULL, department_projects_map TINYINT(1) DEFAULT NULL, department_projects_images TINYINT(1) DEFAULT NULL, department_projects_status TINYINT(1) DEFAULT NULL, directorate_projects TINYINT(1) DEFAULT NULL, tasks_planning TINYINT(1) DEFAULT NULL, tasks_dependancies TINYINT(1) DEFAULT NULL, tasks_verifications TINYINT(1) DEFAULT NULL, tasks_validations TINYINT(1) DEFAULT NULL, tasks_results TINYINT(1) DEFAULT NULL, tasks_history TINYINT(1) DEFAULT NULL, pc_governor_sign TINYINT(1) DEFAULT NULL, pc_county_sec_sign TINYINT(1) DEFAULT NULL, pc_cec_sign TINYINT(1) DEFAULT NULL, pc_co_sign TINYINT(1) DEFAULT NULL, pc_director_sign TINYINT(1) DEFAULT NULL, pc_updating_sign TINYINT(1) DEFAULT NULL, apprisal_appraisee TINYINT(1) DEFAULT NULL, apprisal_supervisor TINYINT(1) DEFAULT NULL, reports_projects TINYINT(1) DEFAULT NULL, reports_milestones TINYINT(1) DEFAULT NULL, reports_pcs TINYINT(1) DEFAULT NULL, reports_appraisals TINYINT(1) DEFAULT NULL, back_office_organisation TINYINT(1) DEFAULT NULL, back_office_security TINYINT(1) DEFAULT NULL, back_office_settings TINYINT(1) DEFAULT NULL, main_sectors TINYINT(1) DEFAULT NULL, main_departments TINYINT(1) DEFAULT NULL, main_directorates TINYINT(1) DEFAULT NULL, main_milestones TINYINT(1) DEFAULT NULL, main_pcs TINYINT(1) DEFAULT NULL, main_appraisals TINYINT(1) DEFAULT NULL, main_reports TINYINT(1) DEFAULT NULL, main_back_office TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE tlogin_activities (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, username VARCHAR(60) DEFAULT NULL, ipaddress VARCHAR(255) DEFAULT NULL, date DATE DEFAULT NULL, time TIME DEFAULT NULL, activity LONGTEXT DEFAULT NULL, INDEX IDX_4AAE6408A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE tmobile_front_slides (id INT AUTO_INCREMENT NOT NULL, slide_app VARCHAR(60) DEFAULT NULL, slide_subject VARCHAR(60) DEFAULT NULL, slide_image VARCHAR(255) DEFAULT NULL, slide_description VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE tmobile_inside_slides (id INT AUTO_INCREMENT NOT NULL, slide_app VARCHAR(60) DEFAULT NULL, slide_subject VARCHAR(255) DEFAULT NULL, slide_image VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE tsetting (id INT AUTO_INCREMENT NOT NULL, institution_name VARCHAR(255) DEFAULT NULL, business_mantra VARCHAR(255) DEFAULT NULL, official_email VARCHAR(60) DEFAULT NULL, sms_api_key LONGTEXT DEFAULT NULL, sms_api_provider VARCHAR(255) DEFAULT NULL, website VARCHAR(60) DEFAULT NULL, phone_no1 VARCHAR(15) DEFAULT NULL, phone_no2 VARCHAR(15) DEFAULT NULL, po_box VARCHAR(255) DEFAULT NULL, phy_address VARCHAR(255) DEFAULT NULL, our_vision LONGTEXT DEFAULT NULL, our_mission LONGTEXT DEFAULT NULL, our_values LONGTEXT DEFAULT NULL, default_map_latitude VARCHAR(255) DEFAULT NULL, default_map_longitude VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE tstaff_salutations (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) DEFAULT NULL, status VARCHAR(15) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE tunits_of_measures (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) DEFAULT NULL, status VARCHAR(15) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE twork_flow_next_stages (id INT AUTO_INCREMENT NOT NULL, current_stage_id INT DEFAULT NULL, next_stage INT DEFAULT NULL, next_stage_name VARCHAR(60) DEFAULT NULL, forward_backward VARCHAR(255) DEFAULT NULL, INDEX IDX_B426248FBFE0ABB9 (current_stage_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE twork_flow_stages (id INT AUTO_INCREMENT NOT NULL, workflow_id INT DEFAULT NULL, stage_name VARCHAR(60) DEFAULT NULL, status VARCHAR(15) DEFAULT NULL, INDEX IDX_5BA63E9B2C7C2CBA (workflow_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE twork_flows (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) DEFAULT NULL, status VARCHAR(60) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, group_id INT NOT NULL, phone_no VARCHAR(15) NOT NULL, status VARCHAR(15) NOT NULL, staff_id INT DEFAULT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('ALTER TABLE api_token ADD CONSTRAINT FK_7BA2F5EBA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
        $this->addSql('ALTER TABLE tlogin_activities ADD CONSTRAINT FK_4AAE6408A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
        $this->addSql('ALTER TABLE twork_flow_next_stages ADD CONSTRAINT FK_B426248FBFE0ABB9 FOREIGN KEY (current_stage_id) REFERENCES twork_flow_stages (id)');
        $this->addSql('ALTER TABLE twork_flow_stages ADD CONSTRAINT FK_5BA63E9B2C7C2CBA FOREIGN KEY (workflow_id) REFERENCES twork_flows (id)');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE twork_flow_next_stages DROP FOREIGN KEY FK_B426248FBFE0ABB9');
        $this->addSql('ALTER TABLE twork_flow_stages DROP FOREIGN KEY FK_5BA63E9B2C7C2CBA');
        $this->addSql('ALTER TABLE api_token DROP FOREIGN KEY FK_7BA2F5EBA76ED395');
        $this->addSql('ALTER TABLE tlogin_activities DROP FOREIGN KEY FK_4AAE6408A76ED395');
        $this->addSql('DROP TABLE api_token');
        $this->addSql('DROP TABLE tfinancial_years');
        $this->addSql('DROP TABLE tgroups');
        $this->addSql('DROP TABLE tlogin_activities');
        $this->addSql('DROP TABLE tmobile_front_slides');
        $this->addSql('DROP TABLE tmobile_inside_slides');
        $this->addSql('DROP TABLE tsetting');
        $this->addSql('DROP TABLE tstaff_salutations');
        $this->addSql('DROP TABLE tunits_of_measures');
        $this->addSql('DROP TABLE twork_flow_next_stages');
        $this->addSql('DROP TABLE twork_flow_stages');
        $this->addSql('DROP TABLE twork_flows');
        $this->addSql('DROP TABLE user');
    }
}
