-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
10,638 additions
and
689 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...ations/versions/2024_01_09_1652-ad7cc2de5ff8_add_minimum_valid_iat_time_to_subscribers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"""add minimum_valid_iat_time to subscribers | ||
Revision ID: ad7cc2de5ff8 | ||
Revises: 0dc429ca07f5 | ||
Create Date: 2024-01-09 16:52:20.941572 | ||
""" | ||
import os | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy_utils import StringEncryptedType | ||
from sqlalchemy_utils.types.encrypted.encrypted_type import AesEngine | ||
|
||
|
||
def secret(): | ||
return os.getenv("DB_SECRET") | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'ad7cc2de5ff8' | ||
down_revision = '0dc429ca07f5' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.add_column('subscribers', sa.Column('minimum_valid_iat_time', StringEncryptedType(sa.DateTime, secret, AesEngine, "pkcs5", length=255))) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_column('subscribers', 'minimum_valid_iat_time') |
42 changes: 42 additions & 0 deletions
42
...ppointment/migrations/versions/2024_01_10_2259-502c76bc79e0_add_time_created_and_time_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"""add time_created and time_updated to tables | ||
Revision ID: 502c76bc79e0 | ||
Revises: 0dc429ca07f5 | ||
Create Date: 2024-01-10 22:59:02.194281 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy import func | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '502c76bc79e0' | ||
down_revision = '0dc429ca07f5' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
affected_tables = ['attendees', 'calendars', 'slots', 'subscribers'] | ||
index_tables = ['appointments', 'availabilities', 'external_connections', 'schedules', 'slots', ] | ||
|
||
def upgrade() -> None: | ||
for table in affected_tables: | ||
op.add_column(table, sa.Column('time_created', sa.DateTime, server_default=func.now(), index=True)) | ||
# Slots already has this column... | ||
if table != 'slots': | ||
op.add_column(table, sa.Column('time_updated', sa.DateTime, server_default=func.now(), index=True)) | ||
|
||
# Fix some existing time_* columns | ||
for table in index_tables: | ||
op.create_index('ix_time_created', table, ['time_created']) | ||
op.create_index('ix_time_updated', table, ['time_updated']) | ||
|
||
|
||
def downgrade() -> None: | ||
for table in affected_tables: | ||
op.drop_column(table, 'time_created') | ||
if table != 'slots': | ||
op.drop_column(table, 'time_updated') | ||
|
||
for table in index_tables: | ||
op.drop_index('ix_time_created', table) | ||
op.drop_index('ix_time_updated', table) |
24 changes: 24 additions & 0 deletions
24
backend/src/appointment/migrations/versions/2024_01_12_1801-ea551afc14fc_merge_commit.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Merge Commit | ||
Revision ID: ea551afc14fc | ||
Revises: ad7cc2de5ff8, 502c76bc79e0 | ||
Create Date: 2024-01-12 18:01:38.962773 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'ea551afc14fc' | ||
down_revision = ('ad7cc2de5ff8', '502c76bc79e0') | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
pass | ||
|
||
|
||
def downgrade() -> None: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.