Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Database scripts version control process/strategy?

Database scripts version control process/strategy?

Scheduled Pinned Locked Moved Database
databasecollaborationquestionannouncement
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 13598689
    wrote on last edited by
    #1

    I am looking for methodologies or strategy or process that makes database version control possible. Kindly share what you follow in your projects

    D Z 2 Replies Last reply
    0
    • U User 13598689

      I am looking for methodologies or strategy or process that makes database version control possible. Kindly share what you follow in your projects

      D Offline
      D Offline
      David Mujica
      wrote on last edited by
      #2

      One way to approach this is to have a create a baseline set of scripts which created all of your DB objects: Tables, Indexes, Triggers, Stored Proc, etc. Check those scripts into a version control system () along with your source code. (Make a folder called "SQL" or something) As you revise your application, create ALTER scripts for the DB objects (Tables, Indexes, Triggers, Stored Proc, etc) which will take the database from State A to State B. Use some type of naming convention which will show the progress from one version to another. "ALTER_tables_1.0.0_to_1.0.1" When you get to a major release of the software, such as v2.0.0, then Re-Create the CREATE DB object scripts which will include all of your ALTER scripts; this way you don't have to keep rolling up schema changes. ALSO: Take into consideration that you may need Data Manipulation scripts to "seed" some of your tables with basic data. Handle those scripts with something like ALTER_Data_1.0.0_to_1.0.1 Just giving you some ideas, not completely thought out, but I remember doing something like on previous projects. BTW: I use Subversion / SVN / Tortoise as version control for myself.

      1 Reply Last reply
      0
      • U User 13598689

        I am looking for methodologies or strategy or process that makes database version control possible. Kindly share what you follow in your projects

        Z Offline
        Z Offline
        ZurdoDev
        wrote on last edited by
        #3

        There are lots of 3rd party products that can source control your database. This is one of them that I have used, SQL source control | ApexSQL[^]

        Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups