<?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 Version20260203131644 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 product_blocked (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, date_start TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, date_end TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, reason TEXT DEFAULT NULL, product_id INT NOT NULL, PRIMARY KEY (id))');
        $this->addSql('CREATE INDEX IDX_B8CF0304584665A ON product_blocked (product_id)');
        $this->addSql('ALTER TABLE product_blocked ADD CONSTRAINT FK_B8CF0304584665A FOREIGN KEY (product_id) REFERENCES product (id) NOT DEFERRABLE');
        $this->addSql('ALTER TABLE account ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE account ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN account.update_at IS \'\'');
        $this->addSql('ALTER TABLE account_login_register ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE account_login_register ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN account_login_register.login_at IS \'\'');
        $this->addSql('ALTER TABLE account_reset_password_request ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE account_reset_password_request ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN account_reset_password_request.requested_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN account_reset_password_request.expires_at IS \'\'');
        $this->addSql('ALTER TABLE audit_log ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE audit_log ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN audit_log.action_at IS \'\'');
        $this->addSql('ALTER TABLE backup ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE backup ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN backup.created_at IS \'\'');
        $this->addSql('ALTER TABLE contrats ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE contrats ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN contrats.create_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN contrats.date_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN contrats.end_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN contrats.update_at IS \'\'');
        $this->addSql('ALTER TABLE contrats_line ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE contrats_line ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE contrats_option ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE contrats_option ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE contrats_payments ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE contrats_payments ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE contrats_payments ALTER card TYPE JSON USING card::json');
        $this->addSql('COMMENT ON COLUMN contrats_payments.payment_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN contrats_payments.validate_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN contrats_payments.card IS \'\'');
        $this->addSql('COMMENT ON COLUMN contrats_payments.update_at IS \'\'');
        $this->addSql('ALTER TABLE customer ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE customer ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN customer.verification_code_expires_at IS \'\'');
        $this->addSql('ALTER TABLE customer_address ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE customer_address ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE customer_tracking ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE customer_tracking ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE devis ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE devis ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN devis.create_a IS \'\'');
        $this->addSql('COMMENT ON COLUMN devis.update_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN devis.start_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN devis.end_at IS \'\'');
        $this->addSql('ALTER TABLE devis_line ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE devis_line ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE devis_options ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE devis_options ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE etat_lieux ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE etat_lieux ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE facture ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE facture ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN facture.create_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN facture.update_at IS \'\'');
        $this->addSql('ALTER TABLE formules ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE formules ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN formules.updated_at IS \'\'');
        $this->addSql('ALTER TABLE formules_options_inclus ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE formules_options_inclus ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE formules_product_inclus ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE formules_product_inclus ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE formules_product_inclus ALTER config TYPE JSON USING config::json');
        $this->addSql('COMMENT ON COLUMN formules_product_inclus.config IS \'\'');
        $this->addSql('ALTER TABLE formules_restriction ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE formules_restriction ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE formules_restriction ALTER restriction_config TYPE JSON USING restriction_config::json');
        $this->addSql('COMMENT ON COLUMN formules_restriction.restriction_config IS \'\'');
        $this->addSql('ALTER TABLE options ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE options ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN options.updated_at IS \'\'');
        $this->addSql('ALTER TABLE order_session ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE order_session ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN order_session.created_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN order_session.updated_at IS \'\'');
        $this->addSql('ALTER TABLE prestaire ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE prestaire ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE product ADD is_publish BOOLEAN DEFAULT true');
        $this->addSql('ALTER TABLE product ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE product ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN product.updated_at IS \'\'');
        $this->addSql('ALTER TABLE product_doc ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE product_doc ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN product_doc.updated_at IS \'\'');
        $this->addSql('ALTER TABLE product_photos ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE product_photos ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN product_photos.updated_at IS \'\'');
        $this->addSql('ALTER TABLE product_reserve ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE product_reserve ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN product_reserve.start_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN product_reserve.end_at IS \'\'');
        $this->addSql('ALTER TABLE product_video ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE product_video ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN product_video.updated_at IS \'\'');
        $this->addSql('ALTER TABLE site_performance ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE site_performance ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN site_performance.created_at IS \'\'');
        $this->addSql('ALTER TABLE stripe_config ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE stripe_config ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('ALTER TABLE messenger_messages ALTER id DROP DEFAULT');
        $this->addSql('ALTER TABLE messenger_messages ALTER id ADD GENERATED BY DEFAULT AS IDENTITY');
        $this->addSql('COMMENT ON COLUMN messenger_messages.created_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN messenger_messages.available_at IS \'\'');
        $this->addSql('COMMENT ON COLUMN messenger_messages.delivered_at IS \'\'');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE product_blocked DROP CONSTRAINT FK_B8CF0304584665A');
        $this->addSql('DROP TABLE product_blocked');
        $this->addSql('ALTER TABLE "account" ALTER id SET DEFAULT nextval(\'account_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE "account" ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN "account".update_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE account_login_register ALTER id SET DEFAULT nextval(\'account_login_register_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE account_login_register ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN account_login_register.login_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE account_reset_password_request ALTER id SET DEFAULT nextval(\'account_reset_password_request_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE account_reset_password_request ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN account_reset_password_request.requested_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN account_reset_password_request.expires_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE audit_log ALTER id SET DEFAULT nextval(\'audit_log_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE audit_log ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN audit_log.action_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE backup ALTER id SET DEFAULT nextval(\'backup_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE backup ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN backup.created_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE contrats ALTER id SET DEFAULT nextval(\'contrats_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE contrats ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN contrats.create_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN contrats.date_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN contrats.end_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN contrats.update_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE contrats_line ALTER id SET DEFAULT nextval(\'contrats_line_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE contrats_line ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE contrats_option ALTER id SET DEFAULT nextval(\'contrats_option_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE contrats_option ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE contrats_payments ALTER id SET DEFAULT nextval(\'contrats_payments_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE contrats_payments ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE contrats_payments ALTER card TYPE TEXT');
        $this->addSql('COMMENT ON COLUMN contrats_payments.payment_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN contrats_payments.validate_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN contrats_payments.card IS \'(DC2Type:array)\'');
        $this->addSql('COMMENT ON COLUMN contrats_payments.update_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE customer ALTER id SET DEFAULT nextval(\'customer_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE customer ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN customer.verification_code_expires_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE customer_address ALTER id SET DEFAULT nextval(\'customer_address_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE customer_address ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE customer_tracking ALTER id SET DEFAULT nextval(\'customer_tracking_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE customer_tracking ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE devis ALTER id SET DEFAULT nextval(\'devis_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE devis ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN devis.create_a IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN devis.update_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN devis.start_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN devis.end_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE devis_line ALTER id SET DEFAULT nextval(\'devis_line_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE devis_line ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE devis_options ALTER id SET DEFAULT nextval(\'devis_options_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE devis_options ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE etat_lieux ALTER id SET DEFAULT nextval(\'etat_lieux_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE etat_lieux ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE facture ALTER id SET DEFAULT nextval(\'facture_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE facture ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN facture.create_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN facture.update_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE formules ALTER id SET DEFAULT nextval(\'formules_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE formules ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN formules.updated_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE formules_options_inclus ALTER id SET DEFAULT nextval(\'formules_options_inclus_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE formules_options_inclus ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE formules_product_inclus ALTER id SET DEFAULT nextval(\'formules_product_inclus_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE formules_product_inclus ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE formules_product_inclus ALTER config TYPE TEXT');
        $this->addSql('COMMENT ON COLUMN formules_product_inclus.config IS \'(DC2Type:array)\'');
        $this->addSql('ALTER TABLE formules_restriction ALTER id SET DEFAULT nextval(\'formules_restriction_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE formules_restriction ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE formules_restriction ALTER restriction_config TYPE TEXT');
        $this->addSql('COMMENT ON COLUMN formules_restriction.restriction_config IS \'(DC2Type:array)\'');
        $this->addSql('ALTER TABLE messenger_messages ALTER id SET DEFAULT nextval(\'messenger_messages_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE messenger_messages ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN messenger_messages.created_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN messenger_messages.available_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN messenger_messages.delivered_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE options ALTER id SET DEFAULT nextval(\'options_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE options ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN options.updated_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE order_session ALTER id SET DEFAULT nextval(\'order_session_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE order_session ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN order_session.created_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN order_session.updated_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE prestaire ALTER id SET DEFAULT nextval(\'prestaire_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE prestaire ALTER id DROP IDENTITY');
        $this->addSql('ALTER TABLE product DROP is_publish');
        $this->addSql('ALTER TABLE product ALTER id SET DEFAULT nextval(\'product_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE product ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN product.updated_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE product_doc ALTER id SET DEFAULT nextval(\'product_doc_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE product_doc ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN product_doc.updated_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE product_photos ALTER id SET DEFAULT nextval(\'product_photos_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE product_photos ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN product_photos.updated_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE product_reserve ALTER id SET DEFAULT nextval(\'product_reserve_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE product_reserve ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN product_reserve.start_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('COMMENT ON COLUMN product_reserve.end_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE product_video ALTER id SET DEFAULT nextval(\'product_video_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE product_video ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN product_video.updated_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE site_performance ALTER id SET DEFAULT nextval(\'site_performance_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE site_performance ALTER id DROP IDENTITY');
        $this->addSql('COMMENT ON COLUMN site_performance.created_at IS \'(DC2Type:datetime_immutable)\'');
        $this->addSql('ALTER TABLE stripe_config ALTER id SET DEFAULT nextval(\'stripe_config_id_seq\'::regclass)');
        $this->addSql('ALTER TABLE stripe_config ALTER id DROP IDENTITY');
    }
}
