From: <jon...@us...> - 2006-06-01 00:03:52
|
Revision: 15 Author: jon_r_johnson Date: 2006-05-31 17:03:40 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=15&view=rev Log Message: ----------- Added stored procedures ins_testCaseTags, ins_testPass, ins_version, and ins_versionTestCase Modified Paths: -------------- Schema/TCDBSQLServer2005.sql Modified: Schema/TCDBSQLServer2005.sql =================================================================== --- Schema/TCDBSQLServer2005.sql 2006-05-31 23:01:33 UTC (rev 14) +++ Schema/TCDBSQLServer2005.sql 2006-06-01 00:03:40 UTC (rev 15) @@ -757,6 +757,70 @@ GO SET QUOTED_IDENTIFIER ON GO +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ins_testCaseTags]') AND type in (N'P', N'PC')) +BEGIN +EXEC dbo.sp_executesql @statement = N'------------------------------------------------------------------ +-- Stored Procedure: ins_testCaseTags +-- +-- Database: TCDB +-- Author: Jon R. Johnson +-- Date: 05/31/2006 +-- Purpose: Insert a new test case tag in the test case tags table. +-- +-- Input: @testcaseID -- Identity of the Testcase for this Tag +-- @tagID -- Identity of the Tag for this Testcase +-- +-- Output: none +------------------------------------------------------------------ +CREATE proc [dbo].[ins_testCaseTags] ( + @testcaseID int, + @tagID int +) as + +insert into tcdb_testCaseTags +select + @testcaseID, + @tagID + +' +END +GO +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ins_testPass]') AND type in (N'P', N'PC')) +BEGIN +EXEC dbo.sp_executesql @statement = N'------------------------------------------------------------------ +-- Stored Procedure: ins_testPass +-- +-- Database: TCDB +-- Author: Jon R. Johnson +-- Date: 05/31/2006 +-- Purpose: Insert a new computer in the master computers table. +-- +-- Input: @name -- Test Pass Name +-- @versionID -- Identity of the Version for this test pass +-- +-- Output: none +------------------------------------------------------------------ +CREATE proc [dbo].[ins_testPass] ( + @name varchar(255), + @versionID int +) as + +insert into tcdb_testPass +select + @name, + @versionID + +' +END +GO +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ins_architecture]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N'------------------------------------------------------------------ @@ -1027,6 +1091,99 @@ GO SET QUOTED_IDENTIFIER ON GO +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ins_version]') AND type in (N'P', N'PC')) +BEGIN +EXEC dbo.sp_executesql @statement = N'------------------------------------------------------------------ +-- Stored Procedure: ins_version +-- +-- Database: TCDB +-- Author: Jon R. Johnson +-- Date: 05/31/2006 +-- Purpose: Insert a new product version in the version table. +-- +-- Input: @productID -- Identity of the Product for this Version +-- @number -- Product Version Number +-- @code -- Product Code Version +-- @active -- Is Version Active=1 / Inactive=0 +-- @devManager -- Identity of the Dev Manager for this Version +-- @qaManager -- Identity of the QA Manager for this Version +-- @devLead -- Identity of the Dev Lead for this Version +-- @pm -- Identity of the Product Manager for this Version +-- +-- Output: none +------------------------------------------------------------------ +CREATE proc [dbo].[ins_version] ( + @productID int, + @number varchar(50), + @code varchar(50), + @active bit, + @devManager int, + @qaManager int, + @devLead int, + @pm int +) as + +insert into tcdb_version +select + @productID, + @number, + @code, + @active, + dateCreated=getdate(), + @devManager, + @qaManager, + @devLead, + @pm + +' +END +GO +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ins_versionTestCase]') AND type in (N'P', N'PC')) +BEGIN +EXEC dbo.sp_executesql @statement = N'------------------------------------------------------------------ +-- Stored Procedure: ins_versionTestCase +-- +-- Database: TCDB +-- Author: Jon R. Johnson +-- Date: 05/31/2006 +-- Purpose: Insert a new product version specific test case in the version +-- test case table. +-- +-- Input: @testCaseID -- Identity of the test case +-- @versionID -- Identity of the Product Version Number +-- @include -- Specialty Include=1 / Exclude=0 +-- @minVersion -- Minimum product version test case applies to / null is everything up to maxversion +-- @maxVersion -- Maximum product version test case applies to / null is everything above minversion +-- +-- Output: none +------------------------------------------------------------------ +CREATE proc [dbo].[ins_versionTestCase] ( + @testCaseID int, + @versionID int, + @include bit, + @minVersion varchar(50) = null, + @maxVersion varchar(50) = null +) as + +insert into tcdb_versionTestCase +select + @testCaseID, + @versionID, + @include, + @minVersion, + @maxVersion + +' +END +GO +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ins_build]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N'------------------------------------------------------------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |