Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE [dbo].[USER] (
- [Id] [INT] IDENTITY(1,1) NOT NULL,
- [Username] [nvarchar](50) NOT NULL, -- Use this for login
- [PwdHash] [nvarchar](256) NOT NULL, -- Use to check password hash
- [PwdSalt] [nvarchar](256) NOT NULL, -- Additional level of security (random string)
- [FirstName] [nvarchar](256) NOT NULL,
- [LastName] [nvarchar](256) NOT NULL,
- [Email] [nvarchar](256) NOT NULL,
- [Phone] [nvarchar](256) NULL,
- CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED (
- [Id] ASC
- )
- )
- CREATE TABLE [dbo].[UserAudioPermission] (
- [Id] [INT] NOT NULL,
- [UserId] [INT] NOT NULL,
- [AudioId] [INT] NOT NULL,
- CONSTRAINT [PK_UserAudioPermission] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )
- )
- GO
- ALTER TABLE [dbo].[UserAudioPermission] WITH CHECK
- ADD CONSTRAINT [FK_UserAudioPermission_Audio] FOREIGN KEY([AudioId])
- REFERENCES [dbo].[Audio] ([Id])
- GO
- ALTER TABLE [dbo].[UserAudioPermission] WITH CHECK
- ADD CONSTRAINT [FK_UserAudioPermission_User] FOREIGN KEY([UserId])
- REFERENCES [dbo].[USER] ([Id])
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement