mirror of
https://github.com/bitwarden/server
synced 2025-12-29 06:33:43 +00:00
- Added sproc to check if org admin for free org create - Removed old proeprties not in user from org and subvault - Added more cascade deletes
16 lines
773 B
Transact-SQL
16 lines
773 B
Transact-SQL
CREATE TABLE [dbo].[OrganizationUser] (
|
|
[Id] UNIQUEIDENTIFIER NOT NULL,
|
|
[OrganizationId] UNIQUEIDENTIFIER NOT NULL,
|
|
[UserId] UNIQUEIDENTIFIER NULL,
|
|
[Email] NVARCHAR (50) NULL,
|
|
[Key] VARCHAR (MAX) NULL,
|
|
[Status] TINYINT NOT NULL,
|
|
[Type] TINYINT NOT NULL,
|
|
[CreationDate] DATETIME2 (7) NOT NULL,
|
|
[RevisionDate] DATETIME2 (7) NOT NULL,
|
|
CONSTRAINT [PK_OrganizationUser] PRIMARY KEY CLUSTERED ([Id] ASC),
|
|
CONSTRAINT [FK_OrganizationUser_Organization] FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organization] ([Id]) ON DELETE CASCADE,
|
|
CONSTRAINT [FK_OrganizationUser_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([Id])
|
|
);
|
|
|