-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2418 from ratheesh-aot/DESENG-515-MultiLangEvent
[ To Feature ] - DESENG-515: Added Subscribe item translation and Timeline Event translation API
- Loading branch information
Showing
97 changed files
with
4,771 additions
and
556 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
62 changes: 62 additions & 0 deletions
62
met-api/migrations/versions/c4f7189494ed_create_engagement_translation_table.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,62 @@ | ||
"""create_engagement_translation_table | ||
Revision ID: c4f7189494ed | ||
Revises: dbe023373f4f | ||
Create Date: 2024-03-07 16:38:26.958748 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'c4f7189494ed' | ||
down_revision = 'dbe023373f4f' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('engagement_translation', | ||
sa.Column('created_date', sa.DateTime(), nullable=False), | ||
sa.Column('updated_date', sa.DateTime(), nullable=True), | ||
sa.Column('id', sa.Integer(), | ||
autoincrement=True, nullable=False), | ||
sa.Column('engagement_id', sa.Integer(), nullable=False), | ||
sa.Column('language_id', sa.Integer(), nullable=False), | ||
sa.Column('name', sa.String(length=50), nullable=True), | ||
sa.Column('description', sa.Text(), nullable=True), | ||
sa.Column('rich_description', postgresql.JSON( | ||
astext_type=sa.Text()), nullable=True), | ||
sa.Column('content', sa.Text(), nullable=True), | ||
sa.Column('rich_content', postgresql.JSON( | ||
astext_type=sa.Text()), nullable=True), | ||
sa.Column('consent_message', postgresql.JSON( | ||
astext_type=sa.Text()), nullable=True), | ||
sa.Column('slug', sa.String(length=200), nullable=True), | ||
sa.Column('upcoming_status_block_text', postgresql.JSON( | ||
astext_type=sa.Text()), nullable=True), | ||
sa.Column('open_status_block_text', postgresql.JSON( | ||
astext_type=sa.Text()), nullable=True), | ||
sa.Column('closed_status_block_text', postgresql.JSON( | ||
astext_type=sa.Text()), nullable=True), | ||
sa.Column('created_by', sa.String( | ||
length=50), nullable=True), | ||
sa.Column('updated_by', sa.String( | ||
length=50), nullable=True), | ||
sa.ForeignKeyConstraint( | ||
['engagement_id'], ['engagement.id'], ondelete='CASCADE'), | ||
sa.ForeignKeyConstraint( | ||
['language_id'], ['language.id'], ondelete='CASCADE'), | ||
sa.PrimaryKeyConstraint('id'), | ||
sa.UniqueConstraint('engagement_id', 'language_id', | ||
name='_engagement_language_uc') | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table('engagement_translation') | ||
# ### end Alembic commands ### |
31 changes: 31 additions & 0 deletions
31
met-api/migrations/versions/dbe023373f4f_remove_taxon_default_add_constraint.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 @@ | ||
"""Remove default_value from engagement_metadata_taxa and add unique constraint | ||
Revision ID: dbe023373f4f | ||
Revises: 35124d2e41cb | ||
Create Date: 2024-01-30 17:05:25.313222 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'dbe023373f4f' | ||
down_revision = '35124d2e41cb' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_unique_constraint(None, 'engagement_metadata_taxa', ['id']) | ||
op.drop_column('engagement_metadata_taxa', 'default_value') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('engagement_metadata_taxa', sa.Column( | ||
'default_value', sa.TEXT(), autoincrement=False, nullable=True)) | ||
op.drop_constraint(None, 'engagement_metadata_taxa', type_='unique') | ||
# ### end Alembic commands ### |
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.