getEnvironment() == "thetool") { $table = $this->table("Mailtemplate"); $table->addColumn("is_include", "integer", ["null" => false, "default" => 0, "limit" => Phinx\Db\Adapter\MysqlAdapter::INT_TINY]); $table->addColumn("name", "string", ["null" => false, "limit" => 255]); $table->addColumn("code", "string", ["null" => false, "limit" => 64]); $table->addColumn("description", "string", ["null" => true, "default" => null, "limit" => 1024]); $table->addColumn("subject", "string", ["null" => true, "default" => null, "limit" => 255]); $table->addColumn("body_text", "text", ["null" => true, "default" => null]); $table->addColumn("body_html", "text", ["null" => true, "default" => null]); $table->addColumn("note", "text", ["null" => true, "default" => null]); $table->addColumn("create_by", "integer", ["null" => false]); $table->addColumn("edit_by", "integer", ["null" => false]); $table->addColumn("create", "integer", ["null" => false]); $table->addColumn("edit", "integer", ["null" => false]); $table->create(); $tfile = $this->table("MailtemplateFile"); $tfile->addColumn("mailtemplate_id", "integer", ["null" => false]); $tfile->addColumn("file_id", "integer", ["null" => false]); $tfile->addColumn("filename", "string", ["null" => false]); $tfile->addColumn("create_by", "integer", ["null" => false]); $tfile->addColumn("edit_by", "integer", ["null" => false]); $tfile->addColumn("create", "integer", ["null" => false]); $tfile->addColumn("edit", "integer", ["null" => false]); $tfile->create(); } if($this->getEnvironment() == "addressdb") { } } public function down(): void { if($this->getEnvironment() == "thetool") { $this->table("MailtemplateFile")->drop()->save(); $this->table("Mailtemplate")->drop()->save(); } if($this->getEnvironment() == "addressdb") { } } }