ReadyRoll 1.10 release notes
Published 11 February 2016
1.10.1 - April 17th, 2015
Features
- DbSync Tool - Filter by keyword on object name (Details)
- Display validation errors for all scripts, not for just the error encountered (Details)
Fixes
- ‘FileGroup does not exist’ errors upon importing tables that are stored on custom filegroups. (Details)
- Incorrect script order output message during build (Details)
- “One or more errors occurred” displayed by DBSync tool rather than actual error message (Details)
- Document windows stealing focus from DBSync tool-window (Details)
1.10 - December 5th, 2014
Features
- DbSync Tool performance improvements (Details)
- Project build performance improvements (Details)
- Deploy-Change migrations: configure object types (project setting) (Details)
- Validate that Migration ID’s are unique across project during build (Details)
- Improve error reporting in the DbSync tool (Details)
- Migration info widget: remember expanded status across documents (Details)
Offline Schema Model
You can now view the tables, schemas, users and types of your database, right within the project itself (e.g. Tables\dbo.Customers.sql
, Tables\dbo.Orders.sql
,Types\dbo.OrderNo.sql
etc).
The files themselves contain declarative representations of the schema objects, with CREATE
statements that are updated to reflect object changes, rather than the imperative statements of Deploy-Once migrations, which generally follow an ALTER
approach.
If you’ve used SQL Server Data Tools or Visual Studio database edition projects before, then this file layout may seem familiar to you.
One reason to enable this feature is to keep track of changes at the object level over time, i.e. using your source control tool’s Annotate feature.
How it works
The Offline Schema Model is created and maintained by the ReadyRoll DbSync tool in Visual Studio: whenever you Import new changes from your sandbox database, the offline model will be updated in the project to match the schema changes being imported.
Get started by enabling the option in project settings:
Then click the View Pending Changes button in the DbSync tool to initialize the offline copy of your database, which will be placed into a subfolder called Schema-Model
.
Object types included in the Offline Schema Model
- Tables*
- Assemblies
- Credentials
- Defaults
- File Groups
- Full Text Catalogs/Indices/Stop Lists
- Partition Schemes/Functions
- Roles
- Rules
- Schemas
- Search Property Lists
- Services/Bindings/Queues/Contracts etc.
- Sequences
- Synonyms
- User Defined Data Types
- Users
- Xml Schema Collections
Table files include definitions of primary keys, foreign keys, constraints, default values, indices, and change data capture (CDC) instances.
All files contain permission GRANT statements, where applicable, plus any extended properties attached to the objects.
The above items are included in the OSM by default, when you enable this feature in Project Settings.
Programmable object types (optional)
Additionally, the following types of programmable objects can also be included in the OSM:
- StoredProcedures
- Triggers
- UserDefinedFunctions
- Views
- DatabaseDdlTriggers
However we wouldn’t necessarily recommend this if you are already using Deploy-Change migrations, as this will duplicate these types of files in your project.
Object types to include in OSM (project setting)
If you wish to customize which objects get included in your database project’s Offline Schema Model, edit your .sqlproj
file and add the following under the root node of the file:
<PropertyGroup>
<SyncToOfflineSchemaModelObjectTypes>Table;Assembly;Contract;Credential;Default;EventNotification;FileGroup;FullTextCatalog;FullTextIndex;FullTextIndexColumn;FullTextStopList;FullTextStopListStopWord;MessageType;PartitionFunction;PartitionScheme;Queue;RemoteServiceBinding;Role;Route;Rule;Schema;SearchPropertyList;Sequence;Service;Synonym;Users;UserDefinedDataType;XmlSchemaCollection</SyncToOfflineSchemaModelObjectTypes>
</PropertyGroup>
Add or remove any items from the list to control which objects get included (note that we’ve omitted the programmable object types in the list).
Group by schema (into sub-folders)
By default, ReadyRoll splits the objects in the OSM by type, and prefixes each file with the appropriate schema name. If, however, you would like to group your object files by schema (in addition to type), then add the following under the root of your .sqlproj
file (or by selecting the option shown above):
<PropertyGroup>
<SyncToOfflineSchemaModelBySchema>True</SyncToOfflineSchemaModelBySchema>
</PropertyGroup>
On a related note, if you are also using Deploy-Change migrations in your project, and would like to organize those files by schema as well, then add the following to your project file:
<PropertyGroup>
<DeployChangesImportSchemaFolders>True</DeployChangesImportSchemaFolders>
</PropertyGroup>
The future of the Offline Schema Model
We’re very excited to be re-introducing this feature, after it was removed in an earlier version of ReadyRoll.
At the moment the OSM folder is read-only, however we may introduce the possibility of importing from object definitions in source control, allowing you to generate a new synchronization script upon merging branches.