[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/install/schemas/ -> mssql_schema.sql (source)

   1  /*
   2   * DO NOT EDIT THIS FILE, IT IS GENERATED
   3   *
   4   * To change the contents of this file, edit
   5   * phpBB/develop/create_schema_files.php and
   6   * run it.
   7   */
   8  
   9  /*
  10      Table: 'phpbb_attachments'
  11  */
  12  CREATE TABLE [phpbb_attachments] (
  13      [attach_id] [int] IDENTITY (1, 1) NOT NULL ,
  14      [post_msg_id] [int] DEFAULT (0) NOT NULL ,
  15      [topic_id] [int] DEFAULT (0) NOT NULL ,
  16      [in_message] [int] DEFAULT (0) NOT NULL ,
  17      [poster_id] [int] DEFAULT (0) NOT NULL ,
  18      [is_orphan] [int] DEFAULT (1) NOT NULL ,
  19      [physical_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
  20      [real_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
  21      [download_count] [int] DEFAULT (0) NOT NULL ,
  22      [attach_comment] [varchar] (4000) DEFAULT ('') NOT NULL ,
  23      [extension] [varchar] (100) DEFAULT ('') NOT NULL ,
  24      [mimetype] [varchar] (100) DEFAULT ('') NOT NULL ,
  25      [filesize] [int] DEFAULT (0) NOT NULL ,
  26      [filetime] [int] DEFAULT (0) NOT NULL ,
  27      [thumbnail] [int] DEFAULT (0) NOT NULL 
  28  ) ON [PRIMARY]
  29  GO
  30  
  31  ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD 
  32      CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY  CLUSTERED 
  33      (
  34          [attach_id]
  35      )  ON [PRIMARY] 
  36  GO
  37  
  38  CREATE  INDEX [filetime] ON [phpbb_attachments]([filetime]) ON [PRIMARY]
  39  GO
  40  
  41  CREATE  INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id]) ON [PRIMARY]
  42  GO
  43  
  44  CREATE  INDEX [topic_id] ON [phpbb_attachments]([topic_id]) ON [PRIMARY]
  45  GO
  46  
  47  CREATE  INDEX [poster_id] ON [phpbb_attachments]([poster_id]) ON [PRIMARY]
  48  GO
  49  
  50  CREATE  INDEX [is_orphan] ON [phpbb_attachments]([is_orphan]) ON [PRIMARY]
  51  GO
  52  
  53  
  54  /*
  55      Table: 'phpbb_acl_groups'
  56  */
  57  CREATE TABLE [phpbb_acl_groups] (
  58      [group_id] [int] DEFAULT (0) NOT NULL ,
  59      [forum_id] [int] DEFAULT (0) NOT NULL ,
  60      [auth_option_id] [int] DEFAULT (0) NOT NULL ,
  61      [auth_role_id] [int] DEFAULT (0) NOT NULL ,
  62      [auth_setting] [int] DEFAULT (0) NOT NULL 
  63  ) ON [PRIMARY]
  64  GO
  65  
  66  CREATE  INDEX [group_id] ON [phpbb_acl_groups]([group_id]) ON [PRIMARY]
  67  GO
  68  
  69  CREATE  INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id]) ON [PRIMARY]
  70  GO
  71  
  72  CREATE  INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id]) ON [PRIMARY]
  73  GO
  74  
  75  
  76  /*
  77      Table: 'phpbb_acl_options'
  78  */
  79  CREATE TABLE [phpbb_acl_options] (
  80      [auth_option_id] [int] IDENTITY (1, 1) NOT NULL ,
  81      [auth_option] [varchar] (50) DEFAULT ('') NOT NULL ,
  82      [is_global] [int] DEFAULT (0) NOT NULL ,
  83      [is_local] [int] DEFAULT (0) NOT NULL ,
  84      [founder_only] [int] DEFAULT (0) NOT NULL 
  85  ) ON [PRIMARY]
  86  GO
  87  
  88  ALTER TABLE [phpbb_acl_options] WITH NOCHECK ADD 
  89      CONSTRAINT [PK_phpbb_acl_options] PRIMARY KEY  CLUSTERED 
  90      (
  91          [auth_option_id]
  92      )  ON [PRIMARY] 
  93  GO
  94  
  95  CREATE  UNIQUE  INDEX [auth_option] ON [phpbb_acl_options]([auth_option]) ON [PRIMARY]
  96  GO
  97  
  98  
  99  /*
 100      Table: 'phpbb_acl_roles'
 101  */
 102  CREATE TABLE [phpbb_acl_roles] (
 103      [role_id] [int] IDENTITY (1, 1) NOT NULL ,
 104      [role_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 105      [role_description] [varchar] (4000) DEFAULT ('') NOT NULL ,
 106      [role_type] [varchar] (10) DEFAULT ('') NOT NULL ,
 107      [role_order] [int] DEFAULT (0) NOT NULL 
 108  ) ON [PRIMARY]
 109  GO
 110  
 111  ALTER TABLE [phpbb_acl_roles] WITH NOCHECK ADD 
 112      CONSTRAINT [PK_phpbb_acl_roles] PRIMARY KEY  CLUSTERED 
 113      (
 114          [role_id]
 115      )  ON [PRIMARY] 
 116  GO
 117  
 118  CREATE  INDEX [role_type] ON [phpbb_acl_roles]([role_type]) ON [PRIMARY]
 119  GO
 120  
 121  CREATE  INDEX [role_order] ON [phpbb_acl_roles]([role_order]) ON [PRIMARY]
 122  GO
 123  
 124  
 125  /*
 126      Table: 'phpbb_acl_roles_data'
 127  */
 128  CREATE TABLE [phpbb_acl_roles_data] (
 129      [role_id] [int] DEFAULT (0) NOT NULL ,
 130      [auth_option_id] [int] DEFAULT (0) NOT NULL ,
 131      [auth_setting] [int] DEFAULT (0) NOT NULL 
 132  ) ON [PRIMARY]
 133  GO
 134  
 135  ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD 
 136      CONSTRAINT [PK_phpbb_acl_roles_data] PRIMARY KEY  CLUSTERED 
 137      (
 138          [role_id],
 139          [auth_option_id]
 140      )  ON [PRIMARY] 
 141  GO
 142  
 143  CREATE  INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY]
 144  GO
 145  
 146  
 147  /*
 148      Table: 'phpbb_acl_users'
 149  */
 150  CREATE TABLE [phpbb_acl_users] (
 151      [user_id] [int] DEFAULT (0) NOT NULL ,
 152      [forum_id] [int] DEFAULT (0) NOT NULL ,
 153      [auth_option_id] [int] DEFAULT (0) NOT NULL ,
 154      [auth_role_id] [int] DEFAULT (0) NOT NULL ,
 155      [auth_setting] [int] DEFAULT (0) NOT NULL 
 156  ) ON [PRIMARY]
 157  GO
 158  
 159  CREATE  INDEX [user_id] ON [phpbb_acl_users]([user_id]) ON [PRIMARY]
 160  GO
 161  
 162  CREATE  INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id]) ON [PRIMARY]
 163  GO
 164  
 165  CREATE  INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY]
 166  GO
 167  
 168  
 169  /*
 170      Table: 'phpbb_banlist'
 171  */
 172  CREATE TABLE [phpbb_banlist] (
 173      [ban_id] [int] IDENTITY (1, 1) NOT NULL ,
 174      [ban_userid] [int] DEFAULT (0) NOT NULL ,
 175      [ban_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
 176      [ban_email] [varchar] (100) DEFAULT ('') NOT NULL ,
 177      [ban_start] [int] DEFAULT (0) NOT NULL ,
 178      [ban_end] [int] DEFAULT (0) NOT NULL ,
 179      [ban_exclude] [int] DEFAULT (0) NOT NULL ,
 180      [ban_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
 181      [ban_give_reason] [varchar] (255) DEFAULT ('') NOT NULL 
 182  ) ON [PRIMARY]
 183  GO
 184  
 185  ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD 
 186      CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY  CLUSTERED 
 187      (
 188          [ban_id]
 189      )  ON [PRIMARY] 
 190  GO
 191  
 192  CREATE  INDEX [ban_end] ON [phpbb_banlist]([ban_end]) ON [PRIMARY]
 193  GO
 194  
 195  CREATE  INDEX [ban_user] ON [phpbb_banlist]([ban_userid], [ban_exclude]) ON [PRIMARY]
 196  GO
 197  
 198  CREATE  INDEX [ban_email] ON [phpbb_banlist]([ban_email], [ban_exclude]) ON [PRIMARY]
 199  GO
 200  
 201  CREATE  INDEX [ban_ip] ON [phpbb_banlist]([ban_ip], [ban_exclude]) ON [PRIMARY]
 202  GO
 203  
 204  
 205  /*
 206      Table: 'phpbb_bbcodes'
 207  */
 208  CREATE TABLE [phpbb_bbcodes] (
 209      [bbcode_id] [int] DEFAULT (0) NOT NULL ,
 210      [bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL ,
 211      [bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL ,
 212      [display_on_posting] [int] DEFAULT (0) NOT NULL ,
 213      [bbcode_match] [varchar] (4000) DEFAULT ('') NOT NULL ,
 214      [bbcode_tpl] [text] DEFAULT ('') NOT NULL ,
 215      [first_pass_match] [text] DEFAULT ('') NOT NULL ,
 216      [first_pass_replace] [text] DEFAULT ('') NOT NULL ,
 217      [second_pass_match] [text] DEFAULT ('') NOT NULL ,
 218      [second_pass_replace] [text] DEFAULT ('') NOT NULL 
 219  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 220  GO
 221  
 222  ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD 
 223      CONSTRAINT [PK_phpbb_bbcodes] PRIMARY KEY  CLUSTERED 
 224      (
 225          [bbcode_id]
 226      )  ON [PRIMARY] 
 227  GO
 228  
 229  CREATE  INDEX [display_on_post] ON [phpbb_bbcodes]([display_on_posting]) ON [PRIMARY]
 230  GO
 231  
 232  
 233  /*
 234      Table: 'phpbb_bookmarks'
 235  */
 236  CREATE TABLE [phpbb_bookmarks] (
 237      [topic_id] [int] DEFAULT (0) NOT NULL ,
 238      [user_id] [int] DEFAULT (0) NOT NULL 
 239  ) ON [PRIMARY]
 240  GO
 241  
 242  ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD 
 243      CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY  CLUSTERED 
 244      (
 245          [topic_id],
 246          [user_id]
 247      )  ON [PRIMARY] 
 248  GO
 249  
 250  
 251  /*
 252      Table: 'phpbb_bots'
 253  */
 254  CREATE TABLE [phpbb_bots] (
 255      [bot_id] [int] IDENTITY (1, 1) NOT NULL ,
 256      [bot_active] [int] DEFAULT (1) NOT NULL ,
 257      [bot_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 258      [user_id] [int] DEFAULT (0) NOT NULL ,
 259      [bot_agent] [varchar] (255) DEFAULT ('') NOT NULL ,
 260      [bot_ip] [varchar] (255) DEFAULT ('') NOT NULL 
 261  ) ON [PRIMARY]
 262  GO
 263  
 264  ALTER TABLE [phpbb_bots] WITH NOCHECK ADD 
 265      CONSTRAINT [PK_phpbb_bots] PRIMARY KEY  CLUSTERED 
 266      (
 267          [bot_id]
 268      )  ON [PRIMARY] 
 269  GO
 270  
 271  CREATE  INDEX [bot_active] ON [phpbb_bots]([bot_active]) ON [PRIMARY]
 272  GO
 273  
 274  
 275  /*
 276      Table: 'phpbb_config'
 277  */
 278  CREATE TABLE [phpbb_config] (
 279      [config_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 280      [config_value] [varchar] (255) DEFAULT ('') NOT NULL ,
 281      [is_dynamic] [int] DEFAULT (0) NOT NULL 
 282  ) ON [PRIMARY]
 283  GO
 284  
 285  ALTER TABLE [phpbb_config] WITH NOCHECK ADD 
 286      CONSTRAINT [PK_phpbb_config] PRIMARY KEY  CLUSTERED 
 287      (
 288          [config_name]
 289      )  ON [PRIMARY] 
 290  GO
 291  
 292  CREATE  INDEX [is_dynamic] ON [phpbb_config]([is_dynamic]) ON [PRIMARY]
 293  GO
 294  
 295  
 296  /*
 297      Table: 'phpbb_confirm'
 298  */
 299  CREATE TABLE [phpbb_confirm] (
 300      [confirm_id] [char] (32) DEFAULT ('') NOT NULL ,
 301      [session_id] [char] (32) DEFAULT ('') NOT NULL ,
 302      [confirm_type] [int] DEFAULT (0) NOT NULL ,
 303      [code] [varchar] (8) DEFAULT ('') NOT NULL ,
 304      [seed] [int] DEFAULT (0) NOT NULL ,
 305      [attempts] [int] DEFAULT (0) NOT NULL 
 306  ) ON [PRIMARY]
 307  GO
 308  
 309  ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD 
 310      CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY  CLUSTERED 
 311      (
 312          [session_id],
 313          [confirm_id]
 314      )  ON [PRIMARY] 
 315  GO
 316  
 317  CREATE  INDEX [confirm_type] ON [phpbb_confirm]([confirm_type]) ON [PRIMARY]
 318  GO
 319  
 320  
 321  /*
 322      Table: 'phpbb_disallow'
 323  */
 324  CREATE TABLE [phpbb_disallow] (
 325      [disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
 326      [disallow_username] [varchar] (255) DEFAULT ('') NOT NULL 
 327  ) ON [PRIMARY]
 328  GO
 329  
 330  ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD 
 331      CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY  CLUSTERED 
 332      (
 333          [disallow_id]
 334      )  ON [PRIMARY] 
 335  GO
 336  
 337  
 338  /*
 339      Table: 'phpbb_drafts'
 340  */
 341  CREATE TABLE [phpbb_drafts] (
 342      [draft_id] [int] IDENTITY (1, 1) NOT NULL ,
 343      [user_id] [int] DEFAULT (0) NOT NULL ,
 344      [topic_id] [int] DEFAULT (0) NOT NULL ,
 345      [forum_id] [int] DEFAULT (0) NOT NULL ,
 346      [save_time] [int] DEFAULT (0) NOT NULL ,
 347      [draft_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
 348      [draft_message] [text] DEFAULT ('') NOT NULL 
 349  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 350  GO
 351  
 352  ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD 
 353      CONSTRAINT [PK_phpbb_drafts] PRIMARY KEY  CLUSTERED 
 354      (
 355          [draft_id]
 356      )  ON [PRIMARY] 
 357  GO
 358  
 359  CREATE  INDEX [save_time] ON [phpbb_drafts]([save_time]) ON [PRIMARY]
 360  GO
 361  
 362  
 363  /*
 364      Table: 'phpbb_extensions'
 365  */
 366  CREATE TABLE [phpbb_extensions] (
 367      [extension_id] [int] IDENTITY (1, 1) NOT NULL ,
 368      [group_id] [int] DEFAULT (0) NOT NULL ,
 369      [extension] [varchar] (100) DEFAULT ('') NOT NULL 
 370  ) ON [PRIMARY]
 371  GO
 372  
 373  ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD 
 374      CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY  CLUSTERED 
 375      (
 376          [extension_id]
 377      )  ON [PRIMARY] 
 378  GO
 379  
 380  
 381  /*
 382      Table: 'phpbb_extension_groups'
 383  */
 384  CREATE TABLE [phpbb_extension_groups] (
 385      [group_id] [int] IDENTITY (1, 1) NOT NULL ,
 386      [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 387      [cat_id] [int] DEFAULT (0) NOT NULL ,
 388      [allow_group] [int] DEFAULT (0) NOT NULL ,
 389      [download_mode] [int] DEFAULT (1) NOT NULL ,
 390      [upload_icon] [varchar] (255) DEFAULT ('') NOT NULL ,
 391      [max_filesize] [int] DEFAULT (0) NOT NULL ,
 392      [allowed_forums] [varchar] (8000) DEFAULT ('') NOT NULL ,
 393      [allow_in_pm] [int] DEFAULT (0) NOT NULL 
 394  ) ON [PRIMARY]
 395  GO
 396  
 397  ALTER TABLE [phpbb_extension_groups] WITH NOCHECK ADD 
 398      CONSTRAINT [PK_phpbb_extension_groups] PRIMARY KEY  CLUSTERED 
 399      (
 400          [group_id]
 401      )  ON [PRIMARY] 
 402  GO
 403  
 404  
 405  /*
 406      Table: 'phpbb_forums'
 407  */
 408  CREATE TABLE [phpbb_forums] (
 409      [forum_id] [int] IDENTITY (1, 1) NOT NULL ,
 410      [parent_id] [int] DEFAULT (0) NOT NULL ,
 411      [left_id] [int] DEFAULT (0) NOT NULL ,
 412      [right_id] [int] DEFAULT (0) NOT NULL ,
 413      [forum_parents] [text] DEFAULT ('') NOT NULL ,
 414      [forum_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 415      [forum_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
 416      [forum_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
 417      [forum_desc_options] [int] DEFAULT (7) NOT NULL ,
 418      [forum_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
 419      [forum_link] [varchar] (255) DEFAULT ('') NOT NULL ,
 420      [forum_password] [varchar] (40) DEFAULT ('') NOT NULL ,
 421      [forum_style] [int] DEFAULT (0) NOT NULL ,
 422      [forum_image] [varchar] (255) DEFAULT ('') NOT NULL ,
 423      [forum_rules] [varchar] (4000) DEFAULT ('') NOT NULL ,
 424      [forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL ,
 425      [forum_rules_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
 426      [forum_rules_options] [int] DEFAULT (7) NOT NULL ,
 427      [forum_rules_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
 428      [forum_topics_per_page] [int] DEFAULT (0) NOT NULL ,
 429      [forum_type] [int] DEFAULT (0) NOT NULL ,
 430      [forum_status] [int] DEFAULT (0) NOT NULL ,
 431      [forum_posts] [int] DEFAULT (0) NOT NULL ,
 432      [forum_topics] [int] DEFAULT (0) NOT NULL ,
 433      [forum_topics_real] [int] DEFAULT (0) NOT NULL ,
 434      [forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
 435      [forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
 436      [forum_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
 437      [forum_last_post_time] [int] DEFAULT (0) NOT NULL ,
 438      [forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 439      [forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
 440      [forum_flags] [int] DEFAULT (32) NOT NULL ,
 441      [forum_options] [int] DEFAULT (0) NOT NULL ,
 442      [display_subforum_list] [int] DEFAULT (1) NOT NULL ,
 443      [display_on_index] [int] DEFAULT (1) NOT NULL ,
 444      [enable_indexing] [int] DEFAULT (1) NOT NULL ,
 445      [enable_icons] [int] DEFAULT (1) NOT NULL ,
 446      [enable_prune] [int] DEFAULT (0) NOT NULL ,
 447      [prune_next] [int] DEFAULT (0) NOT NULL ,
 448      [prune_days] [int] DEFAULT (0) NOT NULL ,
 449      [prune_viewed] [int] DEFAULT (0) NOT NULL ,
 450      [prune_freq] [int] DEFAULT (0) NOT NULL 
 451  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 452  GO
 453  
 454  ALTER TABLE [phpbb_forums] WITH NOCHECK ADD 
 455      CONSTRAINT [PK_phpbb_forums] PRIMARY KEY  CLUSTERED 
 456      (
 457          [forum_id]
 458      )  ON [PRIMARY] 
 459  GO
 460  
 461  CREATE  INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id]) ON [PRIMARY]
 462  GO
 463  
 464  CREATE  INDEX [forum_lastpost_id] ON [phpbb_forums]([forum_last_post_id]) ON [PRIMARY]
 465  GO
 466  
 467  
 468  /*
 469      Table: 'phpbb_forums_access'
 470  */
 471  CREATE TABLE [phpbb_forums_access] (
 472      [forum_id] [int] DEFAULT (0) NOT NULL ,
 473      [user_id] [int] DEFAULT (0) NOT NULL ,
 474      [session_id] [char] (32) DEFAULT ('') NOT NULL 
 475  ) ON [PRIMARY]
 476  GO
 477  
 478  ALTER TABLE [phpbb_forums_access] WITH NOCHECK ADD 
 479      CONSTRAINT [PK_phpbb_forums_access] PRIMARY KEY  CLUSTERED 
 480      (
 481          [forum_id],
 482          [user_id],
 483          [session_id]
 484      )  ON [PRIMARY] 
 485  GO
 486  
 487  
 488  /*
 489      Table: 'phpbb_forums_track'
 490  */
 491  CREATE TABLE [phpbb_forums_track] (
 492      [user_id] [int] DEFAULT (0) NOT NULL ,
 493      [forum_id] [int] DEFAULT (0) NOT NULL ,
 494      [mark_time] [int] DEFAULT (0) NOT NULL 
 495  ) ON [PRIMARY]
 496  GO
 497  
 498  ALTER TABLE [phpbb_forums_track] WITH NOCHECK ADD 
 499      CONSTRAINT [PK_phpbb_forums_track] PRIMARY KEY  CLUSTERED 
 500      (
 501          [user_id],
 502          [forum_id]
 503      )  ON [PRIMARY] 
 504  GO
 505  
 506  
 507  /*
 508      Table: 'phpbb_forums_watch'
 509  */
 510  CREATE TABLE [phpbb_forums_watch] (
 511      [forum_id] [int] DEFAULT (0) NOT NULL ,
 512      [user_id] [int] DEFAULT (0) NOT NULL ,
 513      [notify_status] [int] DEFAULT (0) NOT NULL 
 514  ) ON [PRIMARY]
 515  GO
 516  
 517  CREATE  INDEX [forum_id] ON [phpbb_forums_watch]([forum_id]) ON [PRIMARY]
 518  GO
 519  
 520  CREATE  INDEX [user_id] ON [phpbb_forums_watch]([user_id]) ON [PRIMARY]
 521  GO
 522  
 523  CREATE  INDEX [notify_stat] ON [phpbb_forums_watch]([notify_status]) ON [PRIMARY]
 524  GO
 525  
 526  
 527  /*
 528      Table: 'phpbb_groups'
 529  */
 530  CREATE TABLE [phpbb_groups] (
 531      [group_id] [int] IDENTITY (1, 1) NOT NULL ,
 532      [group_type] [int] DEFAULT (1) NOT NULL ,
 533      [group_founder_manage] [int] DEFAULT (0) NOT NULL ,
 534      [group_skip_auth] [int] DEFAULT (0) NOT NULL ,
 535      [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 536      [group_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
 537      [group_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
 538      [group_desc_options] [int] DEFAULT (7) NOT NULL ,
 539      [group_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
 540      [group_display] [int] DEFAULT (0) NOT NULL ,
 541      [group_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
 542      [group_avatar_type] [int] DEFAULT (0) NOT NULL ,
 543      [group_avatar_width] [int] DEFAULT (0) NOT NULL ,
 544      [group_avatar_height] [int] DEFAULT (0) NOT NULL ,
 545      [group_rank] [int] DEFAULT (0) NOT NULL ,
 546      [group_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
 547      [group_sig_chars] [int] DEFAULT (0) NOT NULL ,
 548      [group_receive_pm] [int] DEFAULT (0) NOT NULL ,
 549      [group_message_limit] [int] DEFAULT (0) NOT NULL ,
 550      [group_max_recipients] [int] DEFAULT (0) NOT NULL ,
 551      [group_legend] [int] DEFAULT (1) NOT NULL 
 552  ) ON [PRIMARY]
 553  GO
 554  
 555  ALTER TABLE [phpbb_groups] WITH NOCHECK ADD 
 556      CONSTRAINT [PK_phpbb_groups] PRIMARY KEY  CLUSTERED 
 557      (
 558          [group_id]
 559      )  ON [PRIMARY] 
 560  GO
 561  
 562  CREATE  INDEX [group_legend_name] ON [phpbb_groups]([group_legend], [group_name]) ON [PRIMARY]
 563  GO
 564  
 565  
 566  /*
 567      Table: 'phpbb_icons'
 568  */
 569  CREATE TABLE [phpbb_icons] (
 570      [icons_id] [int] IDENTITY (1, 1) NOT NULL ,
 571      [icons_url] [varchar] (255) DEFAULT ('') NOT NULL ,
 572      [icons_width] [int] DEFAULT (0) NOT NULL ,
 573      [icons_height] [int] DEFAULT (0) NOT NULL ,
 574      [icons_order] [int] DEFAULT (0) NOT NULL ,
 575      [display_on_posting] [int] DEFAULT (1) NOT NULL 
 576  ) ON [PRIMARY]
 577  GO
 578  
 579  ALTER TABLE [phpbb_icons] WITH NOCHECK ADD 
 580      CONSTRAINT [PK_phpbb_icons] PRIMARY KEY  CLUSTERED 
 581      (
 582          [icons_id]
 583      )  ON [PRIMARY] 
 584  GO
 585  
 586  CREATE  INDEX [display_on_posting] ON [phpbb_icons]([display_on_posting]) ON [PRIMARY]
 587  GO
 588  
 589  
 590  /*
 591      Table: 'phpbb_lang'
 592  */
 593  CREATE TABLE [phpbb_lang] (
 594      [lang_id] [int] IDENTITY (1, 1) NOT NULL ,
 595      [lang_iso] [varchar] (30) DEFAULT ('') NOT NULL ,
 596      [lang_dir] [varchar] (30) DEFAULT ('') NOT NULL ,
 597      [lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL ,
 598      [lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 599      [lang_author] [varchar] (255) DEFAULT ('') NOT NULL 
 600  ) ON [PRIMARY]
 601  GO
 602  
 603  ALTER TABLE [phpbb_lang] WITH NOCHECK ADD 
 604      CONSTRAINT [PK_phpbb_lang] PRIMARY KEY  CLUSTERED 
 605      (
 606          [lang_id]
 607      )  ON [PRIMARY] 
 608  GO
 609  
 610  CREATE  INDEX [lang_iso] ON [phpbb_lang]([lang_iso]) ON [PRIMARY]
 611  GO
 612  
 613  
 614  /*
 615      Table: 'phpbb_log'
 616  */
 617  CREATE TABLE [phpbb_log] (
 618      [log_id] [int] IDENTITY (1, 1) NOT NULL ,
 619      [log_type] [int] DEFAULT (0) NOT NULL ,
 620      [user_id] [int] DEFAULT (0) NOT NULL ,
 621      [forum_id] [int] DEFAULT (0) NOT NULL ,
 622      [topic_id] [int] DEFAULT (0) NOT NULL ,
 623      [reportee_id] [int] DEFAULT (0) NOT NULL ,
 624      [log_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
 625      [log_time] [int] DEFAULT (0) NOT NULL ,
 626      [log_operation] [varchar] (4000) DEFAULT ('') NOT NULL ,
 627      [log_data] [text] DEFAULT ('') NOT NULL 
 628  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 629  GO
 630  
 631  ALTER TABLE [phpbb_log] WITH NOCHECK ADD 
 632      CONSTRAINT [PK_phpbb_log] PRIMARY KEY  CLUSTERED 
 633      (
 634          [log_id]
 635      )  ON [PRIMARY] 
 636  GO
 637  
 638  CREATE  INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY]
 639  GO
 640  
 641  CREATE  INDEX [forum_id] ON [phpbb_log]([forum_id]) ON [PRIMARY]
 642  GO
 643  
 644  CREATE  INDEX [topic_id] ON [phpbb_log]([topic_id]) ON [PRIMARY]
 645  GO
 646  
 647  CREATE  INDEX [reportee_id] ON [phpbb_log]([reportee_id]) ON [PRIMARY]
 648  GO
 649  
 650  CREATE  INDEX [user_id] ON [phpbb_log]([user_id]) ON [PRIMARY]
 651  GO
 652  
 653  
 654  /*
 655      Table: 'phpbb_login_attempts'
 656  */
 657  CREATE TABLE [phpbb_login_attempts] (
 658      [attempt_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
 659      [attempt_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
 660      [attempt_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL ,
 661      [attempt_time] [int] DEFAULT (0) NOT NULL ,
 662      [user_id] [int] DEFAULT (0) NOT NULL ,
 663      [username] [varchar] (255) DEFAULT (0) NOT NULL ,
 664      [username_clean] [varchar] (255) DEFAULT (0) NOT NULL 
 665  ) ON [PRIMARY]
 666  GO
 667  
 668  CREATE  INDEX [att_ip] ON [phpbb_login_attempts]([attempt_ip], [attempt_time]) ON [PRIMARY]
 669  GO
 670  
 671  CREATE  INDEX [att_for] ON [phpbb_login_attempts]([attempt_forwarded_for], [attempt_time]) ON [PRIMARY]
 672  GO
 673  
 674  CREATE  INDEX [att_time] ON [phpbb_login_attempts]([attempt_time]) ON [PRIMARY]
 675  GO
 676  
 677  CREATE  INDEX [user_id] ON [phpbb_login_attempts]([user_id]) ON [PRIMARY]
 678  GO
 679  
 680  
 681  /*
 682      Table: 'phpbb_moderator_cache'
 683  */
 684  CREATE TABLE [phpbb_moderator_cache] (
 685      [forum_id] [int] DEFAULT (0) NOT NULL ,
 686      [user_id] [int] DEFAULT (0) NOT NULL ,
 687      [username] [varchar] (255) DEFAULT ('') NOT NULL ,
 688      [group_id] [int] DEFAULT (0) NOT NULL ,
 689      [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 690      [display_on_index] [int] DEFAULT (1) NOT NULL 
 691  ) ON [PRIMARY]
 692  GO
 693  
 694  CREATE  INDEX [disp_idx] ON [phpbb_moderator_cache]([display_on_index]) ON [PRIMARY]
 695  GO
 696  
 697  CREATE  INDEX [forum_id] ON [phpbb_moderator_cache]([forum_id]) ON [PRIMARY]
 698  GO
 699  
 700  
 701  /*
 702      Table: 'phpbb_modules'
 703  */
 704  CREATE TABLE [phpbb_modules] (
 705      [module_id] [int] IDENTITY (1, 1) NOT NULL ,
 706      [module_enabled] [int] DEFAULT (1) NOT NULL ,
 707      [module_display] [int] DEFAULT (1) NOT NULL ,
 708      [module_basename] [varchar] (255) DEFAULT ('') NOT NULL ,
 709      [module_class] [varchar] (10) DEFAULT ('') NOT NULL ,
 710      [parent_id] [int] DEFAULT (0) NOT NULL ,
 711      [left_id] [int] DEFAULT (0) NOT NULL ,
 712      [right_id] [int] DEFAULT (0) NOT NULL ,
 713      [module_langname] [varchar] (255) DEFAULT ('') NOT NULL ,
 714      [module_mode] [varchar] (255) DEFAULT ('') NOT NULL ,
 715      [module_auth] [varchar] (255) DEFAULT ('') NOT NULL 
 716  ) ON [PRIMARY]
 717  GO
 718  
 719  ALTER TABLE [phpbb_modules] WITH NOCHECK ADD 
 720      CONSTRAINT [PK_phpbb_modules] PRIMARY KEY  CLUSTERED 
 721      (
 722          [module_id]
 723      )  ON [PRIMARY] 
 724  GO
 725  
 726  CREATE  INDEX [left_right_id] ON [phpbb_modules]([left_id], [right_id]) ON [PRIMARY]
 727  GO
 728  
 729  CREATE  INDEX [module_enabled] ON [phpbb_modules]([module_enabled]) ON [PRIMARY]
 730  GO
 731  
 732  CREATE  INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id]) ON [PRIMARY]
 733  GO
 734  
 735  
 736  /*
 737      Table: 'phpbb_poll_options'
 738  */
 739  CREATE TABLE [phpbb_poll_options] (
 740      [poll_option_id] [int] DEFAULT (0) NOT NULL ,
 741      [topic_id] [int] DEFAULT (0) NOT NULL ,
 742      [poll_option_text] [varchar] (4000) DEFAULT ('') NOT NULL ,
 743      [poll_option_total] [int] DEFAULT (0) NOT NULL 
 744  ) ON [PRIMARY]
 745  GO
 746  
 747  CREATE  INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id]) ON [PRIMARY]
 748  GO
 749  
 750  CREATE  INDEX [topic_id] ON [phpbb_poll_options]([topic_id]) ON [PRIMARY]
 751  GO
 752  
 753  
 754  /*
 755      Table: 'phpbb_poll_votes'
 756  */
 757  CREATE TABLE [phpbb_poll_votes] (
 758      [topic_id] [int] DEFAULT (0) NOT NULL ,
 759      [poll_option_id] [int] DEFAULT (0) NOT NULL ,
 760      [vote_user_id] [int] DEFAULT (0) NOT NULL ,
 761      [vote_user_ip] [varchar] (40) DEFAULT ('') NOT NULL 
 762  ) ON [PRIMARY]
 763  GO
 764  
 765  CREATE  INDEX [topic_id] ON [phpbb_poll_votes]([topic_id]) ON [PRIMARY]
 766  GO
 767  
 768  CREATE  INDEX [vote_user_id] ON [phpbb_poll_votes]([vote_user_id]) ON [PRIMARY]
 769  GO
 770  
 771  CREATE  INDEX [vote_user_ip] ON [phpbb_poll_votes]([vote_user_ip]) ON [PRIMARY]
 772  GO
 773  
 774  
 775  /*
 776      Table: 'phpbb_posts'
 777  */
 778  CREATE TABLE [phpbb_posts] (
 779      [post_id] [int] IDENTITY (1, 1) NOT NULL ,
 780      [topic_id] [int] DEFAULT (0) NOT NULL ,
 781      [forum_id] [int] DEFAULT (0) NOT NULL ,
 782      [poster_id] [int] DEFAULT (0) NOT NULL ,
 783      [icon_id] [int] DEFAULT (0) NOT NULL ,
 784      [poster_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
 785      [post_time] [int] DEFAULT (0) NOT NULL ,
 786      [post_approved] [int] DEFAULT (1) NOT NULL ,
 787      [post_reported] [int] DEFAULT (0) NOT NULL ,
 788      [enable_bbcode] [int] DEFAULT (1) NOT NULL ,
 789      [enable_smilies] [int] DEFAULT (1) NOT NULL ,
 790      [enable_magic_url] [int] DEFAULT (1) NOT NULL ,
 791      [enable_sig] [int] DEFAULT (1) NOT NULL ,
 792      [post_username] [varchar] (255) DEFAULT ('') NOT NULL ,
 793      [post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
 794      [post_text] [text] DEFAULT ('') NOT NULL ,
 795      [post_checksum] [varchar] (32) DEFAULT ('') NOT NULL ,
 796      [post_attachment] [int] DEFAULT (0) NOT NULL ,
 797      [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
 798      [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
 799      [post_postcount] [int] DEFAULT (1) NOT NULL ,
 800      [post_edit_time] [int] DEFAULT (0) NOT NULL ,
 801      [post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
 802      [post_edit_user] [int] DEFAULT (0) NOT NULL ,
 803      [post_edit_count] [int] DEFAULT (0) NOT NULL ,
 804      [post_edit_locked] [int] DEFAULT (0) NOT NULL 
 805  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 806  GO
 807  
 808  ALTER TABLE [phpbb_posts] WITH NOCHECK ADD 
 809      CONSTRAINT [PK_phpbb_posts] PRIMARY KEY  CLUSTERED 
 810      (
 811          [post_id]
 812      )  ON [PRIMARY] 
 813  GO
 814  
 815  CREATE  INDEX [forum_id] ON [phpbb_posts]([forum_id]) ON [PRIMARY]
 816  GO
 817  
 818  CREATE  INDEX [topic_id] ON [phpbb_posts]([topic_id]) ON [PRIMARY]
 819  GO
 820  
 821  CREATE  INDEX [poster_ip] ON [phpbb_posts]([poster_ip]) ON [PRIMARY]
 822  GO
 823  
 824  CREATE  INDEX [poster_id] ON [phpbb_posts]([poster_id]) ON [PRIMARY]
 825  GO
 826  
 827  CREATE  INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY]
 828  GO
 829  
 830  CREATE  INDEX [post_username] ON [phpbb_posts]([post_username]) ON [PRIMARY]
 831  GO
 832  
 833  CREATE  INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) ON [PRIMARY]
 834  GO
 835  
 836  
 837  /*
 838      Table: 'phpbb_privmsgs'
 839  */
 840  CREATE TABLE [phpbb_privmsgs] (
 841      [msg_id] [int] IDENTITY (1, 1) NOT NULL ,
 842      [root_level] [int] DEFAULT (0) NOT NULL ,
 843      [author_id] [int] DEFAULT (0) NOT NULL ,
 844      [icon_id] [int] DEFAULT (0) NOT NULL ,
 845      [author_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
 846      [message_time] [int] DEFAULT (0) NOT NULL ,
 847      [enable_bbcode] [int] DEFAULT (1) NOT NULL ,
 848      [enable_smilies] [int] DEFAULT (1) NOT NULL ,
 849      [enable_magic_url] [int] DEFAULT (1) NOT NULL ,
 850      [enable_sig] [int] DEFAULT (1) NOT NULL ,
 851      [message_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
 852      [message_text] [text] DEFAULT ('') NOT NULL ,
 853      [message_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
 854      [message_edit_user] [int] DEFAULT (0) NOT NULL ,
 855      [message_attachment] [int] DEFAULT (0) NOT NULL ,
 856      [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
 857      [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
 858      [message_edit_time] [int] DEFAULT (0) NOT NULL ,
 859      [message_edit_count] [int] DEFAULT (0) NOT NULL ,
 860      [to_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
 861      [bcc_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
 862      [message_reported] [int] DEFAULT (0) NOT NULL 
 863  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 864  GO
 865  
 866  ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD 
 867      CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY  CLUSTERED 
 868      (
 869          [msg_id]
 870      )  ON [PRIMARY] 
 871  GO
 872  
 873  CREATE  INDEX [author_ip] ON [phpbb_privmsgs]([author_ip]) ON [PRIMARY]
 874  GO
 875  
 876  CREATE  INDEX [message_time] ON [phpbb_privmsgs]([message_time]) ON [PRIMARY]
 877  GO
 878  
 879  CREATE  INDEX [author_id] ON [phpbb_privmsgs]([author_id]) ON [PRIMARY]
 880  GO
 881  
 882  CREATE  INDEX [root_level] ON [phpbb_privmsgs]([root_level]) ON [PRIMARY]
 883  GO
 884  
 885  
 886  /*
 887      Table: 'phpbb_privmsgs_folder'
 888  */
 889  CREATE TABLE [phpbb_privmsgs_folder] (
 890      [folder_id] [int] IDENTITY (1, 1) NOT NULL ,
 891      [user_id] [int] DEFAULT (0) NOT NULL ,
 892      [folder_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 893      [pm_count] [int] DEFAULT (0) NOT NULL 
 894  ) ON [PRIMARY]
 895  GO
 896  
 897  ALTER TABLE [phpbb_privmsgs_folder] WITH NOCHECK ADD 
 898      CONSTRAINT [PK_phpbb_privmsgs_folder] PRIMARY KEY  CLUSTERED 
 899      (
 900          [folder_id]
 901      )  ON [PRIMARY] 
 902  GO
 903  
 904  CREATE  INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id]) ON [PRIMARY]
 905  GO
 906  
 907  
 908  /*
 909      Table: 'phpbb_privmsgs_rules'
 910  */
 911  CREATE TABLE [phpbb_privmsgs_rules] (
 912      [rule_id] [int] IDENTITY (1, 1) NOT NULL ,
 913      [user_id] [int] DEFAULT (0) NOT NULL ,
 914      [rule_check] [int] DEFAULT (0) NOT NULL ,
 915      [rule_connection] [int] DEFAULT (0) NOT NULL ,
 916      [rule_string] [varchar] (255) DEFAULT ('') NOT NULL ,
 917      [rule_user_id] [int] DEFAULT (0) NOT NULL ,
 918      [rule_group_id] [int] DEFAULT (0) NOT NULL ,
 919      [rule_action] [int] DEFAULT (0) NOT NULL ,
 920      [rule_folder_id] [int] DEFAULT (0) NOT NULL 
 921  ) ON [PRIMARY]
 922  GO
 923  
 924  ALTER TABLE [phpbb_privmsgs_rules] WITH NOCHECK ADD 
 925      CONSTRAINT [PK_phpbb_privmsgs_rules] PRIMARY KEY  CLUSTERED 
 926      (
 927          [rule_id]
 928      )  ON [PRIMARY] 
 929  GO
 930  
 931  CREATE  INDEX [user_id] ON [phpbb_privmsgs_rules]([user_id]) ON [PRIMARY]
 932  GO
 933  
 934  
 935  /*
 936      Table: 'phpbb_privmsgs_to'
 937  */
 938  CREATE TABLE [phpbb_privmsgs_to] (
 939      [msg_id] [int] DEFAULT (0) NOT NULL ,
 940      [user_id] [int] DEFAULT (0) NOT NULL ,
 941      [author_id] [int] DEFAULT (0) NOT NULL ,
 942      [pm_deleted] [int] DEFAULT (0) NOT NULL ,
 943      [pm_new] [int] DEFAULT (1) NOT NULL ,
 944      [pm_unread] [int] DEFAULT (1) NOT NULL ,
 945      [pm_replied] [int] DEFAULT (0) NOT NULL ,
 946      [pm_marked] [int] DEFAULT (0) NOT NULL ,
 947      [pm_forwarded] [int] DEFAULT (0) NOT NULL ,
 948      [folder_id] [int] DEFAULT (0) NOT NULL 
 949  ) ON [PRIMARY]
 950  GO
 951  
 952  CREATE  INDEX [msg_id] ON [phpbb_privmsgs_to]([msg_id]) ON [PRIMARY]
 953  GO
 954  
 955  CREATE  INDEX [author_id] ON [phpbb_privmsgs_to]([author_id]) ON [PRIMARY]
 956  GO
 957  
 958  CREATE  INDEX [usr_flder_id] ON [phpbb_privmsgs_to]([user_id], [folder_id]) ON [PRIMARY]
 959  GO
 960  
 961  
 962  /*
 963      Table: 'phpbb_profile_fields'
 964  */
 965  CREATE TABLE [phpbb_profile_fields] (
 966      [field_id] [int] IDENTITY (1, 1) NOT NULL ,
 967      [field_name] [varchar] (255) DEFAULT ('') NOT NULL ,
 968      [field_type] [int] DEFAULT (0) NOT NULL ,
 969      [field_ident] [varchar] (20) DEFAULT ('') NOT NULL ,
 970      [field_length] [varchar] (20) DEFAULT ('') NOT NULL ,
 971      [field_minlen] [varchar] (255) DEFAULT ('') NOT NULL ,
 972      [field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL ,
 973      [field_novalue] [varchar] (255) DEFAULT ('') NOT NULL ,
 974      [field_default_value] [varchar] (255) DEFAULT ('') NOT NULL ,
 975      [field_validation] [varchar] (20) DEFAULT ('') NOT NULL ,
 976      [field_required] [int] DEFAULT (0) NOT NULL ,
 977      [field_show_novalue] [int] DEFAULT (0) NOT NULL ,
 978      [field_show_on_reg] [int] DEFAULT (0) NOT NULL ,
 979      [field_show_on_vt] [int] DEFAULT (0) NOT NULL ,
 980      [field_show_profile] [int] DEFAULT (0) NOT NULL ,
 981      [field_hide] [int] DEFAULT (0) NOT NULL ,
 982      [field_no_view] [int] DEFAULT (0) NOT NULL ,
 983      [field_active] [int] DEFAULT (0) NOT NULL ,
 984      [field_order] [int] DEFAULT (0) NOT NULL 
 985  ) ON [PRIMARY]
 986  GO
 987  
 988  ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD 
 989      CONSTRAINT [PK_phpbb_profile_fields] PRIMARY KEY  CLUSTERED 
 990      (
 991          [field_id]
 992      )  ON [PRIMARY] 
 993  GO
 994  
 995  CREATE  INDEX [fld_type] ON [phpbb_profile_fields]([field_type]) ON [PRIMARY]
 996  GO
 997  
 998  CREATE  INDEX [fld_ordr] ON [phpbb_profile_fields]([field_order]) ON [PRIMARY]
 999  GO
1000  
1001  
1002  /*
1003      Table: 'phpbb_profile_fields_data'
1004  */
1005  CREATE TABLE [phpbb_profile_fields_data] (
1006      [user_id] [int] DEFAULT (0) NOT NULL 
1007  ) ON [PRIMARY]
1008  GO
1009  
1010  ALTER TABLE [phpbb_profile_fields_data] WITH NOCHECK ADD 
1011      CONSTRAINT [PK_phpbb_profile_fields_data] PRIMARY KEY  CLUSTERED 
1012      (
1013          [user_id]
1014      )  ON [PRIMARY] 
1015  GO
1016  
1017  
1018  /*
1019      Table: 'phpbb_profile_fields_lang'
1020  */
1021  CREATE TABLE [phpbb_profile_fields_lang] (
1022      [field_id] [int] DEFAULT (0) NOT NULL ,
1023      [lang_id] [int] DEFAULT (0) NOT NULL ,
1024      [option_id] [int] DEFAULT (0) NOT NULL ,
1025      [field_type] [int] DEFAULT (0) NOT NULL ,
1026      [lang_value] [varchar] (255) DEFAULT ('') NOT NULL 
1027  ) ON [PRIMARY]
1028  GO
1029  
1030  ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD 
1031      CONSTRAINT [PK_phpbb_profile_fields_lang] PRIMARY KEY  CLUSTERED 
1032      (
1033          [field_id],
1034          [lang_id],
1035          [option_id]
1036      )  ON [PRIMARY] 
1037  GO
1038  
1039  
1040  /*
1041      Table: 'phpbb_profile_lang'
1042  */
1043  CREATE TABLE [phpbb_profile_lang] (
1044      [field_id] [int] DEFAULT (0) NOT NULL ,
1045      [lang_id] [int] DEFAULT (0) NOT NULL ,
1046      [lang_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1047      [lang_explain] [varchar] (4000) DEFAULT ('') NOT NULL ,
1048      [lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL 
1049  ) ON [PRIMARY]
1050  GO
1051  
1052  ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD 
1053      CONSTRAINT [PK_phpbb_profile_lang] PRIMARY KEY  CLUSTERED 
1054      (
1055          [field_id],
1056          [lang_id]
1057      )  ON [PRIMARY] 
1058  GO
1059  
1060  
1061  /*
1062      Table: 'phpbb_ranks'
1063  */
1064  CREATE TABLE [phpbb_ranks] (
1065      [rank_id] [int] IDENTITY (1, 1) NOT NULL ,
1066      [rank_title] [varchar] (255) DEFAULT ('') NOT NULL ,
1067      [rank_min] [int] DEFAULT (0) NOT NULL ,
1068      [rank_special] [int] DEFAULT (0) NOT NULL ,
1069      [rank_image] [varchar] (255) DEFAULT ('') NOT NULL 
1070  ) ON [PRIMARY]
1071  GO
1072  
1073  ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD 
1074      CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY  CLUSTERED 
1075      (
1076          [rank_id]
1077      )  ON [PRIMARY] 
1078  GO
1079  
1080  
1081  /*
1082      Table: 'phpbb_reports'
1083  */
1084  CREATE TABLE [phpbb_reports] (
1085      [report_id] [int] IDENTITY (1, 1) NOT NULL ,
1086      [reason_id] [int] DEFAULT (0) NOT NULL ,
1087      [post_id] [int] DEFAULT (0) NOT NULL ,
1088      [pm_id] [int] DEFAULT (0) NOT NULL ,
1089      [user_id] [int] DEFAULT (0) NOT NULL ,
1090      [user_notify] [int] DEFAULT (0) NOT NULL ,
1091      [report_closed] [int] DEFAULT (0) NOT NULL ,
1092      [report_time] [int] DEFAULT (0) NOT NULL ,
1093      [report_text] [text] DEFAULT ('') NOT NULL 
1094  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1095  GO
1096  
1097  ALTER TABLE [phpbb_reports] WITH NOCHECK ADD 
1098      CONSTRAINT [PK_phpbb_reports] PRIMARY KEY  CLUSTERED 
1099      (
1100          [report_id]
1101      )  ON [PRIMARY] 
1102  GO
1103  
1104  CREATE  INDEX [post_id] ON [phpbb_reports]([post_id]) ON [PRIMARY]
1105  GO
1106  
1107  CREATE  INDEX [pm_id] ON [phpbb_reports]([pm_id]) ON [PRIMARY]
1108  GO
1109  
1110  
1111  /*
1112      Table: 'phpbb_reports_reasons'
1113  */
1114  CREATE TABLE [phpbb_reports_reasons] (
1115      [reason_id] [int] IDENTITY (1, 1) NOT NULL ,
1116      [reason_title] [varchar] (255) DEFAULT ('') NOT NULL ,
1117      [reason_description] [text] DEFAULT ('') NOT NULL ,
1118      [reason_order] [int] DEFAULT (0) NOT NULL 
1119  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1120  GO
1121  
1122  ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD 
1123      CONSTRAINT [PK_phpbb_reports_reasons] PRIMARY KEY  CLUSTERED 
1124      (
1125          [reason_id]
1126      )  ON [PRIMARY] 
1127  GO
1128  
1129  
1130  /*
1131      Table: 'phpbb_search_results'
1132  */
1133  CREATE TABLE [phpbb_search_results] (
1134      [search_key] [varchar] (32) DEFAULT ('') NOT NULL ,
1135      [search_time] [int] DEFAULT (0) NOT NULL ,
1136      [search_keywords] [text] DEFAULT ('') NOT NULL ,
1137      [search_authors] [text] DEFAULT ('') NOT NULL 
1138  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1139  GO
1140  
1141  ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD 
1142      CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY  CLUSTERED 
1143      (
1144          [search_key]
1145      )  ON [PRIMARY] 
1146  GO
1147  
1148  
1149  /*
1150      Table: 'phpbb_search_wordlist'
1151  */
1152  CREATE TABLE [phpbb_search_wordlist] (
1153      [word_id] [int] IDENTITY (1, 1) NOT NULL ,
1154      [word_text] [varchar] (255) DEFAULT ('') NOT NULL ,
1155      [word_common] [int] DEFAULT (0) NOT NULL ,
1156      [word_count] [int] DEFAULT (0) NOT NULL 
1157  ) ON [PRIMARY]
1158  GO
1159  
1160  ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD 
1161      CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY  CLUSTERED 
1162      (
1163          [word_id]
1164      )  ON [PRIMARY] 
1165  GO
1166  
1167  CREATE  UNIQUE  INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text]) ON [PRIMARY]
1168  GO
1169  
1170  CREATE  INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count]) ON [PRIMARY]
1171  GO
1172  
1173  
1174  /*
1175      Table: 'phpbb_search_wordmatch'
1176  */
1177  CREATE TABLE [phpbb_search_wordmatch] (
1178      [post_id] [int] DEFAULT (0) NOT NULL ,
1179      [word_id] [int] DEFAULT (0) NOT NULL ,
1180      [title_match] [int] DEFAULT (0) NOT NULL 
1181  ) ON [PRIMARY]
1182  GO
1183  
1184  CREATE  UNIQUE  INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match]) ON [PRIMARY]
1185  GO
1186  
1187  CREATE  INDEX [word_id] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY]
1188  GO
1189  
1190  CREATE  INDEX [post_id] ON [phpbb_search_wordmatch]([post_id]) ON [PRIMARY]
1191  GO
1192  
1193  
1194  /*
1195      Table: 'phpbb_sessions'
1196  */
1197  CREATE TABLE [phpbb_sessions] (
1198      [session_id] [char] (32) DEFAULT ('') NOT NULL ,
1199      [session_user_id] [int] DEFAULT (0) NOT NULL ,
1200      [session_forum_id] [int] DEFAULT (0) NOT NULL ,
1201      [session_last_visit] [int] DEFAULT (0) NOT NULL ,
1202      [session_start] [int] DEFAULT (0) NOT NULL ,
1203      [session_time] [int] DEFAULT (0) NOT NULL ,
1204      [session_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
1205      [session_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
1206      [session_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL ,
1207      [session_page] [varchar] (255) DEFAULT ('') NOT NULL ,
1208      [session_viewonline] [int] DEFAULT (1) NOT NULL ,
1209      [session_autologin] [int] DEFAULT (0) NOT NULL ,
1210      [session_admin] [int] DEFAULT (0) NOT NULL 
1211  ) ON [PRIMARY]
1212  GO
1213  
1214  ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD 
1215      CONSTRAINT [PK_phpbb_sessions] PRIMARY KEY  CLUSTERED 
1216      (
1217          [session_id]
1218      )  ON [PRIMARY] 
1219  GO
1220  
1221  CREATE  INDEX [session_time] ON [phpbb_sessions]([session_time]) ON [PRIMARY]
1222  GO
1223  
1224  CREATE  INDEX [session_user_id] ON [phpbb_sessions]([session_user_id]) ON [PRIMARY]
1225  GO
1226  
1227  CREATE  INDEX [session_fid] ON [phpbb_sessions]([session_forum_id]) ON [PRIMARY]
1228  GO
1229  
1230  
1231  /*
1232      Table: 'phpbb_sessions_keys'
1233  */
1234  CREATE TABLE [phpbb_sessions_keys] (
1235      [key_id] [char] (32) DEFAULT ('') NOT NULL ,
1236      [user_id] [int] DEFAULT (0) NOT NULL ,
1237      [last_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
1238      [last_login] [int] DEFAULT (0) NOT NULL 
1239  ) ON [PRIMARY]
1240  GO
1241  
1242  ALTER TABLE [phpbb_sessions_keys] WITH NOCHECK ADD 
1243      CONSTRAINT [PK_phpbb_sessions_keys] PRIMARY KEY  CLUSTERED 
1244      (
1245          [key_id],
1246          [user_id]
1247      )  ON [PRIMARY] 
1248  GO
1249  
1250  CREATE  INDEX [last_login] ON [phpbb_sessions_keys]([last_login]) ON [PRIMARY]
1251  GO
1252  
1253  
1254  /*
1255      Table: 'phpbb_sitelist'
1256  */
1257  CREATE TABLE [phpbb_sitelist] (
1258      [site_id] [int] IDENTITY (1, 1) NOT NULL ,
1259      [site_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
1260      [site_hostname] [varchar] (255) DEFAULT ('') NOT NULL ,
1261      [ip_exclude] [int] DEFAULT (0) NOT NULL 
1262  ) ON [PRIMARY]
1263  GO
1264  
1265  ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD 
1266      CONSTRAINT [PK_phpbb_sitelist] PRIMARY KEY  CLUSTERED 
1267      (
1268          [site_id]
1269      )  ON [PRIMARY] 
1270  GO
1271  
1272  
1273  /*
1274      Table: 'phpbb_smilies'
1275  */
1276  CREATE TABLE [phpbb_smilies] (
1277      [smiley_id] [int] IDENTITY (1, 1) NOT NULL ,
1278      [code] [varchar] (50) DEFAULT ('') NOT NULL ,
1279      [emotion] [varchar] (50) DEFAULT ('') NOT NULL ,
1280      [smiley_url] [varchar] (50) DEFAULT ('') NOT NULL ,
1281      [smiley_width] [int] DEFAULT (0) NOT NULL ,
1282      [smiley_height] [int] DEFAULT (0) NOT NULL ,
1283      [smiley_order] [int] DEFAULT (0) NOT NULL ,
1284      [display_on_posting] [int] DEFAULT (1) NOT NULL 
1285  ) ON [PRIMARY]
1286  GO
1287  
1288  ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD 
1289      CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY  CLUSTERED 
1290      (
1291          [smiley_id]
1292      )  ON [PRIMARY] 
1293  GO
1294  
1295  CREATE  INDEX [display_on_post] ON [phpbb_smilies]([display_on_posting]) ON [PRIMARY]
1296  GO
1297  
1298  
1299  /*
1300      Table: 'phpbb_styles'
1301  */
1302  CREATE TABLE [phpbb_styles] (
1303      [style_id] [int] IDENTITY (1, 1) NOT NULL ,
1304      [style_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1305      [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
1306      [style_active] [int] DEFAULT (1) NOT NULL ,
1307      [template_id] [int] DEFAULT (0) NOT NULL ,
1308      [theme_id] [int] DEFAULT (0) NOT NULL ,
1309      [imageset_id] [int] DEFAULT (0) NOT NULL 
1310  ) ON [PRIMARY]
1311  GO
1312  
1313  ALTER TABLE [phpbb_styles] WITH NOCHECK ADD 
1314      CONSTRAINT [PK_phpbb_styles] PRIMARY KEY  CLUSTERED 
1315      (
1316          [style_id]
1317      )  ON [PRIMARY] 
1318  GO
1319  
1320  CREATE  UNIQUE  INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY]
1321  GO
1322  
1323  CREATE  INDEX [template_id] ON [phpbb_styles]([template_id]) ON [PRIMARY]
1324  GO
1325  
1326  CREATE  INDEX [theme_id] ON [phpbb_styles]([theme_id]) ON [PRIMARY]
1327  GO
1328  
1329  CREATE  INDEX [imageset_id] ON [phpbb_styles]([imageset_id]) ON [PRIMARY]
1330  GO
1331  
1332  
1333  /*
1334      Table: 'phpbb_styles_template'
1335  */
1336  CREATE TABLE [phpbb_styles_template] (
1337      [template_id] [int] IDENTITY (1, 1) NOT NULL ,
1338      [template_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1339      [template_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
1340      [template_path] [varchar] (100) DEFAULT ('') NOT NULL ,
1341      [bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL ,
1342      [template_storedb] [int] DEFAULT (0) NOT NULL ,
1343      [template_inherits_id] [int] DEFAULT (0) NOT NULL ,
1344      [template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL 
1345  ) ON [PRIMARY]
1346  GO
1347  
1348  ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD 
1349      CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY  CLUSTERED 
1350      (
1351          [template_id]
1352      )  ON [PRIMARY] 
1353  GO
1354  
1355  CREATE  UNIQUE  INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name]) ON [PRIMARY]
1356  GO
1357  
1358  
1359  /*
1360      Table: 'phpbb_styles_template_data'
1361  */
1362  CREATE TABLE [phpbb_styles_template_data] (
1363      [template_id] [int] DEFAULT (0) NOT NULL ,
1364      [template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
1365      [template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
1366      [template_mtime] [int] DEFAULT (0) NOT NULL ,
1367      [template_data] [text] DEFAULT ('') NOT NULL 
1368  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1369  GO
1370  
1371  CREATE  INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
1372  GO
1373  
1374  CREATE  INDEX [tfn] ON [phpbb_styles_template_data]([template_filename]) ON [PRIMARY]
1375  GO
1376  
1377  
1378  /*
1379      Table: 'phpbb_styles_theme'
1380  */
1381  CREATE TABLE [phpbb_styles_theme] (
1382      [theme_id] [int] IDENTITY (1, 1) NOT NULL ,
1383      [theme_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1384      [theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
1385      [theme_path] [varchar] (100) DEFAULT ('') NOT NULL ,
1386      [theme_storedb] [int] DEFAULT (0) NOT NULL ,
1387      [theme_mtime] [int] DEFAULT (0) NOT NULL ,
1388      [theme_data] [text] DEFAULT ('') NOT NULL 
1389  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1390  GO
1391  
1392  ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD 
1393      CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY  CLUSTERED 
1394      (
1395          [theme_id]
1396      )  ON [PRIMARY] 
1397  GO
1398  
1399  CREATE  UNIQUE  INDEX [theme_name] ON [phpbb_styles_theme]([theme_name]) ON [PRIMARY]
1400  GO
1401  
1402  
1403  /*
1404      Table: 'phpbb_styles_imageset'
1405  */
1406  CREATE TABLE [phpbb_styles_imageset] (
1407      [imageset_id] [int] IDENTITY (1, 1) NOT NULL ,
1408      [imageset_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1409      [imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
1410      [imageset_path] [varchar] (100) DEFAULT ('') NOT NULL 
1411  ) ON [PRIMARY]
1412  GO
1413  
1414  ALTER TABLE [phpbb_styles_imageset] WITH NOCHECK ADD 
1415      CONSTRAINT [PK_phpbb_styles_imageset] PRIMARY KEY  CLUSTERED 
1416      (
1417          [imageset_id]
1418      )  ON [PRIMARY] 
1419  GO
1420  
1421  CREATE  UNIQUE  INDEX [imgset_nm] ON [phpbb_styles_imageset]([imageset_name]) ON [PRIMARY]
1422  GO
1423  
1424  
1425  /*
1426      Table: 'phpbb_styles_imageset_data'
1427  */
1428  CREATE TABLE [phpbb_styles_imageset_data] (
1429      [image_id] [int] IDENTITY (1, 1) NOT NULL ,
1430      [image_name] [varchar] (200) DEFAULT ('') NOT NULL ,
1431      [image_filename] [varchar] (200) DEFAULT ('') NOT NULL ,
1432      [image_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
1433      [image_height] [int] DEFAULT (0) NOT NULL ,
1434      [image_width] [int] DEFAULT (0) NOT NULL ,
1435      [imageset_id] [int] DEFAULT (0) NOT NULL 
1436  ) ON [PRIMARY]
1437  GO
1438  
1439  ALTER TABLE [phpbb_styles_imageset_data] WITH NOCHECK ADD 
1440      CONSTRAINT [PK_phpbb_styles_imageset_data] PRIMARY KEY  CLUSTERED 
1441      (
1442          [image_id]
1443      )  ON [PRIMARY] 
1444  GO
1445  
1446  CREATE  INDEX [i_d] ON [phpbb_styles_imageset_data]([imageset_id]) ON [PRIMARY]
1447  GO
1448  
1449  
1450  /*
1451      Table: 'phpbb_topics'
1452  */
1453  CREATE TABLE [phpbb_topics] (
1454      [topic_id] [int] IDENTITY (1, 1) NOT NULL ,
1455      [forum_id] [int] DEFAULT (0) NOT NULL ,
1456      [icon_id] [int] DEFAULT (0) NOT NULL ,
1457      [topic_attachment] [int] DEFAULT (0) NOT NULL ,
1458      [topic_approved] [int] DEFAULT (1) NOT NULL ,
1459      [topic_reported] [int] DEFAULT (0) NOT NULL ,
1460      [topic_title] [varchar] (255) DEFAULT ('') NOT NULL ,
1461      [topic_poster] [int] DEFAULT (0) NOT NULL ,
1462      [topic_time] [int] DEFAULT (0) NOT NULL ,
1463      [topic_time_limit] [int] DEFAULT (0) NOT NULL ,
1464      [topic_views] [int] DEFAULT (0) NOT NULL ,
1465      [topic_replies] [int] DEFAULT (0) NOT NULL ,
1466      [topic_replies_real] [int] DEFAULT (0) NOT NULL ,
1467      [topic_status] [int] DEFAULT (0) NOT NULL ,
1468      [topic_type] [int] DEFAULT (0) NOT NULL ,
1469      [topic_first_post_id] [int] DEFAULT (0) NOT NULL ,
1470      [topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1471      [topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
1472      [topic_last_post_id] [int] DEFAULT (0) NOT NULL ,
1473      [topic_last_poster_id] [int] DEFAULT (0) NOT NULL ,
1474      [topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1475      [topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
1476      [topic_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
1477      [topic_last_post_time] [int] DEFAULT (0) NOT NULL ,
1478      [topic_last_view_time] [int] DEFAULT (0) NOT NULL ,
1479      [topic_moved_id] [int] DEFAULT (0) NOT NULL ,
1480      [topic_bumped] [int] DEFAULT (0) NOT NULL ,
1481      [topic_bumper] [int] DEFAULT (0) NOT NULL ,
1482      [poll_title] [varchar] (255) DEFAULT ('') NOT NULL ,
1483      [poll_start] [int] DEFAULT (0) NOT NULL ,
1484      [poll_length] [int] DEFAULT (0) NOT NULL ,
1485      [poll_max_options] [int] DEFAULT (1) NOT NULL ,
1486      [poll_last_vote] [int] DEFAULT (0) NOT NULL ,
1487      [poll_vote_change] [int] DEFAULT (0) NOT NULL 
1488  ) ON [PRIMARY]
1489  GO
1490  
1491  ALTER TABLE [phpbb_topics] WITH NOCHECK ADD 
1492      CONSTRAINT [PK_phpbb_topics] PRIMARY KEY  CLUSTERED 
1493      (
1494          [topic_id]
1495      )  ON [PRIMARY] 
1496  GO
1497  
1498  CREATE  INDEX [forum_id] ON [phpbb_topics]([forum_id]) ON [PRIMARY]
1499  GO
1500  
1501  CREATE  INDEX [forum_id_type] ON [phpbb_topics]([forum_id], [topic_type]) ON [PRIMARY]
1502  GO
1503  
1504  CREATE  INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time]) ON [PRIMARY]
1505  GO
1506  
1507  CREATE  INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY]
1508  GO
1509  
1510  CREATE  INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY]
1511  GO
1512  
1513  CREATE  INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY]
1514  GO
1515  
1516  
1517  /*
1518      Table: 'phpbb_topics_track'
1519  */
1520  CREATE TABLE [phpbb_topics_track] (
1521      [user_id] [int] DEFAULT (0) NOT NULL ,
1522      [topic_id] [int] DEFAULT (0) NOT NULL ,
1523      [forum_id] [int] DEFAULT (0) NOT NULL ,
1524      [mark_time] [int] DEFAULT (0) NOT NULL 
1525  ) ON [PRIMARY]
1526  GO
1527  
1528  ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD 
1529      CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY  CLUSTERED 
1530      (
1531          [user_id],
1532          [topic_id]
1533      )  ON [PRIMARY] 
1534  GO
1535  
1536  CREATE  INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) ON [PRIMARY]
1537  GO
1538  
1539  CREATE  INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY]
1540  GO
1541  
1542  
1543  /*
1544      Table: 'phpbb_topics_posted'
1545  */
1546  CREATE TABLE [phpbb_topics_posted] (
1547      [user_id] [int] DEFAULT (0) NOT NULL ,
1548      [topic_id] [int] DEFAULT (0) NOT NULL ,
1549      [topic_posted] [int] DEFAULT (0) NOT NULL 
1550  ) ON [PRIMARY]
1551  GO
1552  
1553  ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD 
1554      CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY  CLUSTERED 
1555      (
1556          [user_id],
1557          [topic_id]
1558      )  ON [PRIMARY] 
1559  GO
1560  
1561  
1562  /*
1563      Table: 'phpbb_topics_watch'
1564  */
1565  CREATE TABLE [phpbb_topics_watch] (
1566      [topic_id] [int] DEFAULT (0) NOT NULL ,
1567      [user_id] [int] DEFAULT (0) NOT NULL ,
1568      [notify_status] [int] DEFAULT (0) NOT NULL 
1569  ) ON [PRIMARY]
1570  GO
1571  
1572  CREATE  INDEX [topic_id] ON [phpbb_topics_watch]([topic_id]) ON [PRIMARY]
1573  GO
1574  
1575  CREATE  INDEX [user_id] ON [phpbb_topics_watch]([user_id]) ON [PRIMARY]
1576  GO
1577  
1578  CREATE  INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status]) ON [PRIMARY]
1579  GO
1580  
1581  
1582  /*
1583      Table: 'phpbb_user_group'
1584  */
1585  CREATE TABLE [phpbb_user_group] (
1586      [group_id] [int] DEFAULT (0) NOT NULL ,
1587      [user_id] [int] DEFAULT (0) NOT NULL ,
1588      [group_leader] [int] DEFAULT (0) NOT NULL ,
1589      [user_pending] [int] DEFAULT (1) NOT NULL 
1590  ) ON [PRIMARY]
1591  GO
1592  
1593  CREATE  INDEX [group_id] ON [phpbb_user_group]([group_id]) ON [PRIMARY]
1594  GO
1595  
1596  CREATE  INDEX [user_id] ON [phpbb_user_group]([user_id]) ON [PRIMARY]
1597  GO
1598  
1599  CREATE  INDEX [group_leader] ON [phpbb_user_group]([group_leader]) ON [PRIMARY]
1600  GO
1601  
1602  
1603  /*
1604      Table: 'phpbb_users'
1605  */
1606  CREATE TABLE [phpbb_users] (
1607      [user_id] [int] IDENTITY (1, 1) NOT NULL ,
1608      [user_type] [int] DEFAULT (0) NOT NULL ,
1609      [group_id] [int] DEFAULT (3) NOT NULL ,
1610      [user_permissions] [text] DEFAULT ('') NOT NULL ,
1611      [user_perm_from] [int] DEFAULT (0) NOT NULL ,
1612      [user_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
1613      [user_regdate] [int] DEFAULT (0) NOT NULL ,
1614      [username] [varchar] (255) DEFAULT ('') NOT NULL ,
1615      [username_clean] [varchar] (255) DEFAULT ('') NOT NULL ,
1616      [user_password] [varchar] (40) DEFAULT ('') NOT NULL ,
1617      [user_passchg] [int] DEFAULT (0) NOT NULL ,
1618      [user_pass_convert] [int] DEFAULT (0) NOT NULL ,
1619      [user_email] [varchar] (100) DEFAULT ('') NOT NULL ,
1620      [user_email_hash] [float] DEFAULT (0) NOT NULL ,
1621      [user_birthday] [varchar] (10) DEFAULT ('') NOT NULL ,
1622      [user_lastvisit] [int] DEFAULT (0) NOT NULL ,
1623      [user_lastmark] [int] DEFAULT (0) NOT NULL ,
1624      [user_lastpost_time] [int] DEFAULT (0) NOT NULL ,
1625      [user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL ,
1626      [user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL ,
1627      [user_last_search] [int] DEFAULT (0) NOT NULL ,
1628      [user_warnings] [int] DEFAULT (0) NOT NULL ,
1629      [user_last_warning] [int] DEFAULT (0) NOT NULL ,
1630      [user_login_attempts] [int] DEFAULT (0) NOT NULL ,
1631      [user_inactive_reason] [int] DEFAULT (0) NOT NULL ,
1632      [user_inactive_time] [int] DEFAULT (0) NOT NULL ,
1633      [user_posts] [int] DEFAULT (0) NOT NULL ,
1634      [user_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
1635      [user_timezone] [float] DEFAULT (0) NOT NULL ,
1636      [user_dst] [int] DEFAULT (0) NOT NULL ,
1637      [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL ,
1638      [user_style] [int] DEFAULT (0) NOT NULL ,
1639      [user_rank] [int] DEFAULT (0) NOT NULL ,
1640      [user_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
1641      [user_new_privmsg] [int] DEFAULT (0) NOT NULL ,
1642      [user_unread_privmsg] [int] DEFAULT (0) NOT NULL ,
1643      [user_last_privmsg] [int] DEFAULT (0) NOT NULL ,
1644      [user_message_rules] [int] DEFAULT (0) NOT NULL ,
1645      [user_full_folder] [int] DEFAULT (-3) NOT NULL ,
1646      [user_emailtime] [int] DEFAULT (0) NOT NULL ,
1647      [user_topic_show_days] [int] DEFAULT (0) NOT NULL ,
1648      [user_topic_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
1649      [user_topic_sortby_dir] [varchar] (1) DEFAULT ('d') NOT NULL ,
1650      [user_post_show_days] [int] DEFAULT (0) NOT NULL ,
1651      [user_post_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
1652      [user_post_sortby_dir] [varchar] (1) DEFAULT ('a') NOT NULL ,
1653      [user_notify] [int] DEFAULT (0) NOT NULL ,
1654      [user_notify_pm] [int] DEFAULT (1) NOT NULL ,
1655      [user_notify_type] [int] DEFAULT (0) NOT NULL ,
1656      [user_allow_pm] [int] DEFAULT (1) NOT NULL ,
1657      [user_allow_viewonline] [int] DEFAULT (1) NOT NULL ,
1658      [user_allow_viewemail] [int] DEFAULT (1) NOT NULL ,
1659      [user_allow_massemail] [int] DEFAULT (1) NOT NULL ,
1660      [user_options] [int] DEFAULT (230271) NOT NULL ,
1661      [user_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
1662      [user_avatar_type] [int] DEFAULT (0) NOT NULL ,
1663      [user_avatar_width] [int] DEFAULT (0) NOT NULL ,
1664      [user_avatar_height] [int] DEFAULT (0) NOT NULL ,
1665      [user_sig] [text] DEFAULT ('') NOT NULL ,
1666      [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
1667      [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
1668      [user_from] [varchar] (100) DEFAULT ('') NOT NULL ,
1669      [user_icq] [varchar] (15) DEFAULT ('') NOT NULL ,
1670      [user_aim] [varchar] (255) DEFAULT ('') NOT NULL ,
1671      [user_yim] [varchar] (255) DEFAULT ('') NOT NULL ,
1672      [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL ,
1673      [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL ,
1674      [user_website] [varchar] (200) DEFAULT ('') NOT NULL ,
1675      [user_occ] [varchar] (4000) DEFAULT ('') NOT NULL ,
1676      [user_interests] [varchar] (4000) DEFAULT ('') NOT NULL ,
1677      [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL ,
1678      [user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL ,
1679      [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL ,
1680      [user_new] [int] DEFAULT (1) NOT NULL ,
1681      [user_reminded] [int] DEFAULT (0) NOT NULL ,
1682      [user_reminded_time] [int] DEFAULT (0) NOT NULL 
1683  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1684  GO
1685  
1686  ALTER TABLE [phpbb_users] WITH NOCHECK ADD 
1687      CONSTRAINT [PK_phpbb_users] PRIMARY KEY  CLUSTERED 
1688      (
1689          [user_id]
1690      )  ON [PRIMARY] 
1691  GO
1692  
1693  CREATE  INDEX [user_birthday] ON [phpbb_users]([user_birthday]) ON [PRIMARY]
1694  GO
1695  
1696  CREATE  INDEX [user_email_hash] ON [phpbb_users]([user_email_hash]) ON [PRIMARY]
1697  GO
1698  
1699  CREATE  INDEX [user_type] ON [phpbb_users]([user_type]) ON [PRIMARY]
1700  GO
1701  
1702  CREATE  UNIQUE  INDEX [username_clean] ON [phpbb_users]([username_clean]) ON [PRIMARY]
1703  GO
1704  
1705  
1706  /*
1707      Table: 'phpbb_warnings'
1708  */
1709  CREATE TABLE [phpbb_warnings] (
1710      [warning_id] [int] IDENTITY (1, 1) NOT NULL ,
1711      [user_id] [int] DEFAULT (0) NOT NULL ,
1712      [post_id] [int] DEFAULT (0) NOT NULL ,
1713      [log_id] [int] DEFAULT (0) NOT NULL ,
1714      [warning_time] [int] DEFAULT (0) NOT NULL 
1715  ) ON [PRIMARY]
1716  GO
1717  
1718  ALTER TABLE [phpbb_warnings] WITH NOCHECK ADD 
1719      CONSTRAINT [PK_phpbb_warnings] PRIMARY KEY  CLUSTERED 
1720      (
1721          [warning_id]
1722      )  ON [PRIMARY] 
1723  GO
1724  
1725  
1726  /*
1727      Table: 'phpbb_words'
1728  */
1729  CREATE TABLE [phpbb_words] (
1730      [word_id] [int] IDENTITY (1, 1) NOT NULL ,
1731      [word] [varchar] (255) DEFAULT ('') NOT NULL ,
1732      [replacement] [varchar] (255) DEFAULT ('') NOT NULL 
1733  ) ON [PRIMARY]
1734  GO
1735  
1736  ALTER TABLE [phpbb_words] WITH NOCHECK ADD 
1737      CONSTRAINT [PK_phpbb_words] PRIMARY KEY  CLUSTERED 
1738      (
1739          [word_id]
1740      )  ON [PRIMARY] 
1741  GO
1742  
1743  
1744  /*
1745      Table: 'phpbb_zebra'
1746  */
1747  CREATE TABLE [phpbb_zebra] (
1748      [user_id] [int] DEFAULT (0) NOT NULL ,
1749      [zebra_id] [int] DEFAULT (0) NOT NULL ,
1750      [friend] [int] DEFAULT (0) NOT NULL ,
1751      [foe] [int] DEFAULT (0) NOT NULL 
1752  ) ON [PRIMARY]
1753  GO
1754  
1755  ALTER TABLE [phpbb_zebra] WITH NOCHECK ADD 
1756      CONSTRAINT [PK_phpbb_zebra] PRIMARY KEY  CLUSTERED 
1757      (
1758          [user_id],
1759          [zebra_id]
1760      )  ON [PRIMARY] 
1761  GO
1762  
1763  


Generated: Wed Oct 2 15:03:47 2013 Cross-referenced by PHPXref 0.7.1