Commit 84becc3f authored by Hermann Mayer's avatar Hermann Mayer

Added Doctrine Migration Bundle. Build first migration class to fit the production env.

parent 99ed7a09
......@@ -31,6 +31,7 @@ class AppKernel extends Kernel
new Presta\SitemapBundle\PrestaSitemapBundle(),
new Jity\TagGeneratorBundle\JityTagGeneratorBundle(),
new Nelmio\SolariumBundle\NelmioSolariumBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
......
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your need!
*/
class Version20121126174815 extends AbstractMigration
{
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("ALTER TABLE comment ADD authorName VARCHAR(255) DEFAULT NULL, ADD authorEmail VARCHAR(255) DEFAULT NULL, ADD authorWebsite VARCHAR(255) DEFAULT NULL, ADD authorTwitterNickname VARCHAR(255) DEFAULT NULL");
$this->addSql("ALTER TABLE category CHANGE name name VARCHAR(50) NOT NULL");
}
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 category CHANGE name name VARCHAR(100) NOT NULL");
$this->addSql("ALTER TABLE comment DROP authorName, DROP authorEmail, DROP authorWebsite, DROP authorTwitterNickname");
}
}
No preview for this file type
......@@ -13,12 +13,6 @@
"autoload": {
"psr-0": { "": "src/" }
},
"repositories": [
{
"type": "vcs",
"url": "http://github.com/kostiklv/PrestaSitemapBundle"
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
......@@ -41,11 +35,13 @@
"stof/doctrine-extensions-bundle": "dev-master",
"xi/breadcrumbs-bundle": "dev-master",
"hwi/oauth-bundle": "dev-master",
"mobiledetect/mobiledetectlib": "dev-master",
"suncat/mobile-detect-bundle": "dev-master",
"excelwebzone/recaptcha-bundle": "dev-master",
"presta/sitemap-bundle": "dev-sitemap-dumper",
"presta/sitemap-bundle": "dev-master",
"jity/tag-generator": "dev-master",
"nelmio/solarium-bundle": "1.0.x-dev"
"nelmio/solarium-bundle": "1.0.x-dev",
"doctrine/doctrine-migrations-bundle": "dev-master"
},
"scripts": {
"post-install-cmd": [
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment