<?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 Version20260206170047 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 template_point_controle (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, name VARCHAR(255) NOT NULL, points JSON NOT NULL, PRIMARY KEY (id))');
        $this->addSql('ALTER INDEX idx_9591436be30da2f7 RENAME TO IDX_7268396CBE3DB2B7');
        $this->addSql('ALTER INDEX idx_8b27c52bbe30da2f7 RENAME TO IDX_8B27C52BBE3DB2B7');
        $this->addSql('COMMENT ON COLUMN etat_lieux.updated_at IS \'\'');
        $this->addSql('ALTER INDEX idx_d71603599b6b5fba RENAME TO IDX_D8D384179B6B5FBA');
        $this->addSql('ALTER TABLE etat_lieux_comment ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE etat_lieux_comment ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN etat_lieux_comment.created_at IS \'\'');
        $this->addSql('ALTER INDEX idx_etat_lieux_comment RENAME TO IDX_C7341FDB3F1DAE3C');
        $this->addSql('ALTER TABLE etat_lieux_file ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE etat_lieux_file ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN etat_lieux_file.created_at IS \'\'');
        $this->addSql('ALTER INDEX idx_5f7e1c87d6f39243 RENAME TO IDX_A76FE88B3F1DAE3C');
        $this->addSql('ALTER TABLE etat_lieux_point_control ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE etat_lieux_point_control ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER INDEX idx_etat_lieux_point_control RENAME TO IDX_84DA2663F1DAE3C');
        $this->addSql('ALTER INDEX idx_88755657be30da2f7 RENAME TO IDX_263E7C9FBE3DB2B7');
        $this->addSql('ALTER TABLE product_point_controll ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE product_point_controll ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER INDEX idx_9e3c8f8f4584665a RENAME TO IDX_B6E9A5844584665A');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('DROP TABLE template_point_controle');
        $this->addSql('ALTER INDEX idx_7268396cbe3db2b7 RENAME TO idx_9591436be30da2f7');
        $this->addSql('ALTER INDEX idx_8b27c52bbe3db2b7 RENAME TO idx_8b27c52bbe30da2f7');
        $this->addSql('COMMENT ON COLUMN etat_lieux.updated_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER INDEX idx_d8d384179b6b5fba RENAME TO idx_d71603599b6b5fba');
        $this->addSql('ALTER TABLE etat_lieux_comment ALTER id SET DEFAULT nextval(\'etat_lieux_comment_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE etat_lieux_comment ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN etat_lieux_comment.created_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER INDEX idx_c7341fdb3f1dae3c RENAME TO idx_etat_lieux_comment');
        $this->addSql('ALTER TABLE etat_lieux_file ALTER id SET DEFAULT nextval(\'etat_lieux_file_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE etat_lieux_file ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN etat_lieux_file.created_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER INDEX idx_a76fe88b3f1dae3c RENAME TO idx_5f7e1c87d6f39243');
        $this->addSql('ALTER TABLE etat_lieux_point_control ALTER id SET DEFAULT nextval(\'etat_lieux_point_control_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE etat_lieux_point_control ALTER id DROP IDENTITY');
        $this->addSql('ALTER INDEX idx_84da2663f1dae3c RENAME TO idx_etat_lieux_point_control');
        $this->addSql('ALTER INDEX idx_263e7c9fbe3db2b7 RENAME TO idx_88755657be30da2f7');
        $this->addSql('ALTER TABLE product_point_controll ALTER id SET DEFAULT nextval(\'product_point_controll_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE product_point_controll ALTER id DROP IDENTITY');
        $this->addSql('ALTER INDEX idx_b6e9a5844584665a RENAME TO idx_9e3c8f8f4584665a');
    }
}
