view OslFileMonitorService/DatabaseScript.sql @ 113:954f66bb8dbf

Portable library added for DTO
author adminsh@apollo
date Sat, 19 May 2012 16:21:07 +0100
parents e84dc4926a5a
children
line wrap: on
line source

USE [master]
GO
/****** Object:  Database [FileMonitoring]    Script Date: 01/13/2011 19:12:24 ******/
CREATE DATABASE [FileMonitoring] 
GO
USE [FileMonitoring]
GO
/****** Object:  Table [dbo].[FileEvents]    Script Date: 01/13/2011 19:12:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[FileEvents](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [FileEvent] [varchar](50) NOT NULL,
    [CreateTimestamp] [smalldatetime] NULL,
 CONSTRAINT [PK_FileEvents] PRIMARY KEY CLUSTERED 
(
    [Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  StoredProcedure [dbo].[FileEvents_insert]    Script Date: 01/13/2011 19:12:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        OSL
-- Create date: 12/01/2011
-- Description:    Demo for OSL
-- =============================================
CREATE PROCEDURE [dbo].[FileEvents_insert]
    -- Add the parameters for the stored procedure here
    @FileEvent VARCHAR(50), @Id INT OUTPUT
AS
BEGIN
    SET NOCOUNT ON;

    -- Insert statements for procedure here
    INSERT dbo.FileEvents (FileEvent) SELECT @FileEvent
    
    SELECT @Id = SCOPE_IDENTITY()
END
GO
/****** Object:  Default [DF_FileEvents_CreateTimestamp]    Script Date: 01/13/2011 19:12:25 ******/
ALTER TABLE [dbo].[FileEvents] ADD  CONSTRAINT [DF_FileEvents_CreateTimestamp]  DEFAULT (getdate()) FOR [CreateTimestamp]
GO