Skip to content

Commit

Permalink
Adds missing avatars.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrillkuettel committed Aug 18, 2024
1 parent 01f45cf commit 4763ebe
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions src/privatim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pyramid.config import Configurator
from pyramid_beaker import session_factory_from_settings
from sqlalchemy import Column, ForeignKey, String, TIMESTAMP, func, Computed, \
VARCHAR, text
VARCHAR, text, Boolean
from email.headerregistry import Address
from privatim.mail import PostmarkMailer
from privatim.orm.uuid_type import UUIDStr as UUIDStrType
Expand Down Expand Up @@ -301,12 +301,12 @@ def upgrade(context: 'UpgradeContext'): # type: ignore[no-untyped-def]
)

# this needs to be added in the second run
# context.operations.create_index(
# 'idx_searchable_files_searchable_text_de_CH',
# 'searchable_files',
# ['searchable_text_de_CH'],
# postgresql_using='gin',
# )
context.operations.create_index(
'idx_searchable_files_searchable_text_de_CH',
'searchable_files',
['searchable_text_de_CH'],
postgresql_using='gin',
)

# Drop all existing comments and related tables
context.drop_table('comments_for_consultations_comments')
Expand Down Expand Up @@ -358,6 +358,28 @@ def upgrade(context: 'UpgradeContext'): # type: ignore[no-untyped-def]

fix_user_constraints_to_work_with_hard_delete(context)

# Add 'deleted' column to 'consultations' table
context.add_column(
'consultations',
Column(
'deleted',
Boolean,
nullable=False,
server_default='false',
),
)

# Add 'deleted' column to 'searchable_files' table
context.add_column(
'searchable_files',
Column(
'deleted',
Boolean,
nullable=False,
server_default='false',
),
)

context.operations.create_index(
context.operations.f('ix_consultations_deleted'),
'consultations',
Expand Down

0 comments on commit 4763ebe

Please sign in to comment.