Move files
This commit is contained in:
43
migrations/Version20240717022017.php
Normal file
43
migrations/Version20240717022017.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 Version20240717022017 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 shared_note (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, note_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, owner_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, shared_user_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, PRIMARY KEY(id), CONSTRAINT FK_754B918C26ED0855 FOREIGN KEY (note_id) REFERENCES note (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('CREATE INDEX IDX_754B918C26ED0855 ON shared_note (note_id)');
|
||||
$this->addSql('CREATE TABLE shared_series (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, series_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, owner_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, shared_user_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, PRIMARY KEY(id), CONSTRAINT FK_59E803195278319C FOREIGN KEY (series_id) REFERENCES series (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('CREATE INDEX IDX_59E803195278319C ON shared_series (series_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP TABLE shared_note');
|
||||
$this->addSql('DROP TABLE shared_series');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user