forge->addField([ 'id' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ], 'name' => [ 'type' => 'VARCHAR', 'constraint' => 100, ], 'definition' => [ 'type' => 'TEXT', ], 'created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP', 'updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP', 'deleted' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, ], ]); $this->forge->addKey('id', true); $this->forge->createTable($config->dbTableGroups, true); } //-------------------------------------------------------------------- /** * Drops Table * * @return void */ public function down() { $config = new AauthConfig(); $this->forge->dropTable($config->dbTableGroups, true); } }