Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USE [eForms]
- GO
- /****** Object: Table [dbo].[RoutePlan] Script Date: 9/25/2014 12:36:14 PM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- SET ANSI_PADDING ON
- GO
- CREATE TABLE [dbo].[RoutePlan](
- [RoutePlanId] [int] IDENTITY(1,1) NOT NULL,
- [FormId] [int] NOT NULL,
- [UserId] [int] NOT NULL,
- [Rank] [int] NOT NULL,
- [RoutePlanStatusId] [int] NULL,
- [StatusDate] [datetime] NULL,
- [Notes] [varchar](500) NULL,
- [IsStrict] [bit] NOT NULL,
- [RoutePlanResponsibilityId] [int] NOT NULL,
- [IsPostApproval] [bit] NOT NULL,
- [ProcessedByUserId] [int] NULL,
- [Deleted] [bit] NOT NULL,
- [CreatedById] [int] NULL,
- [CreatedDate] [datetime] NULL,
- [ModifiedById] [int] NULL,
- [ModifiedDate] [datetime] NULL,
- CONSTRAINT [PK_RoutePlan_1] PRIMARY KEY CLUSTERED
- (
- [RoutePlanId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- SET ANSI_PADDING OFF
- GO
- ALTER TABLE [dbo].[RoutePlan] ADD CONSTRAINT [DF_RoutePlan_RoutePlanResponsibilityId] DEFAULT ((1)) FOR [RoutePlanResponsibilityId]
- GO
- ALTER TABLE [dbo].[RoutePlan] ADD CONSTRAINT [DF_RoutePlan_IsPostApproval] DEFAULT ((0)) FOR [IsPostApproval]
- GO
- ALTER TABLE [dbo].[RoutePlan] ADD CONSTRAINT [DF_RoutePlan_Deleted] DEFAULT ((0)) FOR [Deleted]
- GO
- ALTER TABLE [dbo].[RoutePlan] WITH CHECK ADD CONSTRAINT [FK_RoutePlan_Form] FOREIGN KEY([FormId])
- REFERENCES [dbo].[Form] ([FormId])
- GO
- ALTER TABLE [dbo].[RoutePlan] CHECK CONSTRAINT [FK_RoutePlan_Form]
- GO
- ALTER TABLE [dbo].[RoutePlan] WITH NOCHECK ADD CONSTRAINT [FK_RoutePlan_RoutePlanResponsibility] FOREIGN KEY([RoutePlanResponsibilityId])
- REFERENCES [dbo].[RoutePlanResponsibility] ([RoutePlanResponsibilityId])
- GO
- ALTER TABLE [dbo].[RoutePlan] CHECK CONSTRAINT [FK_RoutePlan_RoutePlanResponsibility]
- GO
- ALTER TABLE [dbo].[RoutePlan] WITH CHECK ADD CONSTRAINT [FK_RoutePlan_RoutePlanStatus] FOREIGN KEY([RoutePlanStatusId])
- REFERENCES [dbo].[RoutePlanStatus] ([RoutePlanStatusId])
- GO
- ALTER TABLE [dbo].[RoutePlan] CHECK CONSTRAINT [FK_RoutePlan_RoutePlanStatus]
- GO
- ALTER TABLE [dbo].[RoutePlan] WITH CHECK ADD CONSTRAINT [FK_RoutePlan_UserInfo] FOREIGN KEY([UserId])
- REFERENCES [dbo].[UserInfo] ([login_id])
- GO
- ALTER TABLE [dbo].[RoutePlan] CHECK CONSTRAINT [FK_RoutePlan_UserInfo]
- GO
- USE [eForms]
- GO
- /****** Object: Table [dbo].[Form] Script Date: 9/25/2014 12:37:50 PM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- SET ANSI_PADDING ON
- GO
- CREATE TABLE [dbo].[Form](
- [FormId] [int] IDENTITY(1,1) NOT NULL,
- [TypeId] [int] NOT NULL,
- [EmployeeIndex] [int] NULL,
- [NonEmployeeName] [varchar](500) NULL,
- [FormStatusId] [int] NOT NULL,
- [PreviousFormId] [int] NULL,
- [ClosedDate] [datetime] NULL,
- [ExecutedById] [int] NULL,
- [ExecutedDate] [datetime] NULL,
- [Deleted] [bit] NOT NULL,
- [CreatedById] [int] NOT NULL,
- [CreatedDate] [datetime] NOT NULL,
- [ModifiedById] [int] NULL,
- [ModifiedDate] [datetime] NULL,
- [RegionCode] [varchar](4) NULL,
- [HiddenFromEmployee] [bit] NULL,
- CONSTRAINT [PK_Forms] PRIMARY KEY CLUSTERED
- (
- [FormId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- SET ANSI_PADDING OFF
- GO
- ALTER TABLE [dbo].[Form] ADD CONSTRAINT [DF_Form_Deleted] DEFAULT ((0)) FOR [Deleted]
- GO
- ALTER TABLE [dbo].[Form] ADD CONSTRAINT [DF_Form_HiddenFromEmployee] DEFAULT ((0)) FOR [HiddenFromEmployee]
- GO
- ALTER TABLE [dbo].[Form] WITH CHECK ADD CONSTRAINT [FK_Form_Form1] FOREIGN KEY([PreviousFormId])
- REFERENCES [dbo].[Form] ([FormId])
- GO
- ALTER TABLE [dbo].[Form] CHECK CONSTRAINT [FK_Form_Form1]
- GO
- ALTER TABLE [dbo].[Form] WITH CHECK ADD CONSTRAINT [FK_Form_FormStatus] FOREIGN KEY([FormStatusId])
- REFERENCES [dbo].[FormStatus] ([FormStatusId])
- GO
- ALTER TABLE [dbo].[Form] CHECK CONSTRAINT [FK_Form_FormStatus]
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement