mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 13:19:53 +05:00
flake8: E501 line too long (N > 79 characters).
This commit is contained in:
committed by
Dan Christian Bogos
parent
c591f3e51c
commit
14db4adf83
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user