Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /CondCore/Utilities/test/migrate is written in an unsupported language. File is not indexed.

0001 #run with old version
0002 set dir1=/afs/cern.ch/cms/sdt/web/CondCore/SQLiteData
0003 foreach x ($dir1/*.db)
0004 echo $x
0005 foreach tag (`cmscond_list_iov -c sqlite_file:$x`)
0006 cmscond_list_iov -c sqlite_file:$x -t $tag > `basename $x`_dump.${tag}
0007 end
0008 end
0009 
0010 ##
0011 ##
0012 
0013 
0014 #prepare dictionaries
0015 set dict=`ls $CMSSW_RELEASE_BASE/lib/slc4_ia32_gcc345/ | grep libCondForm | xargs -n 1 -I T basename T .so | cut -c 4-80 | xargs`
0016 
0017 touch drop
0018 
0019 
0020 #set dir=/build/vin/SQLiteData
0021 #foreach x ($dir/*.db)
0022 #echo $x
0023 #pool_upgrade_pool_schema -c sqlite_file:$x -d $dict
0024 #foreach tag (`cmscond_list_iov -c sqlite_file:$x`)
0025 #cmscond_delete_iov  -c sqlite_file:$x -t $tag
0026 #end
0027 #pool_drop_container -n "cond::IOV" --full -c sqlite_file:$x
0028 #echo ".exit" | sqlite3 -batch -init drop $x
0029 #end
0030 #rm drop
0031 
0032 #pool_remove_object_relational_mapping -v CONDIOV_2.0 -c sqlite_file:$x
0033 #pool_remove_object_relational_mapping -v automatic_default_for_cond::IOV -c sqlite_file:$x
0034 
0035 
0036 
0037 #
0038 ## with the new version 
0039 #
0040 set dir=/build/vin/SQLiteData
0041 echo "drop table METADATA;" >> drop
0042 foreach x ($dir/*.db)
0043 echo $x
0044 pool_upgrade_pool_schema -c sqlite_file:$x -d $dict
0045 pool_drop_container -n "cond::IOV" --full -c sqlite_file:$x
0046 echo ".exit" | sqlite3 -batch -init drop $x
0047 end
0048 rm drop
0049 
0050 foreach x (*_dump*)
0051 set file = `echo $x | sed 's/_dump.*$//'`
0052 echo $file
0053 cmscond_load_iov -c sqlite_file:$dir/$file $x
0054 end
0055 
0056 
0057 foreach x ($dir/*.db)
0058 echo $x
0059 pool_query_database -c sqlite_file:$x -d $dict
0060 foreach tag (`cmscond_list_iov -c sqlite_file:$x`)
0061 echo $tag
0062 cmscond_list_iov -c sqlite_file:$x -t $tag
0063 end
0064 end
0065