mirror of
https://github.com/YunoHost-Apps/pgadmin_ynh.git
synced 2024-09-03 19:56:38 +02:00
Fix issue with removed table collum
This commit is contained in:
parent
fe4323a21d
commit
4183f1a7e4
1 changed files with 3 additions and 3 deletions
|
@ -23,17 +23,17 @@ crypted_password = crypto.encrypt(password, user_encrypted_password)
|
||||||
|
|
||||||
# Declare database data to put in database
|
# Declare database data to put in database
|
||||||
data = {'id': 1,'user_id': 1, 'servergroup_id' : 1, 'name': 'Yunohost Server', 'host': 'localhost', 'port': 5432,'maintenance_db':'postgres','username':username,
|
data = {'id': 1,'user_id': 1, 'servergroup_id' : 1, 'name': 'Yunohost Server', 'host': 'localhost', 'port': 5432,'maintenance_db':'postgres','username':username,
|
||||||
'ssl_mode':'prefer', 'comment' : '', 'password' :crypted_password,'role':'', 'discovery_id':'', 'hostaddr':'','db_res':'','passfile':'',
|
'comment' : '', 'password' :crypted_password,'role':'', 'discovery_id':'', 'hostaddr':'','db_res':'','passfile':'',
|
||||||
'sslcert' :'','sslkey':'','sslrootcert':'','sslcrl':''}
|
'sslcert' :'','sslkey':'','sslrootcert':'','sslcrl':''}
|
||||||
|
|
||||||
# Insert new data in database
|
# Insert new data in database
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
cursor.execute('''INSERT INTO `server`(
|
cursor.execute('''INSERT INTO `server`(
|
||||||
`id`,`user_id`,`servergroup_id`,`name`,`host`,`port`,`maintenance_db`,`username`,
|
`id`,`user_id`,`servergroup_id`,`name`,`host`,`port`,`maintenance_db`,`username`,
|
||||||
`ssl_mode`,`comment`,`password`,`role`,`discovery_id`,`hostaddr`,`db_res`,`passfile`,`sslcert`,`sslkey`,`sslrootcert`,`sslcrl`
|
`comment`,`password`,`role`,`discovery_id`,`hostaddr`,`db_res`,`passfile`,`sslcert`,`sslkey`,`sslrootcert`,`sslcrl`
|
||||||
) VALUES(
|
) VALUES(
|
||||||
:id,:user_id,:servergroup_id,:name,:host,:port,:maintenance_db,:username,
|
:id,:user_id,:servergroup_id,:name,:host,:port,:maintenance_db,:username,
|
||||||
:ssl_mode,:comment,:password,:role,:discovery_id,:hostaddr,:db_res,:passfile,:sslcert,:sslkey,:sslrootcert,:sslcrl
|
:comment,:password,:role,:discovery_id,:hostaddr,:db_res,:passfile,:sslcert,:sslkey,:sslrootcert,:sslcrl
|
||||||
)''', data)
|
)''', data)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue