view OslFileMonitorService/DatabaseScript.sql @ 104:4cfdecdb1d12

Silverlight Glimpse now lives on codeplex, StockDisplay lives on Google code
author stevenhollidge <stevenhollidge@hotmail.com>
date Sun, 06 May 2012 12:16:38 +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