You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/05/20 13:14:10 UTC
[07/14] allura git commit: [#7878] ticket:771 Convert all MappedClass
collection names to bytes
[#7878] ticket:771 Convert all MappedClass collection names to bytes
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/e900dda8
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/e900dda8
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/e900dda8
Branch: refs/heads/ib/7878
Commit: e900dda81c008d15ceb0bfec92bf4483d13b5e18
Parents: 3640d5f
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue May 19 10:22:24 2015 +0000
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Tue May 19 10:22:24 2015 +0000
----------------------------------------------------------------------
Allura/allura/model/artifact.py | 20 ++++++++++----------
Allura/allura/model/attachments.py | 2 +-
Allura/allura/model/auth.py | 10 +++++-----
Allura/allura/model/discuss.py | 8 ++++----
Allura/allura/model/filesystem.py | 2 +-
Allura/allura/model/monq_model.py | 2 +-
Allura/allura/model/neighborhood.py | 2 +-
Allura/allura/model/notification.py | 6 +++---
Allura/allura/model/oauth.py | 4 ++--
Allura/allura/model/project.py | 8 ++++----
Allura/allura/model/repository.py | 4 ++--
Allura/allura/model/stats.py | 2 +-
Allura/allura/model/webhook.py | 2 +-
Allura/allura/tests/model/test_artifact.py | 2 +-
ForgeBlog/forgeblog/model/blog.py | 6 +++---
ForgeChat/forgechat/model/chat.py | 4 ++--
ForgeDiscussion/forgediscussion/model/forum.py | 8 ++++----
ForgeGit/forgegit/model/git_repo.py | 2 +-
ForgeSVN/forgesvn/model/svn.py | 2 +-
ForgeShortUrl/forgeshorturl/model/shorturl.py | 2 +-
ForgeTracker/forgetracker/model/ticket.py | 10 +++++-----
ForgeUserStats/forgeuserstats/model/stats.py | 2 +-
ForgeWiki/forgewiki/model/wiki.py | 6 +++---
23 files changed, 58 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/artifact.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index f6ba5f0..809db25 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -67,7 +67,7 @@ class Artifact(MappedClass, SearchIndexable):
"""
class __mongometa__:
session = artifact_orm_session
- name = 'artifact'
+ name = b'artifact'
indexes = [
('app_config_id', 'labels'),
]
@@ -418,7 +418,7 @@ class Snapshot(Artifact):
"""A snapshot of an :class:`Artifact <allura.model.artifact.Artifact>`, used in :class:`VersionedArtifact <allura.model.artifact.VersionedArtifact>`"""
class __mongometa__:
session = artifact_orm_session
- name = 'artifact_snapshot'
+ name = b'artifact_snapshot'
unique_indexes = [('artifact_class', 'artifact_id', 'version')]
indexes = [('artifact_id', 'version')]
@@ -476,7 +476,7 @@ class VersionedArtifact(Artifact):
"""
class __mongometa__:
session = artifact_orm_session
- name = 'versioned_artifact'
+ name = b'versioned_artifact'
history_class = Snapshot
version = FieldProperty(S.Int, if_missing=0)
@@ -576,7 +576,7 @@ class Message(Artifact):
class __mongometa__:
session = artifact_orm_session
- name = 'message'
+ name = b'message'
type_s = 'Generic Message'
_id = FieldProperty(str, if_missing=h.gen_message_id)
@@ -624,7 +624,7 @@ class AwardFile(File):
class __mongometa__:
session = main_orm_session
- name = 'award_file'
+ name = b'award_file'
award_id = FieldProperty(S.ObjectId)
@@ -632,7 +632,7 @@ class Award(Artifact):
class __mongometa__:
session = main_orm_session
- name = 'award'
+ name = b'award'
indexes = ['short']
type_s = 'Generic Award'
@@ -676,7 +676,7 @@ class AwardGrant(Artifact):
"An :class:`Award <allura.model.artifact.Award>` can be bestowed upon a project by a neighborhood"
class __mongometa__:
session = main_orm_session
- name = 'grant'
+ name = b'grant'
indexes = ['short']
type_s = 'Generic Award Grant'
@@ -750,7 +750,7 @@ class Feed(MappedClass):
"""
class __mongometa__:
session = project_orm_session
- name = 'artifact_feed'
+ name = b'artifact_feed'
indexes = [
'pubdate',
('artifact_ref.project_id', 'artifact_ref.mount_point'),
@@ -869,7 +869,7 @@ class VotableArtifact(MappedClass):
class __mongometa__:
session = main_orm_session
- name = 'vote'
+ name = b'vote'
votes = FieldProperty(int, if_missing=0)
votes_up = FieldProperty(int, if_missing=0)
@@ -943,7 +943,7 @@ class MovedArtifact(Artifact):
class __mongometa__:
session = artifact_orm_session
- name = 'moved_artifact'
+ name = b'moved_artifact'
_id = FieldProperty(S.ObjectId)
app_config_id = ForeignIdProperty(
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/attachments.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/attachments.py b/Allura/allura/model/attachments.py
index d6af2b2..f96a71a 100644
--- a/Allura/allura/model/attachments.py
+++ b/Allura/allura/model/attachments.py
@@ -34,7 +34,7 @@ class BaseAttachment(File):
ArtifactType = None
class __mongometa__:
- name = 'attachment'
+ name = b'attachment'
polymorphic_on = 'attachment_type'
polymorphic_identity = None
session = project_orm_session
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 99b4525..71a7bf1 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -116,7 +116,7 @@ class EmailAddress(MappedClass):
re_format = re.compile('^.*\s+<(.*)>\s*$')
class __mongometa__:
- name = 'email_address'
+ name = b'email_address'
session = main_orm_session
indexes = ['nonce', ]
unique_indexes = [('email', 'claimed_by_user_id'), ]
@@ -223,7 +223,7 @@ please visit the following URL:
class AuthGlobals(MappedClass):
class __mongometa__:
- name = 'auth_globals'
+ name = b'auth_globals'
session = main_orm_session
_id = FieldProperty(int)
@@ -272,7 +272,7 @@ class User(MappedClass, ActivityNode, ActivityObject, SearchIndexable):
SALT_LEN = 8
class __mongometa__:
- name = 'user'
+ name = b'user'
session = main_orm_session
indexes = ['tool_data.sfx.userid', 'tool_data.AuthPasswordReset.hash']
unique_indexes = ['username']
@@ -816,7 +816,7 @@ class User(MappedClass, ActivityNode, ActivityObject, SearchIndexable):
class OldProjectRole(MappedClass):
class __mongometa__:
session = project_orm_session
- name = 'user'
+ name = b'user'
unique_indexes = [('user_id', 'project_id', 'name')]
@@ -833,7 +833,7 @@ class ProjectRole(MappedClass):
class __mongometa__:
session = main_orm_session
- name = 'project_role'
+ name = b'project_role'
unique_indexes = [('user_id', 'project_id', 'name')]
indexes = [
('user_id',),
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index 3d12d21..abce767 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -51,7 +51,7 @@ log = logging.getLogger(__name__)
class Discussion(Artifact, ActivityObject):
class __mongometa__:
- name = 'discussion'
+ name = b'discussion'
type_s = 'Discussion'
parent_id = FieldProperty(schema.Deprecated)
@@ -140,7 +140,7 @@ class Discussion(Artifact, ActivityObject):
class Thread(Artifact, ActivityObject):
class __mongometa__:
- name = 'thread'
+ name = b'thread'
indexes = [
('artifact_id',),
('ref_id',),
@@ -433,7 +433,7 @@ class Thread(Artifact, ActivityObject):
class PostHistory(Snapshot):
class __mongometa__:
- name = 'post_history'
+ name = b'post_history'
artifact_id = ForeignIdProperty('Post')
@@ -468,7 +468,7 @@ class PostHistory(Snapshot):
class Post(Message, VersionedArtifact, ActivityObject):
class __mongometa__:
- name = 'post'
+ name = b'post'
history_class = PostHistory
indexes = [
# used in general lookups, last_post, etc
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/filesystem.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/filesystem.py b/Allura/allura/model/filesystem.py
index 25cc698..a860aae 100644
--- a/Allura/allura/model/filesystem.py
+++ b/Allura/allura/model/filesystem.py
@@ -48,7 +48,7 @@ class File(MappedClass):
class __mongometa__:
session = project_orm_session
- name = 'fs'
+ name = b'fs'
indexes = ['filename']
_id = FieldProperty(schema.ObjectId)
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/monq_model.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/monq_model.py b/Allura/allura/model/monq_model.py
index 4aa49c1..9b478bf 100644
--- a/Allura/allura/model/monq_model.py
+++ b/Allura/allura/model/monq_model.py
@@ -68,7 +68,7 @@ class MonQTask(MappedClass):
class __mongometa__:
session = task_orm_session
- name = 'monq_task'
+ name = b'monq_task'
indexes = [
[
# used in MonQTask.get() method
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/neighborhood.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/neighborhood.py b/Allura/allura/model/neighborhood.py
index ae739f5..7335f41 100644
--- a/Allura/allura/model/neighborhood.py
+++ b/Allura/allura/model/neighborhood.py
@@ -67,7 +67,7 @@ class Neighborhood(MappedClass):
'''
class __mongometa__:
session = main_orm_session
- name = 'neighborhood'
+ name = b'neighborhood'
unique_indexes = ['url_prefix']
_id = FieldProperty(S.ObjectId)
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/notification.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/notification.py b/Allura/allura/model/notification.py
index f8bf870..aed6a65 100644
--- a/Allura/allura/model/notification.py
+++ b/Allura/allura/model/notification.py
@@ -76,7 +76,7 @@ class Notification(MappedClass):
class __mongometa__:
session = main_orm_session
- name = 'notification'
+ name = b'notification'
indexes = ['project_id']
_id = FieldProperty(str, if_missing=h.gen_message_id)
@@ -386,7 +386,7 @@ class Mailbox(MappedClass):
class __mongometa__:
session = main_orm_session
- name = 'mailbox'
+ name = b'mailbox'
unique_indexes = [
('user_id', 'project_id', 'app_config_id',
'artifact_index_id', 'topic', 'is_flash'),
@@ -705,7 +705,7 @@ class SiteNotification(MappedClass):
class __mongometa__:
session = main_orm_session
- name = 'site_notification'
+ name = b'site_notification'
_id = FieldProperty(S.ObjectId)
content = FieldProperty(str, if_missing='')
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/oauth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/oauth.py b/Allura/allura/model/oauth.py
index 1e0953b..7c27366 100644
--- a/Allura/allura/model/oauth.py
+++ b/Allura/allura/model/oauth.py
@@ -44,7 +44,7 @@ class OAuthToken(MappedClass):
class __mongometa__:
session = main_orm_session
- name = 'oauth_token'
+ name = b'oauth_token'
indexes = ['api_key']
polymorphic_on = 'type'
polymorphic_identity = None
@@ -65,7 +65,7 @@ class OAuthConsumerToken(OAuthToken):
class __mongometa__:
polymorphic_identity = 'consumer'
- name = 'oauth_consumer_token'
+ name = b'oauth_consumer_token'
unique_indexes = [('name', 'user_id')]
type = FieldProperty(str, if_missing='consumer')
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 2f113b4..df80a85 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -81,7 +81,7 @@ class ProjectCategory(MappedClass):
class __mongometa__:
session = main_orm_session
- name = 'project_category'
+ name = b'project_category'
_id = FieldProperty(S.ObjectId)
parent_id = FieldProperty(S.ObjectId, if_missing=None)
@@ -114,7 +114,7 @@ class TroveCategory(MappedClass):
class __mongometa__:
session = main_orm_session
- name = 'trove_category'
+ name = b'trove_category'
extensions = [TroveCategoryMapperExtension]
indexes = ['trove_cat_id', 'trove_parent_id', 'shortname', 'fullpath']
@@ -190,7 +190,7 @@ class Project(SearchIndexable, MappedClass, ActivityNode, ActivityObject):
class __mongometa__:
session = main_orm_session
- name = 'project'
+ name = b'project'
indexes = [
'name',
'neighborhood_id',
@@ -1214,7 +1214,7 @@ class AppConfig(MappedClass, ActivityObject):
class __mongometa__:
session = project_orm_session
- name = 'config'
+ name = b'config'
indexes = [
'project_id',
'options.import_id',
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index d720377..4287a18 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -330,7 +330,7 @@ class Repository(Artifact, ActivityObject):
BATCH_SIZE = 100
class __mongometa__:
- name = 'generic-repository'
+ name = b'generic-repository'
indexes = ['upstream_repo.name']
_impl = None
repo_id = 'repo'
@@ -722,7 +722,7 @@ class MergeRequest(VersionedArtifact, ActivityObject):
statuses = ['open', 'merged', 'rejected']
class __mongometa__:
- name = 'merge-request'
+ name = b'merge-request'
indexes = ['commit_id']
unique_indexes = [('app_config_id', 'request_number')]
type_s = 'MergeRequest'
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/stats.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/stats.py b/Allura/allura/model/stats.py
index 1668f45..8eb6ab4 100644
--- a/Allura/allura/model/stats.py
+++ b/Allura/allura/model/stats.py
@@ -37,7 +37,7 @@ from functools import reduce
class Stats(MappedClass):
class __mongometa__:
- name = 'basestats'
+ name = b'basestats'
session = main_orm_session
unique_indexes = ['_id']
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/model/webhook.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/webhook.py b/Allura/allura/model/webhook.py
index 6104a03..900181d 100644
--- a/Allura/allura/model/webhook.py
+++ b/Allura/allura/model/webhook.py
@@ -32,7 +32,7 @@ from allura.lib import helpers as h
class Webhook(Artifact):
class __mongometa__:
- name = 'webhook'
+ name = b'webhook'
unique_indexes = [('app_config_id', 'type', 'hook_url')]
type = FieldProperty(str)
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/Allura/allura/tests/model/test_artifact.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_artifact.py b/Allura/allura/tests/model/test_artifact.py
index fb6ee43..09313c1 100644
--- a/Allura/allura/tests/model/test_artifact.py
+++ b/Allura/allura/tests/model/test_artifact.py
@@ -49,7 +49,7 @@ from forgewiki import model as WM
class Checkmessage(M.Message):
class __mongometa__:
- name = 'checkmessage'
+ name = b'checkmessage'
def url(self):
return ''
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/ForgeBlog/forgeblog/model/blog.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/model/blog.py b/ForgeBlog/forgeblog/model/blog.py
index 7dc68e6..71f78e4 100644
--- a/ForgeBlog/forgeblog/model/blog.py
+++ b/ForgeBlog/forgeblog/model/blog.py
@@ -45,7 +45,7 @@ config = utils.ConfigProxy(
class Globals(MappedClass):
class __mongometa__:
- name = 'blog-globals'
+ name = b'blog-globals'
session = M.project_orm_session
indexes = ['app_config_id']
@@ -59,7 +59,7 @@ class Globals(MappedClass):
class BlogPostSnapshot(M.Snapshot):
class __mongometa__:
- name = 'blog_post_snapshot'
+ name = b'blog_post_snapshot'
type_s = 'Blog Post Snapshot'
def original(self):
@@ -104,7 +104,7 @@ class BlogPostSnapshot(M.Snapshot):
class BlogPost(M.VersionedArtifact, ActivityObject):
class __mongometa__:
- name = 'blog_post'
+ name = b'blog_post'
history_class = BlogPostSnapshot
unique_indexes = [('app_config_id', 'slug')]
indexes = [
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/ForgeChat/forgechat/model/chat.py
----------------------------------------------------------------------
diff --git a/ForgeChat/forgechat/model/chat.py b/ForgeChat/forgechat/model/chat.py
index 03466b5..ef33583 100644
--- a/ForgeChat/forgechat/model/chat.py
+++ b/ForgeChat/forgechat/model/chat.py
@@ -32,7 +32,7 @@ from allura.model.types import MarkdownCache
class ChatChannel(MappedClass):
class __mongometa__:
- name = 'globals'
+ name = b'globals'
session = M.main_orm_session
indexes = ['project_id']
unique_indexes = ['channel']
@@ -46,7 +46,7 @@ class ChatChannel(MappedClass):
class ChatMessage(M.Artifact):
class __mongometa__:
- name = 'chat_message'
+ name = b'chat_message'
indexes = ['timestamp']
type_s = 'Chat Message'
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/ForgeDiscussion/forgediscussion/model/forum.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/model/forum.py b/ForgeDiscussion/forgediscussion/model/forum.py
index e6bbd4e..73ffa57 100644
--- a/ForgeDiscussion/forgediscussion/model/forum.py
+++ b/ForgeDiscussion/forgediscussion/model/forum.py
@@ -45,7 +45,7 @@ log = logging.getLogger(__name__)
class Forum(M.Discussion):
class __mongometa__:
- name = 'forum'
+ name = b'forum'
type_s = 'Discussion'
parent_id = FieldProperty(schema.ObjectId, if_missing=None)
@@ -161,7 +161,7 @@ class ForumFile(M.File):
class ForumThread(M.Thread):
class __mongometa__:
- name = 'forum_thread'
+ name = b'forum_thread'
indexes = [
'flags',
'discussion_id',
@@ -217,7 +217,7 @@ class ForumThread(M.Thread):
class ForumPostHistory(M.PostHistory):
class __mongometa__:
- name = 'post_history'
+ name = b'post_history'
artifact_id = ForeignIdProperty('ForumPost')
@@ -225,7 +225,7 @@ class ForumPostHistory(M.PostHistory):
class ForumPost(M.Post):
class __mongometa__:
- name = 'forum_post'
+ name = b'forum_post'
history_class = ForumPostHistory
indexes = [
'timestamp', # for the posts_24hr site_stats query
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index a0d7bbc..eee7646 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -65,7 +65,7 @@ class Repository(M.Repository):
type_s = 'Git Repository'
class __mongometa__:
- name = 'git-repository'
+ name = b'git-repository'
@LazyProperty
def _impl(self):
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 1a032c4..643be54 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -59,7 +59,7 @@ class Repository(M.Repository):
type_s = 'SVN Repository'
class __mongometa__:
- name = 'svn-repository'
+ name = b'svn-repository'
branches = FieldProperty([dict(name=str, object_id=str)])
_refresh_precompute = False
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/ForgeShortUrl/forgeshorturl/model/shorturl.py
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/model/shorturl.py b/ForgeShortUrl/forgeshorturl/model/shorturl.py
index 9dbde04..e4c8ea6 100644
--- a/ForgeShortUrl/forgeshorturl/model/shorturl.py
+++ b/ForgeShortUrl/forgeshorturl/model/shorturl.py
@@ -31,7 +31,7 @@ from allura import model as M
class ShortUrl(M.Artifact):
class __mongometa__:
- name = 'short_urls'
+ name = b'short_urls'
unique_indexes = [('short_name', 'app_config_id')]
type_s = 'ShortUrl'
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index 8c0e17e..bd8c4ee 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -94,7 +94,7 @@ config = utils.ConfigProxy(
class Globals(MappedClass):
class __mongometa__:
- name = 'globals'
+ name = b'globals'
session = project_orm_session
indexes = ['app_config_id']
@@ -528,7 +528,7 @@ class Globals(MappedClass):
class TicketHistory(Snapshot):
class __mongometa__:
- name = 'ticket_history'
+ name = b'ticket_history'
def original(self):
return Ticket.query.get(_id=self.artifact_id)
@@ -570,7 +570,7 @@ class TicketHistory(Snapshot):
class Bin(Artifact, ActivityObject):
class __mongometa__:
- name = 'bin'
+ name = b'bin'
type_s = 'Bin'
_id = FieldProperty(schema.ObjectId)
@@ -612,7 +612,7 @@ class Bin(Artifact, ActivityObject):
class Ticket(VersionedArtifact, ActivityObject, VotableArtifact):
class __mongometa__:
- name = 'ticket'
+ name = b'ticket'
history_class = TicketHistory
indexes = [
'ticket_num',
@@ -1295,7 +1295,7 @@ class MovedTicket(MovedArtifact):
class __mongometa__:
session = artifact_orm_session
- name = 'moved_ticket'
+ name = b'moved_ticket'
indexes = [
('app_config_id', 'ticket_num'),
]
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/ForgeUserStats/forgeuserstats/model/stats.py
----------------------------------------------------------------------
diff --git a/ForgeUserStats/forgeuserstats/model/stats.py b/ForgeUserStats/forgeuserstats/model/stats.py
index a825e4f..84e9dbf 100644
--- a/ForgeUserStats/forgeuserstats/model/stats.py
+++ b/ForgeUserStats/forgeuserstats/model/stats.py
@@ -33,7 +33,7 @@ from allura.model import Stats
class UserStats(Stats):
class __mongometa__:
- name = 'userstats'
+ name = b'userstats'
session = main_orm_session
unique_indexes = ['_id', 'user_id']
http://git-wip-us.apache.org/repos/asf/allura/blob/e900dda8/ForgeWiki/forgewiki/model/wiki.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/model/wiki.py b/ForgeWiki/forgewiki/model/wiki.py
index a515db8..7603688 100644
--- a/ForgeWiki/forgewiki/model/wiki.py
+++ b/ForgeWiki/forgewiki/model/wiki.py
@@ -56,7 +56,7 @@ config = utils.ConfigProxy(
class Globals(MappedClass):
class __mongometa__:
- name = 'wiki-globals'
+ name = b'wiki-globals'
session = project_orm_session
indexes = ['app_config_id']
@@ -70,7 +70,7 @@ class Globals(MappedClass):
class PageHistory(Snapshot):
class __mongometa__:
- name = 'page_history'
+ name = b'page_history'
def original(self):
return Page.query.get(_id=self.artifact_id)
@@ -106,7 +106,7 @@ class PageHistory(Snapshot):
class Page(VersionedArtifact, ActivityObject):
class __mongometa__:
- name = 'page'
+ name = b'page'
history_class = PageHistory
unique_indexes = [('app_config_id', 'title')]