/usr/share/horde/trean/migration/1_trean_base_tables.php is in php-horde-trean 1.1.4-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | <?php
/**
* Create Trean base tables (as of Trean 1.x).
*
* Copyright 2010-2016 Horde LLC (http://www.horde.org/)
*
* See the enclosed file LICENSE for license information (BSD). If you
* did not receive this file, see http://www.horde.org/licenses/bsdl.php.
*
* @author Chuck Hagenbuch <chuck@horde.org>
* @category Horde
* @license http://www.horde.org/licenses/bsdl.php BSD
* @package Trean
*/
class TreanBaseTables extends Horde_Db_Migration_Base
{
/**
* Upgrade.
*/
public function up()
{
$tableList = $this->tables();
if (!in_array('trean_bookmarks', $tableList)) {
$t = $this->createTable('trean_bookmarks', array('autoincrementKey' => false));
$t->column('bookmark_id', 'integer', array('null' => false));
$t->column('folder_id', 'integer', array('null' => false));
$t->column('bookmark_url', 'string', array('limit' => 255, 'null' => false));
$t->column('bookmark_title', 'string', array('limit' => 255));
$t->column('bookmark_description', 'string', array('limit' => 255));
$t->column('bookmark_clicks', 'integer', array('default' => 0));
$t->column('bookmark_rating', 'integer', array('default' => 0));
$t->column('bookmark_http_status', 'string', array('limit' => 5));
$t->primaryKey(array('bookmark_id'));
$t->end();
$this->addIndex('trean_bookmarks', array('bookmark_clicks'));
}
}
public function down()
{
$this->dropTable('trean_bookmarks');
}
}
|