The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Query to Restore vb_session Table
Is this the correct query to restore the vb_session table on vB 3.8.5?
[sql]CREATE vb_session ( sessionhash CHAR(32) NOT NULL DEFAULT '', userid INT UNSIGNED NOT NULL DEFAULT '0', host CHAR(15) NOT NULL DEFAULT '', idhash CHAR(32) NOT NULL DEFAULT '', lastactivity INT UNSIGNED NOT NULL DEFAULT '0', location CHAR(255) NOT NULL DEFAULT '', useragent CHAR(100) NOT NULL DEFAULT '', styleid SMALLINT UNSIGNED NOT NULL DEFAULT '0', languageid SMALLINT UNSIGNED NOT NULL DEFAULT '0', loggedin SMALLINT UNSIGNED NOT NULL DEFAULT '0', inforum SMALLINT UNSIGNED NOT NULL DEFAULT '0', inthread INT UNSIGNED NOT NULL DEFAULT '0', incalendar SMALLINT UNSIGNED NOT NULL DEFAULT '0', badlocation SMALLINT UNSIGNED NOT NULL DEFAULT '0', bypass TINYINT NOT NULL DEFAULT '0', profileupdate SMALLINT UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (sessionhash) );[/sql] Yeah. I know. Missing table. Not good. :erm: |
#2
|
|||
|
|||
I thought there was a way to get the sql printed out for the table structure but I couldn't find it. You can check it with this from vB3.7.3. It looks like you have to specify the number of chars for smallint and tinyint
|
#3
|
||||
|
||||
So more like...
[sql]CREATE vb_session ( sessionhash CHAR(32) NOT NULL DEFAULT '', userid INT CHAR(10) NOT NULL DEFAULT '', host CHAR(15) NOT NULL DEFAULT '', idhash CHAR(32) NOT NULL DEFAULT '', lastactivity INT CHAR(10) NOT NULL DEFAULT '', location CHAR(255) NOT NULL DEFAULT '', useragent CHAR(100) NOT NULL DEFAULT '', styleid SMALLINT CHAR(5) NOT NULL DEFAULT '', languageid SMALLINT CHAR(5) NOT NULL DEFAULT '', loggedin SMALLINT CHAR(5) NOT NULL DEFAULT '', inforum SMALLINT CHAR(5) NOT NULL DEFAULT '', inthread INT CHAR(10) NOT NULL DEFAULT '', incalendar SMALLINT CHAR(5) NOT NULL DEFAULT '', badlocation SMALLINT CHAR(5) NOT NULL DEFAULT '', bypass TINYINT CHAR(4) NOT NULL DEFAULT '', profileupdate SMALLINT CHAR(5) NOT NULL DEFAULT '', PRIMARY KEY (sessionhash) );[/sql] Or do I need to specify INT, too? --------------- Added [DATE]1381196910[/DATE] at [TIME]1381196910[/TIME] --------------- I went ahead and tried both of these. But nothing happens. No tables are created. No errors are thrown up. I've been stuck on this one all day. |
#4
|
|||
|
|||
Try this:
[sql] CREATE TABLE vb_session ( sessionhash CHAR(32) NOT NULL DEFAULT '', userid INT(10) NOT NULL DEFAULT '0', host CHAR(15) NOT NULL DEFAULT '', idhash CHAR(32) NOT NULL DEFAULT '', lastactivity INT(10) NOT NULL DEFAULT '0', location CHAR(255) NOT NULL DEFAULT '', useragent CHAR(100) NOT NULL DEFAULT '', styleid SMALLINT(5) NOT NULL DEFAULT '0', languageid SMALLINT(5) NOT NULL DEFAULT '0', loggedin SMALLINT(5) NOT NULL DEFAULT '0', inforum SMALLINT(5) NOT NULL DEFAULT '0', inthread INT(10) NOT NULL DEFAULT '0', incalendar SMALLINT(5) NOT NULL DEFAULT '0', badlocation SMALLINT(5) NOT NULL DEFAULT '0', bypass TINYINT(4) NOT NULL DEFAULT '0', profileupdate SMALLINT(5) NOT NULL DEFAULT '0', PRIMARY KEY (sessionhash) ); [/sql] But there are a lot of people here a lot better than I am with sql. Where are you doing this? In your admin CP? I would just do it with phpMyAdmin in cPanel. EDIT: What happened to all those default values of '0'? Those should all be in there. I put them back in. |
Благодарность от: | ||
Digital Jedi |
#5
|
||||
|
||||
I tried phpMyAdmin first. Then I tried to run the querys through tools.php, since I can't get the forum to load without vb_session. Sorry, I thought the 0s went out once you added the CHARS. That's what I get for guessing.
--------------- Added [DATE]1381199746[/DATE] at [TIME]1381199746[/TIME] --------------- Quote:
But... Yeah, I just now noticed that I'm missing more than vb_session. vb_user is gone, too. I hate SSL, but I'm going to see if I can run one of my last backups. It's probably not very current. But I seldom did them when my site started slowing down. Thanks again, though. |
#6
|
|||
|
|||
You can get any table creation query out of your mysql-schema.php file in the install dir for future reference.
|
Благодарность от: | ||
Digital Jedi |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|