Skip to content

Commit

Permalink
Use MarkdownColumnNative for venue(basic) and venue_room(document, fo…
Browse files Browse the repository at this point in the history
…r some experimental testing on production, since this is a dormant field)
  • Loading branch information
miteshashar committed Sep 22, 2022
1 parent 6cc62a0 commit d874fd7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
4 changes: 3 additions & 1 deletion funnel/models/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ class Comment(UuidMixin, BaseMixin, db.Model):
'Comment', backref=sa.orm.backref('in_reply_to', remote_side='Comment.id')
)

_message = MarkdownColumnNative('message', profile='basic', nullable=False)
_message = MarkdownColumnNative( # type: ignore[has-type]
'message', profile='basic', nullable=False
)

_state = sa.Column(
'state',
Expand Down
17 changes: 14 additions & 3 deletions funnel/models/venue.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@

from coaster.sqlalchemy import add_primary_relationship, with_roles

from . import BaseScopedNameMixin, CoordinatesMixin, MarkdownColumn, UuidMixin, db, sa
from . import (
BaseScopedNameMixin,
CoordinatesMixin,
MarkdownColumnNative,
UuidMixin,
db,
sa,
)
from .helpers import reopen
from .project import Project
from .project_membership import project_child_role_map
Expand All @@ -25,7 +32,9 @@ class Venue(UuidMixin, BaseScopedNameMixin, CoordinatesMixin, db.Model):
grants_via={None: project_child_role_map},
)
parent = sa.orm.synonym('project')
description = MarkdownColumn('description', default='', nullable=False)
description = MarkdownColumnNative(
'description', profile='basic', default='', nullable=False
)
address1 = sa.Column(sa.Unicode(160), default='', nullable=False)
address2 = sa.Column(sa.Unicode(160), default='', nullable=False)
city = sa.Column(sa.Unicode(30), default='', nullable=False)
Expand Down Expand Up @@ -104,7 +113,9 @@ class VenueRoom(UuidMixin, BaseScopedNameMixin, db.Model):
grants_via={None: set(project_child_role_map.values())},
)
parent = sa.orm.synonym('venue')
description = MarkdownColumn('description', default='', nullable=False)
description = MarkdownColumnNative( # type: ignore[has-type]
'description', profile='basic', default='', nullable=False
)
bgcolor = sa.Column(sa.Unicode(6), nullable=False, default='229922')

seq = sa.Column(sa.Integer, nullable=False)
Expand Down

1 comment on commit d874fd7

@miteshashar
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIP #1485

Please sign in to comment.