init
This commit is contained in:
57
migrations/Version20260330204131.php
Normal file
57
migrations/Version20260330204131.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?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 Version20260330204131 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 analytics_event (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, event_name VARCHAR(50) NOT NULL, url VARCHAR(2048) NOT NULL, title VARCHAR(255) DEFAULT NULL, referrer VARCHAR(2048) DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, visitor_id INT NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX IDX_9CD0310A70BEE6D ON analytics_event (visitor_id)');
|
||||
$this->addSql('CREATE INDEX idx_ae_event ON analytics_event (event_name)');
|
||||
$this->addSql('CREATE INDEX idx_ae_created ON analytics_event (created_at)');
|
||||
$this->addSql('CREATE TABLE analytics_uniq_id (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, uid VARCHAR(36) NOT NULL, hash VARCHAR(64) NOT NULL, ip_hash VARCHAR(64) NOT NULL, user_agent VARCHAR(512) NOT NULL, screen_width INT DEFAULT NULL, screen_height INT DEFAULT NULL, language VARCHAR(10) DEFAULT NULL, device_type VARCHAR(10) NOT NULL, os VARCHAR(30) DEFAULT NULL, browser VARCHAR(30) DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, user_id INT DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_65C10CC1539B0606 ON analytics_uniq_id (uid)');
|
||||
$this->addSql('CREATE INDEX IDX_65C10CC1A76ED395 ON analytics_uniq_id (user_id)');
|
||||
$this->addSql('CREATE INDEX idx_analytics_ip ON analytics_uniq_id (ip_hash)');
|
||||
$this->addSql('CREATE INDEX idx_analytics_created ON analytics_uniq_id (created_at)');
|
||||
$this->addSql('CREATE TABLE email_tracking (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, message_id VARCHAR(64) NOT NULL, recipient VARCHAR(255) NOT NULL, subject VARCHAR(255) NOT NULL, state VARCHAR(10) NOT NULL, sent_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, opened_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_A31A7D55537A1329 ON email_tracking (message_id)');
|
||||
$this->addSql('CREATE TABLE messenger_log (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, message_class VARCHAR(255) NOT NULL, message_body TEXT DEFAULT NULL, status VARCHAR(20) NOT NULL, error_message TEXT DEFAULT NULL, stack_trace TEXT DEFAULT NULL, transport_name VARCHAR(255) DEFAULT NULL, retry_count INT NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, failed_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX idx_messenger_log_status ON messenger_log (status)');
|
||||
$this->addSql('CREATE INDEX idx_messenger_log_created_at ON messenger_log (created_at)');
|
||||
$this->addSql('CREATE TABLE "user" (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, email VARCHAR(180) NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON "user" (email)');
|
||||
$this->addSql('CREATE TABLE messenger_messages (id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)');
|
||||
$this->addSql('ALTER TABLE analytics_event ADD CONSTRAINT FK_9CD0310A70BEE6D FOREIGN KEY (visitor_id) REFERENCES analytics_uniq_id (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE analytics_uniq_id ADD CONSTRAINT FK_65C10CC1A76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE SET NULL NOT DEFERRABLE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE analytics_event DROP CONSTRAINT FK_9CD0310A70BEE6D');
|
||||
$this->addSql('ALTER TABLE analytics_uniq_id DROP CONSTRAINT FK_65C10CC1A76ED395');
|
||||
$this->addSql('DROP TABLE analytics_event');
|
||||
$this->addSql('DROP TABLE analytics_uniq_id');
|
||||
$this->addSql('DROP TABLE email_tracking');
|
||||
$this->addSql('DROP TABLE messenger_log');
|
||||
$this->addSql('DROP TABLE "user"');
|
||||
$this->addSql('DROP TABLE messenger_messages');
|
||||
}
|
||||
}
|
||||
31
migrations/Version20260330205021.php
Normal file
31
migrations/Version20260330205021.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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 Version20260330205021 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('ALTER TABLE email_tracking ADD html_body TEXT DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE email_tracking DROP html_body');
|
||||
}
|
||||
}
|
||||
37
migrations/Version20260330205802.php
Normal file
37
migrations/Version20260330205802.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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 Version20260330205802 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 attestation (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, reference VARCHAR(64) NOT NULL, type VARCHAR(50) NOT NULL, ip VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, hmac VARCHAR(128) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, email_tracking_id INT DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_326EC63FAEA34913 ON attestation (reference)');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_326EC63F6BC5D709 ON attestation (email_tracking_id)');
|
||||
$this->addSql('ALTER TABLE attestation ADD CONSTRAINT FK_326EC63F6BC5D709 FOREIGN KEY (email_tracking_id) REFERENCES email_tracking (id) ON DELETE SET NULL NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE email_tracking ADD attachments JSON DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE attestation DROP CONSTRAINT FK_326EC63F6BC5D709');
|
||||
$this->addSql('DROP TABLE attestation');
|
||||
$this->addSql('ALTER TABLE email_tracking DROP attachments');
|
||||
}
|
||||
}
|
||||
33
migrations/Version20260330220730.php
Normal file
33
migrations/Version20260330220730.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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 Version20260330220730 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('ALTER TABLE attestation ADD pdf_path VARCHAR(500) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE attestation ADD status VARCHAR(20) DEFAULT \'pending\' NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE attestation DROP pdf_path');
|
||||
$this->addSql('ALTER TABLE attestation DROP status');
|
||||
}
|
||||
}
|
||||
31
migrations/Version20260330221027.php
Normal file
31
migrations/Version20260330221027.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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 Version20260330221027 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('ALTER TABLE attestation ADD envelope_id VARCHAR(100) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE attestation DROP envelope_id');
|
||||
}
|
||||
}
|
||||
54
migrations/Version20260331081951.php
Normal file
54
migrations/Version20260331081951.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?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 Version20260331081951 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 sign_document (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, document_id VARCHAR(64) NOT NULL, title VARCHAR(255) NOT NULL, dest_email VARCHAR(255) NOT NULL, dest_name VARCHAR(255) NOT NULL, file_name VARCHAR(255) DEFAULT NULL, state VARCHAR(20) NOT NULL, hmac VARCHAR(128) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, sent_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, signed_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, refused_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, refused_reason TEXT DEFAULT NULL, path_pdf_unsigned VARCHAR(500) DEFAULT NULL, path_pdf_signed VARCHAR(500) DEFAULT NULL, path_pdf_signed_certificate VARCHAR(500) DEFAULT NULL, file_hmac VARCHAR(128) DEFAULT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_1BD06C91C33F7837 ON sign_document (document_id)');
|
||||
$this->addSql('CREATE TABLE sign_document_event (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, type VARCHAR(30) NOT NULL, detail TEXT DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, document_id INT NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX IDX_D494C99C33F7837 ON sign_document_event (document_id)');
|
||||
$this->addSql('CREATE TABLE sign_document_field (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, type VARCHAR(30) NOT NULL, label VARCHAR(255) NOT NULL, page INT NOT NULL, position_x DOUBLE PRECISION NOT NULL, position_y DOUBLE PRECISION NOT NULL, width DOUBLE PRECISION NOT NULL, height DOUBLE PRECISION NOT NULL, position INT NOT NULL, value TEXT DEFAULT NULL, filled_value TEXT DEFAULT NULL, filled_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, required BOOLEAN NOT NULL, document_id INT NOT NULL, signer_id INT DEFAULT NULL, filled_by_id INT DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX IDX_6D120366C33F7837 ON sign_document_field (document_id)');
|
||||
$this->addSql('CREATE INDEX IDX_6D1203669588C067 ON sign_document_field (signer_id)');
|
||||
$this->addSql('CREATE INDEX IDX_6D12036690409A66 ON sign_document_field (filled_by_id)');
|
||||
$this->addSql('CREATE TABLE sign_document_signer (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, email VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, signing_order INT NOT NULL, state VARCHAR(20) NOT NULL, signed_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, refused_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, refused_reason TEXT DEFAULT NULL, token VARCHAR(64) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, document_id INT NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_2B38977F5F37A13B ON sign_document_signer (token)');
|
||||
$this->addSql('CREATE INDEX IDX_2B38977FC33F7837 ON sign_document_signer (document_id)');
|
||||
$this->addSql('ALTER TABLE sign_document_event ADD CONSTRAINT FK_D494C99C33F7837 FOREIGN KEY (document_id) REFERENCES sign_document (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE sign_document_field ADD CONSTRAINT FK_6D120366C33F7837 FOREIGN KEY (document_id) REFERENCES sign_document (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE sign_document_field ADD CONSTRAINT FK_6D1203669588C067 FOREIGN KEY (signer_id) REFERENCES sign_document_signer (id) ON DELETE SET NULL NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE sign_document_field ADD CONSTRAINT FK_6D12036690409A66 FOREIGN KEY (filled_by_id) REFERENCES sign_document_signer (id) ON DELETE SET NULL NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE sign_document_signer ADD CONSTRAINT FK_2B38977FC33F7837 FOREIGN KEY (document_id) REFERENCES sign_document (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE sign_document_event DROP CONSTRAINT FK_D494C99C33F7837');
|
||||
$this->addSql('ALTER TABLE sign_document_field DROP CONSTRAINT FK_6D120366C33F7837');
|
||||
$this->addSql('ALTER TABLE sign_document_field DROP CONSTRAINT FK_6D1203669588C067');
|
||||
$this->addSql('ALTER TABLE sign_document_field DROP CONSTRAINT FK_6D12036690409A66');
|
||||
$this->addSql('ALTER TABLE sign_document_signer DROP CONSTRAINT FK_2B38977FC33F7837');
|
||||
$this->addSql('DROP TABLE sign_document');
|
||||
$this->addSql('DROP TABLE sign_document_event');
|
||||
$this->addSql('DROP TABLE sign_document_field');
|
||||
$this->addSql('DROP TABLE sign_document_signer');
|
||||
}
|
||||
}
|
||||
65
migrations/Version20260331082809.php
Normal file
65
migrations/Version20260331082809.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?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 Version20260331082809 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('ALTER TABLE sign_document_event DROP CONSTRAINT fk_d494c99c33f7837');
|
||||
$this->addSql('ALTER TABLE sign_document_field DROP CONSTRAINT fk_6d120366c33f7837');
|
||||
$this->addSql('ALTER TABLE sign_document_field DROP CONSTRAINT fk_6d1203669588c067');
|
||||
$this->addSql('ALTER TABLE sign_document_field DROP CONSTRAINT fk_6d12036690409a66');
|
||||
$this->addSql('ALTER TABLE sign_document_signer DROP CONSTRAINT fk_2b38977fc33f7837');
|
||||
$this->addSql('DROP TABLE sign_document');
|
||||
$this->addSql('DROP TABLE sign_document_event');
|
||||
$this->addSql('DROP TABLE sign_document_field');
|
||||
$this->addSql('DROP TABLE sign_document_signer');
|
||||
$this->addSql('ALTER TABLE attestation ADD pdf_file_signed VARCHAR(500) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE attestation ADD pdf_file_certificate VARCHAR(500) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE attestation ADD submitter_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE attestation DROP envelope_id');
|
||||
$this->addSql('ALTER TABLE attestation RENAME COLUMN pdf_path TO pdf_file_unsigned');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE sign_document (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, document_id VARCHAR(64) NOT NULL, title VARCHAR(255) NOT NULL, dest_email VARCHAR(255) NOT NULL, dest_name VARCHAR(255) NOT NULL, file_name VARCHAR(255) DEFAULT NULL, state VARCHAR(20) NOT NULL, hmac VARCHAR(128) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, sent_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, signed_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, refused_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, refused_reason TEXT DEFAULT NULL, path_pdf_unsigned VARCHAR(500) DEFAULT NULL, path_pdf_signed VARCHAR(500) DEFAULT NULL, path_pdf_signed_certificate VARCHAR(500) DEFAULT NULL, file_hmac VARCHAR(128) DEFAULT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX uniq_1bd06c91c33f7837 ON sign_document (document_id)');
|
||||
$this->addSql('CREATE TABLE sign_document_event (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, type VARCHAR(30) NOT NULL, detail TEXT DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, document_id INT NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX idx_d494c99c33f7837 ON sign_document_event (document_id)');
|
||||
$this->addSql('CREATE TABLE sign_document_field (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, type VARCHAR(30) NOT NULL, label VARCHAR(255) NOT NULL, page INT NOT NULL, position_x DOUBLE PRECISION NOT NULL, position_y DOUBLE PRECISION NOT NULL, width DOUBLE PRECISION NOT NULL, height DOUBLE PRECISION NOT NULL, "position" INT NOT NULL, value TEXT DEFAULT NULL, filled_value TEXT DEFAULT NULL, filled_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, required BOOLEAN NOT NULL, document_id INT NOT NULL, signer_id INT DEFAULT NULL, filled_by_id INT DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX idx_6d120366c33f7837 ON sign_document_field (document_id)');
|
||||
$this->addSql('CREATE INDEX idx_6d1203669588c067 ON sign_document_field (signer_id)');
|
||||
$this->addSql('CREATE INDEX idx_6d12036690409a66 ON sign_document_field (filled_by_id)');
|
||||
$this->addSql('CREATE TABLE sign_document_signer (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, email VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, signing_order INT NOT NULL, state VARCHAR(20) NOT NULL, signed_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, refused_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, refused_reason TEXT DEFAULT NULL, token VARCHAR(64) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, document_id INT NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX uniq_2b38977f5f37a13b ON sign_document_signer (token)');
|
||||
$this->addSql('CREATE INDEX idx_2b38977fc33f7837 ON sign_document_signer (document_id)');
|
||||
$this->addSql('ALTER TABLE sign_document_event ADD CONSTRAINT fk_d494c99c33f7837 FOREIGN KEY (document_id) REFERENCES sign_document (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE sign_document_field ADD CONSTRAINT fk_6d120366c33f7837 FOREIGN KEY (document_id) REFERENCES sign_document (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE sign_document_field ADD CONSTRAINT fk_6d1203669588c067 FOREIGN KEY (signer_id) REFERENCES sign_document_signer (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE sign_document_field ADD CONSTRAINT fk_6d12036690409a66 FOREIGN KEY (filled_by_id) REFERENCES sign_document_signer (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE sign_document_signer ADD CONSTRAINT fk_2b38977fc33f7837 FOREIGN KEY (document_id) REFERENCES sign_document (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE attestation ADD pdf_path VARCHAR(500) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE attestation ADD envelope_id VARCHAR(100) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE attestation DROP pdf_file_unsigned');
|
||||
$this->addSql('ALTER TABLE attestation DROP pdf_file_signed');
|
||||
$this->addSql('ALTER TABLE attestation DROP pdf_file_certificate');
|
||||
$this->addSql('ALTER TABLE attestation DROP submitter_id');
|
||||
}
|
||||
}
|
||||
33
migrations/Version20260331194615.php
Normal file
33
migrations/Version20260331194615.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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 Version20260331194615 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('ALTER TABLE "user" ADD keycloak_id VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649491914B1 ON "user" (keycloak_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP INDEX UNIQ_8D93D649491914B1');
|
||||
$this->addSql('ALTER TABLE "user" DROP keycloak_id');
|
||||
}
|
||||
}
|
||||
31
migrations/Version20260401065447.php
Normal file
31
migrations/Version20260401065447.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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 Version20260401065447 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('ALTER TABLE "user" ADD temp_password VARCHAR(255) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE "user" DROP temp_password');
|
||||
}
|
||||
}
|
||||
43
migrations/Version20260401070718.php
Normal file
43
migrations/Version20260401070718.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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 Version20260401070718 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 service (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, name VARCHAR(255) NOT NULL, slug VARCHAR(50) NOT NULL, url VARCHAR(500) DEFAULT NULL, status VARCHAR(20) NOT NULL, message TEXT DEFAULT NULL, position INT NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, category_id INT NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_E19D9AD2989D9B62 ON service (slug)');
|
||||
$this->addSql('CREATE INDEX IDX_E19D9AD212469DE2 ON service (category_id)');
|
||||
$this->addSql('CREATE TABLE service_category (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, name VARCHAR(255) NOT NULL, slug VARCHAR(50) NOT NULL, position INT NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_FF3A42FC989D9B62 ON service_category (slug)');
|
||||
$this->addSql('CREATE TABLE service_status_history (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, status VARCHAR(20) NOT NULL, message TEXT DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, service_id INT NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX IDX_2C0C5A78ED5CA9E6 ON service_status_history (service_id)');
|
||||
$this->addSql('ALTER TABLE service ADD CONSTRAINT FK_E19D9AD212469DE2 FOREIGN KEY (category_id) REFERENCES service_category (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE service_status_history ADD CONSTRAINT FK_2C0C5A78ED5CA9E6 FOREIGN KEY (service_id) REFERENCES service (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE service DROP CONSTRAINT FK_E19D9AD212469DE2');
|
||||
$this->addSql('ALTER TABLE service_status_history DROP CONSTRAINT FK_2C0C5A78ED5CA9E6');
|
||||
$this->addSql('DROP TABLE service');
|
||||
$this->addSql('DROP TABLE service_category');
|
||||
$this->addSql('DROP TABLE service_status_history');
|
||||
}
|
||||
}
|
||||
33
migrations/Version20260401072355.php
Normal file
33
migrations/Version20260401072355.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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 Version20260401072355 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('ALTER TABLE service ADD is_external BOOLEAN DEFAULT false NOT NULL');
|
||||
$this->addSql('ALTER TABLE service ADD external_type VARCHAR(50) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE service DROP is_external');
|
||||
$this->addSql('ALTER TABLE service DROP external_type');
|
||||
}
|
||||
}
|
||||
45
migrations/Version20260401073322.php
Normal file
45
migrations/Version20260401073322.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?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 Version20260401073322 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 service_log (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, from_status VARCHAR(20) NOT NULL, to_status VARCHAR(20) NOT NULL, source VARCHAR(50) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, service_id INT NOT NULL, changed_by_id INT DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX IDX_AD6F1BB2ED5CA9E6 ON service_log (service_id)');
|
||||
$this->addSql('CREATE INDEX IDX_AD6F1BB2828AD0A0 ON service_log (changed_by_id)');
|
||||
$this->addSql('CREATE TABLE service_message (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, title VARCHAR(255) NOT NULL, content TEXT NOT NULL, severity VARCHAR(20) NOT NULL, is_active BOOLEAN NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, resolved_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, service_id INT NOT NULL, author_id INT DEFAULT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE INDEX IDX_793962E3ED5CA9E6 ON service_message (service_id)');
|
||||
$this->addSql('CREATE INDEX IDX_793962E3F675F31B ON service_message (author_id)');
|
||||
$this->addSql('ALTER TABLE service_log ADD CONSTRAINT FK_AD6F1BB2ED5CA9E6 FOREIGN KEY (service_id) REFERENCES service (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE service_log ADD CONSTRAINT FK_AD6F1BB2828AD0A0 FOREIGN KEY (changed_by_id) REFERENCES "user" (id) ON DELETE SET NULL NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE service_message ADD CONSTRAINT FK_793962E3ED5CA9E6 FOREIGN KEY (service_id) REFERENCES service (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
$this->addSql('ALTER TABLE service_message ADD CONSTRAINT FK_793962E3F675F31B FOREIGN KEY (author_id) REFERENCES "user" (id) ON DELETE SET NULL NOT DEFERRABLE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE service_log DROP CONSTRAINT FK_AD6F1BB2ED5CA9E6');
|
||||
$this->addSql('ALTER TABLE service_log DROP CONSTRAINT FK_AD6F1BB2828AD0A0');
|
||||
$this->addSql('ALTER TABLE service_message DROP CONSTRAINT FK_793962E3ED5CA9E6');
|
||||
$this->addSql('ALTER TABLE service_message DROP CONSTRAINT FK_793962E3F675F31B');
|
||||
$this->addSql('DROP TABLE service_log');
|
||||
$this->addSql('DROP TABLE service_message');
|
||||
}
|
||||
}
|
||||
35
migrations/Version20260401080346.php
Normal file
35
migrations/Version20260401080346.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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 Version20260401080346 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 revendeur (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, code_revendeur VARCHAR(10) NOT NULL, raison_sociale VARCHAR(255) DEFAULT NULL, siret VARCHAR(14) DEFAULT NULL, address VARCHAR(500) DEFAULT NULL, zip_code VARCHAR(10) DEFAULT NULL, city VARCHAR(255) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, phone VARCHAR(20) DEFAULT NULL, stripe_connect_id VARCHAR(255) DEFAULT NULL, is_use_stripe BOOLEAN NOT NULL, is_active BOOLEAN NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, user_id INT NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_47CF17CAEB8A6FF2 ON revendeur (code_revendeur)');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_47CF17CAA76ED395 ON revendeur (user_id)');
|
||||
$this->addSql('ALTER TABLE revendeur ADD CONSTRAINT FK_47CF17CAA76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE revendeur DROP CONSTRAINT FK_47CF17CAA76ED395');
|
||||
$this->addSql('DROP TABLE revendeur');
|
||||
}
|
||||
}
|
||||
39
migrations/Version20260401081902.php
Normal file
39
migrations/Version20260401081902.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?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 Version20260401081902 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('ALTER TABLE "user" ADD email_auth_code VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE "user" ADD is_email_auth_enabled BOOLEAN DEFAULT false NOT NULL');
|
||||
$this->addSql('ALTER TABLE "user" ADD google_authenticator_secret VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE "user" ADD is_google_auth_enabled BOOLEAN DEFAULT false NOT NULL');
|
||||
$this->addSql('ALTER TABLE "user" ADD backup_codes JSON DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE "user" DROP email_auth_code');
|
||||
$this->addSql('ALTER TABLE "user" DROP is_email_auth_enabled');
|
||||
$this->addSql('ALTER TABLE "user" DROP google_authenticator_secret');
|
||||
$this->addSql('ALTER TABLE "user" DROP is_google_auth_enabled');
|
||||
$this->addSql('ALTER TABLE "user" DROP backup_codes');
|
||||
}
|
||||
}
|
||||
33
migrations/Version20260401084515.php
Normal file
33
migrations/Version20260401084515.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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 Version20260401084515 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('ALTER TABLE "user" ADD avatar VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE "user" ADD updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE "user" DROP avatar');
|
||||
$this->addSql('ALTER TABLE "user" DROP updated_at');
|
||||
}
|
||||
}
|
||||
34
migrations/Version20260401093509.php
Normal file
34
migrations/Version20260401093509.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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 Version20260401093509 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 customer (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, raison_sociale VARCHAR(255) DEFAULT NULL, first_name VARCHAR(255) DEFAULT NULL, last_name VARCHAR(255) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, phone VARCHAR(20) DEFAULT NULL, address VARCHAR(500) DEFAULT NULL, address2 VARCHAR(500) DEFAULT NULL, zip_code VARCHAR(10) DEFAULT NULL, city VARCHAR(255) DEFAULT NULL, siret VARCHAR(14) DEFAULT NULL, rcs VARCHAR(50) DEFAULT NULL, num_tva VARCHAR(20) DEFAULT NULL, stripe_customer_id VARCHAR(255) DEFAULT NULL, type_company VARCHAR(30) DEFAULT NULL, state VARCHAR(20) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, user_id INT NOT NULL, PRIMARY KEY (id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_81398E09A76ED395 ON customer (user_id)');
|
||||
$this->addSql('ALTER TABLE customer ADD CONSTRAINT FK_81398E09A76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE CASCADE NOT DEFERRABLE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE customer DROP CONSTRAINT FK_81398E09A76ED395');
|
||||
$this->addSql('DROP TABLE customer');
|
||||
}
|
||||
}
|
||||
33
migrations/Version20260401093914.php
Normal file
33
migrations/Version20260401093914.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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 Version20260401093914 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('ALTER TABLE customer ADD code_comptable VARCHAR(50) DEFAULT NULL');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_81398E09F7213B5F ON customer (code_comptable)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP INDEX UNIQ_81398E09F7213B5F');
|
||||
$this->addSql('ALTER TABLE customer DROP code_comptable');
|
||||
}
|
||||
}
|
||||
37
migrations/Version20260401094341.php
Normal file
37
migrations/Version20260401094341.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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 Version20260401094341 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('ALTER TABLE revendeur ADD contrat_reseller_pdf_unsigned VARCHAR(500) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE revendeur ADD contrat_reseller_pdf_signed VARCHAR(500) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE revendeur ADD contrat_reseller_pdf_audit VARCHAR(500) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE revendeur ADD contrat_submitter_id INT DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE revendeur DROP contrat_reseller_pdf_unsigned');
|
||||
$this->addSql('ALTER TABLE revendeur DROP contrat_reseller_pdf_signed');
|
||||
$this->addSql('ALTER TABLE revendeur DROP contrat_reseller_pdf_audit');
|
||||
$this->addSql('ALTER TABLE revendeur DROP contrat_submitter_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user