浏览代码

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

Miguel Maffei 5 年之前
父节点
当前提交
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
+
+    }
+}