diff --git a/migrations/Version20260522200819.php b/migrations/Version20260522200819.php index e21e30c..7cd6ea1 100644 --- a/migrations/Version20260522200819.php +++ b/migrations/Version20260522200819.php @@ -20,8 +20,8 @@ final class Version20260522200819 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->addSql('CREATE TABLE page (id INT GENERATED BY DEFAULT AS IDENTITY, title VARCHAR(255), text TEXT, url VARCHAR(255), PRIMARY KEY (id))'); - $this->addSql('CREATE TABLE post (id INT GENERATED BY DEFAULT AS IDENTITY, title VARCHAR(255), date TIMESTAMP(0) WITHOUT TIME ZONE , text TEXT, url VARCHAR(255), PRIMARY KEY (id))'); + $this->addSql('CREATE TABLE page (id INT AUTO_INCREMENT, title VARCHAR(255), text TEXT, url VARCHAR(255), PRIMARY KEY (id))'); + $this->addSql('CREATE TABLE post (id INT AUTO_INCREMENT, title VARCHAR(255), date TIMESTAMP(0) WITHOUT TIME ZONE , text TEXT, url VARCHAR(255), PRIMARY KEY (id))'); } public function down(Schema $schema): void diff --git a/migrations/Version20260522205620.php b/migrations/Version20260522205620.php index d6e3bf3..3872f3b 100644 --- a/migrations/Version20260522205620.php +++ b/migrations/Version20260522205620.php @@ -20,11 +20,11 @@ final class Version20260522205620 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->addSql('CREATE TABLE category (id INT GENERATED BY DEFAULT AS IDENTITY, title VARCHAR(255), PRIMARY KEY (id))'); + $this->addSql('CREATE TABLE category (id INT AUTO_INCREMENT, title VARCHAR(255), PRIMARY KEY (id))'); $this->addSql('CREATE TABLE post_tag (post_id INT, tag_id INT, PRIMARY KEY (post_id, tag_id))'); $this->addSql('CREATE INDEX IDX_5ACE3AF04B89032C ON post_tag (post_id)'); $this->addSql('CREATE INDEX IDX_5ACE3AF0BAD26311 ON post_tag (tag_id)'); - $this->addSql('CREATE TABLE tag (id INT GENERATED BY DEFAULT AS IDENTITY, title VARCHAR(255), PRIMARY KEY (id))'); + $this->addSql('CREATE TABLE tag (id INT AUTO_INCREMENT, title VARCHAR(255), PRIMARY KEY (id))'); $this->addSql('ALTER TABLE post_tag ADD CONSTRAINT FK_5ACE3AF04B89032C FOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE'); $this->addSql('ALTER TABLE post_tag ADD CONSTRAINT FK_5ACE3AF0BAD26311 FOREIGN KEY (tag_id) REFERENCES tag (id) ON DELETE CASCADE'); $this->addSql('ALTER TABLE post ADD category_id INT DEFAULT NULL'); diff --git a/migrations/Version20260601003707.php b/migrations/Version20260601003707.php index 47ec952..44f2821 100644 --- a/migrations/Version20260601003707.php +++ b/migrations/Version20260601003707.php @@ -20,9 +20,9 @@ final class Version20260601003707 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->addSql('CREATE TABLE photo (id INT GENERATED BY DEFAULT AS IDENTITY, file VARCHAR(255), equipment VARCHAR(255), location VARCHAR(255), caption VARCHAR(255), date DATE, photos_id INT DEFAULT NULL, PRIMARY KEY (id))'); + $this->addSql('CREATE TABLE photo (id INT AUTO_INCREMENT, file VARCHAR(255), equipment VARCHAR(255), location VARCHAR(255), caption VARCHAR(255), date DATE, photos_id INT DEFAULT NULL, PRIMARY KEY (id))'); $this->addSql('CREATE INDEX IDX_14B78418301EC62 ON photo (photos_id)'); - $this->addSql('CREATE TABLE photos (id INT GENERATED BY DEFAULT AS IDENTITY, title VARCHAR(255), date TIMESTAMP(0) WITHOUT TIME ZONE, category_id INT DEFAULT NULL, PRIMARY KEY (id))'); + $this->addSql('CREATE TABLE photos (id INT AUTO_INCREMENT, title VARCHAR(255), date TIMESTAMP(0) WITHOUT TIME ZONE, category_id INT DEFAULT NULL, PRIMARY KEY (id))'); $this->addSql('CREATE INDEX IDX_876E0D912469DE2 ON photos (category_id)'); $this->addSql('ALTER TABLE photo ADD CONSTRAINT FK_14B78418301EC62 FOREIGN KEY (photos_id) REFERENCES photos (id)'); $this->addSql('ALTER TABLE photos ADD CONSTRAINT FK_876E0D912469DE2 FOREIGN KEY (category_id) REFERENCES category (id)');