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

Change dts_updated, dts_assigned and dts_verified fields in test table to be nullable

Alan Lam 5 лет назад
Родитель
Сommit
7798995da3
1 измененных файлов с 17 добавлено и 0 удалено
  1. 17 0
      db/migrations/20210713213406_change_test_dts_fields_nullable.php

+ 17 - 0
db/migrations/20210713213406_change_test_dts_fields_nullable.php

@@ -0,0 +1,17 @@
+<?php
+
+use Phinx\Migration\AbstractMigration;
+
+class ChangeTestDtsFieldsNullable extends AbstractMigration {
+	public function up() {
+		$this->table("test")
+			->changeColumn("dts_updated", "datetime", ["null" => true])
+			->changeColumn("dts_assigned", "datetime", ["null" => true])
+			->changeColumn("dts_verified", "datetime", ["null" => true])
+			->update();
+	}
+
+	public function down() {
+
+	}
+}