mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Merge pull request #988 from romainneutron/fix-registration-table-name
[3.9] Fix registration table name
This commit is contained in:
@@ -16,7 +16,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* @ORM\Table(name="Registration",uniqueConstraints={
|
||||
* @ORM\Table(name="Registrations",uniqueConstraints={
|
||||
* @ORM\UniqueConstraint(name="unique_registration", columns={"user_id","base_id","pending"})
|
||||
* })
|
||||
* @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\RegistrationRepository")
|
||||
|
@@ -75,7 +75,7 @@ class RegistrationRepository extends EntityRepository
|
||||
bas.base_id AS bas_id , " . $rsm->generateSelectClause(['d' => 'd',]) . "
|
||||
FROM (usr, bas, sbas)
|
||||
LEFT JOIN basusr ON ( usr.usr_id = basusr.usr_id AND bas.base_id = basusr.base_id )
|
||||
LEFT JOIN Registration d ON ( d.user_id = usr.usr_id AND bas.base_id = d.base_id )
|
||||
LEFT JOIN Registrations d ON ( d.user_id = usr.usr_id AND bas.base_id = d.base_id )
|
||||
WHERE bas.active = 1 AND bas.sbas_id = sbas.sbas_id
|
||||
AND usr.usr_id = ?
|
||||
AND model_of = 0";
|
||||
|
@@ -17,11 +17,11 @@ class RegistrationMigration extends AbstractMigration
|
||||
{
|
||||
public function doUpSql(Schema $schema)
|
||||
{
|
||||
$this->addSql("CREATE TABLE Registration (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, base_id INT NOT NULL, pending TINYINT(1) NOT NULL, rejected TINYINT(1) NOT NULL, created DATETIME NOT NULL, updated DATETIME NOT NULL, INDEX IDX_7A997C5FA76ED395 (user_id), UNIQUE INDEX unique_registration (user_id, base_id, pending), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
|
||||
$this->addSql("CREATE TABLE Registrations (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, base_id INT NOT NULL, pending TINYINT(1) NOT NULL, rejected TINYINT(1) NOT NULL, created DATETIME NOT NULL, updated DATETIME NOT NULL, INDEX IDX_7A997C5FA76ED395 (user_id), UNIQUE INDEX unique_registration (user_id, base_id, pending), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
|
||||
}
|
||||
|
||||
public function doDownSql(Schema $schema)
|
||||
{
|
||||
$this->addSql("DROP TABLE Registration");
|
||||
$this->addSql("DROP TABLE Registrations");
|
||||
}
|
||||
}
|
||||
|
@@ -266,6 +266,7 @@ abstract class base implements cache_cacheableInterface
|
||||
'FtpExports',
|
||||
'OrderElements',
|
||||
'Orders',
|
||||
'Registrations',
|
||||
'StoryWZ',
|
||||
'UsrListOwners',
|
||||
'UsrLists',
|
||||
|
Reference in New Issue
Block a user