Update of /cvsroot/modeling/ProjectModeling/Modeling/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv8829/scripts
Modified Files:
mdl_generate_DB_schema.py
Log Message:
Fixed bug #785434: mdl_generate_DB_schema now detects when the database
(file)name in dsn and in the admin-dsn are not the same.
Index: mdl_generate_DB_schema.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/scripts/mdl_generate_DB_schema.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mdl_generate_DB_schema.py 2 Aug 2003 08:39:18 -0000 1.5
--- mdl_generate_DB_schema.py 9 Aug 2003 11:00:26 -0000 1.6
***************
*** 334,337 ****
--- 334,345 ----
if user_connection_dict:
model.setConnectionDictionary(user_connection_dict)
+
+ # SQLite specifics, bug #785434
+ if model.adaptorName() == 'SQLite':
+ dsn_db_name = model.connectionDictionary()['database']
+ admin_dsn_db_name = admin_connection_dict['database']
+ if dsn_db_name != admin_dsn_db_name:
+ raise ValueError, "Database name in the dsn (%s) and in the admin-dsn (%s) should be the same for SQLite"%(dsn_db_name, admin_dsn_db_name)
+
result=databaseSchemaWithOptions(model, _defaultOptions,
administrativeConnectionDictionary=admin_connection_dict,
|