Fixed help files.
This commit is contained in:
commit
b8f912cc79
1543 changed files with 395123 additions and 0 deletions
47
SqlServerProviders/FilesDatabase.sql
Normal file
47
SqlServerProviders/FilesDatabase.sql
Normal file
|
@ -0,0 +1,47 @@
|
|||
|
||||
create table [Directory] (
|
||||
[FullPath] nvarchar(250) not null,
|
||||
[Parent] nvarchar(250),
|
||||
constraint [PK_Directory] primary key clustered ([FullPath])
|
||||
)
|
||||
|
||||
create table [File] (
|
||||
[Name] nvarchar(200) not null,
|
||||
[Directory] nvarchar(250) not null
|
||||
constraint [FK_File_Directory] references [Directory]([FullPath])
|
||||
on delete cascade on update cascade,
|
||||
[Size] bigint not null,
|
||||
[Downloads] int not null,
|
||||
[LastModified] datetime not null,
|
||||
[Data] varbinary(max) not null,
|
||||
constraint [PK_File] primary key clustered ([Name], [Directory])
|
||||
)
|
||||
|
||||
create table [Attachment] (
|
||||
[Name] nvarchar(200) not null,
|
||||
[Page] nvarchar(200) not null,
|
||||
[Size] bigint not null,
|
||||
[Downloads] int not null,
|
||||
[LastModified] datetime not null,
|
||||
[Data] varbinary(max) not null,
|
||||
constraint[PK_Attachment] primary key clustered ([Name], [Page])
|
||||
)
|
||||
|
||||
if (select count(*) from sys.tables where [Name] = 'Version') = 0
|
||||
begin
|
||||
create table [Version] (
|
||||
[Component] varchar(100) not null,
|
||||
[Version] int not null,
|
||||
constraint [PK_Version] primary key clustered ([Component])
|
||||
)
|
||||
end
|
||||
|
||||
if (select count([Version]) from [Version] where [Component] = 'Files') = 0
|
||||
begin
|
||||
insert into [Version] ([Component], [Version]) values ('Files', 3000)
|
||||
end
|
||||
|
||||
if (select count([FullPath]) from [Directory] where [FullPath] = '/') = 0
|
||||
begin
|
||||
insert into [Directory] ([FullPath], [Parent]) values ('/', NULL)
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue