How to ignore grant permission within schema change

ducmanducman Posts: 26 Bronze 2
edited May 23, 2018 6:35PM in ReadyRoll
Schema file tend to have the creation of the schema with grant permissions of that schema to users. 

But if we filter out users, how can we filter out the grant permission to those users within the schema file?

-- example ... how does one filter/ignore the grant line so readyroll doesn't detect these changes?
CREATE SCHEMA [test] -- schema exists in all regions
GRANT DELETE ON SCHEMA:: [test] TO [domain\test_user] -- user only exists in dev region

Best Answer

  • dnlnlndnlnln Posts: 234 Gold 2
    Answer ✓
    You can ignore all user permissions, as role memberships that include users, by adding the following to your ProjectName.sqlproj file under the <Project> element:
    <div><PropertyGroup>&nbsp; &nbsp; &nbsp; 
    <span style="background-color: transparent; color: inherit; font-size: inherit; font-family: Roboto, "Helvetica Neue", Arial, sans-serif;"></PropertyGroup></span></div>
    When you next import your database, such permissions & memberships will be excluded from the generated migrations

    For more information, see Key concepts > Configuring comparison & script generation options.
    Daniel Nolan
    Product Manager
    Redgate Software


  • RichardLRichardL Posts: 418 Gold 4
    Hi @ducman

    Thanks for your post. 

    If you don't receive a response from the community and you have a support contract you can always send us a ticket so that a product specialist can help you with your issue. 

    Kind regards

    Richard Lynch. 
    Customer Support
    Redgate Software
Sign In or Register to comment.