To prevent resultant dbs from not having the original BC20,IBD50 etc tables, I first copy the original database as a seed for the output
databse.
To get rid of the sqlite command error, I added the 'if not exist' to the 'create unique index' clause.