USE [master]
GO
/****** Object:  Database [KualiReady]    Script Date: 05/20/2011 14:41:29 ******/
CREATE DATABASE [KualiReady] ON  PRIMARY 
( NAME = N'KualiReady', FILENAME = N'c:\program files\microsoft sql server\MSSQL.1\MSSQL\Data\KualiReady.mdf' , SIZE = 3170880KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
 LOG ON 
( NAME = N'KualiReady_Log', FILENAME = N'c:\program files\microsoft sql server\MSSQL.1\MSSQL\Data\KualiReady_1.ldf' , SIZE = 1167296KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
GO
ALTER DATABASE [KualiReady] SET COMPATIBILITY_LEVEL = 90
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [KualiReady].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO
ALTER DATABASE [KualiReady] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [KualiReady] SET ANSI_NULLS OFF
GO
ALTER DATABASE [KualiReady] SET ANSI_PADDING OFF
GO
ALTER DATABASE [KualiReady] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [KualiReady] SET ARITHABORT OFF
GO
ALTER DATABASE [KualiReady] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [KualiReady] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [KualiReady] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [KualiReady] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [KualiReady] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [KualiReady] SET CURSOR_DEFAULT  GLOBAL
GO
ALTER DATABASE [KualiReady] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [KualiReady] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [KualiReady] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [KualiReady] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [KualiReady] SET  DISABLE_BROKER
GO
ALTER DATABASE [KualiReady] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [KualiReady] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [KualiReady] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [KualiReady] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [KualiReady] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [KualiReady] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [KualiReady] SET PARTNER TIMEOUT 10
GO
ALTER DATABASE [KualiReady] SET  READ_WRITE
GO
ALTER DATABASE [KualiReady] SET RECOVERY FULL
GO
ALTER DATABASE [KualiReady] SET  MULTI_USER
GO
ALTER DATABASE [KualiReady] SET PAGE_VERIFY TORN_PAGE_DETECTION
GO
ALTER DATABASE [KualiReady] SET DB_CHAINING OFF
GO
USE [KualiReady]
GO
/****** Object:  User [restart_app]    Script Date: 05/20/2011 14:41:29 ******/
CREATE USER [restart_app] FOR LOGIN [restart_app] WITH DEFAULT_SCHEMA=[restart_app]
GO
/****** Object:  Schema [restart_app]    Script Date: 05/20/2011 14:41:29 ******/
CREATE SCHEMA [restart_app] AUTHORIZATION [restart_app]
GO
/****** Object:  Table [dbo].[InstructionalDepartment]    Script Date: 05/20/2011 14:41:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[InstructionalDepartment](
	[InstructionalDepartmentID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[DepartmentName] [varchar](50) NOT NULL,
 CONSTRAINT [PK_InstructionalDepartment] PRIMARY KEY CLUSTERED 
(
	[InstructionalDepartmentID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity field for the table' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InstructionalDepartment', @level2type=N'COLUMN',@level2name=N'InstructionalDepartmentID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InstructionalDepartment', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Department Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'InstructionalDepartment', @level2type=N'COLUMN',@level2name=N'DepartmentName'
GO
/****** Object:  StoredProcedure [dbo].[dt_generateansiname]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/* 
**	Generate an ansi name that is unique in the dtproperties.value column 
*/ 
create procedure [dbo].[dt_generateansiname](@name varchar(255) output) 
as 
	declare @prologue varchar(20) 
	declare @indexstring varchar(20) 
	declare @index integer 
 
	set @prologue = 'MSDT-A-' 
	set @index = 1 
 
	while 1 = 1 
	begin 
		set @indexstring = cast(@index as varchar(20)) 
		set @name = @prologue + @indexstring 
		if not exists (select value from dtproperties where value = @name) 
			break 
		 
		set @index = @index + 1 
 
		if (@index = 10000) 
			goto TooMany 
	end 
 
Leave: 
 
	return 
 
TooMany: 
 
	set @name = 'DIAGRAM' 
	goto Leave
GO
/****** Object:  StoredProcedure [dbo].[dt_adduserobject]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	Add an object to the dtproperties table
*/
create procedure [dbo].[dt_adduserobject]
as
	set nocount on
	/*
	** Create the user object if it does not exist already
	*/
	begin transaction
		insert dbo.dtproperties (property) VALUES ('DtgSchemaOBJECT')
		update dbo.dtproperties set objectid=@@identity 
			where id=@@identity and property='DtgSchemaOBJECT'
	commit
	return @@identity
GO
/****** Object:  Table [dbo].[BuildingSource]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BuildingSource](
	[BuildingID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[CAAN] [varchar](5) NOT NULL,
	[BuildingName] [varchar](30) NOT NULL,
	[BuildingCommonName] [varchar](50) NOT NULL,
	[BuildingAddress] [varchar](400) NOT NULL,
	[Ownership] [char](1) NOT NULL,
 CONSTRAINT [PK_BuildingSource] PRIMARY KEY CLUSTERED 
(
	[BuildingID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity field for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BuildingSource', @level2type=N'COLUMN',@level2name=N'BuildingID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'InstitutionID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BuildingSource', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CAAN No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BuildingSource', @level2type=N'COLUMN',@level2name=N'CAAN'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Building Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BuildingSource', @level2type=N'COLUMN',@level2name=N'BuildingName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Building Common Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BuildingSource', @level2type=N'COLUMN',@level2name=N'BuildingCommonName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Building Address' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BuildingSource', @level2type=N'COLUMN',@level2name=N'BuildingAddress'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ownership(''1'' - owned,''0'' - rented)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BuildingSource', @level2type=N'COLUMN',@level2name=N'Ownership'
GO
/****** Object:  StoredProcedure [dbo].[dt_setpropertybyid]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	If the property already exists, reset the value; otherwise add property
**		id -- the id in sysobjects of the object
**		property -- the name of the property
**		value -- the text value of the property
**		lvalue -- the binary value of the property (image)
*/
create procedure [dbo].[dt_setpropertybyid]
	@id int,
	@property varchar(64),
	@value varchar(255),
	@lvalue image
as
	set nocount on
	declare @uvalue nvarchar(255) 
	set @uvalue = convert(nvarchar(255), @value) 
	if exists (select * from dbo.dtproperties 
			where objectid=@id and property=@property)
	begin
		--
		-- bump the version count for this row as we update it
		--
		update dbo.dtproperties set value=@value, uvalue=@uvalue, lvalue=@lvalue, version=version+1
			where objectid=@id and property=@property
	end
	else
	begin
		--
		-- version count is auto-set to 0 on initial insert
		--
		insert dbo.dtproperties (property, objectid, value, uvalue, lvalue)
			values (@property, @id, @value, @uvalue, @lvalue)
	end
GO
/****** Object:  StoredProcedure [dbo].[dt_getobjwithprop]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	Retrieve the owner object(s) of a given property
*/
create procedure [dbo].[dt_getobjwithprop]
	@property varchar(30),
	@value varchar(255)
as
	set nocount on

	if (@property is null) or (@property = '')
	begin
		raiserror('Must specify a property name.',-1,-1)
		return (1)
	end

	if (@value is null)
		select objectid id from dbo.dtproperties
			where property=@property

	else
		select objectid id from dbo.dtproperties
			where property=@property and value=@value
GO
/****** Object:  Table [dbo].[plans]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[plans](
	[pid] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[plan_name] [varchar](256) NOT NULL,
	[status] [char](1) NOT NULL,
	[acad_staff] [int] NOT NULL,
	[fulltime_staff] [int] NOT NULL,
	[parttime_staff] [int] NOT NULL,
	[student_staff] [int] NOT NULL,
	[other_staff] [int] NOT NULL,
	[res_fellows] [int] NOT NULL,
	[volunteers] [int] NOT NULL,
	[guests] [int] NOT NULL,
	[comment] [text] NOT NULL,
	[employ_faculty] [char](1) NOT NULL,
	[key_workstation_min] [int] NOT NULL,
	[key_workstation_comment] [text] NOT NULL,
	[key_laptop_min] [int] NOT NULL,
	[key_laptop_comment] [text] NOT NULL,
	[key_telephone_min] [int] NOT NULL,
	[key_telephone_comment] [text] NOT NULL,
	[key_printer_min] [int] NOT NULL,
	[key_printer_comment] [text] NOT NULL,
	[key_fax_min] [int] NOT NULL,
	[key_fax_comment] [text] NOT NULL,
	[key_copier_min] [int] NOT NULL,
	[key_copier_comment] [text] NOT NULL,
	[key_scanner_min] [int] NOT NULL,
	[key_scanner_comment] [text] NOT NULL,
	[key_server_min] [int] NOT NULL,
	[key_server_comment] [text] NOT NULL,
	[key_other_equipment] [text] NOT NULL,
	[key_facilities] [text] NOT NULL,
	[key_other_resources] [text] NOT NULL,
	[key_supply_crisis] [text] NOT NULL,
	[key_basic_emergency_contact_copy] [char](1) NOT NULL,
	[key_basic_who_hold] [varchar](320) NOT NULL,
	[key_basic_who_update] [varchar](320) NOT NULL,
	[key_basic_who_check_msg] [varchar](320) NOT NULL,
	[key_basic_who_record_greeting] [varchar](320) NOT NULL,
	[key_basic_who_post_msg] [varchar](320) NOT NULL,
	[key_basic_shared_password] [varchar](320) NOT NULL,
	[key_basic_comment] [varchar](512) NOT NULL,
	[key_transportation] [varchar](max) NOT NULL,
	[it_ws_file] [varchar](5) NOT NULL,
	[it_ws_file_comment] [text] NOT NULL,
	[it_ws_ucb] [varchar](5) NOT NULL,
	[it_ws_ucb_comment] [text] NOT NULL,
	[it_ws_local_auto] [varchar](5) NOT NULL,
	[it_ws_local_auto_comment] [text] NOT NULL,
	[it_ws_local_manu] [varchar](5) NOT NULL,
	[it_ws_local_manu_comment] [text] NOT NULL,
	[it_ws_other] [varchar](5) NOT NULL,
	[it_ws_other_comment] [text] NOT NULL,
	[it_ws_no_backup] [varchar](5) NOT NULL,
	[it_ws_no_backup_comment] [text] NOT NULL,
	[it_ws_not_know] [varchar](5) NOT NULL,
	[it_ws_not_know_comment] [text] NOT NULL,
	[it_ws_support_dept_flag] [char](1) NOT NULL,
	[it_ws_support_dept_comment] [text] NOT NULL,
	[it_ws_support_campus_flag] [char](1) NOT NULL,
	[it_ws_support_campus_comment] [text] NOT NULL,
	[it_ws_support_vendor_flag] [char](1) NOT NULL,
	[it_ws_support_vendor_comment] [text] NOT NULL,
	[it_ws_support_other_flag] [char](1) NOT NULL,
	[it_ws_support_other_comment] [text] NOT NULL,
	[it_howto_where] [text] NOT NULL,
	[it_howto_when] [text] NOT NULL,
	[it_howto_requirement] [text] NOT NULL,
	[it_howto_staff] [text] NOT NULL,
	[it_howto_other] [text] NOT NULL,
	[create_date] [datetime] NOT NULL,
	[last_modified] [datetime] NOT NULL,
	[approval_flag] [char](1) NOT NULL,
	[approved_by] [varchar](50) NOT NULL,
	[approver_type] [char](1) NOT NULL,
	[approved_date] [datetime] NULL,
	[it_howto_work_home] [text] NOT NULL,
	[key_supplies] [text] NOT NULL,
	[it_howto_cannot_work_around] [text] NOT NULL,
	[disabled] [char](1) NOT NULL,
	[cost_center] [text] NOT NULL,
	[evacuation_plan] [char](1) NOT NULL,
	[AcronymID] [int] NOT NULL,
	[MajorDivisionID] [int] NOT NULL,
	[HeadOfUnitName] [varchar](50) NOT NULL,
	[HeadOfUnitTitle] [varchar](50) NOT NULL,
	[not_applicable] [char](1) NOT NULL,
	[na_explain] [varchar](400) NOT NULL,
	[old_pid] [int] NOT NULL,
 CONSTRAINT [pk_plan] PRIMARY KEY NONCLUSTERED 
(
	[pid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE NONCLUSTERED INDEX [IX_plans] ON [dbo].[plans] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Res_fellows number' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'res_fellows'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Volunteers number' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'volunteers'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Guests Number' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'guests'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'key_basic_emergency_contact_copy(''Y'', ''N'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'key_basic_emergency_contact_copy'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'key_basic_who_hold' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'key_basic_who_hold'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'key_basic_who_update' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'key_basic_who_update'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'key_basic_who_check_msg' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'key_basic_who_check_msg'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'key_basic_who_record_greeting' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'key_basic_who_record_greeting'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'key_basic_who_post_msg' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'key_basic_who_post_msg'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'key_basic_shared_password' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'key_basic_shared_password'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'key_basic_comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'key_basic_comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Create Date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'create_date'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Approval Flag(''1'' - approved, ''0'' - no)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'approval_flag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Last Plan Approver' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'approved_by'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'approver Type(''1'' - Head of Unit, ''2'' - Designee)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'approver_type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Cost Center' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'cost_center'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Evacuation Plan(''1'' - Yes, ''2'' - No, ''3'' - Some, not all, ''4'' -  Don''t know ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'evacuation_plan'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Acronym ID(used as a part of plan name)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'AcronymID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Major Division ID(linked to MajorDivision table)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'MajorDivisionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Head of Unit Name which Plan is for' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'HeadOfUnitName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Head of Unit Title' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'HeadOfUnitTitle'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Not applicable(''1'' - checked, ''0'' - no)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'not_applicable'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'not applicable explain' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans', @level2type=N'COLUMN',@level2name=N'na_explain'
GO
/****** Object:  StoredProcedure [dbo].[dt_getpropertiesbyid]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	Retrieve properties by id's
**
**	dt_getproperties objid, null or '' -- retrieve all properties of the object itself
**	dt_getproperties objid, property -- retrieve the property specified
*/
create procedure [dbo].[dt_getpropertiesbyid]
	@id int,
	@property varchar(64)
as
	set nocount on

	if (@property is null) or (@property = '')
		select property, version, value, lvalue
			from dbo.dtproperties
			where  @id=objectid
	else
		select property, version, value, lvalue
			from dbo.dtproperties
			where  @id=objectid and @property=property
GO
/****** Object:  StoredProcedure [dbo].[dt_verstamp006]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	This procedure returns the version number of the stored
**    procedures used by legacy versions of the Microsoft
**	Visual Database Tools.  Version is 7.0.00.
*/
create procedure [dbo].[dt_verstamp006]
as
	select 7000
GO
/****** Object:  StoredProcedure [dbo].[dt_verstamp007]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	This procedure returns the version number of the stored
**    procedures used by the the Microsoft Visual Database Tools.
**	Version is 7.0.05.
*/
create procedure [dbo].[dt_verstamp007]
as
	select 7005
GO
/****** Object:  StoredProcedure [dbo].[dt_getpropertiesbyid_vcs]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create procedure [dbo].[dt_getpropertiesbyid_vcs]
    @id       int,
    @property varchar(64),
    @value    varchar(255) = NULL OUT

as

    set nocount on

    select @value = (
        select value
                from dbo.dtproperties
                where @id=objectid and @property=property
                )
GO
/****** Object:  StoredProcedure [dbo].[dt_displayoaerror]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
CREATE PROCEDURE [dbo].[dt_displayoaerror]
    @iObject int,
    @iresult int
as

set nocount on

declare @vchOutput      varchar(255)
declare @hr             int
declare @vchSource      varchar(255)
declare @vchDescription varchar(255)

    exec @hr = master.dbo.sp_OAGetErrorInfo @iObject, @vchSource OUT, @vchDescription OUT

    select @vchOutput = @vchSource + ': ' + @vchDescription
    raiserror (@vchOutput,16,-1)

    return
GO
/****** Object:  StoredProcedure [dbo].[dt_adduserobject_vcs]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create procedure [dbo].[dt_adduserobject_vcs]
    @vchProperty varchar(64)

as

set nocount on

declare @iReturn int
    /*
    ** Create the user object if it does not exist already
    */
    begin transaction
        select @iReturn = objectid from dbo.dtproperties where property = @vchProperty
        if @iReturn IS NULL
        begin
            insert dbo.dtproperties (property) VALUES (@vchProperty)
            update dbo.dtproperties set objectid=@@identity
                    where id=@@identity and property=@vchProperty
            select @iReturn = @@identity
        end
    commit
    return @iReturn
GO
/****** Object:  Table [dbo].[SystemLog]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemLog](
	[SystemLogID] [int] IDENTITY(1,1) NOT NULL,
	[ObjectType] [varchar](2) NOT NULL,
	[EventType] [varchar](2) NOT NULL,
	[ObjectID] [int] NOT NULL,
	[UserID] [int] NOT NULL,
	[HostIP] [varchar](50) NOT NULL,
	[Module] [varchar](200) NOT NULL,
	[EventDate] [datetime] NOT NULL,
	[Comment] [varchar](400) NOT NULL,
	[InstitutionID] [int] NOT NULL,
 CONSTRAINT [PK_SystemLog] PRIMARY KEY CLUSTERED 
(
	[SystemLogID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'System Log ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemLog', @level2type=N'COLUMN',@level2name=N'SystemLogID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Object Type(''xx'' - system, ''pl'' - plan, ''cr'' - critical function, ''ac'' - action item, ''us'' - user account' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemLog', @level2type=N'COLUMN',@level2name=N'ObjectType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'EventType(''in'' - login, ''cr'' - created, ''md'' - modified, ''dl'' - deleted, ''ac'' - accessed,''rw'' - review info)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemLog', @level2type=N'COLUMN',@level2name=N'EventType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ObjectID (0 for system login/logout)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemLog', @level2type=N'COLUMN',@level2name=N'ObjectID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User ID responsible for Event' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemLog', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Host IP of responsible user' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemLog', @level2type=N'COLUMN',@level2name=N'HostIP'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'UC Ready module responsible for event' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemLog', @level2type=N'COLUMN',@level2name=N'Module'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Event DateTime' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemLog', @level2type=N'COLUMN',@level2name=N'EventDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemLog', @level2type=N'COLUMN',@level2name=N'Comment'
GO
/****** Object:  StoredProcedure [dbo].[dt_getobjwithprop_u]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	Retrieve the owner object(s) of a given property
*/
create procedure [dbo].[dt_getobjwithprop_u]
	@property varchar(30),
	@uvalue nvarchar(255)
as
	set nocount on

	if (@property is null) or (@property = '')
	begin
		raiserror('Must specify a property name.',-1,-1)
		return (1)
	end

	if (@uvalue is null)
		select objectid id from dbo.dtproperties
			where property=@property

	else
		select objectid id from dbo.dtproperties
			where property=@property and uvalue=@uvalue
GO
/****** Object:  StoredProcedure [dbo].[dt_getpropertiesbyid_u]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	Retrieve properties by id's
**
**	dt_getproperties objid, null or '' -- retrieve all properties of the object itself
**	dt_getproperties objid, property -- retrieve the property specified
*/
create procedure [dbo].[dt_getpropertiesbyid_u]
	@id int,
	@property varchar(64)
as
	set nocount on

	if (@property is null) or (@property = '')
		select property, version, uvalue, lvalue
			from dbo.dtproperties
			where  @id=objectid
	else
		select property, version, uvalue, lvalue
			from dbo.dtproperties
			where  @id=objectid and @property=property
GO
/****** Object:  StoredProcedure [dbo].[dt_dropuserobjectbyid]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	Drop an object from the dbo.dtproperties table
*/
create procedure [dbo].[dt_dropuserobjectbyid]
	@id int
as
	set nocount on
	delete from dbo.dtproperties where objectid=@id
GO
/****** Object:  StoredProcedure [dbo].[dt_droppropertiesbyid]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	Drop one or all the associated properties of an object or an attribute 
**
**	dt_dropproperties objid, null or '' -- drop all properties of the object itself
**	dt_dropproperties objid, property -- drop the property
*/
create procedure [dbo].[dt_droppropertiesbyid]
	@id int,
	@property varchar(64)
as
	set nocount on

	if (@property is null) or (@property = '')
		delete from dbo.dtproperties where objectid=@id
	else
		delete from dbo.dtproperties 
			where objectid=@id and property=@property
GO
/****** Object:  Table [dbo].[DescriptionLookup]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DescriptionLookup](
	[LookupID] [int] IDENTITY(1,1) NOT NULL,
	[LookupName] [varchar](50) NOT NULL,
	[LookupValue] [varchar](50) NOT NULL,
	[LookupDescription] [varchar](400) NOT NULL,
 CONSTRAINT [PK_DescriptionLookup] PRIMARY KEY NONCLUSTERED 
(
	[LookupID] 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
CREATE CLUSTERED INDEX [IX_DescriptionLookup] ON [dbo].[DescriptionLookup] 
(
	[LookupName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DescriptionLookup', @level2type=N'COLUMN',@level2name=N'LookupID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Lookup Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DescriptionLookup', @level2type=N'COLUMN',@level2name=N'LookupName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Lookup Value' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DescriptionLookup', @level2type=N'COLUMN',@level2name=N'LookupValue'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Lookup Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DescriptionLookup', @level2type=N'COLUMN',@level2name=N'LookupDescription'
GO
/****** Object:  StoredProcedure [dbo].[dt_vcsenabled]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_vcsenabled]

as

set nocount on

declare @iObjectId int
select @iObjectId = 0

declare @VSSGUID varchar(100)
select @VSSGUID = 'SQLVersionControl.VCS_SQL'

    declare @iReturn int
    exec @iReturn = master.dbo.sp_OACreate @VSSGUID, @iObjectId OUT
    if @iReturn <> 0 raiserror('', 16, -1) /* Can't Load Helper DLLC */
GO
/****** Object:  Table [dbo].[SystemDomainGroup]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemDomainGroup](
	[InstGroupID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](100) NOT NULL,
 CONSTRAINT [PK_SystemDomainGroup] PRIMARY KEY CLUSTERED 
(
	[InstGroupID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainGroup', @level2type=N'COLUMN',@level2name=N'InstGroupID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution Group Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainGroup', @level2type=N'COLUMN',@level2name=N'Name'
GO
/****** Object:  Table [dbo].[UserSecurity]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[UserSecurity](
	[UserID] [int] IDENTITY(1,1) NOT NULL,
	[AuthID] [varchar](256) NULL,
	[InstitutionID] [int] NOT NULL,
	[SecurityType] [char](1) NOT NULL,
	[FirstName] [varchar](20) NOT NULL,
	[LastName] [varchar](30) NOT NULL,
	[WorkPhone] [varchar](50) NOT NULL,
	[HomePhone] [varchar](20) NOT NULL,
	[CellPhone] [varchar](20) NOT NULL,
	[EMailRegular] [varchar](50) NOT NULL,
	[EMailBackup] [varchar](50) NOT NULL,
	[WorkFAX] [varchar](20) NOT NULL,
	[Title] [varchar](200) NOT NULL,
	[DepartmentName] [varchar](100) NOT NULL,
	[DepartmentOrg] [varchar](20) NOT NULL,
	[DepartmentOrgHierarchy] [varchar](100) NOT NULL,
	[WorkAddress] [varchar](300) NOT NULL,
	[HomeAddress] [varchar](300) NOT NULL,
	[AccessStatus] [char](1) NOT NULL,
	[LockStatus] [char](1) NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[Affiliations] [varchar](300) NOT NULL,
	[Password] [varchar](50) NOT NULL,
	[SecurityAttribute] [int] NOT NULL,
	[DirectoryID] [varchar](256) NOT NULL
) ON [PRIMARY]
SET ANSI_PADDING OFF
ALTER TABLE [dbo].[UserSecurity] ADD [ModApprovedFlag] [char](1) NULL
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [PK_UserSecurity] PRIMARY KEY NONCLUSTERED 
(
	[UserID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE CLUSTERED INDEX [IX_UserSecurity_1] ON [dbo].[UserSecurity] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_UserSecurity] ON [dbo].[UserSecurity] 
(
	[AuthID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_UserSecurity_2] ON [dbo].[UserSecurity] 
(
	[FirstName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_UserSecurity_3] ON [dbo].[UserSecurity] 
(
	[LastName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID for authentication method used, user name for application provided security' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'AuthID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Security Type(''0'' - System Admin, ''1'' - Local admin, ''2'' - Universal viewer, ''9'' - local user' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'SecurityType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'First Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'FirstName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Last Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'LastName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Day Phone' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'WorkPhone'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Home Phone' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'HomePhone'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Cell Phone' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'CellPhone'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Regular EMail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'EMailRegular'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Backup EMail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'EMailBackup'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Work FAX' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'WorkFAX'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Title' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'Title'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Primary Department' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'DepartmentName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Department ORG' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'DepartmentOrg'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Department Org OrgHierarchy' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'DepartmentOrgHierarchy'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Work Address' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'WorkAddress'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Home Address' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'HomeAddress'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Access Status(''1'' - enabled/On, ''0'' - disabled/Off)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'AccessStatus'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Lock Status(''0'' - unlocked, ''1'' - locked) prevents automatic update if set)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'LockStatus'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Account Created Date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'CreatedDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User Affiliation' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'Affiliations'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User password for application based security' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserSecurity', @level2type=N'COLUMN',@level2name=N'Password'
GO
/****** Object:  Table [dbo].[SystemUIText]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemUIText](
	[UITextID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[UIText] [varchar](max) NOT NULL,
 CONSTRAINT [PK_SystemUIText] PRIMARY KEY CLUSTERED 
(
	[UITextID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemUIText', @level2type=N'COLUMN',@level2name=N'UITextID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemUIText', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'UI Text' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemUIText', @level2type=N'COLUMN',@level2name=N'UIText'
GO
/****** Object:  Table [dbo].[lookup_items]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[lookup_items](
	[lookup_id] [int] NOT NULL,
	[lookup_item_no] [int] NOT NULL,
	[lookup_item_id] [varchar](256) NOT NULL,
	[lookup_item_desc] [varchar](256) NOT NULL,
 CONSTRAINT [PK_lookup_items] PRIMARY KEY CLUSTERED 
(
	[lookup_id] ASC,
	[lookup_item_no] 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:  Table [dbo].[SystemSetup]    Script Date: 05/20/2011 14:41:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemSetup](
	[SystemID] [int] IDENTITY(1,1) NOT NULL,
	[SystemName] [varchar](100) NOT NULL,
	[Description] [varchar](400) NOT NULL,
	[Logo] [varbinary](max) NULL,
	[Phone] [varchar](20) NOT NULL,
	[Fax] [varchar](20) NOT NULL,
	[EMail] [varchar](50) NOT NULL,
	[SystemStatus] [char](1) NOT NULL,
	[Version] [varchar](10) NOT NULL,
	[ReleaseDate] [datetime] NOT NULL,
	[DefaultSamplePlan] [varbinary](max) NULL,
 CONSTRAINT [PK_SystemSetup] PRIMARY KEY CLUSTERED 
(
	[SystemID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemSetup', @level2type=N'COLUMN',@level2name=N'SystemID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'System Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemSetup', @level2type=N'COLUMN',@level2name=N'SystemName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'System Image' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemSetup', @level2type=N'COLUMN',@level2name=N'Logo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Support Phone' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemSetup', @level2type=N'COLUMN',@level2name=N'Phone'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Support Fax' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemSetup', @level2type=N'COLUMN',@level2name=N'Fax'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Support email' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemSetup', @level2type=N'COLUMN',@level2name=N'EMail'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'System Staus(''1'' - prod mode, ''0'' - maint mode)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemSetup', @level2type=N'COLUMN',@level2name=N'SystemStatus'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'System Version' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemSetup', @level2type=N'COLUMN',@level2name=N'Version'
GO
/****** Object:  Table [dbo].[SystemCriticalLevelAppl]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemCriticalLevelAppl](
	[LevelID] [int] IDENTITY(1,1) NOT NULL,
	[LevelNo] [varchar](2) NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[Descr] [varchar](100) NOT NULL,
	[LongDescr] [varchar](max) NOT NULL,
 CONSTRAINT [PK_SystemCriticalLevelAppl] PRIMARY KEY CLUSTERED 
(
	[LevelID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'LevelID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Level Number' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'LevelNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'Descr'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Long Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'LongDescr'
GO
/****** Object:  Table [dbo].[SystemCriticalLevelFunc]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemCriticalLevelFunc](
	[LevelID] [int] IDENTITY(1,1) NOT NULL,
	[LevelNo] [varchar](2) NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[Descr] [varchar](100) NOT NULL,
	[LongDescr] [varchar](max) NOT NULL,
 CONSTRAINT [PK_SystemCriticalLevelFunc] PRIMARY KEY CLUSTERED 
(
	[LevelID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'LevelID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Level Number' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'LevelNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'Descr'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Long Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'LongDescr'
GO
/****** Object:  Table [dbo].[key_utility]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_utility](
	[ku_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[UtilityID] [int] NOT NULL,
	[comment] [varchar](max) NOT NULL,
 CONSTRAINT [PK_key_utility] PRIMARY KEY CLUSTERED 
(
	[ku_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity field for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_utility', @level2type=N'COLUMN',@level2name=N'ku_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_utility', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'utility ID ftom Admin table' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_utility', @level2type=N'COLUMN',@level2name=N'UtilityID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_utility', @level2type=N'COLUMN',@level2name=N'comment'
GO
/****** Object:  Table [dbo].[key_team_members]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_team_members](
	[ktm_id] [int] IDENTITY(1,1) NOT NULL,
	[kt_id] [int] NOT NULL,
	[UserID] [int] NOT NULL,
	[first_name] [varchar](20) NOT NULL,
	[last_name] [varchar](30) NOT NULL,
	[description] [varchar](400) NOT NULL,
 CONSTRAINT [PK_key_team_members] PRIMARY KEY CLUSTERED 
(
	[ktm_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_team_members', @level2type=N'COLUMN',@level2name=N'ktm_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Key Team ID from ke_teams table' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_team_members', @level2type=N'COLUMN',@level2name=N'kt_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User ID(if team member picked from directory)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_team_members', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Member first name(should be '''' if UserID exist)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_team_members', @level2type=N'COLUMN',@level2name=N'first_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Member last name(should be '''' if UserID exist)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_team_members', @level2type=N'COLUMN',@level2name=N'last_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'description of member responsibility' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_team_members', @level2type=N'COLUMN',@level2name=N'description'
GO
/****** Object:  Table [dbo].[plans_instructions]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[plans_instructions](
	[pis_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[InstructionalDepartmentID] [int] NOT NULL,
	[b_bSpace_usage] [char](1) NOT NULL,
	[b_bSpace_expand] [char](1) NOT NULL,
	[b_bSpace_comment] [varchar](max) NOT NULL,
	[b_bSpace_grade_usage] [char](1) NOT NULL,
	[b_bSpace_grade_expand] [char](1) NOT NULL,
	[b_bSpace_grade_comment] [varchar](max) NOT NULL,
	[b_gsi_communication_usage] [char](1) NOT NULL,
	[b_gsi_communication_expand] [char](1) NOT NULL,
	[b_gsi_communication_comment] [varchar](max) NOT NULL,
	[b_common_materials_usage] [char](1) NOT NULL,
	[b_common_materials_expand] [char](1) NOT NULL,
	[b_common_materials_comment] [varchar](max) NOT NULL,
	[c_prioritize_course] [char](1) NOT NULL,
	[c_prioritize_comment] [varchar](max) NOT NULL,
	[c_communication] [char](1) NOT NULL,
	[c_communication_comment] [varchar](max) NOT NULL,
	[c_backup_personnel] [char](1) NOT NULL,
	[c_backup_personnel_comment] [varchar](max) NOT NULL,
	[c_faculty_recall] [char](1) NOT NULL,
	[c_faculty_recall_comment] [varchar](max) NOT NULL,
	[c_pedagogy] [char](1) NOT NULL,
	[c_pedagogy_comment] [varchar](max) NOT NULL,
 CONSTRAINT [PK_plans_instructions] PRIMARY KEY CLUSTERED 
(
	[pis_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'pis_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Instructional Department ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'InstructionalDepartmentID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'b_bSpace_usage (''1''=None,''2''=Some courses,''3''=Many courses,''4''=All courses,''5''=Not sure; default=''0'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_bSpace_usage'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(1=Yes,2=No,3=Maybe; default=0)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_bSpace_expand'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_bSpace_comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(''1''=None,''2''=Some courses,''3''=Many courses,''4''=All courses,''5''=Not sure; default=''0'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_bSpace_grade_usage'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(1=Yes,2=No,3=Maybe; default=0)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_bSpace_grade_expand'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_bSpace_grade_comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(''1''=None,''2''=Some courses,''3''=Many courses,''4''=All courses,''5''=Not sure; default=''0'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_gsi_communication_usage'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(1=Yes,2=No,3=Maybe; default=0)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_gsi_communication_expand'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_gsi_communication_comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(''1''=None,''2''=Some courses,''3''=Many courses,''4''=All courses,''5''=Not sure; default=''0'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_common_materials_usage'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(1=Yes,2=No,3=Maybe; default=0)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_common_materials_expand'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'b_common_materials_comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(''1''=Yes,''2''=No,''3''=Partially; default=''0'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_prioritize_course'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_prioritize_comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(''1''=Yes,''2''=No,''3''=Partially; default=''0'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_communication'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_communication_comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(''1''=Yes,''2''=No,''3''=Partially; default=''0'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_backup_personnel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_backup_personnel_comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(''1''=Yes,''2''=No,''3''=Partially; default=''0'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_faculty_recall'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_faculty_recall_comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(''1''=Yes,''2''=No,''3''=Partially; default=''0'')' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_pedagogy'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plans_instructions', @level2type=N'COLUMN',@level2name=N'c_pedagogy_comment'
GO
/****** Object:  Table [dbo].[instruction_teaching_issues]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[instruction_teaching_issues](
	[iti_id] [int] IDENTITY(1,1) NOT NULL,
	[pis_id] [int] NOT NULL,
	[name] [varchar](128) NOT NULL,
	[impact] [varchar](1024) NOT NULL,
	[alternatives] [varchar](1024) NOT NULL,
 CONSTRAINT [PK_instruction_teaching_issues] PRIMARY KEY CLUSTERED 
(
	[iti_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_teaching_issues', @level2type=N'COLUMN',@level2name=N'iti_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_teaching_issues', @level2type=N'COLUMN',@level2name=N'name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Impact' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_teaching_issues', @level2type=N'COLUMN',@level2name=N'impact'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Alternatives' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_teaching_issues', @level2type=N'COLUMN',@level2name=N'alternatives'
GO
/****** Object:  Table [dbo].[instruction_high_priority]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[instruction_high_priority](
	[ihp_id] [int] IDENTITY(1,1) NOT NULL,
	[pis_id] [int] NOT NULL,
	[course_number] [varchar](20) NOT NULL,
	[course_title] [varchar](128) NOT NULL,
	[course_cast] [char](1) NOT NULL,
	[bspace] [bit] NOT NULL,
	[other_can_teach] [bit] NOT NULL,
	[comment] [varchar](max) NOT NULL,
 CONSTRAINT [PK_instruction_high_priority] PRIMARY KEY CLUSTERED 
(
	[ihp_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'identity field for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_high_priority', @level2type=N'COLUMN',@level2name=N'ihp_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'pis_id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_high_priority', @level2type=N'COLUMN',@level2name=N'pis_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Course Number' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_high_priority', @level2type=N'COLUMN',@level2name=N'course_number'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Course title' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_high_priority', @level2type=N'COLUMN',@level2name=N'course_title'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Course Cast (''0'' - default, ''1'' - available, ''2'' - available but outdated, ''3'' - not available)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_high_priority', @level2type=N'COLUMN',@level2name=N'course_cast'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'bSpace' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_high_priority', @level2type=N'COLUMN',@level2name=N'bspace'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'other can teach' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'instruction_high_priority', @level2type=N'COLUMN',@level2name=N'other_can_teach'
GO
/****** Object:  Table [dbo].[cf_dependency]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[cf_dependency](
	[cid] [int] NOT NULL,
	[DependencyID] [int] NOT NULL,
 CONSTRAINT [PK_cf_dependency] PRIMARY KEY CLUSTERED 
(
	[cid] ASC,
	[DependencyID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Critical Function ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'cf_dependency', @level2type=N'COLUMN',@level2name=N'cid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Dependency ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'cf_dependency', @level2type=N'COLUMN',@level2name=N'DependencyID'
GO
/****** Object:  Table [dbo].[key_skills]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_skills](
	[ks_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[SkillID] [int] NOT NULL,
	[comment] [varchar](max) NOT NULL,
 CONSTRAINT [PK_key_skills] PRIMARY KEY CLUSTERED 
(
	[ks_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity ley for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_skills', @level2type=N'COLUMN',@level2name=N'ks_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_skills', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Skill ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_skills', @level2type=N'COLUMN',@level2name=N'SkillID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_skills', @level2type=N'COLUMN',@level2name=N'comment'
GO
/****** Object:  Table [dbo].[key_staffing_req]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[key_staffing_req](
	[ksr_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[cid] [int] NOT NULL,
	[StaffCategoryID] [int] NOT NULL,
	[ShiftID] [int] NOT NULL,
	[FTE_normal] [numeric](8, 2) NOT NULL,
	[FTE_crisis] [numeric](8, 2) NOT NULL,
 CONSTRAINT [PK_key_staffing_req] PRIMARY KEY CLUSTERED 
(
	[ksr_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staffing_req', @level2type=N'COLUMN',@level2name=N'ksr_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staffing_req', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Critical Function ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staffing_req', @level2type=N'COLUMN',@level2name=N'cid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'StaffCategoryID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staffing_req', @level2type=N'COLUMN',@level2name=N'StaffCategoryID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Shift ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staffing_req', @level2type=N'COLUMN',@level2name=N'ShiftID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'FTE required under normal conditions ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staffing_req', @level2type=N'COLUMN',@level2name=N'FTE_normal'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'FTE required during crisis' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staffing_req', @level2type=N'COLUMN',@level2name=N'FTE_crisis'
GO
/****** Object:  Table [dbo].[key_work_home]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_work_home](
	[wh_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[name] [varchar](50) NOT NULL,
	[comment] [text] NOT NULL,
	[disabled] [char](1) NOT NULL,
	[currently_does] [varchar](2) NOT NULL,
	[office_pc_must_on] [varchar](2) NOT NULL,
	[institution_position] [varchar](2) NOT NULL,
	[broadband_connection] [varchar](2) NOT NULL,
	[old_wh_id] [int] NOT NULL,
 CONSTRAINT [pk_wh_id] PRIMARY KEY CLUSTERED 
(
	[wh_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] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Currently does connect from home ID(''1'' - yes, ''2'' - probably, ''3'' - probably not, ''4'' - Don''t know' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_work_home', @level2type=N'COLUMN',@level2name=N'currently_does'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Must his/her office computer be running (''1'' - Yes, ''2'' - No, ''3'' - Don''t know)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_work_home', @level2type=N'COLUMN',@level2name=N'office_pc_must_on'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'position (''1'' - Faculty, ''2'' - Staff, ''3'' - Other)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_work_home', @level2type=N'COLUMN',@level2name=N'institution_position'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'broadband connection (''1'' -  yes, ''2'' - No, ''3'' - Probably, ''4'' - Probably not, ''5'' - Don''t know' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_work_home', @level2type=N'COLUMN',@level2name=N'broadband_connection'
GO
/****** Object:  Table [dbo].[user_plan]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[user_plan](
	[uid] [varchar](20) NOT NULL,
	[pid] [int] NOT NULL,
	[UserID] [int] NOT NULL,
	[PlanAccess] [char](1) NOT NULL,
	[AddedDate] [datetime] NOT NULL,
	[PlanCreatorFlag] [char](1) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User Id from UserSecurity Table' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'user_plan', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan Access( ''2'' - modify, ''3'' - view)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'user_plan', @level2type=N'COLUMN',@level2name=N'PlanAccess'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User added to plan date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'user_plan', @level2type=N'COLUMN',@level2name=N'AddedDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan Creator flag(''1'' - creator, ''0'' - no)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'user_plan', @level2type=N'COLUMN',@level2name=N'PlanCreatorFlag'
GO
/****** Object:  Table [dbo].[key_plan_documents]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_plan_documents](
	[kpd_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[name] [varchar](80) NOT NULL,
	[owner_department] [varchar](100) NOT NULL,
	[original_file_name] [varchar](120) NOT NULL,
	[location_kept] [varchar](256) NOT NULL,
	[comment] [varchar](max) NOT NULL,
	[description] [varchar](800) NOT NULL,
	[mediumID] [varchar](2) NOT NULL,
	[contacts] [varchar](512) NOT NULL,
	[backup_measures] [varchar](512) NOT NULL,
	[uploaded_file] [varbinary](max) NULL,
	[old_kpd_id] [int] NOT NULL,
 CONSTRAINT [PK_key_documents] PRIMARY KEY CLUSTERED 
(
	[kpd_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Medium ID (linked to DocumentMedium in DescriptionLookup table)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_plan_documents', @level2type=N'COLUMN',@level2name=N'mediumID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Contacts(may need separate table to keep UserIds for contacts)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_plan_documents', @level2type=N'COLUMN',@level2name=N'contacts'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'backup_measures' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_plan_documents', @level2type=N'COLUMN',@level2name=N'backup_measures'
GO
/****** Object:  Table [dbo].[plan_contacts]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[plan_contacts](
	[pid] [int] NOT NULL,
	[UserID] [int] NOT NULL,
	[ContactComment] [varchar](100) NOT NULL,
	[ContactType] [char](1) NOT NULL,
	[AddedDate] [datetime] NOT NULL,
	[ContactID] [int] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_plan_contacts] PRIMARY KEY CLUSTERED 
(
	[ContactID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_contacts', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Contact UserID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_contacts', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Contact Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_contacts', @level2type=N'COLUMN',@level2name=N'ContactComment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Contact Type(''1'' - primary, ''0'' - not primary) Plan creator becomes primary by default' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_contacts', @level2type=N'COLUMN',@level2name=N'ContactType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Conact Added Date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_contacts', @level2type=N'COLUMN',@level2name=N'AddedDate'
GO
/****** Object:  Table [dbo].[key_staff_unit]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_staff_unit](
	[ksu_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[first_name] [varchar](20) NOT NULL,
	[last_name] [varchar](30) NOT NULL,
	[description] [varchar](200) NOT NULL,
	[special_skill] [varchar](512) NOT NULL,
	[title_or_function] [varchar](258) NOT NULL,
	[comment] [varchar](max) NOT NULL,
	[disabled] [char](1) NOT NULL,
	[first_successor] [char](1) NOT NULL,
	[second_successor] [char](1) NOT NULL,
	[third_successor] [char](1) NOT NULL,
	[holds_formal_delegation] [char](1) NOT NULL,
	[old_ksu_id] [int] NOT NULL,
 CONSTRAINT [PK_key_staff_unit] PRIMARY KEY CLUSTERED 
(
	[ksu_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'first successor (''1'' - checked, ''0'' - unchecked)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staff_unit', @level2type=N'COLUMN',@level2name=N'first_successor'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'second successor (''1'' - checked, ''0'' - unchecked)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staff_unit', @level2type=N'COLUMN',@level2name=N'second_successor'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'third successor (''1'' - checked, ''0'' - unchecked)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staff_unit', @level2type=N'COLUMN',@level2name=N'third_successor'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'holds_formal_delegation (''1'' - checked, ''0'' - unchecked)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_staff_unit', @level2type=N'COLUMN',@level2name=N'holds_formal_delegation'
GO
/****** Object:  Table [dbo].[it_servers]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[it_servers](
	[it_server_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[name] [varchar](128) NOT NULL,
	[type_server] [varchar](50) NOT NULL,
	[explanation] [text] NOT NULL,
	[backup_frequency] [varchar](30) NOT NULL,
	[backup_media] [varchar](30) NOT NULL,
	[auto_manual] [varchar](30) NOT NULL,
	[location_onsite] [text] NOT NULL,
	[location_offsite] [text] NOT NULL,
	[frequency_offsite] [varchar](30) NOT NULL,
	[successful_recovery] [varchar](30) NOT NULL,
	[successful_recovery_explain] [text] NOT NULL,
	[disabled] [char](1) NOT NULL,
	[apps_impacted] [text] NOT NULL,
	[depts_impacted] [text] NOT NULL,
	[server_software] [text] NOT NULL,
	[tech] [text] NOT NULL,
	[responsible_person] [text] NOT NULL,
	[location_disks_docs] [text] NOT NULL,
	[old_it_server_id] [int] NOT NULL,
 CONSTRAINT [PK_it_servers] PRIMARY KEY CLUSTERED 
(
	[it_server_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] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[it_central_applications]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[it_central_applications](
	[RecordID] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[CriticalityLevel] [varchar](2) NOT NULL,
	[CentralApplicationID] [int] NOT NULL,
	[Comment] [varchar](max) NOT NULL,
 CONSTRAINT [PK_it_central_applications] PRIMARY KEY CLUSTERED 
(
	[RecordID] 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
CREATE NONCLUSTERED INDEX [IX_it_central_applications] ON [dbo].[it_central_applications] 
(
	[pid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'it_central_applications', @level2type=N'COLUMN',@level2name=N'RecordID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'it_central_applications', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Application Name(may never be used)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'it_central_applications', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Criticality Level(''0'' - not critical,''1'' level 1,''2'' level 2,''3'' level 3,''4'' - level 4)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'it_central_applications', @level2type=N'COLUMN',@level2name=N'CriticalityLevel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Central Application ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'it_central_applications', @level2type=N'COLUMN',@level2name=N'CentralApplicationID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'it_central_applications', @level2type=N'COLUMN',@level2name=N'Comment'
GO
/****** Object:  Table [dbo].[it_applications]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[it_applications](
	[it_application_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[name] [varchar](128) NOT NULL,
	[functional_owner] [text] NOT NULL,
	[technical_owner] [text] NOT NULL,
	[application_type] [varchar](30) NOT NULL,
	[backup_frequency] [varchar](30) NOT NULL,
	[location_disks_docs] [text] NOT NULL,
	[responsible_person] [text] NOT NULL,
	[tech] [text] NOT NULL,
	[depts_impacted] [text] NOT NULL,
	[campus_systems] [text] NOT NULL,
	[data_from_core] [varchar](10) NOT NULL,
	[transaction_processing] [varchar](10) NOT NULL,
	[backup_media] [varchar](30) NOT NULL,
	[auto_manual] [varchar](30) NOT NULL,
	[location_onsite] [text] NOT NULL,
	[location_offsite] [text] NOT NULL,
	[frequency_offsite] [varchar](30) NOT NULL,
	[successful_recovery] [varchar](30) NOT NULL,
	[successful_recovery_explain] [text] NOT NULL,
	[disabled] [char](1) NOT NULL,
	[old_it_application_id] [int] NOT NULL,
 CONSTRAINT [PK_it] PRIMARY KEY CLUSTERED 
(
	[it_application_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] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[key_teams]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_teams](
	[kt_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[team_name] [varchar](128) NOT NULL,
	[team_purpose] [varchar](512) NOT NULL,
	[team_comment] [varchar](max) NOT NULL,
 CONSTRAINT [PK_key_teams] PRIMARY KEY CLUSTERED 
(
	[kt_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_teams', @level2type=N'COLUMN',@level2name=N'kt_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_teams', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'team_name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_teams', @level2type=N'COLUMN',@level2name=N'team_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'team_purpose' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_teams', @level2type=N'COLUMN',@level2name=N'team_purpose'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'team comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_teams', @level2type=N'COLUMN',@level2name=N'team_comment'
GO
/****** Object:  Table [dbo].[key_communication]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_communication](
	[k_id] [int] IDENTITY(1,1) NOT NULL,
	[key_comm_prompt] [char](2) NOT NULL,
	[pid] [int] NOT NULL,
	[name] [varchar](50) NOT NULL,
	[location] [varchar](50) NOT NULL,
	[description] [varchar](50) NOT NULL,
	[comment] [varchar](256) NOT NULL,
	[disabled] [char](1) NOT NULL,
	[old_k_id] [int] NOT NULL,
 CONSTRAINT [PK_key_communication] PRIMARY KEY CLUSTERED 
(
	[k_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:  Table [dbo].[plan_unit_heads]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[plan_unit_heads](
	[UnitHeadID] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[UserID] [int] NOT NULL,
	[UnitHeadComment] [varchar](100) NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_plan_unit_heads] PRIMARY KEY CLUSTERED 
(
	[UnitHeadID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_unit_heads', @level2type=N'COLUMN',@level2name=N'UnitHeadID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_unit_heads', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_unit_heads', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_unit_heads', @level2type=N'COLUMN',@level2name=N'UnitHeadComment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date Created' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_unit_heads', @level2type=N'COLUMN',@level2name=N'CreatedDate'
GO
/****** Object:  Table [dbo].[key_stakeholders]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_stakeholders](
	[ks_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[first_name] [varchar](20) NOT NULL,
	[last_name] [varchar](30) NOT NULL,
	[dept] [varchar](100) NOT NULL,
	[address] [varchar](400) NOT NULL,
	[email] [varchar](80) NOT NULL,
	[comment] [varchar](max) NOT NULL,
	[work_phone] [varchar](20) NOT NULL,
	[cell_phone] [varchar](20) NOT NULL,
	[fax] [varchar](20) NOT NULL,
	[alternate_vendors] [varchar](255) NOT NULL,
	[disabled] [char](1) NOT NULL,
	[stakeholder_type] [varchar](2) NOT NULL,
	[product_service] [varchar](256) NOT NULL,
	[old_ks_id] [int] NOT NULL,
 CONSTRAINT [PK_key_stakeholders] PRIMARY KEY CLUSTERED 
(
	[ks_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'ks_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'First Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'first_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Last Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'last_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Department/Company' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'dept'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Address' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'address'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'email' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'email'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Disabled (''Y'' - yes, ''N'' - no)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'disabled'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Stakeholder Type (''1'' - client, ''2'' - donor, ''3'' - sponsor, ''4'' - vendor, ''5'' - project partner,''6'' -  other stakeholder, ''7'' - other)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'stakeholder_type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Product Service' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_stakeholders', @level2type=N'COLUMN',@level2name=N'product_service'
GO
/****** Object:  Table [dbo].[key_staff_other_units]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_staff_other_units](
	[kso_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[first_name] [varchar](30) NOT NULL,
	[last_name] [varchar](30) NOT NULL,
	[dept] [varchar](50) NOT NULL,
	[address] [varchar](256) NOT NULL,
	[email] [varchar](80) NOT NULL,
	[comment] [text] NOT NULL,
	[work_phone] [varchar](20) NOT NULL,
	[cell_phone] [varchar](20) NOT NULL,
	[fax] [varchar](20) NOT NULL,
	[disabled] [char](1) NOT NULL,
	[old_kso_id] [int] NOT NULL,
 CONSTRAINT [PK_key_staff_other_units] PRIMARY KEY CLUSTERED 
(
	[kso_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] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[action_items]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[action_items](
	[a_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[cid] [int] NOT NULL,
	[a_type] [varchar](1) NOT NULL,
	[name] [varchar](612) NOT NULL,
	[cost] [varchar](20) NOT NULL,
	[cost_is] [varchar](25) NOT NULL,
	[scope] [varchar](258) NOT NULL,
	[disabled] [char](1) NOT NULL,
	[comment] [varchar](max) NOT NULL,
	[status] [varchar](1) NOT NULL,
	[old_a_id] [int] NOT NULL,
	[pis_id] [int] NOT NULL,
 CONSTRAINT [PK_action_items] PRIMARY KEY CLUSTERED 
(
	[a_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'''I'' is for action item from IT, ''G'' is action item from faculty preparedness, '''' is for critical function AND all other type of action items.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'action_items', @level2type=N'COLUMN',@level2name=N'a_type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'action_items', @level2type=N'COLUMN',@level2name=N'comment'
GO
/****** Object:  Table [dbo].[critical_functions]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[critical_functions](
	[cid] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[name] [varchar](128) NOT NULL,
	[CriticalityLevel] [varchar](2) NOT NULL,
	[description] [text] NOT NULL,
	[priority] [int] NOT NULL,
	[unit_performs] [text] NOT NULL,
	[responsible_person] [text] NOT NULL,
	[peak_jan] [char](1) NOT NULL,
	[peak_feb] [char](1) NOT NULL,
	[peak_mar] [char](1) NOT NULL,
	[peak_apr] [char](1) NOT NULL,
	[peak_may] [char](1) NOT NULL,
	[peak_jun] [char](1) NOT NULL,
	[peak_jul] [char](1) NOT NULL,
	[peak_aug] [char](1) NOT NULL,
	[peak_sep] [char](1) NOT NULL,
	[peak_oct] [char](1) NOT NULL,
	[peak_nov] [char](1) NOT NULL,
	[peak_dec] [char](1) NOT NULL,
	[explanation] [text] NOT NULL,
	[how_space] [text] NOT NULL,
	[how_equipment] [text] NOT NULL,
	[how_staff] [text] NOT NULL,
	[how_unique_skills] [text] NOT NULL,
	[how_work_at_home] [text] NOT NULL,
	[how_network_access] [text] NOT NULL,
	[how_show_stoppers] [text] NOT NULL,
	[how_campus_closure] [varchar](10) NOT NULL,
	[comment] [text] NOT NULL,
	[how_risk] [text] NOT NULL,
	[how_policy_exceptions] [text] NOT NULL,
	[how_timing] [varchar](80) NOT NULL,
	[how_additional_vulnerabilities] [text] NOT NULL,
	[con_disruption_teaching] [char](1) NOT NULL,
	[con_disruption_teaching_explain] [varchar](300) NOT NULL,
	[con_disruption_research] [char](1) NOT NULL,
	[con_disruption_research_explain] [varchar](300) NOT NULL,
	[con_loss_faculty] [char](1) NOT NULL,
	[con_loss_faculty_explain] [varchar](300) NOT NULL,
	[con_loss_staff] [char](1) NOT NULL,
	[con_loss_staff_explain] [varchar](300) NOT NULL,
	[con_loss_students] [char](1) NOT NULL,
	[con_loss_students_explain] [varchar](300) NOT NULL,
	[con_well_being_staff] [char](1) NOT NULL,
	[con_well_being_staff_explain] [varchar](300) NOT NULL,
	[con_well_being_students] [char](1) NOT NULL,
	[con_well_being_students_explain] [varchar](300) NOT NULL,
	[con_payment_deadline] [char](1) NOT NULL,
	[con_payment_deadline_explain] [varchar](300) NOT NULL,
	[con_loss_revenue] [char](1) NOT NULL,
	[con_loss_revenue_explain] [varchar](300) NOT NULL,
	[con_legal_obligations] [char](1) NOT NULL,
	[con_legal_obligations_explain] [varchar](300) NOT NULL,
	[con_legal_harm] [char](1) NOT NULL,
	[con_legal_harm_explain] [varchar](300) NOT NULL,
	[con_impact_other_campus] [char](1) NOT NULL,
	[con_impact_other_campus_explain] [varchar](300) NOT NULL,
	[con_impact_business] [char](1) NOT NULL,
	[con_impact_business_explain] [varchar](300) NOT NULL,
	[con_other] [char](1) NOT NULL,
	[con_other_explain] [varchar](300) NOT NULL,
	[con_disruption_patientcare] [char](1) NOT NULL,
	[con_disruption_patientcare_explain] [varchar](300) NOT NULL,
	[disabled] [char](1) NOT NULL,
	[old_cid] [int] NOT NULL,
 CONSTRAINT [PK_critical_functions] PRIMARY KEY CLUSTERED 
(
	[cid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CriticalityLevel corresponds value in descriptionLookup' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'critical_functions', @level2type=N'COLUMN',@level2name=N'CriticalityLevel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'con_disruption_patientcare(''1'' - checked, ''0'' - not)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'critical_functions', @level2type=N'COLUMN',@level2name=N'con_disruption_patientcare'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'con_disruption_patientcare_explain' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'critical_functions', @level2type=N'COLUMN',@level2name=N'con_disruption_patientcare_explain'
GO
/****** Object:  Table [dbo].[plan_buildings]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[plan_buildings](
	[pid] [int] NOT NULL,
	[BuildingID] [int] NOT NULL,
	[BuildingComment] [varchar](max) NOT NULL,
 CONSTRAINT [PK_plan_buildings] PRIMARY KEY CLUSTERED 
(
	[pid] ASC,
	[BuildingID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Building Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_buildings', @level2type=N'COLUMN',@level2name=N'BuildingComment'
GO
/****** Object:  Table [dbo].[PlannerLog]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PlannerLog](
	[PlannerLogID] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[PlannerCategoryID] [int] NOT NULL,
	[Description] [varchar](max) NOT NULL,
	[Note] [varchar](max) NOT NULL,
	[AlertFlag] [char](1) NOT NULL,
	[AlertStartDate] [datetime] NULL,
	[AlertEndDate] [datetime] NULL,
	[AlertPeriod] [char](1) NOT NULL,
	[AlertList] [varchar](400) NOT NULL,
	[CreateDate] [datetime] NOT NULL,
 CONSTRAINT [PK_PlannerLog] PRIMARY KEY NONCLUSTERED 
(
	[PlannerLogID] 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
CREATE CLUSTERED INDEX [IX_PlannerLog] ON [dbo].[PlannerLog] 
(
	[pid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Field for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'PlannerLogID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Planner Category ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'PlannerCategoryID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'Description'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Note' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'Note'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Alert Flag(''0'' - no, ''1'' - yes)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'AlertFlag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Alert Start date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'AlertStartDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Alert End Date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'AlertEndDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Alert Period(''1'' - one time, ''2'' - weekly, ''3'' - monhly, ''4'' - quaterly, ''5'' - yearly' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'AlertPeriod'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'List of accounts ID separated by comma' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'AlertList'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Crate Date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerLog', @level2type=N'COLUMN',@level2name=N'CreateDate'
GO
/****** Object:  Table [dbo].[plan_reviewers]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[plan_reviewers](
	[pr_id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NOT NULL,
	[review_type] [char](1) NOT NULL,
	[first_name] [varchar](50) NOT NULL,
	[last_name] [varchar](50) NOT NULL,
	[review_date] [datetime] NOT NULL,
	[head_or_designee] [char](1) NOT NULL,
	[enter_by] [int] NOT NULL,
	[enter_date_time] [datetime] NOT NULL,
 CONSTRAINT [PK_plan_reviewers] PRIMARY KEY CLUSTERED 
(
	[pr_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_reviewers', @level2type=N'COLUMN',@level2name=N'pr_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_reviewers', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'review type (''A'' - annual review, ''C'' - complete reveiw)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_reviewers', @level2type=N'COLUMN',@level2name=N'review_type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'first name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_reviewers', @level2type=N'COLUMN',@level2name=N'first_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'last name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_reviewers', @level2type=N'COLUMN',@level2name=N'last_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'review date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_reviewers', @level2type=N'COLUMN',@level2name=N'review_date'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Head or Designee (''H'' - head, ''D'' - designee)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_reviewers', @level2type=N'COLUMN',@level2name=N'head_or_designee'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User ID record created by' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_reviewers', @level2type=N'COLUMN',@level2name=N'enter_by'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date and time record created' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_reviewers', @level2type=N'COLUMN',@level2name=N'enter_date_time'
GO
/****** Object:  Table [dbo].[plan_department_types]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[plan_department_types](
	[pid] [int] NOT NULL,
	[DepartmentTypeID] [int] NOT NULL,
 CONSTRAINT [PK_plan_department_types] PRIMARY KEY CLUSTERED 
(
	[pid] ASC,
	[DepartmentTypeID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_department_types', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'DepartmentType ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'plan_department_types', @level2type=N'COLUMN',@level2name=N'DepartmentTypeID'
GO
/****** Object:  Table [dbo].[Reference]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Reference](
	[ReferenceID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Reference] [varchar](max) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_Reference] PRIMARY KEY NONCLUSTERED 
(
	[ReferenceID] 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
CREATE NONCLUSTERED INDEX [IX_Reference] ON [dbo].[Reference] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Reference', @level2type=N'COLUMN',@level2name=N'ReferenceID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Reference', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Reference' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Reference', @level2type=N'COLUMN',@level2name=N'Reference'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Reference Priority' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Reference', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[FAQ]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[FAQ](
	[FAQID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Question] [varchar](max) NOT NULL,
	[Answer] [varchar](max) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_FAQ] PRIMARY KEY NONCLUSTERED 
(
	[FAQID] 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
CREATE CLUSTERED INDEX [IX_FAQ] ON [dbo].[FAQ] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FAQ', @level2type=N'COLUMN',@level2name=N'FAQID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FAQ', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Question' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FAQ', @level2type=N'COLUMN',@level2name=N'Question'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Answer' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FAQ', @level2type=N'COLUMN',@level2name=N'Answer'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Priority' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FAQ', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[SystemDomainUIImage]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemDomainUIImage](
	[UIImageID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[UIImage] [varbinary](max) NOT NULL,
	[UIImageType] [varchar](10) NOT NULL,
 CONSTRAINT [PK_SystemDomainUIImage] PRIMARY KEY CLUSTERED 
(
	[UIImageID] 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
CREATE UNIQUE NONCLUSTERED INDEX [IX_SystemDomainUIImage] ON [dbo].[SystemDomainUIImage] 
(
	[InstitutionID] ASC,
	[Name] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainUIImage', @level2type=N'COLUMN',@level2name=N'UIImageID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainUIImage', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainUIImage', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'UI Image' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainUIImage', @level2type=N'COLUMN',@level2name=N'UIImage'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'UI Image Type' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainUIImage', @level2type=N'COLUMN',@level2name=N'UIImageType'
GO
/****** Object:  Table [dbo].[SystemDomainUIText]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemDomainUIText](
	[UITextID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[UIText] [varchar](max) NOT NULL,
 CONSTRAINT [PK_SystemDomainUIText] PRIMARY KEY CLUSTERED 
(
	[UITextID] 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
CREATE UNIQUE NONCLUSTERED INDEX [IX_SystemDomainUIText] ON [dbo].[SystemDomainUIText] 
(
	[InstitutionID] ASC,
	[Name] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainUIText', @level2type=N'COLUMN',@level2name=N'UITextID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainUIText', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainUIText', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'UI Text' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainUIText', @level2type=N'COLUMN',@level2name=N'UIText'
GO
/****** Object:  Table [dbo].[Building]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Building](
	[BuildingID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[CAAN] [varchar](5) NOT NULL,
	[BuildingName] [varchar](50) NULL,
	[BuildingCommonName] [varchar](50) NOT NULL,
	[BuildingAddress] [varchar](400) NOT NULL,
	[Ownership] [char](1) NOT NULL,
 CONSTRAINT [PK_Building] PRIMARY KEY NONCLUSTERED 
(
	[BuildingID] 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
CREATE CLUSTERED INDEX [IX_Building] ON [dbo].[Building] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Building', @level2type=N'COLUMN',@level2name=N'BuildingID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CAAN No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Building', @level2type=N'COLUMN',@level2name=N'CAAN'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Building Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Building', @level2type=N'COLUMN',@level2name=N'BuildingName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Building Common Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Building', @level2type=N'COLUMN',@level2name=N'BuildingCommonName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Building Address' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Building', @level2type=N'COLUMN',@level2name=N'BuildingAddress'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ownership(''1'' - owned,''0'' - rented)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Building', @level2type=N'COLUMN',@level2name=N'Ownership'
GO
/****** Object:  Table [dbo].[NetDomain]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[NetDomain](
	[NetDomainID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](100) NOT NULL,
	[InstitutionID] [int] NOT NULL,
 CONSTRAINT [PK_NetDomain] PRIMARY KEY CLUSTERED 
(
	[NetDomainID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'NetDomain', @level2type=N'COLUMN',@level2name=N'NetDomainID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Domain Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'NetDomain', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'NetDomain', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
/****** Object:  Table [dbo].[SystemDomainCriticalLevelFunc]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemDomainCriticalLevelFunc](
	[LevelID] [int] IDENTITY(1,1) NOT NULL,
	[LevelNo] [varchar](2) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[Descr] [varchar](100) NOT NULL,
	[LongDescr] [varchar](max) NOT NULL,
 CONSTRAINT [PK_SystemDomainCriticalLevelFunc] PRIMARY KEY CLUSTERED 
(
	[LevelID] 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
CREATE UNIQUE NONCLUSTERED INDEX [IX_SystemDomainCriticalLevelFunc] ON [dbo].[SystemDomainCriticalLevelFunc] 
(
	[InstitutionID] ASC,
	[LevelNo] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'LevelID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Level Number' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'LevelNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'Descr'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Long Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelFunc', @level2type=N'COLUMN',@level2name=N'LongDescr'
GO
/****** Object:  Table [dbo].[SystemDomainCriticalLevelAppl]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemDomainCriticalLevelAppl](
	[LevelID] [int] IDENTITY(1,1) NOT NULL,
	[LevelNo] [varchar](2) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[Descr] [varchar](100) NOT NULL,
	[LongDescr] [varchar](max) NOT NULL,
 CONSTRAINT [PK_SystemDomainCriticalLevelAppl] PRIMARY KEY CLUSTERED 
(
	[LevelID] 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
CREATE UNIQUE NONCLUSTERED INDEX [IX_SystemDomainCriticalLevelAppl] ON [dbo].[SystemDomainCriticalLevelAppl] 
(
	[InstitutionID] ASC,
	[LevelNo] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'LevelID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Level Number' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'LevelNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'Descr'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Long Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomainCriticalLevelAppl', @level2type=N'COLUMN',@level2name=N'LongDescr'
GO
/****** Object:  Table [dbo].[ThingsToKnow]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ThingsToKnow](
	[ThingsToKnowID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[ThingsToKnowItem] [varchar](max) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_ThingsToKnow] PRIMARY KEY NONCLUSTERED 
(
	[ThingsToKnowID] 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
CREATE CLUSTERED INDEX [IX_ThingsToKnow] ON [dbo].[ThingsToKnow] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ThingsToKnow', @level2type=N'COLUMN',@level2name=N'ThingsToKnowID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ThingsToKnow', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Item' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ThingsToKnow', @level2type=N'COLUMN',@level2name=N'ThingsToKnowItem'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Priority(order in which show to users)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ThingsToKnow', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[DepartmentType]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DepartmentType](
	[DepartmentTypeId] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[DepartmentType] [varchar](50) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_DepartmentType] PRIMARY KEY NONCLUSTERED 
(
	[DepartmentTypeId] 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
CREATE CLUSTERED INDEX [IX_DepartmentType] ON [dbo].[DepartmentType] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DepartmentType', @level2type=N'COLUMN',@level2name=N'DepartmentTypeId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DepartmentType', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Department Type' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DepartmentType', @level2type=N'COLUMN',@level2name=N'DepartmentType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Order No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DepartmentType', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[PlannerCategory]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PlannerCategory](
	[PlannerCategoryId] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Item] [varchar](50) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_PlannerCategory] PRIMARY KEY NONCLUSTERED 
(
	[PlannerCategoryId] 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
CREATE CLUSTERED INDEX [IX_PlannerCategory] ON [dbo].[PlannerCategory] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerCategory', @level2type=N'COLUMN',@level2name=N'PlannerCategoryId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerCategory', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Planner Category Item' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerCategory', @level2type=N'COLUMN',@level2name=N'Item'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Priority' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PlannerCategory', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[CentralApplication]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CentralApplication](
	[CentralApplicationID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[RecordType] [char](1) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_CentralApplication] PRIMARY KEY NONCLUSTERED 
(
	[CentralApplicationID] 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
CREATE CLUSTERED INDEX [IX_CentralApplication] ON [dbo].[CentralApplication] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CentralApplication', @level2type=N'COLUMN',@level2name=N'CentralApplicationID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CentralApplication', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Central Application/System Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CentralApplication', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'record Type (''S'' - Admin entered, ''U'' - user entered)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CentralApplication', @level2type=N'COLUMN',@level2name=N'RecordType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Order No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CentralApplication', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[ContactUs]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ContactUs](
	[ContactID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Contact] [varchar](max) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_ContactUs] PRIMARY KEY NONCLUSTERED 
(
	[ContactID] 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
CREATE CLUSTERED INDEX [IX_ContactUs] ON [dbo].[ContactUs] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ContactUs', @level2type=N'COLUMN',@level2name=N'ContactID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ContactUs', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Contact Info' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ContactUs', @level2type=N'COLUMN',@level2name=N'Contact'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Order No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ContactUs', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[Dependency]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Dependency](
	[DependencyID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Dependency] [varchar](100) NOT NULL,
	[DependencyType] [char](1) NOT NULL,
	[RecordType] [char](1) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_Dependency] PRIMARY KEY NONCLUSTERED 
(
	[DependencyID] 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
CREATE CLUSTERED INDEX [IX_Dependency] ON [dbo].[Dependency] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dependency', @level2type=N'COLUMN',@level2name=N'DependencyID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dependency', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Dependency Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dependency', @level2type=N'COLUMN',@level2name=N'Dependency'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Dependency Type(''1'' – upstream, ''0'' – downstream)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dependency', @level2type=N'COLUMN',@level2name=N'DependencyType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Record Type(''S'' - admins added, ''U'' - user added)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dependency', @level2type=N'COLUMN',@level2name=N'RecordType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Order No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dependency', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[AnnualReview]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[AnnualReview](
	[AnnualReviewID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[ReviewItem] [varchar](max) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_AnnualReview] PRIMARY KEY NONCLUSTERED 
(
	[AnnualReviewID] 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
CREATE CLUSTERED INDEX [IX_AnnualReview] ON [dbo].[AnnualReview] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AnnualReview', @level2type=N'COLUMN',@level2name=N'AnnualReviewID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AnnualReview', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Annual Review' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AnnualReview', @level2type=N'COLUMN',@level2name=N'ReviewItem'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Prioriry' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AnnualReview', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[Acronym]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Acronym](
	[AcronymID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Acronym] [varchar](25) NULL,
	[FullName] [varchar](60) NULL,
 CONSTRAINT [PK_Acronym] PRIMARY KEY NONCLUSTERED 
(
	[AcronymID] 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
CREATE CLUSTERED INDEX [IX_Acronym] ON [dbo].[Acronym] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Acronym', @level2type=N'COLUMN',@level2name=N'AcronymID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Acronym', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Acronym' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Acronym', @level2type=N'COLUMN',@level2name=N'Acronym'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Full Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Acronym', @level2type=N'COLUMN',@level2name=N'FullName'
GO
/****** Object:  Table [dbo].[Utility]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Utility](
	[UtilityID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_Utility] PRIMARY KEY NONCLUSTERED 
(
	[UtilityID] 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
CREATE CLUSTERED INDEX [IX_Utility] ON [dbo].[Utility] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Utility', @level2type=N'COLUMN',@level2name=N'UtilityID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Utility', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Utility Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Utility', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'order No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Utility', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[StaffCategory]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[StaffCategory](
	[StaffCategoryID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionId] [int] NOT NULL,
	[StaffCategory] [varchar](50) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_StaffCategory] PRIMARY KEY NONCLUSTERED 
(
	[StaffCategoryID] 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
CREATE CLUSTERED INDEX [IX_StaffCategory] ON [dbo].[StaffCategory] 
(
	[InstitutionId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StaffCategory', @level2type=N'COLUMN',@level2name=N'StaffCategoryID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StaffCategory', @level2type=N'COLUMN',@level2name=N'InstitutionId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Staff Category' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StaffCategory', @level2type=N'COLUMN',@level2name=N'StaffCategory'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Priority' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StaffCategory', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[FunctionExample]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[FunctionExample](
	[FunctionExampleID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[PlanList] [varchar](max) NOT NULL,
 CONSTRAINT [PK_FunctionExample] PRIMARY KEY CLUSTERED 
(
	[FunctionExampleID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FunctionExample', @level2type=N'COLUMN',@level2name=N'FunctionExampleID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'InstitutionId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FunctionExample', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Plan List to use functions from' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FunctionExample', @level2type=N'COLUMN',@level2name=N'PlanList'
GO
/****** Object:  Table [dbo].[Skill]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Skill](
	[SkillID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[Description] [varchar](400) NOT NULL,
	[RecordType] [char](1) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_Skill] PRIMARY KEY NONCLUSTERED 
(
	[SkillID] 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
CREATE CLUSTERED INDEX [IX_Skill] ON [dbo].[Skill] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Skill', @level2type=N'COLUMN',@level2name=N'SkillID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Skill', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Skill Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Skill', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Skill description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Skill', @level2type=N'COLUMN',@level2name=N'Description'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Record type(''S'' - system admin recorded, ''U'' - User recorded''' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Skill', @level2type=N'COLUMN',@level2name=N'RecordType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Order No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Skill', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[MajorDivision]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[MajorDivision](
	[MajorDivisionID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[MajorDivisionName] [varchar](50) NOT NULL,
 CONSTRAINT [PK_Division] PRIMARY KEY NONCLUSTERED 
(
	[MajorDivisionID] 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
CREATE CLUSTERED INDEX [IX_Division] ON [dbo].[MajorDivision] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MajorDivision', @level2type=N'COLUMN',@level2name=N'MajorDivisionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MajorDivision', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Division Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MajorDivision', @level2type=N'COLUMN',@level2name=N'MajorDivisionName'
GO
/****** Object:  Table [dbo].[Shift]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Shift](
	[ShiftID] [int] IDENTITY(1,1) NOT NULL,
	[InstitutionID] [int] NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[OrderNo] [int] NOT NULL,
 CONSTRAINT [PK_Shift] PRIMARY KEY NONCLUSTERED 
(
	[ShiftID] 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
CREATE CLUSTERED INDEX [IX_Shift] ON [dbo].[Shift] 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Shift', @level2type=N'COLUMN',@level2name=N'ShiftID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Shift', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Shift Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Shift', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Order No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Shift', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
/****** Object:  Table [dbo].[SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SystemDomain](
	[InstitutionID] [int] IDENTITY(1,1) NOT NULL,
	[Institution] [varchar](50) NOT NULL,
	[InstitutionType] [char](1) NOT NULL,
	[InstitutionOrgList] [varchar](2000) NOT NULL,
	[AuthLocation] [varchar](1024) NOT NULL,
	[AuthType] [char](1) NOT NULL,
	[Domain] [int] NOT NULL,
	[News] [varchar](max) NOT NULL,
	[NewsExpirationDate] [datetime] NOT NULL,
	[Tips] [varchar](max) NOT NULL,
	[TipsExpirationDate] [datetime] NOT NULL,
	[Logo] [varbinary](max) NULL,
	[Phone] [varchar](20) NOT NULL,
	[Fax] [varchar](20) NOT NULL,
	[EMail] [varchar](50) NOT NULL,
	[InstitutionAccess] [char](1) NOT NULL,
	[DirectoryAccess] [char](1) NOT NULL,
	[TeamsScreenFlag] [char](1) NOT NULL,
	[SkillsScreenFlag] [char](1) NOT NULL,
	[StaffingScreenFlag] [char](1) NOT NULL,
	[ExamplesScreenFlag] [char](1) NOT NULL,
	[LBNLFlag] [char](1) NOT NULL,
	[SamplePlan] [varbinary](max) NULL
) ON [PRIMARY]
SET ANSI_PADDING OFF
ALTER TABLE [dbo].[SystemDomain] ADD [ReplaceStep4Flag] [char](1) NOT NULL
ALTER TABLE [dbo].[SystemDomain] ADD [Instruction_URL] [varchar](512) NOT NULL
ALTER TABLE [dbo].[SystemDomain] ADD [InstGroupID] [int] NULL
SET ANSI_PADDING ON
ALTER TABLE [dbo].[SystemDomain] ADD [InstGroup] [varchar](50) NULL
ALTER TABLE [dbo].[SystemDomain] ADD [SystemName] [varchar](100) NULL
ALTER TABLE [dbo].[SystemDomain] ADD [Moderation] [char](1) NULL
SET ANSI_PADDING OFF
ALTER TABLE [dbo].[SystemDomain] ADD [CustomUrl] [varchar](100) NULL
ALTER TABLE [dbo].[SystemDomain] ADD [ShibUniqueID] [varchar](100) NULL
ALTER TABLE [dbo].[SystemDomain] ADD [CriticalLvlDtlsFlag] [char](1) NOT NULL
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [PK_SystemDomain] PRIMARY KEY CLUSTERED 
(
	[InstitutionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identity Key' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'InstitutionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'Institution'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution Type(''0'' - Primary,''1'' - Member)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'InstitutionType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution Org List(used for member institutions)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'InstitutionOrgList'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Auth Location(Primary location idientifier received after authentication) ('''' for member institutions)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'AuthLocation'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'AuthType(''0'' - security provided by UCReady password, ''1'' -commont auth method(shib), ''2'' - individual  security provided by institution local auth)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'AuthType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Domain(Institution ID providing IDP)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'Domain'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution News' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'News'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'News Expiration Date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'NewsExpirationDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution Tips' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'Tips'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Tips Expiration Date' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'TipsExpirationDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution Image' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'Logo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Support Phone' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'Phone'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Support Fax' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'Fax'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Support EMail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'EMail'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Institution Access( ''0'' -System Administrators, ''1'' - local Administrators,''2''- local Users)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'InstitutionAccess'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'People Directory Access(LDAP/DS) (''1'' - yes, ''0'' - no)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'DirectoryAccess'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Teams Screen Flag(1- show Teams screen, 0 – no show)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'TeamsScreenFlag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Skills Screen Flag(1- show Skills screen, 0 – no show)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'SkillsScreenFlag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Staffing Screen Flag(1- show Staffing screen, 0 – no show)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'StaffingScreenFlag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Examples Screen Flag(1- show Examples screen, 0 – no show)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'ExamplesScreenFlag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'LBNL Flag(''1'' - yes, ''0'' - no)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SystemDomain', @level2type=N'COLUMN',@level2name=N'LBNLFlag'
GO
/****** Object:  Table [dbo].[AdminTestMode]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AdminTestMode](
	[UserID] [int] NOT NULL,
 CONSTRAINT [PK_AdminTestMode] PRIMARY KEY NONCLUSTERED 
(
	[UserID] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminTestMode', @level2type=N'COLUMN',@level2name=N'UserID'
GO
/****** Object:  Table [dbo].[key_critical_function_documents]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[key_critical_function_documents](
	[kcd_id] [int] IDENTITY(1,1) NOT NULL,
	[cid] [int] NOT NULL,
	[name] [varchar](80) NOT NULL,
	[owner_department] [varchar](100) NOT NULL,
	[original_file_name] [varchar](120) NOT NULL,
	[location_kept] [varchar](256) NOT NULL,
	[comment] [varchar](max) NOT NULL,
	[description] [varchar](800) NOT NULL,
	[mediumID] [varchar](2) NOT NULL,
	[contacts] [varchar](1024) NOT NULL,
	[backup_measures] [varchar](512) NOT NULL,
	[uploaded_file] [varbinary](max) NULL,
	[old_kcd_id] [int] NOT NULL,
 CONSTRAINT [PK_key_critical_function_documents] PRIMARY KEY CLUSTERED 
(
	[kcd_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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'identity key for the record' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'kcd_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'crritical function ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'cid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Document Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Owner Department' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'owner_department'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Original file name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'original_file_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'location kept' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'location_kept'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'comment'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'description'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Medium ID (linked to DocumentMedium in DescriptionLookup table)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'mediumID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'contacts(may need separate table to store user id''s)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'contacts'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'backup measures' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'backup_measures'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'uploaded file' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'key_critical_function_documents', @level2type=N'COLUMN',@level2name=N'uploaded_file'
GO
/****** Object:  StoredProcedure [dbo].[dt_setpropertybyid_u]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*
**	If the property already exists, reset the value; otherwise add property
**		id -- the id in sysobjects of the object
**		property -- the name of the property
**		uvalue -- the text value of the property
**		lvalue -- the binary value of the property (image)
*/
create procedure [dbo].[dt_setpropertybyid_u]
	@id int,
	@property varchar(64),
	@uvalue nvarchar(255),
	@lvalue image
as
	set nocount on
	-- 
	-- If we are writing the name property, find the ansi equivalent. 
	-- If there is no lossless translation, generate an ansi name. 
	-- 
	declare @avalue varchar(255) 
	set @avalue = null 
	if (@uvalue is not null) 
	begin 
		if (convert(nvarchar(255), convert(varchar(255), @uvalue)) = @uvalue) 
		begin 
			set @avalue = convert(varchar(255), @uvalue) 
		end 
		else 
		begin 
			if 'DtgSchemaNAME' = @property 
			begin 
				exec dbo.dt_generateansiname @avalue output 
			end 
		end 
	end 
	if exists (select * from dbo.dtproperties 
			where objectid=@id and property=@property)
	begin
		--
		-- bump the version count for this row as we update it
		--
		update dbo.dtproperties set value=@avalue, uvalue=@uvalue, lvalue=@lvalue, version=version+1
			where objectid=@id and property=@property
	end
	else
	begin
		--
		-- version count is auto-set to 0 on initial insert
		--
		insert dbo.dtproperties (property, objectid, value, uvalue, lvalue)
			values (@property, @id, @avalue, @uvalue, @lvalue)
	end
GO
/****** Object:  StoredProcedure [dbo].[dt_addtosourcecontrol]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_addtosourcecontrol]
    @vchSourceSafeINI varchar(255) = '',
    @vchProjectName   varchar(255) ='',
    @vchComment       varchar(255) ='',
    @vchLoginName     varchar(255) ='',
    @vchPassword      varchar(255) =''

as

set nocount on

declare @iReturn int
declare @iObjectId int
select @iObjectId = 0

declare @iStreamObjectId int
select @iStreamObjectId = 0

declare @VSSGUID varchar(100)
select @VSSGUID = 'SQLVersionControl.VCS_SQL'

declare @vchDatabaseName varchar(255)
select @vchDatabaseName = db_name()

declare @iReturnValue int
select @iReturnValue = 0

declare @iPropertyObjectId int
declare @vchParentId varchar(255)

declare @iObjectCount int
select @iObjectCount = 0

    exec @iReturn = master.dbo.sp_OACreate @VSSGUID, @iObjectId OUT
    if @iReturn <> 0 GOTO E_OAError


    /* Create Project in SS */
    exec @iReturn = master.dbo.sp_OAMethod @iObjectId,
											'AddProjectToSourceSafe',
											NULL,
											@vchSourceSafeINI,
											@vchProjectName output,
											@@SERVERNAME,
											@vchDatabaseName,
											@vchLoginName,
											@vchPassword,
											@vchComment


    if @iReturn <> 0 GOTO E_OAError

    /* Set Database Properties */

    begin tran SetProperties

    /* add high level object */

    exec @iPropertyObjectId = dbo.dt_adduserobject_vcs 'VCSProjectID'

    select @vchParentId = CONVERT(varchar(255),@iPropertyObjectId)

    exec dbo.dt_setpropertybyid @iPropertyObjectId, 'VCSProjectID', @vchParentId , NULL
    exec dbo.dt_setpropertybyid @iPropertyObjectId, 'VCSProject' , @vchProjectName , NULL
    exec dbo.dt_setpropertybyid @iPropertyObjectId, 'VCSSourceSafeINI' , @vchSourceSafeINI , NULL
    exec dbo.dt_setpropertybyid @iPropertyObjectId, 'VCSSQLServer', @@SERVERNAME, NULL
    exec dbo.dt_setpropertybyid @iPropertyObjectId, 'VCSSQLDatabase', @vchDatabaseName, NULL

    if @@error <> 0 GOTO E_General_Error

    commit tran SetProperties
    
    select @iObjectCount = 0;

CleanUp:
    select @vchProjectName
    select @iObjectCount
    return

E_General_Error:
    /* this is an all or nothing.  No specific error messages */
    goto CleanUp

E_OAError:
    exec dbo.dt_displayoaerror @iObjectId, @iReturn
    goto CleanUp
GO
/****** Object:  StoredProcedure [dbo].[dt_removefromsourcecontrol]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create procedure [dbo].[dt_removefromsourcecontrol]

as

    set nocount on

    declare @iPropertyObjectId int
    select @iPropertyObjectId = (select objectid from dbo.dtproperties where property = 'VCSProjectID')

    exec dbo.dt_droppropertiesbyid @iPropertyObjectId, null

    /* -1 is returned by dt_droppopertiesbyid */
    if @@error <> 0 and @@error <> -1 return 1

    return 0
GO
/****** Object:  StoredProcedure [dbo].[dt_getpropertiesbyid_vcs_u]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create procedure [dbo].[dt_getpropertiesbyid_vcs_u]
    @id       int,
    @property varchar(64),
    @value    nvarchar(255) = NULL OUT

as

    -- This procedure should no longer be called;  dt_getpropertiesbyid_vcsshould be called instead.
	-- Calls are forwarded to dt_getpropertiesbyid_vcs to maintain backward compatibility.
	set nocount on
    exec dbo.dt_getpropertiesbyid_vcs
		@id,
		@property,
		@value output
GO
/****** Object:  StoredProcedure [dbo].[dt_whocheckedout]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_whocheckedout]
        @chObjectType  char(4),
        @vchObjectName varchar(255),
        @vchLoginName  varchar(255),
        @vchPassword   varchar(255)

as

set nocount on

declare @iReturn int
declare @iObjectId int
select @iObjectId =0

declare @VSSGUID varchar(100)
select @VSSGUID = 'SQLVersionControl.VCS_SQL'

    declare @iPropertyObjectId int

    select @iPropertyObjectId = (select objectid from dbo.dtproperties where property = 'VCSProjectID')

    declare @vchProjectName   varchar(255)
    declare @vchSourceSafeINI varchar(255)
    declare @vchServerName    varchar(255)
    declare @vchDatabaseName  varchar(255)
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSProject',       @vchProjectName   OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSourceSafeINI', @vchSourceSafeINI OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSQLServer',     @vchServerName    OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSQLDatabase',   @vchDatabaseName  OUT

    if @chObjectType = 'PROC'
    begin
        exec @iReturn = master.dbo.sp_OACreate @VSSGUID, @iObjectId OUT

        if @iReturn <> 0 GOTO E_OAError

        declare @vchReturnValue varchar(255)
        select @vchReturnValue = ''

        exec @iReturn = master.dbo.sp_OAMethod @iObjectId,
												'WhoCheckedOut',
												@vchReturnValue OUT,
												@sProjectName = @vchProjectName,
												@sSourceSafeINI = @vchSourceSafeINI,
												@sObjectName = @vchObjectName,
												@sServerName = @vchServerName,
												@sDatabaseName = @vchDatabaseName,
												@sLoginName = @vchLoginName,
												@sPassword = @vchPassword

        if @iReturn <> 0 GOTO E_OAError

        select @vchReturnValue

    end

CleanUp:
    return

E_OAError:
    exec dbo.dt_displayoaerror @iObjectId, @iReturn
    GOTO CleanUp
GO
/****** Object:  StoredProcedure [dbo].[dt_validateloginparams]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_validateloginparams]
    @vchLoginName  varchar(255),
    @vchPassword   varchar(255)
as

set nocount on

declare @iReturn int
declare @iObjectId int
select @iObjectId =0

declare @VSSGUID varchar(100)
select @VSSGUID = 'SQLVersionControl.VCS_SQL'

    declare @iPropertyObjectId int
    select @iPropertyObjectId = (select objectid from dbo.dtproperties where property = 'VCSProjectID')

    declare @vchSourceSafeINI varchar(255)
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSourceSafeINI', @vchSourceSafeINI OUT

    exec @iReturn = master.dbo.sp_OACreate @VSSGUID, @iObjectId OUT
    if @iReturn <> 0 GOTO E_OAError

    exec @iReturn = master.dbo.sp_OAMethod @iObjectId,
											'ValidateLoginParams',
											NULL,
											@sSourceSafeINI = @vchSourceSafeINI,
											@sLoginName = @vchLoginName,
											@sPassword = @vchPassword
    if @iReturn <> 0 GOTO E_OAError

CleanUp:
    return

E_OAError:
    exec dbo.dt_displayoaerror @iObjectId, @iReturn
    GOTO CleanUp
GO
/****** Object:  StoredProcedure [dbo].[dt_isundersourcecontrol]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_isundersourcecontrol]
    @vchLoginName varchar(255) = '',
    @vchPassword  varchar(255) = '',
    @iWhoToo      int = 0 /* 0 => Just check project; 1 => get list of objs */

as

	set nocount on

	declare @iReturn int
	declare @iObjectId int
	select @iObjectId = 0

	declare @VSSGUID varchar(100)
	select @VSSGUID = 'SQLVersionControl.VCS_SQL'

	declare @iReturnValue int
	select @iReturnValue = 0

	declare @iStreamObjectId int
	select @iStreamObjectId   = 0

	declare @vchTempText varchar(255)

    declare @iPropertyObjectId int
    select @iPropertyObjectId = (select objectid from dbo.dtproperties where property = 'VCSProjectID')

    declare @vchProjectName   varchar(255)
    declare @vchSourceSafeINI varchar(255)
    declare @vchServerName    varchar(255)
    declare @vchDatabaseName  varchar(255)
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSProject',       @vchProjectName   OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSourceSafeINI', @vchSourceSafeINI OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSQLServer',     @vchServerName    OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSQLDatabase',   @vchDatabaseName  OUT

    if (@vchProjectName = '')	set @vchProjectName		= null
    if (@vchSourceSafeINI = '') set @vchSourceSafeINI	= null
    if (@vchServerName = '')	set @vchServerName		= null
    if (@vchDatabaseName = '')	set @vchDatabaseName	= null
    
    if (@vchProjectName is null) or (@vchSourceSafeINI is null) or (@vchServerName is null) or (@vchDatabaseName is null)
    begin
        RAISERROR('Not Under Source Control',16,-1)
        return
    end

    if @iWhoToo = 1
    begin

        /* Get List of Procs in the project */
        exec @iReturn = master.dbo.sp_OACreate @VSSGUID, @iObjectId OUT
        if @iReturn <> 0 GOTO E_OAError

        exec @iReturn = master.dbo.sp_OAMethod @iObjectId,
												'GetListOfObjects',
												NULL,
												@vchProjectName,
												@vchSourceSafeINI,
												@vchServerName,
												@vchDatabaseName,
												@vchLoginName,
												@vchPassword

        if @iReturn <> 0 GOTO E_OAError

        exec @iReturn = master.dbo.sp_OAGetProperty @iObjectId, 'GetStreamObject', @iStreamObjectId OUT

        if @iReturn <> 0 GOTO E_OAError

        create table #ObjectList (id int identity, vchObjectlist varchar(255))

        select @vchTempText = 'STUB'
        while @vchTempText is not null
        begin
            exec @iReturn = master.dbo.sp_OAMethod @iStreamObjectId, 'GetStream', @iReturnValue OUT, @vchTempText OUT
            if @iReturn <> 0 GOTO E_OAError
            
            if (@vchTempText = '') set @vchTempText = null
            if (@vchTempText is not null) insert into #ObjectList (vchObjectlist ) select @vchTempText
        end

        select vchObjectlist from #ObjectList order by id
    end

CleanUp:
    return

E_OAError:
    exec dbo.dt_displayoaerror @iObjectId, @iReturn
    goto CleanUp
GO
/****** Object:  StoredProcedure [dbo].[dt_checkinobject]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_checkinobject]
    @chObjectType  char(4),
    @vchObjectName varchar(255),
    @vchComment    varchar(255)='',
    @vchLoginName  varchar(255),
    @vchPassword   varchar(255)='',
    @iVCSFlags     int = 0,
    @iActionFlag   int = 0,   /* 0 => AddFile, 1 => CheckIn */
    @txStream1     Text = '', /* drop stream   */ /* There is a bug that if items are NULL they do not pass to OLE servers */
    @txStream2     Text = '', /* create stream */
    @txStream3     Text = ''  /* grant stream  */


as

	set nocount on

	declare @iReturn int
	declare @iObjectId int
	select @iObjectId = 0
	declare @iStreamObjectId int

	declare @VSSGUID varchar(100)
	select @VSSGUID = 'SQLVersionControl.VCS_SQL'

	declare @iPropertyObjectId int
	select @iPropertyObjectId  = 0

    select @iPropertyObjectId = (select objectid from dbo.dtproperties where property = 'VCSProjectID')

    declare @vchProjectName   varchar(255)
    declare @vchSourceSafeINI varchar(255)
    declare @vchServerName    varchar(255)
    declare @vchDatabaseName  varchar(255)
    declare @iReturnValue	  int
    declare @pos			  int
    declare @vchProcLinePiece varchar(255)

    
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSProject',       @vchProjectName   OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSourceSafeINI', @vchSourceSafeINI OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSQLServer',     @vchServerName    OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSQLDatabase',   @vchDatabaseName  OUT

    if @chObjectType = 'PROC'
    begin
        if @iActionFlag = 1
        begin
            /* Procedure Can have up to three streams
            Drop Stream, Create Stream, GRANT stream */

            begin tran compile_all

            /* try to compile the streams */
            exec (@txStream1)
            if @@error <> 0 GOTO E_Compile_Fail

            exec (@txStream2)
            if @@error <> 0 GOTO E_Compile_Fail

            exec (@txStream3)
            if @@error <> 0 GOTO E_Compile_Fail
        end

        exec @iReturn = master.dbo.sp_OACreate @VSSGUID, @iObjectId OUT
        if @iReturn <> 0 GOTO E_OAError

        exec @iReturn = master.dbo.sp_OAGetProperty @iObjectId, 'GetStreamObject', @iStreamObjectId OUT
        if @iReturn <> 0 GOTO E_OAError
        
        if @iActionFlag = 1
        begin
            
            declare @iStreamLength int
			
			select @pos=1
			select @iStreamLength = datalength(@txStream2)
			
			if @iStreamLength > 0
			begin
			
				while @pos < @iStreamLength
				begin
						
					select @vchProcLinePiece = substring(@txStream2, @pos, 255)
					
					exec @iReturn = master.dbo.sp_OAMethod @iStreamObjectId, 'AddStream', @iReturnValue OUT, @vchProcLinePiece
            		if @iReturn <> 0 GOTO E_OAError
            		
					select @pos = @pos + 255
					
				end
            
				exec @iReturn = master.dbo.sp_OAMethod @iObjectId,
														'CheckIn_StoredProcedure',
														NULL,
														@sProjectName = @vchProjectName,
														@sSourceSafeINI = @vchSourceSafeINI,
														@sServerName = @vchServerName,
														@sDatabaseName = @vchDatabaseName,
														@sObjectName = @vchObjectName,
														@sComment = @vchComment,
														@sLoginName = @vchLoginName,
														@sPassword = @vchPassword,
														@iVCSFlags = @iVCSFlags,
														@iActionFlag = @iActionFlag,
														@sStream = ''
                                        
			end
        end
        else
        begin
        
            select colid, text into #ProcLines
            from syscomments
            where id = object_id(@vchObjectName)
            order by colid

            declare @iCurProcLine int
            declare @iProcLines int
            select @iCurProcLine = 1
            select @iProcLines = (select count(*) from #ProcLines)
            while @iCurProcLine <= @iProcLines
            begin
                select @pos = 1
                declare @iCurLineSize int
                select @iCurLineSize = len((select text from #ProcLines where colid = @iCurProcLine))
                while @pos <= @iCurLineSize
                begin                
                    select @vchProcLinePiece = convert(varchar(255),
                        substring((select text from #ProcLines where colid = @iCurProcLine),
                                  @pos, 255 ))
                    exec @iReturn = master.dbo.sp_OAMethod @iStreamObjectId, 'AddStream', @iReturnValue OUT, @vchProcLinePiece
                    if @iReturn <> 0 GOTO E_OAError
                    select @pos = @pos + 255                  
                end
                select @iCurProcLine = @iCurProcLine + 1
            end
            drop table #ProcLines

            exec @iReturn = master.dbo.sp_OAMethod @iObjectId,
													'CheckIn_StoredProcedure',
													NULL,
													@sProjectName = @vchProjectName,
													@sSourceSafeINI = @vchSourceSafeINI,
													@sServerName = @vchServerName,
													@sDatabaseName = @vchDatabaseName,
													@sObjectName = @vchObjectName,
													@sComment = @vchComment,
													@sLoginName = @vchLoginName,
													@sPassword = @vchPassword,
													@iVCSFlags = @iVCSFlags,
													@iActionFlag = @iActionFlag,
													@sStream = ''
        end

        if @iReturn <> 0 GOTO E_OAError

        if @iActionFlag = 1
        begin
            commit tran compile_all
            if @@error <> 0 GOTO E_Compile_Fail
        end

    end

CleanUp:
	return

E_Compile_Fail:
	declare @lerror int
	select @lerror = @@error
	rollback tran compile_all
	RAISERROR (@lerror,16,-1)
	goto CleanUp

E_OAError:
	if @iActionFlag = 1 rollback tran compile_all
	exec dbo.dt_displayoaerror @iObjectId, @iReturn
	goto CleanUp
GO
/****** Object:  StoredProcedure [dbo].[dt_checkoutobject]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_checkoutobject]
    @chObjectType  char(4),
    @vchObjectName varchar(255),
    @vchComment    varchar(255),
    @vchLoginName  varchar(255),
    @vchPassword   varchar(255),
    @iVCSFlags     int = 0,
    @iActionFlag   int = 0/* 0 => Checkout, 1 => GetLatest, 2 => UndoCheckOut */

as

	set nocount on

	declare @iReturn int
	declare @iObjectId int
	select @iObjectId =0

	declare @VSSGUID varchar(100)
	select @VSSGUID = 'SQLVersionControl.VCS_SQL'

	declare @iReturnValue int
	select @iReturnValue = 0

	declare @vchTempText varchar(255)

	/* this is for our strings */
	declare @iStreamObjectId int
	select @iStreamObjectId = 0

    declare @iPropertyObjectId int
    select @iPropertyObjectId = (select objectid from dbo.dtproperties where property = 'VCSProjectID')

    declare @vchProjectName   varchar(255)
    declare @vchSourceSafeINI varchar(255)
    declare @vchServerName    varchar(255)
    declare @vchDatabaseName  varchar(255)
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSProject',       @vchProjectName   OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSourceSafeINI', @vchSourceSafeINI OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSQLServer',     @vchServerName    OUT
    exec dbo.dt_getpropertiesbyid_vcs @iPropertyObjectId, 'VCSSQLDatabase',   @vchDatabaseName  OUT

    if @chObjectType = 'PROC'
    begin
        /* Procedure Can have up to three streams
           Drop Stream, Create Stream, GRANT stream */

        exec @iReturn = master.dbo.sp_OACreate @VSSGUID, @iObjectId OUT

        if @iReturn <> 0 GOTO E_OAError

        exec @iReturn = master.dbo.sp_OAMethod @iObjectId,
												'CheckOut_StoredProcedure',
												NULL,
												@sProjectName = @vchProjectName,
												@sSourceSafeINI = @vchSourceSafeINI,
												@sObjectName = @vchObjectName,
												@sServerName = @vchServerName,
												@sDatabaseName = @vchDatabaseName,
												@sComment = @vchComment,
												@sLoginName = @vchLoginName,
												@sPassword = @vchPassword,
												@iVCSFlags = @iVCSFlags,
												@iActionFlag = @iActionFlag

        if @iReturn <> 0 GOTO E_OAError


        exec @iReturn = master.dbo.sp_OAGetProperty @iObjectId, 'GetStreamObject', @iStreamObjectId OUT

        if @iReturn <> 0 GOTO E_OAError

        create table #commenttext (id int identity, sourcecode varchar(255))


        select @vchTempText = 'STUB'
        while @vchTempText is not null
        begin
            exec @iReturn = master.dbo.sp_OAMethod @iStreamObjectId, 'GetStream', @iReturnValue OUT, @vchTempText OUT
            if @iReturn <> 0 GOTO E_OAError
            
            if (@vchTempText = '') set @vchTempText = null
            if (@vchTempText is not null) insert into #commenttext (sourcecode) select @vchTempText
        end

        select 'VCS'=sourcecode from #commenttext order by id
        select 'SQL'=text from syscomments where id = object_id(@vchObjectName) order by colid

    end

CleanUp:
    return

E_OAError:
    exec dbo.dt_displayoaerror @iObjectId, @iReturn
    GOTO CleanUp
GO
/****** Object:  StoredProcedure [dbo].[dt_displayoaerror_u]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
CREATE PROCEDURE [dbo].[dt_displayoaerror_u]
    @iObject int,
    @iresult int
as
	-- This procedure should no longer be called;  dt_displayoaerror should be called instead.
	-- Calls are forwarded to dt_displayoaerror to maintain backward compatibility.
	set nocount on
	exec dbo.dt_displayoaerror
		@iObject,
		@iresult
GO
/****** Object:  StoredProcedure [dbo].[dt_addtosourcecontrol_u]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_addtosourcecontrol_u]
    @vchSourceSafeINI nvarchar(255) = '',
    @vchProjectName   nvarchar(255) ='',
    @vchComment       nvarchar(255) ='',
    @vchLoginName     nvarchar(255) ='',
    @vchPassword      nvarchar(255) =''

as
	-- This procedure should no longer be called;  dt_addtosourcecontrol should be called instead.
	-- Calls are forwarded to dt_addtosourcecontrol to maintain backward compatibility
	set nocount on
	exec dbo.dt_addtosourcecontrol 
		@vchSourceSafeINI, 
		@vchProjectName, 
		@vchComment, 
		@vchLoginName, 
		@vchPassword
GO
/****** Object:  StoredProcedure [dbo].[dt_checkinobject_u]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_checkinobject_u]
    @chObjectType  char(4),
    @vchObjectName nvarchar(255),
    @vchComment    nvarchar(255)='',
    @vchLoginName  nvarchar(255),
    @vchPassword   nvarchar(255)='',
    @iVCSFlags     int = 0,
    @iActionFlag   int = 0,   /* 0 => AddFile, 1 => CheckIn */
    @txStream1     text = '',  /* drop stream   */ /* There is a bug that if items are NULL they do not pass to OLE servers */
    @txStream2     text = '',  /* create stream */
    @txStream3     text = ''   /* grant stream  */

as	
	-- This procedure should no longer be called;  dt_checkinobject should be called instead.
	-- Calls are forwarded to dt_checkinobject to maintain backward compatibility.
	set nocount on
	exec dbo.dt_checkinobject
		@chObjectType,
		@vchObjectName,
		@vchComment,
		@vchLoginName,
		@vchPassword,
		@iVCSFlags,
		@iActionFlag,   
		@txStream1,		
		@txStream2,		
		@txStream3
GO
/****** Object:  StoredProcedure [dbo].[dt_checkoutobject_u]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_checkoutobject_u]
    @chObjectType  char(4),
    @vchObjectName nvarchar(255),
    @vchComment    nvarchar(255),
    @vchLoginName  nvarchar(255),
    @vchPassword   nvarchar(255),
    @iVCSFlags     int = 0,
    @iActionFlag   int = 0/* 0 => Checkout, 1 => GetLatest, 2 => UndoCheckOut */

as

	-- This procedure should no longer be called;  dt_checkoutobject should be called instead.
	-- Calls are forwarded to dt_checkoutobject to maintain backward compatibility.
	set nocount on
	exec dbo.dt_checkoutobject
		@chObjectType,  
		@vchObjectName, 
		@vchComment,    
		@vchLoginName,  
		@vchPassword,  
		@iVCSFlags,    
		@iActionFlag
GO
/****** Object:  StoredProcedure [dbo].[dt_isundersourcecontrol_u]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_isundersourcecontrol_u]
    @vchLoginName nvarchar(255) = '',
    @vchPassword  nvarchar(255) = '',
    @iWhoToo      int = 0 /* 0 => Just check project; 1 => get list of objs */

as
	-- This procedure should no longer be called;  dt_isundersourcecontrol should be called instead.
	-- Calls are forwarded to dt_isundersourcecontrol to maintain backward compatibility.
	set nocount on
	exec dbo.dt_isundersourcecontrol
		@vchLoginName,
		@vchPassword,
		@iWhoToo
GO
/****** Object:  StoredProcedure [dbo].[dt_validateloginparams_u]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_validateloginparams_u]
    @vchLoginName  nvarchar(255),
    @vchPassword   nvarchar(255)
as

	-- This procedure should no longer be called;  dt_validateloginparams should be called instead.
	-- Calls are forwarded to dt_validateloginparams to maintain backward compatibility.
	set nocount on
	exec dbo.dt_validateloginparams
		@vchLoginName,
		@vchPassword
GO
/****** Object:  StoredProcedure [dbo].[dt_whocheckedout_u]    Script Date: 05/20/2011 14:41:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create proc [dbo].[dt_whocheckedout_u]
        @chObjectType  char(4),
        @vchObjectName nvarchar(255),
        @vchLoginName  nvarchar(255),
        @vchPassword   nvarchar(255)

as

	-- This procedure should no longer be called;  dt_whocheckedout should be called instead.
	-- Calls are forwarded to dt_whocheckedout to maintain backward compatibility.
	set nocount on
	exec dbo.dt_whocheckedout
		@chObjectType, 
		@vchObjectName,
		@vchLoginName, 
		@vchPassword
GO
/****** Object:  Default [DF_InstructionalDepartment_InstitutionID]    Script Date: 05/20/2011 14:41:30 ******/
ALTER TABLE [dbo].[InstructionalDepartment] ADD  CONSTRAINT [DF_InstructionalDepartment_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_InstructionalDepartment_DepartmentName]    Script Date: 05/20/2011 14:41:30 ******/
ALTER TABLE [dbo].[InstructionalDepartment] ADD  CONSTRAINT [DF_InstructionalDepartment_DepartmentName]  DEFAULT ('') FOR [DepartmentName]
GO
/****** Object:  Default [DF_BuildingSource_InstitutionID]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[BuildingSource] ADD  CONSTRAINT [DF_BuildingSource_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_BuildingSource_CAAN]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[BuildingSource] ADD  CONSTRAINT [DF_BuildingSource_CAAN]  DEFAULT ('') FOR [CAAN]
GO
/****** Object:  Default [DF_BuildingSource_BuildingName]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[BuildingSource] ADD  CONSTRAINT [DF_BuildingSource_BuildingName]  DEFAULT ('') FOR [BuildingName]
GO
/****** Object:  Default [DF_BuildingSource_BuildingCommonName]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[BuildingSource] ADD  CONSTRAINT [DF_BuildingSource_BuildingCommonName]  DEFAULT ('') FOR [BuildingCommonName]
GO
/****** Object:  Default [DF_BuildingSource_BuildingAddress]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[BuildingSource] ADD  CONSTRAINT [DF_BuildingSource_BuildingAddress]  DEFAULT ('') FOR [BuildingAddress]
GO
/****** Object:  Default [DF_BuildingSource_Ownership]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[BuildingSource] ADD  CONSTRAINT [DF_BuildingSource_Ownership]  DEFAULT ('1') FOR [Ownership]
GO
/****** Object:  Default [DF_plans_InstitutionID]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_InstitutionID]  DEFAULT ((1)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_plans_plan_name]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_plan_name]  DEFAULT ('') FOR [plan_name]
GO
/****** Object:  Default [DF_plans_status]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_status]  DEFAULT ('N') FOR [status]
GO
/****** Object:  Default [DF__plans__acad_staf__436BFEE3]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF__plans__acad_staf__436BFEE3]  DEFAULT ((0)) FOR [acad_staff]
GO
/****** Object:  Default [DF__plans__fulltime___4460231C]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF__plans__fulltime___4460231C]  DEFAULT ((0)) FOR [fulltime_staff]
GO
/****** Object:  Default [DF__plans__parttime___45544755]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF__plans__parttime___45544755]  DEFAULT ((0)) FOR [parttime_staff]
GO
/****** Object:  Default [DF__plans__student_s__46486B8E]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF__plans__student_s__46486B8E]  DEFAULT ((0)) FOR [student_staff]
GO
/****** Object:  Default [DF__plans__other_sta__473C8FC7]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF__plans__other_sta__473C8FC7]  DEFAULT ((0)) FOR [other_staff]
GO
/****** Object:  Default [DF_plans_res_fellows]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_res_fellows]  DEFAULT ((0)) FOR [res_fellows]
GO
/****** Object:  Default [DF_plans_volunteers]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_volunteers]  DEFAULT ((0)) FOR [volunteers]
GO
/****** Object:  Default [DF_plans_guests]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_guests]  DEFAULT ((0)) FOR [guests]
GO
/****** Object:  Default [DF_plans_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF__plans__employ_fa__640DD89F]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF__plans__employ_fa__640DD89F]  DEFAULT ('') FOR [employ_faculty]
GO
/****** Object:  Default [DF_plans_key_workstation_min]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_workstation_min]  DEFAULT ((0)) FOR [key_workstation_min]
GO
/****** Object:  Default [DF_plans_key_workstation_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_workstation_comment]  DEFAULT ('') FOR [key_workstation_comment]
GO
/****** Object:  Default [DF_plans_key_laptop_min]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_laptop_min]  DEFAULT ((0)) FOR [key_laptop_min]
GO
/****** Object:  Default [DF_plans_key_laptop_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_laptop_comment]  DEFAULT ('') FOR [key_laptop_comment]
GO
/****** Object:  Default [DF_plans_key_telephone_min]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_telephone_min]  DEFAULT ((0)) FOR [key_telephone_min]
GO
/****** Object:  Default [DF_plans_key_telephone_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_telephone_comment]  DEFAULT ('') FOR [key_telephone_comment]
GO
/****** Object:  Default [DF_plans_key_printer_min]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_printer_min]  DEFAULT ((0)) FOR [key_printer_min]
GO
/****** Object:  Default [DF_plans_key_printer_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_printer_comment]  DEFAULT ('') FOR [key_printer_comment]
GO
/****** Object:  Default [DF_plans_key_fax_min]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_fax_min]  DEFAULT ((0)) FOR [key_fax_min]
GO
/****** Object:  Default [DF_plans_key_fax_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_fax_comment]  DEFAULT ('') FOR [key_fax_comment]
GO
/****** Object:  Default [DF_plans_key_copier_min]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_copier_min]  DEFAULT ((0)) FOR [key_copier_min]
GO
/****** Object:  Default [DF_plans_key_copier_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_copier_comment]  DEFAULT ('') FOR [key_copier_comment]
GO
/****** Object:  Default [DF_plans_key_scanner_min]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_scanner_min]  DEFAULT ((0)) FOR [key_scanner_min]
GO
/****** Object:  Default [DF_plans_key_scanner_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_scanner_comment]  DEFAULT ('') FOR [key_scanner_comment]
GO
/****** Object:  Default [DF_plans_key_server_min]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_server_min]  DEFAULT ((0)) FOR [key_server_min]
GO
/****** Object:  Default [DF_plans_key_server_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_server_comment]  DEFAULT ('') FOR [key_server_comment]
GO
/****** Object:  Default [DF_plans_key_other_equipment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_other_equipment]  DEFAULT ('') FOR [key_other_equipment]
GO
/****** Object:  Default [DF_plans_key_facilities]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_facilities]  DEFAULT ('') FOR [key_facilities]
GO
/****** Object:  Default [DF_plans_key_other_resources]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_other_resources]  DEFAULT ('') FOR [key_other_resources]
GO
/****** Object:  Default [DF_plans_key_supply_crisis]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_supply_crisis]  DEFAULT ('') FOR [key_supply_crisis]
GO
/****** Object:  Default [DF_plans_key_basic_emergency_contact_copy]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_basic_emergency_contact_copy]  DEFAULT ('') FOR [key_basic_emergency_contact_copy]
GO
/****** Object:  Default [DF_plans_key_basic_who_hold]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_basic_who_hold]  DEFAULT ('') FOR [key_basic_who_hold]
GO
/****** Object:  Default [DF_plans_key_basic_who_update]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_basic_who_update]  DEFAULT ('') FOR [key_basic_who_update]
GO
/****** Object:  Default [DF_plans_key_basic_who_check_msg]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_basic_who_check_msg]  DEFAULT ('') FOR [key_basic_who_check_msg]
GO
/****** Object:  Default [DF_plans_key_basic_who_record_greeting]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_basic_who_record_greeting]  DEFAULT ('') FOR [key_basic_who_record_greeting]
GO
/****** Object:  Default [DF_plans_key_basic_who_post_msg]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_basic_who_post_msg]  DEFAULT ('') FOR [key_basic_who_post_msg]
GO
/****** Object:  Default [DF_plans_key_basic_shared_password]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_basic_shared_password]  DEFAULT ('') FOR [key_basic_shared_password]
GO
/****** Object:  Default [DF_plans_key_basic_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_basic_comment]  DEFAULT ('') FOR [key_basic_comment]
GO
/****** Object:  Default [DF_plans_key_transportation]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_transportation]  DEFAULT ('') FOR [key_transportation]
GO
/****** Object:  Default [DF_plans_it_ws_file]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_file]  DEFAULT ('') FOR [it_ws_file]
GO
/****** Object:  Default [DF_plans_it_ws_file_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_file_comment]  DEFAULT ('') FOR [it_ws_file_comment]
GO
/****** Object:  Default [DF_plans_it_ws_ucb]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_ucb]  DEFAULT ('') FOR [it_ws_ucb]
GO
/****** Object:  Default [DF_plans_it_ws_ucb_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_ucb_comment]  DEFAULT ('') FOR [it_ws_ucb_comment]
GO
/****** Object:  Default [DF_plans_it_ws_local_auto]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_local_auto]  DEFAULT ('') FOR [it_ws_local_auto]
GO
/****** Object:  Default [DF_plans_it_ws_local_auto_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_local_auto_comment]  DEFAULT ('') FOR [it_ws_local_auto_comment]
GO
/****** Object:  Default [DF_plans_it_ws_local_manu]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_local_manu]  DEFAULT ('') FOR [it_ws_local_manu]
GO
/****** Object:  Default [DF_plans_it_ws_local_manu_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_local_manu_comment]  DEFAULT ('') FOR [it_ws_local_manu_comment]
GO
/****** Object:  Default [DF_plans_it_ws_other]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_other]  DEFAULT ('') FOR [it_ws_other]
GO
/****** Object:  Default [DF_plans_it_ws_other_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_other_comment]  DEFAULT ('') FOR [it_ws_other_comment]
GO
/****** Object:  Default [DF_plans_it_ws_no_backup]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_no_backup]  DEFAULT ('') FOR [it_ws_no_backup]
GO
/****** Object:  Default [DF_plans_it_ws_no_backup_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_no_backup_comment]  DEFAULT ('') FOR [it_ws_no_backup_comment]
GO
/****** Object:  Default [DF_plans_it_ws_not_know]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_not_know]  DEFAULT ('') FOR [it_ws_not_know]
GO
/****** Object:  Default [DF_plans_it_ws_not_know_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_not_know_comment]  DEFAULT ('') FOR [it_ws_not_know_comment]
GO
/****** Object:  Default [DF_plans_it_ws_support_emp_flag]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_support_emp_flag]  DEFAULT ('N') FOR [it_ws_support_dept_flag]
GO
/****** Object:  Default [DF_plans_it_ws_support_dept_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_support_dept_comment]  DEFAULT ('') FOR [it_ws_support_dept_comment]
GO
/****** Object:  Default [DF_plans_it_ws_support_campus_flag]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_support_campus_flag]  DEFAULT ('N') FOR [it_ws_support_campus_flag]
GO
/****** Object:  Default [DF_plans_it_ws_support_campus_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_support_campus_comment]  DEFAULT ('') FOR [it_ws_support_campus_comment]
GO
/****** Object:  Default [DF_plans_it_ws_support_vendor_flag]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_support_vendor_flag]  DEFAULT ('N') FOR [it_ws_support_vendor_flag]
GO
/****** Object:  Default [DF_plans_it_ws_support_vendor_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_support_vendor_comment]  DEFAULT ('') FOR [it_ws_support_vendor_comment]
GO
/****** Object:  Default [DF_plans_it_ws_support_other_flag]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_support_other_flag]  DEFAULT ('N') FOR [it_ws_support_other_flag]
GO
/****** Object:  Default [DF_plans_it_ws_support_other_comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_ws_support_other_comment]  DEFAULT ('') FOR [it_ws_support_other_comment]
GO
/****** Object:  Default [DF_plans_it_howto_where]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_howto_where]  DEFAULT ('') FOR [it_howto_where]
GO
/****** Object:  Default [DF_plans_it_howto_when]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_howto_when]  DEFAULT ('') FOR [it_howto_when]
GO
/****** Object:  Default [DF_plans_it_howto_requirement]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_howto_requirement]  DEFAULT ('') FOR [it_howto_requirement]
GO
/****** Object:  Default [DF_plans_it_howto_staff]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_howto_staff]  DEFAULT ('') FOR [it_howto_staff]
GO
/****** Object:  Default [DF_plans_it_howto_other]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_howto_other]  DEFAULT ('') FOR [it_howto_other]
GO
/****** Object:  Default [DF_plans_create_date]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_create_date]  DEFAULT (getdate()) FOR [create_date]
GO
/****** Object:  Default [DF_plans_last_modified]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_last_modified]  DEFAULT (getdate()) FOR [last_modified]
GO
/****** Object:  Default [DF_plans_approval_flag]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_approval_flag]  DEFAULT ('0') FOR [approval_flag]
GO
/****** Object:  Default [DF_plans_approved_by]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_approved_by]  DEFAULT ('') FOR [approved_by]
GO
/****** Object:  Default [DF_plans_approver_type]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_approver_type]  DEFAULT ('1') FOR [approver_type]
GO
/****** Object:  Default [DF_plans_it_howto_work_home]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_howto_work_home]  DEFAULT ('') FOR [it_howto_work_home]
GO
/****** Object:  Default [DF_plans_key_supplies]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_key_supplies]  DEFAULT ('') FOR [key_supplies]
GO
/****** Object:  Default [DF_plans_it_howto_cannot_work_around]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_it_howto_cannot_work_around]  DEFAULT ('') FOR [it_howto_cannot_work_around]
GO
/****** Object:  Default [DF_plans_disabled]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_disabled]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_plans_cost_center]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_cost_center]  DEFAULT ('') FOR [cost_center]
GO
/****** Object:  Default [DF_plans_evacuation_plan]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_evacuation_plan]  DEFAULT ('0') FOR [evacuation_plan]
GO
/****** Object:  Default [DF_plans_AcronymID]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_AcronymID]  DEFAULT ((0)) FOR [AcronymID]
GO
/****** Object:  Default [DF_plans_MajorDivisionID]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_MajorDivisionID]  DEFAULT ((0)) FOR [MajorDivisionID]
GO
/****** Object:  Default [DF_plans_HeadOfUnitName]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_HeadOfUnitName]  DEFAULT ('') FOR [HeadOfUnitName]
GO
/****** Object:  Default [DF_plans_headofUnitTitle]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_headofUnitTitle]  DEFAULT ('') FOR [HeadOfUnitTitle]
GO
/****** Object:  Default [DF_plans_not_applicable]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_not_applicable]  DEFAULT ((0)) FOR [not_applicable]
GO
/****** Object:  Default [DF_plans_na_explain]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_na_explain]  DEFAULT ('') FOR [na_explain]
GO
/****** Object:  Default [DF_plans_old_pid]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[plans] ADD  CONSTRAINT [DF_plans_old_pid]  DEFAULT ((0)) FOR [old_pid]
GO
/****** Object:  Default [DF_SystemLog_ObjectType]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemLog] ADD  CONSTRAINT [DF_SystemLog_ObjectType]  DEFAULT ('') FOR [ObjectType]
GO
/****** Object:  Default [DF_SystemLog_EventType]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemLog] ADD  CONSTRAINT [DF_SystemLog_EventType]  DEFAULT ('') FOR [EventType]
GO
/****** Object:  Default [DF_SystemLog_ObjectID]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemLog] ADD  CONSTRAINT [DF_SystemLog_ObjectID]  DEFAULT ((0)) FOR [ObjectID]
GO
/****** Object:  Default [DF_SystemLog_UserID]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemLog] ADD  CONSTRAINT [DF_SystemLog_UserID]  DEFAULT ('') FOR [UserID]
GO
/****** Object:  Default [DF_SystemLog_HostIP]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemLog] ADD  CONSTRAINT [DF_SystemLog_HostIP]  DEFAULT ('') FOR [HostIP]
GO
/****** Object:  Default [DF_SystemLog_Module]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemLog] ADD  CONSTRAINT [DF_SystemLog_Module]  DEFAULT ('') FOR [Module]
GO
/****** Object:  Default [DF_SystemLog_EventDate]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemLog] ADD  CONSTRAINT [DF_SystemLog_EventDate]  DEFAULT (getdate()) FOR [EventDate]
GO
/****** Object:  Default [DF_SystemLog_Comment]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemLog] ADD  CONSTRAINT [DF_SystemLog_Comment]  DEFAULT ('') FOR [Comment]
GO
/****** Object:  Default [InstitutionID_un]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemLog] ADD  CONSTRAINT [InstitutionID_un]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_Table_1_LookupName]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[DescriptionLookup] ADD  CONSTRAINT [DF_Table_1_LookupName]  DEFAULT ('') FOR [LookupName]
GO
/****** Object:  Default [DF_Table_1_Value]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[DescriptionLookup] ADD  CONSTRAINT [DF_Table_1_Value]  DEFAULT ('') FOR [LookupValue]
GO
/****** Object:  Default [DF_DescriptionLookup_Description]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[DescriptionLookup] ADD  CONSTRAINT [DF_DescriptionLookup_Description]  DEFAULT ('') FOR [LookupDescription]
GO
/****** Object:  Default [DF_UserSecurity_UCNetID]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_UCNetID]  DEFAULT ('') FOR [AuthID]
GO
/****** Object:  Default [DF_UserSecurity_InstitutionID]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_UserSecurity_SecurityType]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_SecurityType]  DEFAULT ('9') FOR [SecurityType]
GO
/****** Object:  Default [DF_UserSecurity_FirstName]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_FirstName]  DEFAULT ('') FOR [FirstName]
GO
/****** Object:  Default [DF_UserSecurity_LastName]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_LastName]  DEFAULT ('') FOR [LastName]
GO
/****** Object:  Default [DF_UserSecurity_Phone]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_Phone]  DEFAULT ('') FOR [WorkPhone]
GO
/****** Object:  Default [DF_UserSecurity_HomePhone]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_HomePhone]  DEFAULT ('') FOR [HomePhone]
GO
/****** Object:  Default [DF_UserSecurity_CellPhone]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_CellPhone]  DEFAULT ('') FOR [CellPhone]
GO
/****** Object:  Default [DF_UserSecurity_EMailRegular]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_EMailRegular]  DEFAULT ('') FOR [EMailRegular]
GO
/****** Object:  Default [DF_UserSecurity_EMailBackup]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_EMailBackup]  DEFAULT ('') FOR [EMailBackup]
GO
/****** Object:  Default [DF_UserSecurity_WorkFAX]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_WorkFAX]  DEFAULT ('') FOR [WorkFAX]
GO
/****** Object:  Default [DF_UserSecurity_Title]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_Title]  DEFAULT ('') FOR [Title]
GO
/****** Object:  Default [DF_UserSecurity_Department]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_Department]  DEFAULT ('') FOR [DepartmentName]
GO
/****** Object:  Default [DF_UserSecurity_DepartmentID]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_DepartmentID]  DEFAULT ('') FOR [DepartmentOrg]
GO
/****** Object:  Default [DF_UserSecurity_DepartmentOrgHierarchy]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_DepartmentOrgHierarchy]  DEFAULT ('') FOR [DepartmentOrgHierarchy]
GO
/****** Object:  Default [DF_UserSecurity_WorkAddress]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_WorkAddress]  DEFAULT ('') FOR [WorkAddress]
GO
/****** Object:  Default [DF_UserSecurity_HomeAddress]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_HomeAddress]  DEFAULT ('') FOR [HomeAddress]
GO
/****** Object:  Default [DF_UserSecurity_AccessStatus]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_AccessStatus]  DEFAULT ('1') FOR [AccessStatus]
GO
/****** Object:  Default [DF_UserSecurity_LockStatus]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_LockStatus]  DEFAULT ('0') FOR [LockStatus]
GO
/****** Object:  Default [DF_UserSecurity_CreatedDate]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_CreatedDate]  DEFAULT (getdate()) FOR [CreatedDate]
GO
/****** Object:  Default [DF_UserSecurity_Affiliations]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_Affiliations]  DEFAULT ('') FOR [Affiliations]
GO
/****** Object:  Default [DF_UserSecurity_Password]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_Password]  DEFAULT ('') FOR [Password]
GO
/****** Object:  Default [DF_UserSecurity_SecurityAttribute]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  CONSTRAINT [DF_UserSecurity_SecurityAttribute]  DEFAULT ((0)) FOR [SecurityAttribute]
GO
/****** Object:  Default [DF__UserSecur__Direc__78958AE7]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[UserSecurity] ADD  DEFAULT ('') FOR [DirectoryID]
GO
/****** Object:  Default [DF_SystemSetup_SystemName]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemSetup] ADD  CONSTRAINT [DF_SystemSetup_SystemName]  DEFAULT ('') FOR [SystemName]
GO
/****** Object:  Default [DF_SystemSetup_Description]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemSetup] ADD  CONSTRAINT [DF_SystemSetup_Description]  DEFAULT ('') FOR [Description]
GO
/****** Object:  Default [DF_SystemSetup_Phone]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemSetup] ADD  CONSTRAINT [DF_SystemSetup_Phone]  DEFAULT ('') FOR [Phone]
GO
/****** Object:  Default [DF_SystemSetup_Fax]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemSetup] ADD  CONSTRAINT [DF_SystemSetup_Fax]  DEFAULT ('') FOR [Fax]
GO
/****** Object:  Default [DF_SystemSetup_EMail]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemSetup] ADD  CONSTRAINT [DF_SystemSetup_EMail]  DEFAULT ('') FOR [EMail]
GO
/****** Object:  Default [DF_SystemSetup_SystemStatus]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemSetup] ADD  CONSTRAINT [DF_SystemSetup_SystemStatus]  DEFAULT ((1)) FOR [SystemStatus]
GO
/****** Object:  Default [DF_SystemSetup_Version]    Script Date: 05/20/2011 14:41:31 ******/
ALTER TABLE [dbo].[SystemSetup] ADD  CONSTRAINT [DF_SystemSetup_Version]  DEFAULT ('3.0') FOR [Version]
GO
/****** Object:  Default [DF_SystemSetup_ReleaseDate]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemSetup] ADD  CONSTRAINT [DF_SystemSetup_ReleaseDate]  DEFAULT (((1)/(1))/(2009)) FOR [ReleaseDate]
GO
/****** Object:  Default [DF_key_utility_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_utility] ADD  CONSTRAINT [DF_key_utility_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_key_utility_UtilityID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_utility] ADD  CONSTRAINT [DF_key_utility_UtilityID]  DEFAULT ((0)) FOR [UtilityID]
GO
/****** Object:  Default [DF_key_utility_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_utility] ADD  CONSTRAINT [DF_key_utility_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_key_team_members_kt_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_team_members] ADD  CONSTRAINT [DF_key_team_members_kt_id]  DEFAULT ((0)) FOR [kt_id]
GO
/****** Object:  Default [DF_key_team_members_UserId]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_team_members] ADD  CONSTRAINT [DF_key_team_members_UserId]  DEFAULT ((0)) FOR [UserID]
GO
/****** Object:  Default [DF_key_team_members_first_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_team_members] ADD  CONSTRAINT [DF_key_team_members_first_name]  DEFAULT ('') FOR [first_name]
GO
/****** Object:  Default [DF_key_team_members_last_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_team_members] ADD  CONSTRAINT [DF_key_team_members_last_name]  DEFAULT ('') FOR [last_name]
GO
/****** Object:  Default [DF_key_team_members_description]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_team_members] ADD  CONSTRAINT [DF_key_team_members_description]  DEFAULT ('') FOR [description]
GO
/****** Object:  Default [DF_plans_instructions_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_plans_instructions_InstructionalDepartmentID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_InstructionalDepartmentID]  DEFAULT ((0)) FOR [InstructionalDepartmentID]
GO
/****** Object:  Default [DF_plans_instructions_b_bSpace_usage]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_bSpace_usage]  DEFAULT ('0') FOR [b_bSpace_usage]
GO
/****** Object:  Default [DF_plans_instructions_b_bSpace_expand]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_bSpace_expand]  DEFAULT ('0') FOR [b_bSpace_expand]
GO
/****** Object:  Default [DF_plans_instructions_b_bSpace_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_bSpace_comment]  DEFAULT ('') FOR [b_bSpace_comment]
GO
/****** Object:  Default [DF_plans_instructions_b_bSpace_grade_usage]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_bSpace_grade_usage]  DEFAULT ('0') FOR [b_bSpace_grade_usage]
GO
/****** Object:  Default [DF_plans_instructions_b_bSpace_grade_expand]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_bSpace_grade_expand]  DEFAULT ('0') FOR [b_bSpace_grade_expand]
GO
/****** Object:  Default [DF_plans_instructions_b_bSpace_grade_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_bSpace_grade_comment]  DEFAULT ('') FOR [b_bSpace_grade_comment]
GO
/****** Object:  Default [DF_plans_instructions_b_gsi_communication_usage]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_gsi_communication_usage]  DEFAULT ('0') FOR [b_gsi_communication_usage]
GO
/****** Object:  Default [DF_plans_instructions_b_gsi_communication_expand]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_gsi_communication_expand]  DEFAULT ('0') FOR [b_gsi_communication_expand]
GO
/****** Object:  Default [DF_plans_instructions_b_gsi_communication_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_gsi_communication_comment]  DEFAULT ('') FOR [b_gsi_communication_comment]
GO
/****** Object:  Default [DF_plans_instructions_b_common_materials_usage]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_common_materials_usage]  DEFAULT ('0') FOR [b_common_materials_usage]
GO
/****** Object:  Default [DF_plans_instructions_b_common_materials_expand]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_common_materials_expand]  DEFAULT ('0') FOR [b_common_materials_expand]
GO
/****** Object:  Default [DF_plans_instructions_b_common_materials_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_b_common_materials_comment]  DEFAULT ('') FOR [b_common_materials_comment]
GO
/****** Object:  Default [DF_plans_instructions_c_prioritize_course]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_prioritize_course]  DEFAULT ('0') FOR [c_prioritize_course]
GO
/****** Object:  Default [DF_plans_instructions_c_prioritize_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_prioritize_comment]  DEFAULT ('') FOR [c_prioritize_comment]
GO
/****** Object:  Default [DF_plans_instructions_c_communication]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_communication]  DEFAULT ('0') FOR [c_communication]
GO
/****** Object:  Default [DF_plans_instructions_c_communication_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_communication_comment]  DEFAULT ('') FOR [c_communication_comment]
GO
/****** Object:  Default [DF_plans_instructions_c_backup_personnel]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_backup_personnel]  DEFAULT ('0') FOR [c_backup_personnel]
GO
/****** Object:  Default [DF_plans_instructions_c_backup_personnel_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_backup_personnel_comment]  DEFAULT ('') FOR [c_backup_personnel_comment]
GO
/****** Object:  Default [DF_plans_instructions_c_faculty_recall]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_faculty_recall]  DEFAULT ('0') FOR [c_faculty_recall]
GO
/****** Object:  Default [DF_plans_instructions_c_faculty_recall_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_faculty_recall_comment]  DEFAULT ('') FOR [c_faculty_recall_comment]
GO
/****** Object:  Default [DF_plans_instructions_c_pedagogy]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_pedagogy]  DEFAULT ('0') FOR [c_pedagogy]
GO
/****** Object:  Default [DF_plans_instructions_c_pedagogy_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions] ADD  CONSTRAINT [DF_plans_instructions_c_pedagogy_comment]  DEFAULT ('') FOR [c_pedagogy_comment]
GO
/****** Object:  Default [DF_instruction_teaching_issues_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_teaching_issues] ADD  CONSTRAINT [DF_instruction_teaching_issues_name]  DEFAULT ('') FOR [name]
GO
/****** Object:  Default [DF_instruction_teaching_issues_impact]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_teaching_issues] ADD  CONSTRAINT [DF_instruction_teaching_issues_impact]  DEFAULT ('') FOR [impact]
GO
/****** Object:  Default [DF_instruction_teaching_issues_alternatives]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_teaching_issues] ADD  CONSTRAINT [DF_instruction_teaching_issues_alternatives]  DEFAULT ('') FOR [alternatives]
GO
/****** Object:  Default [DF_instruction_high_priority_pis_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_high_priority] ADD  CONSTRAINT [DF_instruction_high_priority_pis_id]  DEFAULT ((0)) FOR [pis_id]
GO
/****** Object:  Default [DF_instruction_high_priority_course_number]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_high_priority] ADD  CONSTRAINT [DF_instruction_high_priority_course_number]  DEFAULT ('') FOR [course_number]
GO
/****** Object:  Default [DF_instruction_high_priority_course_title]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_high_priority] ADD  CONSTRAINT [DF_instruction_high_priority_course_title]  DEFAULT ('') FOR [course_title]
GO
/****** Object:  Default [DF_instruction_high_priority_bspace]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_high_priority] ADD  CONSTRAINT [DF_instruction_high_priority_bspace]  DEFAULT ((0)) FOR [bspace]
GO
/****** Object:  Default [DF_instruction_high_priority_other_can_teach]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_high_priority] ADD  CONSTRAINT [DF_instruction_high_priority_other_can_teach]  DEFAULT ((0)) FOR [other_can_teach]
GO
/****** Object:  Default [DF_instruction_high_priority_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_high_priority] ADD  CONSTRAINT [DF_instruction_high_priority_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_cf_downstream_dependency_cid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[cf_dependency] ADD  CONSTRAINT [DF_cf_downstream_dependency_cid]  DEFAULT ((0)) FOR [cid]
GO
/****** Object:  Default [DF_cf_downstream_dependency_DependencyID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[cf_dependency] ADD  CONSTRAINT [DF_cf_downstream_dependency_DependencyID]  DEFAULT ((0)) FOR [DependencyID]
GO
/****** Object:  Default [DF_ks_id_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_skills] ADD  CONSTRAINT [DF_ks_id_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_ks_id_SkillID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_skills] ADD  CONSTRAINT [DF_ks_id_SkillID]  DEFAULT ((0)) FOR [SkillID]
GO
/****** Object:  Default [DF_ks_id_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_skills] ADD  CONSTRAINT [DF_ks_id_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_key_staffing_req_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staffing_req] ADD  CONSTRAINT [DF_key_staffing_req_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_key_staffing_req_cid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staffing_req] ADD  CONSTRAINT [DF_key_staffing_req_cid]  DEFAULT ((0)) FOR [cid]
GO
/****** Object:  Default [DF_key_staffing_req_StaffCategoryID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staffing_req] ADD  CONSTRAINT [DF_key_staffing_req_StaffCategoryID]  DEFAULT ((0)) FOR [StaffCategoryID]
GO
/****** Object:  Default [DF_key_staffing_req_ShiftID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staffing_req] ADD  CONSTRAINT [DF_key_staffing_req_ShiftID]  DEFAULT ((0)) FOR [ShiftID]
GO
/****** Object:  Default [DF_key_staffing_req_FTE_normal]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staffing_req] ADD  CONSTRAINT [DF_key_staffing_req_FTE_normal]  DEFAULT ((0)) FOR [FTE_normal]
GO
/****** Object:  Default [DF_key_staffing_req_FTE_crisis]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staffing_req] ADD  CONSTRAINT [DF_key_staffing_req_FTE_crisis]  DEFAULT ((0)) FOR [FTE_crisis]
GO
/****** Object:  Default [DF_work_home_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home] ADD  CONSTRAINT [DF_work_home_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF__work_home__name__1AF3F935]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home] ADD  CONSTRAINT [DF__work_home__name__1AF3F935]  DEFAULT ('') FOR [name]
GO
/****** Object:  Default [DF_work_home_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home] ADD  CONSTRAINT [DF_work_home_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF__work_home__disab__49E3F248]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home] ADD  CONSTRAINT [DF__work_home__disab__49E3F248]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_key_work_home_currently_does]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home] ADD  CONSTRAINT [DF_key_work_home_currently_does]  DEFAULT ('0') FOR [currently_does]
GO
/****** Object:  Default [DF_key_work_home_office_pc_must_on]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home] ADD  CONSTRAINT [DF_key_work_home_office_pc_must_on]  DEFAULT ('0') FOR [office_pc_must_on]
GO
/****** Object:  Default [DF_key_work_home_position]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home] ADD  CONSTRAINT [DF_key_work_home_position]  DEFAULT ('0') FOR [institution_position]
GO
/****** Object:  Default [DF_key_work_home_connection]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home] ADD  CONSTRAINT [DF_key_work_home_connection]  DEFAULT ('0') FOR [broadband_connection]
GO
/****** Object:  Default [DF_key_work_home_old_wh_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home] ADD  CONSTRAINT [DF_key_work_home_old_wh_id]  DEFAULT ((0)) FOR [old_wh_id]
GO
/****** Object:  Default [DF_user_plan_uid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[user_plan] ADD  CONSTRAINT [DF_user_plan_uid]  DEFAULT ('') FOR [uid]
GO
/****** Object:  Default [DF_user_plan_UserID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[user_plan] ADD  CONSTRAINT [DF_user_plan_UserID]  DEFAULT ((0)) FOR [UserID]
GO
/****** Object:  Default [DF_user_plan_PlanAccess]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[user_plan] ADD  CONSTRAINT [DF_user_plan_PlanAccess]  DEFAULT ('3') FOR [PlanAccess]
GO
/****** Object:  Default [DF_user_plan_CreateDate]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[user_plan] ADD  CONSTRAINT [DF_user_plan_CreateDate]  DEFAULT (getdate()) FOR [AddedDate]
GO
/****** Object:  Default [DF_user_plan_PlanCreatorFlag]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[user_plan] ADD  CONSTRAINT [DF_user_plan_PlanCreatorFlag]  DEFAULT ('0') FOR [PlanCreatorFlag]
GO
/****** Object:  Default [DF_key_documents_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_documents_name]  DEFAULT ('') FOR [name]
GO
/****** Object:  Default [DF_key_documents_owner]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_documents_owner]  DEFAULT ('') FOR [owner_department]
GO
/****** Object:  Default [DF_key_documents_original_file_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_documents_original_file_name]  DEFAULT ('') FOR [original_file_name]
GO
/****** Object:  Default [DF_key_documents_loc_printed_copies]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_documents_loc_printed_copies]  DEFAULT ('') FOR [location_kept]
GO
/****** Object:  Default [DF_key_documents_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_documents_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_key_documents_description]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_documents_description]  DEFAULT ('') FOR [description]
GO
/****** Object:  Default [DF_key_documents_mediumID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_documents_mediumID]  DEFAULT ((0)) FOR [mediumID]
GO
/****** Object:  Default [DF_key_documents_contact]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_documents_contact]  DEFAULT ('') FOR [contacts]
GO
/****** Object:  Default [DF_key_documents_backup_measures]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_documents_backup_measures]  DEFAULT ('') FOR [backup_measures]
GO
/****** Object:  Default [DF_key_plan_documents_old_kpd_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents] ADD  CONSTRAINT [DF_key_plan_documents_old_kpd_id]  DEFAULT ((0)) FOR [old_kpd_id]
GO
/****** Object:  Default [DF_plan_contacts_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_contacts] ADD  CONSTRAINT [DF_plan_contacts_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_plan_contacts_UserID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_contacts] ADD  CONSTRAINT [DF_plan_contacts_UserID]  DEFAULT ((0)) FOR [UserID]
GO
/****** Object:  Default [DF_plan_contacts_ContactComment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_contacts] ADD  CONSTRAINT [DF_plan_contacts_ContactComment]  DEFAULT ('') FOR [ContactComment]
GO
/****** Object:  Default [DF_plan_contacts_ContactType]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_contacts] ADD  CONSTRAINT [DF_plan_contacts_ContactType]  DEFAULT ('0') FOR [ContactType]
GO
/****** Object:  Default [DF_plan_contacts_AddedDate]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_contacts] ADD  CONSTRAINT [DF_plan_contacts_AddedDate]  DEFAULT (getdate()) FOR [AddedDate]
GO
/****** Object:  Default [DF_key_staff_unit_first_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_first_name]  DEFAULT ('') FOR [first_name]
GO
/****** Object:  Default [DF_key_staff_unit_last_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_last_name]  DEFAULT ('') FOR [last_name]
GO
/****** Object:  Default [DF_key_staff_unit_description]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_description]  DEFAULT ('') FOR [description]
GO
/****** Object:  Default [DF_key_staff_unit_special_skill]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_special_skill]  DEFAULT ('') FOR [special_skill]
GO
/****** Object:  Default [DF_key_staff_unit_title_or_function]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_title_or_function]  DEFAULT ('') FOR [title_or_function]
GO
/****** Object:  Default [DF_key_staff_unit_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_key_staff_unit_disabled]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_disabled]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_key_staff_unit_first_successor]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_first_successor]  DEFAULT ('0') FOR [first_successor]
GO
/****** Object:  Default [DF_key_staff_unit_second_successor]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_second_successor]  DEFAULT ('0') FOR [second_successor]
GO
/****** Object:  Default [DF_key_staff_unit_third_successor]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_third_successor]  DEFAULT ('0') FOR [third_successor]
GO
/****** Object:  Default [DF_key_staff_unit_holds_formal_delegation]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_holds_formal_delegation]  DEFAULT ('0') FOR [holds_formal_delegation]
GO
/****** Object:  Default [DF_key_staff_unit_old_ksu_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit] ADD  CONSTRAINT [DF_key_staff_unit_old_ksu_id]  DEFAULT ((0)) FOR [old_ksu_id]
GO
/****** Object:  Default [DF_it_servers_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_name]  DEFAULT ('') FOR [name]
GO
/****** Object:  Default [DF__it_server__type___02C769E9]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF__it_server__type___02C769E9]  DEFAULT ('') FOR [type_server]
GO
/****** Object:  Default [DF_it_servers_explanation]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_explanation]  DEFAULT ('') FOR [explanation]
GO
/****** Object:  Default [DF__it_server__backu__03BB8E22]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF__it_server__backu__03BB8E22]  DEFAULT ('') FOR [backup_frequency]
GO
/****** Object:  Default [DF__it_server__backu__04AFB25B]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF__it_server__backu__04AFB25B]  DEFAULT ('') FOR [backup_media]
GO
/****** Object:  Default [DF__it_server__auto___05A3D694]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF__it_server__auto___05A3D694]  DEFAULT ('') FOR [auto_manual]
GO
/****** Object:  Default [DF_it_servers_location_onsite]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_location_onsite]  DEFAULT ('') FOR [location_onsite]
GO
/****** Object:  Default [DF_it_servers_location_offsite]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_location_offsite]  DEFAULT ('') FOR [location_offsite]
GO
/****** Object:  Default [DF__it_server__frequ__322C6448]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF__it_server__frequ__322C6448]  DEFAULT ('') FOR [frequency_offsite]
GO
/****** Object:  Default [DF__it_server__succe__078C1F06]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF__it_server__succe__078C1F06]  DEFAULT ('') FOR [successful_recovery]
GO
/****** Object:  Default [DF_it_servers_successful_recovery_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_successful_recovery_explain]  DEFAULT ('') FOR [successful_recovery_explain]
GO
/****** Object:  Default [DF_it_servers_disabled]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_disabled]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_it_servers_apps_impacted]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_apps_impacted]  DEFAULT ('') FOR [apps_impacted]
GO
/****** Object:  Default [DF_it_servers_depts_impacted]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_depts_impacted]  DEFAULT ('') FOR [depts_impacted]
GO
/****** Object:  Default [DF_it_servers_server_software]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_server_software]  DEFAULT ('') FOR [server_software]
GO
/****** Object:  Default [DF_it_servers_tech]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_tech]  DEFAULT ('') FOR [tech]
GO
/****** Object:  Default [DF_it_servers_responsible_person]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_responsible_person]  DEFAULT ('') FOR [responsible_person]
GO
/****** Object:  Default [DF_it_servers_location_disks_docs]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_location_disks_docs]  DEFAULT ('') FOR [location_disks_docs]
GO
/****** Object:  Default [DF_it_servers_old_it_server_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers] ADD  CONSTRAINT [DF_it_servers_old_it_server_id]  DEFAULT ((0)) FOR [old_it_server_id]
GO
/****** Object:  Default [DF_it_central_applications_PID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_central_applications] ADD  CONSTRAINT [DF_it_central_applications_PID]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_it_central_applications_Name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_central_applications] ADD  CONSTRAINT [DF_it_central_applications_Name]  DEFAULT ('') FOR [Name]
GO
/****** Object:  Default [DF_it_central_applications_CriticalityLevel]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_central_applications] ADD  CONSTRAINT [DF_it_central_applications_CriticalityLevel]  DEFAULT ('0') FOR [CriticalityLevel]
GO
/****** Object:  Default [DF_it_central_applications_CentralApplicationID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_central_applications] ADD  CONSTRAINT [DF_it_central_applications_CentralApplicationID]  DEFAULT ((0)) FOR [CentralApplicationID]
GO
/****** Object:  Default [DF_it_central_applications_Comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_central_applications] ADD  CONSTRAINT [DF_it_central_applications_Comment]  DEFAULT ('') FOR [Comment]
GO
/****** Object:  Default [DF_it_applications_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_name]  DEFAULT ('') FOR [name]
GO
/****** Object:  Default [DF_it_applications_functional_owner]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_functional_owner]  DEFAULT ('') FOR [functional_owner]
GO
/****** Object:  Default [DF_it_applications_technical_owner]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_technical_owner]  DEFAULT ('') FOR [technical_owner]
GO
/****** Object:  Default [DF_it_application_type]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_application_type]  DEFAULT ('') FOR [application_type]
GO
/****** Object:  Default [DF_it_backup_frequency]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_backup_frequency]  DEFAULT ('') FOR [backup_frequency]
GO
/****** Object:  Default [DF_it_applications_location_disks_docs]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_location_disks_docs]  DEFAULT ('') FOR [location_disks_docs]
GO
/****** Object:  Default [DF_it_applications_responsible_person]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_responsible_person]  DEFAULT ('') FOR [responsible_person]
GO
/****** Object:  Default [DF_it_applications_tech]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_tech]  DEFAULT ('') FOR [tech]
GO
/****** Object:  Default [DF_it_applications_depts_impacted]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_depts_impacted]  DEFAULT ('') FOR [depts_impacted]
GO
/****** Object:  Default [DF_it_applications_campus_systems]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_campus_systems]  DEFAULT ('') FOR [campus_systems]
GO
/****** Object:  Default [DF_it_applications_data_from_core]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_data_from_core]  DEFAULT ('') FOR [data_from_core]
GO
/****** Object:  Default [DF_it_applications_transaction_processing]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_transaction_processing]  DEFAULT ('') FOR [transaction_processing]
GO
/****** Object:  Default [DF_it_backup_media]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_backup_media]  DEFAULT ('') FOR [backup_media]
GO
/****** Object:  Default [DF_it_auto_manual]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_auto_manual]  DEFAULT ('') FOR [auto_manual]
GO
/****** Object:  Default [DF_it_applications_location_onsite]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_location_onsite]  DEFAULT ('') FOR [location_onsite]
GO
/****** Object:  Default [DF_it_applications_location_offsite]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_location_offsite]  DEFAULT ('') FOR [location_offsite]
GO
/****** Object:  Default [DF_it_frequency_offsite]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_frequency_offsite]  DEFAULT ('') FOR [frequency_offsite]
GO
/****** Object:  Default [DF_it_successful_revovery]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_successful_revovery]  DEFAULT ('') FOR [successful_recovery]
GO
/****** Object:  Default [DF_it_applications_successful_recovery_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_successful_recovery_explain]  DEFAULT ('') FOR [successful_recovery_explain]
GO
/****** Object:  Default [DF_it_applications_disabled]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_disabled]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_it_applications_old_it_application_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications] ADD  CONSTRAINT [DF_it_applications_old_it_application_id]  DEFAULT ((0)) FOR [old_it_application_id]
GO
/****** Object:  Default [DF_key_teams_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_teams] ADD  CONSTRAINT [DF_key_teams_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_key_teams_team_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_teams] ADD  CONSTRAINT [DF_key_teams_team_name]  DEFAULT ('') FOR [team_name]
GO
/****** Object:  Default [DF_key_teams_team_purpose]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_teams] ADD  CONSTRAINT [DF_key_teams_team_purpose]  DEFAULT ('') FOR [team_purpose]
GO
/****** Object:  Default [DF_key_teams_team_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_teams] ADD  CONSTRAINT [DF_key_teams_team_comment]  DEFAULT ('') FOR [team_comment]
GO
/****** Object:  Default [DF_key_communication_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_communication] ADD  CONSTRAINT [DF_key_communication_name]  DEFAULT ('') FOR [name]
GO
/****** Object:  Default [DF_key_communication_location]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_communication] ADD  CONSTRAINT [DF_key_communication_location]  DEFAULT ('') FOR [location]
GO
/****** Object:  Default [DF_key_communication_description]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_communication] ADD  CONSTRAINT [DF_key_communication_description]  DEFAULT ('') FOR [description]
GO
/****** Object:  Default [DF_key_communication_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_communication] ADD  CONSTRAINT [DF_key_communication_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_key_communication_disabled]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_communication] ADD  CONSTRAINT [DF_key_communication_disabled]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_key_communication_old_k_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_communication] ADD  CONSTRAINT [DF_key_communication_old_k_id]  DEFAULT ((0)) FOR [old_k_id]
GO
/****** Object:  Default [DF_plan_unit_heads_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_unit_heads] ADD  CONSTRAINT [DF_plan_unit_heads_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_plan_unit_heads_UserID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_unit_heads] ADD  CONSTRAINT [DF_plan_unit_heads_UserID]  DEFAULT ((0)) FOR [UserID]
GO
/****** Object:  Default [DF_plan_unit_heads_UnitHeadComment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_unit_heads] ADD  CONSTRAINT [DF_plan_unit_heads_UnitHeadComment]  DEFAULT ('') FOR [UnitHeadComment]
GO
/****** Object:  Default [DF_plan_unit_heads_CreatedDate]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_unit_heads] ADD  CONSTRAINT [DF_plan_unit_heads_CreatedDate]  DEFAULT (getdate()) FOR [CreatedDate]
GO
/****** Object:  Default [DF_key_stakeholders_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_key_stakeholders_first_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_first_name]  DEFAULT ('') FOR [first_name]
GO
/****** Object:  Default [DF_key_stakeholders_last_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_last_name]  DEFAULT ('') FOR [last_name]
GO
/****** Object:  Default [DF_key_stakeholders_dept]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_dept]  DEFAULT ('') FOR [dept]
GO
/****** Object:  Default [DF_key_stakeholders_address]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_address]  DEFAULT ('') FOR [address]
GO
/****** Object:  Default [DF_key_stakeholders_email]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_email]  DEFAULT ('') FOR [email]
GO
/****** Object:  Default [DF_key_stakeholders_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_key_stakeholders_work_phone]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_work_phone]  DEFAULT ('') FOR [work_phone]
GO
/****** Object:  Default [DF_key_stakeholders_cell_phone]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_cell_phone]  DEFAULT ('') FOR [cell_phone]
GO
/****** Object:  Default [DF_key_stakeholders_fax]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_fax]  DEFAULT ('') FOR [fax]
GO
/****** Object:  Default [DF_key_stakeholders_alternate_vendors]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_alternate_vendors]  DEFAULT ('') FOR [alternate_vendors]
GO
/****** Object:  Default [DF_key_stakeholders_disabled]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_disabled]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_key_stakeholders_stakeholder_type]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_stakeholder_type]  DEFAULT ('0') FOR [stakeholder_type]
GO
/****** Object:  Default [DF_key_stakeholders_product_service]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_product_service]  DEFAULT ('') FOR [product_service]
GO
/****** Object:  Default [DF_key_stakeholders_old_ks_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders] ADD  CONSTRAINT [DF_key_stakeholders_old_ks_id]  DEFAULT ((0)) FOR [old_ks_id]
GO
/****** Object:  Default [DF_key_staff_other_units_first_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_first_name]  DEFAULT ('') FOR [first_name]
GO
/****** Object:  Default [DF_key_staff_other_units_last_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_last_name]  DEFAULT ('') FOR [last_name]
GO
/****** Object:  Default [DF_key_staff_other_units_dept]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_dept]  DEFAULT ('') FOR [dept]
GO
/****** Object:  Default [DF_key_staff_other_units_address]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_address]  DEFAULT ('') FOR [address]
GO
/****** Object:  Default [DF_key_staff_other_units_email]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_email]  DEFAULT ('') FOR [email]
GO
/****** Object:  Default [DF_key_staff_other_units_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_key_staff_other_units_work_phone]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_work_phone]  DEFAULT ('') FOR [work_phone]
GO
/****** Object:  Default [DF_key_staff_other_units_cell_phone]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_cell_phone]  DEFAULT ('') FOR [cell_phone]
GO
/****** Object:  Default [DF_key_staff_other_units_fax]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_fax]  DEFAULT ('') FOR [fax]
GO
/****** Object:  Default [DF_key_staff_other_units_disabled]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_disabled]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_key_staff_other_units_old_kso_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units] ADD  CONSTRAINT [DF_key_staff_other_units_old_kso_id]  DEFAULT ((0)) FOR [old_kso_id]
GO
/****** Object:  Default [DF_action_items_cid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF_action_items_cid]  DEFAULT ((0)) FOR [cid]
GO
/****** Object:  Default [DF__action_ite__type__47919582]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF__action_ite__type__47919582]  DEFAULT ('') FOR [a_type]
GO
/****** Object:  Default [DF__action_ite__name__1A54DAB7]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF__action_ite__name__1A54DAB7]  DEFAULT ('') FOR [name]
GO
/****** Object:  Default [DF_action_items_cost]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF_action_items_cost]  DEFAULT ('') FOR [cost]
GO
/****** Object:  Default [DF_action_items_cost_is]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF_action_items_cost_is]  DEFAULT ('') FOR [cost_is]
GO
/****** Object:  Default [DF_action_items_scope]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF_action_items_scope]  DEFAULT ('') FOR [scope]
GO
/****** Object:  Default [DF_action_items_disabled]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF_action_items_disabled]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_action_items_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF_action_items_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_action_items_status]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF_action_items_status]  DEFAULT ('') FOR [status]
GO
/****** Object:  Default [DF_action_items_old_a_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [DF_action_items_old_a_id]  DEFAULT ((0)) FOR [old_a_id]
GO
/****** Object:  Default [pis_id_un]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items] ADD  CONSTRAINT [pis_id_un]  DEFAULT ((0)) FOR [pis_id]
GO
/****** Object:  Default [DF_critical_functions_CriticalityLevel]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_CriticalityLevel]  DEFAULT ('0') FOR [CriticalityLevel]
GO
/****** Object:  Default [DF_critical_functions_description]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_description]  DEFAULT ('') FOR [description]
GO
/****** Object:  Default [DF__critical___prior__058EC7FB]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___prior__058EC7FB]  DEFAULT ((0)) FOR [priority]
GO
/****** Object:  Default [DF_critical_functions_unit_performs]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_unit_performs]  DEFAULT ('') FOR [unit_performs]
GO
/****** Object:  Default [DF_critical_functions_responsible_person]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_responsible_person]  DEFAULT ('') FOR [responsible_person]
GO
/****** Object:  Default [DF_critical_functions_peak_jan]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_jan]  DEFAULT ('N') FOR [peak_jan]
GO
/****** Object:  Default [DF_critical_functions_peak_feb]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_feb]  DEFAULT ('N') FOR [peak_feb]
GO
/****** Object:  Default [DF_critical_functions_peak_mar]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_mar]  DEFAULT ('N') FOR [peak_mar]
GO
/****** Object:  Default [DF_critical_functions_peak_apr]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_apr]  DEFAULT ('N') FOR [peak_apr]
GO
/****** Object:  Default [DF_critical_functions_peak_may]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_may]  DEFAULT ('N') FOR [peak_may]
GO
/****** Object:  Default [DF_critical_functions_peak_jun]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_jun]  DEFAULT ('N') FOR [peak_jun]
GO
/****** Object:  Default [DF_critical_functions_peak_jul]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_jul]  DEFAULT ('N') FOR [peak_jul]
GO
/****** Object:  Default [DF_critical_functions_peak_aug]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_aug]  DEFAULT ('N') FOR [peak_aug]
GO
/****** Object:  Default [DF_critical_functions_peak_sep]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_sep]  DEFAULT ('N') FOR [peak_sep]
GO
/****** Object:  Default [DF_critical_functions_peak_oct]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_oct]  DEFAULT ('N') FOR [peak_oct]
GO
/****** Object:  Default [DF_critical_functions_peak_nov]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_nov]  DEFAULT ('N') FOR [peak_nov]
GO
/****** Object:  Default [DF_critical_functions_peak_dec]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_peak_dec]  DEFAULT ('N') FOR [peak_dec]
GO
/****** Object:  Default [DF_critical_functions_explanation]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_explanation]  DEFAULT ('') FOR [explanation]
GO
/****** Object:  Default [DF_critical_functions_how_space]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_space]  DEFAULT ('') FOR [how_space]
GO
/****** Object:  Default [DF_critical_functions_how_equipment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_equipment]  DEFAULT ('') FOR [how_equipment]
GO
/****** Object:  Default [DF_critical_functions_how_staff]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_staff]  DEFAULT ('') FOR [how_staff]
GO
/****** Object:  Default [DF_critical_functions_how_unique_skills]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_unique_skills]  DEFAULT ('') FOR [how_unique_skills]
GO
/****** Object:  Default [DF_critical_functions_how_work_at_home]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_work_at_home]  DEFAULT ('') FOR [how_work_at_home]
GO
/****** Object:  Default [DF_critical_functions_how_network_access]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_network_access]  DEFAULT ('') FOR [how_network_access]
GO
/****** Object:  Default [DF_critical_functions_how_show_stoppers]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_show_stoppers]  DEFAULT ('') FOR [how_show_stoppers]
GO
/****** Object:  Default [DF_critical_functions_how_campus_closure]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_campus_closure]  DEFAULT ('') FOR [how_campus_closure]
GO
/****** Object:  Default [DF_critical_functions_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_critical_functions_how_risk]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_risk]  DEFAULT ('') FOR [how_risk]
GO
/****** Object:  Default [DF_critical_functions_how_policy_exceptions]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_policy_exceptions]  DEFAULT ('') FOR [how_policy_exceptions]
GO
/****** Object:  Default [DF_critical_functions_how_timing]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_timing]  DEFAULT ('') FOR [how_timing]
GO
/****** Object:  Default [DF_critical_functions_how_additional_vulnerabilities]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_how_additional_vulnerabilities]  DEFAULT ('') FOR [how_additional_vulnerabilities]
GO
/****** Object:  Default [DF__critical___con_d__38B96646]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_d__38B96646]  DEFAULT ('0') FOR [con_disruption_teaching]
GO
/****** Object:  Default [DF_critical_functions_con_disruption_teaching_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_disruption_teaching_explain]  DEFAULT ('') FOR [con_disruption_teaching_explain]
GO
/****** Object:  Default [DF__critical___con_d__39AD8A7F]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_d__39AD8A7F]  DEFAULT ('0') FOR [con_disruption_research]
GO
/****** Object:  Default [DF_critical_functions_con_disruption_research_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_disruption_research_explain]  DEFAULT ('') FOR [con_disruption_research_explain]
GO
/****** Object:  Default [DF__critical___con_l__3AA1AEB8]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_l__3AA1AEB8]  DEFAULT ('0') FOR [con_loss_faculty]
GO
/****** Object:  Default [DF_critical_functions_con_loss_faculty_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_loss_faculty_explain]  DEFAULT ('') FOR [con_loss_faculty_explain]
GO
/****** Object:  Default [DF__critical___con_l__3B95D2F1]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_l__3B95D2F1]  DEFAULT ('0') FOR [con_loss_staff]
GO
/****** Object:  Default [DF_critical_functions_con_loss_staff_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_loss_staff_explain]  DEFAULT ('') FOR [con_loss_staff_explain]
GO
/****** Object:  Default [DF__critical___con_l__3C89F72A]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_l__3C89F72A]  DEFAULT ('0') FOR [con_loss_students]
GO
/****** Object:  Default [DF_critical_functions_con_loss_students_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_loss_students_explain]  DEFAULT ('') FOR [con_loss_students_explain]
GO
/****** Object:  Default [DF__critical___con_w__3D7E1B63]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_w__3D7E1B63]  DEFAULT ('0') FOR [con_well_being_staff]
GO
/****** Object:  Default [DF_critical_functions_con_well_being_staff_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_well_being_staff_explain]  DEFAULT ('') FOR [con_well_being_staff_explain]
GO
/****** Object:  Default [DF__critical___con_w__3E723F9C]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_w__3E723F9C]  DEFAULT ('0') FOR [con_well_being_students]
GO
/****** Object:  Default [DF_critical_functions_con_well_being_students_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_well_being_students_explain]  DEFAULT ('') FOR [con_well_being_students_explain]
GO
/****** Object:  Default [DF__critical___con_p__3F6663D5]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_p__3F6663D5]  DEFAULT ('0') FOR [con_payment_deadline]
GO
/****** Object:  Default [DF_critical_functions_con_payment_deadline_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_payment_deadline_explain]  DEFAULT ('') FOR [con_payment_deadline_explain]
GO
/****** Object:  Default [DF__critical___con_l__405A880E]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_l__405A880E]  DEFAULT ('0') FOR [con_loss_revenue]
GO
/****** Object:  Default [DF_critical_functions_con_loss_revenue_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_loss_revenue_explain]  DEFAULT ('') FOR [con_loss_revenue_explain]
GO
/****** Object:  Default [DF__critical___con_l__414EAC47]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_l__414EAC47]  DEFAULT ('0') FOR [con_legal_obligations]
GO
/****** Object:  Default [DF_critical_functions_con_legal_obligations_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_legal_obligations_explain]  DEFAULT ('') FOR [con_legal_obligations_explain]
GO
/****** Object:  Default [DF__critical___con_l__4242D080]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_l__4242D080]  DEFAULT ('0') FOR [con_legal_harm]
GO
/****** Object:  Default [DF_critical_functions_con_legal_harm_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_legal_harm_explain]  DEFAULT ('') FOR [con_legal_harm_explain]
GO
/****** Object:  Default [DF__critical___con_i__4336F4B9]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_i__4336F4B9]  DEFAULT ('0') FOR [con_impact_other_campus]
GO
/****** Object:  Default [DF_critical_functions_con_impact_other_campus_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_impact_other_campus_explain]  DEFAULT ('') FOR [con_impact_other_campus_explain]
GO
/****** Object:  Default [DF__critical___con_i__442B18F2]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_i__442B18F2]  DEFAULT ('0') FOR [con_impact_business]
GO
/****** Object:  Default [DF_critical_functions_con_impact_business_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_impact_business_explain]  DEFAULT ('') FOR [con_impact_business_explain]
GO
/****** Object:  Default [DF__critical___con_o__451F3D2B]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF__critical___con_o__451F3D2B]  DEFAULT ('0') FOR [con_other]
GO
/****** Object:  Default [DF_critical_functions_con_other_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_other_explain]  DEFAULT ('') FOR [con_other_explain]
GO
/****** Object:  Default [DF_critical_functions_con_disruption_patientcare]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_disruption_patientcare]  DEFAULT ('0') FOR [con_disruption_patientcare]
GO
/****** Object:  Default [DF_critical_functions_con_disruption_patientcare_explain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_con_disruption_patientcare_explain]  DEFAULT ('') FOR [con_disruption_patientcare_explain]
GO
/****** Object:  Default [DF_critical_functions_disabled]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_disabled]  DEFAULT ('N') FOR [disabled]
GO
/****** Object:  Default [DF_critical_functions_old_cid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions] ADD  CONSTRAINT [DF_critical_functions_old_cid]  DEFAULT ((0)) FOR [old_cid]
GO
/****** Object:  Default [DF_plan_buildings_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_buildings] ADD  CONSTRAINT [DF_plan_buildings_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_plan_buildings_BuildingID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_buildings] ADD  CONSTRAINT [DF_plan_buildings_BuildingID]  DEFAULT ((0)) FOR [BuildingID]
GO
/****** Object:  Default [DF_plan_buildings_BuildingComment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_buildings] ADD  CONSTRAINT [DF_plan_buildings_BuildingComment]  DEFAULT ('') FOR [BuildingComment]
GO
/****** Object:  Default [DF_PlannerLog_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerLog] ADD  CONSTRAINT [DF_PlannerLog_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_PlannerLog_PlannerCategoryID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerLog] ADD  CONSTRAINT [DF_PlannerLog_PlannerCategoryID]  DEFAULT ((0)) FOR [PlannerCategoryID]
GO
/****** Object:  Default [DF_PlannerLog_Note1]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerLog] ADD  CONSTRAINT [DF_PlannerLog_Note1]  DEFAULT ('') FOR [Description]
GO
/****** Object:  Default [DF_PlannerLog_Note2]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerLog] ADD  CONSTRAINT [DF_PlannerLog_Note2]  DEFAULT ('') FOR [Note]
GO
/****** Object:  Default [DF_PlannerLog_AlertFlag]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerLog] ADD  CONSTRAINT [DF_PlannerLog_AlertFlag]  DEFAULT ('0') FOR [AlertFlag]
GO
/****** Object:  Default [DF_PlannerLog_AlertPeriod]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerLog] ADD  CONSTRAINT [DF_PlannerLog_AlertPeriod]  DEFAULT ('1') FOR [AlertPeriod]
GO
/****** Object:  Default [DF_PlannerLog_AlertList]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerLog] ADD  CONSTRAINT [DF_PlannerLog_AlertList]  DEFAULT ('') FOR [AlertList]
GO
/****** Object:  Default [DF_PlannerLog_CreateDate]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerLog] ADD  CONSTRAINT [DF_PlannerLog_CreateDate]  DEFAULT (getdate()) FOR [CreateDate]
GO
/****** Object:  Default [DF_plan_reviewers_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_reviewers] ADD  CONSTRAINT [DF_plan_reviewers_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_plan_reviewers_review_type]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_reviewers] ADD  CONSTRAINT [DF_plan_reviewers_review_type]  DEFAULT ('A') FOR [review_type]
GO
/****** Object:  Default [DF_plan_reviewers_first_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_reviewers] ADD  CONSTRAINT [DF_plan_reviewers_first_name]  DEFAULT ('') FOR [first_name]
GO
/****** Object:  Default [DF_plan_reviewers_last_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_reviewers] ADD  CONSTRAINT [DF_plan_reviewers_last_name]  DEFAULT ('') FOR [last_name]
GO
/****** Object:  Default [DF_plan_reviewers_review_date]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_reviewers] ADD  CONSTRAINT [DF_plan_reviewers_review_date]  DEFAULT (getdate()) FOR [review_date]
GO
/****** Object:  Default [DF_plan_reviewers_head_or_designee]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_reviewers] ADD  CONSTRAINT [DF_plan_reviewers_head_or_designee]  DEFAULT ('H') FOR [head_or_designee]
GO
/****** Object:  Default [DF_plan_reviewers_enter_by]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_reviewers] ADD  CONSTRAINT [DF_plan_reviewers_enter_by]  DEFAULT ((0)) FOR [enter_by]
GO
/****** Object:  Default [DF_plan_reviewers_enter_date_time]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_reviewers] ADD  CONSTRAINT [DF_plan_reviewers_enter_date_time]  DEFAULT (getdate()) FOR [enter_date_time]
GO
/****** Object:  Default [DF_plan_department_types_pid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_department_types] ADD  CONSTRAINT [DF_plan_department_types_pid]  DEFAULT ((0)) FOR [pid]
GO
/****** Object:  Default [DF_plan_department_types_DepartmentTypeID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_department_types] ADD  CONSTRAINT [DF_plan_department_types_DepartmentTypeID]  DEFAULT ((0)) FOR [DepartmentTypeID]
GO
/****** Object:  Default [DF_Reference_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Reference] ADD  CONSTRAINT [DF_Reference_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_Reference_Item]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Reference] ADD  CONSTRAINT [DF_Reference_Item]  DEFAULT ('') FOR [Reference]
GO
/****** Object:  Default [DF_Reference_Priority]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Reference] ADD  CONSTRAINT [DF_Reference_Priority]  DEFAULT ((1)) FOR [OrderNo]
GO
/****** Object:  Default [DF_FAQ_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[FAQ] ADD  CONSTRAINT [DF_FAQ_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_FAQ_Question]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[FAQ] ADD  CONSTRAINT [DF_FAQ_Question]  DEFAULT ('') FOR [Question]
GO
/****** Object:  Default [DF_FAQ_Answer]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[FAQ] ADD  CONSTRAINT [DF_FAQ_Answer]  DEFAULT ('') FOR [Answer]
GO
/****** Object:  Default [DF_FAQ_Priority]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[FAQ] ADD  CONSTRAINT [DF_FAQ_Priority]  DEFAULT ((1)) FOR [OrderNo]
GO
/****** Object:  Default [DF_Building_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Building] ADD  CONSTRAINT [DF_Building_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_Building_CAAN]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Building] ADD  CONSTRAINT [DF_Building_CAAN]  DEFAULT ('') FOR [CAAN]
GO
/****** Object:  Default [DF_Building_Name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Building] ADD  CONSTRAINT [DF_Building_Name]  DEFAULT ('') FOR [BuildingName]
GO
/****** Object:  Default [DF_Building_CommonName]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Building] ADD  CONSTRAINT [DF_Building_CommonName]  DEFAULT ('') FOR [BuildingCommonName]
GO
/****** Object:  Default [DF_Building_Address]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Building] ADD  CONSTRAINT [DF_Building_Address]  DEFAULT ('') FOR [BuildingAddress]
GO
/****** Object:  Default [DF_Building_OwnedFlag]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Building] ADD  CONSTRAINT [DF_Building_OwnedFlag]  DEFAULT ('1') FOR [Ownership]
GO
/****** Object:  Default [DF_ThingsToKnow_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[ThingsToKnow] ADD  CONSTRAINT [DF_ThingsToKnow_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_ThingsToKnow_Item]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[ThingsToKnow] ADD  CONSTRAINT [DF_ThingsToKnow_Item]  DEFAULT ('') FOR [ThingsToKnowItem]
GO
/****** Object:  Default [DF_ThingsToKnow_Priority]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[ThingsToKnow] ADD  CONSTRAINT [DF_ThingsToKnow_Priority]  DEFAULT ((1)) FOR [OrderNo]
GO
/****** Object:  Default [DF_DepartmentType_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[DepartmentType] ADD  CONSTRAINT [DF_DepartmentType_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_DepartmentType_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[DepartmentType] ADD  CONSTRAINT [DF_DepartmentType_OrderNo]  DEFAULT ((0)) FOR [OrderNo]
GO
/****** Object:  Default [DF_PlannerCategory_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerCategory] ADD  CONSTRAINT [DF_PlannerCategory_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_PlannerCategory_Item]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerCategory] ADD  CONSTRAINT [DF_PlannerCategory_Item]  DEFAULT ('') FOR [Item]
GO
/****** Object:  Default [DF_PlannerCategory_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerCategory] ADD  CONSTRAINT [DF_PlannerCategory_OrderNo]  DEFAULT ((0)) FOR [OrderNo]
GO
/****** Object:  Default [DF_CentralApplication_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[CentralApplication] ADD  CONSTRAINT [DF_CentralApplication_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_CentralApplication_Name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[CentralApplication] ADD  CONSTRAINT [DF_CentralApplication_Name]  DEFAULT ('') FOR [Name]
GO
/****** Object:  Default [DF_CentralApplication_RecordType]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[CentralApplication] ADD  CONSTRAINT [DF_CentralApplication_RecordType]  DEFAULT ('S') FOR [RecordType]
GO
/****** Object:  Default [DF_CentralApplication_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[CentralApplication] ADD  CONSTRAINT [DF_CentralApplication_OrderNo]  DEFAULT ((0)) FOR [OrderNo]
GO
/****** Object:  Default [DF_ContactUs_InstitututionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[ContactUs] ADD  CONSTRAINT [DF_ContactUs_InstitututionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_ContactUs_Contact]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[ContactUs] ADD  CONSTRAINT [DF_ContactUs_Contact]  DEFAULT ('') FOR [Contact]
GO
/****** Object:  Default [DF_ContactUs_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[ContactUs] ADD  CONSTRAINT [DF_ContactUs_OrderNo]  DEFAULT ((1)) FOR [OrderNo]
GO
/****** Object:  Default [DF_Dependency_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Dependency] ADD  CONSTRAINT [DF_Dependency_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_Dependency_Name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Dependency] ADD  CONSTRAINT [DF_Dependency_Name]  DEFAULT ('') FOR [Dependency]
GO
/****** Object:  Default [DF_Dependency_Type]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Dependency] ADD  CONSTRAINT [DF_Dependency_Type]  DEFAULT ('1') FOR [DependencyType]
GO
/****** Object:  Default [DF_Dependency_RecordType]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Dependency] ADD  CONSTRAINT [DF_Dependency_RecordType]  DEFAULT ('S') FOR [RecordType]
GO
/****** Object:  Default [DF_Dependency_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Dependency] ADD  CONSTRAINT [DF_Dependency_OrderNo]  DEFAULT ((0)) FOR [OrderNo]
GO
/****** Object:  Default [DF_AnnualReview_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[AnnualReview] ADD  CONSTRAINT [DF_AnnualReview_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_AnnualReview_AnnualReview]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[AnnualReview] ADD  CONSTRAINT [DF_AnnualReview_AnnualReview]  DEFAULT ('') FOR [ReviewItem]
GO
/****** Object:  Default [DF_AnnualReview_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[AnnualReview] ADD  CONSTRAINT [DF_AnnualReview_OrderNo]  DEFAULT ((1)) FOR [OrderNo]
GO
/****** Object:  Default [DF_Acronym_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Acronym] ADD  CONSTRAINT [DF_Acronym_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_Acronym_Acronym]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Acronym] ADD  CONSTRAINT [DF_Acronym_Acronym]  DEFAULT ('') FOR [Acronym]
GO
/****** Object:  Default [DF_Acronym_FullName]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Acronym] ADD  CONSTRAINT [DF_Acronym_FullName]  DEFAULT ('') FOR [FullName]
GO
/****** Object:  Default [DF_Utility_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Utility] ADD  CONSTRAINT [DF_Utility_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_Utility_Name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Utility] ADD  CONSTRAINT [DF_Utility_Name]  DEFAULT ('') FOR [Name]
GO
/****** Object:  Default [DF_Utility_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Utility] ADD  CONSTRAINT [DF_Utility_OrderNo]  DEFAULT ((0)) FOR [OrderNo]
GO
/****** Object:  Default [DF_StaffCategory_InstitutionId]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[StaffCategory] ADD  CONSTRAINT [DF_StaffCategory_InstitutionId]  DEFAULT ((0)) FOR [InstitutionId]
GO
/****** Object:  Default [DF_StaffCategory_Name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[StaffCategory] ADD  CONSTRAINT [DF_StaffCategory_Name]  DEFAULT ('') FOR [StaffCategory]
GO
/****** Object:  Default [DF_StaffCategory_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[StaffCategory] ADD  CONSTRAINT [DF_StaffCategory_OrderNo]  DEFAULT ((0)) FOR [OrderNo]
GO
/****** Object:  Default [DF_FunctionExample_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[FunctionExample] ADD  CONSTRAINT [DF_FunctionExample_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_FunctionExample_PlanList]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[FunctionExample] ADD  CONSTRAINT [DF_FunctionExample_PlanList]  DEFAULT ('') FOR [PlanList]
GO
/****** Object:  Default [DF_Skill_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Skill] ADD  CONSTRAINT [DF_Skill_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_Skill_Name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Skill] ADD  CONSTRAINT [DF_Skill_Name]  DEFAULT ('') FOR [Name]
GO
/****** Object:  Default [DF_Skill_Description]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Skill] ADD  CONSTRAINT [DF_Skill_Description]  DEFAULT ('') FOR [Description]
GO
/****** Object:  Default [DF_Skill_RecordType]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Skill] ADD  CONSTRAINT [DF_Skill_RecordType]  DEFAULT ('S') FOR [RecordType]
GO
/****** Object:  Default [DF_Skill_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Skill] ADD  CONSTRAINT [DF_Skill_OrderNo]  DEFAULT ((0)) FOR [OrderNo]
GO
/****** Object:  Default [DF_Division_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[MajorDivision] ADD  CONSTRAINT [DF_Division_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_Division_Name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[MajorDivision] ADD  CONSTRAINT [DF_Division_Name]  DEFAULT ('') FOR [MajorDivisionName]
GO
/****** Object:  Default [DF_Shift_InstitutionID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Shift] ADD  CONSTRAINT [DF_Shift_InstitutionID]  DEFAULT ((0)) FOR [InstitutionID]
GO
/****** Object:  Default [DF_Shift_Name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Shift] ADD  CONSTRAINT [DF_Shift_Name]  DEFAULT ('') FOR [Name]
GO
/****** Object:  Default [DF_Shift_OrderNo]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Shift] ADD  CONSTRAINT [DF_Shift_OrderNo]  DEFAULT ((0)) FOR [OrderNo]
GO
/****** Object:  Default [DF_SystemDomain_Institution]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_Institution]  DEFAULT ('') FOR [Institution]
GO
/****** Object:  Default [DF_SystemDomain_InstititionType]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_InstititionType]  DEFAULT ('0') FOR [InstitutionType]
GO
/****** Object:  Default [DF_SystemDomain_InstitutionOrgList]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_InstitutionOrgList]  DEFAULT ('') FOR [InstitutionOrgList]
GO
/****** Object:  Default [DF_SystemDomain_AuthLocation]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_AuthLocation]  DEFAULT ('') FOR [AuthLocation]
GO
/****** Object:  Default [DF_SystemDomain_AuthType]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_AuthType]  DEFAULT ('1') FOR [AuthType]
GO
/****** Object:  Default [DF_SystemDomain_ShibIdentity]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_ShibIdentity]  DEFAULT ((0)) FOR [Domain]
GO
/****** Object:  Default [DF_SystemDomain_News]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_News]  DEFAULT ('') FOR [News]
GO
/****** Object:  Default [DF_SystemDomain_NewsExpirationDate]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_NewsExpirationDate]  DEFAULT (((1)/(1))/(2000)) FOR [NewsExpirationDate]
GO
/****** Object:  Default [DF_SystemDomain_Tips]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_Tips]  DEFAULT ('') FOR [Tips]
GO
/****** Object:  Default [DF_SystemDomain_TipsExpirationDate]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_TipsExpirationDate]  DEFAULT (((1)/(1))/(2000)) FOR [TipsExpirationDate]
GO
/****** Object:  Default [DF_SystemDomain_Phone]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_Phone]  DEFAULT ('') FOR [Phone]
GO
/****** Object:  Default [DF_SystemDomain_Fax]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_Fax]  DEFAULT ('') FOR [Fax]
GO
/****** Object:  Default [DF_SystemDomain_EMail]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_EMail]  DEFAULT ('') FOR [EMail]
GO
/****** Object:  Default [DF_SystemDomain_InstitutionStatus]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_InstitutionStatus]  DEFAULT ('2') FOR [InstitutionAccess]
GO
/****** Object:  Default [DF_SystemDomain_DirectoryAccess]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_DirectoryAccess]  DEFAULT ('1') FOR [DirectoryAccess]
GO
/****** Object:  Default [DF_SystemDomain_TeamsScreenFlag]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_TeamsScreenFlag]  DEFAULT ('1') FOR [TeamsScreenFlag]
GO
/****** Object:  Default [DF_SystemDomain_SkillsScreenFlag]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_SkillsScreenFlag]  DEFAULT ('1') FOR [SkillsScreenFlag]
GO
/****** Object:  Default [DF_SystemDomain_StaffingFlag]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_StaffingFlag]  DEFAULT ('1') FOR [StaffingScreenFlag]
GO
/****** Object:  Default [DF_SystemDomain_ExamplesFlag]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_ExamplesFlag]  DEFAULT ('1') FOR [ExamplesScreenFlag]
GO
/****** Object:  Default [DF_SystemDomain_LBNLFlag]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [DF_SystemDomain_LBNLFlag]  DEFAULT ('0') FOR [LBNLFlag]
GO
/****** Object:  Default [ReplaceStep4Flag_un]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [ReplaceStep4Flag_un]  DEFAULT ('0') FOR [ReplaceStep4Flag]
GO
/****** Object:  Default [Instruction_URL_un]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  CONSTRAINT [Instruction_URL_un]  DEFAULT ('') FOR [Instruction_URL]
GO
/****** Object:  Default [DF__SystemDom__Criti__01E9EAF7]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain] ADD  DEFAULT ('0') FOR [CriticalLvlDtlsFlag]
GO
/****** Object:  Default [DF_key_critical_function_documents_cid]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_cid]  DEFAULT ((0)) FOR [cid]
GO
/****** Object:  Default [DF_key_critical_function_documents_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_name]  DEFAULT ('') FOR [name]
GO
/****** Object:  Default [DF_key_critical_function_documents_owner_department]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_owner_department]  DEFAULT ('') FOR [owner_department]
GO
/****** Object:  Default [DF_key_critical_function_documents_original_file_name]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_original_file_name]  DEFAULT ('') FOR [original_file_name]
GO
/****** Object:  Default [DF_key_critical_function_documents_location_kept]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_location_kept]  DEFAULT ('') FOR [location_kept]
GO
/****** Object:  Default [DF_key_critical_function_documents_comment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_comment]  DEFAULT ('') FOR [comment]
GO
/****** Object:  Default [DF_key_critical_function_documents_description]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_description]  DEFAULT ('') FOR [description]
GO
/****** Object:  Default [DF_key_critical_function_documents_mediumID]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_mediumID]  DEFAULT ((0)) FOR [mediumID]
GO
/****** Object:  Default [DF_key_critical_function_documents_contacts]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_contacts]  DEFAULT ('') FOR [contacts]
GO
/****** Object:  Default [DF_key_critical_function_documents_backup_measures]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_backup_measures]  DEFAULT ('') FOR [backup_measures]
GO
/****** Object:  Default [DF_key_critical_function_documents_old_kcd_id]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents] ADD  CONSTRAINT [DF_key_critical_function_documents_old_kcd_id]  DEFAULT ((0)) FOR [old_kcd_id]
GO
/****** Object:  ForeignKey [FK_key_utility_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_utility]  WITH CHECK ADD  CONSTRAINT [FK_key_utility_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_utility] CHECK CONSTRAINT [FK_key_utility_plans]
GO
/****** Object:  ForeignKey [FK_key_utility_Utility]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_utility]  WITH CHECK ADD  CONSTRAINT [FK_key_utility_Utility] FOREIGN KEY([UtilityID])
REFERENCES [dbo].[Utility] ([UtilityID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_utility] CHECK CONSTRAINT [FK_key_utility_Utility]
GO
/****** Object:  ForeignKey [FK_key_team_members_key_teams]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_team_members]  WITH CHECK ADD  CONSTRAINT [FK_key_team_members_key_teams] FOREIGN KEY([kt_id])
REFERENCES [dbo].[key_teams] ([kt_id])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_team_members] CHECK CONSTRAINT [FK_key_team_members_key_teams]
GO
/****** Object:  ForeignKey [FK_plans_instructions_InstructionalDepartment]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions]  WITH CHECK ADD  CONSTRAINT [FK_plans_instructions_InstructionalDepartment] FOREIGN KEY([InstructionalDepartmentID])
REFERENCES [dbo].[InstructionalDepartment] ([InstructionalDepartmentID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plans_instructions] CHECK CONSTRAINT [FK_plans_instructions_InstructionalDepartment]
GO
/****** Object:  ForeignKey [FK_plans_instructions_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plans_instructions]  WITH CHECK ADD  CONSTRAINT [FK_plans_instructions_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plans_instructions] CHECK CONSTRAINT [FK_plans_instructions_plans]
GO
/****** Object:  ForeignKey [FK_instruction_teaching_issues_plans_instructions]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_teaching_issues]  WITH CHECK ADD  CONSTRAINT [FK_instruction_teaching_issues_plans_instructions] FOREIGN KEY([pis_id])
REFERENCES [dbo].[plans_instructions] ([pis_id])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[instruction_teaching_issues] CHECK CONSTRAINT [FK_instruction_teaching_issues_plans_instructions]
GO
/****** Object:  ForeignKey [FK_instruction_high_priority_plans_instructions]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[instruction_high_priority]  WITH CHECK ADD  CONSTRAINT [FK_instruction_high_priority_plans_instructions] FOREIGN KEY([pis_id])
REFERENCES [dbo].[plans_instructions] ([pis_id])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[instruction_high_priority] CHECK CONSTRAINT [FK_instruction_high_priority_plans_instructions]
GO
/****** Object:  ForeignKey [FK_cf_dependency_Dependency]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[cf_dependency]  WITH CHECK ADD  CONSTRAINT [FK_cf_dependency_Dependency] FOREIGN KEY([DependencyID])
REFERENCES [dbo].[Dependency] ([DependencyID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[cf_dependency] CHECK CONSTRAINT [FK_cf_dependency_Dependency]
GO
/****** Object:  ForeignKey [FK_cf_downstream_dependency_cf_downstream_dependency]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[cf_dependency]  WITH CHECK ADD  CONSTRAINT [FK_cf_downstream_dependency_cf_downstream_dependency] FOREIGN KEY([cid])
REFERENCES [dbo].[critical_functions] ([cid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[cf_dependency] CHECK CONSTRAINT [FK_cf_downstream_dependency_cf_downstream_dependency]
GO
/****** Object:  ForeignKey [FK_key_skills_Skill]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_skills]  WITH CHECK ADD  CONSTRAINT [FK_key_skills_Skill] FOREIGN KEY([SkillID])
REFERENCES [dbo].[Skill] ([SkillID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_skills] CHECK CONSTRAINT [FK_key_skills_Skill]
GO
/****** Object:  ForeignKey [FK_ks_id_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_skills]  WITH CHECK ADD  CONSTRAINT [FK_ks_id_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_skills] CHECK CONSTRAINT [FK_ks_id_plans]
GO
/****** Object:  ForeignKey [FK_key_staffing_req_critical_functions]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staffing_req]  WITH CHECK ADD  CONSTRAINT [FK_key_staffing_req_critical_functions] FOREIGN KEY([cid])
REFERENCES [dbo].[critical_functions] ([cid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_staffing_req] CHECK CONSTRAINT [FK_key_staffing_req_critical_functions]
GO
/****** Object:  ForeignKey [FK_key_staffing_req_Shift]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staffing_req]  WITH CHECK ADD  CONSTRAINT [FK_key_staffing_req_Shift] FOREIGN KEY([ShiftID])
REFERENCES [dbo].[Shift] ([ShiftID])
GO
ALTER TABLE [dbo].[key_staffing_req] CHECK CONSTRAINT [FK_key_staffing_req_Shift]
GO
/****** Object:  ForeignKey [FK_key_staffing_req_StaffCategory]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staffing_req]  WITH CHECK ADD  CONSTRAINT [FK_key_staffing_req_StaffCategory] FOREIGN KEY([StaffCategoryID])
REFERENCES [dbo].[StaffCategory] ([StaffCategoryID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_staffing_req] CHECK CONSTRAINT [FK_key_staffing_req_StaffCategory]
GO
/****** Object:  ForeignKey [FK_work_home_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_work_home]  WITH NOCHECK ADD  CONSTRAINT [FK_work_home_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_work_home] CHECK CONSTRAINT [FK_work_home_plans]
GO
/****** Object:  ForeignKey [FK_user_plan_plans1]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[user_plan]  WITH CHECK ADD  CONSTRAINT [FK_user_plan_plans1] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[user_plan] CHECK CONSTRAINT [FK_user_plan_plans1]
GO
/****** Object:  ForeignKey [FK_user_plan_UserSecurity]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[user_plan]  WITH CHECK ADD  CONSTRAINT [FK_user_plan_UserSecurity] FOREIGN KEY([UserID])
REFERENCES [dbo].[UserSecurity] ([UserID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[user_plan] CHECK CONSTRAINT [FK_user_plan_UserSecurity]
GO
/****** Object:  ForeignKey [FK_key_plan_documents_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_plan_documents]  WITH CHECK ADD  CONSTRAINT [FK_key_plan_documents_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_plan_documents] CHECK CONSTRAINT [FK_key_plan_documents_plans]
GO
/****** Object:  ForeignKey [FK_plan_contacts_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_contacts]  WITH CHECK ADD  CONSTRAINT [FK_plan_contacts_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plan_contacts] CHECK CONSTRAINT [FK_plan_contacts_plans]
GO
/****** Object:  ForeignKey [FK_plan_contacts_UserSecurity]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_contacts]  WITH CHECK ADD  CONSTRAINT [FK_plan_contacts_UserSecurity] FOREIGN KEY([UserID])
REFERENCES [dbo].[UserSecurity] ([UserID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plan_contacts] CHECK CONSTRAINT [FK_plan_contacts_UserSecurity]
GO
/****** Object:  ForeignKey [FK_key_staff_unit_plans1]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_unit]  WITH CHECK ADD  CONSTRAINT [FK_key_staff_unit_plans1] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_staff_unit] CHECK CONSTRAINT [FK_key_staff_unit_plans1]
GO
/****** Object:  ForeignKey [FK_it_servers_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_servers]  WITH CHECK ADD  CONSTRAINT [FK_it_servers_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[it_servers] CHECK CONSTRAINT [FK_it_servers_plans]
GO
/****** Object:  ForeignKey [FK_it_central_applications_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_central_applications]  WITH CHECK ADD  CONSTRAINT [FK_it_central_applications_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[it_central_applications] CHECK CONSTRAINT [FK_it_central_applications_plans]
GO
/****** Object:  ForeignKey [FK_it_applications_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[it_applications]  WITH CHECK ADD  CONSTRAINT [FK_it_applications_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[it_applications] CHECK CONSTRAINT [FK_it_applications_plans]
GO
/****** Object:  ForeignKey [FK_key_teams_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_teams]  WITH CHECK ADD  CONSTRAINT [FK_key_teams_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_teams] CHECK CONSTRAINT [FK_key_teams_plans]
GO
/****** Object:  ForeignKey [FK_key_communication_plans1]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_communication]  WITH CHECK ADD  CONSTRAINT [FK_key_communication_plans1] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_communication] CHECK CONSTRAINT [FK_key_communication_plans1]
GO
/****** Object:  ForeignKey [FK_plan_unit_heads_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_unit_heads]  WITH CHECK ADD  CONSTRAINT [FK_plan_unit_heads_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plan_unit_heads] CHECK CONSTRAINT [FK_plan_unit_heads_plans]
GO
/****** Object:  ForeignKey [FK_plan_unit_heads_UserSecurity]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_unit_heads]  WITH CHECK ADD  CONSTRAINT [FK_plan_unit_heads_UserSecurity] FOREIGN KEY([UserID])
REFERENCES [dbo].[UserSecurity] ([UserID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plan_unit_heads] CHECK CONSTRAINT [FK_plan_unit_heads_UserSecurity]
GO
/****** Object:  ForeignKey [FK_key_stakeholders_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_stakeholders]  WITH CHECK ADD  CONSTRAINT [FK_key_stakeholders_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_stakeholders] CHECK CONSTRAINT [FK_key_stakeholders_plans]
GO
/****** Object:  ForeignKey [FK_key_staff_other_units_plans1]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_staff_other_units]  WITH CHECK ADD  CONSTRAINT [FK_key_staff_other_units_plans1] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_staff_other_units] CHECK CONSTRAINT [FK_key_staff_other_units_plans1]
GO
/****** Object:  ForeignKey [FK_action_items_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[action_items]  WITH CHECK ADD  CONSTRAINT [FK_action_items_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[action_items] CHECK CONSTRAINT [FK_action_items_plans]
GO
/****** Object:  ForeignKey [FK_critical_functions_plans1]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[critical_functions]  WITH CHECK ADD  CONSTRAINT [FK_critical_functions_plans1] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[critical_functions] CHECK CONSTRAINT [FK_critical_functions_plans1]
GO
/****** Object:  ForeignKey [FK_plan_buildings_Building]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_buildings]  WITH CHECK ADD  CONSTRAINT [FK_plan_buildings_Building] FOREIGN KEY([BuildingID])
REFERENCES [dbo].[Building] ([BuildingID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plan_buildings] CHECK CONSTRAINT [FK_plan_buildings_Building]
GO
/****** Object:  ForeignKey [FK_plan_buildings_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_buildings]  WITH CHECK ADD  CONSTRAINT [FK_plan_buildings_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plan_buildings] CHECK CONSTRAINT [FK_plan_buildings_plans]
GO
/****** Object:  ForeignKey [FK_PlannerLog_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerLog]  WITH CHECK ADD  CONSTRAINT [FK_PlannerLog_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[PlannerLog] CHECK CONSTRAINT [FK_PlannerLog_plans]
GO
/****** Object:  ForeignKey [FK_plan_reviewers_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_reviewers]  WITH CHECK ADD  CONSTRAINT [FK_plan_reviewers_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plan_reviewers] CHECK CONSTRAINT [FK_plan_reviewers_plans]
GO
/****** Object:  ForeignKey [FK_plan_department_types_DepartmentType]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_department_types]  WITH CHECK ADD  CONSTRAINT [FK_plan_department_types_DepartmentType] FOREIGN KEY([DepartmentTypeID])
REFERENCES [dbo].[DepartmentType] ([DepartmentTypeId])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plan_department_types] CHECK CONSTRAINT [FK_plan_department_types_DepartmentType]
GO
/****** Object:  ForeignKey [FK_plan_department_types_plans]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[plan_department_types]  WITH CHECK ADD  CONSTRAINT [FK_plan_department_types_plans] FOREIGN KEY([pid])
REFERENCES [dbo].[plans] ([pid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[plan_department_types] CHECK CONSTRAINT [FK_plan_department_types_plans]
GO
/****** Object:  ForeignKey [FK_Reference_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Reference]  WITH CHECK ADD  CONSTRAINT [FK_Reference_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Reference] CHECK CONSTRAINT [FK_Reference_SystemDomain]
GO
/****** Object:  ForeignKey [FK_FAQ_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[FAQ]  WITH CHECK ADD  CONSTRAINT [FK_FAQ_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[FAQ] CHECK CONSTRAINT [FK_FAQ_SystemDomain]
GO
/****** Object:  ForeignKey [FK_SystemDomainUIImage_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomainUIImage]  WITH CHECK ADD  CONSTRAINT [FK_SystemDomainUIImage_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[SystemDomainUIImage] CHECK CONSTRAINT [FK_SystemDomainUIImage_SystemDomain]
GO
/****** Object:  ForeignKey [FK_SystemDomainUIText_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomainUIText]  WITH CHECK ADD  CONSTRAINT [FK_SystemDomainUIText_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[SystemDomainUIText] CHECK CONSTRAINT [FK_SystemDomainUIText_SystemDomain]
GO
/****** Object:  ForeignKey [FK_Building_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Building]  WITH CHECK ADD  CONSTRAINT [FK_Building_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Building] CHECK CONSTRAINT [FK_Building_SystemDomain]
GO
/****** Object:  ForeignKey [FK_NetDomain_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[NetDomain]  WITH CHECK ADD  CONSTRAINT [FK_NetDomain_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[NetDomain] CHECK CONSTRAINT [FK_NetDomain_SystemDomain]
GO
/****** Object:  ForeignKey [FK_SystemDomainCriticalLevelFunc_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomainCriticalLevelFunc]  WITH CHECK ADD  CONSTRAINT [FK_SystemDomainCriticalLevelFunc_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[SystemDomainCriticalLevelFunc] CHECK CONSTRAINT [FK_SystemDomainCriticalLevelFunc_SystemDomain]
GO
/****** Object:  ForeignKey [FK_SystemDomainCriticalLevelAppl_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomainCriticalLevelAppl]  WITH CHECK ADD  CONSTRAINT [FK_SystemDomainCriticalLevelAppl_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[SystemDomainCriticalLevelAppl] CHECK CONSTRAINT [FK_SystemDomainCriticalLevelAppl_SystemDomain]
GO
/****** Object:  ForeignKey [FK_ThingsToKnow_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[ThingsToKnow]  WITH CHECK ADD  CONSTRAINT [FK_ThingsToKnow_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ThingsToKnow] CHECK CONSTRAINT [FK_ThingsToKnow_SystemDomain]
GO
/****** Object:  ForeignKey [FK_DepartmentType_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[DepartmentType]  WITH CHECK ADD  CONSTRAINT [FK_DepartmentType_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[DepartmentType] CHECK CONSTRAINT [FK_DepartmentType_SystemDomain]
GO
/****** Object:  ForeignKey [FK_PlannerCategory_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[PlannerCategory]  WITH CHECK ADD  CONSTRAINT [FK_PlannerCategory_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[PlannerCategory] CHECK CONSTRAINT [FK_PlannerCategory_SystemDomain]
GO
/****** Object:  ForeignKey [FK_CentralApplication_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[CentralApplication]  WITH CHECK ADD  CONSTRAINT [FK_CentralApplication_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[CentralApplication] CHECK CONSTRAINT [FK_CentralApplication_SystemDomain]
GO
/****** Object:  ForeignKey [FK_ContactUs_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[ContactUs]  WITH CHECK ADD  CONSTRAINT [FK_ContactUs_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ContactUs] CHECK CONSTRAINT [FK_ContactUs_SystemDomain]
GO
/****** Object:  ForeignKey [FK_Dependency_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Dependency]  WITH CHECK ADD  CONSTRAINT [FK_Dependency_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Dependency] CHECK CONSTRAINT [FK_Dependency_SystemDomain]
GO
/****** Object:  ForeignKey [FK_AnnualReview_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[AnnualReview]  WITH CHECK ADD  CONSTRAINT [FK_AnnualReview_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[AnnualReview] CHECK CONSTRAINT [FK_AnnualReview_SystemDomain]
GO
/****** Object:  ForeignKey [FK_Acronym_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Acronym]  WITH CHECK ADD  CONSTRAINT [FK_Acronym_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Acronym] CHECK CONSTRAINT [FK_Acronym_SystemDomain]
GO
/****** Object:  ForeignKey [FK_Utility_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Utility]  WITH CHECK ADD  CONSTRAINT [FK_Utility_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Utility] CHECK CONSTRAINT [FK_Utility_SystemDomain]
GO
/****** Object:  ForeignKey [FK_StaffCategory_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[StaffCategory]  WITH CHECK ADD  CONSTRAINT [FK_StaffCategory_SystemDomain] FOREIGN KEY([InstitutionId])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[StaffCategory] CHECK CONSTRAINT [FK_StaffCategory_SystemDomain]
GO
/****** Object:  ForeignKey [FK_FunctionExample_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[FunctionExample]  WITH CHECK ADD  CONSTRAINT [FK_FunctionExample_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[FunctionExample] CHECK CONSTRAINT [FK_FunctionExample_SystemDomain]
GO
/****** Object:  ForeignKey [FK_Skill_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Skill]  WITH CHECK ADD  CONSTRAINT [FK_Skill_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Skill] CHECK CONSTRAINT [FK_Skill_SystemDomain]
GO
/****** Object:  ForeignKey [FK_MajorDivision_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[MajorDivision]  WITH CHECK ADD  CONSTRAINT [FK_MajorDivision_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[MajorDivision] CHECK CONSTRAINT [FK_MajorDivision_SystemDomain]
GO
/****** Object:  ForeignKey [FK_Shift_SystemDomain]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[Shift]  WITH CHECK ADD  CONSTRAINT [FK_Shift_SystemDomain] FOREIGN KEY([InstitutionID])
REFERENCES [dbo].[SystemDomain] ([InstitutionID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Shift] CHECK CONSTRAINT [FK_Shift_SystemDomain]
GO
/****** Object:  ForeignKey [FK_SystemDomain_SystemDomainGroup]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[SystemDomain]  WITH CHECK ADD  CONSTRAINT [FK_SystemDomain_SystemDomainGroup] FOREIGN KEY([InstGroupID])
REFERENCES [dbo].[SystemDomainGroup] ([InstGroupID])
ON UPDATE CASCADE
ON DELETE SET NULL
GO
ALTER TABLE [dbo].[SystemDomain] CHECK CONSTRAINT [FK_SystemDomain_SystemDomainGroup]
GO
/****** Object:  ForeignKey [FK_AdminTestMode_UserSecurity]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[AdminTestMode]  WITH CHECK ADD  CONSTRAINT [FK_AdminTestMode_UserSecurity] FOREIGN KEY([UserID])
REFERENCES [dbo].[UserSecurity] ([UserID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[AdminTestMode] CHECK CONSTRAINT [FK_AdminTestMode_UserSecurity]
GO
/****** Object:  ForeignKey [FK_key_critical_function_documents_critical_functions]    Script Date: 05/20/2011 14:41:32 ******/
ALTER TABLE [dbo].[key_critical_function_documents]  WITH CHECK ADD  CONSTRAINT [FK_key_critical_function_documents_critical_functions] FOREIGN KEY([cid])
REFERENCES [dbo].[critical_functions] ([cid])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[key_critical_function_documents] CHECK CONSTRAINT [FK_key_critical_function_documents_critical_functions]
GO
