Options

How do I add version numbers during build

adaingeradainger Posts: 2
edited April 27, 2015 10:39AM in SQL CI 2
Hi there,

I am trying to find a way of adding a version number to the objects within our database so that we can see at a glance what versions of objects we have, and to highlight any unauthorised or unplanned changes.

My plan was to add an extended property to each of the database objects which would contain the version number. This version number would come from the TeamCity build number (which we currently use together with the SQL CI plugin). Unfortunately I have been unable to find any information online as to how I can achieve this.

A couple of ideas we've discussed in the office are:

1) Add an extended property to each object as part of our development process that contains a placeholder. As part of the build process, that placeholder is then replaced with the build number. However, I believe this will rely upon people manually adding the extended property which may or may not happen.
2) Run a script as part of our build process that goes through all objects and adds an extended property.

Has anyone done this? Or perhaps know how it could be achieved?

Many thanks in advance for any help you can offer.
Adam

Comments

  • Options
    Hi,

    SQL CI will make the build identical to the database in source control so as you've suggested, there are really only two options - add the versioning during the development process or some sort of post-build process to add it.

    Have you thought about using DLM Dashboard to track the changes in your database instead? It might be easier and it's free too.
    Software Engineer
    Redgate Software
Sign In or Register to comment.