remove \r line endings

This commit is contained in:
James 2012-10-30 13:23:09 -04:00
parent bba7975882
commit 3e60ac4393
18 changed files with 4589 additions and 4589 deletions

View file

@ -9,16 +9,16 @@ class Version20120405114454 extends AbstractMigration
{
public function up(Schema $schema)
{
//create cc_subjs_token table
$cc_subjs_token = $schema->createTable('cc_subjs_token');
//create cc_subjs_token table
$cc_subjs_token = $schema->createTable('cc_subjs_token');
$cc_subjs_token->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true));
$cc_subjs_token->addColumn('user_id', 'integer', array('notnull' => 1));
$cc_subjs_token->addColumn('action', 'string', array('length' => 255, 'notnull' => 1));
$cc_subjs_token->addColumn('user_id', 'integer', array('notnull' => 1));
$cc_subjs_token->addColumn('action', 'string', array('length' => 255, 'notnull' => 1));
$cc_subjs_token->addColumn('token', 'string', array('length' => 40, 'notnull' => 1));
$cc_subjs_token->addColumn('created', 'datetime', array('notnull' => 1));
$cc_subjs_token->setPrimaryKey(array('id'));
$cc_subjs_token->addColumn('created', 'datetime', array('notnull' => 1));
$cc_subjs_token->setPrimaryKey(array('id'));
//end create cc_subjs_token table
}

View file

@ -24,21 +24,21 @@ class Version20120410104441 extends AbstractMigration
$this->_addSql("ALTER TABLE cc_files ADD temp_br integer");
$this->_addSql("ALTER TABLE cc_files ADD temp_sr integer");
$this->_addSql("UPDATE cc_files SET temp_br = bit_rate::integer");
$this->_addSql("UPDATE cc_files SET temp_sr = sample_rate::integer");
$this->_addSql("UPDATE cc_files SET temp_br = bit_rate::integer");
$this->_addSql("UPDATE cc_files SET temp_sr = sample_rate::integer");
$this->_addSql("ALTER TABLE cc_files DROP COLUMN sample_rate");
$this->_addSql("ALTER TABLE cc_files DROP COLUMN sample_rate");
$this->_addSql("ALTER TABLE cc_files DROP COLUMN bit_rate");
$this->_addSql("ALTER TABLE cc_files RENAME COLUMN temp_sr TO sample_rate");
$this->_addSql("ALTER TABLE cc_files RENAME COLUMN temp_sr TO sample_rate");
$this->_addSql("ALTER TABLE cc_files RENAME COLUMN temp_br TO bit_rate");
//add utime, lptime
$this->_addSql("ALTER TABLE cc_files ADD utime timestamp");
//add utime, lptime
$this->_addSql("ALTER TABLE cc_files ADD utime timestamp");
$this->_addSql("ALTER TABLE cc_files ADD lptime timestamp");
//setting these to a default now for timeline refresh purposes.
$now = gmdate("Y-m-d H:i:s");
//setting these to a default now for timeline refresh purposes.
$now = gmdate("Y-m-d H:i:s");
$this->_addSql("UPDATE cc_files SET utime = '$now'");
}

View file

@ -12,7 +12,7 @@ class Version20120410143340 extends AbstractMigration
*/
public function up(Schema $schema)
{
//convert column creator to be creator_id on cc_playlist
//convert column creator to be creator_id on cc_playlist
$this->_addSql("ALTER TABLE cc_playlist ADD creator_id integer");
$this->_addSql("UPDATE cc_playlist SET creator_id = (SELECT id FROM cc_subjs WHERE creator = login)");
$this->_addSql("ALTER TABLE cc_playlist DROP COLUMN creator");

View file

@ -136,36 +136,36 @@ class CcShowInstances extends BaseCcShowInstances {
->update(array('DbPlayoutStatus' => 0), $con);
}
/**
* Computes the value of the aggregate column time_filled
*
* @param PropelPDO $con A connection object
*
* @return mixed The scalar result from the aggregate query
*/
public function computeDbTimeFilled(PropelPDO $con)
{
$stmt = $con->prepare('SELECT SUM(clip_length) FROM "cc_schedule" WHERE cc_schedule.INSTANCE_ID = :p1');
$stmt->bindValue(':p1', $this->getDbId());
$stmt->execute();
return $stmt->fetchColumn();
}
/**
* Updates the aggregate column time_filled
*
* @param PropelPDO $con A connection object
*/
public function updateDbTimeFilled(PropelPDO $con)
{
$this->setDbTimeFilled($this->computeDbTimeFilled($con));
$this->save($con);
/**
* Computes the value of the aggregate column time_filled
*
* @param PropelPDO $con A connection object
*
* @return mixed The scalar result from the aggregate query
*/
public function computeDbTimeFilled(PropelPDO $con)
{
$stmt = $con->prepare('SELECT SUM(clip_length) FROM "cc_schedule" WHERE cc_schedule.INSTANCE_ID = :p1');
$stmt->bindValue(':p1', $this->getDbId());
$stmt->execute();
return $stmt->fetchColumn();
}
/**
* Updates the aggregate column time_filled
*
* @param PropelPDO $con A connection object
*/
public function updateDbTimeFilled(PropelPDO $con)
{
$this->setDbTimeFilled($this->computeDbTimeFilled($con));
$this->save($con);
}
public function preInsert(PropelPDO $con = null) {
$now = new DateTime("now", new DateTimeZone("UTC"));
$this->setDbCreated($now);
return true;
$now = new DateTime("now", new DateTimeZone("UTC"));
$this->setDbCreated($now);
return true;
}
} // CcShowInstances