generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 378-update-submission-processing-to-use-pola…
…rs-data-validator
- Loading branch information
Showing
19 changed files
with
1,783 additions
and
1,064 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
db_revisions/versions/26f11ac15b3c_add_is_voluntary_to_filing.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,28 @@ | ||
"""add is_voluntary to filing | ||
Revision ID: 26f11ac15b3c | ||
Revises: f4091e4ce218 | ||
Create Date: 2024-10-16 15:15:41.261646 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "26f11ac15b3c" | ||
down_revision: Union[str, None] = "f4091e4ce218" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
with op.batch_alter_table("filing") as batch_op: | ||
batch_op.add_column(sa.Column("is_voluntary", sa.Boolean, server_default=sa.text("false"), nullable=False)) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_column("filing", "is_voluntary") |
28 changes: 28 additions & 0 deletions
28
db_revisions/versions/63138f5cf036_change_is_voluntary_to_nullable.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,28 @@ | ||
"""change is_voluntary to nullable | ||
Revision ID: 63138f5cf036 | ||
Revises: 26f11ac15b3c | ||
Create Date: 2024-10-28 14:22:58.391354 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "63138f5cf036" | ||
down_revision: Union[str, None] = "26f11ac15b3c" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
with op.batch_alter_table("filing", schema=None) as batch_op: | ||
batch_op.alter_column("is_voluntary", nullable=True) | ||
|
||
|
||
def downgrade() -> None: | ||
with op.batch_alter_table("filing", schema=None) as batch_op: | ||
batch_op.alter_column("is_voluntary", nullable=False) |
48 changes: 48 additions & 0 deletions
48
db_revisions/versions/6babc6109a5a_set_character_limit_in_contact_info.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,48 @@ | ||
"""Set character limit in contact info | ||
Revision ID: 6babc6109a5a | ||
Revises: ba8234fe9eb5 | ||
Create Date: 2024-10-07 16:33:18.213745 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "6babc6109a5a" | ||
down_revision: Union[str, None] = "ba8234fe9eb5" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
with op.batch_alter_table("contact_info", schema=None) as batch_op: | ||
batch_op.alter_column("first_name", type_=sa.String(255), nullable=False) | ||
batch_op.alter_column("last_name", type_=sa.String(255), nullable=False) | ||
batch_op.alter_column("hq_address_street_1", type_=sa.String(255), nullable=False) | ||
batch_op.alter_column("hq_address_street_2", type_=sa.String(255), nullable=True) | ||
batch_op.alter_column("hq_address_street_3", type_=sa.String(255), nullable=True) | ||
batch_op.alter_column("hq_address_street_4", type_=sa.String(255), nullable=True) | ||
batch_op.alter_column("hq_address_city", type_=sa.String(255), nullable=False) | ||
batch_op.alter_column("hq_address_state", type_=sa.String(255), nullable=False) | ||
batch_op.alter_column("email", type_=sa.String(255), nullable=False) | ||
batch_op.alter_column("phone_number", type_=sa.String(255), nullable=False) | ||
batch_op.alter_column("phone_ext", type_=sa.String(255), nullable=True) | ||
|
||
|
||
def downgrade() -> None: | ||
with op.batch_alter_table("contact_info", schema=None) as batch_op: | ||
batch_op.alter_column("first_name", type_=sa.String, nullable=False) | ||
batch_op.alter_column("last_name", type_=sa.String, nullable=False) | ||
batch_op.alter_column("hq_address_street_1", type_=sa.String, nullable=False) | ||
batch_op.alter_column("hq_address_street_2", type_=sa.String, nullable=True) | ||
batch_op.alter_column("hq_address_street_3", type_=sa.String, nullable=True) | ||
batch_op.alter_column("hq_address_street_4", type_=sa.String, nullable=True) | ||
batch_op.alter_column("hq_address_city", type_=sa.String, nullable=False) | ||
batch_op.alter_column("hq_address_state", type_=sa.String, nullable=False) | ||
batch_op.alter_column("email", type_=sa.String, nullable=False) | ||
batch_op.alter_column("phone_number", type_=sa.String, nullable=False) | ||
batch_op.alter_column("phone_ext", type_=sa.String, nullable=True) |
29 changes: 29 additions & 0 deletions
29
db_revisions/versions/ba8234fe9eb5_add_extension_to_contactinfo.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,29 @@ | ||
"""add extension to contactinfo | ||
Revision ID: ba8234fe9eb5 | ||
Revises: 7356a7d7036d | ||
Create Date: 2024-09-24 12:26:46.755693 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "ba8234fe9eb5" | ||
down_revision: Union[str, None] = "7356a7d7036d" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
with op.batch_alter_table("contact_info") as batch_op: | ||
batch_op.add_column(sa.Column("phone_ext", sa.String(254), nullable=True)) | ||
|
||
|
||
def downgrade() -> None: | ||
with op.batch_alter_table("contact_info") as batch_op: | ||
batch_op.drop_column("phone_ext") |
63 changes: 63 additions & 0 deletions
63
db_revisions/versions/f4091e4ce218_add_character_limit_to_user_action_columns.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,63 @@ | ||
"""Add character limit to user_action columns | ||
Revision ID: f4091e4ce218 | ||
Revises: 6babc6109a5a | ||
Create Date: 2024-10-08 01:33:25.832473 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "f4091e4ce218" | ||
down_revision: Union[str, None] = "6babc6109a5a" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
|
||
with op.batch_alter_table("user_action", schema=None) as batch_op: | ||
batch_op.alter_column( | ||
"user_name", | ||
type_=sa.String(length=255), | ||
existing_type=sa.String, | ||
nullable=False, | ||
) | ||
batch_op.alter_column( | ||
"user_email", | ||
type_=sa.String(length=255), | ||
nullable=False, | ||
) | ||
batch_op.alter_column( | ||
"user_id", | ||
type_=sa.String(length=36), | ||
existing_type=sa.String, | ||
nullable=False, | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
with op.batch_alter_table("user_action", schema=None) as batch_op: | ||
batch_op.alter_column( | ||
"user_name", | ||
type_=sa.String, | ||
existing_type=sa.String(length=255), | ||
nullable=False, | ||
) | ||
batch_op.alter_column( | ||
"user_email", | ||
type_=sa.String, | ||
existing_type=sa.String(length=255), | ||
nullable=False, | ||
) | ||
batch_op.alter_column( | ||
"user_id", | ||
type_=sa.String, | ||
existing_type=sa.String(length=36), | ||
nullable=False, | ||
) |
Oops, something went wrong.