flake8: E501 line too long (N > 79 characters).

This commit is contained in:
Bas Couwenberg
2019-05-02 11:08:23 +02:00
committed by Dan Christian Bogos
parent c591f3e51c
commit 14db4adf83
4 changed files with 100 additions and 28 deletions

View File

@@ -13,12 +13,12 @@ password = 'CGRateS.org'
print('Connecting to PostgreSQL...')
cnx = psycopg2.connect(
host=host,
port=port,
dbname=database,
user=user,
password=password
)
host=host,
port=port,
dbname=database,
user=user,
password=password
)
cursor = cnx.cursor()
print('Renaming old column...')
@@ -28,7 +28,12 @@ print('Adding new column...')
cursor.execute('ALTER TABLE cdrs ADD usage NUMERIC(30)')
print('Setting new values...')
cursor.execute('UPDATE cdrs SET usage = usage_old * 1000000000 WHERE usage_old IS NOT NULL')
cursor.execute(
(
'UPDATE cdrs SET usage = usage_old * 1000000000'
' WHERE usage_old IS NOT NULL'
)
)
print('Deleting old column...')
cursor.execute('ALTER TABLE cdrs DROP COLUMN usage_old')