
      -- Tables
      
          /***** Object:  Table [dbo].[T_MEETING_MEMBER] *****/
          CREATE TABLE [dbo].[T_MEETING_MEMBER]
          (
	  [MeetingMemberID] uniqueidentifier NOT NULL,
                  [LastName] varchar(40) NOT NULL,
                  [FirstName] varchar(40) NOT NULL,
                  [Patronymic] varchar(40) NULL,
                  [Mo] varchar(6) NULL
          ) ON [PRIMARY]
          GO
        
      -- Alters
      
              ALTER TABLE [dbo].[T_MEETING_MEMBER] WITH NOCHECK ADD CONSTRAINT [PK_T_MEETING_MEMBER]
              PRIMARY KEY CLUSTERED ([MeetingMemberID]) ON [PRIMARY]
              GO
          
              ALTER TABLE [dbo].[T_MEETING_MEMBER] WITH NOCHECK ADD CONSTRAINT [FK_T_MO_T_MEETING_MEMBER_MO] FOREIGN KEY([Mo])
              REFERENCES [dbo].[T_MO] ([MCOD])
              GO

			  
      -- Tables
      
          /***** Object:  Table [dbo].[T_MEETING_PROTOCOL] *****/
          CREATE TABLE [dbo].[T_MEETING_PROTOCOL]
          (
	  [MeetingProtocolID] uniqueidentifier NOT NULL,
                  [Number] varchar(255) NOT NULL,
                  [MeetingDate] datetime NOT NULL,
                  [PlanPeriod] uniqueidentifier NOT NULL,
                  [IsApply] bit NOT NULL
          ) ON [PRIMARY]
          GO
        
      -- Alters
      
              ALTER TABLE [dbo].[T_MEETING_PROTOCOL] WITH NOCHECK ADD CONSTRAINT [PK_T_MEETING_PROTOCOL]
              PRIMARY KEY CLUSTERED ([MeetingProtocolID]) ON [PRIMARY]
              GO
          
              ALTER TABLE [dbo].[T_MEETING_PROTOCOL] WITH NOCHECK ADD CONSTRAINT [FK_T_PLAN_PERIOD_T_MEETING_PROTOCOL_PLANPERIOD] FOREIGN KEY([PlanPeriod])
              REFERENCES [dbo].[T_PLAN_PERIOD] ([PlanPeriodID])
              GO

			  
      -- Tables
      
          /***** Object:  Table [dbo].[T_PROTOCOL_MEMBER] *****/
          CREATE TABLE [dbo].[T_PROTOCOL_MEMBER]
          (
	  [ProtocolMemberID] uniqueidentifier NOT NULL,
                  [MeetingProtocol] uniqueidentifier NOT NULL,
                  [MeetingMember] uniqueidentifier NOT NULL
          ) ON [PRIMARY]
          GO
        
      -- Alters
      
              ALTER TABLE [dbo].[T_PROTOCOL_MEMBER] WITH NOCHECK ADD CONSTRAINT [PK_T_PROTOCOL_MEMBER]
              PRIMARY KEY CLUSTERED ([ProtocolMemberID]) ON [PRIMARY]
              GO
          
              ALTER TABLE [dbo].[T_PROTOCOL_MEMBER] WITH NOCHECK ADD CONSTRAINT [FK_T_MEETING_PROTOCOL_T_PROTOCOL_MEMBER_MEETINGPROTOCOL] FOREIGN KEY([MeetingProtocol])
              REFERENCES [dbo].[T_MEETING_PROTOCOL] ([MeetingProtocolID])
              GO
              ALTER TABLE [dbo].[T_PROTOCOL_MEMBER] WITH NOCHECK ADD CONSTRAINT [FK_T_MEETING_MEMBER_T_PROTOCOL_MEMBER_MEETINGMEMBER] FOREIGN KEY([MeetingMember])
              REFERENCES [dbo].[T_MEETING_MEMBER] ([MeetingMemberID])
              GO


			  
      -- Tables
      
          /***** Object:  Table [dbo].[T_REQUEST_IN_PROTOCOL] *****/
          CREATE TABLE [dbo].[T_REQUEST_IN_PROTOCOL]
          (
	  [RequestInProtocolID] uniqueidentifier NOT NULL,
                  [PlanRequest] uniqueidentifier NOT NULL,
                  [MeetingProtocol] uniqueidentifier NOT NULL
          ) ON [PRIMARY]
          GO
        
      -- Alters
      
              ALTER TABLE [dbo].[T_REQUEST_IN_PROTOCOL] WITH NOCHECK ADD CONSTRAINT [PK_T_REQUEST_IN_PROTOCOL]
              PRIMARY KEY CLUSTERED ([RequestInProtocolID]) ON [PRIMARY]
              GO
          
              ALTER TABLE [dbo].[T_REQUEST_IN_PROTOCOL] WITH NOCHECK ADD CONSTRAINT [FK_T_PLAN_REQUEST_T_REQUEST_IN_PROTOCOL_PLANREQUEST] FOREIGN KEY([PlanRequest])
              REFERENCES [dbo].[T_PLAN_REQUEST] ([PlanID])
              GO
              ALTER TABLE [dbo].[T_REQUEST_IN_PROTOCOL] WITH NOCHECK ADD CONSTRAINT [FK_T_MEETING_PROTOCOL_T_REQUEST_IN_PROTOCOL_MEETINGPROTOCOL] FOREIGN KEY([MeetingProtocol])
              REFERENCES [dbo].[T_MEETING_PROTOCOL] ([MeetingProtocolID])
              GO

			  
      -- Tables
      
          /***** Object:  Table [dbo].[T_MEETING_RESOLVE] *****/
          CREATE TABLE [dbo].[T_MEETING_RESOLVE]
          (
	  [MeetingResolveID] uniqueidentifier NOT NULL,
                  [RequestInProtocol] uniqueidentifier NULL,
                  [Value] decimal(31,10) NOT NULL,
                  [PlanParameter] uniqueidentifier NOT NULL,
                  [OldValue] decimal(31,10) NOT NULL
          ) ON [PRIMARY]
          GO
        
      -- Alters
      
              ALTER TABLE [dbo].[T_MEETING_RESOLVE] WITH NOCHECK ADD CONSTRAINT [PK_T_MEETING_RESOLVE]
              PRIMARY KEY CLUSTERED ([MeetingResolveID]) ON [PRIMARY]
              GO
          
              ALTER TABLE [dbo].[T_MEETING_RESOLVE] WITH NOCHECK ADD CONSTRAINT [FK_T_REQUEST_IN_PROTOCOL_T_MEETING_RESOLVE_REQUESTINPROTOCOL] FOREIGN KEY([RequestInProtocol])
              REFERENCES [dbo].[T_REQUEST_IN_PROTOCOL] ([RequestInProtocolID])
              GO
              ALTER TABLE [dbo].[T_MEETING_RESOLVE] WITH NOCHECK ADD CONSTRAINT [FK_T_PLAN_PARAMETER_T_MEETING_RESOLVE_PLANPARAMETER] FOREIGN KEY([PlanParameter])
              REFERENCES [dbo].[T_PLAN_PARAMETER] ([PayParametrID])
              GO

