Skip to content

Instantly share code, notes, and snippets.

@dampee

dampee/updatescript

Created May 29, 2020
Embed
What would you like to do?
Custom tables from OUR umbraco
GO
/****** Object: Schema [HangFire] Script Date: 19-May-20 16:26:21 ******/
CREATE SCHEMA [HangFire]
GO
/****** Object: Table [dbo].[cmsTagToTopic] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[cmsTagToTopic](
[id] [int] IDENTITY(1,1) NOT NULL,
[tagId] [int] NOT NULL,
[topicId] [int] NOT NULL,
[weight] [float] NOT NULL,
CONSTRAINT [PK_cmsTagToTopic] PRIMARY KEY CLUSTERED
(
[id] 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
/****** Object: Table [dbo].[DeliMemberLicense] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DeliMemberLicense](
[Id] [int] IDENTITY(1,1) NOT NULL,
[LicenseId] [int] NOT NULL,
[MemberId] [int] NOT NULL,
[OrderItemId] [int] NOT NULL,
[ListingItemId] [int] NOT NULL,
[DevConfig] [text] NULL,
[StagingConfig] [text] NULL,
[ProductionConfig] [text] NULL,
[GeneratedLicense] [text] NULL,
[DateGenerated] [datetime] NULL,
[CreateDate] [datetime] NOT NULL,
[IsActive] [bit] NOT NULL,
[MemberGuid] [uniqueidentifier] NULL,
[ListingItemGuid] [uniqueidentifier] NULL,
CONSTRAINT [PK_DeliMemberLicense] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[DeliMemberOrder] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DeliMemberOrder](
[Id] [int] IDENTITY(50000,1) NOT NULL,
[EcomOrderId] [int] NULL,
[MemberId] [int] NULL,
[CompanyName] [nvarchar](500) NULL,
[CompanyAddress] [text] NULL,
[CompanyCountry] [nvarchar](500) NULL,
[CompanyInvoiceEmail] [nvarchar](800) NULL,
[CreateDate] [datetime] NULL,
[PaymentDate] [datetime] NULL,
[Status] [nvarchar](100) NULL,
[TransationId] [nvarchar](200) NULL,
[IsRefunded] [bit] NULL,
[RefundDate] [datetime] NULL,
[TaxTotal] [money] NULL,
[SubTotal] [money] NULL,
[Total] [money] NULL,
[Currency] [nvarchar](50) NULL,
[ProcessedTotal] [money] NULL,
[ProcessedRate] [decimal](18, 8) NULL,
[IP] [nvarchar](50) NULL,
[MemberGuid] [uniqueidentifier] NULL,
CONSTRAINT [PK_Order] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[DeliMemberOrderItem] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DeliMemberOrderItem](
[id] [int] IDENTITY(1,1) NOT NULL,
[OrderId] [int] NOT NULL,
[LicenseId] [int] NOT NULL,
[Quantity] [int] NOT NULL,
[GrossPrice] [money] NULL,
[NetPrice] [money] NULL,
[CouponId] [int] NULL,
[ListingItemId] [int] NOT NULL,
[IsRefunded] [bit] NULL,
[RefundDate] [datetime] NULL,
[CreateDate] [datetime] NOT NULL,
[ListingItemGuid] [uniqueidentifier] NULL,
[IsPaidOut] [bit] NULL,
[PaidOutDate] [datetime] NULL,
[PayoutId] [int] NULL,
CONSTRAINT [PK_DeliMemberOrderItem] PRIMARY KEY CLUSTERED
(
[id] 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
/****** Object: Table [dbo].[DeliOrderNote] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DeliOrderNote](
[id] [int] IDENTITY(1,1) NOT NULL,
[OrderId] [int] NOT NULL,
[MemberId] [int] NULL,
[OrderNoteDate] [datetime] NOT NULL,
[OrderNote] [ntext] NULL,
[MemberGuid] [uniqueidentifier] NULL,
CONSTRAINT [PK_DeliOrderNote] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[DeliPayout] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DeliPayout](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Guid] [uniqueidentifier] NOT NULL,
[VendorId] [int] NOT NULL,
[VendorRef] [text] NULL,
[PayoutDate] [datetime] NULL,
[Processed] [bit] NOT NULL,
[ProcessedDate] [datetime] NULL,
CONSTRAINT [PK_DeliPayout] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[DeliProjectLicense] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DeliProjectLicense](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ProjectID] [uniqueidentifier] NOT NULL,
[LicenseType] [nvarchar](50) NOT NULL,
[Price] [money] NOT NULL,
[IsActive] [bit] NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[DeliProjectViews] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DeliProjectViews](
[Id] [int] IDENTITY(1,1) NOT NULL,
[ProjectId] [int] NOT NULL,
[CreateDate] [datetime] NOT NULL,
[ProjectGuid] [uniqueidentifier] NULL,
CONSTRAINT [PK_DeliProjectViews] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[DeliVersionCompatibility] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DeliVersionCompatibility](
[id] [int] IDENTITY(1,1) NOT NULL,
[fileId] [int] NOT NULL,
[memberId] [int] NOT NULL,
[projectId] [int] NOT NULL,
[version] [nvarchar](255) NOT NULL,
[isCompatible] [bit] NOT NULL,
[dateStamp] [datetime] NOT NULL,
CONSTRAINT [PK_DeliVersionCompatibility] PRIMARY KEY CLUSTERED
(
[id] 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
/****** Object: Table [dbo].[forumComments] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[forumComments](
[id] [int] IDENTITY(1,1) NOT NULL,
[topicId] [int] NOT NULL,
[memberId] [int] NOT NULL,
[body] [ntext] NOT NULL,
[created] [datetime] NOT NULL,
[score] [int] NOT NULL,
[position] [int] NULL,
[isSpam] [bit] NULL,
[parentCommentId] [int] NOT NULL,
[haschildren] [bit] NOT NULL,
CONSTRAINT [PK_forumComments] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[forumForums] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[forumForums](
[id] [int] NOT NULL,
[latestTopic] [int] NOT NULL,
[latestComment] [int] NOT NULL,
[totalTopics] [int] NOT NULL,
[totalComments] [int] NOT NULL,
[latestAuthor] [int] NOT NULL,
[latestPostDate] [datetime] NOT NULL,
[sortOrder] [int] NOT NULL,
[parentId] [int] NOT NULL,
CONSTRAINT [PK_forumForums] PRIMARY KEY CLUSTERED
(
[id] 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
/****** Object: Table [dbo].[forumRights] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[forumRights](
[id] [int] IDENTITY(1,1) NOT NULL,
[memberId] [int] NOT NULL,
[forumId] [int] NOT NULL,
[rights] [nvarchar](250) NOT NULL,
CONSTRAINT [PK_forumRights] PRIMARY KEY CLUSTERED
(
[id] 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
/****** Object: Table [dbo].[forumSubscribers] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[forumSubscribers](
[forumId] [int] NOT NULL,
[memberId] [int] NOT NULL,
CONSTRAINT [PK_forumSubscribers] PRIMARY KEY CLUSTERED
(
[forumId] ASC,
[memberId] 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
/****** Object: Table [dbo].[forumTopics] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[forumTopics](
[id] [int] IDENTITY(1,1) NOT NULL,
[parentId] [int] NOT NULL,
[memberId] [int] NOT NULL,
[title] [nvarchar](130) NOT NULL,
[body] [ntext] NOT NULL,
[created] [datetime] NOT NULL,
[updated] [datetime] NOT NULL,
[locked] [bit] NOT NULL,
[latestReplyAuthor] [int] NOT NULL,
[replies] [int] NOT NULL,
[score] [int] NOT NULL,
[urlName] [nvarchar](130) NOT NULL,
[answer] [int] NOT NULL,
[latestComment] [int] NULL,
[isSpam] [bit] NULL,
[version] [int] NOT NULL,
[markAsSolutionReminderSent] [bit] NULL,
CONSTRAINT [PK_forumTopics] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[forumTopicSubscribers] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[forumTopicSubscribers](
[topicId] [int] NOT NULL,
[memberId] [int] NOT NULL,
CONSTRAINT [PK_forumTopicSubscribers] PRIMARY KEY CLUSTERED
(
[topicId] ASC,
[memberId] 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
/****** Object: Table [dbo].[GitHubAutoReplies] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GitHubAutoReplies](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Repository] [nvarchar](255) NOT NULL,
[Number] [int] NOT NULL,
[Type] [int] NOT NULL,
[CommentId] [bigint] NOT NULL,
[CreateDate] [datetime] NOT NULL,
CONSTRAINT [PK_GitHubAutoReplies] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[icUrlTracker] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[icUrlTracker](
[Id] [int] IDENTITY(1,1) NOT NULL,
[OldUrl] [nvarchar](1000) NULL,
[OldUrlQueryString] [nvarchar](1000) NULL,
[OldRegex] [nvarchar](1000) NULL,
[RedirectRootNodeId] [int] NULL,
[RedirectNodeId] [int] NULL,
[RedirectUrl] [nvarchar](1000) NULL,
[RedirectHttpCode] [int] NOT NULL,
[RedirectPassThroughQueryString] [bit] NOT NULL,
[ForceRedirect] [bit] NOT NULL,
[Notes] [nvarchar](1000) NULL,
[Is404] [bit] NOT NULL,
[Referrer] [nvarchar](1000) NULL,
[Inserted] [datetime] NOT NULL,
CONSTRAINT [PK_icUrlTracker] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[notificationMarkAsSolution] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[notificationMarkAsSolution](
[topicId] [int] NOT NULL,
[memberId] [int] NOT NULL,
[timestamp] [datetime] NOT NULL,
CONSTRAINT [PK_notificationMarkAsSolution] PRIMARY KEY CLUSTERED
(
[topicId] 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
/****** Object: Table [dbo].[notificationVoteForProject] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[notificationVoteForProject](
[projectId] [int] NOT NULL,
[memberId] [int] NOT NULL,
[timestamp] [datetime] NOT NULL,
CONSTRAINT [PK_notificationVoteForProject] PRIMARY KEY CLUSTERED
(
[projectId] ASC,
[memberId] 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
/****** Object: Table [dbo].[powersComment] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[powersComment](
[id] [int] NOT NULL,
[points] [int] NOT NULL,
[memberId] [int] NOT NULL,
[date] [datetime] NULL,
[receiverId] [int] NULL,
[receiverPoints] [int] NULL,
[performerPoints] [int] NULL,
[comment] [nvarchar](300) NULL,
CONSTRAINT [PK_powersComment] PRIMARY KEY CLUSTERED
(
[id] ASC,
[memberId] 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
/****** Object: Table [dbo].[powersProject] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[powersProject](
[id] [int] NOT NULL,
[points] [int] NOT NULL,
[memberId] [int] NOT NULL,
[date] [datetime] NULL,
[receiverId] [int] NOT NULL,
[receiverPoints] [int] NULL,
[performerPoints] [int] NULL,
[comment] [nvarchar](300) NULL,
CONSTRAINT [PK_powersProject] PRIMARY KEY CLUSTERED
(
[id] ASC,
[memberId] ASC,
[receiverId] 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
/****** Object: Table [dbo].[powersProjectVersion] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[powersProjectVersion](
[id] [int] NOT NULL,
[points] [int] NOT NULL,
[memberId] [int] NOT NULL,
[date] [datetime] NULL,
[receiverId] [int] NOT NULL,
[receiverPoints] [int] NULL,
[performerPoints] [int] NULL,
[comment] [nvarchar](300) NULL,
CONSTRAINT [PK_powersProjectVersion] PRIMARY KEY CLUSTERED
(
[id] ASC,
[memberId] ASC,
[receiverId] 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
/****** Object: Table [dbo].[powersTopic] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[powersTopic](
[id] [int] NOT NULL,
[points] [int] NOT NULL,
[memberId] [int] NOT NULL,
[date] [datetime] NULL,
[receiverId] [int] NULL,
[receiverPoints] [int] NULL,
[performerPoints] [int] NULL,
[comment] [nvarchar](300) NULL,
CONSTRAINT [PK_powersTopic] PRIMARY KEY CLUSTERED
(
[id] ASC,
[memberId] 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
/****** Object: Table [dbo].[powersWiki] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[powersWiki](
[id] [int] NOT NULL,
[points] [int] NOT NULL,
[memberId] [int] NOT NULL,
[date] [datetime] NULL,
[receiverId] [int] NULL,
[receiverPoints] [int] NULL,
[performerPoints] [int] NULL,
[comment] [nvarchar](300) NULL,
CONSTRAINT [PK_powersWiki] PRIMARY KEY CLUSTERED
(
[id] ASC,
[memberId] 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
/****** Object: Table [dbo].[projectContributors] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[projectContributors](
[projectId] [int] NOT NULL,
[memberId] [int] NOT NULL,
CONSTRAINT [PK_projectContributors] PRIMARY KEY CLUSTERED
(
[projectId] ASC,
[memberId] 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
/****** Object: Table [dbo].[projectDownload] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[projectDownload](
[projectId] [int] NOT NULL,
[memberId] [int] NOT NULL,
[timestamp] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[tblPoll] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblPoll](
[id] [int] IDENTITY(1,1) NOT NULL,
[memberid] [int] NULL,
[pollid] [int] NULL,
[answer] [nvarchar](500) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[UCUserSettings] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UCUserSettings](
[User] [nvarchar](50) NOT NULL,
[Key] [nvarchar](250) NOT NULL,
[Value] [nvarchar](2500) NULL,
CONSTRAINT [PK_UCUserSettings] PRIMARY KEY CLUSTERED
(
[User] ASC,
[Key] 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
/****** Object: Table [dbo].[UFDataSourceMappings] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFDataSourceMappings](
[DataSource] [uniqueidentifier] NOT NULL,
[DataSourceField] [nvarchar](250) NOT NULL,
[Form] [uniqueidentifier] NOT NULL,
[PrevalueTable] [nvarchar](250) NULL,
[PrevalueKeyField] [nvarchar](250) NULL,
[PrevalueValueField] [nvarchar](250) NULL,
[DataType] [int] NULL,
[DefaultValue] [nvarchar](max) NULL,
CONSTRAINT [PK_UFDataSourceMappings] PRIMARY KEY CLUSTERED
(
[DataSource] ASC,
[DataSourceField] ASC,
[Form] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[UFDataSources] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFDataSources](
[Id] [uniqueidentifier] NOT NULL,
[Type] [uniqueidentifier] NULL,
[Name] [nvarchar](250) NULL,
CONSTRAINT [PK_UFDataSources] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFFieldConditionRules] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFFieldConditionRules](
[Id] [uniqueidentifier] NOT NULL,
[FieldCondition] [uniqueidentifier] NOT NULL,
[Field] [uniqueidentifier] NOT NULL,
[Operator] [int] NOT NULL,
[Value] [nvarchar](250) NULL,
CONSTRAINT [PK_UFFieldConditionRules] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFFieldConditions] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFFieldConditions](
[Id] [uniqueidentifier] NOT NULL,
[Field] [uniqueidentifier] NOT NULL,
[Enabled] [bit] NOT NULL,
[ActionType] [int] NULL,
[LogicType] [int] NULL,
CONSTRAINT [PK_UFFieldConditions] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFFields] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFFields](
[Id] [uniqueidentifier] NOT NULL,
[Fieldset] [uniqueidentifier] NOT NULL,
[Fieldtype] [uniqueidentifier] NOT NULL,
[PreValueProvider] [uniqueidentifier] NULL,
[RegEx] [nvarchar](500) NULL,
[Mandatory] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[Caption] [nvarchar](250) NOT NULL,
[DataSourceField] [nvarchar](250) NULL,
[ToolTip] [nvarchar](250) NULL,
[DefaultValue] [nvarchar](250) NULL,
[RequiredErrorMessage] [nvarchar](250) NULL,
[InvalidErrorMessage] [nvarchar](250) NULL,
CONSTRAINT [PK_UFField] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFFieldsets] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFFieldsets](
[Id] [uniqueidentifier] NOT NULL,
[Page] [uniqueidentifier] NOT NULL,
[SortOrder] [int] NOT NULL,
[Caption] [nvarchar](250) NULL,
CONSTRAINT [PK_UFFieldsets] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFFieldSettings] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFFieldSettings](
[Field] [uniqueidentifier] NULL,
[Key] [nvarchar](250) NULL,
[Value] [nvarchar](250) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[UFForms] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFForms](
[Id] [uniqueidentifier] NOT NULL,
[Name] [nvarchar](100) NOT NULL,
[Created] [datetime] NOT NULL,
[ManualApproval] [bit] NOT NULL,
[GotoPageOnSubmit] [int] NOT NULL,
[MessageOnSubmit] [nvarchar](500) NULL,
[DataSource] [uniqueidentifier] NULL,
[ShowValidationSummary] [bit] NOT NULL,
[HideFieldValidation] [bit] NOT NULL,
[RequiredErrorMessage] [nvarchar](500) NULL,
[InvalidErrorMessage] [nvarchar](500) NULL,
[FieldIndicationType] [int] NULL,
[Indicator] [nvarchar](500) NULL,
[Archived] [bit] NOT NULL,
[StoreRecordsLocally] [bit] NOT NULL,
[DisableDefaultStylesheet] [bit] NOT NULL,
[Entries] [int] NOT NULL,
[Views] [int] NOT NULL,
CONSTRAINT [PK_UFForms] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFFormStates] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFFormStates](
[State] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_UFFormStates] PRIMARY KEY CLUSTERED
(
[State] 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
/****** Object: Table [dbo].[UFPages] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFPages](
[Id] [uniqueidentifier] NOT NULL,
[Form] [uniqueidentifier] NOT NULL,
[SortOrder] [int] NOT NULL,
[Caption] [nvarchar](255) NOT NULL,
CONSTRAINT [PK_UFPages] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFPrevalues] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFPrevalues](
[Id] [uniqueidentifier] NOT NULL,
[Field] [uniqueidentifier] NOT NULL,
[Value] [nvarchar](250) NOT NULL,
[SortOrder] [int] NULL,
CONSTRAINT [PK_UFPrevalues] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFPrevalueSources] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFPrevalueSources](
[Id] [uniqueidentifier] NOT NULL,
[Name] [nvarchar](200) NULL,
[Type] [uniqueidentifier] NULL,
CONSTRAINT [PK_UFPrevalueProviders] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFPrevalueSourceSettings] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFPrevalueSourceSettings](
[PrevalueProvider] [uniqueidentifier] NOT NULL,
[Key] [nvarchar](250) NOT NULL,
[Value] [nvarchar](250) NULL,
CONSTRAINT [PK_UFPrevalueSettings] PRIMARY KEY CLUSTERED
(
[PrevalueProvider] ASC,
[Key] 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
/****** Object: Table [dbo].[UFRecordDataBit] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFRecordDataBit](
[Key] [uniqueidentifier] NOT NULL,
[Value] [bit] NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[UFRecordDataDateTime] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFRecordDataDateTime](
[Key] [uniqueidentifier] NOT NULL,
[Value] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[UFRecordDataInteger] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFRecordDataInteger](
[Key] [uniqueidentifier] NOT NULL,
[Value] [int] NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[UFRecordDataLongString] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFRecordDataLongString](
[Key] [uniqueidentifier] NOT NULL,
[Value] [ntext] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[UFRecordDataString] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFRecordDataString](
[Key] [uniqueidentifier] NOT NULL,
[Value] [nvarchar](500) NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[UFRecordFields] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFRecordFields](
[Key] [uniqueidentifier] NOT NULL,
[Field] [uniqueidentifier] NOT NULL,
[Record] [uniqueidentifier] NOT NULL,
[DataType] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_UFRecordFields] PRIMARY KEY CLUSTERED
(
[Key] 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
/****** Object: Table [dbo].[UFRecords] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFRecords](
[Id] [uniqueidentifier] NOT NULL,
[Form] [uniqueidentifier] NOT NULL,
[Created] [datetime] NOT NULL,
[Updated] [datetime] NOT NULL,
[State] [int] NULL,
[currentPage] [uniqueidentifier] NULL,
[umbracoPageId] [int] NOT NULL,
[IP] [nvarchar](50) NULL,
[MemberKey] [nvarchar](200) NULL,
CONSTRAINT [PK_UFRecords] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFRecordsXml] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFRecordsXml](
[id] [uniqueidentifier] NOT NULL,
[Form] [uniqueidentifier] NOT NULL,
[xml] [ntext] NOT NULL,
[created] [datetime] NOT NULL,
[Page] [int] NOT NULL,
CONSTRAINT [PK_UFRecordsXml] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[UFSettings] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFSettings](
[Id] [uniqueidentifier] NOT NULL,
[Key] [nvarchar](250) NOT NULL,
[Value] [nvarchar](2500) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[UFUserFormSecurity] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFUserFormSecurity](
[User] [nvarchar](50) NOT NULL,
[Form] [uniqueidentifier] NOT NULL,
[HasAccess] [bit] NOT NULL,
[SecurityType] [int] NOT NULL,
[AllowInEditor] [bit] NOT NULL,
CONSTRAINT [PK_UFUserFormSecurity] PRIMARY KEY CLUSTERED
(
[User] ASC,
[Form] 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
/****** Object: Table [dbo].[UFUserSecurity] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFUserSecurity](
[User] [nvarchar](50) NOT NULL,
[ManageDataSources] [bit] NOT NULL,
[ManagePreValueSources] [bit] NOT NULL,
[ManageWorkflows] [bit] NOT NULL,
[ManageForms] [bit] NOT NULL,
CONSTRAINT [PK_UFUserSecurity] PRIMARY KEY CLUSTERED
(
[User] 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
/****** Object: Table [dbo].[UFWorkflowExecutionStates] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFWorkflowExecutionStates](
[Workflow] [uniqueidentifier] NOT NULL,
[State] [nvarchar](50) NOT NULL,
[Form] [uniqueidentifier] NOT NULL,
CONSTRAINT [PK_UFWorkflowExecutionStates] PRIMARY KEY CLUSTERED
(
[Workflow] ASC,
[State] ASC,
[Form] 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
/****** Object: Table [dbo].[UFWorkflows] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFWorkflows](
[Id] [uniqueidentifier] NOT NULL,
[Name] [nvarchar](250) NOT NULL,
[Type] [uniqueidentifier] NOT NULL,
[SortOrder] [int] NOT NULL,
[Active] [bit] NOT NULL,
[Form] [uniqueidentifier] NOT NULL,
[ExecutesOn] [int] NULL,
CONSTRAINT [PK_UFWorkflows] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [dbo].[UFWorkflowsToForms] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UFWorkflowsToForms](
[Workflow] [uniqueidentifier] NOT NULL,
[Form] [uniqueidentifier] NOT NULL,
CONSTRAINT [PK_UFWorkflowsToForms] PRIMARY KEY CLUSTERED
(
[Workflow] ASC,
[Form] 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
/****** Object: Table [dbo].[umbracoStatEntry] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[umbracoStatEntry](
[SessionId] [int] NOT NULL,
[EntryTime] [datetime] NOT NULL,
[RefNodeId] [int] NOT NULL,
[NodeId] [int] NOT NULL,
CONSTRAINT [PK_umbracoStatEntry] PRIMARY KEY CLUSTERED
(
[SessionId] ASC,
[EntryTime] ASC,
[RefNodeId] ASC,
[NodeId] 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
/****** Object: Table [dbo].[umbracoStatSession] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[umbracoStatSession](
[id] [int] IDENTITY(1,1) NOT NULL,
[MemberId] [uniqueidentifier] NULL,
[NewsletterId] [int] NULL,
[ReturningUser] [bit] NOT NULL,
[SessionStart] [datetime] NOT NULL,
[SessionEnd] [datetime] NULL,
[Language] [nvarchar](20) NOT NULL,
[UserAgent] [nvarchar](255) NOT NULL,
[Browser] [nvarchar](255) NOT NULL,
[BrowserVersion] [nvarchar](20) NOT NULL,
[OperatingSystem] [nvarchar](50) NOT NULL,
[Ip] [nvarchar](50) NOT NULL,
[Referrer] [nvarchar](255) NOT NULL,
[ReferrerKeyword] [nvarchar](255) NOT NULL,
[allowCookies] [bit] NOT NULL,
[visitorId] [char](36) NULL,
[browserType] [nvarchar](255) NULL,
[isHuman] [bit] NULL,
CONSTRAINT [PK_umbracoStartSession] PRIMARY KEY CLUSTERED
(
[id] 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
/****** Object: Table [dbo].[umbracoStylesheet] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[umbracoStylesheet](
[nodeId] [int] NOT NULL,
[filename] [nvarchar](100) NOT NULL,
[content] [ntext] NULL,
CONSTRAINT [PK_umbracoStylesheet] PRIMARY KEY CLUSTERED
(
[nodeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[umbracoStylesheetProperty] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[umbracoStylesheetProperty](
[id] [smallint] IDENTITY(1,1) NOT NULL,
[stylesheetPropertyEditor] [bit] NOT NULL,
[stylesheet] [tinyint] NOT NULL,
[stylesheetPropertyAlias] [nvarchar](50) NULL,
[stylesheetPropertyName] [nvarchar](255) NULL,
[stylesheetPropertyValue] [nvarchar](400) NULL,
CONSTRAINT [PK_stylesheetProperty] PRIMARY KEY CLUSTERED
(
[id] 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
/****** Object: Table [dbo].[wikiFiles] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[wikiFiles](
[id] [int] IDENTITY(1,1) NOT NULL,
[name] [nvarchar](100) NULL,
[path] [nvarchar](200) NULL,
[type] [nvarchar](50) NULL,
[version] [uniqueidentifier] NULL,
[createdBy] [int] NULL,
[nodeId] [int] NULL,
[createDate] [datetime] NULL,
[current] [bit] NULL,
[removedBy] [int] NULL,
[downloads] [int] NULL,
[archived] [bit] NULL,
[umbracoVersion] [nvarchar](255) NOT NULL,
[verified] [bit] NOT NULL,
[dotNetVersion] [nvarchar](5) NULL,
[supportsMediumTrust] [bit] NULL,
[minimumVersionStrict] [varchar](50) NULL,
CONSTRAINT [PK_wikiFiles] PRIMARY KEY CLUSTERED
(
[id] 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
/****** Object: Table [dbo].[wikiHelpRequest] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[wikiHelpRequest](
[section] [nvarchar](50) NOT NULL,
[application] [nvarchar](50) NULL,
[applicationPage] [nvarchar](500) NOT NULL,
[url] [nvarchar](500) NOT NULL,
[requested] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[YafMigrationIds] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[YafMigrationIds](
[yafId] [int] NOT NULL,
[umbId] [int] NOT NULL,
CONSTRAINT [PK_YafMigrationIds] PRIMARY KEY CLUSTERED
(
[yafId] ASC,
[umbId] 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
/****** Object: Table [HangFire].[AggregatedCounter] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[AggregatedCounter](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Key] [nvarchar](100) NOT NULL,
[Value] [bigint] NOT NULL,
[ExpireAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_CounterAggregated] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [HangFire].[Counter] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[Counter](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Key] [nvarchar](100) NOT NULL,
[Value] [smallint] NOT NULL,
[ExpireAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_Counter] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [HangFire].[Hash] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[Hash](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Key] [nvarchar](100) NOT NULL,
[Field] [nvarchar](100) NOT NULL,
[Value] [nvarchar](max) NULL,
[ExpireAt] [datetime2](7) NULL,
CONSTRAINT [PK_HangFire_Hash] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [HangFire].[Job] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[Job](
[Id] [int] IDENTITY(1,1) NOT NULL,
[StateId] [int] NULL,
[StateName] [nvarchar](20) NULL,
[InvocationData] [nvarchar](max) NOT NULL,
[Arguments] [nvarchar](max) NOT NULL,
[CreatedAt] [datetime] NOT NULL,
[ExpireAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_Job] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [HangFire].[JobParameter] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[JobParameter](
[Id] [int] IDENTITY(1,1) NOT NULL,
[JobId] [int] NOT NULL,
[Name] [nvarchar](40) NOT NULL,
[Value] [nvarchar](max) NULL,
CONSTRAINT [PK_HangFire_JobParameter] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [HangFire].[JobQueue] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[JobQueue](
[Id] [int] IDENTITY(1,1) NOT NULL,
[JobId] [int] NOT NULL,
[Queue] [nvarchar](50) NOT NULL,
[FetchedAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_JobQueue] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [HangFire].[List] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[List](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Key] [nvarchar](100) NOT NULL,
[Value] [nvarchar](max) NULL,
[ExpireAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_List] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [HangFire].[Schema] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[Schema](
[Version] [int] NOT NULL,
CONSTRAINT [PK_HangFire_Schema] PRIMARY KEY CLUSTERED
(
[Version] 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
/****** Object: Table [HangFire].[Server] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[Server](
[Id] [nvarchar](100) NOT NULL,
[Data] [nvarchar](max) NULL,
[LastHeartbeat] [datetime] NOT NULL,
CONSTRAINT [PK_HangFire_Server] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [HangFire].[Set] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[Set](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Key] [nvarchar](100) NOT NULL,
[Score] [float] NOT NULL,
[Value] [nvarchar](256) NOT NULL,
[ExpireAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_Set] PRIMARY KEY CLUSTERED
(
[Id] 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
/****** Object: Table [HangFire].[State] Script Date: 19-May-20 16:26:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HangFire].[State](
[Id] [int] IDENTITY(1,1) NOT NULL,
[JobId] [int] NOT NULL,
[Name] [nvarchar](20) NOT NULL,
[Reason] [nvarchar](100) NULL,
[CreatedAt] [datetime] NOT NULL,
[Data] [nvarchar](max) NULL,
CONSTRAINT [PK_HangFire_State] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[cmsContentType] ADD CONSTRAINT [DF_cmsContentType_thumbnail] DEFAULT ('folder.png') FOR [thumbnail]
GO
ALTER TABLE [dbo].[cmsContentType] ADD CONSTRAINT [DF_cmsContentType_isContainer] DEFAULT ('0') FOR [isContainer]
GO
ALTER TABLE [dbo].[cmsContentType] ADD CONSTRAINT [DF_cmsContentType_allowAtRoot] DEFAULT ('0') FOR [allowAtRoot]
GO
ALTER TABLE [dbo].[cmsContentTypeAllowedContentType] ADD CONSTRAINT [DF_cmsContentTypeAllowedContentType_sortOrder] DEFAULT ('1') FOR [sortOrder]
GO
ALTER TABLE [dbo].[cmsContentVersion] ADD CONSTRAINT [DF_cmsContentVersion_VersionDate] DEFAULT (getdate()) FOR [VersionDate]
GO
ALTER TABLE [dbo].[cmsDocument] ADD CONSTRAINT [DF_cmsDocument_updateDate] DEFAULT (getdate()) FOR [updateDate]
GO
ALTER TABLE [dbo].[cmsDocument] ADD CONSTRAINT [DF_cmsDocument_newest] DEFAULT ((0)) FOR [newest]
GO
ALTER TABLE [dbo].[cmsDocumentType] ADD CONSTRAINT [DF_cmsDocumentType_IsDefault] DEFAULT ((0)) FOR [IsDefault]
GO
ALTER TABLE [dbo].[cmsMacro] ADD CONSTRAINT [DF_macro_macroUseInEditor] DEFAULT ((0)) FOR [macroUseInEditor]
GO
ALTER TABLE [dbo].[cmsMacro] ADD CONSTRAINT [DF_macro_macroRefreshRate] DEFAULT ((0)) FOR [macroRefreshRate]
GO
ALTER TABLE [dbo].[cmsMacro] ADD CONSTRAINT [DF_cmsMacro_macroCacheByPage] DEFAULT ((1)) FOR [macroCacheByPage]
GO
ALTER TABLE [dbo].[cmsMacro] ADD CONSTRAINT [DF_cmsMacro_macroCachePersonalized] DEFAULT ((0)) FOR [macroCachePersonalized]
GO
ALTER TABLE [dbo].[cmsMacro] ADD CONSTRAINT [DF_cmsMacro_macroDontRender] DEFAULT ((0)) FOR [macroDontRender]
GO
ALTER TABLE [dbo].[cmsMacroProperty] ADD CONSTRAINT [DF_macroProperty_macroPropertySortOrder] DEFAULT ((0)) FOR [macroPropertySortOrder]
GO
ALTER TABLE [dbo].[cmsMember] ADD CONSTRAINT [DF_cmsMember_Email] DEFAULT ('') FOR [Email]
GO
ALTER TABLE [dbo].[cmsMember] ADD CONSTRAINT [DF_cmsMember_LoginName] DEFAULT ('') FOR [LoginName]
GO
ALTER TABLE [dbo].[cmsMember] ADD CONSTRAINT [DF_cmsMember_Password] DEFAULT ('') FOR [Password]
GO
ALTER TABLE [dbo].[cmsMemberType] ADD CONSTRAINT [DF_cmsMemberType_memberCanEdit] DEFAULT ((0)) FOR [memberCanEdit]
GO
ALTER TABLE [dbo].[cmsMemberType] ADD CONSTRAINT [DF_cmsMemberType_viewOnProfile] DEFAULT ((0)) FOR [viewOnProfile]
GO
ALTER TABLE [dbo].[cmsMemberType] ADD CONSTRAINT [DF_cmsMemberType_isSensitive] DEFAULT ('0') FOR [isSensitive]
GO
ALTER TABLE [dbo].[cmsPropertyType] ADD CONSTRAINT [DF__cmsProper__sortO__1EA48E88] DEFAULT ((0)) FOR [sortOrder]
GO
ALTER TABLE [dbo].[cmsPropertyType] ADD CONSTRAINT [DF__cmsProper__manda__2180FB33] DEFAULT ((0)) FOR [mandatory]
GO
ALTER TABLE [dbo].[cmsPropertyType] ADD CONSTRAINT [DF_cmsPropertyType_uniqueID] DEFAULT (newid()) FOR [uniqueID]
GO
ALTER TABLE [dbo].[cmsPropertyTypeGroup] ADD CONSTRAINT [DF_cmsPropertyTypeGroup_uniqueID] DEFAULT (newid()) FOR [uniqueID]
GO
ALTER TABLE [dbo].[cmsTask] ADD CONSTRAINT [DF__cmsTask__closed__04E4BC85] DEFAULT ((0)) FOR [closed]
GO
ALTER TABLE [dbo].[cmsTask] ADD CONSTRAINT [DF__cmsTask__DateTim__05D8E0BE] DEFAULT (getdate()) FOR [DateTime]
GO
ALTER TABLE [dbo].[DeliMemberLicense] ADD CONSTRAINT [DF_DeliMemberLicense_IsActive] DEFAULT ((1)) FOR [IsActive]
GO
ALTER TABLE [dbo].[DeliPayout] ADD CONSTRAINT [DF_DeliPayout_Processed] DEFAULT ((0)) FOR [Processed]
GO
ALTER TABLE [dbo].[DeliVersionCompatibility] ADD CONSTRAINT [DF_DeliVersionCompatibility_dateStamp] DEFAULT (getdate()) FOR [dateStamp]
GO
ALTER TABLE [dbo].[forumComments] ADD CONSTRAINT [DF_forumComments_created] DEFAULT (getdate()) FOR [created]
GO
ALTER TABLE [dbo].[forumComments] ADD CONSTRAINT [DF_forumComments_score] DEFAULT ((0)) FOR [score]
GO
ALTER TABLE [dbo].[forumComments] ADD CONSTRAINT [DF_forumComment_isSpam] DEFAULT ((0)) FOR [isSpam]
GO
ALTER TABLE [dbo].[forumComments] ADD CONSTRAINT [DF_forumComments_parentCommentId] DEFAULT ((0)) FOR [parentCommentId]
GO
ALTER TABLE [dbo].[forumComments] ADD CONSTRAINT [DF_forumComments_hasChildren] DEFAULT ((0)) FOR [haschildren]
GO
ALTER TABLE [dbo].[forumForums] ADD CONSTRAINT [DF_forumForums_latestTopic] DEFAULT ((0)) FOR [latestTopic]
GO
ALTER TABLE [dbo].[forumForums] ADD CONSTRAINT [DF_forumForums_latestComment] DEFAULT ((0)) FOR [latestComment]
GO
ALTER TABLE [dbo].[forumForums] ADD CONSTRAINT [DF_forumForums_totalTopics] DEFAULT ((0)) FOR [totalTopics]
GO
ALTER TABLE [dbo].[forumForums] ADD CONSTRAINT [DF_forumForums_totalComments] DEFAULT ((0)) FOR [totalComments]
GO
ALTER TABLE [dbo].[forumForums] ADD CONSTRAINT [DF_forumForums_latestAuthor] DEFAULT ((0)) FOR [latestAuthor]
GO
ALTER TABLE [dbo].[forumForums] ADD CONSTRAINT [DF_forumForums_latestPostDate] DEFAULT (getdate()) FOR [latestPostDate]
GO
ALTER TABLE [dbo].[forumForums] ADD CONSTRAINT [DF_forumForums_sortOrder] DEFAULT ((0)) FOR [sortOrder]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_created] DEFAULT (getdate()) FOR [created]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_updated] DEFAULT (getdate()) FOR [updated]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_locked] DEFAULT ((0)) FOR [locked]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_latestReplyAuthor] DEFAULT ((0)) FOR [latestReplyAuthor]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_replies] DEFAULT ((0)) FOR [replies]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_score] DEFAULT ((0)) FOR [score]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_answer] DEFAULT ((0)) FOR [answer]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_latestComment] DEFAULT ((0)) FOR [latestComment]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_isSpam] DEFAULT ((0)) FOR [isSpam]
GO
ALTER TABLE [dbo].[forumTopics] ADD CONSTRAINT [DF_forumTopics_version] DEFAULT ((0)) FOR [version]
GO
ALTER TABLE [dbo].[forumTopics] ADD DEFAULT ((0)) FOR [markAsSolutionReminderSent]
GO
ALTER TABLE [dbo].[icUrlTracker] ADD DEFAULT ((301)) FOR [RedirectHttpCode]
GO
ALTER TABLE [dbo].[icUrlTracker] ADD DEFAULT ((1)) FOR [RedirectPassThroughQueryString]
GO
ALTER TABLE [dbo].[icUrlTracker] ADD DEFAULT ((0)) FOR [ForceRedirect]
GO
ALTER TABLE [dbo].[icUrlTracker] ADD DEFAULT ((0)) FOR [Is404]
GO
ALTER TABLE [dbo].[icUrlTracker] ADD DEFAULT (getdate()) FOR [Inserted]
GO
ALTER TABLE [dbo].[powersComment] ADD CONSTRAINT [DF_powersComment_Date] DEFAULT (getdate()) FOR [date]
GO
ALTER TABLE [dbo].[powersComment] ADD CONSTRAINT [DF_powersComment_performerPoints] DEFAULT ((0)) FOR [performerPoints]
GO
ALTER TABLE [dbo].[powersProject] ADD CONSTRAINT [DF_powersProject_Date] DEFAULT (getdate()) FOR [date]
GO
ALTER TABLE [dbo].[powersProjectVersion] ADD CONSTRAINT [DF_powersProjectVersion_Date] DEFAULT (getdate()) FOR [date]
GO
ALTER TABLE [dbo].[powersTopic] ADD CONSTRAINT [DF_powersTopic_Date] DEFAULT (getdate()) FOR [date]
GO
ALTER TABLE [dbo].[powersTopic] ADD CONSTRAINT [DF_powersTopic_performerPoints] DEFAULT ((0)) FOR [performerPoints]
GO
ALTER TABLE [dbo].[powersWiki] ADD CONSTRAINT [DF_powersWiki_date] DEFAULT (getdate()) FOR [date]
GO
ALTER TABLE [dbo].[powersWiki] ADD CONSTRAINT [DF_powersWiki_performerPoints] DEFAULT ((0)) FOR [performerPoints]
GO
ALTER TABLE [dbo].[projectDownload] ADD CONSTRAINT [DF_projectDownload_timestamp] DEFAULT (getdate()) FOR [timestamp]
GO
ALTER TABLE [dbo].[UFFields] ADD CONSTRAINT [DF_UFFields_Mandatory] DEFAULT ((0)) FOR [Mandatory]
GO
ALTER TABLE [dbo].[UFFields] ADD CONSTRAINT [DF_UFFields_SortOrder] DEFAULT ((0)) FOR [SortOrder]
GO
ALTER TABLE [dbo].[UFFieldsets] ADD CONSTRAINT [DF_UFFieldsets_SortOrder] DEFAULT ((0)) FOR [SortOrder]
GO
ALTER TABLE [dbo].[UFForms] ADD CONSTRAINT [DF_UFForms_Created] DEFAULT (getdate()) FOR [Created]
GO
ALTER TABLE [dbo].[UFForms] ADD CONSTRAINT [DF_UFForms_ManualApproval] DEFAULT ((0)) FOR [ManualApproval]
GO
ALTER TABLE [dbo].[UFForms] ADD CONSTRAINT [DF_UFForms_GotoPageOnSubmit] DEFAULT ((0)) FOR [GotoPageOnSubmit]
GO
ALTER TABLE [dbo].[UFForms] ADD CONSTRAINT [DF_UFForms_ShowValidationSummary] DEFAULT ((0)) FOR [ShowValidationSummary]
GO
ALTER TABLE [dbo].[UFForms] ADD CONSTRAINT [DF_UFForms_HideFieldValidation] DEFAULT ((0)) FOR [HideFieldValidation]
GO
ALTER TABLE [dbo].[UFForms] ADD DEFAULT ((0)) FOR [Archived]
GO
ALTER TABLE [dbo].[UFForms] ADD DEFAULT ((1)) FOR [StoreRecordsLocally]
GO
ALTER TABLE [dbo].[UFForms] ADD DEFAULT ((0)) FOR [DisableDefaultStylesheet]
GO
ALTER TABLE [dbo].[UFForms] ADD CONSTRAINT [DF_UFForms_Entries] DEFAULT ((0)) FOR [Entries]
GO
ALTER TABLE [dbo].[UFForms] ADD CONSTRAINT [DF_UFForms_Views] DEFAULT ((0)) FOR [Views]
GO
ALTER TABLE [dbo].[UFPages] ADD CONSTRAINT [DF_UFPages_SortOrder] DEFAULT ((0)) FOR [SortOrder]
GO
ALTER TABLE [dbo].[UFRecords] ADD CONSTRAINT [DF_UFRecords_Created] DEFAULT (getdate()) FOR [Created]
GO
ALTER TABLE [dbo].[UFRecords] ADD CONSTRAINT [DF_UFRecords_Updated] DEFAULT (getdate()) FOR [Updated]
GO
ALTER TABLE [dbo].[UFRecords] ADD CONSTRAINT [DF_UFRecords_umbracoPageId] DEFAULT ((0)) FOR [umbracoPageId]
GO
ALTER TABLE [dbo].[UFRecordsXml] ADD CONSTRAINT [DF_UFRecordsXml_created] DEFAULT (getdate()) FOR [created]
GO
ALTER TABLE [dbo].[UFRecordsXml] ADD CONSTRAINT [DF_UFRecordsXml_Page] DEFAULT ((0)) FOR [Page]
GO
ALTER TABLE [dbo].[UFWorkflows] ADD CONSTRAINT [DF_UFWorkflows_SortOrder] DEFAULT ((0)) FOR [SortOrder]
GO
ALTER TABLE [dbo].[UFWorkflows] ADD CONSTRAINT [DF_UFWorkflows_Active] DEFAULT ((0)) FOR [Active]
GO
ALTER TABLE [dbo].[umbracoAccess] ADD CONSTRAINT [DF_umbracoAccess_createDate] DEFAULT (getdate()) FOR [createDate]
GO
ALTER TABLE [dbo].[umbracoAccess] ADD CONSTRAINT [DF_umbracoAccess_updateDate] DEFAULT (getdate()) FOR [updateDate]
GO
ALTER TABLE [dbo].[umbracoAccessRule] ADD CONSTRAINT [DF_umbracoAccessRule_createDate] DEFAULT (getdate()) FOR [createDate]
GO
ALTER TABLE [dbo].[umbracoAccessRule] ADD CONSTRAINT [DF_umbracoAccessRule_updateDate] DEFAULT (getdate()) FOR [updateDate]
GO
ALTER TABLE [dbo].[umbracoAudit] ADD CONSTRAINT [DF_umbracoAudit_eventDateUtc] DEFAULT (getdate()) FOR [eventDateUtc]
GO
ALTER TABLE [dbo].[umbracoCacheInstruction] ADD CONSTRAINT [DF_umbracoCacheInstruction_instructionCount] DEFAULT ('1') FOR [instructionCount]
GO
ALTER TABLE [dbo].[umbracoConsent] ADD CONSTRAINT [DF_umbracoConsent_createDate] DEFAULT (getdate()) FOR [createDate]
GO
ALTER TABLE [dbo].[umbracoExternalLogin] ADD CONSTRAINT [DF_umbracoExternalLogin_createDate] DEFAULT (getdate()) FOR [createDate]
GO
ALTER TABLE [dbo].[umbracoLog] ADD CONSTRAINT [DF_umbracoLog_Datestamp] DEFAULT (getdate()) FOR [Datestamp]
GO
ALTER TABLE [dbo].[umbracoMigration] ADD CONSTRAINT [DF_umbracoMigration_createDate] DEFAULT (getdate()) FOR [createDate]
GO
ALTER TABLE [dbo].[umbracoNode] ADD CONSTRAINT [DF_umbracoNode_trashed] DEFAULT ((0)) FOR [trashed]
GO
ALTER TABLE [dbo].[umbracoNode] ADD CONSTRAINT [DF_umbracoNode_createDate] DEFAULT (getdate()) FOR [createDate]
GO
ALTER TABLE [dbo].[umbracoRelation] ADD CONSTRAINT [DF_umbracoRelation_datetime] DEFAULT (getdate()) FOR [datetime]
GO
ALTER TABLE [dbo].[umbracoServer] ADD CONSTRAINT [DF_umbracoServer_registeredDate] DEFAULT (getdate()) FOR [registeredDate]
GO
ALTER TABLE [dbo].[umbracoServer] ADD CONSTRAINT [DF_umbracoServer_isMaster] DEFAULT ('0') FOR [isMaster]
GO
ALTER TABLE [dbo].[umbracoStatSession] ADD CONSTRAINT [DF__umbracoSt__allow__22751F6C] DEFAULT ((0)) FOR [allowCookies]
GO
ALTER TABLE [dbo].[umbracoStatSession] ADD CONSTRAINT [DF__umbracoSt__isHum__7C4F7684] DEFAULT ((0)) FOR [isHuman]
GO
ALTER TABLE [dbo].[umbracoStylesheetProperty] ADD CONSTRAINT [DF_stylesheetProperty_stylesheetPropertyEditor] DEFAULT ((0)) FOR [stylesheetPropertyEditor]
GO
ALTER TABLE [dbo].[umbracoUser] ADD CONSTRAINT [DF_umbracoUser_userDisabled] DEFAULT ((0)) FOR [userDisabled]
GO
ALTER TABLE [dbo].[umbracoUser] ADD CONSTRAINT [DF_umbracoUser_userNoConsole] DEFAULT ((0)) FOR [userNoConsole]
GO
ALTER TABLE [dbo].[umbracoUser] ADD CONSTRAINT [DF_umbracoUser_createDate] DEFAULT (getdate()) FOR [createDate]
GO
ALTER TABLE [dbo].[umbracoUser] ADD CONSTRAINT [DF_umbracoUser_updateDate] DEFAULT (getdate()) FOR [updateDate]
GO
ALTER TABLE [dbo].[umbracoUserGroup] ADD CONSTRAINT [DF_umbracoUserGroup_createDate] DEFAULT (getdate()) FOR [createDate]
GO
ALTER TABLE [dbo].[umbracoUserGroup] ADD CONSTRAINT [DF_umbracoUserGroup_updateDate] DEFAULT (getdate()) FOR [updateDate]
GO
ALTER TABLE [dbo].[wikiFiles] ADD CONSTRAINT [DF_wikiFiles_createDate] DEFAULT (getdate()) FOR [createDate]
GO
ALTER TABLE [dbo].[wikiFiles] ADD CONSTRAINT [DF_wikiFiles_current] DEFAULT ((1)) FOR [current]
GO
ALTER TABLE [dbo].[wikiFiles] ADD CONSTRAINT [DF_wikiFiles_removedBy] DEFAULT ((0)) FOR [removedBy]
GO
ALTER TABLE [dbo].[wikiFiles] ADD CONSTRAINT [DF_wikiFiles_downloads] DEFAULT ((0)) FOR [downloads]
GO
ALTER TABLE [dbo].[wikiFiles] ADD CONSTRAINT [DF_wikiFiles_archived] DEFAULT ((0)) FOR [archived]
GO
ALTER TABLE [dbo].[wikiFiles] ADD CONSTRAINT [DF_wikiFiles_umbracoVersion] DEFAULT (N'v4') FOR [umbracoVersion]
GO
ALTER TABLE [dbo].[wikiFiles] ADD CONSTRAINT [DF_wikiFiles_verified] DEFAULT ((0)) FOR [verified]
GO
ALTER TABLE [dbo].[wikiHelpRequest] ADD CONSTRAINT [DF_wikiHelpRequest_requested] DEFAULT (getdate()) FOR [requested]
GO
ALTER TABLE [dbo].[cmsContent] WITH CHECK ADD CONSTRAINT [FK_cmsContent_cmsContentType_nodeId] FOREIGN KEY([contentType])
REFERENCES [dbo].[cmsContentType] ([nodeId])
GO
ALTER TABLE [dbo].[cmsContent] CHECK CONSTRAINT [FK_cmsContent_cmsContentType_nodeId]
GO
ALTER TABLE [dbo].[cmsContent] WITH NOCHECK ADD CONSTRAINT [FK_cmsContent_umbracoNode] FOREIGN KEY([nodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[cmsContent] CHECK CONSTRAINT [FK_cmsContent_umbracoNode]
GO
ALTER TABLE [dbo].[cmsContentType] WITH CHECK ADD CONSTRAINT [FK_cmsContentType_umbracoNode] FOREIGN KEY([nodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[cmsContentType] CHECK CONSTRAINT [FK_cmsContentType_umbracoNode]
GO
ALTER TABLE [dbo].[cmsDictionary] WITH CHECK ADD CONSTRAINT [FK_cmsDictionary_cmsDictionary_id] FOREIGN KEY([parent])
REFERENCES [dbo].[cmsDictionary] ([id])
GO
ALTER TABLE [dbo].[cmsDictionary] CHECK CONSTRAINT [FK_cmsDictionary_cmsDictionary_id]
GO
ALTER TABLE [dbo].[cmsDocument] WITH NOCHECK ADD CONSTRAINT [FK_cmsDocument_umbracoNode] FOREIGN KEY([nodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[cmsDocument] CHECK CONSTRAINT [FK_cmsDocument_umbracoNode]
GO
ALTER TABLE [dbo].[cmsLanguageText] WITH CHECK ADD CONSTRAINT [FK_cmsLanguageText_umbracoLanguage_id] FOREIGN KEY([languageId])
REFERENCES [dbo].[umbracoLanguage] ([id])
GO
ALTER TABLE [dbo].[cmsLanguageText] CHECK CONSTRAINT [FK_cmsLanguageText_umbracoLanguage_id]
GO
ALTER TABLE [dbo].[cmsMedia] WITH NOCHECK ADD CONSTRAINT [FK_cmsMedia_cmsContent_nodeId] FOREIGN KEY([nodeId])
REFERENCES [dbo].[cmsContent] ([nodeId])
GO
ALTER TABLE [dbo].[cmsMedia] CHECK CONSTRAINT [FK_cmsMedia_cmsContent_nodeId]
GO
ALTER TABLE [dbo].[cmsMedia] WITH NOCHECK ADD CONSTRAINT [FK_cmsMedia_umbracoNode_id] FOREIGN KEY([nodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[cmsMedia] CHECK CONSTRAINT [FK_cmsMedia_umbracoNode_id]
GO
ALTER TABLE [dbo].[cmsMember] WITH CHECK ADD CONSTRAINT [FK_cmsMember_cmsContent_nodeId] FOREIGN KEY([nodeId])
REFERENCES [dbo].[cmsContent] ([nodeId])
GO
ALTER TABLE [dbo].[cmsMember] CHECK CONSTRAINT [FK_cmsMember_cmsContent_nodeId]
GO
ALTER TABLE [dbo].[cmsMember] WITH NOCHECK ADD CONSTRAINT [FK_cmsMember_umbracoNode_id] FOREIGN KEY([nodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[cmsMember] CHECK CONSTRAINT [FK_cmsMember_umbracoNode_id]
GO
ALTER TABLE [dbo].[cmsPropertyData] WITH CHECK ADD CONSTRAINT [FK_cmsPropertyData_umbracoNode] FOREIGN KEY([contentNodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[cmsPropertyData] CHECK CONSTRAINT [FK_cmsPropertyData_umbracoNode]
GO
ALTER TABLE [dbo].[cmsPropertyType] WITH CHECK ADD CONSTRAINT [FK_cmsPropertyType_cmsTab] FOREIGN KEY([propertyTypeGroupId])
REFERENCES [dbo].[cmsPropertyTypeGroup] ([id])
GO
ALTER TABLE [dbo].[cmsPropertyType] CHECK CONSTRAINT [FK_cmsPropertyType_cmsTab]
GO
ALTER TABLE [dbo].[cmsTagRelationship] WITH CHECK ADD CONSTRAINT [cmsTags_cmsTagRelationship] FOREIGN KEY([tagId])
REFERENCES [dbo].[cmsTags] ([id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[cmsTagRelationship] CHECK CONSTRAINT [cmsTags_cmsTagRelationship]
GO
ALTER TABLE [dbo].[cmsTagRelationship] WITH CHECK ADD CONSTRAINT [FK_cmsTagRelationship_cmsContent] FOREIGN KEY([nodeId])
REFERENCES [dbo].[cmsContent] ([nodeId])
GO
ALTER TABLE [dbo].[cmsTagRelationship] CHECK CONSTRAINT [FK_cmsTagRelationship_cmsContent]
GO
ALTER TABLE [dbo].[cmsTagRelationship] WITH CHECK ADD CONSTRAINT [FK_cmsTagRelationship_cmsPropertyType] FOREIGN KEY([propertyTypeId])
REFERENCES [dbo].[cmsPropertyType] ([id])
GO
ALTER TABLE [dbo].[cmsTagRelationship] CHECK CONSTRAINT [FK_cmsTagRelationship_cmsPropertyType]
GO
ALTER TABLE [dbo].[cmsTags] WITH CHECK ADD CONSTRAINT [FK_cmsTags_cmsTags] FOREIGN KEY([parentId])
REFERENCES [dbo].[cmsTags] ([id])
GO
ALTER TABLE [dbo].[cmsTags] CHECK CONSTRAINT [FK_cmsTags_cmsTags]
GO
ALTER TABLE [dbo].[cmsTask] WITH CHECK ADD CONSTRAINT [FK_cmsTask_cmsTaskType] FOREIGN KEY([taskTypeId])
REFERENCES [dbo].[cmsTaskType] ([id])
GO
ALTER TABLE [dbo].[cmsTask] CHECK CONSTRAINT [FK_cmsTask_cmsTaskType]
GO
ALTER TABLE [dbo].[cmsTemplate] WITH CHECK ADD CONSTRAINT [FK_cmsTemplate_umbracoNode] FOREIGN KEY([nodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[cmsTemplate] CHECK CONSTRAINT [FK_cmsTemplate_umbracoNode]
GO
ALTER TABLE [dbo].[forumComments] WITH CHECK ADD CONSTRAINT [FK_forumComments_forumTopics] FOREIGN KEY([topicId])
REFERENCES [dbo].[forumTopics] ([id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[forumComments] CHECK CONSTRAINT [FK_forumComments_forumTopics]
GO
ALTER TABLE [dbo].[forumSubscribers] WITH NOCHECK ADD CONSTRAINT [FK_forumSubscribers_forumSubscribers] FOREIGN KEY([forumId], [memberId])
REFERENCES [dbo].[forumSubscribers] ([forumId], [memberId])
GO
ALTER TABLE [dbo].[forumSubscribers] CHECK CONSTRAINT [FK_forumSubscribers_forumSubscribers]
GO
ALTER TABLE [dbo].[forumTopics] WITH CHECK ADD CONSTRAINT [FK_forumTopics_forumForums] FOREIGN KEY([parentId])
REFERENCES [dbo].[forumForums] ([id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[forumTopics] CHECK CONSTRAINT [FK_forumTopics_forumForums]
GO
ALTER TABLE [dbo].[forumTopics] WITH NOCHECK ADD CONSTRAINT [FK_forumTopics_umbracoNode1] FOREIGN KEY([parentId])
REFERENCES [dbo].[umbracoNode] ([id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[forumTopics] CHECK CONSTRAINT [FK_forumTopics_umbracoNode1]
GO
ALTER TABLE [dbo].[forumTopicSubscribers] WITH CHECK ADD CONSTRAINT [FK_forumTopicSubscribers_forumTopics] FOREIGN KEY([topicId])
REFERENCES [dbo].[forumTopics] ([id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[forumTopicSubscribers] CHECK CONSTRAINT [FK_forumTopicSubscribers_forumTopics]
GO
ALTER TABLE [dbo].[powersTopic] WITH NOCHECK ADD CONSTRAINT [FK_powersTopic_forumTopics] FOREIGN KEY([id])
REFERENCES [dbo].[forumTopics] ([id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[powersTopic] CHECK CONSTRAINT [FK_powersTopic_forumTopics]
GO
ALTER TABLE [dbo].[UFDataSourceMappings] WITH CHECK ADD CONSTRAINT [FK_UFDataSourceMappings_UFDataSources] FOREIGN KEY([DataSource])
REFERENCES [dbo].[UFDataSources] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFDataSourceMappings] CHECK CONSTRAINT [FK_UFDataSourceMappings_UFDataSources]
GO
ALTER TABLE [dbo].[UFDataSourceMappings] WITH CHECK ADD CONSTRAINT [FK_UFDataSourceMappings_UFForms] FOREIGN KEY([Form])
REFERENCES [dbo].[UFForms] ([Id])
GO
ALTER TABLE [dbo].[UFDataSourceMappings] CHECK CONSTRAINT [FK_UFDataSourceMappings_UFForms]
GO
ALTER TABLE [dbo].[UFFieldConditionRules] WITH CHECK ADD CONSTRAINT [FK_UFFieldConditionRules_UFFieldConditions] FOREIGN KEY([FieldCondition])
REFERENCES [dbo].[UFFieldConditions] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFFieldConditionRules] CHECK CONSTRAINT [FK_UFFieldConditionRules_UFFieldConditions]
GO
ALTER TABLE [dbo].[UFFieldConditionRules] WITH CHECK ADD CONSTRAINT [FK_UFFieldConditionRules_UFFields] FOREIGN KEY([Field])
REFERENCES [dbo].[UFFields] ([Id])
GO
ALTER TABLE [dbo].[UFFieldConditionRules] CHECK CONSTRAINT [FK_UFFieldConditionRules_UFFields]
GO
ALTER TABLE [dbo].[UFFieldConditions] WITH CHECK ADD CONSTRAINT [FK_UFFieldConditions_UFFields] FOREIGN KEY([Field])
REFERENCES [dbo].[UFFields] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFFieldConditions] CHECK CONSTRAINT [FK_UFFieldConditions_UFFields]
GO
ALTER TABLE [dbo].[UFFields] WITH CHECK ADD CONSTRAINT [FK_UFField_UFFieldsets] FOREIGN KEY([Fieldset])
REFERENCES [dbo].[UFFieldsets] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFFields] CHECK CONSTRAINT [FK_UFField_UFFieldsets]
GO
ALTER TABLE [dbo].[UFFieldsets] WITH CHECK ADD CONSTRAINT [FK_UFFieldsets_UFPages] FOREIGN KEY([Page])
REFERENCES [dbo].[UFPages] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFFieldsets] CHECK CONSTRAINT [FK_UFFieldsets_UFPages]
GO
ALTER TABLE [dbo].[UFFieldSettings] WITH CHECK ADD CONSTRAINT [FK_UFFieldSettings_UFFields] FOREIGN KEY([Field])
REFERENCES [dbo].[UFFields] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFFieldSettings] CHECK CONSTRAINT [FK_UFFieldSettings_UFFields]
GO
ALTER TABLE [dbo].[UFForms] WITH CHECK ADD CONSTRAINT [FK_UFForms_UFDataSources] FOREIGN KEY([DataSource])
REFERENCES [dbo].[UFDataSources] ([Id])
ON DELETE SET NULL
GO
ALTER TABLE [dbo].[UFForms] CHECK CONSTRAINT [FK_UFForms_UFDataSources]
GO
ALTER TABLE [dbo].[UFPages] WITH CHECK ADD CONSTRAINT [FK_UFPages_UFForms] FOREIGN KEY([Form])
REFERENCES [dbo].[UFForms] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFPages] CHECK CONSTRAINT [FK_UFPages_UFForms]
GO
ALTER TABLE [dbo].[UFPrevalues] WITH CHECK ADD CONSTRAINT [FK_UFPrevalues_UFFields] FOREIGN KEY([Field])
REFERENCES [dbo].[UFFields] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFPrevalues] CHECK CONSTRAINT [FK_UFPrevalues_UFFields]
GO
ALTER TABLE [dbo].[UFPrevalueSourceSettings] WITH CHECK ADD CONSTRAINT [FK_UFPrevalueSettings_UFPrevalueProviders] FOREIGN KEY([PrevalueProvider])
REFERENCES [dbo].[UFPrevalueSources] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFPrevalueSourceSettings] CHECK CONSTRAINT [FK_UFPrevalueSettings_UFPrevalueProviders]
GO
ALTER TABLE [dbo].[UFRecordDataBit] WITH CHECK ADD CONSTRAINT [FK_UFRecordDataBit_UFRecordFields] FOREIGN KEY([Key])
REFERENCES [dbo].[UFRecordFields] ([Key])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFRecordDataBit] CHECK CONSTRAINT [FK_UFRecordDataBit_UFRecordFields]
GO
ALTER TABLE [dbo].[UFRecordDataDateTime] WITH CHECK ADD CONSTRAINT [FK_UFRecordDataDateTime_UFRecordFields] FOREIGN KEY([Key])
REFERENCES [dbo].[UFRecordFields] ([Key])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFRecordDataDateTime] CHECK CONSTRAINT [FK_UFRecordDataDateTime_UFRecordFields]
GO
ALTER TABLE [dbo].[UFRecordDataInteger] WITH CHECK ADD CONSTRAINT [FK_UFRecordDataInteger_UFRecordFields] FOREIGN KEY([Key])
REFERENCES [dbo].[UFRecordFields] ([Key])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFRecordDataInteger] CHECK CONSTRAINT [FK_UFRecordDataInteger_UFRecordFields]
GO
ALTER TABLE [dbo].[UFRecordDataLongString] WITH CHECK ADD CONSTRAINT [FK_UFRecordDataLongString_UFRecordFields] FOREIGN KEY([Key])
REFERENCES [dbo].[UFRecordFields] ([Key])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFRecordDataLongString] CHECK CONSTRAINT [FK_UFRecordDataLongString_UFRecordFields]
GO
ALTER TABLE [dbo].[UFRecordDataString] WITH CHECK ADD CONSTRAINT [FK_UFRecordDataString_UFRecordFields] FOREIGN KEY([Key])
REFERENCES [dbo].[UFRecordFields] ([Key])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFRecordDataString] CHECK CONSTRAINT [FK_UFRecordDataString_UFRecordFields]
GO
ALTER TABLE [dbo].[UFRecordFields] WITH CHECK ADD CONSTRAINT [FK_UFRecordFields_UFFields] FOREIGN KEY([Field])
REFERENCES [dbo].[UFFields] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFRecordFields] CHECK CONSTRAINT [FK_UFRecordFields_UFFields]
GO
ALTER TABLE [dbo].[UFRecordFields] WITH CHECK ADD CONSTRAINT [FK_UFRecordFields_UFRecords] FOREIGN KEY([Record])
REFERENCES [dbo].[UFRecords] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFRecordFields] CHECK CONSTRAINT [FK_UFRecordFields_UFRecords]
GO
ALTER TABLE [dbo].[UFRecords] WITH CHECK ADD CONSTRAINT [FK_UFRecords_UFForms] FOREIGN KEY([Form])
REFERENCES [dbo].[UFForms] ([Id])
GO
ALTER TABLE [dbo].[UFRecords] CHECK CONSTRAINT [FK_UFRecords_UFForms]
GO
ALTER TABLE [dbo].[UFRecordsXml] WITH CHECK ADD CONSTRAINT [FK_UFRecordsXml_UFForms] FOREIGN KEY([Form])
REFERENCES [dbo].[UFForms] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFRecordsXml] CHECK CONSTRAINT [FK_UFRecordsXml_UFForms]
GO
ALTER TABLE [dbo].[UFUserFormSecurity] WITH CHECK ADD CONSTRAINT [FK_UFUserFormSecurity_UFForms] FOREIGN KEY([Form])
REFERENCES [dbo].[UFForms] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFUserFormSecurity] CHECK CONSTRAINT [FK_UFUserFormSecurity_UFForms]
GO
ALTER TABLE [dbo].[UFWorkflowExecutionStates] WITH CHECK ADD CONSTRAINT [FK_UFWorkflowExecutionStates_UFFormStates] FOREIGN KEY([State])
REFERENCES [dbo].[UFFormStates] ([State])
GO
ALTER TABLE [dbo].[UFWorkflowExecutionStates] CHECK CONSTRAINT [FK_UFWorkflowExecutionStates_UFFormStates]
GO
ALTER TABLE [dbo].[UFWorkflows] WITH CHECK ADD CONSTRAINT [FK_UFWorkflows_UFForms] FOREIGN KEY([Form])
REFERENCES [dbo].[UFForms] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UFWorkflows] CHECK CONSTRAINT [FK_UFWorkflows_UFForms]
GO
ALTER TABLE [dbo].[umbracoAccess] WITH CHECK ADD CONSTRAINT [FK_umbracoAccess_umbracoNode_id] FOREIGN KEY([nodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[umbracoAccess] CHECK CONSTRAINT [FK_umbracoAccess_umbracoNode_id]
GO
ALTER TABLE [dbo].[umbracoAccess] WITH CHECK ADD CONSTRAINT [FK_umbracoAccess_umbracoNode_id1] FOREIGN KEY([loginNodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[umbracoAccess] CHECK CONSTRAINT [FK_umbracoAccess_umbracoNode_id1]
GO
ALTER TABLE [dbo].[umbracoAccess] WITH CHECK ADD CONSTRAINT [FK_umbracoAccess_umbracoNode_id2] FOREIGN KEY([noAccessNodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[umbracoAccess] CHECK CONSTRAINT [FK_umbracoAccess_umbracoNode_id2]
GO
ALTER TABLE [dbo].[umbracoAccessRule] WITH CHECK ADD CONSTRAINT [FK_umbracoAccessRule_umbracoAccess_id] FOREIGN KEY([accessId])
REFERENCES [dbo].[umbracoAccess] ([id])
GO
ALTER TABLE [dbo].[umbracoAccessRule] CHECK CONSTRAINT [FK_umbracoAccessRule_umbracoAccess_id]
GO
ALTER TABLE [dbo].[umbracoExternalLogin] WITH CHECK ADD CONSTRAINT [FK_umbracoExternalLogin_umbracoUser_id] FOREIGN KEY([userId])
REFERENCES [dbo].[umbracoUser] ([id])
GO
ALTER TABLE [dbo].[umbracoExternalLogin] CHECK CONSTRAINT [FK_umbracoExternalLogin_umbracoUser_id]
GO
ALTER TABLE [dbo].[umbracoNode] WITH CHECK ADD CONSTRAINT [FK_umbracoNode_umbracoNode] FOREIGN KEY([parentID])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[umbracoNode] CHECK CONSTRAINT [FK_umbracoNode_umbracoNode]
GO
ALTER TABLE [dbo].[umbracoRedirectUrl] WITH CHECK ADD CONSTRAINT [FK_umbracoRedirectUrl] FOREIGN KEY([contentKey])
REFERENCES [dbo].[umbracoNode] ([uniqueID])
GO
ALTER TABLE [dbo].[umbracoRedirectUrl] CHECK CONSTRAINT [FK_umbracoRedirectUrl]
GO
ALTER TABLE [dbo].[umbracoUser2UserGroup] WITH CHECK ADD CONSTRAINT [FK_umbracoUser2UserGroup_umbracoUser_id] FOREIGN KEY([userId])
REFERENCES [dbo].[umbracoUser] ([id])
GO
ALTER TABLE [dbo].[umbracoUser2UserGroup] CHECK CONSTRAINT [FK_umbracoUser2UserGroup_umbracoUser_id]
GO
ALTER TABLE [dbo].[umbracoUser2UserGroup] WITH CHECK ADD CONSTRAINT [FK_umbracoUser2UserGroup_umbracoUserGroup_id] FOREIGN KEY([userGroupId])
REFERENCES [dbo].[umbracoUserGroup] ([id])
GO
ALTER TABLE [dbo].[umbracoUser2UserGroup] CHECK CONSTRAINT [FK_umbracoUser2UserGroup_umbracoUserGroup_id]
GO
ALTER TABLE [dbo].[umbracoUserGroup] WITH CHECK ADD CONSTRAINT [FK_startContentId_umbracoNode_id] FOREIGN KEY([startContentId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[umbracoUserGroup] CHECK CONSTRAINT [FK_startContentId_umbracoNode_id]
GO
ALTER TABLE [dbo].[umbracoUserGroup] WITH CHECK ADD CONSTRAINT [FK_startMediaId_umbracoNode_id] FOREIGN KEY([startMediaId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[umbracoUserGroup] CHECK CONSTRAINT [FK_startMediaId_umbracoNode_id]
GO
ALTER TABLE [dbo].[umbracoUserGroup2App] WITH CHECK ADD CONSTRAINT [FK_umbracoUserGroup2App_umbracoUserGroup_id] FOREIGN KEY([userGroupId])
REFERENCES [dbo].[umbracoUserGroup] ([id])
GO
ALTER TABLE [dbo].[umbracoUserGroup2App] CHECK CONSTRAINT [FK_umbracoUserGroup2App_umbracoUserGroup_id]
GO
ALTER TABLE [dbo].[umbracoUserGroup2NodePermission] WITH CHECK ADD CONSTRAINT [FK_umbracoUserGroup2NodePermission_umbracoNode_id] FOREIGN KEY([nodeId])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[umbracoUserGroup2NodePermission] CHECK CONSTRAINT [FK_umbracoUserGroup2NodePermission_umbracoNode_id]
GO
ALTER TABLE [dbo].[umbracoUserGroup2NodePermission] WITH CHECK ADD CONSTRAINT [FK_umbracoUserGroup2NodePermission_umbracoUserGroup_id] FOREIGN KEY([userGroupId])
REFERENCES [dbo].[umbracoUserGroup] ([id])
GO
ALTER TABLE [dbo].[umbracoUserGroup2NodePermission] CHECK CONSTRAINT [FK_umbracoUserGroup2NodePermission_umbracoUserGroup_id]
GO
ALTER TABLE [dbo].[umbracoUserLogin] WITH CHECK ADD CONSTRAINT [FK_umbracoUserLogin_umbracoUser_id] FOREIGN KEY([userId])
REFERENCES [dbo].[umbracoUser] ([id])
GO
ALTER TABLE [dbo].[umbracoUserLogin] CHECK CONSTRAINT [FK_umbracoUserLogin_umbracoUser_id]
GO
ALTER TABLE [dbo].[umbracoUserStartNode] WITH CHECK ADD CONSTRAINT [FK_umbracoUserStartNode_umbracoNode_id] FOREIGN KEY([startNode])
REFERENCES [dbo].[umbracoNode] ([id])
GO
ALTER TABLE [dbo].[umbracoUserStartNode] CHECK CONSTRAINT [FK_umbracoUserStartNode_umbracoNode_id]
GO
ALTER TABLE [dbo].[umbracoUserStartNode] WITH CHECK ADD CONSTRAINT [FK_umbracoUserStartNode_umbracoUser_id] FOREIGN KEY([userId])
REFERENCES [dbo].[umbracoUser] ([id])
GO
ALTER TABLE [dbo].[umbracoUserStartNode] CHECK CONSTRAINT [FK_umbracoUserStartNode_umbracoUser_id]
GO
ALTER TABLE [HangFire].[JobParameter] WITH CHECK ADD CONSTRAINT [FK_HangFire_JobParameter_Job] FOREIGN KEY([JobId])
REFERENCES [HangFire].[Job] ([Id])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [HangFire].[JobParameter] CHECK CONSTRAINT [FK_HangFire_JobParameter_Job]
GO
ALTER TABLE [HangFire].[State] WITH CHECK ADD CONSTRAINT [FK_HangFire_State_Job] FOREIGN KEY([JobId])
REFERENCES [HangFire].[Job] ([Id])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [HangFire].[State] CHECK CONSTRAINT [FK_HangFire_State_Job]
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment