Fix for #16

assigment should be placed in dynamic ‘.onAttach’
now addArtifact() and createEmptRepo is working with the use of single
entry point getConnectionToDB()