<?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration,
    Doctrine\DBAL\Schema\Schema;

/**
 * Auto-generated Migration: Please modify to your need!
 */
class Version20121019192104 extends AbstractMigration
{
    public function up(Schema $schema)
    {
        $this->addSql('CREATE SEQUENCE atlas_object_status_id_seq INCREMENT BY 1 MINVALUE 1 START 1;');
        $this->addSql('CREATE TABLE atlas_object_status (id INT NOT NULL, title VARCHAR(255) NOT NULL, action_title VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));');
        $this->addSql('ALTER TABLE atlas_object ADD created_by INT DEFAULT NULL;');
        $this->addSql('ALTER TABLE atlas_object ADD updated_by INT DEFAULT NULL;');
        $this->addSql('ALTER TABLE atlas_object ADD status INT DEFAULT NULL;');
        $this->addSql('ALTER TABLE atlas_object ADD created_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL;');
        $this->addSql('ALTER TABLE atlas_object ADD updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL;');
        $this->addSql('ALTER TABLE atlas_object ADD is_official BOOLEAN DEFAULT NULL;');
        $this->addSql('ALTER TABLE atlas_object ADD reason TEXT DEFAULT NULL;');
        $this->addSql('ALTER TABLE atlas_object ADD CONSTRAINT FK_E837B302DE12AB56 FOREIGN KEY (created_by) REFERENCES fos_user_user (id) NOT DEFERRABLE INITIALLY IMMEDIATE;');
        $this->addSql('ALTER TABLE atlas_object ADD CONSTRAINT FK_E837B30216FE72E1 FOREIGN KEY (updated_by) REFERENCES fos_user_user (id) NOT DEFERRABLE INITIALLY IMMEDIATE;');
        $this->addSql('ALTER TABLE atlas_object ADD CONSTRAINT FK_E837B3027B00651C FOREIGN KEY (status) REFERENCES atlas_object_status (id) NOT DEFERRABLE INITIALLY IMMEDIATE;');
        $this->addSql('CREATE INDEX IDX_E837B302DE12AB56 ON atlas_object (created_by);');
        $this->addSql('CREATE INDEX IDX_E837B30216FE72E1 ON atlas_object (updated_by);');
        $this->addSql('CREATE INDEX IDX_E837B3027B00651C ON atlas_object (status)');

        // this up() migration is autogenerated, please modify it to your needs

    }

    public function down(Schema $schema)
    {
        // this down() migration is autogenerated, please modify it to your needs

    }
}

Add migration for atlas changes
[*] Add migration for atlas changes
