CREATE TABLE [dbo].[WebARCustomersUsers]
(
[CustomerID] [int] NOT NULL,
[Password] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Features] [int] NULL,
[WebARCustomerID] [int] NOT NULL IDENTITY(1, 1),
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_WebARCustomersUsers_CreateDate] DEFAULT (getdate()),
[EncType] [int] NOT NULL CONSTRAINT [DF_WebARCustomersUsers_EncType] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[WebARCustomersUsers] ADD CONSTRAINT [PK_WebARCustomersUsers] PRIMARY KEY CLUSTERED ([WebARCustomerID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[WebARCustomersUsers] ADD CONSTRAINT [IX_WebARCustomersUsers_CustomerID] UNIQUE NONCLUSTERED ([CustomerID], [Password]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[WebARCustomersUsers] ADD CONSTRAINT [FK_WebARCustomersUsers_CustomerID_WebARCustomerFeatures] FOREIGN KEY ([CustomerID]) REFERENCES [dbo].[WebARCustomerFeatures] ([CustomerID])
GO