芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/minscoop.com/system/Commands/Generators/Views/migration.tpl.php
<@php namespace {namespace}; use CodeIgniter\Database\Migration; class {class} extends Migration { protected $DBGroup = '= $DBGroup ?>'; public function up() { $this->forge->addField([ 'id' => ['type' => 'VARCHAR', 'constraint' => 128, 'null' => false], 'ip_address' => ['type' => 'VARCHAR', 'constraint' => 45, 'null' => false], 'timestamp timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL', 'data' => ['type' => 'BLOB', 'null' => false], 'ip_address inet NOT NULL', 'timestamp timestamptz DEFAULT CURRENT_TIMESTAMP NOT NULL', "data bytea DEFAULT '' NOT NULL", ]); $this->forge->addKey(['id', 'ip_address'], true); $this->forge->addKey('id', true); $this->forge->addKey('timestamp'); $this->forge->createTable('= $table ?>', true); } public function down() { $this->forge->dropTable('= $table ?>', true); } public function up() { // } public function down() { // } }