Просмотр исходного кода

add migration and update to unique value in ftth-template-name

Miguel Maffei 5 лет назад
Родитель
Сommit
e75cbd0320
1 измененных файлов с 30 добавлено и 0 удалено
  1. 30 0
      app/DoctrineMigrations/Version20200512153756.php

+ 30 - 0
app/DoctrineMigrations/Version20200512153756.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace Application\Migrations;
+
+use Doctrine\DBAL\Migrations\AbstractMigration;
+use Doctrine\DBAL\Schema\Schema;
+
+/**
+ * Auto-generated Migration: Please modify to your needs!
+ */
+class Version20200512153756 extends AbstractMigration
+{
+    /**
+     * @param Schema $schema
+     */
+    public function up(Schema $schema)
+    {
+        // this up() migration is auto-generated, please modify it to your needs
+        $this->addSql("ALTER TABLE template ADD UNIQUE (name)");
+    }
+
+    /**
+     * @param Schema $schema
+     */
+    public function down(Schema $schema)
+    {
+        // this down() migration is auto-generated, please modify it to your needs
+
+    }
+}