<?php
namespace TYPO3\Flow\Persistence\Doctrine\Migrations;

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

/**
 * Auto-generated Migration: Please modify to your need!
 */
class Version20121025151924 extends AbstractMigration {

	/**
	 * @param Schema $schema
	 * @return void
	 */
	public function up(Schema $schema) {
			// this up() migration is autogenerated, please modify it to your needs
		$this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
		
		$this->addSql("CREATE TABLE typo3_singlesignon_server_domain_model_ssoclient (identifier VARCHAR(255) NOT NULL, publickey VARCHAR(255) NOT NULL, privatekey VARCHAR(255) NOT NULL, PRIMARY KEY(identifier)) ENGINE = InnoDB");
		$this->addSql("CREATE TABLE typo3_singlesignon_server_domain_model_accesstoken (identifier VARCHAR(255) NOT NULL, ssoclient VARCHAR(255) DEFAULT NULL, expirytime INT NOT NULL, sessionid VARCHAR(255) NOT NULL, INDEX IDX_BC326C58680E437 (ssoclient), PRIMARY KEY(identifier)) ENGINE = InnoDB");
		$this->addSql("ALTER TABLE typo3_singlesignon_server_domain_model_accesstoken ADD CONSTRAINT FK_BC326C58680E437 FOREIGN KEY (ssoclient) REFERENCES typo3_singlesignon_server_domain_model_ssoclient (identifier)");
	}

	/**
	 * @param Schema $schema
	 * @return void
	 */
	public function down(Schema $schema) {
			// this down() migration is autogenerated, please modify it to your needs
		$this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
		
		$this->addSql("ALTER TABLE typo3_singlesignon_server_domain_model_accesstoken DROP FOREIGN KEY FK_BC326C58680E437");
		$this->addSql("DROP TABLE typo3_singlesignon_server_domain_model_ssoclient");
		$this->addSql("DROP TABLE typo3_singlesignon_server_domain_model_accesstoken");
	}
}

?>
Add doctrine migration for entities
[TASK] Add doctrine migration for entities
