+ Reply to Thread
Results 1 to 11 of 11

Thread: how do i add prefix to my gamma tables?

  1. #1
    Senior Member d3nnis has disabled reputation
    Join Date
    Jun 2003
    Location
    Singapore
    Posts
    573

    how do i add prefix to my gamma tables?

    I am not using anymore curently.

  2. #2
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,686
    I don't understand what you're asking.
    Steve Machol, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.


  3. #3
    Senior Member d3nnis has disabled reputation
    Join Date
    Jun 2003
    Location
    Singapore
    Posts
    573
    Quote Originally Posted by Steve Machol
    I don't understand what you're asking.

    currently my vb gamma tables names are not using any prefix, I would like to add them now... how do i do that instead of altering table name one by one (there is over 80 tables...)

  4. #4
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,686
    AFAIK the only way to do this is changing them manually one-by-one.
    Steve Machol, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.


  5. #5
    Senior Member d3nnis has disabled reputation
    Join Date
    Jun 2003
    Location
    Singapore
    Posts
    573
    Quote Originally Posted by Steve Machol
    AFAIK the only way to do this is changing them manually one-by-one.
    using the alter query rite?

    Can I actually write a .sql script to do mass alter?

    by the way after altering i need to add the prefix in my config.php file rite?

  6. #6
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,686
    I really don't know of any of these methods. And yes, you will need to change config.php to add this prefix after you've changed the tables.
    Steve Machol, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.


  7. #7
    Senior Member merk is on a distinguished road merk's Avatar
    Join Date
    Jul 2001
    Location
    Canberra, Australia
    Age
    25
    Posts
    4,145
    Each table would need to be renamed by a seperate query unless you were really good at sql queries.


    So doing them one by one is fine, you could write a shell script to do it, too.

  8. #8
    Senior Member d3nnis has disabled reputation
    Join Date
    Jun 2003
    Location
    Singapore
    Posts
    573
    okies done I wrote the sql script. For those who needs it. Just change vb3_ according to what u need, below is the code for you to run via mysql console or phpmyadmin.

    PHP Code:
     ALTER TABLE access RENAME vb3_access;
      
    ALTER TABLE adminhelp RENAME vb3_adminhelp;
      
    ALTER TABLE administrator RENAME vb3_administrator;
      
    ALTER TABLE adminlog RENAME vb3_adminlog;
      
    ALTER TABLE adminutil RENAME vb3_adminutil;
      
    ALTER TABLE announcement RENAME vb3_announcement;
      
    ALTER TABLE attachment RENAME vb3_attachment;
      
    ALTER TABLE attachmenttype RENAME vb3_attachmenttype;
      
    ALTER TABLE attachmentviews RENAME vb3_attachmentviews;
      
    ALTER TABLE avatar RENAME vb3_avatar;
      
    ALTER TABLE bbcode RENAME vb3_bbcode;
      
    ALTER TABLE calendar RENAME vb3_calendar;
      
    ALTER TABLE calendarcustomfield RENAME vb3_calendarcustomfield;
      
    ALTER TABLE calendarmoderator RENAME vb3_calendarmoderator;
      
    ALTER TABLE calendarpermission RENAME vb3_calendarpermission;
      
    ALTER TABLE cron RENAME vb3_cron;
      
    ALTER TABLE cronlog RENAME vb3_cronlog;
      
    ALTER TABLE customavatar RENAME vb3_customavatar;
      
    ALTER TABLE customprofilepic RENAME vb3_customprofilepic;
      
    ALTER TABLE datastore RENAME vb3_datastore;
      
    ALTER TABLE deletionlog RENAME vb3_deletionlog;
      
    ALTER TABLE editlog RENAME vb3_editlog;
      
    ALTER TABLE event RENAME vb3_event;
      
    ALTER TABLE faq RENAME vb3_faq;
      
    ALTER TABLE forum RENAME vb3_forum;
      
    ALTER TABLE forumpermission RENAME vb3_forumpermission;
      
    ALTER TABLE holiday RENAME vb3_holiday;
      
    ALTER TABLE icon RENAME vb3_icon;
      
    ALTER TABLE imagecategory RENAME vb3_imagecategory;
      
    ALTER TABLE imagecategorypermission RENAME vb3_imagecategorypermission;
      
    ALTER TABLE language RENAME vb3_language;
      
    ALTER TABLE mailqueue RENAME vb3_mailqueue;
      
    ALTER TABLE moderation RENAME vb3_moderation;
      
    ALTER TABLE moderator RENAME vb3_moderator;
      
    ALTER TABLE moderatorlog RENAME vb3_moderatorlog;
      
    ALTER TABLE passwordhistory RENAME vb3_passwordhistory;
      
    ALTER TABLE phrase RENAME vb3_phrase;
      
    ALTER TABLE phrasetype RENAME vb3_phrasetype;
      
    ALTER TABLE pm RENAME vb3_pm;
      
    ALTER TABLE pmreceipt RENAME vb3_pmreceipt;
      
    ALTER TABLE pmtext RENAME vb3_pmtext;
      
    ALTER TABLE poll RENAME vb3_poll;
      
    ALTER TABLE pollvote RENAME vb3_pollvote;
      
    ALTER TABLE post RENAME vb3_post;
      
    ALTER TABLE post_parsed RENAME vb3_post_parsed;
      
    ALTER TABLE posthash RENAME vb3_posthash;
      
    ALTER TABLE postindex RENAME vb3_postindex;
      
    ALTER TABLE profilefield RENAME vb3_profilefield;
      
    ALTER TABLE ranks RENAME vb3_ranks;
      
    ALTER TABLE regimage RENAME vb3_regimage;
      
    ALTER TABLE reminder RENAME vb3_reminder;
      
    ALTER TABLE reputation RENAME vb3_reputation;
      
    ALTER TABLE reputationlevel RENAME vb3_reputationlevel;
      
    ALTER TABLE search RENAME vb3_search;
      
    ALTER TABLE session RENAME vb3_session;
      
    ALTER TABLE setting RENAME vb3_setting;
      
    ALTER TABLE settinggroup RENAME vb3_settinggroup;
      
    ALTER TABLE smilie RENAME vb3_smilie;
      
    ALTER TABLE stats RENAME vb3_stats;
      
    ALTER TABLE strikes RENAME vb3_strikes;
      
    ALTER TABLE style RENAME vb3_style;
      
    ALTER TABLE subscribeevent RENAME vb3_subscribeevent;
      
    ALTER TABLE subscribeforum RENAME vb3_subscribeforum;
      
    ALTER TABLE subscribethread RENAME vb3_subscribethread;
      
    ALTER TABLE subscription RENAME vb3_subscription;
      
    ALTER TABLE subscriptionlog RENAME vb3_subscriptionlog;
      
    ALTER TABLE template RENAME vb3_template;
      
    ALTER TABLE thread RENAME vb3_thread;
      
    ALTER TABLE threadrate RENAME vb3_threadrate;
      
    ALTER TABLE threadviews RENAME vb3_threadviews;
      
    ALTER TABLE upgradelog RENAME vb3_upgradelog;
      
    ALTER TABLE user RENAME vb3_user;
      
    ALTER TABLE useractivation RENAME vb3_useractivation;
      
    ALTER TABLE userban RENAME vb3_userban;
      
    ALTER TABLE userfield RENAME vb3_userfield;
      
    ALTER TABLE usergroup RENAME vb3_usergroup;
      
    ALTER TABLE usergroupleader RENAME vb3_usergroupleader;
      
    ALTER TABLE usergrouprequest RENAME vb3_usergrouprequest;
      
    ALTER TABLE usernote RENAME vb3_usernote;
      
    ALTER TABLE userpromotion RENAME vb3_userpromotion;
      
    ALTER TABLE usertextfield RENAME vb3_usertextfield;
      
    ALTER TABLE usertitle RENAME vb3_usertitle;
      
    ALTER TABLE word RENAME vb3_word
    Last edited by d3nnis; Fri 12th Dec '03 at 10:37am.

  9. #9
    New Member JoergZ has disabled reputation JoergZ's Avatar
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    16
    Hm.... why did you not use the php, that is delivered with vB ?

    I have no acces at the moment to my directory, but afaik there is in the install directory a php named prefix.php or something like that. There you can select all tables where you want to add a prefix and can define the prefix to what you want...

    Jörg

  10. #10
    Senior Member d3nnis has disabled reputation
    Join Date
    Jun 2003
    Location
    Singapore
    Posts
    573
    Quote Originally Posted by JoergZ
    Hm.... why did you not use the php, that is delivered with vB ?

    I have no acces at the moment to my directory, but afaik there is in the install directory a php named prefix.php or something like that. There you can select all tables where you want to add a prefix and can define the prefix to what you want...

    Jörg

    ohh i didn't know dat lolz

  11. #11
    Senior Member tgmorris is on a distinguished road
    Join Date
    Dec 2003
    Posts
    187
    Quote Originally Posted by d3nnis
    using the alter query rite?

    Can I actually write a .sql script to do mass alter?

    by the way after altering i need to add the prefix in my config.php file rite?
    I just did this the other day. The syntax is

    RENAME TABLE tbl_name TO new_tbl_name[, tbl_name2 TO new_tbl_name2,...


    What I did was a "SHOW TABLES" and copied the output. The junk was stripped out so I had only the table names left. I then put that into Excel and added the "RENAME TABLE ", " TO " and the new prefix into their own columns after duplicating the table names in a new column. The whole mess was then saved into a text file and used as the input to mysql. Worked slick.


    After that it's just a matter of adding the new prefix into the config file.

+ Reply to Thread

Similar Threads

  1. using a db tables prefix
    By Glenn in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 1
    Last Post: Sun 31st Aug '03, 9:36am
  2. How to add table prefix AFTER UPGRADE???
    By Hellcat in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 2
    Last Post: Wed 30th Jul '03, 1:11am
  3. do i want a prefix for my vbulletin tables in the db?
    By josh929 in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 2
    Last Post: Mon 16th Jun '03, 12:16am
  4. prefix DB tables on installation
    By Mark Hensler in forum vBulletin 2 Suggestions and Feedback
    Replies: 10
    Last Post: Sat 8th Sep '01, 10:26pm
  5. Prefix for MySQL tables?
    By YellowKard in forum vBulletin 2 Suggestions and Feedback
    Replies: 14
    Last Post: Sat 3rd Mar '01, 6:53am

Bookmarks

Posting Permissions

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts