Subversion Repositories LCARS

Compare Revisions

Last modification

Ignore whitespace Rev 195 → Rev 196

/trunk/media/video/series/application/models/databases/seriometer/SeriOMeterDb.php
0,0 → 1,6
<?php
 
class SeriOMeterDb extends \PointedEars\PHPX\Db\MySQLDB
{
protected $_dbname = 'seriometer';
}
/trunk/media/video/series/application/models/databases/seriometer/tables/SeriesTable.php
0,0 → 1,113
<?php
 
class SeriesTable extends \PointedEars\PHPX\Db\MySQLTable
{
/**
* (non-PHPdoc)
* @see \PointedEars\PHPX\Db\Table::$_name
*/
protected static $_name = 'series';
 
/**
* (non-PHPdoc)
* @see \PointedEars\PHPX\Db\Table::$_columns
*/
protected static $_columns = array(
/* UNSIGNED INT NOT NULL AUTO_INCREMENT */
'series_id' => array(
'type' => 'INT',
'unsigned' => true,
'not_null' => true,
'auto_inc' => true
),
 
/* VARCHAR(45) NOT NULL */
'title' => array(
'type' => 'VARCHAR(45)',
'not_null' => true
),
 
/* BIT NOT NULL DEFAULT 0 */
'ignore' => array(
'type' => 'BIT',
'not_null' => true,
'default' => 0
),
 
/* INT UNSIGNED NOT NULL */
'channel_id' => array(
'type' => 'INT',
'unsigned' => true,
'not_null' => true
),
 
/* DATETIME NULL */
'last_seen' => array(
'type' => 'DATETIME',
),
 
/* VARCHAR(45) NULL */
'seasons' => array(
'type' => 'VARCHAR(45)',
),
 
/* VARCHAR(45) NULL */
'url' => array(
'type' => 'VARCHAR(45)',
)
);
 
/**
* (non-PHPdoc)
* @see \PointedEars\PHPX\Db\Table::$_indexes
*/
protected static $_indexes = array(
/* UNIQUE INDEX `title_UNIQUE` (`title` ASC) */
'title_UNIQUE' => array(
'unique' => true,
'columns' => array('title' => 'ASC')
),
 
/* PRIMARY KEY (`series_id`) */
'PRIMARY' => array(
'columns' => array('series_id')
),
 
/* INDEX `fk_series_channel` (`channel_id` ASC) */
'fk_series_channel' => array(
'columns' => array('channel_id' => 'ASC')
)
);
 
/*
* CONSTRAINT `fk_series_channel`
* FOREIGN KEY (`channel_id` )
* REFERENCES `series`.`channel` (`channel_id` )
* ON DELETE NO ACTION
* ON UPDATE NO ACTION
*/
/**
* (non-PHPdoc)
* @see \PointedEars\PHPX\Db\Table::$_constraints
*/
protected static $_constraints = array(
'foreign_keys' => array(
'fk_series_channel' => array(
'columns' => array('channel_id'),
'references_table' => array('series', 'channel'),
'references_columns' => array('channel_id'),
'rules' => array(
'ON DELETE' => 'NO ACTION',
'ON UPDATE' => 'NO ACTION'
)
)
)
);
 
/* ENGINE = InnoDB */
/**
* (non-PHPdoc)
* @see \PointedEars\PHPX\Db\MySQLTable::$_engine
*/
protected static $_engine = 'InnoDB';
}