dataexpress icon indicating copy to clipboard operation
dataexpress copied to clipboard

SqlBackend createTable blindly drops if table exists

Open masinoa opened this issue 12 years ago • 2 comments

SqlBackend the createTable method blindly drops the table if it already exists. Is this what we want? It could instead throw an exception or the method could return some kind of status object, e.g. Completed, Failed(withReason), etc. Then the caller method can decide if the table should be dropped if it exists. Of course, we can also add a "dropIfExists" arg to the createTable method for convenience.

masinoa avatar May 07 '13 14:05 masinoa

FWIW, I agree that it would be better to have control over this situation.

murphyke avatar Jun 18 '14 19:06 murphyke

@murphyke this is going to go away in a future release. The upcoming release candidate adds logging support and includes a warning about this behavior when it's triggered:

https://github.com/cbmi/dataexpress/blob/develop/src/main/scala/edu/chop/cbmi/dataExpress/backends/SqlBackend.scala#L404-L418

mitalia avatar Jun 27 '14 18:06 mitalia