|
|
|
@ -10,11 +10,13 @@
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
import sqlite3
|
|
|
|
|
import time
|
|
|
|
|
import datetime
|
|
|
|
|
|
|
|
|
|
############################ Global Variables ##################################
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
dbCount = 1 # Variable to count the number of databases
|
|
|
|
|
dbCount = 0 # Variable to count the number of databases
|
|
|
|
|
|
|
|
|
|
############################ Function Definitions ##############################
|
|
|
|
|
################################################################################
|
|
|
|
@ -89,7 +91,7 @@ def mergeTable(tableName, columnNames, dbNameTableName):
|
|
|
|
|
conn.commit()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
############################## Merge Script ####################################
|
|
|
|
|
############################## Input Parameters ################################
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
# Create the initial database connection - everything will be merged to here
|
|
|
|
@ -97,8 +99,16 @@ conn = sqlite3.connect('') # Enter the name of the database
|
|
|
|
|
curs = conn.cursor() # Creates a cursor for use on the database
|
|
|
|
|
|
|
|
|
|
# Attach databases
|
|
|
|
|
|
|
|
|
|
attachDatabase('') # Enter the name of the database (i.e. "example.db")
|
|
|
|
|
attachDatabase('')
|
|
|
|
|
attachDatabase('')
|
|
|
|
|
attachDatabase('')
|
|
|
|
|
|
|
|
|
|
############################## Merge Script ####################################
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
# Compare databases
|
|
|
|
|
|
|
|
|
|
# Merge databases
|
|
|
|
|
print("Merging databases. Started at: " + time.time())
|
|
|
|
|
print("Databases finished merging. Time elapsed: ")
|
|
|
|
|