Skip to content

SQL Source Control

Welcome to the SQL Source Control feature suggestion list. Find out more information about SQL Source Control at http://www.red-gate.com/products/sql-development/sql-source-control/.

If you have any questions, need help or have found a bug in SQL Source Control, please review our support information http://redgatesupport.red-gate.com/home.

To get new features, performance improvements and bug fixes as soon as they’re available, you may want to turn on frequent updates: http://www.red-gate.com/products/sql-development/sql-source-control/frequent-updates

SQL Source Control

Categories

JUMP TO ANOTHER FORUM

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback

50 results found

  1. I would like the ability to source control a subset of a table (perhaps using a view).

    I have inherited a database where lookup data is intermixed with user defined data. We reference the lookup data in the table using a code (VARCHAR) that is unique when another field is NULL, so it is possible to ensure that records are created/updated/deleted without concern for the primary key involved.

    For more information, you can refer to this forum post:
    http://www.red-gate.com/messageboard/viewtopic.php?p=50087

    636 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    under review  ·  Kendra responded

    Hi everyone. I have merged some User Voice items on this topic of “filtered” static data, as there was significant overlap. I want to share our current guidance on handling scenarios where you need to version a subset of the columns and/or rows in the table.

    With SQL Source control, the best option at this point is to use a post-deployment script for this purpose.

    SQL Source Control introduced pre- and post- scripts in v6.3.

    A post-deployment script gives you a good amount of flexibility over exactly which rows or columns of data you want to include in your project. Example post-deployment scripts for static data are here: https://documentation.red-gate.com/soc7/common-tasks/working-with-pre-post-deployment-scripts/static-data

    If you make heavy use of Static Data, we have stronger support for this in SQL Change Automation.

    SQL Change Automation:

    • Supports column filtered static data tables in the SCA plugin in SSMS
    • Supports multiple post-deployment scripts, in case there is…
  2. Currently, SQL Data files contain a bunch of insert statements, but the order of the insert statements can be inconsistent. For example, new records might get inserted on the top or the bottom. Also, multiple SET IDENTITYINSERT statements sometimes get created. This makes it difficuly to merge data changes between multiple branches in TFS Source Control. If the Insert statements had a consistent order and only included one SET IDENTITYINSERT diffs and merges would be easier.

    530 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    under review  ·  Kendra responded

    Thanks for this suggestion and for the many comments and upvotes. I realize that this is a pain point.

    I have a few shorter-term workarounds to summarize as well as some information on the longer roadmap in this update. I know these shorter-term workarounds aren’t perfect (I summarize the pros and cons), but I’m posting them as they may help a few folks.

    Workaround 1) When data changes to static data need to be made, use a “relink the table” pattern
    One can “cleanly rescript” a static data table in SQL Source Control by:

    • Unlinking the static data table
    • Committing
    • Relinking the static data table
    • Committing

    Pro: This works with the GUI and requires no special knowledge or comfort with TSQL. This may help folks with just a few static data tables.
    Con: This requires extra steps and results in extra commits in the history, which I realize can…

  3. I have a single schema for all customers but different reference data for different customers. It would be nice if I could manage this all within SQL Source Control. This should also be understood by SQL Compare and my continuous integration system when it comes time to deploy this to my different environments and customers' sites.

    254 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    under review  ·  Kendra responded

    Hi all. Thank you for your votes and feedback on this issue over the years. Here is our current guidance for this suggestion:

    Post-deployment scripts give you flexibility for static data

    With SQL Source Control, you can now use a post-deployment script to “dynamically” deploy static data based on a factor such as @@SERVERNAME or other query-able conditions.

    SQL Source Control introduced pre- and post- scripts in v6.3.

    An example post-deployment script which shows how to control deployment of static data by environment is here: https://documentation.red-gate.com/soc7/common-tasks/working-with-pre-post-deployment-scripts/static-data

    If you make heavy use of Static Data, we have stronger support for this in SQL Change Automation.

    SQL Change Automation:

    • Supports column filtered static data tables in the SCA plugin in SSMS
      Supports multiple post-deployment scripts, in case there is a preference to manage static data tables in dedicated post-deployment scripts
    • Allows approaches like bulk loading larger static data tables by supporting SQLCMD
  4. I can undo any DDL operation but I don't have the option to undo a data change in a source controlled table. I think data changes should also be in the list of changes I can undo.

    200 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    8 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Kendra responded

    While SQL Source Control does not currently provide a simple way to right click and ‘Undo’ static data changes on the ‘Commit’ screen as suggested, there is a workaround which may help some users.

    If you wish to revert the static data in the table to a previous version which you have committed, you can do this by viewing the history of commits for the object in SQL Source Control, and then launching SQL Data Compare to update the database.

    Please note that this workaround requires a license for Data Compare. More detail on how to do this are here: https://documentation.red-gate.com/soc/common-tasks/update-to-a-revision-from-source-control

  5. We have the same issue as noted here: http://www.red-gate.com/messageboard/viewtopic.php?t=13662&highlight=foriegn+foreign+key

    The FK is recreated with NOCHECK during data sync which triggers a schema change.

    104 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    5 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  6. When adding a static table to be managed by SSC the comparison key is automatically selected. Our tables have auto generated INT ID columns as PK used in FK's. In our Static Data tables we have other columns that are unique and for them we have UK’s that we would like to use as the comparison key.

    Here is another with the same issue...
    http://www.red-gate.com/messageboard/viewtopic.php?t=16498&highlight=comparison+key

    I have not found any workaround for this yet at least.
    I believe that this would be a great improvement for SSC and would be used by many. If you agree please vote for this…

    83 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  7. If a table is linked as static data, any changes to the data should automatically be included in the migration script, just as changes to the schema are. Having to write a manual script or use the separate compare tool is extra work, and small changes are easy to miss.

    43 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  8. Make it possible for us to configure how SQL Source Control does its data compare. There are some great settings that work within SQL Data Compare 10 that allow a user to configure how data in each table is compared between data sources. Currently the main feature I want is to allow the selection of table columns to actually compare (i.e. one column is an identity field which isn't always the same).

    34 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  9. When you link a table as static data in Sql Source control it would be nice if the static tables were easily identifiable under the tables node in management studio.

    28 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  10. Increase performance of SQL Source Control when using Static Data. Even with small amount of static data the performace of the tool is not acceptable.

    24 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  11. A table is under source control and the data of that table is linked as static data.
    Both table definition and data has been changed and are visible in the 'Commit changes' tab.
    Since the data is just edited and changed for development purpose it should not be committed.
    But in this situation it is impossible to only commit de table definition.
    When checking the table the data is also checked (and the other way around also).

    It would be nice to be able to commit the changes separetly.

    20 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  12. "Take theirs" and "Keep mine" are an all or nothing option, I would like to have more control over this and be able to keep my new records but take the updated, or keep my updated records but take the new records, for example.

    19 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  13. I have my database linked to source control, and if I make a change to a schema, it shows a blue dot in the Object Explorer to indicate there are pending changes. However the same does not apply to static data – if I change some data in a table that is setup for static data source control, there is no icon to indicate there are changes to be committed. The data change does appear when I go to the commit changes tab however.

    15 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  14. Sometimes I need to write scripts to run before and after a SQL Data Compare.

    13 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  15. I just did a data edit (inserted one row) but in the differences I see three rows inserted and two removed. Two of the rows inserted are letter for letter identical to the two rows removed.

    Doesn't really matter, just a little confusing to read

    13 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  16. Our application is highly metadata driven thus we must treat our static data like source code. Specifically we need accept deleteions that are made locally, apply insertions made globally, and identify the differences. Currently Sql Source Control does NOT differentiate between rows missing from the local database because either 1) the local developer deleted them or 2) they were added by a global developer to the latest source code controlled version. In case 1, we want to drive that deleteion back into the latest source code controlled version. In case 2, we want to drive that insertion into the local…

    13 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  17. We have thousands of tables (some with millions of rows) with only 90-100 static data tables.

    At the moment, I have to edit the project; untick all then tick 90-100 manually which is very time consuming.

    If there was some extended property or search item or project option to “link” static data tables ONLY – this would be a huge time saver.

    Thanks for your response.

    Regards

    11 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  18. I am trying to pick my tables for the static data feature I just dound and i'm using "explore data" to find the table I want to store the data for. The popup however is modal so I cant scroll the data explorer without saving the ones I just ticked.

    11 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  19. Presently a standalone migration script runs before the main block. This seems odd as the point is to migrate data and for that you need schema to be in place.

    I would like to be able to add standalone migration scripts to the end of the main block.

    We ship databases with some data populated. (This is not simple static data that can be managed using linked tables). We ship for example some out the box entities such as Roles, A base User, a base Organization etc. They have circular references so to insert we have to turn off table…

    10 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  20. When linking static data to source control the unicode characters are appearing as question marks
    so please add the support for the unicode characters in the script files

    10 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Static Data  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
← Previous 1 3
  • Don't see your idea?