migrations/Version20230205123711.php line 1
<?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 Version20230205123711 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 synology_nasresource (id INT NOT NULL, local_path VARCHAR(256) DEFAULT NULL, username VARCHAR(64) DEFAULT NULL, password BYTEA DEFAULT NULL, location VARCHAR(128) DEFAULT NULL, path VARCHAR(64) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('ALTER TABLE synology_nasresource ADD CONSTRAINT FK_BCE34740BF396750 FOREIGN KEY (id) REFERENCES resource (id) ON DELETE CASCADE 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 synology_nasresource DROP CONSTRAINT FK_BCE34740BF396750');
$this->addSql('DROP TABLE synology_nasresource');
}
}