• 0
TroyT

New VG Nickname Auto-Populate Existing Vics

Question

I'm about to update our servers. After adding the new nickname column in the vehicles table of the DB, do the vehicles that are currently stored in VG need a nickname entry before they can be fetched? I was experimenting on the test servers with mixed results. If so, does anyone have an Sql query that will do it automatically? 

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

yes all existing vehicles need a nickname. run the following query on  your db

UPDATE vehicle SET nickname=id;

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

I was inspired to look into sql syntax and have modified the query to restrict the change to vehicles that are stored in VG
 

UPDATE vehicle SET nickname=id WHERE territory_id IS NOT NULL;

Thanks again.

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.