migrations/Version20221204071902.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20221204071902 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 SEQUENCE upload_id_seq INCREMENT BY 1 MINVALUE 1 START 1');$this->addSql('CREATE TABLE upload (id INT NOT NULL, creator_id INT DEFAULT NULL, created_date_time TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, modified_date_time TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, hash VARCHAR(36) NOT NULL, label VARCHAR(256) NOT NULL, length BIGINT NOT NULL, path VARCHAR(256) NOT NULL, PRIMARY KEY(id))');$this->addSql('CREATE INDEX IDX_17BDE61F61220EA6 ON upload (creator_id)');$this->addSql('ALTER TABLE upload ADD CONSTRAINT FK_17BDE61F61220EA6 FOREIGN KEY (creator_id) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE upload DROP CONSTRAINT FK_17BDE61F61220EA6');$this->addSql('DROP TABLE upload');$this->addSql('DROP SEQUENCE upload_id_seq CASCADE');}}