From: Ken Youens-Clark Date: Mon, 18 Aug 2003 20:03:53 +0000 (+0000) Subject: Replacing contents with Paul's output from dbschema.pl 2.4.2. X-Git-Tag: v0.04~298 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=72ebf03e7c41e10f16ec23ecda278fb2b365fc67;p=dbsrgits%2FSQL-Translator.git Replacing contents with Paul's output from dbschema.pl 2.4.2. --- diff --git a/t/data/sybase/create.sql b/t/data/sybase/create.sql index 7553c62..4ae380b 100644 --- a/t/data/sybase/create.sql +++ b/t/data/sybase/create.sql @@ -1,11574 +1,2178 @@ -/* Script generated by dbschema.pl(2.3.0) on Wed Jul 17 11:33:19 2002. */ +/* Script generated by dbschema.pl(2.4.2) on Mon Aug 18 14:15:25 2003. */ +/* Script extracted on a solaris system. */ -use mdb3 +use master go -setuser 'dbo' -go +/* Groups... */ -/* Start of description of table dbo.Anchors */ +/* No groups found. */ -IF OBJECT_ID('dbo.Anchors') IS NOT NULL -BEGIN - DROP TABLE dbo.Anchors - IF OBJECT_ID('dbo.Anchors') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Anchors >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Anchors >>>' -END -go -CREATE TABLE dbo.Anchors ( - Overgo id# NOT NULL, - CUGI varchar(20) NULL, - EcoRI int NULL, - HindIII int NULL, - SSR id# NULL, - RFLP id# NULL, - GenBank varchar(20) NULL, - TIGR varchar(20) NULL, - Forward id# NULL, - Reverse id# NULL, - Bin money NULL, - Bins varchar(20) NULL, - IBM money NULL -) -go +/* Users... */ -IF OBJECT_ID('dbo.Anchors') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Anchors >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Anchors >>>' +exec sp_adduser 'guest', 'guest' +exec sp_adduser 'probe', 'probe' go +/* Aliases... */ -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Anchors */ - +/* No aliases found. */ -setuser 'dbo' -go +/* Add user-defined data types: */ -/* Start of description of table dbo.Anything */ +/* No user defined types found. */ -IF OBJECT_ID('dbo.Anything') IS NOT NULL -BEGIN - DROP TABLE dbo.Anything - IF OBJECT_ID('dbo.Anything') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Anything >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Anything >>>' -END -go -CREATE TABLE dbo.Anything ( - ID# id# NOT NULL, - Name char(120) NOT NULL, - Type id# NOT NULL, - Description char(70) NOT NULL -) -LOCK DATAROWS -go +/* Rules... */ -IF OBJECT_ID('dbo.Anything') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Anything >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Anything >>>' -go +/* No rules found. */ -IF OBJECT_ID('dbo.Anything') IS NOT NULL - ALTER TABLE dbo.Anything PARTITION 2 -go +/* Defaults... */ -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Anything') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Anything TO curator - GRANT SELECT ON dbo.Anything TO public -END -go +/* No defaults found. */ +/* Bind rules & defaults to user data types... */ -/* Bind rules & defaults to columns... */ -exec sp_bindefault anything_description, 'Anything.Description' -go -/* End of description of table dbo.Anything */ +/* No defaults to bind. */ +/* No rules to bind. */ -setuser 'dbo' -go -/* Start of description of table dbo.Anything#ExternalDBKeys */ +/* Start of description of table dbo.jdbc_function_escapes */ -IF OBJECT_ID('dbo.Anything#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.Anything#ExternalDBKeys - IF OBJECT_ID('dbo.Anything#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Anything#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Anything#ExternalDBKeys >>>' -END +setuser 'dbo' go -CREATE TABLE dbo.Anything#ExternalDBKeys ( - Anything id# NOT NULL, - Entity id# NOT NULL, - DB id# NOT NULL, - DBKey char(100) NOT NULL +CREATE TABLE dbo.jdbc_function_escapes ( + escape_name varchar(40) NOT NULL, + map_string varchar(40) NOT NULL ) go -IF OBJECT_ID('dbo.Anything#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Anything#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Anything#ExternalDBKeys >>>' -go - /* Add permissions for table... */ -IF OBJECT_ID('dbo.Anything#ExternalDBKeys') IS NOT NULL +IF OBJECT_ID('dbo.jdbc_function_escapes') IS NOT NULL BEGIN - GRANT SELECT ON dbo.Anything#ExternalDBKeys TO public + GRANT SELECT ON dbo.jdbc_function_escapes TO public END go /* Bind rules & defaults to columns... */ -/* End of description of table dbo.Anything#ExternalDBKeys */ +/* End of description of table dbo.jdbc_function_escapes */ -setuser 'dbo' -go +/* Start of description of table dbo.spt_jdbc_conversion */ -/* Start of description of table dbo.Anything#References */ - -IF OBJECT_ID('dbo.Anything#References') IS NOT NULL -BEGIN - DROP TABLE dbo.Anything#References - IF OBJECT_ID('dbo.Anything#References') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Anything#References >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Anything#References >>>' -END +setuser 'dbo' go -CREATE TABLE dbo.Anything#References ( - Anything id# NOT NULL, - Contents id# NULL, - Reference id# NULL +CREATE TABLE dbo.spt_jdbc_conversion ( + datatype int NOT NULL, + conversion char(20) NOT NULL ) go -IF OBJECT_ID('dbo.Anything#References') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Anything#References >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Anything#References >>>' -go - /* Add permissions for table... */ -IF OBJECT_ID('dbo.Anything#References') IS NOT NULL +IF OBJECT_ID('dbo.spt_jdbc_conversion') IS NOT NULL BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Anything#References TO curator - GRANT SELECT ON dbo.Anything#References TO public + GRANT SELECT ON dbo.spt_jdbc_conversion TO public END go /* Bind rules & defaults to columns... */ -/* End of description of table dbo.Anything#References */ +/* End of description of table dbo.spt_jdbc_conversion */ -setuser 'dbo' -go +/* Start of description of table dbo.spt_jdbc_table_types */ -/* Start of description of table dbo.Anything#Synonyms */ - -IF OBJECT_ID('dbo.Anything#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Anything#Synonyms - IF OBJECT_ID('dbo.Anything#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Anything#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Anything#Synonyms >>>' -END +setuser 'dbo' go -CREATE TABLE dbo.Anything#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NOT NULL, - Authority id# NULL +CREATE TABLE dbo.spt_jdbc_table_types ( + TABLE_TYPE char(15) NOT NULL ) go -IF OBJECT_ID('dbo.Anything#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Anything#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Anything#Synonyms >>>' -go - -IF OBJECT_ID('dbo.Anything#Synonyms') IS NOT NULL - ALTER TABLE dbo.Anything#Synonyms PARTITION 2 -go /* Add permissions for table... */ -IF OBJECT_ID('dbo.Anything#Synonyms') IS NOT NULL +IF OBJECT_ID('dbo.spt_jdbc_table_types') IS NOT NULL BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Anything#Synonyms TO curator - GRANT SELECT ON dbo.Anything#Synonyms TO public + GRANT SELECT ON dbo.spt_jdbc_table_types TO public END go /* Bind rules & defaults to columns... */ -/* End of description of table dbo.Anything#Synonyms */ - +/* End of description of table dbo.spt_jdbc_table_types */ -setuser 'dbo' -go -/* Start of description of table dbo.Anything_Dates */ +/* Start of description of table dbo.spt_jtext */ -IF OBJECT_ID('dbo.Anything_Dates') IS NOT NULL -BEGIN - DROP TABLE dbo.Anything_Dates - IF OBJECT_ID('dbo.Anything_Dates') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Anything_Dates >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Anything_Dates >>>' -END +setuser 'dbo' go -CREATE TABLE dbo.Anything_Dates ( - ID# id# NOT NULL, - ModDate datetime NOT NULL +CREATE TABLE dbo.spt_jtext ( + mdinfo varchar(30) NOT NULL, + value text NOT NULL, + UNIQUE (mdinfo) ) go -IF OBJECT_ID('dbo.Anything_Dates') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Anything_Dates >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Anything_Dates >>>' -go - /* Add permissions for table... */ -IF OBJECT_ID('dbo.Anything_Dates') IS NOT NULL +IF OBJECT_ID('dbo.spt_jtext') IS NOT NULL BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Anything_Dates TO curator - GRANT SELECT ON dbo.Anything_Dates TO public + GRANT SELECT ON dbo.spt_jtext TO public END go /* Bind rules & defaults to columns... */ -/* End of description of table dbo.Anything_Dates */ - +/* End of description of table dbo.spt_jtext */ -setuser 'dbo' -go -/* Start of description of table dbo.AUDIT_TRAIL */ +/* Start of description of table dbo.spt_limit_types */ -IF OBJECT_ID('dbo.AUDIT_TRAIL') IS NOT NULL -BEGIN - DROP TABLE dbo.AUDIT_TRAIL - IF OBJECT_ID('dbo.AUDIT_TRAIL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.AUDIT_TRAIL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.AUDIT_TRAIL >>>' -END +setuser 'dbo' go -CREATE TABLE dbo.AUDIT_TRAIL ( - Date datetime NOT NULL, - ID# int NULL, - FormName varchar(30) NOT NULL, - SQL text NOT NULL +CREATE TABLE dbo.spt_limit_types ( + name char(30) NOT NULL, + id smallint NOT NULL, + enforced tinyint NOT NULL, + object_type smallint NOT NULL, + scope smallint NOT NULL, + units char(60) NOT NULL ) go -IF OBJECT_ID('dbo.AUDIT_TRAIL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.AUDIT_TRAIL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.AUDIT_TRAIL >>>' -go - /* Add permissions for table... */ -IF OBJECT_ID('dbo.AUDIT_TRAIL') IS NOT NULL +IF OBJECT_ID('dbo.spt_limit_types') IS NOT NULL BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.AUDIT_TRAIL TO curator - GRANT SELECT ON dbo.AUDIT_TRAIL TO public + GRANT SELECT ON dbo.spt_limit_types TO public END go /* Bind rules & defaults to columns... */ -/* End of description of table dbo.AUDIT_TRAIL */ - +/* End of description of table dbo.spt_limit_types */ -setuser 'dbo' -go -/* Start of description of table dbo.BACAnchorStats */ +/* Start of description of table dbo.spt_mda */ -IF OBJECT_ID('dbo.BACAnchorStats') IS NOT NULL -BEGIN - DROP TABLE dbo.BACAnchorStats - IF OBJECT_ID('dbo.BACAnchorStats') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.BACAnchorStats >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.BACAnchorStats >>>' -END +setuser 'dbo' go -CREATE TABLE dbo.BACAnchorStats ( - Anchor int NOT NULL, - Library int NOT NULL, - Hits int NULL, - Source int NOT NULL, - Date datetime NOT NULL +CREATE TABLE dbo.spt_mda ( + mdinfo varchar(30) NOT NULL, + querytype tinyint NOT NULL, + query varchar(255) NULL, + mdaver_start tinyint NOT NULL, + mdaver_end tinyint NOT NULL, + srvver_start int NOT NULL, + srvver_end int NOT NULL ) go -IF OBJECT_ID('dbo.BACAnchorStats') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.BACAnchorStats >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.BACAnchorStats >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.BACAnchorStats */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.BlastLinks */ -IF OBJECT_ID('dbo.BlastLinks') IS NOT NULL +IF OBJECT_ID('dbo.spt_mda') IS NOT NULL BEGIN - DROP TABLE dbo.BlastLinks - IF OBJECT_ID('dbo.BlastLinks') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.BlastLinks >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.BlastLinks >>>' + CREATE UNIQUE NONCLUSTERED INDEX spt_mda_ind + ON spt_mda (mdinfo, mdaver_end, srvver_end) END go -CREATE TABLE dbo.BlastLinks ( - Bins varchar(20) NULL, - IBM money NULL, - ID# id# NOT NULL, - Name char(30) NOT NULL, - Anything char(30) NOT NULL, - GenBank char(20) NULL, - ZmDB char(20) NULL, - CUGI char(20) NULL, - TIGR char(20) NULL, - Bin money NULL, - Bin1 money NULL -) -go - -IF OBJECT_ID('dbo.BlastLinks') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.BlastLinks >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.BlastLinks >>>' -go - /* Add permissions for table... */ -IF OBJECT_ID('dbo.BlastLinks') IS NOT NULL +IF OBJECT_ID('dbo.spt_mda') IS NOT NULL BEGIN - GRANT SELECT ON dbo.BlastLinks TO public + GRANT SELECT ON dbo.spt_mda TO public END go /* Bind rules & defaults to columns... */ -/* End of description of table dbo.BlastLinks */ +/* End of description of table dbo.spt_mda */ -setuser 'dbo' -go - -/* Start of description of table dbo.breakpoints */ +/* Start of description of table dbo.spt_monitor */ -IF OBJECT_ID('dbo.breakpoints') IS NOT NULL -BEGIN - DROP TABLE dbo.breakpoints - IF OBJECT_ID('dbo.breakpoints') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.breakpoints >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.breakpoints >>>' -END +setuser 'dbo' go -CREATE TABLE dbo.breakpoints ( - P#1 id# NOT NULL, - Point name NOT NULL, - L# int NULL, - LinkageGroup name NULL, - A#1 int NULL, - Coord real NULL +CREATE TABLE dbo.spt_monitor ( + lastrun datetime NOT NULL, + cpu_busy int NOT NULL, + io_busy int NOT NULL, + idle int NOT NULL, + pack_received int NOT NULL, + pack_sent int NOT NULL, + connections int NOT NULL, + pack_errors int NOT NULL, + total_read int NOT NULL, + total_write int NOT NULL, + total_errors int NOT NULL ) -go - -IF OBJECT_ID('dbo.breakpoints') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.breakpoints >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.breakpoints >>>' +ON system go /* Add permissions for table... */ -IF OBJECT_ID('dbo.breakpoints') IS NOT NULL +IF OBJECT_ID('dbo.spt_monitor') IS NOT NULL BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.breakpoints TO curator - GRANT SELECT ON dbo.breakpoints TO public + GRANT SELECT ON dbo.spt_monitor TO public END go /* Bind rules & defaults to columns... */ -/* End of description of table dbo.breakpoints */ +/* End of description of table dbo.spt_monitor */ -setuser 'dbo' -go - -/* Start of description of table dbo.ccref */ +/* Start of description of table dbo.spt_values */ -IF OBJECT_ID('dbo.ccref') IS NOT NULL -BEGIN - DROP TABLE dbo.ccref - IF OBJECT_ID('dbo.ccref') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ccref >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ccref >>>' -END +setuser 'dbo' go -CREATE TABLE dbo.ccref ( - Ref int NULL, - Type varchar(30) NULL, - Authors comment NULL, - Year int NULL, - Title comment NULL, - JAbbrev comment NULL, - Journal comment NULL, - Volume varchar(20) NULL, - Number varchar(20) NULL, - Pages varchar(20) NULL, - ISSN varchar(20) NULL, - AuthAddr comment NULL, - Publisher varchar(50) NULL, - Editors comment NULL, - PubCity varchar(50) NULL, - Status bit NOT NULL +CREATE TABLE dbo.spt_values ( + name varchar(28) NULL, + number int NOT NULL, + type char(2) NOT NULL, + low int NULL, + high int NULL, + msgnum int NULL ) +ON system go -IF OBJECT_ID('dbo.ccref') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ccref >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ccref >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ccref') IS NOT NULL -BEGIN - GRANT ALL ON dbo.ccref TO curator -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ccref */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.CloneLibrary */ -IF OBJECT_ID('dbo.CloneLibrary') IS NOT NULL +IF OBJECT_ID('dbo.spt_values') IS NOT NULL BEGIN - DROP TABLE dbo.CloneLibrary - IF OBJECT_ID('dbo.CloneLibrary') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.CloneLibrary >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.CloneLibrary >>>' + CREATE CLUSTERED INDEX spt_valuesclust + ON spt_values (number, type) END go -CREATE TABLE dbo.CloneLibrary ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Madeby id# NULL, - Vector id# NULL, - HostStrain varchar(120) NULL, - Medium varchar(120) NULL, - SourceDNA id# NULL, - AvailableFrom id# NULL, - Comments varchar(255) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.CloneLibrary') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.CloneLibrary >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.CloneLibrary >>>' -go - /* Add permissions for table... */ -IF OBJECT_ID('dbo.CloneLibrary') IS NOT NULL +IF OBJECT_ID('dbo.spt_values') IS NOT NULL BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.CloneLibrary TO curator - GRANT SELECT ON dbo.CloneLibrary TO public + GRANT SELECT ON dbo.spt_values TO public END go /* Bind rules & defaults to columns... */ -/* End of description of table dbo.CloneLibrary */ - +/* End of description of table dbo.spt_values */ -setuser 'dbo' -go -/* Start of description of table dbo.CloneLibrary_Comments */ +/* Start of description of table dbo.syblicenseslog */ -IF OBJECT_ID('dbo.CloneLibrary_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.CloneLibrary_Comments - IF OBJECT_ID('dbo.CloneLibrary_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.CloneLibrary_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.CloneLibrary_Comments >>>' -END +setuser 'dbo' go -CREATE TABLE dbo.CloneLibrary_Comments ( - CloneLibrary id# NOT NULL, - Type id# NULL, - Comment text NOT NULL +CREATE TABLE dbo.syblicenseslog ( + status smallint NOT NULL, + logdate datetime NOT NULL, + maxlicenses int NOT NULL ) go -IF OBJECT_ID('dbo.CloneLibrary_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.CloneLibrary_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.CloneLibrary_Comments >>>' -go - /* Add permissions for table... */ -IF OBJECT_ID('dbo.CloneLibrary_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.CloneLibrary_Comments TO curator - GRANT SELECT ON dbo.CloneLibrary_Comments TO public -END -go - /* Bind rules & defaults to columns... */ -/* End of description of table dbo.CloneLibrary_Comments */ - +/* End of description of table dbo.syblicenseslog */ -setuser 'dbo' -go -/* Start of description of table dbo.Column */ - -IF OBJECT_ID('dbo.Column') IS NOT NULL -BEGIN - DROP TABLE dbo.Column - IF OBJECT_ID('dbo.Column') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Column >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Column >>>' -END -go +/* Now create the key definitions ...*/ -CREATE TABLE dbo.Column ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Table1 id# NOT NULL, - Ord# int NULL, - Datatype varchar(120) NULL, - NULL1 tinyint NULL, - Type tinyint NULL, - Unique1 tinyint NULL -) -go -IF OBJECT_ID('dbo.Column') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Column >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Column >>>' +setuser 'dbo' go +/* Views... */ -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Column') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Column TO curator - GRANT SELECT ON dbo.Column TO public -END -go +/* No views found. */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Column */ +/* Procedures... */ +/* Procedure sp_configure, owner dbo */ setuser 'dbo' go -/* Start of description of table dbo.Column#Joins */ - -IF OBJECT_ID('dbo.Column#Joins') IS NOT NULL -BEGIN - DROP TABLE dbo.Column#Joins - IF OBJECT_ID('dbo.Column#Joins') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Column#Joins >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Column#Joins >>>' -END -go - -CREATE TABLE dbo.Column#Joins ( - Column id# NOT NULL, - Column1 id# NOT NULL -) -go +/* Sccsid = "%Z% generic/sproc/%M% %I% %G%" */ +/* 4.8 1.1 06/14/90 sproc/src/configure */ -IF OBJECT_ID('dbo.Column#Joins') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Column#Joins >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Column#Joins >>>' -go +/* +** Messages for "sp_configure" 17410 +** Must use "langid" when referencing spt_values +** +** 17260, "Can't run %1! from within a transaction." +** 17410, "Configuration option doesn't exist." +** 17411, "Configuration option is not unique." +** 17413, "The value of the 'number of devices' must be greater than the highest VDEVNO, '%1!', defined in sysdevices." +** 17414, "You can't set the default language to a language ID that is not defined in Syslanguages." +** 17415, "Configuration option value is not legal." +** 17418, "'%1!' is an invalid file command. The valid commands are 'verify', 'read', 'write', and 'restore'." +** 17419, "Configuration option changed. The SQL Server need not be rebooted since the option is dynamic. +** 18123, "Configuration option changed. The SQL Server must be rebooted before the change in effect since the option is static." +** 18124, "No matching configuration options. Here is a listing of groups:" +** 18125, "Must provide the parameter 'filename'." +** 18133, "The character set, '%1!', is invalid since it is not defined in Syscharsets." +** 18134, "The sortorder, '%1!', is invalid since it is not defined in Syscharsets." +** 18549, "Invalid third argument supplied: '%1!'. Valid choices are +** 'with truncate' or 'default'." +*/ +create procedure sp_configure +@configname varchar(80) = NULL, /* configure option name */ +@configvalue int = NULL, /* configure value */ +@configvalue2 varchar(255) = NULL, /* config file command/charset info */ +@configvalue3 varchar(255) = NULL /* physical name of file */ +as +declare @confignum int /* number of option to be configured */ +declare @configcount int /* number of options like @configname */ +declare @whichone int /* using english or default lang ? */ +declare @cmd smallint /* configuration file command */ +declare @status int /* return status for misc calls */ +declare @children int /* number of children in a group */ +declare @parent int /* config number of parent group */ +declare @msg varchar(255) /* temp buffer for messages */ +declare @sysconfig smallint /* contents of sysconfigures.config */ +declare @sysname varchar(255) /* contents of sysconfigures.comment */ +declare @sysparent smallint /* contents of sysconfigures.parent */ +declare @sysstatus smallint /* contents of sysconfigures.status */ +declare @value int /* default charset/sort order id */ +declare @user_displaylevel int /* user display level */ +declare @maxvdevno int /* highest number of vdevno */ +declare @sortorder_id int /* current sortorder id */ +declare @charset_id int /* current charset id */ +declare @use_wildcard tinyint /* use wildcard to search option name or not */ +declare @match_count int /* number of option found by name match */ +declare @cache_part_temp int /* cache partition number */ +declare @partition_number int /* cache partition number */ +declare @cmpstate int /* Local NODE state in companionship */ +declare @nocase tinyint /* case-sensitive sort order flag */ + +select @whichone = 0 +select @status = 0 +select @cmd = 1 +select @value = NULL +select @user_displaylevel = NULL +select @sortorder_id = + value from master.dbo.syscurconfigs where config = 123 +select @charset_id = + value from master.dbo.syscurconfigs where config = 131 + +select @use_wildcard = 1 + +/* +** Check if the default sort order is case-insensitive. +*/ +if ("A" = "a") + select @nocase = 1 +else + select @nocase = 0 + +/* +** Disallow running sp_configure within a transaction since it might make +** recovery impossible. +*/ +if @@trancount > 0 +begin + /* + ** 17260, "Can't run %1! from within a transaction." + */ + raiserror 17260, "sp_configure" + return (1) +end +else +begin + set chained off +end + +set transaction isolation level 1 +set nocount on + +/* +** If the "default sortorder" is case insensitive dictionary sort order, +** the procedure will just print out all the options and their values +** without grouping if no option name is given. +*/ +if (@nocase = 1 and @configname is NULL) + begin + select "Parameter Name" = convert(char(30), name), + "Default" = convert(char(11), space(11-char_length( + convert(varchar(11), defvalue)))+ + convert(varchar(11), defvalue)), + "Memory Used" = convert(char(11), space(11-char_length( + convert(varchar(11), b.comment)))+ + convert(varchar(11), b.comment)), + "Config Value" =convert(char(11), space(11-char_length( + isnull(a.value2, convert(char(32), a.value)))) + + isnull(a.value2, convert(char(32), a.value))), + "Run Value" = convert(char(11), space(11-char_length( + isnull(b.value2, convert(char(32), b.value)))) + + isnull(b.value2, convert(char(32), b.value))) + from master.dbo.sysconfigures a, + master.dbo.syscurconfigs b + where + a.config *= b.config + and parent != 19 + and a.config != 19 + order by name + + return (0) +end + +/* Validate the configname if it not NULL */ +if @configname is not NULL +begin + select @configcount = count(*) + from master.dbo.sysconfigures + where name like "%" + @configname + "%" + and parent != 19 + + /* + ** If configure option is not unique and case-insensitive + ** dictionary sort order is used, check if unique option found + ** by exact name match, if so, then disable wildcard match + ** for searching option name. + */ + if (@configcount > 1 and @nocase = 1) + begin + /* check if unique option found by exact name match */ + select @match_count = count(*) + from master.dbo.sysconfigures + where name = @configname + and parent != 19 + if @match_count =1 + begin + select @use_wildcard = 0 /* don't use wildcard */ + select @configcount = @match_count + end + end + + /* + ** If more than one option like @configname, + ** show the duplicates and return. + */ + if @configcount > 1 + begin + /* + ** 17411, "Configuration option is not unique." + */ + raiserror 17411 + print "" + + select "Parameter Name" = convert(char(30), name), + "Default" = convert(char(11), space(11-char_length( + convert(varchar(11), defvalue)))+ + convert(varchar(11), defvalue)), + "Memory Used" = convert(char(11), space(11-char_length( + convert(varchar(11), b.comment)))+ + convert(varchar(11), b.comment)), + "Config Value" =convert(char(11), space(11-char_length( + isnull(a.value2, convert(char(32), a.value)))) + + isnull(a.value2, convert(char(32), a.value))), + "Run Value" = convert(char(11), space(11-char_length( + isnull(b.value2, convert(char(32), b.value)))) + + isnull(b.value2, convert(char(32), b.value))) + from master.dbo.sysconfigures a, + master.dbo.syscurconfigs b + where + a.config *= b.config + and name like "%" + @configname + "%" + and parent != 19 + and a.config != 19 + order by name + + return (1) + end + + /* + ** if it is a valid option and the @configvalue is not NULL, + ** set the option + */ + if (@configcount != 0) and (@configvalue is not NULL) + begin + /* set @confignum */ + select @confignum = config, + @sysstatus = status + from master.dbo.sysconfigures + where name like "%" + @configname + "%" + and parent != 19 + and config != 19 + + /* + ** If @configvalue2 is "default", + ** setting the value to default + */ + if (@configvalue2 = "default") + select @value = 1 + else + select @value = 0 + + /* + ** If the option name is "configuration file" + */ + if @confignum = 114 + begin + /* + ** if the file command is one of the valid + ** commands. + */ + if ((@configvalue2 = "read") or + (@configvalue2 = "write") or + (@configvalue2 = "restore") or + (@configvalue2 = "verify")) + begin + /* + ** if filename is NULL + */ + if (@configvalue3 is NULL) + begin + /* 18125, "Must provide the parameter 'filename'." */ + raiserror 18125 + return(1) + end + /* + ** Must have sa_role to run these + ** commands + */ + if (proc_role("sa_role") < 1) + begin + return(1) + end + else + begin + if (@configvalue2 = "verify") + select @cmd = 2 + else + if (@configvalue2 = "read") + select @cmd = 3 + else + if (@configvalue2 = "write") + select @cmd = 4 + else + if (@configvalue2 = "restore") + select @cmd = 5 + end + end + else + begin + /* + ** print the message to show the valid + ** file command + */ + raiserror 17418, @configvalue2 + return(1) + end + + select @status = config_admin(@cmd,0,0,0,NULL, + @configvalue3) + + if (@status = 1) + begin + return(0) + end + else + begin + return (1) + end + end + + if @confignum = 123 + begin + /* get current default charset id */ + select @value = value from + master.dbo.sysconfigures + where config = 131 + + if @configvalue2 is not NULL + begin + /* validate the charset id */ + if not exists (select * + from master..syscharsets + where name = @configvalue2 + and type between 1000 and 1999) + + begin + /* 18133, "The character set, '%1!', is invalid since it + ** is not defined in Syscharsets." + */ + raiserror 18133, @configvalue2 + return (1) + end + + /* get default charset id from name */ + select @value = id + from master..syscharsets + where name = @configvalue2 + and type between 1000 and 1999 + end + end + + if @confignum = 131 + begin + /* get current default sortord id */ + select @value = value from + master.dbo.sysconfigures + where config = 123 + + if @configvalue2 is not NULL + begin + /* validate the sortord id */ + if not exists (select * + from master..syscharsets + where name = @configvalue2 + and type between 2000 and 2999) + begin + /* 18134, "The sortorder, '%1!', is invalid since it + ** is not defined in Syscharsets." + */ + raiserror 18134, @configvalue2 + return (1) + end + + /* get default sortorder id from name */ + select @value = id + from master..syscharsets + where name = @configvalue2 + and type between 2000 and 2999 + end + end + + /* + ** If an attempt to enable a disk mirroring is made, and + ** if this happens to be a server with HA services turned + ** on, we disallow. Currently we do not support ASE HA + ** services along with sybase mirroring. + */ + if (@confignum = 140 and @configvalue = 0) + begin + select @cmpstate = @@cmpstate + if @cmpstate >= 0 + begin + /* 18816 Mirroring not allowed in ASE HA */ + raiserror 18816 + return(1) + end + end + + /* + ** If an attempt to disable disk mirroring is being made, + ** ensure that there are no devices that are currently + ** being mirrored. + */ + + if (@confignum = 140 and @configvalue = 1) + begin + if (select count(*) from master.dbo.sysdevices + where status & 512 = 512) > 0 + begin + + /* 18750, Unable to disable disk mirroring + ** because some devices are currently + ** mirrored. Use 'disk unmirror' to + ** unmirror these devices and then + ** re-run this sp_configure command. + */ + + raiserror 18570 + return (1) + end + end + + /* + ** If this is the number of devices configuration + ** parameter, we want to make sure that it's not being + ** set to lower than the + ** number of devices in sysdevices. + */ + if @confignum = 116 + begin + /* + ** Get the default value if trying to set the + ** value to the default value + */ + if (@value = 1) + begin + select @configvalue = convert(int, defvalue) + from master.dbo.syscurconfigs + where config = 116 + end + + /* + ** Get the max vdevno. + */ + select @maxvdevno = max( + convert(tinyint, + substring(convert(binary(4), d.low), + v.low, 1))) + from master.dbo.sysdevices d, + master.dbo.spt_values v + + if (@configvalue <= @maxvdevno) + begin + /* 17413, "The value of the 'number of devices' must be + ** greater than the highest VDEVNO, '%1!', defined + ** in sysdevices." + */ + raiserror 17413, @maxvdevno + return (1) + end + end + + + /* + ** If this is the number of default language, we want + ** to make sure that the new value is a valid language + ** id in Syslanguages. + */ + if @confignum = 124 + begin + if not exists (select * + from master.dbo.syslanguages + where langid = @configvalue) + begin + /* 0 is default language, us_english */ + if @configvalue != 0 + begin + /* 17414, "You can't set the default language to a + ** language ID that is not defined in Syslanguages." + */ + raiserror 17414 + return (1) + end + end + end + + /* + ** If this is the number of current audit table we want + ** to make sure that if "with truncate" opiton is not + ** provided new table is empty other wise fail. + */ + if @confignum = 260 + begin + if @configvalue2 is not NULL + begin + if (@configvalue2 not in ("with truncate", + "default")) + begin + /* + ** 18549, "Invalid third argument + ** supplied: '%1!'. Valid + ** choices are 'with truncate' + ** or 'default'." + */ + raiserror 18549, @configvalue2 + return(1) + end + end + else + begin + select @value = 2 + end + end + + if @confignum = 337 + begin + if @configvalue is not NULL + begin + if (@configvalue2 = "default") + begin + select @partition_number = 1 + end + else + begin + select @partition_number = + @configvalue + end + + if (@partition_number <= 0) OR + (@partition_number > 64) + begin + raiserror 18611 + return(1) + end + + select @cache_part_temp = 2 + while @cache_part_temp < @partition_number + select @cache_part_temp = + @cache_part_temp * 2 + if @partition_number != 1 AND + @cache_part_temp != @partition_number + begin + raiserror 18611 + return(1) + end + end + end + + /* call config_admin() to set the new value */ + select @status = config_admin(@cmd, @confignum, + @configvalue, @value, NULL, @configvalue2) + + /* if successful */ + if (@status = 1) + begin + /* Display the new value */ + select "Parameter Name" = convert(char(30), name), + "Default" = convert(char(11), space(11-char_length( + convert(varchar(11), defvalue))) + + convert(varchar(11), defvalue)), + "Memory Used" = convert(char(11),space(11-char_length( + convert(varchar(11), c.comment))) + + convert(varchar(11), c.comment)), + "Config Value" = convert(char(11), + space(11-char_length( + isnull(b.value2, convert(char(32), b.value)))) + + isnull(b.value2, convert(char(32), b.value))), + "Run Value" = convert(char(11), space(11-char_length( + isnull(c.value2, convert(char(32), c.value)))) + + isnull(c.value2, convert(char(32), c.value))) + from master.dbo.sysconfigures b, + master.dbo.syscurconfigs c + where + b.config = @confignum and + b.config *= c.config + + /* + ** print reboot message if this option is not + ** dynamic. + */ + select @sysstatus = @sysstatus & 8 + if @sysstatus = 8 + begin + exec sp_getmessage 17419, @msg output + print @msg + end + else + begin + exec sp_getmessage 18123, @msg output + print @msg + end + + return(0) + end + else + return(1) + end +end + +/* +** @configcount=0 implies @configname is not valid +** @configname=NULL implies displaying all the parameters except for +** the parameters with the config number equal to 19 or the parent equal +** to 19 since those parameters are displayed by sp_cacheconfig. +*/ +if (@configcount =0) +begin + /* 18124, "No matching configuration options. + ** Here is a listing of groups:" + */ + raiserror 18124 + select convert(char(50), name) + from master.dbo.sysconfigures + where config < 100 + and parent != 19 + and config != 19 + order by name + return(1) +end +else if (@configname is NULL) + select @configname = "Config" + +/* +** retrieve the display level from sysattributes +*/ +select @user_displaylevel = int_value from master.dbo.sysattributes where + class = 4 AND + attribute = 0 AND + object_type = 'L' AND + object = suser_id() + +/* +** set the default display level to 10 if it is not defined in sysattributes +*/ +if (@user_displaylevel = NULL) + select @user_displaylevel = 10 + +/* +** If @use_wildcard = 0 and the default sortorder is case-insensitive +** dictionary sort order, use exact match: name = @configname to get row, +** otherwise use wildcard match: name like "%" + @configname + "%". +*/ + +if (@use_wildcard = 0 and @nocase = 1) +begin + select @confignum = config, + @parent = config, + @sysname = name, + @sysstatus = status + from master.dbo.sysconfigures + where name = @configname + and config != 19 +end +else +begin + select @confignum = config, + @parent = config, + @sysname = name, + @sysstatus = status + from master.dbo.sysconfigures + where name like "%" + @configname + "%" + and config != 19 +end + +select @children = count(*) + from master.dbo.sysconfigures + where parent = @confignum + +if @children = 0 +begin + /* @@nestlevel is problem area if a sproc calls sp_configure */ + /* could pass in another param when recursing */ + if @@nestlevel > 1 + begin + /* reached a leaf, notify parent */ + return(1) + end + else + begin + /* display the information of the config parameter */ + select "Parameter Name" = convert(char(30), name), + "Default" = convert(char(11), space(11-char_length( + convert(varchar(11), defvalue))) + + convert(varchar(11), defvalue)), + "Memory Used" = convert(char(11), space(11-char_length( + convert(varchar(11), c.comment))) + + convert(varchar(11), c.comment)), + "Config Value" = convert(char(11), space(11-char_length( + isnull(b.value2, convert(char(32), b.value)))) + + isnull(b.value2, convert(char(32), b.value))), + "Run Value" = convert(char(11), space(11-char_length( + isnull(c.value2, convert(char(32), c.value)))) + + isnull(c.value2, convert(char(32), c.value))) + from master.dbo.sysconfigures b, + master.dbo.syscurconfigs c + where + b.config *= c.config + and name like "%" + @configname + "%" + and b.config != 19 + and parent != 19 + + end +end +else +begin + select @msg = "Group: " + @sysname + print "" + print @msg + print "" + + /* this poor guy has kids, so recurse to leaves */ + declare config_curs cursor for + select config, name, parent + from master.dbo.sysconfigures + where parent = @parent + order by name + + open config_curs + + fetch config_curs into @sysconfig, @sysname, @sysparent + + while (@@sqlstatus = 0) + begin + + execute @status = sp_configure @sysname + + + if (@status = 1) + begin + /* + ** this guy has leaves as kids, + ** so print out the leaves with + ** display level <= @user_displaylevel + ** Note: If a config parameter has more than one + ** parent, the extra parents are stored in + ** 'sysattribures'. + */ + create table #configure_temp (config int) + + insert into #configure_temp + select a.config + from master.dbo.sysconfigures a, + master.dbo.syscurconfigs b + where + display_level <= @user_displaylevel + and parent = @parent + and a.config != 19 + and a.config = b.config + union + select config + from master.dbo.syscurconfigs, + master.dbo.sysattributes + where + display_level <= @user_displaylevel + and class = 4 + and attribute = 1 + and object_type = 'CP' + and int_value = @parent + and object = config + and config != 19 + + if exists (select * from #configure_temp) + begin + select "Parameter Name" = convert(char(30), name), + "Default" = convert(char(11), space(11-char_length( + convert(varchar(11), defvalue))) + + convert(varchar(11), defvalue)), + "Memory Used" = convert(char(11), space(11-char_length( + convert(varchar(11), c.comment))) + + convert(varchar(11), c.comment)), + "Config Value" = convert(char(11),space(11-char_length( + isnull(b.value2, convert(char(32), b.value)))) + + isnull(b.value2, convert(char(32), b.value))), + "Run Value" = convert(char(11), space(11-char_length( + isnull(c.value2, convert(char(32), c.value)))) + + isnull(c.value2, convert(char(32), c.value))) + from master.dbo.sysconfigures b, + master.dbo.syscurconfigs c + where b.config in + (select config from #configure_temp) + and b.config = c.config + order by name + end + + drop table #configure_temp + + close config_curs + deallocate cursor config_curs + + return(0) + end + else + begin + /* + ** this lucky guy has grandkids, so, continue + */ + fetch config_curs into + @sysconfig, @sysname, @sysparent + + end + end + + close config_curs + deallocate cursor config_curs + + return(0) +end +go + +IF OBJECT_ID('dbo.sp_configure') IS NOT NULL +BEGIN + GRANT EXECUTE ON dbo.sp_configure TO public +END +go +/* Procedure sp_dboption, owner dbo */ + +setuser 'dbo' +go + +/* Sccsid = "%Z% generic/sproc/%M% %I% %G%" */ +/* 4.8 1.1 06/14/90 sproc/src/a_values */ + +/* +** Messages for "sp_dboption" 17420 +** Use "langid" when looking at spt_values ??? +** +** 17260, "Can't run %1! from within a transaction." +** 17420, "Settable database options." +** 17421, "No such database -- run sp_helpdb to list databases." +** 17422, "The 'master' database's options can not be changed." +** 17423, "Usage: sp_dboption [dbname, optname, {true | false}]" +** 17424, "Database option doesn't exist or can't be set by user." +** 17425, "Run sp_dboption with no parameters to see options." +** 17426, "Database option is not unique." +** 17428, "You must be in the 'master' database in order to change +** database options." +** 17429, "The database is currently in use -- 'read only' option +** disallowed." +** 17430, "Run the CHECKPOINT command in the database that was changed." +** 17431, "true" +** 17432, "false" +** 17433, "Database option '%1!' turned ON for database '%2!'." +** 17434, "Database option '%1!' turned OFF for database '%2!'." +** 17289, "Set your curwrite to the hurdle of current database." +** 17436, "The 'single user' option is not valid for the 'tempdb' +** database." +** 17439, "You cannot turn on ''%1!' for '%2!' because it is an HA server +** that has been configured with the proxy_db option." +*/ + +create procedure sp_dboption +@dbname varchar(30) = NULL, /* database name to change */ +@optname varchar(20) = NULL, /* option name to turn on/off */ +@optvalue varchar(10) = NULL /* true or false */ +as + +declare @dbid int /* dbid of the database */ +declare @dbuid int /* id of the owner of the database */ +declare @statvalue smallint, /* number of option */ + @stattype char(2), /* status field flag */ + @statopt smallint, /* option mask, part 1 */ + @stat2opt smallint /* option mask, part 2 */ +declare @optcount int /* number of options like @optname */ +declare @success_msg varchar(255) /* success status message */ +declare @msg varchar(250) +declare @sptlang int +declare @true varchar(10) +declare @false varchar(10) +declare @whichone int /* which language? */ +declare @name varchar(30) +declare @optmsgnum int /* identify one msgnum to compare */ +declare @msgcnt int /* count distinct dups */ + + + +if @@trancount = 0 +begin + set chained off +end + +set transaction isolation level 1 + +select @sptlang = @@langid, @whichone = 0 + +if @@langid != 0 +begin + if not exists ( + select * from master.dbo.sysmessages where error + between 17050 and 17069 + and langid = @@langid) + select @sptlang = 0 +end + + +/* +** If no @dbname given, just list the possible dboptions. +** Only certain status bits may be set or cleared. +** settable not settable +** ------------------------------ -------------------------- +** allow select into/bulkcopy (4) don't recover (32) +** read only (1024) not recovered (256) +** dbo use only (2048) dbname has changed (16384) +** single user (4096) +** truncate log on checkpoint (8) +** no checkpoint on recovery (16) +** allow null (8192) +** ddl in tran (512) +** ALL SETTABLE OPTIONS (15900) +** abort xact on log full (1, type='D2') +** no space accounting (2, type='D2') +** auto identity(4, type='D2') +** identity in nonunique index(8, type='D2') +** auto identity unique index(64, type='D2') +*/ + +/* +** Look for the "settable options" mask in spt_values +*/ +select @statopt = number +from master.dbo.spt_values +where type = "D" + and name = "ALL SETTABLE OPTIONS" + +select @stat2opt = number +from master.dbo.spt_values +where type = "D2" + and name = "ALL SETTABLE OPTIONS" + +/* +** If we can't find the option masks, guess at them +*/ +if @statopt is null + select @statopt = 4 | 8 | 16 | 512 | 1024 | 2048 | 4096 | 8192 +if @stat2opt is null + select @stat2opt = 1 | 2 | 4 | 8 | 64 + +if @dbname is null +begin + /* + ** 17420, "Settable database options." + */ + exec sp_getmessage 17420, @msg output + print @msg + + if @sptlang = 0 + select database_options = name + from master.dbo.spt_values + where ((type = "D" + and number & @statopt = number + and number & @statopt != @statopt) + or (type = "D2" + and number & @stat2opt = number + and number & @stat2opt != @stat2opt)) + order by name + else + select database_options = name, convert(char(22), description) + from master.dbo.spt_values, master.dbo.sysmessages + where ((type = "D" + and number & @statopt = number + and number & @statopt != @statopt) + or (type = "D2" + and number & @stat2opt = number + and number & @stat2opt != @stat2opt)) + and msgnum = error + and langid = @sptlang + order by name + return (0) +end + +/* +** Verify the database name and get the @dbid and @dbuid +*/ +select @dbid = dbid, @dbuid = suid + from master.dbo.sysdatabases + where name = @dbname + +/* +** If @dbname not found, say so and list the databases. +*/ +if @dbid is NULL +begin + /* + ** 17421, "No such database -- run sp_helpdb to list databases." + */ + raiserror 17421 + return (1) +end + +/* +** Only the Database Owner (DBO) or +** Accounts with SA role can execute it. +** Call proc_role() with the required SA role. +*/ +if ((suser_id() != @dbuid) and (proc_role("sa_role") < 1)) + return(1) + +/* +** You can not change any of the options in master. If the user tries to +** do so tell them they can't. +*/ +if @dbid = 1 +begin + /* + ** 17422, "The 'master' database's options can not be changed." + */ + raiserror 17422 + return (1) +end + +/* +** Check remaining parameters. +*/ +/* 17431, "true" */ +exec sp_getmessage 17431, @true out +/* 17432, "false" */ +exec sp_getmessage 17432, @false out +if @optname is NULL or lower(@optvalue) not in + ("true", "false", @true, @false) or @optvalue is null +begin + /* + ** 17423, "Usage: sp_dboption [dbname, optname, {true | false}]" + */ + raiserror 17423 + return (1) +end + +/* +** Use @optname and try to find the right option. +** If there isn't just one, print appropriate diagnostics and return. +*/ +select @optcount = count(*) + from master.dbo.spt_values + where name like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) +/* +** If more than one option like @optname, make sure they are not the same +** option ("trunc" and "trunc.", for example) +*/ +if @optcount > 1 +begin + select @optmsgnum = msgnum + from master.dbo.spt_values + where name like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) + + select @msgcnt = count(msgnum) + from master.dbo.spt_values + where name like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) + and msgnum != @optmsgnum + + /* + ** msgcnt of 0 indicates we really have just 1 unique dboption, + ** probably due to alternate spelling. + */ + if (@msgcnt = 0) + select @optcount = 1 +end +/* +** If no option, and alternate language is set, use other language +*/ +if @optcount = 0 and @sptlang != 0 +begin + select @optcount = count(*) + from master.dbo.spt_values, master.dbo.sysmessages + where description like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) + and msgnum = error + and langid = @sptlang + select @whichone = 1 + /* + ** If more than one option like @optname, make sure they are not the same + ** option ("trunc" and "trunc.", for example) + */ + if @optcount > 1 + begin + select @optmsgnum = msgnum + from master.dbo.spt_values, master.dbo.sysmessages + where description like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) + and msgnum = error + and langid = @sptlang + + select @msgcnt = count(msgnum) + from master.dbo.spt_values, master.dbo.sysmessages + where description like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) + and msgnum = error + and langid = @sptlang + and msgnum != @optmsgnum + + /* + ** msgcnt of 0 indicates we really have just 1 unique dboption, + ** probably due to alternate spelling. + */ + if (@msgcnt = 0) + select @optcount = 1 + end +end + +/* +** If no option, show the user what the options are. +*/ +if @optcount = 0 +begin + /* + ** 17424, "Database option doesn't exist or can't be set by user." + */ + raiserror 17424 + + /* + ** 17425, "Run sp_dboption with no parameters to see options." + */ + exec sp_getmessage 17425, @msg output + print @msg + return (1) +end + +/* +** If more than one option like @optname, show the duplicates and return. +*/ +if @optcount > 1 +begin + /* + ** 17426, "Database option is not unique." + */ + raiserror 17426 + + if @sptlang = 0 + select duplicate_options = name + from master.dbo.spt_values + where name like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) + else + select duplicate_options = name, convert(char(22), description) + from master.dbo.spt_values, master.dbo.sysmessages + where (name like "%" + @optname + "%" + or description like "%" + @optname + "%") + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) + and msgnum = error + and langid = @sptlang + + return (1) +end + + +if db_name() != "master" +begin + /* + ** 17428, "You must be in the 'master' database in order to change database options." + */ + raiserror 17428 + return (1) +end + +/* +** User cannot set "tempdb" database in single user mode. +*/ +select @statvalue = number + from master.dbo.spt_values + where name like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) + +if (@dbid = 2) and (@statvalue = 4096) +begin + /* + ** 17436, "The 'single user' option is not valid for the 'tempdb' + ** database." + */ + raiserror 17436 + return (1) +end + +/* +** If we're in a transaction, disallow this since it might make recovery +** impossible. +*/ +if @@trancount > 0 +begin + /* + ** 17260, "Can't run %1! from within a transaction." + */ + raiserror 17260, "sp_dboption" + return (1) +end +else +begin + set chained off +end + +set transaction isolation level 1 + +/* +** Get the number which is the bit value to set +*/ +if @whichone = 0 + select @statvalue = number, @stattype = type, @success_msg = name + from master.dbo.spt_values + where name like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) +else + select @statvalue = number, @stattype = type, @success_msg = name + from master.dbo.spt_values, master.dbo.sysmessages + where description like "%" + @optname + "%" + and ((type = "D" + and number & @statopt = number) + or (type = "D2" + and number & @stat2opt = number)) + and msgnum = error + and langid = @sptlang + +/* +** We do not allow 'sybsecurity' to be set to 'single user' since, +** if auditing is enabled and we try to set 'sybsecurity' database to +** 'single user' then, the audit process is killed because audit process +** tries to do 'usedb' and it fails (look at utils/auditing.c). +*/ +if (@dbname = "sybsecurity") and (@statvalue = 4096) +begin + /* + ** 17435, "The 'single user' option is not valid for the + ** 'sybsecurity' database. + */ + raiserror 17435 + return (1) +end + + +/* +** Now update sysdatabases. + +*/ +if lower(@optvalue) in ("true", @true) +begin + /* + ** If this the option to make the database read only, + ** we need to do some checking first. + ** Unless it's the master db, no one can be using it. + ** If it's the master db, only the SA may be using it. + */ + if (@statvalue = 1024) and (select count(*) + from master.dbo.sysprocesses + where dbid = @dbid) > 0 + begin + /* + ** 17429, "The database is currently in use -- 'read only' option disallowed." + */ + raiserror 17429 + return (1) + end + + /* + ** If this is the option to set 'abort tran on log full' to + ** true for sybsecurit database, then don't allow. + */ + if (db_name(@dbid) = "sybsecurity" + and @stattype = "D2" and @statvalue = 1) + begin + /* + ** AUDIT_CHANGE: New error message needs to be reserved and + ** the print statement needs to be removed. + */ + print "You cannot set 'abort tran on log full' to true for sybsecurity database." + return (1) + end + + /* + ** Disallow DDL IN TRAN + ** if proxydb option is set (@@crthaproxy = 1) + ** if this server is a HA server (@@cmpstate >= 0) + */ + if ((@statvalue = 512) and (@@crthaproxy = 1) and (@@cmpstate >= 0)) + begin + /* + ** Cannot set DDL_IN_TRAN option for HA servers + ** configured with proxy_db option. + */ + select @name = db_name(@dbid) + exec sp_getmessage 17439, @msg output + print @msg, @success_msg, @name + return (1) + end + + if (@stattype = "D") + update master.dbo.sysdatabases + set status = status | @statvalue + where dbid = @dbid + else + update master.dbo.sysdatabases + set status2 = status2 | @statvalue + where dbid = @dbid + /* + ** 17433, "Database option %1! turned ON for database %2!." + */ + exec sp_getmessage 17433, @msg output + select @name = db_name(@dbid) + print @msg, @success_msg, @name +end + +/* +** We want to turn it off. +*/ +else +begin + + if (@stattype = "D") + update master.dbo.sysdatabases + set status = status & ~@statvalue + where dbid = @dbid + else + update master.dbo.sysdatabases + set status2 = status2 & ~@statvalue + where dbid = @dbid + /* + ** 17434, "Database option %1! turned OFF for database %2!." + */ + exec sp_getmessage 17434, @msg output + select @name = db_name(@dbid) + print @msg, @success_msg, @name +end + +/* +** Advise the user to run the CHECKPOINT command in the database that +** was changed. +*/ +/* +** 17430, "Run the CHECKPOINT command in the database that was changed." +*/ +exec sp_getmessage 17430, @msg output +print @msg + +return (0) + +go + +IF OBJECT_ID('dbo.sp_dboption') IS NOT NULL +BEGIN + GRANT EXECUTE ON dbo.sp_dboption TO public +END +go +/* Procedure sp_dbupgrade, owner dbo */ + +setuser 'dbo' +go + +/* Sccsid = "%Z% generic/sproc/%M% %I% %G%" */ + + +create procedure sp_dbupgrade +as + +if @@trancount = 0 +begin + set chained off +end + +set transaction isolation level 1 + +/* +** Do the sysindexes column names update which is part of the 38 upgrade. +** The sysgams updates have already been taken care of by pg_gamalloc. +*/ +print "Upgrading Sysindexes columns in the database" +if not exists (select name from syscolumns where id = 2 and name = 'doampg') +begin + update syscolumns + set name = 'doampg' + where id = 2 and name = 'dpages' + update syscolumns + set name = 'ioampg' + where id = 2 and name = 'reserved' + update syscolumns + set name = 'spare1' + where id = 2 and name = 'used' + update syscolumns + set name = 'spare2' + where id = 2 and name = 'rows' +end + +/* The following updates are part of the 42 upgrade. */ + +/* +** Tweak the Syscolumns entries for the Sysindexes table so that +** "soid" and "csid" replace half of "usagecnt". +*/ +if not exists (select * from syscolumns where id = 2 and name = 'soid') +begin + begin transaction + update syscolumns + set type = 52, length = 2, usertype = 6, offset = 42 + where id = 2 and colid = 13 + insert into syscolumns + (id, number, colid, status, type, length, offset, + usertype, cdefault, domain, name, printfmt) + values (2, 0, 23, 0, 48, 1, 40, 5, 0, 0, 'soid', '') + insert into syscolumns + (id, number, colid, status, type, length, offset, + usertype, cdefault, domain, name, printfmt) + values (2, 0, 24, 0, 48, 1, 41, 5, 0, 0, 'csid', '') + commit transaction +end + +print "Adding new datatypes to the database." +if exists (select * from systypes where name = 'text') + begin + delete systypes where name = 'text' + end +insert systypes (uid, usertype, variable, allownulls, type, length, + tdefault, domain, name, printfmt) + values (1, 19, 0, 1, 35, 16, 0, 0, 'text', null) +if exists (select * from systypes where name = 'image') + begin + delete systypes where name = 'image' + end +insert systypes (uid, usertype, variable, allownulls, type, length, + tdefault, domain, name, printfmt) + values (1, 20, 0, 1, 34, 16, 0, 0, 'image', null) +if exists (select * from systypes where name = 'timestamp') + begin + delete systypes where name = 'timestamp' + end +insert systypes (uid, usertype, variable, allownulls, type, length, + tdefault, domain, name, printfmt) + values (1, 80, 0, 1, 37, 8, 0, 0, 'timestamp', null) +if exists (select * from systypes where name = 'smallmoney') + begin + delete systypes where name = 'smallmoney' + end +insert systypes (uid, usertype, variable, allownulls, type, length, + tdefault, domain, name, printfmt) + values (1, 21, 0, 1, 122, 4, 0, 0, 'smallmoney', null) +if exists (select * from systypes where name = 'smalldatetime') + begin + delete systypes where name = 'smalldatetime' + end +insert systypes (uid, usertype, variable, allownulls, type, length, + tdefault, domain, name, printfmt) + values (1, 22, 0, 1, 58, 4, 0, 0, 'smalldatetime', null) +if exists (select * from systypes where name = 'real') + begin + delete systypes where name = 'real' + end +insert systypes (uid, usertype, variable, allownulls, type, length, + tdefault, domain, name, printfmt) + values (1, 23, 0, 1, 59, 4, 0, 0, 'real', null) + +/* 4.9 user types for national character */ +if exists (select * from systypes where name = 'nchar') + begin + delete systypes where name = 'nchar' + end +insert systypes (uid, usertype, variable, allownulls, type, length, + tdefault, domain, name, printfmt ) + values (1, 24, 0, 1, 47, 255, 0, 0, 'nchar', null) + +if exists (select * from systypes where name = 'nvarchar') + begin + delete systypes where name = 'nvarchar' + end +insert systypes (uid, usertype, variable, allownulls, type, length, + tdefault, domain, name, printfmt) + values (1, 25, 1, 1, 39, 255, 0, 0, 'nvarchar', null) + +if exists (select * from systypes where name = 'NULL') + begin + delete systypes where name = 'NULL' + end +insert systypes (uid, usertype, variable, allownulls, type, length, + tdefault, domain, name, printfmt) + values (1, 0, 0, 1, 0, 0, 0, 0, 'NULL', null) + +/* 4.9 system table creation */ +print "Creating system catalog: sysusermessages and its indexes." +if not exists (select * from sysobjects where name='sysusermessages') + begin + execute sp_configure 'allow updates', 1 + reconfigure with override + + dbcc traceon(3701) + begin + create table sysusermessages(error int,uid smallint, + description varchar(255), langid smallint null) lock allpages + create clustered index csysusermessages + on sysusermessages (error) + create unique nonclustered index ncsysusermessages + on sysusermessages (error, langid) + end + dbcc traceoff(3701) + + execute sp_configure 'allow updates', 0 + reconfigure with override + end + +print "Shutting down SQL Server" +shutdown + +return (0) + +go + +/* Procedure sp_getmessage, owner dbo */ + +setuser 'dbo' +go + + +/* generic/sproc/getmessage 14.2 4/25/91 */ + +/* Messages from sysmessages +** 17200, "Message number must be greater than or equal to 17000." +** 17201, "'%1!' is not an official language name from Syslanguages." +** 17202, "Message number %1! does not exist in the %2! language." +*/ + +create procedure sp_getmessage +@message_num int, +@result varchar(255) output, +@language varchar(30) = NULL +as + + declare @lang_id smallint + declare @msg varchar(255) + declare @returncode smallint + + if @@trancount = 0 + begin + set chained off + end + + set transaction isolation level 1 + + /* + ** Use default language if none specified, + ** and initialize result + */ + select @lang_id = @@langid, @result = NULL + + /* Only retrieve external errors */ + if @message_num < 17000 + BEGIN + /* 17200 "Message number must be greater than or equal to 17000." */ + select @msg = description from master.dbo.sysmessages + where error = 17200 + print @msg + return (1) + END + + /* + ** Check that language is valid. + */ + if @language is not NULL + BEGIN + execute @returncode = sp_validlang @language + if @returncode != 0 + begin + /* Us_english is always valid */ + if @language != "us_english" + BEGIN + /* + ** 17201, "'%1!' is not an official language + ** name from Syslanguages." + */ + select @msg = description from master.dbo.sysmessages + where error = 17201 + and langid = @@langid -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Column#Joins') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Column#Joins TO curator - GRANT SELECT ON dbo.Column#Joins TO public -END -go + /* Get english if the current language is missing */ + if @msg is null + select @msg = description from master.dbo.sysmessages + where error = 17201 + and langid is NULL -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Column#Joins */ + print @msg, @language + return @returncode + END + /* set to us_english */ + select @lang_id = NULL + end -setuser 'dbo' -go + else + select @lang_id = langid from master.dbo.syslanguages + where @language = name -/* Start of description of table dbo.constraints */ + END -IF OBJECT_ID('dbo.constraints') IS NOT NULL -BEGIN - DROP TABLE dbo.constraints - IF OBJECT_ID('dbo.constraints') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.constraints >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.constraints >>>' -END -go + /* The langid is assigned 0 since it gets its value from @@langid. */ + /* For us_english, we have to insert it as NULL and not 0, this is */ + /* to maintain compatibility with the current conventions */ + if @lang_id = 0 + begin + select @lang_id = NULL + end -CREATE TABLE dbo.constraints ( - Expt name NOT NULL, - Before name NOT NULL, - After name NOT NULL, - LOW int NOT NULL, - Mean float(16) NULL, - SE float(16) NULL -) -go + /* Get message from the proper place */ + /* System messages */ + if @message_num < 20000 + BEGIN + select @result = description from master.dbo.sysmessages + where langid = @lang_id + and error = @message_num -IF OBJECT_ID('dbo.constraints') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.constraints >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.constraints >>>' -go + /* Get english if the current language is missing */ + if @result is null + select @result = description from master.dbo.sysmessages + where error = @message_num + and (langid is NULL or langid =0) + END + else + /* User messages */ + BEGIN + /* There is no proper alternate language for user messages */ + select @result = description from sysusermessages + where langid = @lang_id + and error = @message_num + /* this is in here for compatibility with older revs which */ + /* by mistake used to add langid as 0 in sysusermessages */ + if @result is null and @lang_id is NULL + select @result = description from sysusermessages + where (langid = 0 or langid is NULL) + and error = @message_num -/* Add permissions for table... */ -IF OBJECT_ID('dbo.constraints') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.constraints TO curator - GRANT SELECT ON dbo.constraints TO public -END -go + END -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.constraints */ + /* Warn the user if the message can't be found */ + if @result is null + begin + /* 17202, "Message number %1! does not exist in the %2! language." */ + select @msg = description from master.dbo.sysmessages + where error = 17202 + and langid = @@langid + if @language is null + select @language = @@language -setuser 'dbo' -go + if @msg is null + select @msg = "Message number %1! does not exist in the %2! language." -/* Start of description of table dbo.cp */ + print @msg, @message_num, @language -IF OBJECT_ID('dbo.cp') IS NOT NULL -BEGIN - DROP TABLE dbo.cp - IF OBJECT_ID('dbo.cp') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.cp >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.cp >>>' -END -go + return (1) + end -CREATE TABLE dbo.cp ( - Nom name NULL, - Synonym name NULL, - LID id# NULL -) -go +return (0) -IF OBJECT_ID('dbo.cp') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.cp >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.cp >>>' go - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.cp') IS NOT NULL +IF OBJECT_ID('dbo.sp_getmessage') IS NOT NULL BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.cp TO curator - GRANT SELECT ON dbo.cp TO public + GRANT EXECUTE ON dbo.sp_getmessage TO public END go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.cp */ - +/* Procedure sp_loaddbupgrade, owner dbo */ setuser 'dbo' go -/* Start of description of table dbo.cugi5 */ - -IF OBJECT_ID('dbo.cugi5') IS NOT NULL -BEGIN - DROP TABLE dbo.cugi5 - IF OBJECT_ID('dbo.cugi5') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.cugi5 >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.cugi5 >>>' -END -go - -CREATE TABLE dbo.cugi5 ( - BAC char(20) NOT NULL, - Marker char(20) NOT NULL, - Method char(20) NOT NULL, - MDBID int NULL, - contig char(20) NULL, - Chr char(6) NULL, - IBM money NULL, - HybNO char(4) NULL, - note char(20) NULL -) -go - -IF OBJECT_ID('dbo.cugi5') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.cugi5 >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.cugi5 >>>' -go +/* Sccsid = "%Z% generic/sproc/src/%M% %I% %G%" */ +create procedure sp_loaddbupgrade +@databasename varchar(30), +@devname varchar(30) +as -/* Add permissions for table... */ -IF OBJECT_ID('dbo.cugi5') IS NOT NULL -BEGIN - GRANT SELECT ON dbo.cugi5 TO public -END -go -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.cugi5 */ +if @@trancount = 0 +begin + set chained off +end +set transaction isolation level 1 -setuser 'dbo' -go +dbcc traceon(3402) -/* Start of description of table dbo.CVs */ +/* The recovery which is part of load database will perform the upgrade */ +load database @databasename from @devname -IF OBJECT_ID('dbo.CVs') IS NOT NULL -BEGIN - DROP TABLE dbo.CVs - IF OBJECT_ID('dbo.CVs') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.CVs >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.CVs >>>' -END -go +dbcc traceoff(3402) -CREATE TABLE dbo.CVs ( - ID# id# NOT NULL -) -go +return (0) -IF OBJECT_ID('dbo.CVs') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.CVs >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.CVs >>>' go +/* Procedure sp_procxmode, owner dbo */ + +setuser 'dbo' +go + +/* Sccsid = "%Z% generic/sproc/src/%M% %I% %G%" */ + +/* +** 17756, "The execution of the stored procedure '%1!' in database +** '%2!' was aborted because there was an error in writing the +** replication log record." +*/ + +create procedure sp_procxmode +@procname varchar(255) = null, +@tranmode varchar(30) = null +as + +declare @uid smallint +declare @oid int +declare @msg varchar(250) /* message text */ +declare @dbname varchar(30) + +if @@trancount = 0 +begin + set chained off +end + +set transaction isolation level 1 + +/* If either parameter is null we will be joining with a temporary table +** to convert transaction mode numbers (0, 1, 2) to strings ("Unchained", +** "Chained", "Any Mode"). +*/ +if ((@procname is null) or (@tranmode is null)) +begin + create table #tranmode (intval integer, charval varchar(15)) + insert into #tranmode values(0, "Unchained") + insert into #tranmode values(1, "Chained") + insert into #tranmode values(2, "Any Mode") +end -/* Add permissions for table... */ -IF OBJECT_ID('dbo.CVs') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,UPDATE ON dbo.CVs TO curator -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.CVs */ +/* If the first parameter is null, we're to report the transaction-modes +** of every stored procedure in the current database. +*/ +if (@procname is null) +begin + select "procedure name" = o.name, "user name" = user_name(o.uid), + "transaction mode" = t.charval + from sysobjects o, #tranmode t + where ((o.type = "P") or (o.type = "XP")) and (t.intval = ((o.sysstat2 / 16) & 3)) + order by o.name + return(0) +end -setuser 'dbo' -go +/* If only the second parameter is null, we're to report the +** transaction-mode of the specified stored procedure. +*/ +if ((@procname is not null) and (@tranmode is null)) +begin + if (not exists (select name from sysobjects + where ((type = "P") or (type = "XP")) and + (name = @procname))) + begin + /* + ** Force an error message, since we haven't + ** installed sp_getmessage yet. + */ + dbcc update_tmode(@procname, "Chained") + return (1) + end + select "procedure name" = o.name, "user name" = user_name(o.uid), + "transaction mode" = t.charval + from sysobjects o, #tranmode t + where ((o.type = "P") or (o.type = "XP")) and (@procname = o.name) and + (t.intval = ((o.sysstat2 / 16) & 3)) -/* Start of description of table dbo.DBKeys */ + return(0) +end -IF OBJECT_ID('dbo.DBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.DBKeys - IF OBJECT_ID('dbo.DBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.DBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.DBKeys >>>' -END -go +/* If neither parameter is null, we're to set the transaction-mode +** of the specified procedure to the specified value. +*/ +if ((@procname is not null) and (@tranmode is not null)) +begin + /* Start the transaction to log the execution of this procedure. + ** + ** IMPORTANT: The name "rs_logexec is significant and is used by + ** Replication Server + */ + begin transaction rs_logexec -CREATE TABLE dbo.DBKeys ( - DBKey varchar(100) NULL, - DB id# NULL, - Probe id# NULL, - Variation id# NULL, - GeneProduct id# NULL, - Locus id# NULL, - Comment varchar(100) NULL -) -go + /* + ** Update transaction-mode in both sysobjects and DES. + */ + dbcc update_tmode(@procname, @tranmode) -IF OBJECT_ID('dbo.DBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.DBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.DBKeys >>>' -go + /* If dbcc update_tmode returned an error, return + ** an error now. + */ + if (@@error != 0) + begin + rollback transaction rs_logexec + return(1) + end + + /* + ** Write the log record to replicate this invocation + ** of the stored procedure. + */ + if (logexec() != 1) + begin + /* + ** 17756, "The execution of the stored procedure '%1!' + ** in database '%2!' was aborted because there + ** was an error in writing the replication log + ** record." + */ + select @dbname = db_name() + raiserror 17756, "sp_procxmode", @dbname + + rollback transaction rs_logexec + return(1) + end + + commit transaction +end -/* Add permissions for table... */ -IF OBJECT_ID('dbo.DBKeys') IS NOT NULL +go + +IF OBJECT_ID('dbo.sp_procxmode') IS NOT NULL BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.DBKeys TO curator - GRANT SELECT ON dbo.DBKeys TO public + GRANT EXECUTE ON dbo.sp_procxmode TO public END go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.DBKeys */ - +/* Procedure sp_prtsybsysmsgs, owner dbo */ setuser 'dbo' go -/* Start of description of table dbo.DNARNAIsolationPrep */ +/* Sccsid = "%Z% generic/sproc/%M% %I% %G%" */ -IF OBJECT_ID('dbo.DNARNAIsolationPrep') IS NOT NULL -BEGIN - DROP TABLE dbo.DNARNAIsolationPrep - IF OBJECT_ID('dbo.DNARNAIsolationPrep') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.DNARNAIsolationPrep >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.DNARNAIsolationPrep >>>' -END -go +/* +** This procedure is needed to extract messages for the batch that creates +** the sybsystemprocs database. When return parameters are used in an execute +** statement that is a part of a SQL batch, the return values are printed +** with a heading before subsequent statements in the batch are executed. +** These headings could be confusing to a user that is looking at the results +** of the batch. Hence we print the message in a stored procedure +*/ -CREATE TABLE dbo.DNARNAIsolationPrep ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Stock id# NULL, - PanelofStocks varchar(250) NULL, - Species id# NULL, - Tissue id# NULL, - PreparedBy id# NULL, - AvailableFrom id# NULL, - Date datetime NULL, - Comments varchar(255) NULL, - NoteworthyConditions varchar(255) NULL -) -LOCK DATAROWS -go +create procedure sp_prtsybsysmsgs +@i int, @size int = NULL, @size2 int = NULL +as -IF OBJECT_ID('dbo.DNARNAIsolationPrep') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.DNARNAIsolationPrep >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.DNARNAIsolationPrep >>>' -go +declare @msg varchar(250) +exec sp_getmessage @i, @msg out +print @msg, @size, @size2 -/* Add permissions for table... */ -IF OBJECT_ID('dbo.DNARNAIsolationPrep') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.DNARNAIsolationPrep TO curator - GRANT SELECT ON dbo.DNARNAIsolationPrep TO public -END go -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.DNARNAIsolationPrep */ - +/* Procedure sp_validlang, owner dbo */ setuser 'dbo' go -/* Start of description of table dbo.dupont_bac */ - -IF OBJECT_ID('dbo.dupont_bac') IS NOT NULL -BEGIN - DROP TABLE dbo.dupont_bac - IF OBJECT_ID('dbo.dupont_bac') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.dupont_bac >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.dupont_bac >>>' -END -go - -CREATE TABLE dbo.dupont_bac ( - ID# id# NOT NULL, - Name char(40) NOT NULL, - Quality tinyint NULL, - Type id# NOT NULL, - InsertSize float(16) NULL, - Species id# NOT NULL, - Procedure1 id# NULL, - PreparedBy id# NOT NULL, - Vector id# NOT NULL, - AvailableFrom id# NOT NULL, - NoteWorthyConditions varchar(10) NULL, - Mnemonic char(10) NULL, - Copy id# NULL, - Repeat varchar(100) NULL -) -go +/* Sccsid = "%Z% generic/sproc/src/%M% %I% %G%" */ +/* 4.8 1.1 06/14/90 sproc/src/serveroption */ +create procedure sp_validlang +@name varchar(30) +as -IF OBJECT_ID('dbo.dupont_bac') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.dupont_bac >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.dupont_bac >>>' -go +if @@trancount = 0 +begin + set chained off +end -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.dupont_bac */ +set transaction isolation level 1 +/* Check to see if this language is in Syslanguages. */ +if exists (select * + from master.dbo.syslanguages + where name = @name) +begin + return 0 +end +return 1 -setuser 'dbo' go -/* Start of description of table dbo.dupont_probe_relatedprobes */ - -IF OBJECT_ID('dbo.dupont_probe_relatedprobes') IS NOT NULL +IF OBJECT_ID('dbo.sp_validlang') IS NOT NULL BEGIN - DROP TABLE dbo.dupont_probe_relatedprobes - IF OBJECT_ID('dbo.dupont_probe_relatedprobes') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.dupont_probe_relatedprobes >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.dupont_probe_relatedprobes >>>' + GRANT EXECUTE ON dbo.sp_validlang TO public END go -CREATE TABLE dbo.dupont_probe_relatedprobes ( - Probe id# NOT NULL, - Relation id# NULL, - Probe1 id# NULL, - Method id# NULL -) -go - -IF OBJECT_ID('dbo.dupont_probe_relatedprobes') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.dupont_probe_relatedprobes >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.dupont_probe_relatedprobes >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.dupont_probe_relatedprobes */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Entity */ - -IF OBJECT_ID('dbo.Entity') IS NOT NULL -BEGIN - DROP TABLE dbo.Entity - IF OBJECT_ID('dbo.Entity') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Entity >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Entity >>>' -END -go - -CREATE TABLE dbo.Entity ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Documentation text NULL, - Menuline varchar(80) NULL, - Type tinyint NOT NULL, - Form varchar(30) NOT NULL, - Menu int NOT NULL, - Ord# int NOT NULL, - MainTable int NULL, - SynonymTable int NULL, - UniqueNames tinyint NOT NULL, - Matching tinyint NULL -) -go - -IF OBJECT_ID('dbo.Entity') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Entity >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Entity >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Entity') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Entity TO curator - GRANT SELECT ON dbo.Entity TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Entity */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Environment */ - -IF OBJECT_ID('dbo.Environment') IS NOT NULL -BEGIN - DROP TABLE dbo.Environment - IF OBJECT_ID('dbo.Environment') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Environment >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Environment >>>' -END -go - -CREATE TABLE dbo.Environment ( - ID# int NOT NULL, - Name varchar(255) NOT NULL, - Type int NULL, - Locale varchar(255) NULL, - StateProvince int NULL, - Country int NULL, - Latitude varchar(255) NULL, - Longitude varchar(255) NULL, - Altitude varchar(255) NULL, - PlantingDate datetime NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Environment') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Environment >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Environment >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Environment') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Environment TO curator - GRANT SELECT ON dbo.Environment TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Environment */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Environment#Comments */ - -IF OBJECT_ID('dbo.Environment#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Environment#Comments - IF OBJECT_ID('dbo.Environment#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Environment#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Environment#Comments >>>' -END -go - -CREATE TABLE dbo.Environment#Comments ( - Environment int NOT NULL, - Type int NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.Environment#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Environment#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Environment#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Environment#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Environment#Comments TO curator - GRANT SELECT ON dbo.Environment#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Environment#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Environment#Compositeof */ - -IF OBJECT_ID('dbo.Environment#Compositeof') IS NOT NULL -BEGIN - DROP TABLE dbo.Environment#Compositeof - IF OBJECT_ID('dbo.Environment#Compositeof') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Environment#Compositeof >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Environment#Compositeof >>>' -END -go - -CREATE TABLE dbo.Environment#Compositeof ( - Environment int NOT NULL, - Compositeof int NOT NULL -) -go - -IF OBJECT_ID('dbo.Environment#Compositeof') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Environment#Compositeof >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Environment#Compositeof >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Environment#Compositeof') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Environment#Compositeof TO curator - GRANT SELECT ON dbo.Environment#Compositeof TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Environment#Compositeof */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.EnzymeCatalyzedReaction */ - -IF OBJECT_ID('dbo.EnzymeCatalyzedReaction') IS NOT NULL -BEGIN - DROP TABLE dbo.EnzymeCatalyzedReaction - IF OBJECT_ID('dbo.EnzymeCatalyzedReaction') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.EnzymeCatalyzedReaction >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.EnzymeCatalyzedReaction >>>' -END -go - -CREATE TABLE dbo.EnzymeCatalyzedReaction ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Reaction id# NULL, - Enzyme id# NULL, - Species id# NULL, - Vmax float(16) NULL, - Substratespecificity varchar(255) NULL, - OptimumpH float(16) NULL, - Optimumtemp float(16) NULL, - Comments varchar(255) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.EnzymeCatalyzedReaction') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.EnzymeCatalyzedReaction >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.EnzymeCatalyzedReaction >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.EnzymeCatalyzedReaction') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.EnzymeCatalyzedReaction TO curator - GRANT SELECT ON dbo.EnzymeCatalyzedReaction TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.EnzymeCatalyzedReaction */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.EnzymeCatalyzedReaction#Next */ - -IF OBJECT_ID('dbo.EnzymeCatalyzedReaction#Next') IS NOT NULL -BEGIN - DROP TABLE dbo.EnzymeCatalyzedReaction#Next - IF OBJECT_ID('dbo.EnzymeCatalyzedReaction#Next') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.EnzymeCatalyzedReaction#Next >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.EnzymeCatalyzedReaction#Next >>>' -END -go - -CREATE TABLE dbo.EnzymeCatalyzedReaction#Next ( - EnzymeCatalyzedReaction id# NOT NULL, - NextStep id# NOT NULL -) -go - -IF OBJECT_ID('dbo.EnzymeCatalyzedReaction#Next') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.EnzymeCatalyzedReaction#Next >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.EnzymeCatalyzedReaction#Next >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.EnzymeCatalyzedReaction#Next') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.EnzymeCatalyzedReaction#Next TO curator - GRANT SELECT ON dbo.EnzymeCatalyzedReaction#Next TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.EnzymeCatalyzedReaction#Next */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.EnzymeCatalyzedReaction#Prev */ - -IF OBJECT_ID('dbo.EnzymeCatalyzedReaction#Prev') IS NOT NULL -BEGIN - DROP TABLE dbo.EnzymeCatalyzedReaction#Prev - IF OBJECT_ID('dbo.EnzymeCatalyzedReaction#Prev') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.EnzymeCatalyzedReaction#Prev >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.EnzymeCatalyzedReaction#Prev >>>' -END -go - -CREATE TABLE dbo.EnzymeCatalyzedReaction#Prev ( - EnzymeCatalyzedReaction id# NOT NULL, - PreviousStep id# NOT NULL -) -go - -IF OBJECT_ID('dbo.EnzymeCatalyzedReaction#Prev') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.EnzymeCatalyzedReaction#Prev >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.EnzymeCatalyzedReaction#Prev >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.EnzymeCatalyzedReaction#Prev') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.EnzymeCatalyzedReaction#Prev TO curator - GRANT SELECT ON dbo.EnzymeCatalyzedReaction#Prev TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.EnzymeCatalyzedReaction#Prev */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ESTGene */ - -IF OBJECT_ID('dbo.ESTGene') IS NOT NULL -BEGIN - DROP TABLE dbo.ESTGene - IF OBJECT_ID('dbo.ESTGene') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ESTGene >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ESTGene >>>' -END -go - -CREATE TABLE dbo.ESTGene ( - Bin money NULL, - Bin1 money NULL, - Bins varchar(15) NULL, - UMC money NULL, - BNL money NULL, - Pio money NULL, - Locus id# NULL, - Probe id# NULL, - Image varchar(50) NULL, - TIGR varchar(40) NULL, - ZmDB varchar(40) NULL, - GenBank varchar(30) NULL, - GenBank1 varchar(30) NULL, - GenBank2 varchar(30) NULL -) -go - -IF OBJECT_ID('dbo.ESTGene') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ESTGene >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ESTGene >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ESTGene') IS NOT NULL -BEGIN - GRANT ALL ON dbo.ESTGene TO curator -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ESTGene */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ESTout */ - -IF OBJECT_ID('dbo.ESTout') IS NOT NULL -BEGIN - DROP TABLE dbo.ESTout - IF OBJECT_ID('dbo.ESTout') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ESTout >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ESTout >>>' -END -go - -CREATE TABLE dbo.ESTout ( - Probe id# NULL, - Locus id# NULL, - Bin money NULL, - Bin1 money NULL, - Bins varchar(30) NULL, - GenBank varchar(30) NULL, - ZmDB varchar(30) NULL, - TIGR varchar(30) NULL -) -go - -IF OBJECT_ID('dbo.ESTout') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ESTout >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ESTout >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ESTout') IS NOT NULL -BEGIN - GRANT SELECT ON dbo.ESTout TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ESTout */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Field#Annotations */ - -IF OBJECT_ID('dbo.Field#Annotations') IS NOT NULL -BEGIN - DROP TABLE dbo.Field#Annotations - IF OBJECT_ID('dbo.Field#Annotations') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Field#Annotations >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Field#Annotations >>>' -END -go - -CREATE TABLE dbo.Field#Annotations ( - Field1 id# NOT NULL, - Annotation comment NULL -) -go - -IF OBJECT_ID('dbo.Field#Annotations') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Field#Annotations >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Field#Annotations >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Field#Annotations') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Field#Annotations TO curator - GRANT SELECT ON dbo.Field#Annotations TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Field#Annotations */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Field#Options */ - -IF OBJECT_ID('dbo.Field#Options') IS NOT NULL -BEGIN - DROP TABLE dbo.Field#Options - IF OBJECT_ID('dbo.Field#Options') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Field#Options >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Field#Options >>>' -END -go - -CREATE TABLE dbo.Field#Options ( - Field1 id# NOT NULL, - Ord# int NOT NULL, - FieldOption name NOT NULL -) -go - -IF OBJECT_ID('dbo.Field#Options') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Field#Options >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Field#Options >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Field#Options') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Field#Options TO curator - GRANT SELECT ON dbo.Field#Options TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Field#Options */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Field#Properties */ - -IF OBJECT_ID('dbo.Field#Properties') IS NOT NULL -BEGIN - DROP TABLE dbo.Field#Properties - IF OBJECT_ID('dbo.Field#Properties') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Field#Properties >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Field#Properties >>>' -END -go - -CREATE TABLE dbo.Field#Properties ( - Field1 id# NOT NULL, - Property id# NOT NULL, - Value int NULL -) -go - -IF OBJECT_ID('dbo.Field#Properties') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Field#Properties >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Field#Properties >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Field#Properties') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Field#Properties TO curator - GRANT SELECT ON dbo.Field#Properties TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Field#Properties */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Field#Subtypes */ - -IF OBJECT_ID('dbo.Field#Subtypes') IS NOT NULL -BEGIN - DROP TABLE dbo.Field#Subtypes - IF OBJECT_ID('dbo.Field#Subtypes') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Field#Subtypes >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Field#Subtypes >>>' -END -go - -CREATE TABLE dbo.Field#Subtypes ( - Field1 id# NOT NULL, - Subtype id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Field#Subtypes') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Field#Subtypes >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Field#Subtypes >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Field#Subtypes') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Field#Subtypes TO curator - GRANT SELECT ON dbo.Field#Subtypes TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Field#Subtypes */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Field1 */ - -IF OBJECT_ID('dbo.Field1') IS NOT NULL -BEGIN - DROP TABLE dbo.Field1 - IF OBJECT_ID('dbo.Field1') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Field1 >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Field1 >>>' -END -go - -CREATE TABLE dbo.Field1 ( - ID# int NOT NULL, - Name varchar(120) NOT NULL, - Path varchar(255) NULL, - Entity int NULL, - Datatype varchar(120) NULL, - Range int NULL, - Inverse int NULL, - Setof tinyint NULL, - Required tinyint NULL, - Unique1 tinyint NULL, - Type tinyint NULL, - Documentation text NULL, - Group1 int NULL, - Ord# int NULL, - Column int NULL, - Ignore tinyint NULL, - Example varchar(255) NULL -) -go - -IF OBJECT_ID('dbo.Field1') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Field1 >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Field1 >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Field1') IS NOT NULL -BEGIN - GRANT SELECT ON dbo.Field1 TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Field1 */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.fields */ - -IF OBJECT_ID('dbo.fields') IS NOT NULL -BEGIN - DROP TABLE dbo.fields - IF OBJECT_ID('dbo.fields') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.fields >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.fields >>>' -END -go - -CREATE TABLE dbo.fields ( - FID int NOT NULL, - Entity varchar(255) NOT NULL, - GroupID int NULL, - Fieldname varchar(255) NOT NULL, - Tablename varchar(30) NULL, - Column varchar(30) NULL, - Fieldtype varchar(30) NOT NULL, - Datatype varchar(255) NOT NULL, - IsRequired tinyint NULL, - Ignore tinyint NULL, - ID# int NULL, - Group# int NULL, - Path varchar(255) NULL, - Table# int NULL, - Column# int NULL, - Fieldtype# int NULL, - Datatype# int NULL, - Entity# int NULL, - Setof tinyint NULL, - Ord int NULL -) -go - -IF OBJECT_ID('dbo.fields') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.fields >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.fields >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.fields') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.fields TO curator - GRANT SELECT ON dbo.fields TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.fields */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GelPattern */ - -IF OBJECT_ID('dbo.GelPattern') IS NOT NULL -BEGIN - DROP TABLE dbo.GelPattern - IF OBJECT_ID('dbo.GelPattern') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GelPattern >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GelPattern >>>' -END -go - -CREATE TABLE dbo.GelPattern ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Probe id# NULL, - Enzyme id# NULL, - Units id# NULL, - Schematic varchar(60) NULL, - Person id# NULL, - Stock id# NULL, - Fingerprint varchar(60) NULL, - Comments varchar(255) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.GelPattern') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GelPattern >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GelPattern >>>' -go - -IF OBJECT_ID('dbo.GelPattern') IS NOT NULL - ALTER TABLE dbo.GelPattern PARTITION 2 -go - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GelPattern') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GelPattern TO curator - GRANT SELECT ON dbo.GelPattern TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GelPattern */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GelPattern#Bands */ - -IF OBJECT_ID('dbo.GelPattern#Bands') IS NOT NULL -BEGIN - DROP TABLE dbo.GelPattern#Bands - IF OBJECT_ID('dbo.GelPattern#Bands') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GelPattern#Bands >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GelPattern#Bands >>>' -END -go - -CREATE TABLE dbo.GelPattern#Bands ( - GelPattern id# NOT NULL, - BandID varchar(5) NULL, - Size float(16) NULL, - Intensity float(16) NULL, - MorphID varchar(5) NULL, - SizeError float(16) NULL, - Frequency float(16) NULL -) -go - -IF OBJECT_ID('dbo.GelPattern#Bands') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GelPattern#Bands >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GelPattern#Bands >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GelPattern#Bands') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GelPattern#Bands TO curator - GRANT SELECT ON dbo.GelPattern#Bands TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GelPattern#Bands */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GelPattern#Haploalleles */ - -IF OBJECT_ID('dbo.GelPattern#Haploalleles') IS NOT NULL -BEGIN - DROP TABLE dbo.GelPattern#Haploalleles - IF OBJECT_ID('dbo.GelPattern#Haploalleles') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GelPattern#Haploalleles >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GelPattern#Haploalleles >>>' -END -go - -CREATE TABLE dbo.GelPattern#Haploalleles ( - GelPattern id# NOT NULL, - Haploallele id# NULL, - MorphID varchar(3) NULL, - Stock id# NULL -) -go - -IF OBJECT_ID('dbo.GelPattern#Haploalleles') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GelPattern#Haploalleles >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GelPattern#Haploalleles >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GelPattern#Haploalleles') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GelPattern#Haploalleles TO curator - GRANT SELECT ON dbo.GelPattern#Haploalleles TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GelPattern#Haploalleles */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GelPattern#ImageURL */ - -IF OBJECT_ID('dbo.GelPattern#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.GelPattern#ImageURL - IF OBJECT_ID('dbo.GelPattern#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GelPattern#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GelPattern#ImageURL >>>' -END -go - -CREATE TABLE dbo.GelPattern#ImageURL ( - GelPattern id# NOT NULL, - URL_Suffix varchar(250) NULL, - Caption text NULL -) -go - -IF OBJECT_ID('dbo.GelPattern#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GelPattern#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GelPattern#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GelPattern#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GelPattern#ImageURL TO curator - GRANT SELECT ON dbo.GelPattern#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GelPattern#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GelPattern#ProbedDNA */ - -IF OBJECT_ID('dbo.GelPattern#ProbedDNA') IS NOT NULL -BEGIN - DROP TABLE dbo.GelPattern#ProbedDNA - IF OBJECT_ID('dbo.GelPattern#ProbedDNA') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GelPattern#ProbedDNA >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GelPattern#ProbedDNA >>>' -END -go - -CREATE TABLE dbo.GelPattern#ProbedDNA ( - GelPattern id# NOT NULL, - ProbedDNA id# NOT NULL -) -go - -IF OBJECT_ID('dbo.GelPattern#ProbedDNA') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GelPattern#ProbedDNA >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GelPattern#ProbedDNA >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GelPattern#ProbedDNA') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GelPattern#ProbedDNA TO curator - GRANT SELECT ON dbo.GelPattern#ProbedDNA TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GelPattern#ProbedDNA */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GelPattern#Reference */ - -IF OBJECT_ID('dbo.GelPattern#Reference') IS NOT NULL -BEGIN - DROP TABLE dbo.GelPattern#Reference - IF OBJECT_ID('dbo.GelPattern#Reference') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GelPattern#Reference >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GelPattern#Reference >>>' -END -go - -CREATE TABLE dbo.GelPattern#Reference ( - GelPattern id# NULL, - Reference id# NULL, - Contents id# NULL -) -go - -IF OBJECT_ID('dbo.GelPattern#Reference') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GelPattern#Reference >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GelPattern#Reference >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GelPattern#Reference') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GelPattern#Reference TO curator - GRANT SELECT ON dbo.GelPattern#Reference TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GelPattern#Reference */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GelPattern_Comments */ - -IF OBJECT_ID('dbo.GelPattern_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.GelPattern_Comments - IF OBJECT_ID('dbo.GelPattern_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GelPattern_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GelPattern_Comments >>>' -END -go - -CREATE TABLE dbo.GelPattern_Comments ( - GelPattern id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.GelPattern_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GelPattern_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GelPattern_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GelPattern_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GelPattern_Comments TO curator - GRANT SELECT ON dbo.GelPattern_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GelPattern_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.geneP */ - -IF OBJECT_ID('dbo.geneP') IS NOT NULL -BEGIN - DROP TABLE dbo.geneP - IF OBJECT_ID('dbo.geneP') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.geneP >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.geneP >>>' -END -go - -CREATE TABLE dbo.geneP ( - Gene id# NOT NULL, - Encodes varchar(250) NULL, - EC# varchar(30) NULL -) -go - -IF OBJECT_ID('dbo.geneP') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.geneP >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.geneP >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.geneP') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.geneP TO curator - GRANT SELECT ON dbo.geneP TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.geneP */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct */ - -IF OBJECT_ID('dbo.GeneProduct') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct - IF OBJECT_ID('dbo.GeneProduct') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct >>>' -END -go - -CREATE TABLE dbo.GeneProduct ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Type id# NULL, - HoloenzymeSubstructure varchar(10) NULL, - Comments varchar(255) NULL, - Species id# NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.GeneProduct') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct TO curator - GRANT SELECT ON dbo.GeneProduct TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#EC# */ - -IF OBJECT_ID('dbo.GeneProduct#EC#') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#EC# - IF OBJECT_ID('dbo.GeneProduct#EC#') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#EC# >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#EC# >>>' -END -go - -CREATE TABLE dbo.GeneProduct#EC# ( - GeneProduct id# NOT NULL, - EC# varchar(20) NOT NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#EC#') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#EC# >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#EC# >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#EC#') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#EC# TO curator - GRANT SELECT ON dbo.GeneProduct#EC# TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#EC# */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#ExpressionInduce */ - -IF OBJECT_ID('dbo.GeneProduct#ExpressionInduce') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#ExpressionInduce - IF OBJECT_ID('dbo.GeneProduct#ExpressionInduce') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#ExpressionInduce >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#ExpressionInduce >>>' -END -go - -CREATE TABLE dbo.GeneProduct#ExpressionInduce ( - GeneProduct id# NOT NULL, - Condition id# NULL, - Evidence id# NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#ExpressionInduce') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#ExpressionInduce >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#ExpressionInduce >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#ExpressionInduce') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#ExpressionInduce TO curator - GRANT SELECT ON dbo.GeneProduct#ExpressionInduce TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#ExpressionInduce */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#ExternalDBKeys */ - -IF OBJECT_ID('dbo.GeneProduct#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#ExternalDBKeys - IF OBJECT_ID('dbo.GeneProduct#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#ExternalDBKeys >>>' -END -go - -CREATE TABLE dbo.GeneProduct#ExternalDBKeys ( - GeneProduct id# NOT NULL, - DB id# NOT NULL, - DBKey varchar(120) NOT NULL, - Comment varchar(150) NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#ExternalDBKeys >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#ExternalDBKeys') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#ExternalDBKeys TO curator - GRANT SELECT ON dbo.GeneProduct#ExternalDBKeys TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#ExternalDBKeys */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#Links */ - -IF OBJECT_ID('dbo.GeneProduct#Links') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#Links - IF OBJECT_ID('dbo.GeneProduct#Links') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#Links >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#Links >>>' -END -go - -CREATE TABLE dbo.GeneProduct#Links ( - GeneProduct id# NULL, - Locus id# NULL, - Evidence varchar(100) NULL, - Bin money NULL, - SwissProt varchar(20) NULL, - Enzyme varchar(20) NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#Links') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#Links >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#Links >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#Links') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#Links TO curator - GRANT SELECT ON dbo.GeneProduct#Links TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#Links */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#Localization */ - -IF OBJECT_ID('dbo.GeneProduct#Localization') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#Localization - IF OBJECT_ID('dbo.GeneProduct#Localization') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#Localization >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#Localization >>>' -END -go - -CREATE TABLE dbo.GeneProduct#Localization ( - GeneProduct id# NOT NULL, - Localization id# NOT NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#Localization') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#Localization >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#Localization >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#Localization') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#Localization TO curator - GRANT SELECT ON dbo.GeneProduct#Localization TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#Localization */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#MetabolicConstit */ - -IF OBJECT_ID('dbo.GeneProduct#MetabolicConstit') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#MetabolicConstit - IF OBJECT_ID('dbo.GeneProduct#MetabolicConstit') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#MetabolicConstit >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#MetabolicConstit >>>' -END -go - -CREATE TABLE dbo.GeneProduct#MetabolicConstit ( - GeneProduct id# NOT NULL, - MetabolicConstituent id# NOT NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#MetabolicConstit') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#MetabolicConstit >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#MetabolicConstit >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#MetabolicConstit') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#MetabolicConstit TO curator - GRANT SELECT ON dbo.GeneProduct#MetabolicConstit TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#MetabolicConstit */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#MetabolicPathway */ - -IF OBJECT_ID('dbo.GeneProduct#MetabolicPathway') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#MetabolicPathway - IF OBJECT_ID('dbo.GeneProduct#MetabolicPathway') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#MetabolicPathway >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#MetabolicPathway >>>' -END -go - -CREATE TABLE dbo.GeneProduct#MetabolicPathway ( - GeneProduct id# NOT NULL, - MetabolicPathway id# NOT NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#MetabolicPathway') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#MetabolicPathway >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#MetabolicPathway >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#MetabolicPathway') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#MetabolicPathway TO curator - GRANT SELECT ON dbo.GeneProduct#MetabolicPathway TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#MetabolicPathway */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#MotifsandFeatur */ - -IF OBJECT_ID('dbo.GeneProduct#MotifsandFeatur') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#MotifsandFeatur - IF OBJECT_ID('dbo.GeneProduct#MotifsandFeatur') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#MotifsandFeatur >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#MotifsandFeatur >>>' -END -go - -CREATE TABLE dbo.GeneProduct#MotifsandFeatur ( - GeneProduct id# NOT NULL, - Type id# NULL, - Description varchar(120) NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#MotifsandFeatur') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#MotifsandFeatur >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#MotifsandFeatur >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#MotifsandFeatur') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#MotifsandFeatur TO curator - GRANT SELECT ON dbo.GeneProduct#MotifsandFeatur TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#MotifsandFeatur */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#RelatedGeneProd */ - -IF OBJECT_ID('dbo.GeneProduct#RelatedGeneProd') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#RelatedGeneProd - IF OBJECT_ID('dbo.GeneProduct#RelatedGeneProd') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#RelatedGeneProd >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#RelatedGeneProd >>>' -END -go - -CREATE TABLE dbo.GeneProduct#RelatedGeneProd ( - GeneProduct id# NOT NULL, - Relation id# NULL, - GeneProduct1 id# NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#RelatedGeneProd') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#RelatedGeneProd >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#RelatedGeneProd >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#RelatedGeneProd') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#RelatedGeneProd TO curator - GRANT SELECT ON dbo.GeneProduct#RelatedGeneProd TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#RelatedGeneProd */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct#Synonyms */ - -IF OBJECT_ID('dbo.GeneProduct#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct#Synonyms - IF OBJECT_ID('dbo.GeneProduct#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct#Synonyms >>>' -END -go - -CREATE TABLE dbo.GeneProduct#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NOT NULL, - Authority id# NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct#Synonyms TO curator - GRANT SELECT ON dbo.GeneProduct#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.GeneProduct_Comments */ - -IF OBJECT_ID('dbo.GeneProduct_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.GeneProduct_Comments - IF OBJECT_ID('dbo.GeneProduct_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.GeneProduct_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.GeneProduct_Comments >>>' -END -go - -CREATE TABLE dbo.GeneProduct_Comments ( - GeneProduct id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.GeneProduct_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.GeneProduct_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.GeneProduct_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.GeneProduct_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.GeneProduct_Comments TO curator - GRANT SELECT ON dbo.GeneProduct_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.GeneProduct_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.genes */ - -IF OBJECT_ID('dbo.genes') IS NOT NULL -BEGIN - DROP TABLE dbo.genes - IF OBJECT_ID('dbo.genes') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.genes >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.genes >>>' -END -go - -CREATE TABLE dbo.genes ( - ID# id# NOT NULL, - Type name NOT NULL, - Symbol name NOT NULL, - Chr varchar(20) NULL, - Arm name NULL, - Pos varchar(30) NULL, - Pos1 money NULL, - Quality money NULL, - FullName comment NULL, - Comments varchar(255) NULL, - Encodes varchar(255) NULL -) -go - -IF OBJECT_ID('dbo.genes') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.genes >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.genes >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.genes') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.genes TO curator - GRANT SELECT ON dbo.genes TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.genes */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ID#DATE */ - -IF OBJECT_ID('dbo.ID#DATE') IS NOT NULL -BEGIN - DROP TABLE dbo.ID#DATE - IF OBJECT_ID('dbo.ID#DATE') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ID#DATE >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ID#DATE >>>' -END -go - -CREATE TABLE dbo.ID#DATE ( - ID# id# NOT NULL, - Type name NULL, - Date datetime NOT NULL -) -go - -IF OBJECT_ID('dbo.ID#DATE') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ID#DATE >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ID#DATE >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ID#DATE') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.ID#DATE TO curator - GRANT SELECT ON dbo.ID#DATE TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ID#DATE */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Journal */ - -IF OBJECT_ID('dbo.Journal') IS NOT NULL -BEGIN - DROP TABLE dbo.Journal - IF OBJECT_ID('dbo.Journal') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Journal >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Journal >>>' -END -go - -CREATE TABLE dbo.Journal ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - ISSN varchar(20) NULL, - JumpURL varchar(255) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Journal') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Journal >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Journal >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Journal') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Journal TO curator - GRANT SELECT ON dbo.Journal TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Journal */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Journal#Editors */ - -IF OBJECT_ID('dbo.Journal#Editors') IS NOT NULL -BEGIN - DROP TABLE dbo.Journal#Editors - IF OBJECT_ID('dbo.Journal#Editors') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Journal#Editors >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Journal#Editors >>>' -END -go - -CREATE TABLE dbo.Journal#Editors ( - Journal id# NOT NULL, - Editor id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Journal#Editors') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Journal#Editors >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Journal#Editors >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Journal#Editors') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Journal#Editors TO curator - GRANT SELECT ON dbo.Journal#Editors TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Journal#Editors */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Journal#Synonyms */ - -IF OBJECT_ID('dbo.Journal#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Journal#Synonyms - IF OBJECT_ID('dbo.Journal#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Journal#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Journal#Synonyms >>>' -END -go - -CREATE TABLE dbo.Journal#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NOT NULL, - Per id# NULL -) -go - -IF OBJECT_ID('dbo.Journal#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Journal#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Journal#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Journal#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Journal#Synonyms TO curator - GRANT SELECT ON dbo.Journal#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Journal#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Journal#URL */ - -IF OBJECT_ID('dbo.Journal#URL') IS NOT NULL -BEGIN - DROP TABLE dbo.Journal#URL - IF OBJECT_ID('dbo.Journal#URL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Journal#URL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Journal#URL >>>' -END -go - -CREATE TABLE dbo.Journal#URL ( - Journal id# NOT NULL, - DB id# NOT NULL, - URLKey name NOT NULL -) -go - -IF OBJECT_ID('dbo.Journal#URL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Journal#URL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Journal#URL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Journal#URL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Journal#URL TO curator - GRANT SELECT ON dbo.Journal#URL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Journal#URL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.KaryotypicVariation */ - -IF OBJECT_ID('dbo.KaryotypicVariation') IS NOT NULL -BEGIN - DROP TABLE dbo.KaryotypicVariation - IF OBJECT_ID('dbo.KaryotypicVariation') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.KaryotypicVariation >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.KaryotypicVariation >>>' -END -go - -CREATE TABLE dbo.KaryotypicVariation ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Type id# NULL, - LinkageGroup id# NULL, - Comments varchar(255) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.KaryotypicVariation') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.KaryotypicVariation >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.KaryotypicVariation >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.KaryotypicVariation') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.KaryotypicVariation TO curator - GRANT SELECT ON dbo.KaryotypicVariation TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.KaryotypicVariation */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.KaryotypicVariation#ImageURL */ - -IF OBJECT_ID('dbo.KaryotypicVariation#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.KaryotypicVariation#ImageURL - IF OBJECT_ID('dbo.KaryotypicVariation#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.KaryotypicVariation#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.KaryotypicVariation#ImageURL >>>' -END -go - -CREATE TABLE dbo.KaryotypicVariation#ImageURL ( - KaryotypicVariation id# NOT NULL, - URL_Suffix varchar(250) NULL, - Caption text NULL -) -go - -IF OBJECT_ID('dbo.KaryotypicVariation#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.KaryotypicVariation#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.KaryotypicVariation#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.KaryotypicVariation#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.KaryotypicVariation#ImageURL TO curator - GRANT SELECT ON dbo.KaryotypicVariation#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.KaryotypicVariation#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.KaryotypicVariation_Comments */ - -IF OBJECT_ID('dbo.KaryotypicVariation_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.KaryotypicVariation_Comments - IF OBJECT_ID('dbo.KaryotypicVariation_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.KaryotypicVariation_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.KaryotypicVariation_Comments >>>' -END -go - -CREATE TABLE dbo.KaryotypicVariation_Comments ( - KaryotypicVariation id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.KaryotypicVariation_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.KaryotypicVariation_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.KaryotypicVariation_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.KaryotypicVariation_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.KaryotypicVariation_Comments TO curator - GRANT SELECT ON dbo.KaryotypicVariation_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.KaryotypicVariation_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.KaryoVar#Trait */ - -IF OBJECT_ID('dbo.KaryoVar#Trait') IS NOT NULL -BEGIN - DROP TABLE dbo.KaryoVar#Trait - IF OBJECT_ID('dbo.KaryoVar#Trait') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.KaryoVar#Trait >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.KaryoVar#Trait >>>' -END -go - -CREATE TABLE dbo.KaryoVar#Trait ( - KaryoVar id# NOT NULL, - PhenotypicEffect id# NOT NULL -) -go - -IF OBJECT_ID('dbo.KaryoVar#Trait') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.KaryoVar#Trait >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.KaryoVar#Trait >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.KaryoVar#Trait') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.KaryoVar#Trait TO curator - GRANT SELECT ON dbo.KaryoVar#Trait TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.KaryoVar#Trait */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.LCbin */ - -IF OBJECT_ID('dbo.LCbin') IS NOT NULL -BEGIN - DROP TABLE dbo.LCbin - IF OBJECT_ID('dbo.LCbin') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.LCbin >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.LCbin >>>' -END -go - -CREATE TABLE dbo.LCbin ( - Locus id# NULL, - Value money NULL, - Map id# NULL, - Bin int NULL -) -go - -IF OBJECT_ID('dbo.LCbin') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.LCbin >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.LCbin >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.LCbin') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.LCbin TO curator - GRANT SELECT ON dbo.LCbin TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.LCbin */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.LinkageGroup */ - -IF OBJECT_ID('dbo.LinkageGroup') IS NOT NULL -BEGIN - DROP TABLE dbo.LinkageGroup - IF OBJECT_ID('dbo.LinkageGroup') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.LinkageGroup >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.LinkageGroup >>>' -END -go - -CREATE TABLE dbo.LinkageGroup ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Type id# NULL, - Morphology id# NULL, - TotalLengthinKB float(16) NULL, - TotalLengthincM float(16) NULL, - Species id# NULL, - Chr# int NULL, - Comments text NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.LinkageGroup') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.LinkageGroup >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.LinkageGroup >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.LinkageGroup') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.LinkageGroup TO curator - GRANT SELECT ON dbo.LinkageGroup TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.LinkageGroup */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.LinkageGroup#ChromosomeDimen */ - -IF OBJECT_ID('dbo.LinkageGroup#ChromosomeDimen') IS NOT NULL -BEGIN - DROP TABLE dbo.LinkageGroup#ChromosomeDimen - IF OBJECT_ID('dbo.LinkageGroup#ChromosomeDimen') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.LinkageGroup#ChromosomeDimen >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.LinkageGroup#ChromosomeDimen >>>' -END -go - -CREATE TABLE dbo.LinkageGroup#ChromosomeDimen ( - LinkageGroup id# NOT NULL, - Stageofobservation id# NULL, - Armratio float(16) NULL, - Lengthinum float(16) NULL -) -go - -IF OBJECT_ID('dbo.LinkageGroup#ChromosomeDimen') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.LinkageGroup#ChromosomeDimen >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.LinkageGroup#ChromosomeDimen >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.LinkageGroup#ChromosomeDimen') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.LinkageGroup#ChromosomeDimen TO curator - GRANT SELECT ON dbo.LinkageGroup#ChromosomeDimen TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.LinkageGroup#ChromosomeDimen */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.LinkageGroup#ExternalDBKeys */ - -IF OBJECT_ID('dbo.LinkageGroup#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.LinkageGroup#ExternalDBKeys - IF OBJECT_ID('dbo.LinkageGroup#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.LinkageGroup#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.LinkageGroup#ExternalDBKeys >>>' -END -go - -CREATE TABLE dbo.LinkageGroup#ExternalDBKeys ( - LinkageGroup id# NULL, - DB id# NULL, - DBKey varchar(120) NULL, - Comment varchar(150) NULL -) -go - -IF OBJECT_ID('dbo.LinkageGroup#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.LinkageGroup#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.LinkageGroup#ExternalDBKeys >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.LinkageGroup#ExternalDBKeys') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.LinkageGroup#ExternalDBKeys TO curator - GRANT SELECT ON dbo.LinkageGroup#ExternalDBKeys TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.LinkageGroup#ExternalDBKeys */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.LinkageGroup#Synonyms */ - -IF OBJECT_ID('dbo.LinkageGroup#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.LinkageGroup#Synonyms - IF OBJECT_ID('dbo.LinkageGroup#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.LinkageGroup#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.LinkageGroup#Synonyms >>>' -END -go - -CREATE TABLE dbo.LinkageGroup#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NOT NULL, - Authority id# NULL -) -go - -IF OBJECT_ID('dbo.LinkageGroup#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.LinkageGroup#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.LinkageGroup#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.LinkageGroup#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.LinkageGroup#Synonyms TO curator - GRANT SELECT ON dbo.LinkageGroup#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.LinkageGroup#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.LinkageGroup_Comments */ - -IF OBJECT_ID('dbo.LinkageGroup_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.LinkageGroup_Comments - IF OBJECT_ID('dbo.LinkageGroup_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.LinkageGroup_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.LinkageGroup_Comments >>>' -END -go - -CREATE TABLE dbo.LinkageGroup_Comments ( - LinkageGroup id# NOT NULL, - Comment varchar(255) NULL, - Type id# NULL -) -go - -IF OBJECT_ID('dbo.LinkageGroup_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.LinkageGroup_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.LinkageGroup_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.LinkageGroup_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.LinkageGroup_Comments TO curator - GRANT SELECT ON dbo.LinkageGroup_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.LinkageGroup_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus */ - -IF OBJECT_ID('dbo.Locus') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus - IF OBJECT_ID('dbo.Locus') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus >>>' -END -go - -CREATE TABLE dbo.Locus ( - ID# id# NOT NULL, - Name char(120) NOT NULL, - Type id# NULL, - Fullname name NULL, - Species id# NULL, - PlantwideGeneName name NULL, - LinkageGroup id# NULL, - Arm id# NULL, - InternalMap id# NULL, - DNAFeaturesRelatedLoci varchar(10) NULL, - Bin float(16) NULL, - LastUpdate datetime NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Locus') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus >>>' -go - -IF OBJECT_ID('dbo.Locus') IS NOT NULL - ALTER TABLE dbo.Locus PARTITION 2 -go - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus TO curator - GRANT SELECT ON dbo.Locus TO public -END -go - -/* Bind rules & defaults to columns... */ -exec sp_bindefault Zmays, 'Locus.Species' -go -/* End of description of table dbo.Locus */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#Comments */ - -IF OBJECT_ID('dbo.Locus#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#Comments - IF OBJECT_ID('dbo.Locus#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#Comments >>>' -END -go - -CREATE TABLE dbo.Locus#Comments ( - Locus id# NOT NULL, - Type id# NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.Locus#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#Comments TO curator - GRANT SELECT ON dbo.Locus#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#Coordinates */ - -IF OBJECT_ID('dbo.Locus#Coordinates') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#Coordinates - IF OBJECT_ID('dbo.Locus#Coordinates') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#Coordinates >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#Coordinates >>>' -END -go - -CREATE TABLE dbo.Locus#Coordinates ( - Locus id# NOT NULL, - Value float(16) NULL, - G float(16) NULL, - Map id# NULL, - ValueM numeric(8,2) NULL, - GM numeric(8,2) NULL, - Status id# NULL, - BackBone smallint NULL, - MaxV numeric(8,2) NULL, - MinV numeric(8,2) NULL, - arbitrary int NULL, - Bin numeric(8,2) NULL, - Bin2 numeric(8,2) NULL, - Bins varchar(25) NULL, - Map1 id# NULL -) -go - -IF OBJECT_ID('dbo.Locus#Coordinates') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#Coordinates >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#Coordinates >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#Coordinates') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#Coordinates TO curator - GRANT SELECT ON dbo.Locus#Coordinates TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#Coordinates */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#DetectedBy */ - -IF OBJECT_ID('dbo.Locus#DetectedBy') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#DetectedBy - IF OBJECT_ID('dbo.Locus#DetectedBy') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#DetectedBy >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#DetectedBy >>>' -END -go - -CREATE TABLE dbo.Locus#DetectedBy ( - Locus id# NOT NULL, - Probe id# NULL, - Method id# NULL, - LinkageGroup id# NULL, - Bin float(16) NULL -) -go - -IF OBJECT_ID('dbo.Locus#DetectedBy') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#DetectedBy >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#DetectedBy >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#DetectedBy') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#DetectedBy TO curator - GRANT SELECT ON dbo.Locus#DetectedBy TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#DetectedBy */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#Display */ - -IF OBJECT_ID('dbo.Locus#Display') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#Display - IF OBJECT_ID('dbo.Locus#Display') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#Display >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#Display >>>' -END -go - -CREATE TABLE dbo.Locus#Display ( - Locus id# NOT NULL, - Name name NOT NULL -) -go - -IF OBJECT_ID('dbo.Locus#Display') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#Display >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#Display >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#Display') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#Display TO curator - GRANT SELECT ON dbo.Locus#Display TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#Display */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#Expressioninducedby */ - -IF OBJECT_ID('dbo.Locus#Expressioninducedby') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#Expressioninducedby - IF OBJECT_ID('dbo.Locus#Expressioninducedby') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#Expressioninducedby >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#Expressioninducedby >>>' -END -go - -CREATE TABLE dbo.Locus#Expressioninducedby ( - Locus id# NOT NULL, - Expressioninducedby id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Locus#Expressioninducedby') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#Expressioninducedby >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#Expressioninducedby >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#Expressioninducedby') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#Expressioninducedby TO curator - GRANT SELECT ON dbo.Locus#Expressioninducedby TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#Expressioninducedby */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#ExternalDBKeys */ - -IF OBJECT_ID('dbo.Locus#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#ExternalDBKeys - IF OBJECT_ID('dbo.Locus#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#ExternalDBKeys >>>' -END -go - -CREATE TABLE dbo.Locus#ExternalDBKeys ( - Locus id# NOT NULL, - DB id# NOT NULL, - DBKey varchar(120) NOT NULL, - Comment varchar(150) NULL -) -go - -IF OBJECT_ID('dbo.Locus#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#ExternalDBKeys >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#ExternalDBKeys') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#ExternalDBKeys TO curator - GRANT SELECT ON dbo.Locus#ExternalDBKeys TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#ExternalDBKeys */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#Function */ - -IF OBJECT_ID('dbo.Locus#Function') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#Function - IF OBJECT_ID('dbo.Locus#Function') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#Function >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#Function >>>' -END -go - -CREATE TABLE dbo.Locus#Function ( - Locus id# NULL, - GeneProduct id# NULL, - Phenotype id# NULL, - EST id# NULL, - GBID id# NULL -) -go - -IF OBJECT_ID('dbo.Locus#Function') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#Function >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#Function >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#Function') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#Function TO curator - GRANT SELECT ON dbo.Locus#Function TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#Function */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#GeneProducts */ - -IF OBJECT_ID('dbo.Locus#GeneProducts') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#GeneProducts - IF OBJECT_ID('dbo.Locus#GeneProducts') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#GeneProducts >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#GeneProducts >>>' -END -go - -CREATE TABLE dbo.Locus#GeneProducts ( - Locus id# NOT NULL, - GeneProduct id# NOT NULL, - Evidence comment NULL -) -go - -IF OBJECT_ID('dbo.Locus#GeneProducts') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#GeneProducts >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#GeneProducts >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#GeneProducts') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#GeneProducts TO curator - GRANT SELECT ON dbo.Locus#GeneProducts TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#GeneProducts */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#Length */ - -IF OBJECT_ID('dbo.Locus#Length') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#Length - IF OBJECT_ID('dbo.Locus#Length') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#Length >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#Length >>>' -END -go - -CREATE TABLE dbo.Locus#Length ( - Locus id# NOT NULL, - Length float(16) NULL, - Units id# NULL -) -go - -IF OBJECT_ID('dbo.Locus#Length') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#Length >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#Length >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#Length') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#Length TO curator - GRANT SELECT ON dbo.Locus#Length TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#Length */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#MutationsCarried */ - -IF OBJECT_ID('dbo.Locus#MutationsCarried') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#MutationsCarried - IF OBJECT_ID('dbo.Locus#MutationsCarried') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#MutationsCarried >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#MutationsCarried >>>' -END -go - -CREATE TABLE dbo.Locus#MutationsCarried ( - Locus id# NOT NULL, - MutationsCarried id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Locus#MutationsCarried') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#MutationsCarried >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#MutationsCarried >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#MutationsCarried') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#MutationsCarried TO curator - GRANT SELECT ON dbo.Locus#MutationsCarried TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#MutationsCarried */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#Properties */ - -IF OBJECT_ID('dbo.Locus#Properties') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#Properties - IF OBJECT_ID('dbo.Locus#Properties') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#Properties >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#Properties >>>' -END -go - -CREATE TABLE dbo.Locus#Properties ( - Locus id# NOT NULL, - Property id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Locus#Properties') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#Properties >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#Properties >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#Properties') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#Properties TO curator - GRANT SELECT ON dbo.Locus#Properties TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#Properties */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#References */ - -IF OBJECT_ID('dbo.Locus#References') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#References - IF OBJECT_ID('dbo.Locus#References') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#References >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#References >>>' -END -go - -CREATE TABLE dbo.Locus#References ( - Locus id# NULL, - Entity id# NULL, - Reference id# NULL -) -go - -IF OBJECT_ID('dbo.Locus#References') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#References >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#References >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#References') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#References TO curator - GRANT SELECT ON dbo.Locus#References TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#References */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#RelatedLoci */ - -IF OBJECT_ID('dbo.Locus#RelatedLoci') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#RelatedLoci - IF OBJECT_ID('dbo.Locus#RelatedLoci') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#RelatedLoci >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#RelatedLoci >>>' -END -go - -CREATE TABLE dbo.Locus#RelatedLoci ( - Locus id# NOT NULL, - Relation id# NULL, - Locus1 id# NULL -) -go - -IF OBJECT_ID('dbo.Locus#RelatedLoci') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#RelatedLoci >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#RelatedLoci >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#RelatedLoci') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#RelatedLoci TO curator - GRANT SELECT ON dbo.Locus#RelatedLoci TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#RelatedLoci */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#SynList */ - -IF OBJECT_ID('dbo.Locus#SynList') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#SynList - IF OBJECT_ID('dbo.Locus#SynList') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#SynList >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#SynList >>>' -END -go - -CREATE TABLE dbo.Locus#SynList ( - ID# id# NOT NULL, - SynList comment NULL -) -go - -IF OBJECT_ID('dbo.Locus#SynList') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#SynList >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#SynList >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#SynList') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#SynList TO curator - GRANT SELECT ON dbo.Locus#SynList TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#SynList */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#Synonyms */ - -IF OBJECT_ID('dbo.Locus#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#Synonyms - IF OBJECT_ID('dbo.Locus#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#Synonyms >>>' -END -go - -CREATE TABLE dbo.Locus#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NOT NULL, - Authority id# NULL, - JumpURL varchar(255) NULL -) -go - -IF OBJECT_ID('dbo.Locus#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#Synonyms TO curator - GRANT SELECT ON dbo.Locus#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Locus#URL */ - -IF OBJECT_ID('dbo.Locus#URL') IS NOT NULL -BEGIN - DROP TABLE dbo.Locus#URL - IF OBJECT_ID('dbo.Locus#URL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Locus#URL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Locus#URL >>>' -END -go - -CREATE TABLE dbo.Locus#URL ( - Locus id# NOT NULL, - DB id# NOT NULL, - URLKey name NOT NULL -) -go - -IF OBJECT_ID('dbo.Locus#URL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Locus#URL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Locus#URL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Locus#URL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Locus#URL TO curator - GRANT SELECT ON dbo.Locus#URL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Locus#URL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Map */ - -IF OBJECT_ID('dbo.Map') IS NOT NULL -BEGIN - DROP TABLE dbo.Map - IF OBJECT_ID('dbo.Map') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Map >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Map >>>' -END -go - -CREATE TABLE dbo.Map ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Source id# NULL, - Coordinates tinyint NULL, - LinkageGroup id# NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Map') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Map >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Map >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Map') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Map TO curator - GRANT SELECT ON dbo.Map TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Map */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Map#Comments */ - -IF OBJECT_ID('dbo.Map#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Map#Comments - IF OBJECT_ID('dbo.Map#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Map#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Map#Comments >>>' -END -go - -CREATE TABLE dbo.Map#Comments ( - Map id# NULL, - Type id# NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.Map#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Map#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Map#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Map#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Map#Comments TO curator - GRANT SELECT ON dbo.Map#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Map#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Map#ImageURL */ - -IF OBJECT_ID('dbo.Map#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.Map#ImageURL - IF OBJECT_ID('dbo.Map#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Map#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Map#ImageURL >>>' -END -go - -CREATE TABLE dbo.Map#ImageURL ( - Map id# NOT NULL, - ImageURL varchar(50) NULL -) -go - -IF OBJECT_ID('dbo.Map#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Map#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Map#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Map#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Map#ImageURL TO curator - GRANT SELECT ON dbo.Map#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Map#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Map#IncludesMaps */ - -IF OBJECT_ID('dbo.Map#IncludesMaps') IS NOT NULL -BEGIN - DROP TABLE dbo.Map#IncludesMaps - IF OBJECT_ID('dbo.Map#IncludesMaps') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Map#IncludesMaps >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Map#IncludesMaps >>>' -END -go - -CREATE TABLE dbo.Map#IncludesMaps ( - Map id# NOT NULL, - IncludesMap id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Map#IncludesMaps') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Map#IncludesMaps >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Map#IncludesMaps >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Map#IncludesMaps') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Map#IncludesMaps TO curator - GRANT SELECT ON dbo.Map#IncludesMaps TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Map#IncludesMaps */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Map#PanelsofStocks */ - -IF OBJECT_ID('dbo.Map#PanelsofStocks') IS NOT NULL -BEGIN - DROP TABLE dbo.Map#PanelsofStocks - IF OBJECT_ID('dbo.Map#PanelsofStocks') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Map#PanelsofStocks >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Map#PanelsofStocks >>>' -END -go - -CREATE TABLE dbo.Map#PanelsofStocks ( - Map id# NOT NULL, - PanelsofStock id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Map#PanelsofStocks') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Map#PanelsofStocks >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Map#PanelsofStocks >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Map#PanelsofStocks') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Map#PanelsofStocks TO curator - GRANT SELECT ON dbo.Map#PanelsofStocks TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Map#PanelsofStocks */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MapScores */ - -IF OBJECT_ID('dbo.MapScores') IS NOT NULL -BEGIN - DROP TABLE dbo.MapScores - IF OBJECT_ID('dbo.MapScores') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MapScores >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MapScores >>>' -END -go - -CREATE TABLE dbo.MapScores ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Submittedby id# NULL, - Date datetime NULL, - Probe id# NULL, - ProbedSite id# NULL, - OtherMarker id# NULL, - ProbedDNA id# NULL, - Enzyme id# NULL, - Scores123 varchar(255) NULL, - PanelofStocks id# NULL, - Parent1Pattern id# NULL, - Parent2Pattern id# NULL, - SeedSourceCode varchar(250) NULL, - FilterInfo varchar(250) NULL, - Comments varchar(255) NULL, - LinkageGroup id# NULL, - Bin float(16) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.MapScores') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MapScores >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MapScores >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MapScores') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MapScores TO curator - GRANT SELECT ON dbo.MapScores TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MapScores */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MapScores#Includeinmaps */ - -IF OBJECT_ID('dbo.MapScores#Includeinmaps') IS NOT NULL -BEGIN - DROP TABLE dbo.MapScores#Includeinmaps - IF OBJECT_ID('dbo.MapScores#Includeinmaps') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MapScores#Includeinmaps >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MapScores#Includeinmaps >>>' -END -go - -CREATE TABLE dbo.MapScores#Includeinmaps ( - MapScores id# NOT NULL, - Map id# NULL, - By1 id# NULL -) -go - -IF OBJECT_ID('dbo.MapScores#Includeinmaps') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MapScores#Includeinmaps >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MapScores#Includeinmaps >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MapScores#Includeinmaps') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MapScores#Includeinmaps TO curator - GRANT SELECT ON dbo.MapScores#Includeinmaps TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MapScores#Includeinmaps */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MapScores_Comments */ - -IF OBJECT_ID('dbo.MapScores_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.MapScores_Comments - IF OBJECT_ID('dbo.MapScores_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MapScores_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MapScores_Comments >>>' -END -go - -CREATE TABLE dbo.MapScores_Comments ( - MapScores id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.MapScores_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MapScores_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MapScores_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MapScores_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MapScores_Comments TO curator - GRANT SELECT ON dbo.MapScores_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MapScores_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MapScores_LongScores */ - -IF OBJECT_ID('dbo.MapScores_LongScores') IS NOT NULL -BEGIN - DROP TABLE dbo.MapScores_LongScores - IF OBJECT_ID('dbo.MapScores_LongScores') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MapScores_LongScores >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MapScores_LongScores >>>' -END -go - -CREATE TABLE dbo.MapScores_LongScores ( - ID# id# NOT NULL, - Scores123 text NOT NULL -) -go - -IF OBJECT_ID('dbo.MapScores_LongScores') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MapScores_LongScores >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MapScores_LongScores >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MapScores_LongScores') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MapScores_LongScores TO curator - GRANT SELECT ON dbo.MapScores_LongScores TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MapScores_LongScores */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MetabolicPathway */ - -IF OBJECT_ID('dbo.MetabolicPathway') IS NOT NULL -BEGIN - DROP TABLE dbo.MetabolicPathway - IF OBJECT_ID('dbo.MetabolicPathway') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MetabolicPathway >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MetabolicPathway >>>' -END -go - -CREATE TABLE dbo.MetabolicPathway ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - MetabolicProcess id# NULL, - SummaryReaction id# NULL, - Comments varchar(255) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.MetabolicPathway') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MetabolicPathway >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MetabolicPathway >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MetabolicPathway') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MetabolicPathway TO curator - GRANT SELECT ON dbo.MetabolicPathway TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MetabolicPathway */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MetabolicPathway#ImageURL */ - -IF OBJECT_ID('dbo.MetabolicPathway#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.MetabolicPathway#ImageURL - IF OBJECT_ID('dbo.MetabolicPathway#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MetabolicPathway#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MetabolicPathway#ImageURL >>>' -END -go - -CREATE TABLE dbo.MetabolicPathway#ImageURL ( - MetabolicPathway id# NOT NULL, - URL_Suffix varchar(250) NULL, - Caption text NULL -) -go - -IF OBJECT_ID('dbo.MetabolicPathway#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MetabolicPathway#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MetabolicPathway#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MetabolicPathway#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MetabolicPathway#ImageURL TO curator - GRANT SELECT ON dbo.MetabolicPathway#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MetabolicPathway#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MetabolicPathway#Steps */ - -IF OBJECT_ID('dbo.MetabolicPathway#Steps') IS NOT NULL -BEGIN - DROP TABLE dbo.MetabolicPathway#Steps - IF OBJECT_ID('dbo.MetabolicPathway#Steps') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MetabolicPathway#Steps >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MetabolicPathway#Steps >>>' -END -go - -CREATE TABLE dbo.MetabolicPathway#Steps ( - MetabolicPathway id# NOT NULL, - Step# int NULL, - Step id# NULL, - Locus id# NULL, - LocusRole id# NULL -) -go - -IF OBJECT_ID('dbo.MetabolicPathway#Steps') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MetabolicPathway#Steps >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MetabolicPathway#Steps >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MetabolicPathway#Steps') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MetabolicPathway#Steps TO curator - GRANT SELECT ON dbo.MetabolicPathway#Steps TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MetabolicPathway#Steps */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MetabolicPathway#Synonyms */ - -IF OBJECT_ID('dbo.MetabolicPathway#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.MetabolicPathway#Synonyms - IF OBJECT_ID('dbo.MetabolicPathway#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MetabolicPathway#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MetabolicPathway#Synonyms >>>' -END -go - -CREATE TABLE dbo.MetabolicPathway#Synonyms ( - MetabolicPathway id# NULL, - Synonym varchar(120) NULL, - Per id# NULL -) -go - -IF OBJECT_ID('dbo.MetabolicPathway#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MetabolicPathway#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MetabolicPathway#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MetabolicPathway#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MetabolicPathway#Synonyms TO curator - GRANT SELECT ON dbo.MetabolicPathway#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MetabolicPathway#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MetabolicPathway_Comments */ - -IF OBJECT_ID('dbo.MetabolicPathway_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.MetabolicPathway_Comments - IF OBJECT_ID('dbo.MetabolicPathway_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MetabolicPathway_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MetabolicPathway_Comments >>>' -END -go - -CREATE TABLE dbo.MetabolicPathway_Comments ( - MetabolicPathway id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.MetabolicPathway_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MetabolicPathway_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MetabolicPathway_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MetabolicPathway_Comments') IS NOT NULL -BEGIN - GRANT SELECT ON dbo.MetabolicPathway_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MetabolicPathway_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MetabolicStep#Locus */ - -IF OBJECT_ID('dbo.MetabolicStep#Locus') IS NOT NULL -BEGIN - DROP TABLE dbo.MetabolicStep#Locus - IF OBJECT_ID('dbo.MetabolicStep#Locus') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MetabolicStep#Locus >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MetabolicStep#Locus >>>' -END -go - -CREATE TABLE dbo.MetabolicStep#Locus ( - Locus id# NOT NULL, - Step id# NOT NULL, - LocusRole id# NULL -) -go - -IF OBJECT_ID('dbo.MetabolicStep#Locus') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MetabolicStep#Locus >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MetabolicStep#Locus >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MetabolicStep#Locus') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MetabolicStep#Locus TO curator - GRANT SELECT ON dbo.MetabolicStep#Locus TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MetabolicStep#Locus */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MNLGeneRefs */ - -IF OBJECT_ID('dbo.MNLGeneRefs') IS NOT NULL -BEGIN - DROP TABLE dbo.MNLGeneRefs - IF OBJECT_ID('dbo.MNLGeneRefs') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MNLGeneRefs >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MNLGeneRefs >>>' -END -go - -CREATE TABLE dbo.MNLGeneRefs ( - ID# id# NOT NULL, - Refs varchar(30) NULL -) -go - -IF OBJECT_ID('dbo.MNLGeneRefs') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MNLGeneRefs >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MNLGeneRefs >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MNLGeneRefs') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MNLGeneRefs TO curator - GRANT SELECT ON dbo.MNLGeneRefs TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MNLGeneRefs */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.MNLRef */ - -IF OBJECT_ID('dbo.MNLRef') IS NOT NULL -BEGIN - DROP TABLE dbo.MNLRef - IF OBJECT_ID('dbo.MNLRef') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.MNLRef >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.MNLRef >>>' -END -go - -CREATE TABLE dbo.MNLRef ( - ID# id# NOT NULL, - Ref# int NULL, - Citation comment NOT NULL, - Gene varchar(255) NULL -) -go - -IF OBJECT_ID('dbo.MNLRef') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.MNLRef >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.MNLRef >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.MNLRef') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.MNLRef TO curator - GRANT SELECT ON dbo.MNLRef TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.MNLRef */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.mnlref */ - -IF OBJECT_ID('dbo.mnlref') IS NOT NULL -BEGIN - DROP TABLE dbo.mnlref - IF OBJECT_ID('dbo.mnlref') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.mnlref >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.mnlref >>>' -END -go - -CREATE TABLE dbo.mnlref ( - Ref int NULL, - Type varchar(30) NULL, - Authors comment NULL, - Year int NULL, - Title comment NULL, - JAbbrev comment NULL, - Journal comment NULL, - Volume varchar(20) NULL, - Number varchar(20) NULL, - Pages varchar(20) NULL, - ISSN varchar(20) NULL, - AuthAddr comment NULL, - Publisher varchar(50) NULL, - Editors comment NULL, - PubCity varchar(50) NULL, - Status bit NOT NULL -) -go - -IF OBJECT_ID('dbo.mnlref') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.mnlref >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.mnlref >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.mnlref') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.mnlref TO curator - GRANT SELECT ON dbo.mnlref TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.mnlref */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Note */ - -IF OBJECT_ID('dbo.Note') IS NOT NULL -BEGIN - DROP TABLE dbo.Note - IF OBJECT_ID('dbo.Note') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Note >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Note >>>' -END -go - -CREATE TABLE dbo.Note ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - DBUser varchar(120) NULL, - Date datetime NULL, - Type id# NULL, - Form1 varchar(120) NULL, - Field1 varchar(120) NULL, - Note text NULL, - Seen tinyint NULL -) -go - -IF OBJECT_ID('dbo.Note') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Note >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Note >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Note') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Note TO curator - GRANT SELECT ON dbo.Note TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Note */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ObjectLocks */ - -IF OBJECT_ID('dbo.ObjectLocks') IS NOT NULL -BEGIN - DROP TABLE dbo.ObjectLocks - IF OBJECT_ID('dbo.ObjectLocks') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ObjectLocks >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ObjectLocks >>>' -END -go - -CREATE TABLE dbo.ObjectLocks ( - ID# int NOT NULL, - ClassName varchar(255) NOT NULL, - LockDate datetime NOT NULL, - UserName varchar(255) NOT NULL -) -go - -IF OBJECT_ID('dbo.ObjectLocks') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ObjectLocks >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ObjectLocks >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ObjectLocks') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.ObjectLocks TO curator - GRANT SELECT ON dbo.ObjectLocks TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ObjectLocks */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.PanelofStocks */ - -IF OBJECT_ID('dbo.PanelofStocks') IS NOT NULL -BEGIN - DROP TABLE dbo.PanelofStocks - IF OBJECT_ID('dbo.PanelofStocks') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.PanelofStocks >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.PanelofStocks >>>' -END -go - -CREATE TABLE dbo.PanelofStocks ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - PanelType id# NULL, - Parent1Role id# NULL, - Parent1 id# NULL, - Parent2 id# NULL, - N int NULL, - Comments varchar(255) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.PanelofStocks') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.PanelofStocks >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.PanelofStocks >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.PanelofStocks') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.PanelofStocks TO curator - GRANT SELECT ON dbo.PanelofStocks TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.PanelofStocks */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.PanelofStocks_Comments */ - -IF OBJECT_ID('dbo.PanelofStocks_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.PanelofStocks_Comments - IF OBJECT_ID('dbo.PanelofStocks_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.PanelofStocks_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.PanelofStocks_Comments >>>' -END -go - -CREATE TABLE dbo.PanelofStocks_Comments ( - PanelofStocks id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.PanelofStocks_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.PanelofStocks_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.PanelofStocks_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.PanelofStocks_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.PanelofStocks_Comments TO curator - GRANT SELECT ON dbo.PanelofStocks_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.PanelofStocks_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.PanelofStocks_Parent */ - -IF OBJECT_ID('dbo.PanelofStocks_Parent') IS NOT NULL -BEGIN - DROP TABLE dbo.PanelofStocks_Parent - IF OBJECT_ID('dbo.PanelofStocks_Parent') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.PanelofStocks_Parent >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.PanelofStocks_Parent >>>' -END -go - -CREATE TABLE dbo.PanelofStocks_Parent ( - PanelofStocks id# NOT NULL, - Parent id# NOT NULL, - OneorTwo int NOT NULL -) -go - -IF OBJECT_ID('dbo.PanelofStocks_Parent') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.PanelofStocks_Parent >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.PanelofStocks_Parent >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.PanelofStocks_Parent') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.PanelofStocks_Parent TO curator - GRANT SELECT ON dbo.PanelofStocks_Parent TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.PanelofStocks_Parent */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.pbcatcol */ - -IF OBJECT_ID('dbo.pbcatcol') IS NOT NULL -BEGIN - DROP TABLE dbo.pbcatcol - IF OBJECT_ID('dbo.pbcatcol') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.pbcatcol >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.pbcatcol >>>' -END -go - -CREATE TABLE dbo.pbcatcol ( - pbc_tnam char(30) NOT NULL, - pbc_tid int NOT NULL, - pbc_ownr char(30) NOT NULL, - pbc_cnam char(30) NOT NULL, - pbc_cid smallint NOT NULL, - pbc_labl varchar(254) NULL, - pbc_lpos smallint NULL, - pbc_hdr varchar(254) NULL, - pbc_hpos smallint NULL, - pbc_jtfy smallint NULL, - pbc_mask varchar(31) NULL, - pbc_case smallint NULL, - pbc_hght smallint NULL, - pbc_wdth smallint NULL, - pbc_ptrn varchar(31) NULL, - pbc_bmap char(1) NULL, - pbc_init varchar(254) NULL, - pbc_cmnt varchar(254) NULL, - pbc_edit varchar(31) NULL, - pbc_tag varchar(254) NULL -) -go - -IF OBJECT_ID('dbo.pbcatcol') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.pbcatcol >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.pbcatcol >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.pbcatcol') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,SELECT,UPDATE ON dbo.pbcatcol TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.pbcatcol */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.pbcatedt */ - -IF OBJECT_ID('dbo.pbcatedt') IS NOT NULL -BEGIN - DROP TABLE dbo.pbcatedt - IF OBJECT_ID('dbo.pbcatedt') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.pbcatedt >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.pbcatedt >>>' -END -go - -CREATE TABLE dbo.pbcatedt ( - pbe_name varchar(30) NOT NULL, - pbe_edit varchar(254) NOT NULL, - pbe_type smallint NOT NULL, - pbe_cntr int NULL, - pbe_seqn smallint NOT NULL, - pbe_flag int NULL, - pbe_work char(32) NULL -) -go - -IF OBJECT_ID('dbo.pbcatedt') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.pbcatedt >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.pbcatedt >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.pbcatedt') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,SELECT,UPDATE ON dbo.pbcatedt TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.pbcatedt */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.pbcatfmt */ - -IF OBJECT_ID('dbo.pbcatfmt') IS NOT NULL -BEGIN - DROP TABLE dbo.pbcatfmt - IF OBJECT_ID('dbo.pbcatfmt') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.pbcatfmt >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.pbcatfmt >>>' -END -go - -CREATE TABLE dbo.pbcatfmt ( - pbf_name varchar(30) NOT NULL, - pbf_frmt varchar(254) NOT NULL, - pbf_type smallint NOT NULL, - pbf_cntr int NULL -) -go - -IF OBJECT_ID('dbo.pbcatfmt') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.pbcatfmt >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.pbcatfmt >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.pbcatfmt') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,SELECT,UPDATE ON dbo.pbcatfmt TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.pbcatfmt */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.pbcattbl */ - -IF OBJECT_ID('dbo.pbcattbl') IS NOT NULL -BEGIN - DROP TABLE dbo.pbcattbl - IF OBJECT_ID('dbo.pbcattbl') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.pbcattbl >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.pbcattbl >>>' -END -go - -CREATE TABLE dbo.pbcattbl ( - pbt_tnam char(30) NOT NULL, - pbt_tid int NOT NULL, - pbt_ownr char(30) NOT NULL, - pbd_fhgt smallint NULL, - pbd_fwgt smallint NULL, - pbd_fitl char(1) NULL, - pbd_funl char(1) NULL, - pbd_fchr smallint NULL, - pbd_fptc smallint NULL, - pbd_ffce char(32) NULL, - pbh_fhgt smallint NULL, - pbh_fwgt smallint NULL, - pbh_fitl char(1) NULL, - pbh_funl char(1) NULL, - pbh_fchr smallint NULL, - pbh_fptc smallint NULL, - pbh_ffce char(32) NULL, - pbl_fhgt smallint NULL, - pbl_fwgt smallint NULL, - pbl_fitl char(1) NULL, - pbl_funl char(1) NULL, - pbl_fchr smallint NULL, - pbl_fptc smallint NULL, - pbl_ffce char(32) NULL, - pbt_cmnt varchar(254) NULL -) -go - -IF OBJECT_ID('dbo.pbcattbl') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.pbcattbl >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.pbcattbl >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.pbcattbl') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,SELECT,UPDATE ON dbo.pbcattbl TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.pbcattbl */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.pbcatvld */ - -IF OBJECT_ID('dbo.pbcatvld') IS NOT NULL -BEGIN - DROP TABLE dbo.pbcatvld - IF OBJECT_ID('dbo.pbcatvld') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.pbcatvld >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.pbcatvld >>>' -END -go - -CREATE TABLE dbo.pbcatvld ( - pbv_name varchar(30) NOT NULL, - pbv_vald varchar(254) NOT NULL, - pbv_type smallint NOT NULL, - pbv_cntr int NULL, - pbv_msg varchar(254) NULL -) -go - -IF OBJECT_ID('dbo.pbcatvld') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.pbcatvld >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.pbcatvld >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.pbcatvld') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,SELECT,UPDATE ON dbo.pbcatvld TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.pbcatvld */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person */ - -IF OBJECT_ID('dbo.Person') IS NOT NULL -BEGIN - DROP TABLE dbo.Person - IF OBJECT_ID('dbo.Person') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person >>>' -END -go - -CREATE TABLE dbo.Person ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - LastName varchar(120) NULL, - FirstName varchar(120) NULL, - Initials varchar(120) NULL, - Suffix varchar(10) NULL, - Institution id# NULL, - DepartmentMailstop varchar(250) NULL, - Address varchar(250) NULL, - City varchar(60) NULL, - State varchar(60) NULL, - Country varchar(30) NULL, - PostalCode varchar(30) NULL, - LastUpdate varchar(12) NULL, - URL varchar(255) NULL, - MNL_List varchar(2) NULL, - MNL_Status char(1) NULL, - Airmail char(1) NULL, - Meeting char(1) NULL, - MNL_PdThru smallint NULL, - MNL_PaidThrough varchar(4) NULL, - Comments varchar(255) NULL, - Email_list varchar(20) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Person') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person >>>' -go - -IF OBJECT_ID('dbo.Person') IS NOT NULL - ALTER TABLE dbo.Person PARTITION 2 -go - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person TO curator - GRANT SELECT ON dbo.Person TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person#Attributes */ - -IF OBJECT_ID('dbo.Person#Attributes') IS NOT NULL -BEGIN - DROP TABLE dbo.Person#Attributes - IF OBJECT_ID('dbo.Person#Attributes') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person#Attributes >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person#Attributes >>>' -END -go - -CREATE TABLE dbo.Person#Attributes ( - Person id# NOT NULL, - Attribute id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Person#Attributes') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person#Attributes >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person#Attributes >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person#Attributes') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person#Attributes TO curator - GRANT SELECT ON dbo.Person#Attributes TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person#Attributes */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person#Comments */ - -IF OBJECT_ID('dbo.Person#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Person#Comments - IF OBJECT_ID('dbo.Person#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person#Comments >>>' -END -go - -CREATE TABLE dbo.Person#Comments ( - Person id# NOT NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.Person#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person#Comments TO curator - GRANT SELECT ON dbo.Person#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person#EMailAddresses */ - -IF OBJECT_ID('dbo.Person#EMailAddresses') IS NOT NULL -BEGIN - DROP TABLE dbo.Person#EMailAddresses - IF OBJECT_ID('dbo.Person#EMailAddresses') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person#EMailAddresses >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person#EMailAddresses >>>' -END -go - -CREATE TABLE dbo.Person#EMailAddresses ( - Person id# NOT NULL, - EMailAddresse varchar(60) NOT NULL -) -go - -IF OBJECT_ID('dbo.Person#EMailAddresses') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person#EMailAddresses >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person#EMailAddresses >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person#EMailAddresses') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person#EMailAddresses TO curator - GRANT SELECT ON dbo.Person#EMailAddresses TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person#EMailAddresses */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person#ExternalDBKeys */ - -IF OBJECT_ID('dbo.Person#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.Person#ExternalDBKeys - IF OBJECT_ID('dbo.Person#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person#ExternalDBKeys >>>' -END -go - -CREATE TABLE dbo.Person#ExternalDBKeys ( - Person id# NULL, - DBKey varchar(100) NULL, - DB id# NULL -) -go - -IF OBJECT_ID('dbo.Person#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person#ExternalDBKeys >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person#ExternalDBKeys') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person#ExternalDBKeys TO curator - GRANT SELECT ON dbo.Person#ExternalDBKeys TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person#ExternalDBKeys */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person#Interests */ - -IF OBJECT_ID('dbo.Person#Interests') IS NOT NULL -BEGIN - DROP TABLE dbo.Person#Interests - IF OBJECT_ID('dbo.Person#Interests') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person#Interests >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person#Interests >>>' -END -go - -CREATE TABLE dbo.Person#Interests ( - Person id# NOT NULL, - Interest varchar(255) NOT NULL -) -go - -IF OBJECT_ID('dbo.Person#Interests') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person#Interests >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person#Interests >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person#Interests') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person#Interests TO curator - GRANT SELECT ON dbo.Person#Interests TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person#Interests */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person#PhoneNos */ - -IF OBJECT_ID('dbo.Person#PhoneNos') IS NOT NULL -BEGIN - DROP TABLE dbo.Person#PhoneNos - IF OBJECT_ID('dbo.Person#PhoneNos') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person#PhoneNos >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person#PhoneNos >>>' -END -go - -CREATE TABLE dbo.Person#PhoneNos ( - Person id# NOT NULL, - PhoneNo varchar(30) NOT NULL -) -go - -IF OBJECT_ID('dbo.Person#PhoneNos') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person#PhoneNos >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person#PhoneNos >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person#PhoneNos') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person#PhoneNos TO curator - GRANT SELECT ON dbo.Person#PhoneNos TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person#PhoneNos */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person#Synonyms */ - -IF OBJECT_ID('dbo.Person#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Person#Synonyms - IF OBJECT_ID('dbo.Person#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person#Synonyms >>>' -END -go - -CREATE TABLE dbo.Person#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NOT NULL -) -go - -IF OBJECT_ID('dbo.Person#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person#Synonyms TO curator - GRANT SELECT ON dbo.Person#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person#URL */ - -IF OBJECT_ID('dbo.Person#URL') IS NOT NULL -BEGIN - DROP TABLE dbo.Person#URL - IF OBJECT_ID('dbo.Person#URL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person#URL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person#URL >>>' -END -go - -CREATE TABLE dbo.Person#URL ( - Person id# NOT NULL, - URL name NOT NULL -) -go - -IF OBJECT_ID('dbo.Person#URL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person#URL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person#URL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person#URL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person#URL TO curator - GRANT SELECT ON dbo.Person#URL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person#URL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Person#URLPrefix */ - -IF OBJECT_ID('dbo.Person#URLPrefix') IS NOT NULL -BEGIN - DROP TABLE dbo.Person#URLPrefix - IF OBJECT_ID('dbo.Person#URLPrefix') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Person#URLPrefix >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Person#URLPrefix >>>' -END -go - -CREATE TABLE dbo.Person#URLPrefix ( - Person id# NOT NULL, - URLPrefix name NOT NULL -) -go - -IF OBJECT_ID('dbo.Person#URLPrefix') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Person#URLPrefix >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Person#URLPrefix >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Person#URLPrefix') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Person#URLPrefix TO curator - GRANT SELECT ON dbo.Person#URLPrefix TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Person#URLPrefix */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Phenotype */ - -IF OBJECT_ID('dbo.Phenotype') IS NOT NULL -BEGIN - DROP TABLE dbo.Phenotype - IF OBJECT_ID('dbo.Phenotype') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Phenotype >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Phenotype >>>' -END -go - -CREATE TABLE dbo.Phenotype ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Trait id# NULL, - Intensity id# NULL, - Value id# NULL, - Inheritance id# NULL, - Comments varchar(255) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Phenotype') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Phenotype >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Phenotype >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Phenotype') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Phenotype TO curator - GRANT SELECT ON dbo.Phenotype TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Phenotype */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Phenotype#BodyParts */ - -IF OBJECT_ID('dbo.Phenotype#BodyParts') IS NOT NULL -BEGIN - DROP TABLE dbo.Phenotype#BodyParts - IF OBJECT_ID('dbo.Phenotype#BodyParts') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Phenotype#BodyParts >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Phenotype#BodyParts >>>' -END -go - -CREATE TABLE dbo.Phenotype#BodyParts ( - Phenotype id# NOT NULL, - BodyPart id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Phenotype#BodyParts') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Phenotype#BodyParts >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Phenotype#BodyParts >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Phenotype#BodyParts') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Phenotype#BodyParts TO curator - GRANT SELECT ON dbo.Phenotype#BodyParts TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Phenotype#BodyParts */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Phenotype#Comments */ - -IF OBJECT_ID('dbo.Phenotype#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Phenotype#Comments - IF OBJECT_ID('dbo.Phenotype#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Phenotype#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Phenotype#Comments >>>' -END -go - -CREATE TABLE dbo.Phenotype#Comments ( - Phenotype id# NOT NULL, - Type id# NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.Phenotype#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Phenotype#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Phenotype#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Phenotype#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Phenotype#Comments TO curator - GRANT SELECT ON dbo.Phenotype#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Phenotype#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Phenotype#DevelopmentalStages */ - -IF OBJECT_ID('dbo.Phenotype#DevelopmentalStages') IS NOT NULL -BEGIN - DROP TABLE dbo.Phenotype#DevelopmentalStages - IF OBJECT_ID('dbo.Phenotype#DevelopmentalStages') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Phenotype#DevelopmentalStages >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Phenotype#DevelopmentalStages >>>' -END -go - -CREATE TABLE dbo.Phenotype#DevelopmentalStages ( - Phenotype id# NOT NULL, - DevelopmentalStage id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Phenotype#DevelopmentalStages') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Phenotype#DevelopmentalStages >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Phenotype#DevelopmentalStages >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Phenotype#DevelopmentalStages') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Phenotype#DevelopmentalStages TO curator - GRANT SELECT ON dbo.Phenotype#DevelopmentalStages TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Phenotype#DevelopmentalStages */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Phenotype#ImageURL */ - -IF OBJECT_ID('dbo.Phenotype#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.Phenotype#ImageURL - IF OBJECT_ID('dbo.Phenotype#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Phenotype#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Phenotype#ImageURL >>>' -END -go - -CREATE TABLE dbo.Phenotype#ImageURL ( - Phenotype id# NOT NULL, - URL_Suffix varchar(250) NULL, - Caption text NULL -) -go - -IF OBJECT_ID('dbo.Phenotype#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Phenotype#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Phenotype#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Phenotype#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Phenotype#ImageURL TO curator - GRANT SELECT ON dbo.Phenotype#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Phenotype#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Phenotype#MetabolicPathway */ - -IF OBJECT_ID('dbo.Phenotype#MetabolicPathway') IS NOT NULL -BEGIN - DROP TABLE dbo.Phenotype#MetabolicPathway - IF OBJECT_ID('dbo.Phenotype#MetabolicPathway') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Phenotype#MetabolicPathway >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Phenotype#MetabolicPathway >>>' -END -go - -CREATE TABLE dbo.Phenotype#MetabolicPathway ( - Phenotype id# NOT NULL, - MetabolicPathway id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Phenotype#MetabolicPathway') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Phenotype#MetabolicPathway >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Phenotype#MetabolicPathway >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Phenotype#MetabolicPathway') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Phenotype#MetabolicPathway TO curator - GRANT SELECT ON dbo.Phenotype#MetabolicPathway TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Phenotype#MetabolicPathway */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Phenotype#Synonyms */ - -IF OBJECT_ID('dbo.Phenotype#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Phenotype#Synonyms - IF OBJECT_ID('dbo.Phenotype#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Phenotype#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Phenotype#Synonyms >>>' -END -go - -CREATE TABLE dbo.Phenotype#Synonyms ( - Phenotype id# NOT NULL, - Synonym varchar(120) NOT NULL, - Per id# NULL -) -go - -IF OBJECT_ID('dbo.Phenotype#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Phenotype#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Phenotype#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Phenotype#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Phenotype#Synonyms TO curator - GRANT SELECT ON dbo.Phenotype#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Phenotype#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Phenotype#Trait */ - -IF OBJECT_ID('dbo.Phenotype#Trait') IS NOT NULL -BEGIN - DROP TABLE dbo.Phenotype#Trait - IF OBJECT_ID('dbo.Phenotype#Trait') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Phenotype#Trait >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Phenotype#Trait >>>' -END -go - -CREATE TABLE dbo.Phenotype#Trait ( - Phenotype id# NOT NULL, - Trait id# NULL, - Intensity id# NULL, - Value id# NULL, - Inheritance id# NULL -) -go - -IF OBJECT_ID('dbo.Phenotype#Trait') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Phenotype#Trait >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Phenotype#Trait >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Phenotype#Trait') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Phenotype#Trait TO curator - GRANT SELECT ON dbo.Phenotype#Trait TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Phenotype#Trait */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Phenotype_Comments */ - -IF OBJECT_ID('dbo.Phenotype_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Phenotype_Comments - IF OBJECT_ID('dbo.Phenotype_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Phenotype_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Phenotype_Comments >>>' -END -go - -CREATE TABLE dbo.Phenotype_Comments ( - Phenotype id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.Phenotype_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Phenotype_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Phenotype_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Phenotype_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Phenotype_Comments TO curator - GRANT SELECT ON dbo.Phenotype_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Phenotype_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.pmatches */ - -IF OBJECT_ID('dbo.pmatches') IS NOT NULL -BEGIN - DROP TABLE dbo.pmatches - IF OBJECT_ID('dbo.pmatches') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.pmatches >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.pmatches >>>' -END -go - -CREATE TABLE dbo.pmatches ( - ID# id# NOT NULL, - First varchar(30) NULL, - Inits varchar(10) NULL -) -go - -IF OBJECT_ID('dbo.pmatches') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.pmatches >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.pmatches >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.pmatches') IS NOT NULL -BEGIN - GRANT ALL ON dbo.pmatches TO curator -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.pmatches */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe */ - -IF OBJECT_ID('dbo.Probe') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe - IF OBJECT_ID('dbo.Probe') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe >>>' -END -go - -CREATE TABLE dbo.Probe ( - ID# id# NOT NULL, - Name char(40) NOT NULL, - Quality tinyint NULL, - Type id# NOT NULL, - InsertSize float(16) NULL, - Species id# NOT NULL, - Procedure1 id# NULL, - PreparedBy id# NOT NULL, - Vector id# NOT NULL, - AvailableFrom id# NOT NULL, - NoteWorthyConditions varchar(10) NULL, - Mnemonic char(10) NULL, - Copy id# NULL, - Repeat varchar(100) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Probe') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe >>>' -go - -IF OBJECT_ID('dbo.Probe') IS NOT NULL - ALTER TABLE dbo.Probe PARTITION 2 -go - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe TO curator - GRANT SELECT ON dbo.Probe TO public -END -go - -/* Bind rules & defaults to columns... */ -exec sp_bindefault probe_availablefrom, 'Probe.AvailableFrom' -go -exec sp_bindefault probe_vector, 'Probe.Vector' -go -exec sp_bindefault probe_type, 'Probe.Type' -go -exec sp_bindefault probe_preparedby, 'Probe.PreparedBy' -go -exec sp_bindefault probe_species, 'Probe.Species' -go -/* End of description of table dbo.Probe */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#ArrayPosition */ - -IF OBJECT_ID('dbo.Probe#ArrayPosition') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#ArrayPosition - IF OBJECT_ID('dbo.Probe#ArrayPosition') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#ArrayPosition >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#ArrayPosition >>>' -END -go - -CREATE TABLE dbo.Probe#ArrayPosition ( - Probe id# NULL, - Array id# NOT NULL, - Row char(10) NULL, - Column char(10) NULL -) -go - -IF OBJECT_ID('dbo.Probe#ArrayPosition') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#ArrayPosition >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#ArrayPosition >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#ArrayPosition') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#ArrayPosition TO curator - GRANT SELECT ON dbo.Probe#ArrayPosition TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#ArrayPosition */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#Comments */ - -IF OBJECT_ID('dbo.Probe#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#Comments - IF OBJECT_ID('dbo.Probe#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#Comments >>>' -END -go - -CREATE TABLE dbo.Probe#Comments ( - Probe id# NOT NULL, - Type id# NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.Probe#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#Comments TO curator - GRANT SELECT ON dbo.Probe#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#ContainsProbe */ - -IF OBJECT_ID('dbo.Probe#ContainsProbe') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#ContainsProbe - IF OBJECT_ID('dbo.Probe#ContainsProbe') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#ContainsProbe >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#ContainsProbe >>>' -END -go - -CREATE TABLE dbo.Probe#ContainsProbe ( - Probe id# NOT NULL, - Contains id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Probe#ContainsProbe') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#ContainsProbe >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#ContainsProbe >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#ContainsProbe') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#ContainsProbe TO curator - GRANT SELECT ON dbo.Probe#ContainsProbe TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#ContainsProbe */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#Copies */ - -IF OBJECT_ID('dbo.Probe#Copies') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#Copies - IF OBJECT_ID('dbo.Probe#Copies') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#Copies >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#Copies >>>' -END -go - -CREATE TABLE dbo.Probe#Copies ( - Probe id# NOT NULL, - Copies id# NOT NULL, - Source id# NULL, - Date datetime NULL -) -go - -IF OBJECT_ID('dbo.Probe#Copies') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#Copies >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#Copies >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#Copies') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#Copies TO curator - GRANT SELECT ON dbo.Probe#Copies TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#Copies */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#ExternalDBKeys */ - -IF OBJECT_ID('dbo.Probe#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#ExternalDBKeys - IF OBJECT_ID('dbo.Probe#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#ExternalDBKeys >>>' -END -go - -CREATE TABLE dbo.Probe#ExternalDBKeys ( - Probe id# NOT NULL, - DB id# NOT NULL, - DBKey varchar(120) NOT NULL, - Comment varchar(150) NULL -) -go - -IF OBJECT_ID('dbo.Probe#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#ExternalDBKeys >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#ExternalDBKeys') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#ExternalDBKeys TO curator - GRANT SELECT ON dbo.Probe#ExternalDBKeys TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#ExternalDBKeys */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#GeneProduct */ - -IF OBJECT_ID('dbo.Probe#GeneProduct') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#GeneProduct - IF OBJECT_ID('dbo.Probe#GeneProduct') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#GeneProduct >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#GeneProduct >>>' -END -go - -CREATE TABLE dbo.Probe#GeneProduct ( - Probe id# NOT NULL, - GeneProduct id# NOT NULL, - Evidence comment NULL -) -go - -IF OBJECT_ID('dbo.Probe#GeneProduct') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#GeneProduct >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#GeneProduct >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#GeneProduct') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#GeneProduct TO curator - GRANT SELECT ON dbo.Probe#GeneProduct TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#GeneProduct */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#Links */ - -IF OBJECT_ID('dbo.Probe#Links') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#Links - IF OBJECT_ID('dbo.Probe#Links') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#Links >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#Links >>>' -END -go - -CREATE TABLE dbo.Probe#Links ( - Probe id# NOT NULL, - Name char(30) NOT NULL, - PType char(20) NULL, - GenPhys int NULL, - Locus id# NOT NULL, - Chromosome char(4) NOT NULL, - LinkageGroup id# NOT NULL, - Arm id# NULL, - LName char(30) NOT NULL, - Method char(30) NULL, - Bin money NOT NULL, - Bin2 money NULL, - Bins char(15) NULL, - URL_Suffix varchar(40) NULL, - GenBank varchar(20) NULL, - IBM money NULL, - IBMframe int NULL, - IBM_Core int NULL, - UMC money NULL, - BNL money NULL, - Pio money NULL, - TIGR varchar(20) NULL, - ZmDB varchar(20) NULL, - IBMn money NULL, - IBMnSource id# NULL, - Gramene varchar(20) NULL, - IBMnBackBone int NULL, - AGI varchar(20) NULL -) -go - -IF OBJECT_ID('dbo.Probe#Links') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#Links >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#Links >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#Links') IS NOT NULL -BEGIN - GRANT SELECT ON dbo.Probe#Links TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#Links */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#MapPopulation */ - -IF OBJECT_ID('dbo.Probe#MapPopulation') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#MapPopulation - IF OBJECT_ID('dbo.Probe#MapPopulation') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#MapPopulation >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#MapPopulation >>>' -END -go - -CREATE TABLE dbo.Probe#MapPopulation ( - Probe id# NULL, - Locus id# NULL, - Method id# NULL, - Population id# NULL, - Parent1 id# NULL, - Parent2 id# NULL -) -go - -IF OBJECT_ID('dbo.Probe#MapPopulation') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#MapPopulation >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#MapPopulation >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#MapPopulation') IS NOT NULL -BEGIN - GRANT ALL ON dbo.Probe#MapPopulation TO curator -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#MapPopulation */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#NoBin */ - -IF OBJECT_ID('dbo.Probe#NoBin') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#NoBin - IF OBJECT_ID('dbo.Probe#NoBin') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#NoBin >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#NoBin >>>' -END -go - -CREATE TABLE dbo.Probe#NoBin ( - Probe id# NULL, - Bin char(4) NULL -) -go - -IF OBJECT_ID('dbo.Probe#NoBin') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#NoBin >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#NoBin >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#NoBin */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#Prep */ - -IF OBJECT_ID('dbo.Probe#Prep') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#Prep - IF OBJECT_ID('dbo.Probe#Prep') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#Prep >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#Prep >>>' -END -go - -CREATE TABLE dbo.Probe#Prep ( - Probe id# NOT NULL, - Prep id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Probe#Prep') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#Prep >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#Prep >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#Prep') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#Prep TO curator - GRANT SELECT ON dbo.Probe#Prep TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#Prep */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#Properties */ - -IF OBJECT_ID('dbo.Probe#Properties') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#Properties - IF OBJECT_ID('dbo.Probe#Properties') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#Properties >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#Properties >>>' -END -go - -CREATE TABLE dbo.Probe#Properties ( - Probe id# NOT NULL, - Property id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Probe#Properties') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#Properties >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#Properties >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#Properties') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#Properties TO curator - GRANT SELECT ON dbo.Probe#Properties TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#Properties */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#RelatedProbes */ - -IF OBJECT_ID('dbo.Probe#RelatedProbes') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#RelatedProbes - IF OBJECT_ID('dbo.Probe#RelatedProbes') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#RelatedProbes >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#RelatedProbes >>>' -END -go - -CREATE TABLE dbo.Probe#RelatedProbes ( - Probe id# NOT NULL, - Relation id# NULL, - Probe1 id# NULL, - Method id# NULL -) -go - -IF OBJECT_ID('dbo.Probe#RelatedProbes') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#RelatedProbes >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#RelatedProbes >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#RelatedProbes') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#RelatedProbes TO curator - GRANT SELECT ON dbo.Probe#RelatedProbes TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#RelatedProbes */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#SourceDNA */ - -IF OBJECT_ID('dbo.Probe#SourceDNA') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#SourceDNA - IF OBJECT_ID('dbo.Probe#SourceDNA') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#SourceDNA >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#SourceDNA >>>' -END -go - -CREATE TABLE dbo.Probe#SourceDNA ( - Probe id# NOT NULL, - EnzymePrimer id# NULL, - End1 tinyint NULL -) -go - -IF OBJECT_ID('dbo.Probe#SourceDNA') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#SourceDNA >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#SourceDNA >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#SourceDNA') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#SourceDNA TO curator - GRANT SELECT ON dbo.Probe#SourceDNA TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#SourceDNA */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#SourceofD */ - -IF OBJECT_ID('dbo.Probe#SourceofD') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#SourceofD - IF OBJECT_ID('dbo.Probe#SourceofD') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#SourceofD >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#SourceofD >>>' -END -go - -CREATE TABLE dbo.Probe#SourceofD ( - Probe id# NULL, - Type id# NULL, - ExLibris id# NULL, - Tissue id# NULL, - Stock id# NULL -) -go - -IF OBJECT_ID('dbo.Probe#SourceofD') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#SourceofD >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#SourceofD >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#SourceofD') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#SourceofD TO curator - GRANT SELECT ON dbo.Probe#SourceofD TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#SourceofD */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#StainingMethod */ - -IF OBJECT_ID('dbo.Probe#StainingMethod') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#StainingMethod - IF OBJECT_ID('dbo.Probe#StainingMethod') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#StainingMethod >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#StainingMethod >>>' -END -go - -CREATE TABLE dbo.Probe#StainingMethod ( - Probe id# NOT NULL, - Stain id# NULL, - Counterstain id# NULL -) -go - -IF OBJECT_ID('dbo.Probe#StainingMethod') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#StainingMethod >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#StainingMethod >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#StainingMethod') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#StainingMethod TO curator - GRANT SELECT ON dbo.Probe#StainingMethod TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#StainingMethod */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#Synonyms */ - -IF OBJECT_ID('dbo.Probe#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#Synonyms - IF OBJECT_ID('dbo.Probe#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#Synonyms >>>' -END -go - -CREATE TABLE dbo.Probe#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NULL, - Authority id# NULL -) -go - -IF OBJECT_ID('dbo.Probe#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#Synonyms TO curator - GRANT SELECT ON dbo.Probe#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#UsedtoCom */ - -IF OBJECT_ID('dbo.Probe#UsedtoCom') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#UsedtoCom - IF OBJECT_ID('dbo.Probe#UsedtoCom') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#UsedtoCom >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#UsedtoCom >>>' -END -go - -CREATE TABLE dbo.Probe#UsedtoCom ( - Probe id# NOT NULL, - UsedtoComplement id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Probe#UsedtoCom') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#UsedtoCom >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#UsedtoCom >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#UsedtoCom') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#UsedtoCom TO curator - GRANT SELECT ON dbo.Probe#UsedtoCom TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#UsedtoCom */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Probe#VectorCutt */ - -IF OBJECT_ID('dbo.Probe#VectorCutt') IS NOT NULL -BEGIN - DROP TABLE dbo.Probe#VectorCutt - IF OBJECT_ID('dbo.Probe#VectorCutt') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Probe#VectorCutt >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Probe#VectorCutt >>>' -END -go - -CREATE TABLE dbo.Probe#VectorCutt ( - Probe id# NOT NULL, - Enzyme id# NULL, - End1 tinyint NULL, - Sizes varchar(100) NULL -) -go - -IF OBJECT_ID('dbo.Probe#VectorCutt') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Probe#VectorCutt >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Probe#VectorCutt >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Probe#VectorCutt') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Probe#VectorCutt TO curator - GRANT SELECT ON dbo.Probe#VectorCutt TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Probe#VectorCutt */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ProbeBin */ - -IF OBJECT_ID('dbo.ProbeBin') IS NOT NULL -BEGIN - DROP TABLE dbo.ProbeBin - IF OBJECT_ID('dbo.ProbeBin') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ProbeBin >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ProbeBin >>>' -END -go - -CREATE TABLE dbo.ProbeBin ( - Probe id# NULL, - Bin money NULL, - Locus id# NULL -) -go - -IF OBJECT_ID('dbo.ProbeBin') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ProbeBin >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ProbeBin >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ProbeBin') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.ProbeBin TO curator - GRANT SELECT ON dbo.ProbeBin TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ProbeBin */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ProbeHomology */ - -IF OBJECT_ID('dbo.ProbeHomology') IS NOT NULL -BEGIN - DROP TABLE dbo.ProbeHomology - IF OBJECT_ID('dbo.ProbeHomology') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ProbeHomology >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ProbeHomology >>>' -END -go - -CREATE TABLE dbo.ProbeHomology ( - Probe id# NULL, - Bin1 money NULL, - Bin2 money NULL, - Bin3 money NULL, - Bin4 money NULL, - Bin5 money NULL, - Bin6 money NULL, - Bin7 money NULL, - Bin8 money NULL, - Bin9 money NULL, - Bin10 money NULL -) -go - -IF OBJECT_ID('dbo.ProbeHomology') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ProbeHomology >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ProbeHomology >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ProbeHomology') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.ProbeHomology TO curator - GRANT SELECT ON dbo.ProbeHomology TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ProbeHomology */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ProbeSequence */ - -IF OBJECT_ID('dbo.ProbeSequence') IS NOT NULL -BEGIN - DROP TABLE dbo.ProbeSequence - IF OBJECT_ID('dbo.ProbeSequence') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ProbeSequence >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ProbeSequence >>>' -END -go - -CREATE TABLE dbo.ProbeSequence ( - Probe id# NULL, - Sequence text NULL -) -go - -IF OBJECT_ID('dbo.ProbeSequence') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ProbeSequence >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ProbeSequence >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ProbeSequence */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ptest */ - -IF OBJECT_ID('dbo.ptest') IS NOT NULL -BEGIN - DROP TABLE dbo.ptest - IF OBJECT_ID('dbo.ptest') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ptest >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ptest >>>' -END -go - -CREATE TABLE dbo.ptest ( - Name name NOT NULL -) -go - -IF OBJECT_ID('dbo.ptest') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ptest >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ptest >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ptest') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.ptest TO curator - GRANT SELECT ON dbo.ptest TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ptest */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.pwords */ - -IF OBJECT_ID('dbo.pwords') IS NOT NULL -BEGIN - DROP TABLE dbo.pwords - IF OBJECT_ID('dbo.pwords') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.pwords >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.pwords >>>' -END -go - -CREATE TABLE dbo.pwords ( - I int NOT NULL, - Word name NOT NULL -) -go - -IF OBJECT_ID('dbo.pwords') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.pwords >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.pwords >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.pwords') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.pwords TO curator - GRANT SELECT ON dbo.pwords TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.pwords */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLExperiment */ - -IF OBJECT_ID('dbo.QTLExperiment') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLExperiment - IF OBJECT_ID('dbo.QTLExperiment') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLExperiment >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLExperiment >>>' -END -go - -CREATE TABLE dbo.QTLExperiment ( - ID# int NOT NULL, - Name varchar(255) NOT NULL, - MappingPanel int NULL, - Progenyforgenotypeevaluation text NULL, - Progenyfortraitevaluation text NULL, - Markersummary text NULL -) -go - -IF OBJECT_ID('dbo.QTLExperiment') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLExperiment >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLExperiment >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLExperiment') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLExperiment TO curator - GRANT SELECT ON dbo.QTLExperiment TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLExperiment */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLExperiment#Comments */ - -IF OBJECT_ID('dbo.QTLExperiment#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLExperiment#Comments - IF OBJECT_ID('dbo.QTLExperiment#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLExperiment#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLExperiment#Comments >>>' -END -go - -CREATE TABLE dbo.QTLExperiment#Comments ( - QTLExperiment int NOT NULL, - Type int NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.QTLExperiment#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLExperiment#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLExperiment#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLExperiment#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLExperiment#Comments TO curator - GRANT SELECT ON dbo.QTLExperiment#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLExperiment#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLExperiment#Contributedby */ - -IF OBJECT_ID('dbo.QTLExperiment#Contributedby') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLExperiment#Contributedby - IF OBJECT_ID('dbo.QTLExperiment#Contributedby') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLExperiment#Contributedby >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLExperiment#Contributedby >>>' -END -go - -CREATE TABLE dbo.QTLExperiment#Contributedby ( - QTLExperiment int NOT NULL, - Contributor int NULL, - ContribRole int NULL, - Date datetime NULL -) -go - -IF OBJECT_ID('dbo.QTLExperiment#Contributedby') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLExperiment#Contributedby >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLExperiment#Contributedby >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLExperiment#Contributedby') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLExperiment#Contributedby TO curator - GRANT SELECT ON dbo.QTLExperiment#Contributedby TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLExperiment#Contributedby */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLExperiment#Evaluations */ - -IF OBJECT_ID('dbo.QTLExperiment#Evaluations') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLExperiment#Evaluations - IF OBJECT_ID('dbo.QTLExperiment#Evaluations') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLExperiment#Evaluations >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLExperiment#Evaluations >>>' -END -go - -CREATE TABLE dbo.QTLExperiment#Evaluations ( - QTLExperiment int NOT NULL, - Evaluation int NULL -) -go - -IF OBJECT_ID('dbo.QTLExperiment#Evaluations') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLExperiment#Evaluations >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLExperiment#Evaluations >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLExperiment#Evaluations') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLExperiment#Evaluations TO curator - GRANT SELECT ON dbo.QTLExperiment#Evaluations TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLExperiment#Evaluations */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLExperiment#IncludedonMaps */ - -IF OBJECT_ID('dbo.QTLExperiment#IncludedonMaps') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLExperiment#IncludedonMaps - IF OBJECT_ID('dbo.QTLExperiment#IncludedonMaps') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLExperiment#IncludedonMaps >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLExperiment#IncludedonMaps >>>' -END -go - -CREATE TABLE dbo.QTLExperiment#IncludedonMaps ( - QTLExperiment int NOT NULL, - IncludedonMaps int NOT NULL -) -go - -IF OBJECT_ID('dbo.QTLExperiment#IncludedonMaps') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLExperiment#IncludedonMaps >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLExperiment#IncludedonMaps >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLExperiment#IncludedonMaps') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLExperiment#IncludedonMaps TO curator - GRANT SELECT ON dbo.QTLExperiment#IncludedonMaps TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLExperiment#IncludedonMaps */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLExperiment#QTLdetected */ - -IF OBJECT_ID('dbo.QTLExperiment#QTLdetected') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLExperiment#QTLdetected - IF OBJECT_ID('dbo.QTLExperiment#QTLdetected') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLExperiment#QTLdetected >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLExperiment#QTLdetected >>>' -END -go - -CREATE TABLE dbo.QTLExperiment#QTLdetected ( - QTLExperiment int NOT NULL, - QTLdetected int NOT NULL -) -go - -IF OBJECT_ID('dbo.QTLExperiment#QTLdetected') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLExperiment#QTLdetected >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLExperiment#QTLdetected >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLExperiment#QTLdetected') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLExperiment#QTLdetected TO curator - GRANT SELECT ON dbo.QTLExperiment#QTLdetected TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLExperiment#QTLdetected */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLExperiment#References */ - -IF OBJECT_ID('dbo.QTLExperiment#References') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLExperiment#References - IF OBJECT_ID('dbo.QTLExperiment#References') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLExperiment#References >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLExperiment#References >>>' -END -go - -CREATE TABLE dbo.QTLExperiment#References ( - QTLExperiment int NOT NULL, - Contents int NULL, - Reference int NULL -) -go - -IF OBJECT_ID('dbo.QTLExperiment#References') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLExperiment#References >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLExperiment#References >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLExperiment#References') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLExperiment#References TO curator - GRANT SELECT ON dbo.QTLExperiment#References TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLExperiment#References */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLLinkageAnalysis */ - -IF OBJECT_ID('dbo.QTLLinkageAnalysis') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLLinkageAnalysis - IF OBJECT_ID('dbo.QTLLinkageAnalysis') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLLinkageAnalysis >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLLinkageAnalysis >>>' -END -go - -CREATE TABLE dbo.QTLLinkageAnalysis ( - ID# int NOT NULL, - Name varchar(255) NOT NULL, - TraitEvaluationSummary int NULL, - QTLAnalysisMethod text NULL, - GeneticModelinAnalysis text NULL, - NumberofQTLdetected int NULL, - R2allQTL float(16) NULL, - Significancemeasure int NULL -) -go - -IF OBJECT_ID('dbo.QTLLinkageAnalysis') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLLinkageAnalysis >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLLinkageAnalysis >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLLinkageAnalysis') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLLinkageAnalysis TO curator - GRANT SELECT ON dbo.QTLLinkageAnalysis TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLLinkageAnalysis */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLLinkageAnalysis#Comments */ - -IF OBJECT_ID('dbo.QTLLinkageAnalysis#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLLinkageAnalysis#Comments - IF OBJECT_ID('dbo.QTLLinkageAnalysis#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLLinkageAnalysis#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLLinkageAnalysis#Comments >>>' -END -go - -CREATE TABLE dbo.QTLLinkageAnalysis#Comments ( - QTLLinkageAnalysis int NOT NULL, - Type int NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.QTLLinkageAnalysis#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLLinkageAnalysis#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLLinkageAnalysis#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLLinkageAnalysis#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLLinkageAnalysis#Comments TO curator - GRANT SELECT ON dbo.QTLLinkageAnalysis#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLLinkageAnalysis#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLLinkageAnalysis#ImageURL */ - -IF OBJECT_ID('dbo.QTLLinkageAnalysis#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLLinkageAnalysis#ImageURL - IF OBJECT_ID('dbo.QTLLinkageAnalysis#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLLinkageAnalysis#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLLinkageAnalysis#ImageURL >>>' -END -go - -CREATE TABLE dbo.QTLLinkageAnalysis#ImageURL ( - QTLLinkageAnalysis id# NOT NULL, - URL_Suffix varchar(250) NULL, - Caption text NULL -) -go - -IF OBJECT_ID('dbo.QTLLinkageAnalysis#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLLinkageAnalysis#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLLinkageAnalysis#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLLinkageAnalysis#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLLinkageAnalysis#ImageURL TO curator - GRANT SELECT ON dbo.QTLLinkageAnalysis#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLLinkageAnalysis#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.QTLLinkageAnalysis#QTLAnalyses */ - -IF OBJECT_ID('dbo.QTLLinkageAnalysis#QTLAnalyses') IS NOT NULL -BEGIN - DROP TABLE dbo.QTLLinkageAnalysis#QTLAnalyses - IF OBJECT_ID('dbo.QTLLinkageAnalysis#QTLAnalyses') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.QTLLinkageAnalysis#QTLAnalyses >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.QTLLinkageAnalysis#QTLAnalyses >>>' -END -go - -CREATE TABLE dbo.QTLLinkageAnalysis#QTLAnalyses ( - QTLLinkageAnalysis int NOT NULL, - QTL int NULL, - Significance float(16) NULL, - Highscoringvariation int NULL, - Phenotypiceffects float(16) NULL, - AddDomeffects varchar(255) NULL, - R float(16) NULL -) -go - -IF OBJECT_ID('dbo.QTLLinkageAnalysis#QTLAnalyses') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.QTLLinkageAnalysis#QTLAnalyses >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.QTLLinkageAnalysis#QTLAnalyses >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.QTLLinkageAnalysis#QTLAnalyses') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.QTLLinkageAnalysis#QTLAnalyses TO curator - GRANT SELECT ON dbo.QTLLinkageAnalysis#QTLAnalyses TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.QTLLinkageAnalysis#QTLAnalyses */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reaction */ - -IF OBJECT_ID('dbo.Reaction') IS NOT NULL -BEGIN - DROP TABLE dbo.Reaction - IF OBJECT_ID('dbo.Reaction') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reaction >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reaction >>>' -END -go - -CREATE TABLE dbo.Reaction ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Comments varchar(255) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Reaction') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reaction >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reaction >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reaction') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reaction TO curator - GRANT SELECT ON dbo.Reaction TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reaction */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reaction#EC# */ - -IF OBJECT_ID('dbo.Reaction#EC#') IS NOT NULL -BEGIN - DROP TABLE dbo.Reaction#EC# - IF OBJECT_ID('dbo.Reaction#EC#') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reaction#EC# >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reaction#EC# >>>' -END -go - -CREATE TABLE dbo.Reaction#EC# ( - Reaction id# NOT NULL, - EC# varchar(20) NOT NULL -) -go - -IF OBJECT_ID('dbo.Reaction#EC#') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reaction#EC# >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reaction#EC# >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reaction#EC#') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reaction#EC# TO curator - GRANT SELECT ON dbo.Reaction#EC# TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reaction#EC# */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reaction#Products */ - -IF OBJECT_ID('dbo.Reaction#Products') IS NOT NULL -BEGIN - DROP TABLE dbo.Reaction#Products - IF OBJECT_ID('dbo.Reaction#Products') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reaction#Products >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reaction#Products >>>' -END -go - -CREATE TABLE dbo.Reaction#Products ( - Reaction id# NOT NULL, - ReactionRole id# NULL, - Substance id# NULL, - N int NULL, - Km float(16) NULL -) -go - -IF OBJECT_ID('dbo.Reaction#Products') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reaction#Products >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reaction#Products >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reaction#Products') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reaction#Products TO curator - GRANT SELECT ON dbo.Reaction#Products TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reaction#Products */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reaction#Reactants */ - -IF OBJECT_ID('dbo.Reaction#Reactants') IS NOT NULL -BEGIN - DROP TABLE dbo.Reaction#Reactants - IF OBJECT_ID('dbo.Reaction#Reactants') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reaction#Reactants >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reaction#Reactants >>>' -END -go - -CREATE TABLE dbo.Reaction#Reactants ( - Reaction id# NOT NULL, - ReactionRole id# NULL, - Substance id# NULL, - N int NULL, - Km float(16) NULL -) -go - -IF OBJECT_ID('dbo.Reaction#Reactants') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reaction#Reactants >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reaction#Reactants >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reaction#Reactants') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reaction#Reactants TO curator - GRANT SELECT ON dbo.Reaction#Reactants TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reaction#Reactants */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reaction_Comments */ - -IF OBJECT_ID('dbo.Reaction_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Reaction_Comments - IF OBJECT_ID('dbo.Reaction_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reaction_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reaction_Comments >>>' -END -go - -CREATE TABLE dbo.Reaction_Comments ( - Reaction id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.Reaction_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reaction_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reaction_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reaction_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reaction_Comments TO curator - GRANT SELECT ON dbo.Reaction_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reaction_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Recombination#Comments */ - -IF OBJECT_ID('dbo.Recombination#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Recombination#Comments - IF OBJECT_ID('dbo.Recombination#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Recombination#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Recombination#Comments >>>' -END -go - -CREATE TABLE dbo.Recombination#Comments ( - Recombination id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.Recombination#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Recombination#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Recombination#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Recombination#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Recombination#Comments TO curator - GRANT SELECT ON dbo.Recombination#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Recombination#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RecombinationData */ - -IF OBJECT_ID('dbo.RecombinationData') IS NOT NULL -BEGIN - DROP TABLE dbo.RecombinationData - IF OBJECT_ID('dbo.RecombinationData') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RecombinationData >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RecombinationData >>>' -END -go - -CREATE TABLE dbo.RecombinationData ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - G#ofMarkers int NULL, - CrossType id# NULL, - TotalProgeny int NULL, - Quality int NULL, - Order1 smallint NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.RecombinationData') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RecombinationData >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RecombinationData >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RecombinationData') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RecombinationData TO curator - GRANT SELECT ON dbo.RecombinationData TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RecombinationData */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RecombinationData#Alleles */ - -IF OBJECT_ID('dbo.RecombinationData#Alleles') IS NOT NULL -BEGIN - DROP TABLE dbo.RecombinationData#Alleles - IF OBJECT_ID('dbo.RecombinationData#Alleles') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RecombinationData#Alleles >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RecombinationData#Alleles >>>' -END -go - -CREATE TABLE dbo.RecombinationData#Alleles ( - RecombinationData id# NOT NULL, - Parent tinyint NULL, - Chromosome tinyint NULL, - Allele id# NULL, - Locus id# NULL -) -go - -IF OBJECT_ID('dbo.RecombinationData#Alleles') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RecombinationData#Alleles >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RecombinationData#Alleles >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RecombinationData#Alleles') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RecombinationData#Alleles TO curator - GRANT SELECT ON dbo.RecombinationData#Alleles TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RecombinationData#Alleles */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RecombinationData#ClassFrequ */ - -IF OBJECT_ID('dbo.RecombinationData#ClassFrequ') IS NOT NULL -BEGIN - DROP TABLE dbo.RecombinationData#ClassFrequ - IF OBJECT_ID('dbo.RecombinationData#ClassFrequ') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RecombinationData#ClassFrequ >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RecombinationData#ClassFrequ >>>' -END -go - -CREATE TABLE dbo.RecombinationData#ClassFrequ ( - RecombinationData id# NOT NULL, - Genotype varchar(255) NULL, - Frequency float(16) NULL, - N int NULL -) -go - -IF OBJECT_ID('dbo.RecombinationData#ClassFrequ') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RecombinationData#ClassFrequ >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RecombinationData#ClassFrequ >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RecombinationData#ClassFrequ') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RecombinationData#ClassFrequ TO curator - GRANT SELECT ON dbo.RecombinationData#ClassFrequ TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RecombinationData#ClassFrequ */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RecombinationData#DataOverla */ - -IF OBJECT_ID('dbo.RecombinationData#DataOverla') IS NOT NULL -BEGIN - DROP TABLE dbo.RecombinationData#DataOverla - IF OBJECT_ID('dbo.RecombinationData#DataOverla') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RecombinationData#DataOverla >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RecombinationData#DataOverla >>>' -END -go - -CREATE TABLE dbo.RecombinationData#DataOverla ( - RecombinationData id# NOT NULL, - RecombinationData1 id# NULL, - Uncertain tinyint NULL -) -go - -IF OBJECT_ID('dbo.RecombinationData#DataOverla') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RecombinationData#DataOverla >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RecombinationData#DataOverla >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RecombinationData#DataOverla') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RecombinationData#DataOverla TO curator - GRANT SELECT ON dbo.RecombinationData#DataOverla TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RecombinationData#DataOverla */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RecombinationData#Loci */ - -IF OBJECT_ID('dbo.RecombinationData#Loci') IS NOT NULL -BEGIN - DROP TABLE dbo.RecombinationData#Loci - IF OBJECT_ID('dbo.RecombinationData#Loci') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RecombinationData#Loci >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RecombinationData#Loci >>>' -END -go - -CREATE TABLE dbo.RecombinationData#Loci ( - RecombinationData id# NOT NULL, - Ord# int NULL, - Locus id# NULL, - Symbols varchar(8) NULL -) -go - -IF OBJECT_ID('dbo.RecombinationData#Loci') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RecombinationData#Loci >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RecombinationData#Loci >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RecombinationData#Loci') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RecombinationData#Loci TO curator - GRANT SELECT ON dbo.RecombinationData#Loci TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RecombinationData#Loci */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RecombinationData#Recombinati */ - -IF OBJECT_ID('dbo.RecombinationData#Recombinati') IS NOT NULL -BEGIN - DROP TABLE dbo.RecombinationData#Recombinati - IF OBJECT_ID('dbo.RecombinationData#Recombinati') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RecombinationData#Recombinati >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RecombinationData#Recombinati >>>' -END -go - -CREATE TABLE dbo.RecombinationData#Recombinati ( - RecombinationData id# NOT NULL, - Before id# NULL, - After id# NULL, - Frequency float(16) NULL, - SE float(16) NULL, - Kosambi float(16) NULL, - Haldane float(16) NULL -) -go - -IF OBJECT_ID('dbo.RecombinationData#Recombinati') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RecombinationData#Recombinati >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RecombinationData#Recombinati >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RecombinationData#Recombinati') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RecombinationData#Recombinati TO curator - GRANT SELECT ON dbo.RecombinationData#Recombinati TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RecombinationData#Recombinati */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RecombinationData#Sites */ - -IF OBJECT_ID('dbo.RecombinationData#Sites') IS NOT NULL -BEGIN - DROP TABLE dbo.RecombinationData#Sites - IF OBJECT_ID('dbo.RecombinationData#Sites') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RecombinationData#Sites >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RecombinationData#Sites >>>' -END -go - -CREATE TABLE dbo.RecombinationData#Sites ( - RecombinationData id# NOT NULL, - Ord# int NULL, - Site id# NULL, - Symbols varchar(8) NULL -) -go - -IF OBJECT_ID('dbo.RecombinationData#Sites') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RecombinationData#Sites >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RecombinationData#Sites >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RecombinationData#Sites') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RecombinationData#Sites TO curator - GRANT SELECT ON dbo.RecombinationData#Sites TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RecombinationData#Sites */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ref */ - -IF OBJECT_ID('dbo.ref') IS NOT NULL -BEGIN - DROP TABLE dbo.ref - IF OBJECT_ID('dbo.ref') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ref >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ref >>>' -END -go - -CREATE TABLE dbo.ref ( - Authors name NULL, - Year char(10) NULL, - Title name NULL, - Name varchar(100) NULL, - Stuff char(20) NULL, - Stuff1 char(20) NULL, - Stuff2 char(20) NULL, - Stuff3 char(20) NULL, - Author1 name NULL, - Author3 name NULL, - Author2 name NULL, - Author4 name NULL, - Author5 name NULL, - Author6 name NULL, - Author7 name NULL, - Author8 name NULL, - Author9 name NULL, - Author10 name NULL, - Year1 int NULL, - Journal name NULL, - Vol char(8) NULL, - NoJ char(50) NULL, - PP char(40) NULL, - JID id# NULL, - Journal1 name NULL -) -go - -IF OBJECT_ID('dbo.ref') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ref >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ref >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ref') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.ref TO curator - GRANT SELECT ON dbo.ref TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ref */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.ref1 */ - -IF OBJECT_ID('dbo.ref1') IS NOT NULL -BEGIN - DROP TABLE dbo.ref1 - IF OBJECT_ID('dbo.ref1') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.ref1 >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.ref1 >>>' -END -go - -CREATE TABLE dbo.ref1 ( - Authors name NULL, - Year char(10) NULL, - Title name NULL, - Name varchar(100) NULL, - Stuff name NULL, - Stuff1 name NULL, - Author1 name NULL, - Author3 name NULL, - Author2 name NULL, - Author4 name NULL, - Author5 name NULL, - Year1 int NULL, - Journal name NULL, - Vol char(8) NULL, - NoJ char(50) NULL, - PP char(40) NULL, - JID id# NULL -) -go - -IF OBJECT_ID('dbo.ref1') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.ref1 >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.ref1 >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.ref1') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.ref1 TO curator - GRANT SELECT ON dbo.ref1 TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.ref1 */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reference */ - -IF OBJECT_ID('dbo.Reference') IS NOT NULL -BEGIN - DROP TABLE dbo.Reference - IF OBJECT_ID('dbo.Reference') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reference >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reference >>>' -END -go - -CREATE TABLE dbo.Reference ( - ID# id# NOT NULL, - Name varchar(250) NOT NULL, - Title varchar(255) NULL, - Type id# NULL, - Year int NULL, - In1 id# NULL, - Volume varchar(20) NULL, - Pages varchar(20) NULL, - Number varchar(10) NULL, - Publisher id# NULL, - Institution id# NULL, - To1 id# NULL, - Comments varchar(100) NULL, - Abstract varchar(10) NULL, - AuthorDescription varchar(100) NULL, - ISSN varchar(20) NULL, - ccinAuthors comment NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Reference') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reference >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reference >>>' -go - -IF OBJECT_ID('dbo.Reference') IS NOT NULL - ALTER TABLE dbo.Reference PARTITION 2 -go - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reference') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reference TO curator - GRANT SELECT ON dbo.Reference TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reference */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reference#Abstract */ - -IF OBJECT_ID('dbo.Reference#Abstract') IS NOT NULL -BEGIN - DROP TABLE dbo.Reference#Abstract - IF OBJECT_ID('dbo.Reference#Abstract') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reference#Abstract >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reference#Abstract >>>' -END -go - -CREATE TABLE dbo.Reference#Abstract ( - Reference id# NULL, - Abstract text NULL -) -go - -IF OBJECT_ID('dbo.Reference#Abstract') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reference#Abstract >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reference#Abstract >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reference#Abstract') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reference#Abstract TO curator - GRANT SELECT ON dbo.Reference#Abstract TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reference#Abstract */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reference#Authors */ - -IF OBJECT_ID('dbo.Reference#Authors') IS NOT NULL -BEGIN - DROP TABLE dbo.Reference#Authors - IF OBJECT_ID('dbo.Reference#Authors') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reference#Authors >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reference#Authors >>>' -END -go - -CREATE TABLE dbo.Reference#Authors ( - Reference id# NOT NULL, - Order1 int NULL, - Author id# NULL, - AuthorType id# NULL -) -go - -IF OBJECT_ID('dbo.Reference#Authors') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reference#Authors >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reference#Authors >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reference#Authors') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reference#Authors TO curator - GRANT SELECT ON dbo.Reference#Authors TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reference#Authors */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reference#Comments */ - -IF OBJECT_ID('dbo.Reference#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Reference#Comments - IF OBJECT_ID('dbo.Reference#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reference#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reference#Comments >>>' -END -go - -CREATE TABLE dbo.Reference#Comments ( - Reference id# NOT NULL, - Type id# NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.Reference#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reference#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reference#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reference#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reference#Comments TO curator - GRANT SELECT ON dbo.Reference#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reference#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Reference#ExternalDBKeys */ - -IF OBJECT_ID('dbo.Reference#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.Reference#ExternalDBKeys - IF OBJECT_ID('dbo.Reference#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Reference#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Reference#ExternalDBKeys >>>' -END -go - -CREATE TABLE dbo.Reference#ExternalDBKeys ( - Reference id# NOT NULL, - DB id# NOT NULL, - DBKey varchar(120) NOT NULL, - Comment varchar(150) NULL -) -go - -IF OBJECT_ID('dbo.Reference#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Reference#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Reference#ExternalDBKeys >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Reference#ExternalDBKeys') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Reference#ExternalDBKeys TO curator - GRANT SELECT ON dbo.Reference#ExternalDBKeys TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Reference#ExternalDBKeys */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RestrictionEnzyme#Isoschizomer */ - -IF OBJECT_ID('dbo.RestrictionEnzyme#Isoschizomer') IS NOT NULL -BEGIN - DROP TABLE dbo.RestrictionEnzyme#Isoschizomer - IF OBJECT_ID('dbo.RestrictionEnzyme#Isoschizomer') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RestrictionEnzyme#Isoschizomer >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RestrictionEnzyme#Isoschizomer >>>' -END -go - -CREATE TABLE dbo.RestrictionEnzyme#Isoschizomer ( - RestrictionEnzyme id# NOT NULL, - Isoschizomer id# NOT NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.RestrictionEnzyme#Isoschizomer') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RestrictionEnzyme#Isoschizomer >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RestrictionEnzyme#Isoschizomer >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RestrictionEnzyme#Isoschizomer') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RestrictionEnzyme#Isoschizomer TO curator - GRANT SELECT ON dbo.RestrictionEnzyme#Isoschizomer TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RestrictionEnzyme#Isoschizomer */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RestrictionEnzyme#Synonyms */ - -IF OBJECT_ID('dbo.RestrictionEnzyme#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.RestrictionEnzyme#Synonyms - IF OBJECT_ID('dbo.RestrictionEnzyme#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RestrictionEnzyme#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RestrictionEnzyme#Synonyms >>>' -END -go - -CREATE TABLE dbo.RestrictionEnzyme#Synonyms ( - Enzyme id# NULL, - Synonym name NULL, - Per id# NULL -) -go - -IF OBJECT_ID('dbo.RestrictionEnzyme#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RestrictionEnzyme#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RestrictionEnzyme#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RestrictionEnzyme#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RestrictionEnzyme#Synonyms TO curator - GRANT SELECT ON dbo.RestrictionEnzyme#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RestrictionEnzyme#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.RestrictionEnzymeorPrimer */ - -IF OBJECT_ID('dbo.RestrictionEnzymeorPrimer') IS NOT NULL -BEGIN - DROP TABLE dbo.RestrictionEnzymeorPrimer - IF OBJECT_ID('dbo.RestrictionEnzymeorPrimer') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.RestrictionEnzymeorPrimer >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.RestrictionEnzymeorPrimer >>>' -END -go - -CREATE TABLE dbo.RestrictionEnzymeorPrimer ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Type id# NULL, - Sequence varchar(60) NULL, - Comments comment NULL, - SubmittedBy id# NULL, - Date datetime NULL, - Tm money NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.RestrictionEnzymeorPrimer') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.RestrictionEnzymeorPrimer >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.RestrictionEnzymeorPrimer >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.RestrictionEnzymeorPrimer') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.RestrictionEnzymeorPrimer TO curator - GRANT SELECT ON dbo.RestrictionEnzymeorPrimer TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.RestrictionEnzymeorPrimer */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SpeciesGenome */ - -IF OBJECT_ID('dbo.SpeciesGenome') IS NOT NULL -BEGIN - DROP TABLE dbo.SpeciesGenome - IF OBJECT_ID('dbo.SpeciesGenome') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SpeciesGenome >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SpeciesGenome >>>' -END -go - -CREATE TABLE dbo.SpeciesGenome ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.SpeciesGenome') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SpeciesGenome >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SpeciesGenome >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SpeciesGenome') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SpeciesGenome TO curator - GRANT SELECT ON dbo.SpeciesGenome TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SpeciesGenome */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SpeciesGenome#ChloroplastGen */ - -IF OBJECT_ID('dbo.SpeciesGenome#ChloroplastGen') IS NOT NULL -BEGIN - DROP TABLE dbo.SpeciesGenome#ChloroplastGen - IF OBJECT_ID('dbo.SpeciesGenome#ChloroplastGen') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SpeciesGenome#ChloroplastGen >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SpeciesGenome#ChloroplastGen >>>' -END -go - -CREATE TABLE dbo.SpeciesGenome#ChloroplastGen ( - SpeciesGenome id# NOT NULL, - G#ofLinkageGroups int NULL, - Size float(16) NULL, - G float(16) NULL, - Copynumbercomment varchar(255) NULL -) -go - -IF OBJECT_ID('dbo.SpeciesGenome#ChloroplastGen') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SpeciesGenome#ChloroplastGen >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SpeciesGenome#ChloroplastGen >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SpeciesGenome#ChloroplastGen') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SpeciesGenome#ChloroplastGen TO curator - GRANT SELECT ON dbo.SpeciesGenome#ChloroplastGen TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SpeciesGenome#ChloroplastGen */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SpeciesGenome#Comments */ - -IF OBJECT_ID('dbo.SpeciesGenome#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.SpeciesGenome#Comments - IF OBJECT_ID('dbo.SpeciesGenome#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SpeciesGenome#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SpeciesGenome#Comments >>>' -END -go - -CREATE TABLE dbo.SpeciesGenome#Comments ( - SpeciesGenome id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.SpeciesGenome#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SpeciesGenome#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SpeciesGenome#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SpeciesGenome#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SpeciesGenome#Comments TO curator - GRANT SELECT ON dbo.SpeciesGenome#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SpeciesGenome#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SpeciesGenome#ExternalDBKey */ - -IF OBJECT_ID('dbo.SpeciesGenome#ExternalDBKey') IS NOT NULL -BEGIN - DROP TABLE dbo.SpeciesGenome#ExternalDBKey - IF OBJECT_ID('dbo.SpeciesGenome#ExternalDBKey') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SpeciesGenome#ExternalDBKey >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SpeciesGenome#ExternalDBKey >>>' -END -go - -CREATE TABLE dbo.SpeciesGenome#ExternalDBKey ( - SpeciesGenome id# NOT NULL, - DB id# NULL, - DBKey varchar(120) NULL -) -go - -IF OBJECT_ID('dbo.SpeciesGenome#ExternalDBKey') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SpeciesGenome#ExternalDBKey >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SpeciesGenome#ExternalDBKey >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SpeciesGenome#ExternalDBKey') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SpeciesGenome#ExternalDBKey TO curator - GRANT SELECT ON dbo.SpeciesGenome#ExternalDBKey TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SpeciesGenome#ExternalDBKey */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SpeciesGenome#ImageURL */ - -IF OBJECT_ID('dbo.SpeciesGenome#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.SpeciesGenome#ImageURL - IF OBJECT_ID('dbo.SpeciesGenome#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SpeciesGenome#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SpeciesGenome#ImageURL >>>' -END -go - -CREATE TABLE dbo.SpeciesGenome#ImageURL ( - SpeciesGenome id# NOT NULL, - URL_Suffix varchar(250) NULL, - Caption text NULL -) -go - -IF OBJECT_ID('dbo.SpeciesGenome#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SpeciesGenome#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SpeciesGenome#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SpeciesGenome#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SpeciesGenome#ImageURL TO curator - GRANT SELECT ON dbo.SpeciesGenome#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SpeciesGenome#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SpeciesGenome#MitochondrialG */ - -IF OBJECT_ID('dbo.SpeciesGenome#MitochondrialG') IS NOT NULL -BEGIN - DROP TABLE dbo.SpeciesGenome#MitochondrialG - IF OBJECT_ID('dbo.SpeciesGenome#MitochondrialG') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SpeciesGenome#MitochondrialG >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SpeciesGenome#MitochondrialG >>>' -END -go - -CREATE TABLE dbo.SpeciesGenome#MitochondrialG ( - SpeciesGenome id# NOT NULL, - G#ofLinkageGroups int NULL, - Size float(16) NULL, - G float(16) NULL, - Copynumbercomment varchar(255) NULL -) -go - -IF OBJECT_ID('dbo.SpeciesGenome#MitochondrialG') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SpeciesGenome#MitochondrialG >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SpeciesGenome#MitochondrialG >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SpeciesGenome#MitochondrialG') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SpeciesGenome#MitochondrialG TO curator - GRANT SELECT ON dbo.SpeciesGenome#MitochondrialG TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SpeciesGenome#MitochondrialG */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SpeciesGenome#NuclearGenome */ - -IF OBJECT_ID('dbo.SpeciesGenome#NuclearGenome') IS NOT NULL -BEGIN - DROP TABLE dbo.SpeciesGenome#NuclearGenome - IF OBJECT_ID('dbo.SpeciesGenome#NuclearGenome') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SpeciesGenome#NuclearGenome >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SpeciesGenome#NuclearGenome >>>' -END -go - -CREATE TABLE dbo.SpeciesGenome#NuclearGenome ( - SpeciesGenome id# NOT NULL, - Haploid# int NULL, - DNAContent varchar(120) NULL, - Supernumeraries text NULL -) -go - -IF OBJECT_ID('dbo.SpeciesGenome#NuclearGenome') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SpeciesGenome#NuclearGenome >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SpeciesGenome#NuclearGenome >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SpeciesGenome#NuclearGenome') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SpeciesGenome#NuclearGenome TO curator - GRANT SELECT ON dbo.SpeciesGenome#NuclearGenome TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SpeciesGenome#NuclearGenome */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SpeciesGenome#Synonyms */ - -IF OBJECT_ID('dbo.SpeciesGenome#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.SpeciesGenome#Synonyms - IF OBJECT_ID('dbo.SpeciesGenome#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SpeciesGenome#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SpeciesGenome#Synonyms >>>' -END -go - -CREATE TABLE dbo.SpeciesGenome#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NOT NULL, - Authority id# NULL -) -go - -IF OBJECT_ID('dbo.SpeciesGenome#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SpeciesGenome#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SpeciesGenome#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SpeciesGenome#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SpeciesGenome#Synonyms TO curator - GRANT SELECT ON dbo.SpeciesGenome#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SpeciesGenome#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SSRout */ - -IF OBJECT_ID('dbo.SSRout') IS NOT NULL -BEGIN - DROP TABLE dbo.SSRout - IF OBJECT_ID('dbo.SSRout') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SSRout >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SSRout >>>' -END -go - -CREATE TABLE dbo.SSRout ( - Bin money NULL, - Bin1 money NULL, - Locus id# NULL, - Locus1 id# NULL, - Probe id# NULL, - Forward id# NULL, - Reverse id# NULL, - BACanchor id# NULL, - Source id# NULL, - Bins char(20) NULL, - URL_Suffix varchar(40) NULL, - GenBank varchar(20) NULL, - LinkageGroup int NULL, - TIGR varchar(50) NULL -) -go - -IF OBJECT_ID('dbo.SSRout') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SSRout >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SSRout >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SSRout') IS NOT NULL -BEGIN - GRANT SELECT ON dbo.SSRout TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SSRout */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock */ - -IF OBJECT_ID('dbo.Stock') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock - IF OBJECT_ID('dbo.Stock') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock >>>' -END -go - -CREATE TABLE dbo.Stock ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Type id# NULL, - FocusLinkageGroup id# NULL, - AvailableFrom id# NULL, - Pedigree varchar(250) NULL, - Species id# NULL, - CropScienceStockClass id# NULL, - MarketClass id# NULL, - Comments varchar(10) NULL, - Developer id# NULL, - State_Province varchar(250) NULL, - Country varchar(250) NULL, - Year smallint NULL, - CoopID name NULL, - TypeN char(50) NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Stock') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock >>>' -go - -IF OBJECT_ID('dbo.Stock') IS NOT NULL - ALTER TABLE dbo.Stock PARTITION 2 -go - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock TO curator - GRANT SELECT ON dbo.Stock TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#CoefficientsofParentag */ - -IF OBJECT_ID('dbo.Stock#CoefficientsofParentag') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#CoefficientsofParentag - IF OBJECT_ID('dbo.Stock#CoefficientsofParentag') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#CoefficientsofParentag >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#CoefficientsofParentag >>>' -END -go - -CREATE TABLE dbo.Stock#CoefficientsofParentag ( - Stock id# NOT NULL, - Stock1 id# NULL, - G float(16) NULL -) -go - -IF OBJECT_ID('dbo.Stock#CoefficientsofParentag') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#CoefficientsofParentag >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#CoefficientsofParentag >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#CoefficientsofParentag') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#CoefficientsofParentag TO curator - GRANT SELECT ON dbo.Stock#CoefficientsofParentag TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#CoefficientsofParentag */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#Comments */ - -IF OBJECT_ID('dbo.Stock#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#Comments - IF OBJECT_ID('dbo.Stock#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#Comments >>>' -END -go - -CREATE TABLE dbo.Stock#Comments ( - Stock id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.Stock#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#Comments TO curator - GRANT SELECT ON dbo.Stock#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#Description */ - -IF OBJECT_ID('dbo.Stock#Description') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#Description - IF OBJECT_ID('dbo.Stock#Description') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#Description >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#Description >>>' -END -go - -CREATE TABLE dbo.Stock#Description ( - ID# id# NOT NULL, - Description varchar(80) NOT NULL -) -go - -IF OBJECT_ID('dbo.Stock#Description') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#Description >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#Description >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#Description') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#Description TO curator - GRANT SELECT ON dbo.Stock#Description TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#Description */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#ExternalDBKeys */ - -IF OBJECT_ID('dbo.Stock#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#ExternalDBKeys - IF OBJECT_ID('dbo.Stock#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#ExternalDBKeys >>>' -END -go - -CREATE TABLE dbo.Stock#ExternalDBKeys ( - Stock id# NOT NULL, - DB id# NOT NULL, - DBKey varchar(120) NOT NULL -) -go - -IF OBJECT_ID('dbo.Stock#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#ExternalDBKeys >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#ExternalDBKeys') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#ExternalDBKeys TO curator - GRANT SELECT ON dbo.Stock#ExternalDBKeys TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#ExternalDBKeys */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#GenotypicVariations */ - -IF OBJECT_ID('dbo.Stock#GenotypicVariations') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#GenotypicVariations - IF OBJECT_ID('dbo.Stock#GenotypicVariations') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#GenotypicVariations >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#GenotypicVariations >>>' -END -go - -CREATE TABLE dbo.Stock#GenotypicVariations ( - Stock id# NOT NULL, - Variation id# NULL, - Phase id# NULL, - Certainty tinyint NULL -) -go - -IF OBJECT_ID('dbo.Stock#GenotypicVariations') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#GenotypicVariations >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#GenotypicVariations >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#GenotypicVariations') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#GenotypicVariations TO curator - GRANT SELECT ON dbo.Stock#GenotypicVariations TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#GenotypicVariations */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#ImageURL */ - -IF OBJECT_ID('dbo.Stock#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#ImageURL - IF OBJECT_ID('dbo.Stock#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#ImageURL >>>' -END -go - -CREATE TABLE dbo.Stock#ImageURL ( - Stock id# NOT NULL, - URL_Suffix varchar(250) NULL, - Caption text NULL -) -go - -IF OBJECT_ID('dbo.Stock#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#ImageURL TO curator - GRANT SELECT ON dbo.Stock#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#KaryotypicVariations */ - -IF OBJECT_ID('dbo.Stock#KaryotypicVariations') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#KaryotypicVariations - IF OBJECT_ID('dbo.Stock#KaryotypicVariations') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#KaryotypicVariations >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#KaryotypicVariations >>>' -END -go - -CREATE TABLE dbo.Stock#KaryotypicVariations ( - Stock id# NOT NULL, - KaryotypicVariation id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Stock#KaryotypicVariations') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#KaryotypicVariations >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#KaryotypicVariations >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#KaryotypicVariations') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#KaryotypicVariations TO curator - GRANT SELECT ON dbo.Stock#KaryotypicVariations TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#KaryotypicVariations */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#MolecularVariations */ - -IF OBJECT_ID('dbo.Stock#MolecularVariations') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#MolecularVariations - IF OBJECT_ID('dbo.Stock#MolecularVariations') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#MolecularVariations >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#MolecularVariations >>>' -END -go - -CREATE TABLE dbo.Stock#MolecularVariations ( - Stock id# NOT NULL, - MolecularVariation id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Stock#MolecularVariations') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#MolecularVariations >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#MolecularVariations >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#MolecularVariations') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#MolecularVariations TO curator - GRANT SELECT ON dbo.Stock#MolecularVariations TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#MolecularVariations */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#Phenotypes */ - -IF OBJECT_ID('dbo.Stock#Phenotypes') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#Phenotypes - IF OBJECT_ID('dbo.Stock#Phenotypes') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#Phenotypes >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#Phenotypes >>>' -END -go - -CREATE TABLE dbo.Stock#Phenotypes ( - Stock id# NOT NULL, - Phenotype id# NULL, - Attributableto id# NULL -) -go - -IF OBJECT_ID('dbo.Stock#Phenotypes') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#Phenotypes >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#Phenotypes >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#Phenotypes') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#Phenotypes TO curator - GRANT SELECT ON dbo.Stock#Phenotypes TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#Phenotypes */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock#Synonyms */ - -IF OBJECT_ID('dbo.Stock#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock#Synonyms - IF OBJECT_ID('dbo.Stock#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock#Synonyms >>>' -END -go - -CREATE TABLE dbo.Stock#Synonyms ( - ID# int NOT NULL, - Synonym varchar(120) NULL, - Authority int NULL -) -go - -IF OBJECT_ID('dbo.Stock#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock#Synonyms TO curator - GRANT SELECT ON dbo.Stock#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stock_PanelofStocks */ - -IF OBJECT_ID('dbo.Stock_PanelofStocks') IS NOT NULL -BEGIN - DROP TABLE dbo.Stock_PanelofStocks - IF OBJECT_ID('dbo.Stock_PanelofStocks') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stock_PanelofStocks >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stock_PanelofStocks >>>' -END -go - -CREATE TABLE dbo.Stock_PanelofStocks ( - Stock id# NOT NULL, - PanelofStocks id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Stock_PanelofStocks') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stock_PanelofStocks >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stock_PanelofStocks >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stock_PanelofStocks') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stock_PanelofStocks TO curator - GRANT SELECT ON dbo.Stock_PanelofStocks TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stock_PanelofStocks */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.stocklist */ - -IF OBJECT_ID('dbo.stocklist') IS NOT NULL -BEGIN - DROP TABLE dbo.stocklist - IF OBJECT_ID('dbo.stocklist') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.stocklist >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.stocklist >>>' -END -go - -CREATE TABLE dbo.stocklist ( - id id# NOT NULL, - stock_name varchar(60) NOT NULL, - stock_synonym varchar(60) NULL, - stock_type varchar(30) NULL, - stock_description varchar(80) NULL -) -go - -IF OBJECT_ID('dbo.stocklist') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.stocklist >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.stocklist >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.stocklist') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.stocklist TO curator - GRANT SELECT ON dbo.stocklist TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.stocklist */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Stocks#PhenotypeOnly */ - -IF OBJECT_ID('dbo.Stocks#PhenotypeOnly') IS NOT NULL -BEGIN - DROP TABLE dbo.Stocks#PhenotypeOnly - IF OBJECT_ID('dbo.Stocks#PhenotypeOnly') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Stocks#PhenotypeOnly >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Stocks#PhenotypeOnly >>>' -END -go - -CREATE TABLE dbo.Stocks#PhenotypeOnly ( - Stock id# NULL, - Phenotype id# NULL, - Variation id# NULL, - BodyPart id# NULL, - BodyPart1 id# NULL -) -go - -IF OBJECT_ID('dbo.Stocks#PhenotypeOnly') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Stocks#PhenotypeOnly >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Stocks#PhenotypeOnly >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Stocks#PhenotypeOnly') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Stocks#PhenotypeOnly TO curator - GRANT SELECT ON dbo.Stocks#PhenotypeOnly TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Stocks#PhenotypeOnly */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.syn_tmp */ - -IF OBJECT_ID('dbo.syn_tmp') IS NOT NULL -BEGIN - DROP TABLE dbo.syn_tmp - IF OBJECT_ID('dbo.syn_tmp') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.syn_tmp >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.syn_tmp >>>' -END -go - -CREATE TABLE dbo.syn_tmp ( - ID# id# NOT NULL, - Synonym varchar(120) NULL, - Authority id# NULL, - JumpURL varchar(255) NULL -) -go - -IF OBJECT_ID('dbo.syn_tmp') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.syn_tmp >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.syn_tmp >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.syn_tmp */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Synonyms */ - -IF OBJECT_ID('dbo.Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Synonyms - IF OBJECT_ID('dbo.Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Synonyms >>>' -END -go - -CREATE TABLE dbo.Synonyms ( - ID# id# NOT NULL, - Name name NOT NULL, - Type int NOT NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Synonyms TO curator - GRANT SELECT ON dbo.Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysFieldIDs */ - -IF OBJECT_ID('dbo.SysFieldIDs') IS NOT NULL -BEGIN - DROP TABLE dbo.SysFieldIDs - IF OBJECT_ID('dbo.SysFieldIDs') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysFieldIDs >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysFieldIDs >>>' -END -go - -CREATE TABLE dbo.SysFieldIDs ( - ID# id# NOT NULL, - Entity id# NOT NULL, - FormFieldID id# NOT NULL -) -go - -IF OBJECT_ID('dbo.SysFieldIDs') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysFieldIDs >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysFieldIDs >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysFieldIDs') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysFieldIDs TO curator - GRANT SELECT ON dbo.SysFieldIDs TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysFieldIDs */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysFieldPartners */ - -IF OBJECT_ID('dbo.SysFieldPartners') IS NOT NULL -BEGIN - DROP TABLE dbo.SysFieldPartners - IF OBJECT_ID('dbo.SysFieldPartners') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysFieldPartners >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysFieldPartners >>>' -END -go - -CREATE TABLE dbo.SysFieldPartners ( - Entity id# NOT NULL, - Field id# NOT NULL, - Name name NOT NULL, - Partner id# NOT NULL, - Range int NULL, - Subtype int NULL, - Restriction comment NULL, - Readonly bit0 NOT NULL, - FieldID int NULL -) -go - -IF OBJECT_ID('dbo.SysFieldPartners') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysFieldPartners >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysFieldPartners >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysFieldPartners') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysFieldPartners TO curator - GRANT SELECT ON dbo.SysFieldPartners TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysFieldPartners */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysFloatModulus */ - -IF OBJECT_ID('dbo.SysFloatModulus') IS NOT NULL -BEGIN - DROP TABLE dbo.SysFloatModulus - IF OBJECT_ID('dbo.SysFloatModulus') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysFloatModulus >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysFloatModulus >>>' -END -go - -CREATE TABLE dbo.SysFloatModulus ( - FormName varchar(30) NOT NULL, - FieldName varchar(30) NOT NULL, - Modulus float(16) NOT NULL -) -go - -IF OBJECT_ID('dbo.SysFloatModulus') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysFloatModulus >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysFloatModulus >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysFloatModulus') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysFloatModulus TO curator - GRANT SELECT ON dbo.SysFloatModulus TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysFloatModulus */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysFormConstants */ - -IF OBJECT_ID('dbo.SysFormConstants') IS NOT NULL -BEGIN - DROP TABLE dbo.SysFormConstants - IF OBJECT_ID('dbo.SysFormConstants') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysFormConstants >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysFormConstants >>>' -END -go - -CREATE TABLE dbo.SysFormConstants ( - FormName varchar(30) NOT NULL, - TableName varchar(30) NOT NULL, - FormColumn varchar(30) NOT NULL, - FormValue varchar(30) NOT NULL -) -go - -IF OBJECT_ID('dbo.SysFormConstants') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysFormConstants >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysFormConstants >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysFormConstants') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysFormConstants TO curator - GRANT SELECT ON dbo.SysFormConstants TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysFormConstants */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysFormGroups */ - -IF OBJECT_ID('dbo.SysFormGroups') IS NOT NULL -BEGIN - DROP TABLE dbo.SysFormGroups - IF OBJECT_ID('dbo.SysFormGroups') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysFormGroups >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysFormGroups >>>' -END -go - -CREATE TABLE dbo.SysFormGroups ( - Entity id# NOT NULL, - ID# id# NOT NULL, - Name name NOT NULL, - Depth tinyint NOT NULL, - OrdField name NULL -) -go - -IF OBJECT_ID('dbo.SysFormGroups') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysFormGroups >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysFormGroups >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysFormGroups') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysFormGroups TO curator - GRANT SELECT ON dbo.SysFormGroups TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysFormGroups */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysJoins */ - -IF OBJECT_ID('dbo.SysJoins') IS NOT NULL -BEGIN - DROP TABLE dbo.SysJoins - IF OBJECT_ID('dbo.SysJoins') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysJoins >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysJoins >>>' -END -go - -CREATE TABLE dbo.SysJoins ( - MainTable varchar(30) NOT NULL, - MainKey varchar(30) NOT NULL, - SubTable varchar(30) NOT NULL, - SubKey varchar(30) NOT NULL -) -go - -IF OBJECT_ID('dbo.SysJoins') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysJoins >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysJoins >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysJoins') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysJoins TO curator - GRANT SELECT ON dbo.SysJoins TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysJoins */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysNextID */ - -IF OBJECT_ID('dbo.SysNextID') IS NOT NULL -BEGIN - DROP TABLE dbo.SysNextID - IF OBJECT_ID('dbo.SysNextID') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysNextID >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysNextID >>>' -END -go - -CREATE TABLE dbo.SysNextID ( - Type name NOT NULL, - ID# id# NOT NULL -) -go - -IF OBJECT_ID('dbo.SysNextID') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysNextID >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysNextID >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysNextID') IS NOT NULL -BEGIN - GRANT UPDATE ON dbo.SysNextID TO code - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysNextID TO curator - GRANT SELECT ON dbo.SysNextID TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysNextID */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysNextKey */ - -IF OBJECT_ID('dbo.SysNextKey') IS NOT NULL -BEGIN - DROP TABLE dbo.SysNextKey - IF OBJECT_ID('dbo.SysNextKey') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysNextKey >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysNextKey >>>' -END -go - -CREATE TABLE dbo.SysNextKey ( - ID# int NOT NULL -) -go - -IF OBJECT_ID('dbo.SysNextKey') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysNextKey >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysNextKey >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysNextKey') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysNextKey TO curator - GRANT SELECT ON dbo.SysNextKey TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysNextKey */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysObjectTables */ - -IF OBJECT_ID('dbo.SysObjectTables') IS NOT NULL -BEGIN - DROP TABLE dbo.SysObjectTables - IF OBJECT_ID('dbo.SysObjectTables') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysObjectTables >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysObjectTables >>>' -END -go - -CREATE TABLE dbo.SysObjectTables ( - ID# id# NOT NULL, - Name name NOT NULL, - TableName name NOT NULL, - IDField name NOT NULL, - NameField name NOT NULL -) -go - -IF OBJECT_ID('dbo.SysObjectTables') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysObjectTables >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysObjectTables >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysObjectTables') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysObjectTables TO curator - GRANT SELECT ON dbo.SysObjectTables TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysObjectTables */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysQueryInfo */ - -IF OBJECT_ID('dbo.SysQueryInfo') IS NOT NULL -BEGIN - DROP TABLE dbo.SysQueryInfo - IF OBJECT_ID('dbo.SysQueryInfo') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysQueryInfo >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysQueryInfo >>>' -END -go - -CREATE TABLE dbo.SysQueryInfo ( - Type name NOT NULL, - Description comment NULL, - FromList comment NULL, - KeyID comment NULL, - WhereClause comment NULL, - OrderBy comment NULL -) -go - -IF OBJECT_ID('dbo.SysQueryInfo') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysQueryInfo >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysQueryInfo >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysQueryInfo') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysQueryInfo TO curator - GRANT SELECT ON dbo.SysQueryInfo TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysQueryInfo */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysSubgroups */ - -IF OBJECT_ID('dbo.SysSubgroups') IS NOT NULL -BEGIN - DROP TABLE dbo.SysSubgroups - IF OBJECT_ID('dbo.SysSubgroups') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysSubgroups >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysSubgroups >>>' -END -go - -CREATE TABLE dbo.SysSubgroups ( - Form varchar(30) NOT NULL, - Root varchar(30) NOT NULL, - GroupName varchar(30) NOT NULL, - Number int NOT NULL -) -go - -IF OBJECT_ID('dbo.SysSubgroups') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysSubgroups >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysSubgroups >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysSubgroups') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysSubgroups TO curator - GRANT SELECT ON dbo.SysSubgroups TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysSubgroups */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.SysSubtype */ - -IF OBJECT_ID('dbo.SysSubtype') IS NOT NULL -BEGIN - DROP TABLE dbo.SysSubtype - IF OBJECT_ID('dbo.SysSubtype') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.SysSubtype >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.SysSubtype >>>' -END -go - -CREATE TABLE dbo.SysSubtype ( - ID# id# NOT NULL -) -go - -IF OBJECT_ID('dbo.SysSubtype') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.SysSubtype >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.SysSubtype >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.SysSubtype') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.SysSubtype TO curator - GRANT SELECT ON dbo.SysSubtype TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.SysSubtype */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Table1 */ - -IF OBJECT_ID('dbo.Table1') IS NOT NULL -BEGIN - DROP TABLE dbo.Table1 - IF OBJECT_ID('dbo.Table1') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Table1 >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Table1 >>>' -END -go - -CREATE TABLE dbo.Table1 ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Readonly tinyint NULL -) -go - -IF OBJECT_ID('dbo.Table1') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Table1 >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Table1 >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Table1') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Table1 TO curator - GRANT SELECT ON dbo.Table1 TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Table1 */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TC#Links */ - -IF OBJECT_ID('dbo.TC#Links') IS NOT NULL -BEGIN - DROP TABLE dbo.TC#Links - IF OBJECT_ID('dbo.TC#Links') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TC#Links >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TC#Links >>>' -END -go - -CREATE TABLE dbo.TC#Links ( - Sup id# NOT NULL, - Sub id# NOT NULL -) -go - -IF OBJECT_ID('dbo.TC#Links') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TC#Links >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TC#Links >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.TC#Links') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.TC#Links TO curator - GRANT SELECT ON dbo.TC#Links TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TC#Links */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TC#Roots */ - -IF OBJECT_ID('dbo.TC#Roots') IS NOT NULL -BEGIN - DROP TABLE dbo.TC#Roots - IF OBJECT_ID('dbo.TC#Roots') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TC#Roots >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TC#Roots >>>' -END -go - -CREATE TABLE dbo.TC#Roots ( - ID# id# NOT NULL -) -go - -IF OBJECT_ID('dbo.TC#Roots') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TC#Roots >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TC#Roots >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.TC#Roots') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.TC#Roots TO curator - GRANT SELECT ON dbo.TC#Roots TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TC#Roots */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term */ - -IF OBJECT_ID('dbo.Term') IS NOT NULL -BEGIN - DROP TABLE dbo.Term - IF OBJECT_ID('dbo.Term') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term >>>' -END -go - -CREATE TABLE dbo.Term ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL, - Type id# NULL, - Comments text NULL -) -go - -IF OBJECT_ID('dbo.Term') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Term') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Term TO curator - GRANT SELECT ON dbo.Term TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term#Description */ - -IF OBJECT_ID('dbo.Term#Description') IS NOT NULL -BEGIN - DROP TABLE dbo.Term#Description - IF OBJECT_ID('dbo.Term#Description') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term#Description >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term#Description >>>' -END -go - -CREATE TABLE dbo.Term#Description ( - Term id# NOT NULL, - Description name NOT NULL -) -go - -IF OBJECT_ID('dbo.Term#Description') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term#Description >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term#Description >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Term#Description') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Term#Description TO curator - GRANT SELECT ON dbo.Term#Description TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term#Description */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term#ExternalDBKeys */ - -IF OBJECT_ID('dbo.Term#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.Term#ExternalDBKeys - IF OBJECT_ID('dbo.Term#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term#ExternalDBKeys >>>' -END -go - -CREATE TABLE dbo.Term#ExternalDBKeys ( - Term id# NOT NULL, - DB id# NOT NULL, - DBKey varchar(120) NOT NULL, - Comment varchar(150) NULL -) -go - -IF OBJECT_ID('dbo.Term#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term#ExternalDBKeys >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Term#ExternalDBKeys') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Term#ExternalDBKeys TO curator - GRANT SELECT ON dbo.Term#ExternalDBKeys TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term#ExternalDBKeys */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term#ImageURL */ - -IF OBJECT_ID('dbo.Term#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.Term#ImageURL - IF OBJECT_ID('dbo.Term#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term#ImageURL >>>' -END -go - -CREATE TABLE dbo.Term#ImageURL ( - Term id# NOT NULL, - URL_Suffix varchar(250) NULL, - Caption text NULL -) -go - -IF OBJECT_ID('dbo.Term#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Term#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Term#ImageURL TO curator - GRANT SELECT ON dbo.Term#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.term#invs */ - -IF OBJECT_ID('dbo.term#invs') IS NOT NULL -BEGIN - DROP TABLE dbo.term#invs - IF OBJECT_ID('dbo.term#invs') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.term#invs >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.term#invs >>>' -END -go - -CREATE TABLE dbo.term#invs ( - CV name NOT NULL, - A name NOT NULL, - B name NOT NULL, - CV# int NULL, - A# int NULL, - B# int NULL -) -go - -IF OBJECT_ID('dbo.term#invs') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.term#invs >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.term#invs >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.term#invs') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.term#invs TO curator - GRANT SELECT ON dbo.term#invs TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.term#invs */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term#RelatedTerms */ - -IF OBJECT_ID('dbo.Term#RelatedTerms') IS NOT NULL -BEGIN - DROP TABLE dbo.Term#RelatedTerms - IF OBJECT_ID('dbo.Term#RelatedTerms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term#RelatedTerms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term#RelatedTerms >>>' -END -go - -CREATE TABLE dbo.Term#RelatedTerms ( - Term id# NOT NULL, - Relation id# NULL, - Term1 id# NULL -) -go - -IF OBJECT_ID('dbo.Term#RelatedTerms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term#RelatedTerms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term#RelatedTerms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Term#RelatedTerms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Term#RelatedTerms TO curator - GRANT SELECT ON dbo.Term#RelatedTerms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term#RelatedTerms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.term#renum */ - -IF OBJECT_ID('dbo.term#renum') IS NOT NULL -BEGIN - DROP TABLE dbo.term#renum - IF OBJECT_ID('dbo.term#renum') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.term#renum >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.term#renum >>>' -END -go - -CREATE TABLE dbo.term#renum ( - Old id# NOT NULL, - New id# NOT NULL -) -go - -IF OBJECT_ID('dbo.term#renum') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.term#renum >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.term#renum >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.term#renum') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.term#renum TO curator - GRANT SELECT ON dbo.term#renum TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.term#renum */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term#Synonyms */ - -IF OBJECT_ID('dbo.Term#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Term#Synonyms - IF OBJECT_ID('dbo.Term#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term#Synonyms >>>' -END -go - -CREATE TABLE dbo.Term#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NOT NULL, - Authority id# NULL -) -go - -IF OBJECT_ID('dbo.Term#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Term#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Term#Synonyms TO curator - GRANT SELECT ON dbo.Term#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term#Synonyms */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term#TC */ - -IF OBJECT_ID('dbo.Term#TC') IS NOT NULL -BEGIN - DROP TABLE dbo.Term#TC - IF OBJECT_ID('dbo.Term#TC') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term#TC >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term#TC >>>' -END -go - -CREATE TABLE dbo.Term#TC ( - Sup id# NOT NULL, - Sub id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Term#TC') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term#TC >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term#TC >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Term#TC') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Term#TC TO curator - GRANT SELECT ON dbo.Term#TC TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term#TC */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term_Comments */ - -IF OBJECT_ID('dbo.Term_Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Term_Comments - IF OBJECT_ID('dbo.Term_Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term_Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term_Comments >>>' -END -go - -CREATE TABLE dbo.Term_Comments ( - Term id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.Term_Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term_Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term_Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Term_Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Term_Comments TO curator - GRANT SELECT ON dbo.Term_Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term_Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term_Description */ - -IF OBJECT_ID('dbo.Term_Description') IS NOT NULL -BEGIN - DROP TABLE dbo.Term_Description - IF OBJECT_ID('dbo.Term_Description') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term_Description >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term_Description >>>' -END -go - -CREATE TABLE dbo.Term_Description ( - Term id# NOT NULL, - Description name NOT NULL -) -go - -IF OBJECT_ID('dbo.Term_Description') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term_Description >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term_Description >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term_Description */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Term_TC */ - -IF OBJECT_ID('dbo.Term_TC') IS NOT NULL -BEGIN - DROP TABLE dbo.Term_TC - IF OBJECT_ID('dbo.Term_TC') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Term_TC >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Term_TC >>>' -END -go - -CREATE TABLE dbo.Term_TC ( - Sup id# NOT NULL, - Sub id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Term_TC') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Term_TC >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Term_TC >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Term_TC */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TermSyns */ - -IF OBJECT_ID('dbo.TermSyns') IS NOT NULL -BEGIN - DROP TABLE dbo.TermSyns - IF OBJECT_ID('dbo.TermSyns') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TermSyns >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TermSyns >>>' -END -go - -CREATE TABLE dbo.TermSyns ( - ID# id# NOT NULL, - Synonym varchar(120) NULL, - Authority id# NULL -) -go - -IF OBJECT_ID('dbo.TermSyns') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TermSyns >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TermSyns >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TermSyns */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TermSynsHold */ - -IF OBJECT_ID('dbo.TermSynsHold') IS NOT NULL -BEGIN - DROP TABLE dbo.TermSynsHold - IF OBJECT_ID('dbo.TermSynsHold') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TermSynsHold >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TermSynsHold >>>' -END -go - -CREATE TABLE dbo.TermSynsHold ( - ID# id# NOT NULL, - Synonym varchar(120) NULL, - Authority id# NULL -) -go - -IF OBJECT_ID('dbo.TermSynsHold') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TermSynsHold >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TermSynsHold >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TermSynsHold */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.text_events */ - -IF OBJECT_ID('dbo.text_events') IS NOT NULL -BEGIN - DROP TABLE dbo.text_events - IF OBJECT_ID('dbo.text_events') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.text_events >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.text_events >>>' -END -go - -CREATE TABLE dbo.text_events ( - event_id numeric(10,0) IDENTITY, - id numeric(38,0) NOT NULL, - tableid int NOT NULL, - ownerid smallint NOT NULL, - columnid tinyint NOT NULL, - event_date datetime NOT NULL, - event_type tinyint NOT NULL, - event_status tinyint NOT NULL, - srvid smallint NOT NULL -) -go - -IF OBJECT_ID('dbo.text_events') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.text_events >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.text_events >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.text_events') IS NOT NULL -BEGIN - GRANT SELECT ON dbo.text_events TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.text_events */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.tmptable */ - -IF OBJECT_ID('dbo.tmptable') IS NOT NULL -BEGIN - DROP TABLE dbo.tmptable - IF OBJECT_ID('dbo.tmptable') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.tmptable >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.tmptable >>>' -END -go - -CREATE TABLE dbo.tmptable ( - ID# id# NOT NULL, - Name varchar(120) NOT NULL -) -go - -IF OBJECT_ID('dbo.tmptable') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.tmptable >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.tmptable >>>' -go - - -/* Add permissions for table... */ -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.tmptable */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TraitEvaluationSummary */ - -IF OBJECT_ID('dbo.TraitEvaluationSummary') IS NOT NULL -BEGIN - DROP TABLE dbo.TraitEvaluationSummary - IF OBJECT_ID('dbo.TraitEvaluationSummary') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TraitEvaluationSummary >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TraitEvaluationSummary >>>' -END -go - -CREATE TABLE dbo.TraitEvaluationSummary ( - ID# int NOT NULL, - Name varchar(255) NOT NULL, - QTLExperiment int NULL, - Trait int NULL, - TraitEvaluationMethod text NULL, - Experimentaldesign text NULL, - Environment int NULL, - Heritability float(16) NULL, - Traitscoresformat text NULL, - Traitscores text NULL -) -go - -IF OBJECT_ID('dbo.TraitEvaluationSummary') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TraitEvaluationSummary >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TraitEvaluationSummary >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.TraitEvaluationSummary') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.TraitEvaluationSummary TO curator - GRANT SELECT ON dbo.TraitEvaluationSummary TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TraitEvaluationSummary */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TraitEvaluationSummary#ANOVA */ - -IF OBJECT_ID('dbo.TraitEvaluationSummary#ANOVA') IS NOT NULL -BEGIN - DROP TABLE dbo.TraitEvaluationSummary#ANOVA - IF OBJECT_ID('dbo.TraitEvaluationSummary#ANOVA') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TraitEvaluationSummary#ANOVA >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TraitEvaluationSummary#ANOVA >>>' -END -go - -CREATE TABLE dbo.TraitEvaluationSummary#ANOVA ( - TraitEvaluationSummary int NOT NULL, - Source text NULL, - df float(16) NULL, - Meansquare float(16) NULL, - F float(16) NULL, - p varchar(255) NULL -) -go - -IF OBJECT_ID('dbo.TraitEvaluationSummary#ANOVA') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TraitEvaluationSummary#ANOVA >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TraitEvaluationSummary#ANOVA >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.TraitEvaluationSummary#ANOVA') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.TraitEvaluationSummary#ANOVA TO curator - GRANT SELECT ON dbo.TraitEvaluationSummary#ANOVA TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TraitEvaluationSummary#ANOVA */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TraitEvaluationSummary#Comment */ - -IF OBJECT_ID('dbo.TraitEvaluationSummary#Comment') IS NOT NULL -BEGIN - DROP TABLE dbo.TraitEvaluationSummary#Comment - IF OBJECT_ID('dbo.TraitEvaluationSummary#Comment') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TraitEvaluationSummary#Comment >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TraitEvaluationSummary#Comment >>>' -END -go - -CREATE TABLE dbo.TraitEvaluationSummary#Comment ( - TraitEvaluationSummary int NOT NULL, - Type int NULL, - Comment text NULL -) -go - -IF OBJECT_ID('dbo.TraitEvaluationSummary#Comment') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TraitEvaluationSummary#Comment >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TraitEvaluationSummary#Comment >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.TraitEvaluationSummary#Comment') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.TraitEvaluationSummary#Comment TO curator - GRANT SELECT ON dbo.TraitEvaluationSummary#Comment TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TraitEvaluationSummary#Comment */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TraitEvaluationSummary#Linkage */ - -IF OBJECT_ID('dbo.TraitEvaluationSummary#Linkage') IS NOT NULL -BEGIN - DROP TABLE dbo.TraitEvaluationSummary#Linkage - IF OBJECT_ID('dbo.TraitEvaluationSummary#Linkage') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TraitEvaluationSummary#Linkage >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TraitEvaluationSummary#Linkage >>>' -END -go - -CREATE TABLE dbo.TraitEvaluationSummary#Linkage ( - TraitEvaluationSummary int NOT NULL, - LinkageAnalysis int NOT NULL -) -go - -IF OBJECT_ID('dbo.TraitEvaluationSummary#Linkage') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TraitEvaluationSummary#Linkage >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TraitEvaluationSummary#Linkage >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.TraitEvaluationSummary#Linkage') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.TraitEvaluationSummary#Linkage TO curator - GRANT SELECT ON dbo.TraitEvaluationSummary#Linkage TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TraitEvaluationSummary#Linkage */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TraitEvaluationSummary#Parenta */ - -IF OBJECT_ID('dbo.TraitEvaluationSummary#Parenta') IS NOT NULL -BEGIN - DROP TABLE dbo.TraitEvaluationSummary#Parenta - IF OBJECT_ID('dbo.TraitEvaluationSummary#Parenta') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TraitEvaluationSummary#Parenta >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TraitEvaluationSummary#Parenta >>>' -END -go - -CREATE TABLE dbo.TraitEvaluationSummary#Parenta ( - TraitEvaluationSummary int NOT NULL, - Parent int NULL, - Mean float(16) NULL, - Stderror float(16) NULL -) -go - -IF OBJECT_ID('dbo.TraitEvaluationSummary#Parenta') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TraitEvaluationSummary#Parenta >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TraitEvaluationSummary#Parenta >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.TraitEvaluationSummary#Parenta') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.TraitEvaluationSummary#Parenta TO curator - GRANT SELECT ON dbo.TraitEvaluationSummary#Parenta TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TraitEvaluationSummary#Parenta */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.TraitEvaluationSummary#Progeny */ - -IF OBJECT_ID('dbo.TraitEvaluationSummary#Progeny') IS NOT NULL -BEGIN - DROP TABLE dbo.TraitEvaluationSummary#Progeny - IF OBJECT_ID('dbo.TraitEvaluationSummary#Progeny') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.TraitEvaluationSummary#Progeny >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.TraitEvaluationSummary#Progeny >>>' -END -go - -CREATE TABLE dbo.TraitEvaluationSummary#Progeny ( - TraitEvaluationSummary int NOT NULL, - Progeny text NULL, - Mean float(16) NULL, - StdError float(16) NULL, - Skewness float(16) NULL, - Kurtosis float(16) NULL -) -go - -IF OBJECT_ID('dbo.TraitEvaluationSummary#Progeny') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.TraitEvaluationSummary#Progeny >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.TraitEvaluationSummary#Progeny >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.TraitEvaluationSummary#Progeny') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.TraitEvaluationSummary#Progeny TO curator - GRANT SELECT ON dbo.TraitEvaluationSummary#Progeny TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.TraitEvaluationSummary#Progeny */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation */ - -IF OBJECT_ID('dbo.Variation') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation - IF OBJECT_ID('dbo.Variation') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation >>>' -END -go - -CREATE TABLE dbo.Variation ( - ID# id# NOT NULL, - Name varchar(120) NULL, - Type id# NULL, - VariationOf id# NULL, - At1 id# NULL, - Viability id# NULL, - ProgenitorStock id# NULL, - Mapcode float(16) NULL, - Species id# NULL, - Dominance id# NULL, - AlleleDescriptor varchar(100) NULL, - Inbred id# NULL -) -LOCK DATAROWS -go - -IF OBJECT_ID('dbo.Variation') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation >>>' -go - -IF OBJECT_ID('dbo.Variation') IS NOT NULL - ALTER TABLE dbo.Variation PARTITION 2 -go - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation TO curator - GRANT SELECT ON dbo.Variation TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#Comments */ - -IF OBJECT_ID('dbo.Variation#Comments') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#Comments - IF OBJECT_ID('dbo.Variation#Comments') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#Comments >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#Comments >>>' -END -go - -CREATE TABLE dbo.Variation#Comments ( - Variation id# NOT NULL, - Type id# NULL, - Comment text NOT NULL -) -go - -IF OBJECT_ID('dbo.Variation#Comments') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#Comments >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#Comments >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#Comments') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#Comments TO curator - GRANT SELECT ON dbo.Variation#Comments TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#Comments */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#ExternalDBKeys */ - -IF OBJECT_ID('dbo.Variation#ExternalDBKeys') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#ExternalDBKeys - IF OBJECT_ID('dbo.Variation#ExternalDBKeys') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#ExternalDBKeys >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#ExternalDBKeys >>>' -END -go - -CREATE TABLE dbo.Variation#ExternalDBKeys ( - Variation id# NOT NULL, - DB id# NOT NULL, - DBKey varchar(120) NOT NULL, - Comment varchar(150) NULL -) -go - -IF OBJECT_ID('dbo.Variation#ExternalDBKeys') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#ExternalDBKeys >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#ExternalDBKeys >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#ExternalDBKeys') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#ExternalDBKeys TO curator - GRANT SELECT ON dbo.Variation#ExternalDBKeys TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#ExternalDBKeys */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#ImageURL */ - -IF OBJECT_ID('dbo.Variation#ImageURL') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#ImageURL - IF OBJECT_ID('dbo.Variation#ImageURL') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#ImageURL >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#ImageURL >>>' -END -go - -CREATE TABLE dbo.Variation#ImageURL ( - Variation id# NOT NULL, - URL_Suffix varchar(250) NULL, - Caption text NULL -) -go - -IF OBJECT_ID('dbo.Variation#ImageURL') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#ImageURL >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#ImageURL >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#ImageURL') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#ImageURL TO curator - GRANT SELECT ON dbo.Variation#ImageURL TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#ImageURL */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#Links */ - -IF OBJECT_ID('dbo.Variation#Links') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#Links - IF OBJECT_ID('dbo.Variation#Links') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#Links >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#Links >>>' -END -go - -CREATE TABLE dbo.Variation#Links ( - Variation id# NULL, - LocusFullName varchar(100) NULL, - Phenotype id# NULL, - Entrez varchar(30) NULL, - Image varchar(50) NULL, - Bin money NULL, - Bin1 money NULL, - Bins varchar(30) NULL -) -go - -IF OBJECT_ID('dbo.Variation#Links') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#Links >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#Links >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#Links') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#Links TO curator - GRANT SELECT ON dbo.Variation#Links TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#Links */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#Mutagen */ - -IF OBJECT_ID('dbo.Variation#Mutagen') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#Mutagen - IF OBJECT_ID('dbo.Variation#Mutagen') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#Mutagen >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#Mutagen >>>' -END -go - -CREATE TABLE dbo.Variation#Mutagen ( - Variation id# NOT NULL, - Mutagen id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Variation#Mutagen') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#Mutagen >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#Mutagen >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#Mutagen') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#Mutagen TO curator - GRANT SELECT ON dbo.Variation#Mutagen TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#Mutagen */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#MutationType */ - -IF OBJECT_ID('dbo.Variation#MutationType') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#MutationType - IF OBJECT_ID('dbo.Variation#MutationType') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#MutationType >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#MutationType >>>' -END -go - -CREATE TABLE dbo.Variation#MutationType ( - Variation id# NOT NULL, - MutationType id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Variation#MutationType') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#MutationType >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#MutationType >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#MutationType') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#MutationType TO curator - GRANT SELECT ON dbo.Variation#MutationType TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#MutationType */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#PhenotypicEffects */ - -IF OBJECT_ID('dbo.Variation#PhenotypicEffects') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#PhenotypicEffects - IF OBJECT_ID('dbo.Variation#PhenotypicEffects') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#PhenotypicEffects >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#PhenotypicEffects >>>' -END -go - -CREATE TABLE dbo.Variation#PhenotypicEffects ( - Variation id# NOT NULL, - PhenotypicEffect id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Variation#PhenotypicEffects') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#PhenotypicEffects >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#PhenotypicEffects >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#PhenotypicEffects') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#PhenotypicEffects TO curator - GRANT SELECT ON dbo.Variation#PhenotypicEffects TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#PhenotypicEffects */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#Point */ - -IF OBJECT_ID('dbo.Variation#Point') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#Point - IF OBJECT_ID('dbo.Variation#Point') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#Point >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#Point >>>' -END -go - -CREATE TABLE dbo.Variation#Point ( - Variation id# NOT NULL, - Point id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Variation#Point') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#Point >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#Point >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#Point') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#Point TO curator - GRANT SELECT ON dbo.Variation#Point TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#Point */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#Properties */ - -IF OBJECT_ID('dbo.Variation#Properties') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#Properties - IF OBJECT_ID('dbo.Variation#Properties') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#Properties >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#Properties >>>' -END -go - -CREATE TABLE dbo.Variation#Properties ( - Variation id# NOT NULL, - Property id# NOT NULL -) -go - -IF OBJECT_ID('dbo.Variation#Properties') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#Properties >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#Properties >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#Properties') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#Properties TO curator - GRANT SELECT ON dbo.Variation#Properties TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#Properties */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#RelatedAlleles */ - -IF OBJECT_ID('dbo.Variation#RelatedAlleles') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#RelatedAlleles - IF OBJECT_ID('dbo.Variation#RelatedAlleles') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#RelatedAlleles >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#RelatedAlleles >>>' -END -go - -CREATE TABLE dbo.Variation#RelatedAlleles ( - Variation id# NOT NULL, - Relation id# NULL, - Allele id# NULL -) -go - -IF OBJECT_ID('dbo.Variation#RelatedAlleles') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#RelatedAlleles >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#RelatedAlleles >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#RelatedAlleles') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#RelatedAlleles TO curator - GRANT SELECT ON dbo.Variation#RelatedAlleles TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#RelatedAlleles */ - - -setuser 'dbo' -go - -/* Start of description of table dbo.Variation#Synonyms */ - -IF OBJECT_ID('dbo.Variation#Synonyms') IS NOT NULL -BEGIN - DROP TABLE dbo.Variation#Synonyms - IF OBJECT_ID('dbo.Variation#Synonyms') IS NOT NULL - PRINT '<<< FAILED TO DROP dbo.Variation#Synonyms >>>' - ELSE - PRINT '<<< DROPPED TABLE dbo.Variation#Synonyms >>>' -END -go - -CREATE TABLE dbo.Variation#Synonyms ( - ID# id# NOT NULL, - Synonym varchar(120) NOT NULL, - Authority id# NULL -) -go - -IF OBJECT_ID('dbo.Variation#Synonyms') IS NOT NULL - PRINT '<<< CREATED TABLE dbo.Variation#Synonyms >>>' -ELSE - PRINT '<<< FAILED TO CREATE TABLE dbo.Variation#Synonyms >>>' -go - - -/* Add permissions for table... */ -IF OBJECT_ID('dbo.Variation#Synonyms') IS NOT NULL -BEGIN - GRANT DELETE,INSERT,REFERENCES,UPDATE ON dbo.Variation#Synonyms TO curator - GRANT SELECT ON dbo.Variation#Synonyms TO public -END -go - -/* Bind rules & defaults to columns... */ -/* End of description of table dbo.Variation#Synonyms */ +/* Triggers... */ +/* No triggers found. */