CC-3605 : Create 2.1 upgrades
This commit is contained in:
parent
3b80c7c018
commit
428d04d77f
7 changed files with 32 additions and 170 deletions
|
@ -14,6 +14,11 @@ class Version20120410143340 extends AbstractMigration
|
|||
$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");
|
||||
|
||||
$this->_addSql("ALTER TABLE cc_playlist ADD CONSTRAINT cc_playlist_createdby_fkey FOREIGN KEY (creator_id) REFERENCES cc_subjs(id) NOT DEFERRABLE INITIALLY IMMEDIATE");
|
||||
|
||||
$this->_addSql("ALTER TABLE cc_playlist ADD utime timestamp(6)");
|
||||
$this->_addSql("ALTER TABLE cc_playlist ADD mtime timestamp(6)");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue