From 252d96206e4cc271b128d15fae96e98485527619 Mon Sep 17 00:00:00 2001 From: Victoria Earl Date: Tue, 20 Aug 2024 16:08:36 -0400 Subject: [PATCH] Update pre-con FAQ text Also adds the external sync, created, and modified columns to Super MAG tables. --- ...f24_add_external_sync_created_and_last_.py | 74 +++++++++++++++++++ magprime/templates/emails/precon_faqs.html | 20 ++--- 2 files changed, 82 insertions(+), 12 deletions(-) create mode 100644 alembic/versions/3b1f31ec9f24_add_external_sync_created_and_last_.py diff --git a/alembic/versions/3b1f31ec9f24_add_external_sync_created_and_last_.py b/alembic/versions/3b1f31ec9f24_add_external_sync_created_and_last_.py new file mode 100644 index 0000000..6087ba1 --- /dev/null +++ b/alembic/versions/3b1f31ec9f24_add_external_sync_created_and_last_.py @@ -0,0 +1,74 @@ +"""Add external sync, created, and last updated columns to magprime tables + +Revision ID: 3b1f31ec9f24 +Revises: 0173330bfb6e +Create Date: 2024-08-01 02:30:54.112080 + +""" + + +# revision identifiers, used by Alembic. +revision = '3b1f31ec9f24' +down_revision = '0173330bfb6e' +branch_labels = None +depends_on = None + +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import postgresql +import residue + + +try: + is_sqlite = op.get_context().dialect.name == 'sqlite' +except Exception: + is_sqlite = False + +if is_sqlite: + op.get_context().connection.execute('PRAGMA foreign_keys=ON;') + utcnow_server_default = "(datetime('now', 'utc'))" +else: + utcnow_server_default = "timezone('utc', current_timestamp)" + +def sqlite_column_reflect_listener(inspector, table, column_info): + """Adds parenthesis around SQLite datetime defaults for utcnow.""" + if column_info['default'] == "datetime('now', 'utc')": + column_info['default'] = utcnow_server_default + +sqlite_reflect_kwargs = { + 'listeners': [('column_reflect', sqlite_column_reflect_listener)] +} + +# =========================================================================== +# HOWTO: Handle alter statements in SQLite +# +# def upgrade(): +# if is_sqlite: +# with op.batch_alter_table('table_name', reflect_kwargs=sqlite_reflect_kwargs) as batch_op: +# batch_op.alter_column('column_name', type_=sa.Unicode(), server_default='', nullable=False) +# else: +# op.alter_column('table_name', 'column_name', type_=sa.Unicode(), server_default='', nullable=False) +# +# =========================================================================== + + +def upgrade(): + op.add_column('prev_season_supporter', sa.Column('created', residue.UTCDateTime(), server_default=sa.text("timezone('utc', current_timestamp)"), nullable=False)) + op.add_column('prev_season_supporter', sa.Column('last_updated', residue.UTCDateTime(), server_default=sa.text("timezone('utc', current_timestamp)"), nullable=False)) + op.add_column('prev_season_supporter', sa.Column('external_id', postgresql.JSONB(astext_type=sa.Text()), server_default='{}', nullable=False)) + op.add_column('prev_season_supporter', sa.Column('last_synced', postgresql.JSONB(astext_type=sa.Text()), server_default='{}', nullable=False)) + op.add_column('season_pass_ticket', sa.Column('created', residue.UTCDateTime(), server_default=sa.text("timezone('utc', current_timestamp)"), nullable=False)) + op.add_column('season_pass_ticket', sa.Column('last_updated', residue.UTCDateTime(), server_default=sa.text("timezone('utc', current_timestamp)"), nullable=False)) + op.add_column('season_pass_ticket', sa.Column('external_id', postgresql.JSONB(astext_type=sa.Text()), server_default='{}', nullable=False)) + op.add_column('season_pass_ticket', sa.Column('last_synced', postgresql.JSONB(astext_type=sa.Text()), server_default='{}', nullable=False)) + + +def downgrade(): + op.drop_column('season_pass_ticket', 'last_synced') + op.drop_column('season_pass_ticket', 'external_id') + op.drop_column('season_pass_ticket', 'last_updated') + op.drop_column('season_pass_ticket', 'created') + op.drop_column('prev_season_supporter', 'last_synced') + op.drop_column('prev_season_supporter', 'external_id') + op.drop_column('prev_season_supporter', 'last_updated') + op.drop_column('prev_season_supporter', 'created') diff --git a/magprime/templates/emails/precon_faqs.html b/magprime/templates/emails/precon_faqs.html index 74c6b53..f19881e 100644 --- a/magprime/templates/emails/precon_faqs.html +++ b/magprime/templates/emails/precon_faqs.html @@ -3,7 +3,7 @@ You are receiving this e-mail because you are pre-registered to attend {{ c.EVENT_NAME_AND_YEAR }}. -Please refer to this FAQ for instructions on how to get your badge, and how to view the schedule. +Please refer to this FAQ for instructions on how to get your badge, where to pick up merch, how to view the schedule, and other useful information.

@@ -12,28 +12,24 @@ When you arrive at MAGFest, go to Registration, located in Expo Hall E, to pick up your badge. Once Registration opens on Thursday morning, usually at 10:00 AM, it will stay open until Sunday afternoon at 1:00 PM, with three exceptions. Registration will close between 4:00AM and 7:00AM Friday, Saturday, and Sunday mornings. Please bring a government-issued photo id such as a driver's license or military id.

- Will additional badges be sold at the door?
- Yes, but there is a possibility of us selling out, so check our website for any badge availability alerts. + Will additional badges be sold at the door?
+ Badges will be available online until we sell out, which may occur during pre-registration. Please view our website and social media for any badge availability alerts.

Which registration line do I use?

- Where can I pick up swag that I pre-ordered, such as a t-shirt or supporter bundle?
- After you've picked up your badge, you can pick up your swag at the MAGFest merch booth. The merch booth is located at the front of Expo Hall C. Use this map to help find your way to the merch booth from the registration area. + Where can I pick up the merch that I pre-ordered?
+ After you've picked up your badge, you can pick up your swag at the front of Expo Hall E.

Where can I view a schedule of events?
- There are multiple ways to view our schedule:

- + Go to the Guidebook website to view the guidebook in your web browser or download the mobile app. Make sure to check for guidebook updates periodically through the weekend, as we may make schedule changes.

{% if attendee.is_transferable %}