Object permissions in separate files instead of inside object definition
Presently, when syncing database to folder, all object permissions are stored inside object definition files. We would like to change the way permissions are stored; we would like to have an option to store object permissions in separate files.
For example, the following entry appears in dbo.A.sql file:
CREATE TABLE [dbo].[A]
(
[b] [int] NULL
) ON PRIMARY
GO
GRANT SELECT ON [dbo].[A] TO [role_x]
We save data into folders which are then checked into GIT as branches. Or goal is to be able to track all table changes in branches before merging into master branch, which is automatically deployed to prod. Additionally, we want to track all changes to permissions inside GIT, but only for PROD database, and not DEV databases, since dev databases have different permissions. Since object permissions and schema are stored in the same files, it is very difficult to merge dev changes into PROD without accidentally modifying object permissions.
-
Anonymous commented