-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set default limits to be higher (#2382)
* Set default limits to be higher * fix test
- Loading branch information
Showing
4 changed files
with
31 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
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,25 @@ | ||
"""empty message | ||
Revision ID: 0470_change_default_limit | ||
Revises: 0469_edit_emails | ||
Create Date: 2016-06-01 14:17:01.963181 | ||
""" | ||
revision = "0470_change_default_limit" | ||
down_revision = "0469_edit_emails" | ||
|
||
from alembic import op | ||
|
||
|
||
def upgrade(): | ||
conn = op.get_bind() | ||
conn.execute("ALTER TABLE services ALTER COLUMN email_annual_limit SET DEFAULT 20000000") | ||
conn.execute("ALTER TABLE services ALTER COLUMN sms_annual_limit SET DEFAULT 100000") | ||
conn.execute("UPDATE services SET email_annual_limit = 20000000 WHERE email_annual_limit = 10000000") | ||
conn.execute("UPDATE services SET sms_annual_limit = 100000 WHERE sms_annual_limit = 25000") | ||
|
||
|
||
def downgrade(): | ||
conn = op.get_bind() | ||
conn.execute("ALTER TABLE services ALTER COLUMN email_annual_limit SET DEFAULT 10000000") | ||
conn.execute("ALTER TABLE services ALTER COLUMN sms_annual_limit SET DEFAULT 25000") |
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