Skip to content

Commit

Permalink
Fix user table name
Browse files Browse the repository at this point in the history
  • Loading branch information
bocharsky-bw committed Jul 20, 2016
1 parent 294053d commit 22eb564
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions app/DoctrineMigrations/Version20160720094920.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Application\Migrations;

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

/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20160720094920 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('RENAME TABLE `user` TO `user_table`');
}

/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('RENAME TABLE `user_table` TO `user`');
}
}
2 changes: 1 addition & 1 deletion src/AppBundle/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @ORM\Entity
* @ORM\Table(name="user")
* @ORM\Table(name="user_table")
*/
class User implements UserInterface
{
Expand Down

0 comments on commit 22eb564

Please sign in to comment.