appharbor/AppHarbor-SqlServerBulkCopy — pull request #10 by marchy (2012-10-26 09:32:29+00:00)
Title: Workaround for issues with tables that have self-managed identity columns

This adds capabilities to copy tables that have self-managed identity columns, and also the ability to include system tables in the copy (to handle scenarios such as copying Entity Framework's migration history table).

The way it works:
- 2 new flags have been added to the command ("onlytables" and "includesystemtables")
- "onlytables" is the opposite of "ignoretables". It's a whitelist to run the command only on specific tables
- "includesystemtables" overrides the tool's default behaviour of ignoring system tables

Example Usage (handles copying the Entity Framework migration history table):
- run two commands to achieve the full bulk copy of the database (back-to-back in a .bat file).
- the 1st command clears the DB and copies over all the regular tables using the following flags:
--cleardstdatabase --checkidentityexists
- the 2nd command copies over only the "__MigrationHistory" table using the following flags:
--onlytables [dbo].[__MigrationHistory] --includesystemtables