# Upgrade TFS version

**URL:** <https://www.finalbuilder.com/forums/t/upgrade-tfs-version/5654>\
**Category:** Discussion\
**Created:** [July 20, 2017, 1:29am UTC](https://www.finalbuilder.com/forums/t/upgrade-tfs-version/5654 "2017-07-20T01:29:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zcastel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/z/87869e/32.png) [@zcastel](https://www.finalbuilder.com/forums/u/zcastel)\
**Post date:** [July 20, 2017, 1:29am UTC](https://www.finalbuilder.com/forums/t/upgrade-tfs-version/5654/1 "2017-07-20T01:29:49Z")

</div>

Hi,  
  
I have about 20 TFS 2013 repositories.  
I'm going to upgrade to TFS 2017.  
anyone knows how to update tfs version within the Postgres database instead of update each repo one by one ?  
and of course, if that way is safe ?

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [July 21, 2017, 1:26am UTC](https://www.finalbuilder.com/forums/t/upgrade-tfs-version/5654/2 "2017-07-21T01:26:47Z")

</div>

Hi Zvika,  
  
If you are using the bundled PostgreSQL database, the following SQL statement will change the TFS version as required. &nbsp;

`UPDATE` `public``.builds_repositorydata ``SET` `plugin = ``REPLACE``(plugin, ``‘TFS2013’``, ``‘TFS2017’``) ``WHERE` `plugin like ``‘%“TFSRepositoryPlugIn”%’``;`

  
You can run this using the Query Tool in pgAdmin3 (%ProgramFiles%\VSoft Technologies\ContinuaCI\Server\PostgreSQL\bin\pgAdmin3.exe).  
  
You will find connection details in %ProgramFiles%\VSoft Technologies\ContinuaCI\Server\Continua.Server.Service.exe.config under //  
  
Ensure that you have a backup of the database before running any SQL statements so you can recover from any mistakes. Also, shut down and restart the Continua CI Server server after running otherwise cached values will be used by the service.
