diff options
Diffstat (limited to 'phpBB/install/schemas/mssql_schema.sql')
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index ac13607e3b..74a8b3be0c 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -713,11 +713,17 @@ CREATE TABLE [phpbb_topics_marking] ( [user_id] [int] NOT NULL , [topic_id] [int] NOT NULL , [forum_id] [int] NOT NULL , - [mark_type] [int] NOT NULL , [mark_time] [int] NOT NULL ) ON [PRIMARY] GO +CREATE TABLE [phpbb_topics_posted] ( + [user_id] [int] NOT NULL , + [topic_id] [int] NOT NULL , + [topic_posted] [int] NOT NULL +) ON [PRIMARY] +GO + CREATE TABLE [phpbb_topics_watch] ( [topic_id] [int] NOT NULL , [user_id] [int] NOT NULL , @@ -747,6 +753,7 @@ CREATE TABLE [phpbb_users] ( [user_email_hash] [float] NOT NULL , [user_birthday] [varchar] (10) NOT NULL , [user_lastvisit] [int] NOT NULL , + [user_lastmark] [int] NOT NULL , [user_lastpost_time] [int] NOT NULL , [user_lastpage] [varchar] (100) NOT NULL , [user_last_confirm_key] [varchar] (10) NOT NULL , @@ -1140,6 +1147,14 @@ ALTER TABLE [phpbb_topics_marking] WITH NOCHECK ADD ) ON [PRIMARY] GO +ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED + ( + [user_id], + [topic_id] + ) ON [PRIMARY] +GO + ALTER TABLE [phpbb_users] WITH NOCHECK ADD CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED ( @@ -1552,10 +1567,15 @@ ALTER TABLE [phpbb_topics_marking] WITH NOCHECK ADD CONSTRAINT [DF_tmarki_user_id] DEFAULT (0) FOR [user_id], CONSTRAINT [DF_tmarki_topic_id] DEFAULT (0) FOR [topic_id], CONSTRAINT [DF_tmarki_forum_id] DEFAULT (0) FOR [forum_id], - CONSTRAINT [DF_tmarki_mark_type] DEFAULT (0) FOR [mark_type], CONSTRAINT [DF_tmarki_mark_time] DEFAULT (0) FOR [mark_time] GO +ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD + CONSTRAINT [DF_tposte_user_id] DEFAULT (0) FOR [user_id], + CONSTRAINT [DF_tposte_topic_id] DEFAULT (0) FOR [topic_id], + CONSTRAINT [DF_tposte_topic_posted] DEFAULT (0) FOR [topic_posted] +GO + ALTER TABLE [phpbb_topics_watch] WITH NOCHECK ADD CONSTRAINT [DF_twatch_topic_id] DEFAULT (0) FOR [topic_id], CONSTRAINT [DF_twatch_user_id] DEFAULT (0) FOR [user_id], @@ -1575,6 +1595,7 @@ ALTER TABLE [phpbb_users] WITH NOCHECK ADD CONSTRAINT [DF_users__user_passchg] DEFAULT (0) FOR [user_passchg], CONSTRAINT [DF_users__user_email_hash] DEFAULT (0) FOR [user_email_hash], CONSTRAINT [DF_users__user_lastvisit] DEFAULT (0) FOR [user_lastvisit], + CONSTRAINT [DF_users__user_lastmark] DEFAULT (0) FOR [user_lastmark], CONSTRAINT [DF_users__user_lastpost_time] DEFAULT (0) FOR [user_lastpost_time], CONSTRAINT [DF_users__user_warnings] DEFAULT (0) FOR [user_warnings], CONSTRAINT [DF_users__user_posts] DEFAULT (0) FOR [user_posts], @@ -1833,6 +1854,9 @@ GO CREATE INDEX [topic_last_post_time] ON [phpbb_topics]([topic_last_post_time]) ON [PRIMARY] GO +CREATE INDEX [forum_id] ON [phpbb_topics_marking]([forum_id]) ON [PRIMARY] +GO + CREATE INDEX [topic_id] ON [phpbb_topics_watch]([topic_id]) ON [PRIMARY] GO |