Not picking up table additions

I just added a couple of tables to my linked DB within SSMS.
I refreshed the table list and the newly created tables are listed (Primary keys, FK's, etc) all as I expected.
However within the SQL Source Control window in SSMS, when I select the "Commit" option, none of the table updates are shown. I have checked filter definitions to make sure I am not excluding something (I'm not - all options are checked).
The only objects listed are roles and users (which I don't want to commit, and I usually turn off).
If I add a column to an existing table, that modification does show.
However, if I try "Undo changes" on the column change, the line is grayed out in the "Undo Changes" dialog.

Completely stumped here.
Tagged:

Best Answer

  • BoggisBoggis Posts: 4 New member
    Must have been a "ghost in the system". I restarted things, deleted the manually added files and tables, then just ran my table script in SSMS and this time the changes were picked up.
    Very odd for a while there.

Answers

  • That's strange. Can you reproduce this and post some code? Are you sure no one else committed these items to the repo?
  • BoggisBoggis Posts: 4 New member
    At least we are in agreement - very strange indeed.
    No sure what code you want. I have added two table definitions (each in a separate SQL file in the DB's repository folder). The tables now exist in the DB, but do not show in the "commit" panel.
    The only change seen is a single test column I added to an existing table.
  • Can you repro this in another db? Or am I missing something. Did you add the files to the folder yourself? Come from a push/pull/commit from another developer? Or did you change the code in the db and SOC not detect this? I haven't seen this, as I've added columns and had them just show up.
  • BoggisBoggis Posts: 4 New member
    As I said, column changes to existing table(s) are picked up fine.
    I initially added new tables via SSMS. No changes detected to commit.
    So, I added the SQL statements/files to the files in the DB repository folder. Still not picked up.
    All that is being detected right now are user/role changes - which I didn't actually make.
    Interestingly, SQL Compare, when run against my local DB and the running instance of the remote DB detects the tables that I have added (since, of course, they haven't been committed to source control yet and deployed).
  • Changes won't be detected if you add files to the repo. There's a format that's required, and often SQL Source Control can error out if you've manually added files. If you added the new tables with SSMS, I'm not sure why they wouldn't be picked up. That's very strange. I'll ping support.
Sign In or Register to comment.