-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setting URL field lengths to 2000 (#298)
* updated field length in models * added migration * added website of project * removed comment * fixed indentation * added length validator to proposal form * added length validators to project model form
- Loading branch information
Bibhas
committed
Nov 22, 2018
1 parent
fb4203b
commit 898e507
Showing
5 changed files
with
59 additions
and
12 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"""url field leng | ||
Revision ID: 60a132ae73f1 | ||
Revises: d6b1904bea0e | ||
Create Date: 2018-11-20 18:01:51.811819 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '60a132ae73f1' | ||
down_revision = 'd6b1904bea0e' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
|
||
def upgrade(): | ||
op.alter_column('project', 'bg_image', existing_type=sa.Unicode(length=250), | ||
type_=sa.Unicode(length=2000), existing_nullable=True) | ||
op.alter_column('project', 'website', existing_type=sa.Unicode(length=250), | ||
type_=sa.Unicode(length=2000), existing_nullable=True) | ||
op.alter_column('project', 'buy_tickets_url', existing_type=sa.Unicode(length=250), | ||
type_=sa.Unicode(length=2000), existing_nullable=True) | ||
op.alter_column('project', 'explore_url', existing_type=sa.Unicode(length=250), | ||
type_=sa.Unicode(length=2000), existing_nullable=True) | ||
op.alter_column('proposal', 'preview_video', existing_type=sa.Unicode(length=250), | ||
type_=sa.Unicode(length=2000), existing_nullable=True) | ||
op.alter_column('proposal', 'slides', existing_type=sa.Unicode(length=250), | ||
type_=sa.Unicode(length=2000), existing_nullable=True) | ||
|
||
|
||
def downgrade(): | ||
op.alter_column('proposal', 'slides', existing_type=sa.Unicode(length=2000), | ||
type_=sa.Unicode(length=250), existing_nullable=True) | ||
op.alter_column('proposal', 'preview_video', existing_type=sa.Unicode(length=2000), | ||
type_=sa.Unicode(length=250), existing_nullable=True) | ||
op.alter_column('project', 'explore_url', existing_type=sa.Unicode(length=2000), | ||
type_=sa.Unicode(length=250), existing_nullable=True) | ||
op.alter_column('project', 'buy_tickets_url', existing_type=sa.Unicode(length=2000), | ||
type_=sa.Unicode(length=250), existing_nullable=True) | ||
op.alter_column('project', 'website', existing_type=sa.Unicode(length=2000), | ||
type_=sa.Unicode(length=250), existing_nullable=True) | ||
op.alter_column('project', 'bg_image', existing_type=sa.Unicode(length=2000), | ||
type_=sa.Unicode(length=250), existing_nullable=True) |