mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-05 13:38:26 -04:00
more files
This commit is contained in:
@@ -9,6 +9,8 @@ Create Date: 2017-04-24 15:12:18.907629
|
||||
# revision identifiers, used by Alembic.
|
||||
import uuid
|
||||
|
||||
from sqlalchemy import text
|
||||
|
||||
revision = '0075_create_rates_table'
|
||||
down_revision = '0074_update_sms_rate'
|
||||
|
||||
@@ -28,11 +30,17 @@ def upgrade():
|
||||
|
||||
op.create_index(op.f('ix_rates_notification_type'), 'rates', ['notification_type'], unique=False)
|
||||
|
||||
op.get_bind()
|
||||
op.execute("INSERT INTO rates(id, valid_from, rate, notification_type) "
|
||||
"VALUES('{}', '2016-05-18 00:00:00', 1.65, 'sms')".format(uuid.uuid4()))
|
||||
op.execute("INSERT INTO rates(id, valid_from, rate, notification_type) "
|
||||
"VALUES('{}', '2017-04-01 00:00:00', 1.58, 'sms')".format(uuid.uuid4()))
|
||||
conn = op.get_bind()
|
||||
input_params = {
|
||||
"id": uuid.uuid4()
|
||||
}
|
||||
conn.execute(text("INSERT INTO rates(id, valid_from, rate, notification_type) "
|
||||
"VALUES(:id, '2016-05-18 00:00:00', 1.65, 'sms')"), input_params)
|
||||
input_params = {
|
||||
"id": uuid.uuid4()
|
||||
}
|
||||
conn.execute(text("INSERT INTO rates(id, valid_from, rate, notification_type) "
|
||||
"VALUES(:id, '2017-04-01 00:00:00', 1.58, 'sms')"), input_params)
|
||||
|
||||
|
||||
def downgrade():
|
||||
|
||||
Reference in New Issue
Block a user