CC-2518: Auto install script for manual install
- install dir is renamed to install_minimal - virtualenv command is moved to install script. - need more work on install_full part
This commit is contained in:
parent
65ea711792
commit
931fb4db62
31 changed files with 723 additions and 5 deletions
40
install_minimal/DoctrineMigrations/Version20110711161043.php
Normal file
40
install_minimal/DoctrineMigrations/Version20110711161043.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
/*
|
||||
1) update cc_files table to include to "directory" column
|
||||
2) create a foreign key relationship from cc_files to cc_music_dirs
|
||||
3) create a foreign key relationship from cc_schedule to cc_files
|
||||
*/
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration,
|
||||
Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
class Version20110711161043 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
/* 1) update cc_files table to include to "directory" column */
|
||||
$this->_addSql("INSERT INTO cc_music_dirs (type, directory) VALUES ('stor', '/srv/airtime/stor');");
|
||||
|
||||
$this->_addSql("INSERT INTO cc_music_dirs (type, directory) VALUES ('upgrade', '');");
|
||||
|
||||
$cc_music_dirs = $schema->getTable('cc_music_dirs');
|
||||
|
||||
/* 2) create a foreign key relationship from cc_files to cc_music_dirs */
|
||||
$cc_files = $schema->getTable('cc_files');
|
||||
$cc_files->addColumn('directory', 'integer', array('default'=> 2));
|
||||
|
||||
$cc_files->addNamedForeignKeyConstraint('cc_music_dirs_folder_fkey', $cc_music_dirs, array('directory'), array('id'), array('onDelete' => 'CASCADE'));
|
||||
|
||||
/* 3) create a foreign key relationship from cc_schedule to cc_files */
|
||||
$cc_schedule = $schema->getTable('cc_schedule');
|
||||
$cc_schedule->addNamedForeignKeyConstraint('cc_files_folder_fkey', $cc_files, array('file_id'), array('id'), array('onDelete' => 'CASCADE'));
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue