|
|
|
@ -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
|
|
|
|
|