-
Notifications
You must be signed in to change notification settings - Fork 5
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 #1100 from debrief/extend-field-lengths
Extend length of two fields in database
- Loading branch information
Showing
7 changed files
with
168 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"LATEST_SQLITE_VERSION": "cebecb0b77a1", | ||
"LATEST_POSTGRES_VERSION": "2bc85b76a38b" | ||
"LATEST_SQLITE_VERSION": "fddfa70f811b", | ||
"LATEST_POSTGRES_VERSION": "a5a4bc1f7156" | ||
} |
41 changes: 41 additions & 0 deletions
41
...ations/postgres_versions/2021-12-01_39b90ad3675e_extend_length_of_platform_identifier_.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,41 @@ | ||
"""Extend length of Platform.identifier field | ||
Revision ID: 39b90ad3675e | ||
Revises: 2bc85b76a38b | ||
Create Date: 2021-12-01 21:08:52.761161+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "39b90ad3675e" | ||
down_revision = "2bc85b76a38b" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"Platforms", | ||
"identifier", | ||
existing_type=sa.VARCHAR(length=30), | ||
type_=sa.String(length=50), | ||
existing_nullable=False, | ||
schema="pepys", | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"Platforms", | ||
"identifier", | ||
existing_type=sa.String(length=50), | ||
type_=sa.VARCHAR(length=30), | ||
existing_nullable=False, | ||
schema="pepys", | ||
) | ||
# ### end Alembic commands ### |
41 changes: 41 additions & 0 deletions
41
...tions/postgres_versions/2021-12-03_a5a4bc1f7156_extend_length_of_contact_track_number_.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,41 @@ | ||
"""Extend length of Contact.track_number field | ||
Revision ID: a5a4bc1f7156 | ||
Revises: 39b90ad3675e | ||
Create Date: 2021-12-03 16:48:18.324573+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "a5a4bc1f7156" | ||
down_revision = "39b90ad3675e" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"Contacts", | ||
"track_number", | ||
existing_type=sa.VARCHAR(length=20), | ||
type_=sa.String(length=40), | ||
existing_nullable=True, | ||
schema="pepys", | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"Contacts", | ||
"track_number", | ||
existing_type=sa.String(length=40), | ||
type_=sa.VARCHAR(length=20), | ||
existing_nullable=True, | ||
schema="pepys", | ||
) | ||
# ### end Alembic commands ### |
40 changes: 40 additions & 0 deletions
40
migrations/sqlite_versions/2021-12-01_eb8a93498c02_extend_length_of_platform_identifier_.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,40 @@ | ||
"""Extend length of Platform.identifier field | ||
Revision ID: eb8a93498c02 | ||
Revises: cebecb0b77a1 | ||
Create Date: 2021-12-01 21:10:36.015159+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "eb8a93498c02" | ||
down_revision = "cebecb0b77a1" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("Platforms", schema=None) as batch_op: | ||
batch_op.alter_column( | ||
"identifier", | ||
existing_type=sa.VARCHAR(length=30), | ||
type_=sa.String(length=50), | ||
existing_nullable=False, | ||
) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("Platforms", schema=None) as batch_op: | ||
batch_op.alter_column( | ||
"identifier", | ||
existing_type=sa.String(length=50), | ||
type_=sa.VARCHAR(length=30), | ||
existing_nullable=False, | ||
) | ||
# ### end Alembic commands ### |
40 changes: 40 additions & 0 deletions
40
migrations/sqlite_versions/2021-12-03_fddfa70f811b_extend_length_of_contact_track_number_.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,40 @@ | ||
"""Extend length of Contact.track_number field | ||
Revision ID: fddfa70f811b | ||
Revises: eb8a93498c02 | ||
Create Date: 2021-12-03 16:49:33.809704+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "fddfa70f811b" | ||
down_revision = "eb8a93498c02" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("Contacts", schema=None) as batch_op: | ||
batch_op.alter_column( | ||
"track_number", | ||
existing_type=sa.VARCHAR(length=20), | ||
type_=sa.String(length=40), | ||
existing_nullable=True, | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("Contacts", schema=None) as batch_op: | ||
batch_op.alter_column( | ||
"track_number", | ||
existing_type=sa.String(length=40), | ||
type_=sa.VARCHAR(length=20), | ||
existing_nullable=True, | ||
) | ||
|
||
# ### 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