Added loop to merge databases. Need to do a few more tests, but should be finalized.

pull/2/head
Charlie Duso 8 years ago
parent 12e4860335
commit d226faddbf

@ -120,7 +120,7 @@ mainDB = 'testDB_1.db' # This is where the main database is
# referenced. Where all items will be
# merged to.
otherDBs = ['testDB_2.db'] # This is the list of the other databases.
otherDBs = ['testDB_2.db'] # This is the list of the other databases.
if (len(otherDBs) == 0):
print("ERROR: No databases have been added for merging.")
sys.exit()
@ -179,8 +179,10 @@ for i in range(0, len(otherDBs)):
# Merge databases
#for i in range(0, len(listDB)):
for i in range(0, len(listDB)):
for j in range(0, len(listTable)):
columns = listToString(getColumnNames(listTable[j])) # get columns
mergeTable(listTable[j], columns, listDB[i])
conn.commit() # Commit changes

Loading…
Cancel
Save