Author |
Topic  |
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
HiRez_L
Starting Member
USA
23 Posts |
Posted - 28 June 2004 : 19:45:12
|
That's what I was worried about . . . I'm pretty sure when the topics were archived, that the topic ID is recalculated, so restoring the archived topics and replies may result in duplicate key fields . . . |
Rusty Felty |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 28 June 2004 : 19:48:08
|
When topics and replies are archived, all ID's are kept, since there are no autonumber fields in the archive tables.
I tested the restore queries with a Snitz DB and it all went well, as I expected. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
Edited by - ruirib on 28 June 2004 19:48:48 |
 |
|
HiRez_L
Starting Member
USA
23 Posts |
Posted - 28 June 2004 : 20:00:04
|
SO what's the verdict, then? Should I click yes? |
Rusty Felty |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 28 June 2004 : 20:08:04
|
I can't advise that until you tell me whether the replies are duplicated or not. If the replies are the same, for the same ID's, then you don't even need to do it, since they are already on the replies table. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
HiRez_L
Starting Member
USA
23 Posts |
Posted - 28 June 2004 : 20:15:39
|
I don't think I can get at the tables to check without clicking through this dialog box. |
Rusty Felty |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
HiRez_L
Starting Member
USA
23 Posts |
Posted - 28 June 2004 : 20:25:25
|
OK, I cancelled the dialog box and am looking at the tables. I'll take one topic as an example. The first topic in FORUM_A_TOPICS is HTML, and it's TOPIC_ID is 3. FORUM_TOPICS also has a topic HTML with a TOPIC_ID of 3, presumably because the first query worked. Prior to running your query, there was no longer an HTML topic in my forums, unless you clicked on archived forums, where you couldn't reply to any topic. FORUM_A_REPLY has 7 entries with TOPIC_ID 3. FORUM_REPLY has 7 entries with TOPIC_ID 3 . . . so it looks as though you may be right. |
Rusty Felty |
Edited by - HiRez_L on 28 June 2004 20:26:22 |
 |
|
HiRez_L
Starting Member
USA
23 Posts |
Posted - 28 June 2004 : 20:33:17
|
OK, I closed the DB and went to the site, it looks like all the topics are restored . . . except there are 2 copies of each topic. I clicked on several of them, and there are, for each topic, one with all the replies, and one that just has the topic subject . . . anyway. I think I can go in and delete all the no reply duplicates now and be back in business. Thanks for all your help. Any other gotcha's I should watch out for at this point? |
Rusty Felty |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 28 June 2004 : 20:34:27
|
Try this query... [code] SELECT FORUM_A_REPLY.* FROM FORUM_A_REPLY LEFT JOIN FORUM_REPLY ON FORUM_A_REPLY.REPLY_ID=FORUM_REPLY.REPLY_ID WHERE FORUM_REPLY.REPLY_ID IS Null [code] How many records does it show? |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
HiRez_L
Starting Member
USA
23 Posts |
Posted - 28 June 2004 : 21:13:40
|
Duplicated deleted, all topics restored with their replies. Thanks for the help! |
Rusty Felty |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Topic  |
|