Switch the table names to use lower case.
This commit is contained in:
parent
0372013f70
commit
b07eff41f6
1 changed files with 6 additions and 6 deletions
|
@ -20,12 +20,12 @@ def get_id(query):
|
|||
|
||||
def upgrade():
|
||||
conn = op.get_bind()
|
||||
event_id = get_id('Select id From ExternalNotificationEvent Where name="repo_push" Limit 1')
|
||||
method_id = get_id('Select id From ExternalNotificationMethod Where name="webhook" Limit 1')
|
||||
conn.execute('Insert Into RepositoryNotification (uuid, repository_id, event_id, method_id, config_json) Select public_id, repository_id, %s, %s, parameters FROM Webhook' % (event_id, method_id))
|
||||
event_id = get_id('Select id From externalnotificationevent Where name="repo_push" Limit 1')
|
||||
method_id = get_id('Select id From externalnotificationmethod Where name="webhook" Limit 1')
|
||||
conn.execute('Insert Into repositorynotification (uuid, repository_id, event_id, method_id, config_json) Select public_id, repository_id, %s, %s, parameters FROM webhook' % (event_id, method_id))
|
||||
|
||||
def downgrade():
|
||||
conn = op.get_bind()
|
||||
event_id = get_id('Select id From ExternalNotificationEvent Where name="repo_push" Limit 1')
|
||||
method_id = get_id('Select id From ExternalNotificationMethod Where name="webhook" Limit 1')
|
||||
conn.execute('Insert Into Webhook (public_id, repository_id, parameters) Select uuid, repository_id, config_json FROM RepositoryNotification Where event_id=%s And method_id=%s' % (event_id, method_id))
|
||||
event_id = get_id('Select id From externalnotificationevent Where name="repo_push" Limit 1')
|
||||
method_id = get_id('Select id From externalnotificationmethod Where name="webhook" Limit 1')
|
||||
conn.execute('Insert Into webhook (public_id, repository_id, parameters) Select uuid, repository_id, config_json FROM repositorynotification Where event_id=%s And method_id=%s' % (event_id, method_id))
|
||||
|
|
Reference in a new issue