From 1a5ce08fcd949546405f0c519555872a230ae1ec Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sun, 11 Dec 2016 06:03:59 +0300 Subject: [PATCH] Doctrine entities mapping fix. Excessive schemas removed. --- src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Comment.php | 4 ++-- src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/File.php | 2 +- src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Post.php | 4 ++-- src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/PostTag.php | 2 +- src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Tag.php | 2 +- src/Skobkin/Bundle/PointToolsBundle/Entity/Subscription.php | 2 +- .../Bundle/PointToolsBundle/Entity/SubscriptionEvent.php | 2 +- src/Skobkin/Bundle/PointToolsBundle/Entity/User.php | 2 +- .../Bundle/PointToolsBundle/Entity/UserRenameEvent.php | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Comment.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Comment.php index 1dbbaaa..5530c99 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Comment.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Comment.php @@ -9,7 +9,7 @@ use Skobkin\Bundle\PointToolsBundle\Entity\User; /** * Comment * - * @ORM\Table(name="posts.comments", schema="posts", indexes={ + * @ORM\Table(name="comments", schema="posts", indexes={ * @ORM\Index(name="idx_comment_created_at", columns={"created_at"}) * }) * @ORM\Entity @@ -80,7 +80,7 @@ class Comment * @var File[]|ArrayCollection * * @ORM\ManyToMany(targetEntity="Skobkin\Bundle\PointToolsBundle\Entity\Blogs\File", fetch="EXTRA_LAZY", cascade={"persist"}) - * @ORM\JoinTable(name="posts.comments_files", schema="posts", + * @ORM\JoinTable(name="comments_files", schema="posts", * joinColumns={@ORM\JoinColumn(name="comment_id")}, * inverseJoinColumns={@ORM\JoinColumn(name="file_id")} * ) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/File.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/File.php index d1f9841..ebf37de 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/File.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/File.php @@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM; /** * File * - * @ORM\Table(name="posts.files", schema="posts") + * @ORM\Table(name="files", schema="posts") * @ORM\Entity(repositoryClass="Skobkin\Bundle\PointToolsBundle\Repository\Blogs\FileRepository") */ class File diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Post.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Post.php index 170ef76..ae679bf 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Post.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Post.php @@ -9,7 +9,7 @@ use Skobkin\Bundle\PointToolsBundle\Entity\User; /** * Post * - * @ORM\Table(name="posts.posts", schema="posts", indexes={ + * @ORM\Table(name="posts", schema="posts", indexes={ * @ORM\Index(name="idx_post_created_at", columns={"created_at"}), * @ORM\Index(name="idx_post_private", columns={"private"}), * }) @@ -83,7 +83,7 @@ class Post * @var File[]|ArrayCollection * * @ORM\ManyToMany(targetEntity="Skobkin\Bundle\PointToolsBundle\Entity\Blogs\File", fetch="EXTRA_LAZY", cascade={"persist"}) - * @ORM\JoinTable(name="posts.posts_files", schema="posts", + * @ORM\JoinTable(name="posts_files", schema="posts", * joinColumns={@ORM\JoinColumn(name="post_id")}, * inverseJoinColumns={@ORM\JoinColumn(name="file_id")} * ) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/PostTag.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/PostTag.php index a25027b..0fe61c8 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/PostTag.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/PostTag.php @@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM; /** * PostTag * - * @ORM\Table(name="posts.posts_tags", schema="posts") + * @ORM\Table(name="posts_tags", schema="posts") * @ORM\Entity(repositoryClass="Skobkin\Bundle\PointToolsBundle\Repository\Blogs\PostTagRepository") */ class PostTag diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Tag.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Tag.php index 91cdc8e..e510cb6 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Tag.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Tag.php @@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM; /** * Tag * - * @ORM\Table(name="posts.tags", schema="posts", indexes={ + * @ORM\Table(name="tags", schema="posts", indexes={ * @ORM\Index(name="idx_tag_text", columns={"text"}) * }) * @ORM\Entity(repositoryClass="Skobkin\Bundle\PointToolsBundle\Repository\Blogs\TagRepository") diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/Subscription.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/Subscription.php index 19ea360..7115faa 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/Subscription.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/Subscription.php @@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM; /** * Subscription * - * @ORM\Table(name="subscriptions.subscriptions", schema="subscriptions", uniqueConstraints={ + * @ORM\Table(name="subscriptions", schema="subscriptions", uniqueConstraints={ * @ORM\UniqueConstraint(name="subscription_unique", columns={"author_id", "subscriber_id"})} * ) * @ORM\Entity(repositoryClass="Skobkin\Bundle\PointToolsBundle\Repository\SubscriptionRepository") diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/SubscriptionEvent.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/SubscriptionEvent.php index c04e55a..36be206 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/SubscriptionEvent.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/SubscriptionEvent.php @@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM; /** * SubscriptionEvent * - * @ORM\Table(name="subscriptions.log", schema="subscriptions", indexes={ + * @ORM\Table(name="log", schema="subscriptions", indexes={ * @ORM\Index(name="author_idx", columns={"author_id"}), * @ORM\Index(name="subscriber_idx", columns={"subscriber_id"}), * @ORM\Index(name="date_idx", columns={"date"}) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php index 0860cd6..6485677 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php @@ -8,7 +8,7 @@ use Doctrine\ORM\Mapping as ORM; /** * User * - * @ORM\Table(name="users.users", schema="users") + * @ORM\Table(name="users", schema="users") * @ORM\Entity(repositoryClass="Skobkin\Bundle\PointToolsBundle\Repository\UserRepository") * @ORM\HasLifecycleCallbacks */ diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/UserRenameEvent.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/UserRenameEvent.php index caf7367..a5e697f 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/UserRenameEvent.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/UserRenameEvent.php @@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM; /** * UserRenameEvent * - * @ORM\Table(name="users.rename_log", schema="users", indexes={ + * @ORM\Table(name="rename_log", schema="users", indexes={ * @ORM\Index(name="idx_rename_log_date", columns={"date"}), * @ORM\Index(name="idx_rename_log_old_login", columns={"old_login"}) * })