
I've done a bit of digging into the documentation for phpBB boards and here's what I've come up with on the back-end schema:
Users table:
Posts table(s):CREATE TABLE [phpbb_users] (
[user_id] [int] NOT NULL ,
[user_active] [smallint] NULL ,
[username] [varchar] (25) NOT NULL ,
[user_password] [varchar] (32) NOT NULL ,
[user_session_time] [int] NOT NULL ,
[user_session_page] [smallint] NOT NULL ,
[user_lastvisit] [int] NOT NULL ,
[user_regdate] [int] NOT NULL ,
[user_level] [smallint] NOT NULL ,
[user_posts] [int] NOT NULL ,
[user_timezone] [decimal] (5,2) NOT NULL ,
[user_style] [int] NULL ,
[user_lang] [varchar] (255) NULL ,
[user_dateformat] [varchar] (14) NOT NULL ,
[user_new_privmsg] [smallint] NOT NULL ,
[user_unread_privmsg] [smallint] NOT NULL ,
[user_last_privmsg] [int] NOT NULL ,
[user_login_tries] [smallint] NOT NULL ,
[user_last_login_try] [int] NOT NULL ,
[user_emailtime] [int] NOT NULL ,
[user_viewemail] [smallint] NULL ,
[user_attachsig] [smallint] NULL ,
[user_allowhtml] [smallint] NULL ,
[user_allowbbcode] [smallint] NULL ,
[user_allowsmile] [smallint] NULL ,
[user_allowavatar] [smallint] NULL ,
[user_allow_pm] [smallint] NOT NULL ,
[user_allow_viewonline] [smallint] NOT NULL ,
[user_notify_pm] [smallint] NOT NULL ,
[user_popup_pm] [smallint] NULL ,
[user_rank] [int] NULL ,
[user_avatar_type] [smallint] NULL ,
[user_avatar] [varchar] (100) NULL ,
[user_email] [varchar] (255) NULL ,
[user_icq] [varchar] (15) NULL ,
[user_website] [varchar] (100) NULL ,
[user_occ] [varchar] (100) NULL ,
[user_from] [varchar] (100) NULL ,
[user_sig] [text] NULL ,
[user_sig_bbcode_uid] [char] (10) NULL ,
[user_aim] [varchar] (255) NULL ,
[user_yim] [varchar] (255) NULL ,
[user_msnm] [varchar] (255) NULL ,
[user_interests] [varchar] (255) NULL ,
[user_actkey] [varchar] (32) NULL ,
[user_newpasswd] [varchar] (32) NULL ,
[user_notify] [smallint] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
I'm guessing that the "poster_id" in the [phpbb_posts] table is Joined to "user_id" in the [phpbb_users] table. Notice also that the username is copied to the [phpbb_posts] for every post. I'm betting that if dummy guest accounts could be inserted into the users table for the ones that got whacked, the posts would show up again and even display the user names in the posts (although the actual information for the user in the users table would still be gone.) But at least the threads would make sense again. And if someone wanted their old user name and account back, that information could be inserted in the new dummy accounts on the back end.CREATE TABLE [phpbb_posts] (
[post_id] [int] IDENTITY (1, 1) NOT NULL ,
[topic_id] [int] NOT NULL ,
[forum_id] [int] NOT NULL ,
[poster_id] [int] NOT NULL ,
[post_time] [int] NOT NULL ,
[poster_ip] [char] (8) NULL ,
[post_username] [char] (25) NULL ,
[enable_bbcode] [smallint] NULL ,
[enable_html] [smallint] NULL ,
[enable_smilies] [smallint] NULL ,
[enable_sig] [smallint] NULL ,
[post_edit_time] [int] NULL ,
[post_edit_count] [smallint] NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_posts_text] (
[post_id] [int] NOT NULL ,
[bbcode_uid] [char] (10) NULL ,
[post_subject] [char] (60) NULL ,
[post_text] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
John, I don't know if you're following this, but what do you think?