|
@@ -1,7 +1,7 @@
|
|
|
--- 18.8.2021 1.0.8
|
|
|
|
|
--- Table User --------------------------
|
|
|
|
|
|
|
+-- 19.10.2021 1.0.9
|
|
|
|
|
+-- Table BoUser --------------------------
|
|
|
--Defines User identity with statistics informations. Defines if user is enabled and/or user is system account also.
|
|
--Defines User identity with statistics informations. Defines if user is enabled and/or user is system account also.
|
|
|
-CREATE TABLE [dbo].[User]
|
|
|
|
|
|
|
+CREATE TABLE [dbo].[BoUser]
|
|
|
(
|
|
(
|
|
|
[Id] [bigint] NOT NULL IDENTITY (1, 1),
|
|
[Id] [bigint] NOT NULL IDENTITY (1, 1),
|
|
|
[IFReference] [varchar] (50) NOT NULL,
|
|
[IFReference] [varchar] (50) NOT NULL,
|
|
@@ -9,57 +9,57 @@ CREATE TABLE [dbo].[User]
|
|
|
[LastLogged] [datetime] NULL,
|
|
[LastLogged] [datetime] NULL,
|
|
|
[LastDisabled] [datetime] NULL,
|
|
[LastDisabled] [datetime] NULL,
|
|
|
[LastEnabled] [datetime] NULL,
|
|
[LastEnabled] [datetime] NULL,
|
|
|
- [Created] [datetime] NOT NULL CONSTRAINT DF_User_Created DEFAULT getdate(),
|
|
|
|
|
|
|
+ [Created] [datetime] NOT NULL CONSTRAINT DF_BoUser_Created DEFAULT getdate(),
|
|
|
[Modified] [datetime] NULL,
|
|
[Modified] [datetime] NULL,
|
|
|
- [LangLCID] [int] NOT NULL CONSTRAINT DF_User_LangLCID DEFAULT 1033,
|
|
|
|
|
- [IsSystem] [bit] NOT NULL CONSTRAINT DF_User_IsSystem DEFAULT 0,
|
|
|
|
|
- [IsEnabled] [bit] NOT NULL CONSTRAINT DF_User_IsEnabled DEFAULT 0,
|
|
|
|
|
|
|
+ [LangLCID] [int] NOT NULL CONSTRAINT DF_BoUser_LangLCID DEFAULT 1033,
|
|
|
|
|
+ [IsSystem] [bit] NOT NULL CONSTRAINT DF_BoUser_IsSystem DEFAULT 0,
|
|
|
|
|
+ [IsEnabled] [bit] NOT NULL CONSTRAINT DF_BoUser_IsEnabled DEFAULT 0,
|
|
|
CONSTRAINT PK_USER_ID PRIMARY KEY (Id)
|
|
CONSTRAINT PK_USER_ID PRIMARY KEY (Id)
|
|
|
)
|
|
)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User primary key' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'Id'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User primary key' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'Id'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Reference to Identity framework IdentityUser.Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'IFReference'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Reference to Identity framework IdentityUser.Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'IFReference'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Full user name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'Name'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Full user name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'Name'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp of user last successful login' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'LastLogged'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp of user last successful login' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'LastLogged'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp of last user set to be disabled' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'LastDisabled'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp of last user set to be disabled' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'LastDisabled'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp of last user set to be enabled' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'LastEnabled'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp of last user set to be enabled' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'LastEnabled'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp when user was created' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'Created'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp when user was created' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'Created'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp when user was modified' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'Modified'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Timestamp when user was modified' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'Modified'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'LCID of preffered user language' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'LangLCID'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'LCID of preffered user language' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'LangLCID'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Flag if user is system only account. Cannot log in.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'IsSystem'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Flag if user is system only account. Cannot log in.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'IsSystem'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Flag if user can sign on' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User', @level2type=N'COLUMN',@level2name=N'IsEnabled'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Flag if user can sign on' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser', @level2type=N'COLUMN',@level2name=N'IsEnabled'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User identity with properties' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'User'
|
|
|
|
|
|
|
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User identity with properties' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoUser'
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
--- Indexes of table User ------------------------------
|
|
|
|
|
-CREATE UNIQUE INDEX IDX_IFREFERENCE ON [dbo].[User]
|
|
|
|
|
|
|
+-- Indexes of table BoUser ------------------------------
|
|
|
|
|
+CREATE UNIQUE INDEX IDX_IFREFERENCE ON [dbo].[BoUser]
|
|
|
(IFReference) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
(IFReference) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-CREATE UNIQUE INDEX IDX_USER_NAME ON [dbo].[User]
|
|
|
|
|
|
|
+CREATE UNIQUE INDEX IDX_USER_NAME ON [dbo].[BoUser]
|
|
|
(Name) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
(Name) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
@@ -1123,23 +1123,23 @@ GO
|
|
|
-- References for UserWorkspace --------------------------
|
|
-- References for UserWorkspace --------------------------
|
|
|
ALTER TABLE [dbo].[UserWorkspace]
|
|
ALTER TABLE [dbo].[UserWorkspace]
|
|
|
ADD
|
|
ADD
|
|
|
- CONSTRAINT REL_UserWorkspace_User FOREIGN KEY (UserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
|
|
+ CONSTRAINT REL_UserWorkspace_User FOREIGN KEY (UserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
CONSTRAINT REL_UserWorkspace_Workspace FOREIGN KEY (WorkspaceId) REFERENCES [dbo].[Workspace] (Id)
|
|
CONSTRAINT REL_UserWorkspace_Workspace FOREIGN KEY (WorkspaceId) REFERENCES [dbo].[Workspace] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-- References for Workspace --------------------------
|
|
-- References for Workspace --------------------------
|
|
|
ALTER TABLE [dbo].[Workspace]
|
|
ALTER TABLE [dbo].[Workspace]
|
|
|
ADD
|
|
ADD
|
|
|
- CONSTRAINT REL_Workspace_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_Workspace_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
|
|
+ CONSTRAINT REL_Workspace_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_Workspace_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
CONSTRAINT REL_Workspace_BillingInfo FOREIGN KEY (BillingInfoId) REFERENCES [dbo].[BillingInfo] (Id)
|
|
CONSTRAINT REL_Workspace_BillingInfo FOREIGN KEY (BillingInfoId) REFERENCES [dbo].[BillingInfo] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-- References for BillingInfo --------------------------
|
|
-- References for BillingInfo --------------------------
|
|
|
ALTER TABLE [dbo].[BillingInfo]
|
|
ALTER TABLE [dbo].[BillingInfo]
|
|
|
ADD
|
|
ADD
|
|
|
- CONSTRAINT REL_BillingInfo_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_BillingInfo_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
|
|
+ CONSTRAINT REL_BillingInfo_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_BillingInfo_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
CONSTRAINT REL_BillingInfo_Workspace FOREIGN KEY (WorkspaceId) REFERENCES [dbo].[Workspace] (Id)
|
|
CONSTRAINT REL_BillingInfo_Workspace FOREIGN KEY (WorkspaceId) REFERENCES [dbo].[Workspace] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
@@ -1154,15 +1154,15 @@ GO
|
|
|
ALTER TABLE [dbo].[Metadocument]
|
|
ALTER TABLE [dbo].[Metadocument]
|
|
|
ADD
|
|
ADD
|
|
|
CONSTRAINT REL_Metadocument_Structure FOREIGN KEY (StructureId) REFERENCES [dbo].[Structure] (Id),
|
|
CONSTRAINT REL_Metadocument_Structure FOREIGN KEY (StructureId) REFERENCES [dbo].[Structure] (Id),
|
|
|
- CONSTRAINT REL_Metadocument_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_Metadocument_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_Metadocument_User_Downloaded FOREIGN KEY (LastDownloadedByUserId) REFERENCES [dbo].[User] (Id)
|
|
|
|
|
|
|
+ CONSTRAINT REL_Metadocument_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_Metadocument_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_Metadocument_User_Downloaded FOREIGN KEY (LastDownloadedByUserId) REFERENCES [dbo].[BoUser] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-- References for StatusHistory --------------------------
|
|
-- References for StatusHistory --------------------------
|
|
|
ALTER TABLE [dbo].[StatusHistory]
|
|
ALTER TABLE [dbo].[StatusHistory]
|
|
|
ADD
|
|
ADD
|
|
|
- CONSTRAINT REL_StatusHistory_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
|
|
+ CONSTRAINT REL_StatusHistory_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
CONSTRAINT REL_StatusHistory_Metadocument FOREIGN KEY (MetadocumentId) REFERENCES [dbo].[Metadocument] (Id)
|
|
CONSTRAINT REL_StatusHistory_Metadocument FOREIGN KEY (MetadocumentId) REFERENCES [dbo].[Metadocument] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
@@ -1171,22 +1171,22 @@ ALTER TABLE [dbo].[Artifact]
|
|
|
ADD
|
|
ADD
|
|
|
CONSTRAINT REL_Artifact_Metadocument FOREIGN KEY (MetadocumentId) REFERENCES [dbo].[Metadocument] (Id),
|
|
CONSTRAINT REL_Artifact_Metadocument FOREIGN KEY (MetadocumentId) REFERENCES [dbo].[Metadocument] (Id),
|
|
|
CONSTRAINT REL_Artifact_MimeType FOREIGN KEY (MimeTypeId) REFERENCES [dbo].[MimeType] (Id),
|
|
CONSTRAINT REL_Artifact_MimeType FOREIGN KEY (MimeTypeId) REFERENCES [dbo].[MimeType] (Id),
|
|
|
- CONSTRAINT REL_Artifact_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id)
|
|
|
|
|
|
|
+ CONSTRAINT REL_Artifact_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-- References for MimeType --------------------------
|
|
-- References for MimeType --------------------------
|
|
|
ALTER TABLE [dbo].[MimeType]
|
|
ALTER TABLE [dbo].[MimeType]
|
|
|
ADD
|
|
ADD
|
|
|
- CONSTRAINT REL_MimeType_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_MimeType_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[User] (Id)
|
|
|
|
|
|
|
+ CONSTRAINT REL_MimeType_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_MimeType_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[BoUser] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-- References for Tag --------------------------
|
|
-- References for Tag --------------------------
|
|
|
ALTER TABLE [dbo].[Tag]
|
|
ALTER TABLE [dbo].[Tag]
|
|
|
ADD
|
|
ADD
|
|
|
CONSTRAINT REL_Tag_Workspace FOREIGN KEY (WorkspaceId) REFERENCES [dbo].[Workspace] (Id),
|
|
CONSTRAINT REL_Tag_Workspace FOREIGN KEY (WorkspaceId) REFERENCES [dbo].[Workspace] (Id),
|
|
|
- CONSTRAINT REL_Tag_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_Tag_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[User] (Id)
|
|
|
|
|
|
|
+ CONSTRAINT REL_Tag_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_Tag_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[BoUser] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-- References for MetadocumentTag --------------------------
|
|
-- References for MetadocumentTag --------------------------
|
|
@@ -1199,8 +1199,8 @@ GO
|
|
|
-- References for BillingPlan --------------------------
|
|
-- References for BillingPlan --------------------------
|
|
|
ALTER TABLE [dbo].[BillingPlan]
|
|
ALTER TABLE [dbo].[BillingPlan]
|
|
|
ADD
|
|
ADD
|
|
|
- CONSTRAINT REL_BillingPlan_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_BillingPlan_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[User] (Id)
|
|
|
|
|
|
|
+ CONSTRAINT REL_BillingPlan_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_BillingPlan_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[BoUser] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-- References for MetadocumentBilling --------------------------
|
|
-- References for MetadocumentBilling --------------------------
|
|
@@ -1222,8 +1222,8 @@ ALTER TABLE [dbo].[Invoice]
|
|
|
ADD
|
|
ADD
|
|
|
CONSTRAINT REL_Invoice_InvoiceIssuer FOREIGN KEY (InvoiceIssuerId) REFERENCES [dbo].[InvoiceIssuer] (Id),
|
|
CONSTRAINT REL_Invoice_InvoiceIssuer FOREIGN KEY (InvoiceIssuerId) REFERENCES [dbo].[InvoiceIssuer] (Id),
|
|
|
CONSTRAINT REL_Invoice_Workspace FOREIGN KEY (WorkspaceId) REFERENCES [dbo].[Workspace] (Id),
|
|
CONSTRAINT REL_Invoice_Workspace FOREIGN KEY (WorkspaceId) REFERENCES [dbo].[Workspace] (Id),
|
|
|
- CONSTRAINT REL_Invoice_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_Invoice_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[User] (Id)
|
|
|
|
|
|
|
+ CONSTRAINT REL_Invoice_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_Invoice_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[BoUser] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-- References for InvoiceItem --------------------------
|
|
-- References for InvoiceItem --------------------------
|
|
@@ -1231,16 +1231,15 @@ ALTER TABLE [dbo].[InvoiceItem]
|
|
|
ADD
|
|
ADD
|
|
|
CONSTRAINT REL_InvoiceItem_Invoice FOREIGN KEY (InvoiceId) REFERENCES [dbo].[Invoice] (Id),
|
|
CONSTRAINT REL_InvoiceItem_Invoice FOREIGN KEY (InvoiceId) REFERENCES [dbo].[Invoice] (Id),
|
|
|
CONSTRAINT REL_InvoiceItem_BillingPlan FOREIGN KEY (BillingPlanId) REFERENCES [dbo].[BillingPlan] (Id),
|
|
CONSTRAINT REL_InvoiceItem_BillingPlan FOREIGN KEY (BillingPlanId) REFERENCES [dbo].[BillingPlan] (Id),
|
|
|
- CONSTRAINT REL_InvoiceItem_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_InvoiceItem_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[User] (Id)
|
|
|
|
|
|
|
+ CONSTRAINT REL_InvoiceItem_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_InvoiceItem_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[BoUser] (Id)
|
|
|
GO
|
|
GO
|
|
|
|
|
|
|
|
-- References for InvoiceIssuer --------------------------
|
|
-- References for InvoiceIssuer --------------------------
|
|
|
ALTER TABLE [dbo].[InvoiceIssuer]
|
|
ALTER TABLE [dbo].[InvoiceIssuer]
|
|
|
ADD
|
|
ADD
|
|
|
- CONSTRAINT REL_InvoiceIssuer_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[User] (Id),
|
|
|
|
|
- CONSTRAINT REL_InvoiceIssuer_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[User] (Id)
|
|
|
|
|
|
|
+ CONSTRAINT REL_InvoiceIssuer_User_Created FOREIGN KEY (CreatedByUserId) REFERENCES [dbo].[BoUser] (Id),
|
|
|
|
|
+ CONSTRAINT REL_InvoiceIssuer_User_Modified FOREIGN KEY (ModifiedByUserId) REFERENCES [dbo].[BoUser] (Id)
|
|
|
GO
|
|
GO
|
|
|
-
|
|
|
|
|
-EXEC sys.sp_updateextendedproperty @name=N'BO_Version', @value=N'1.0.8'
|
|
|
|
|
|
|
+EXEC sys.sp_updateextendedproperty @name=N'BO_Version', @value=N'1.0.9'
|
|
|
GO
|
|
GO
|