Show
Ignore:
Timestamp:
04/23/03 16:20:22 (22 years ago)
Author:
jalet
Message:

The upgrade script now uses TCP/IP for the connection on localhost to PostgreSQL.
Please modify the script to access to a remote PostgreSQL server during the upgrade.

Location:
pykota/trunk/initscripts
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/initscripts/README

    r942 r951  
    3838    This file upgrades the PostgreSQL Quota Storage Database schema 
    3939    from versions before 1.01 to version 1.01. 
    40     DON'T USE IT IF YOU ALREADY RUN A POST-1.01 PyKota VERSION. 
     40     
     41    IT'S THERE FOR HISTORICAL REASONS ONLY : DON'T USE IT, USE 
     42    THE SCRIPT DESCRIBED BELOW INSTEAD ! 
    4143     
    4244  * upgrade-from-before-1.03.py : 
  • pykota/trunk/initscripts/README.postgresql

    r942 r951  
    5757   
    5858* An sql script to upgrade a pre-1.01 PyKota Quota Storage DataBase to  
    59   1.01 is included. If your PyKota version is equal or higher than 1.01 then 
    60   you can skip to the next section. Otherwise, if you want to keep your datas 
    61   from a pre-1.01 PyKota version, then please launch the following commands :  
     59  1.01 is still included for historical reasons. PLEASE DON'T USE IT !  
    6260   
    63         - Launch the psql frontend and connect to the 
    64           database pykota as a PostgreSQL administrator 
    65           (i.e. the postgres user) : 
    66            
    67             $ psql -h localhost -U postgres pykota 
    68            
    69         - Executes the pykota-upgrade-postgresql.sql script :   
    70          
    71             pykota=# \i VERYOLDpykota-upgrade-postgresql.sql 
    72              
    73         - Quit the psql frontend :     
    74          
    75             pykota=# \q 
    76              
    77         - Your PostgreSQL PyKota storage is now ready 
    78           for use for the next step, i.e. upgrade the 
    79           database schema to version 1.03. PLEASE 
    80           TAKE ANY STEPS DESCRIBED IN THE NEXT SECTION. 
    81    
    82   If you already run PyKota v1.01 or above, you don't need 
    83   to run this upgrade script. 
    84    
    85   WARNING :   
    86  
    87   This script requires a recent version of PostgreSQL to run 
    88   successfully, because it requires the ALTER TABLE DROP COLUMN 
    89   syntax to be supported. However in case you've got an older 
    90   version, upgrading PostgreSQL is not mandatory, you will just  
    91   have two unused fields in the grouppquota table, these 
    92   fields are pagecounter and lifepagecounter, just forgot them. 
    93    
    94 * If you are already running PyKota 1.01 or 1.02 and want to upgrade to  
    95   1.03, YOU HAVE TO RUN the upgrade-from-before-1.03.py shell script. 
    96   NOT LAUNCHING THIS SCRIPT WILL CAUSE PYKOTA TO STOP WORKING ! 
    97   PLEASE NEVER RUN THIS SCRIPT IF YOUR EXISTING VERSION OF PYKOTA IS  
    98   ALREADY 1.03 OD HIGHER. 
     61* If you are already running an old version of PyKota (<1.03) and  
     62  want to upgrade to 1.03, YOU HAVE TO RUN the  
     63  upgrade-from-before-1.03.py shell script. NOT LAUNCHING THIS SCRIPT  
     64  WILL CAUSE PYKOTA TO STOP WORKING ! PLEASE NEVER RUN THIS SCRIPT IF  
     65  YOUR EXISTING VERSION OF PYKOTA IS ALREADY 1.03 OD HIGHER.  
  • pykota/trunk/initscripts/upgrade-from-before-1.03.py

    r942 r951  
    5757    """Returns the database object or None if we can't connect to it.""" 
    5858    try : 
    59         pykotadb = pg.connect(dbname, user="postgres") 
     59        pykotadb = pg.connect(host="localhost", port=5432, dbname=dbname, user="postgres") 
    6060    except pg.error, msg :      
    6161        sys.stderr.write("%s\n" % msg) 
     62        sys.stderr.write("Unable to connect to the local PostgreSQL server.\nPlease modify the open_database() method in %s\nto connect to the correct PostgreSQL server\nand relaunch the script.\n" % sys.argv[0]) 
    6263        return  
    6364    else :