Is it possible to configure a ReadyRoll project to use a __MigrationLog table in a schema other than dbo, so that more than one application could manage and version control its database schema within a shared database?
Alternatively, is it possible to use a table named something other than __MigrationLog, to the same end?
Apologies if this is documented somewhere; I have tried to find an answer, and failed.
Firstly, apologies for the delay in responding. I’ve had a chance to look into whether it’s possible to deploy the [__MigrationLog] to an alternate schema, and I’m pleased to report that this is indeed configurable.
In order to set a custom schema name, edit your project file (.sqlproj) and add the following under the root node:<PropertyGroup> <MigrationLogSchemaName>MySchema</MigrationLogSchemaName> </PropertyGroup>
The next time you deploy your project, the MigrationLog] will be created within the specified schema (as will the related view object, [MigrationLogCurrent]). If you’re looking to split your shared database into multiple projects (i.e. so that each project only includes the objects from a specific schema), have a look at the following forum post to find out how to setup project filers:
Any questions please let me know.