File: 2018021600.sql

package info (click to toggle)
roundcube 1.6.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,880 kB
  • sloc: javascript: 195,591; php: 76,888; sql: 3,150; sh: 2,882; pascal: 1,079; makefile: 234; xml: 93; perl: 73; ansic: 48; python: 21
file content (24 lines) | stat: -rw-r--r-- 721 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
CREATE TABLE [dbo].[filestore] (
	[file_id] [int] IDENTITY (1, 1) NOT NULL ,
	[user_id] [int] NOT NULL ,
	[filename] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
	[mtime] [int] NOT NULL ,
	[data] [text] COLLATE Latin1_General_CI_AI NULL ,
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

ALTER TABLE [dbo].[filestore] WITH NOCHECK ADD 
	CONSTRAINT [PK_filestore_file_id] PRIMARY KEY  CLUSTERED 
	(
		[file_id]
	) ON [PRIMARY] 
GO

CREATE INDEX [IX_filestore_user_id] ON [dbo].[filestore]([user_id]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[filestore] ADD CONSTRAINT [FK_filestore_user_id]
    FOREIGN KEY ([user_id]) REFERENCES [dbo].[users] ([user_id])
    ON DELETE CASCADE ON UPDATE CASCADE
GO