[rt-users] Starting Tcket Number

Jesse Vincent jesse at bestpractical.com
Thu Oct 25 17:11:06 EDT 2001


And for mysql, just insert a row into Tickets with an id of your new 
starting ID-1 and then delete that row.



On Thu, Oct 25, 2001 at 04:02:58PM -0400, Justis Peters wrote:
> On Thursday 25 October 2001 03:18 pm, Tam, Thomas wrote:
> > Hi
> >
> > Is there any way to change the Ticket ID number? For example the number
> > starts with 1000 instead of 1.
> 
> Yes, depending on the DBMS you are using.  If you are using PostgreSQL, you 
> would execute the following query from inside of psql:
> 
> select setval('tickets_id_seq', 1000);
> 
> Depending on the security you setup on PostgreSQL, you may have to 'su 
> postgres' first and then run 'psql rt2'.  If you want it all on one command 
> line, try the following.  It should execute the query in postgres and drop 
> you back to the command line:
> 
> bash$ echo 'select setval('tickets_id_seq', 10);' | psql rt2
> 
> There should be something similar to this for MySQL users, but I don't know 
> if MySQL uses sequences or not (perhaps somebody else knows?).
> 
> Before you set the sequence forward, be sure that you want it that high.  You 
> can't set it backwards later without causing integrity violations on the 
> primary key.
> 
> Enjoy, and have a good day!
> 
> Justis Peters
> Oculan Corp.
> justis at oculan.com
> 
> 
> _______________________________________________
> rt-users mailing list
> rt-users at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
> 

-- 
http://www.bestpractical.com/products/rt  -- Trouble Ticketing. Free.




More information about the rt-users mailing list