Ignoring Database Tables / Objects

priyasinhapriyasinha Posts: 548 Silver 1
edited February 29, 2016 10:13AM in ReadyRoll
Note: This issues has been migrated from ReadyRoll support forum

Is it possible to tell Ready Roll to ignore certain tables when it's comparing databases?

For example, we are using a content management system which creates some tables that has its own deployment / upgrade mechanism in it. We are adding our own custom tables to the same database (for which we're using Ready Roll) but we want to leave the CMS to manage its own updates.
Priya Sinha
Project Manager
Red Gate Software
Tagged:

Comments

  • You can indeed exclude/ignore specific objects when using the DBSync tool to compare the database. It does require a certain amount of editing of the database project file, as unfortunately a GUI is not yet available.

    You specify each rule as an Object Type/Object Name Pattern (regex) pair at the top of your .sqlproj file.
    <PropertyGroup> 
      <ExcludeObjectsFromImport>
        Schema=[cya];
        Table=[cya].[(.?)];
        Schema=[job];
        Table=[job].[(.?)];
        Schema=[reporting];
        Table=[reporting].[(.*?)];
      </ExcludeObjectsFromImport>
    </PropertyGroup>
    
    In this example, the cya, job and reporting schemas will be excluded, as well as the tables contained within these schemas.

    For more information on configuring exclude rules, see this article in the documentation:
    https://documentation.red-gate.com/disp ... se+Objects
    Priya Sinha
    Project Manager
    Red Gate Software
  • ledropledrop Posts: 1 New member
    Hi, I am trying this out but my PropertyGroup "ExcludeObjectsFromImport" always dissapear from the project section. Only the ExcludeObjectsFromSync stays in the file but does not hide to selected objects
  • Please note that the ExcludeObjectsFromImport setting is a feature of ReadyRoll Pro. If you already have ReadyRoll Pro and are continuing to see the removal behaviour, please let us know so we can investigate further.
    Daniel Nolan
    Product Manager
    Redgate Software
Sign In or Register to comment.