tripal_chado.schema_v1.3.api.inc 423 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267
  1. <?php
  2. /**
  3. * @file
  4. * Describes the chado tables in version 1.3
  5. */
  6. /**
  7. * @defgroup tripal_schema_v1_3_api Chado v1.3 Schema
  8. * @ingroup tripal_chado_schema_api
  9. * @{
  10. * Provides an application programming interface (API) for describing Chado
  11. * tables. This API consists of a set of functions, one for each table in Chado.
  12. * Each function simply returns a Drupal style array that defines the table.
  13. *
  14. * Because Drupal does not handle foreign key (FK) relationships, which are
  15. * needed to for Tripal Views, they have been added to the schema defintitions
  16. * below.
  17. *
  18. * The functions provided in this documentation should not be called as is,
  19. * but if you need the Drupal-style array definition for any table, use the
  20. * following function call:
  21. *
  22. * $table_desc = chado_get_schema($table)
  23. *
  24. * where the variable $table contains the name of the table you want to
  25. * retireve. The chado_get_schema function determines the appropriate version
  26. * of Chado and uses the Drupal hook infrastructure to call the appropriate
  27. * hook function to retrieve the table schema.
  28. *
  29. * If you need to augment these schema definitions within your own module,
  30. * you need to implement the hook_chado_schema_v1_3_[table name]() hook where
  31. * [table name] is the name of the chado table whose schema definition you
  32. * want to augment.
  33. * @}
  34. */
  35. /**
  36. * Implements hook_chado_schema_v1_3_acquisition()
  37. *
  38. * Purpose: To describe the structure of 'acquisition' to tripal
  39. * @see chado_insert_record()
  40. * @see chado_update_record()
  41. * @see chado_select_record()
  42. * @see chado_generate_var()
  43. * @see chado_expan_var()
  44. *
  45. * @return
  46. * An array describing the 'acquisition' table
  47. *
  48. * @ingroup tripal_chado_v1.3_schema_api
  49. *
  50. */
  51. function tripal_chado_chado_schema_v1_3_acquisition() {
  52. $description = array(
  53. 'description' => '',
  54. 'table' => 'acquisition',
  55. 'fields' => array(
  56. 'acquisition_id' => array(
  57. 'size' => 'big',
  58. 'type' => 'serial',
  59. 'not null' => TRUE,
  60. ),
  61. 'assay_id' => array(
  62. 'size' => 'big',
  63. 'type' => 'int',
  64. 'not null' => TRUE,
  65. ),
  66. 'protocol_id' => array(
  67. 'size' => 'big',
  68. 'type' => 'int',
  69. 'not null' => FALSE,
  70. ),
  71. 'channel_id' => array(
  72. 'size' => 'big',
  73. 'type' => 'int',
  74. 'not null' => FALSE,
  75. ),
  76. 'acquisitiondate' => array(
  77. 'size' => 'normal',
  78. 'type' => 'datetime',
  79. 'not null' => FALSE,
  80. 'default' => 'now()',
  81. ),
  82. 'name' => array(
  83. 'size' => 'normal',
  84. 'type' => 'text',
  85. 'not null' => FALSE,
  86. ),
  87. 'uri' => array(
  88. 'size' => 'normal',
  89. 'type' => 'text',
  90. 'not null' => FALSE,
  91. ),
  92. ),
  93. 'unique keys' => array(
  94. 'acquisition_c1' => array(
  95. 0 => 'name',
  96. ),
  97. ),
  98. 'indexes' => array(
  99. 'acquisition_idx1' => array(
  100. 0 => 'assay_id',
  101. ),
  102. 'acquisition_idx2' => array(
  103. 0 => 'protocol_id',
  104. ),
  105. 'acquisition_idx3' => array(
  106. 0 => 'channel_id',
  107. ),
  108. ),
  109. 'primary key' => array(
  110. 0 => 'acquisition_id',
  111. ),
  112. 'foreign keys' => array(
  113. 'assay' => array(
  114. 'table' => 'assay',
  115. 'columns' => array(
  116. 'assay_id' => 'assay_id',
  117. ),
  118. ),
  119. 'protocol' => array(
  120. 'table' => 'protocol',
  121. 'columns' => array(
  122. 'protocol_id' => 'protocol_id',
  123. ),
  124. ),
  125. 'channel' => array(
  126. 'table' => 'channel',
  127. 'columns' => array(
  128. 'channel_id' => 'channel_id',
  129. ),
  130. ),
  131. ),
  132. 'referring_tables' => array(
  133. 0 => 'acquisitionprop',
  134. 1 => 'acquisition_relationship',
  135. 3 => 'quantification',
  136. ),
  137. );
  138. return $description;
  139. }
  140. /**
  141. * Implements hook_chado_schema_v1_3_acquisitionprop()
  142. *
  143. * Purpose: To describe the structure of 'acquisitionprop' to tripal
  144. * @see chado_insert_record()
  145. * @see chado_update_record()
  146. * @see chado_select_record()
  147. * @see chado_generate_var()
  148. * @see chado_expan_var()
  149. *
  150. * @return
  151. * An array describing the 'acquisitionprop' table
  152. *
  153. * @ingroup tripal_chado_v1.3_schema_api
  154. *
  155. */
  156. function tripal_chado_chado_schema_v1_3_acquisitionprop() {
  157. $description = array(
  158. 'description' => '',
  159. 'table' => 'acquisitionprop',
  160. 'fields' => array(
  161. 'acquisitionprop_id' => array(
  162. 'size' => 'big',
  163. 'type' => 'serial',
  164. 'not null' => TRUE,
  165. ),
  166. 'acquisition_id' => array(
  167. 'size' => 'big',
  168. 'type' => 'int',
  169. 'not null' => TRUE,
  170. ),
  171. 'type_id' => array(
  172. 'size' => 'big',
  173. 'type' => 'int',
  174. 'not null' => TRUE,
  175. ),
  176. 'value' => array(
  177. 'size' => 'normal',
  178. 'type' => 'text',
  179. 'not null' => FALSE,
  180. ),
  181. 'rank' => array(
  182. 'size' => 'normal',
  183. 'type' => 'int',
  184. 'not null' => TRUE,
  185. 'default' => 0,
  186. ),
  187. ),
  188. 'unique keys' => array(
  189. 'acquisitionprop_c1' => array(
  190. 0 => 'acquisition_id',
  191. 1 => 'type_id',
  192. 2 => 'rank',
  193. ),
  194. ),
  195. 'indexes' => array(
  196. 'acquisitionprop_idx1' => array(
  197. 0 => 'acquisition_id',
  198. ),
  199. 'acquisitionprop_idx2' => array(
  200. 0 => 'type_id',
  201. ),
  202. ),
  203. 'primary key' => array(
  204. 0 => 'acquisitionprop_id',
  205. ),
  206. 'foreign keys' => array(
  207. 'acquisition' => array(
  208. 'table' => 'acquisition',
  209. 'columns' => array(
  210. 'acquisition_id' => 'acquisition_id',
  211. ),
  212. ),
  213. 'cvterm' => array(
  214. 'table' => 'cvterm',
  215. 'columns' => array(
  216. 'type_id' => 'cvterm_id',
  217. ),
  218. ),
  219. ),
  220. 'referring_tables' => array(
  221. ),
  222. );
  223. return $description;
  224. }
  225. /**
  226. * Implements hook_chado_schema_v1_3_acquisition_relationship()
  227. *
  228. * Purpose: To describe the structure of 'acquisition_relationship' to tripal
  229. * @see chado_insert_record()
  230. * @see chado_update_record()
  231. * @see chado_select_record()
  232. * @see chado_generate_var()
  233. * @see chado_expan_var()
  234. *
  235. * @return
  236. * An array describing the 'acquisition_relationship' table
  237. *
  238. * @ingroup tripal_chado_v1.3_schema_api
  239. *
  240. */
  241. function tripal_chado_chado_schema_v1_3_acquisition_relationship() {
  242. $description = array(
  243. 'description' => '',
  244. 'table' => 'acquisition_relationship',
  245. 'fields' => array(
  246. 'acquisition_relationship_id' => array(
  247. 'size' => 'big',
  248. 'type' => 'serial',
  249. 'not null' => TRUE,
  250. ),
  251. 'subject_id' => array(
  252. 'size' => 'big',
  253. 'type' => 'int',
  254. 'not null' => TRUE,
  255. ),
  256. 'type_id' => array(
  257. 'size' => 'big',
  258. 'type' => 'int',
  259. 'not null' => TRUE,
  260. ),
  261. 'object_id' => array(
  262. 'size' => 'big',
  263. 'type' => 'int',
  264. 'not null' => TRUE,
  265. ),
  266. 'value' => array(
  267. 'size' => 'normal',
  268. 'type' => 'text',
  269. 'not null' => FALSE,
  270. ),
  271. 'rank' => array(
  272. 'size' => 'normal',
  273. 'type' => 'int',
  274. 'not null' => TRUE,
  275. 'default' => 0,
  276. ),
  277. ),
  278. 'unique keys' => array(
  279. 'acquisition_relationship_c1' => array(
  280. 0 => 'subject_id',
  281. 1 => 'object_id',
  282. 2 => 'type_id',
  283. 3 => 'rank',
  284. ),
  285. ),
  286. 'indexes' => array(
  287. 'acquisition_relationship_idx1' => array(
  288. 0 => 'subject_id',
  289. ),
  290. 'acquisition_relationship_idx2' => array(
  291. 0 => 'type_id',
  292. ),
  293. 'acquisition_relationship_idx3' => array(
  294. 0 => 'object_id',
  295. ),
  296. ),
  297. 'primary key' => array(
  298. 0 => 'acquisition_relationship_id',
  299. ),
  300. 'foreign keys' => array(
  301. 'acquisition' => array(
  302. 'table' => 'acquisition',
  303. 'columns' => array(
  304. 'subject_id' => 'acquisition_id',
  305. 'object_id' => 'acquisition_id',
  306. ),
  307. ),
  308. 'cvterm' => array(
  309. 'table' => 'cvterm',
  310. 'columns' => array(
  311. 'type_id' => 'cvterm_id',
  312. ),
  313. ),
  314. ),
  315. 'referring_tables' => array(
  316. ),
  317. );
  318. return $description;
  319. }
  320. /**
  321. * Implements hook_chado_schema_v1_3_analysis()
  322. *
  323. * Purpose: To describe the structure of 'analysis' to tripal
  324. * @see chado_insert_record()
  325. * @see chado_update_record()
  326. * @see chado_select_record()
  327. * @see chado_generate_var()
  328. * @see chado_expan_var()
  329. *
  330. * @return
  331. * An array describing the 'analysis' table
  332. *
  333. * @ingroup tripal_chado_v1.3_schema_api
  334. *
  335. */
  336. function tripal_chado_chado_schema_v1_3_analysis() {
  337. $description = array(
  338. 'description' => '',
  339. 'table' => 'analysis',
  340. 'fields' => array(
  341. 'analysis_id' => array(
  342. 'size' => 'big',
  343. 'type' => 'serial',
  344. 'not null' => TRUE,
  345. ),
  346. 'name' => array(
  347. 'size' => 'normal',
  348. 'type' => 'varchar',
  349. 'length' => '255',
  350. 'not null' => FALSE,
  351. ),
  352. 'description' => array(
  353. 'size' => 'normal',
  354. 'type' => 'text',
  355. 'not null' => FALSE,
  356. ),
  357. 'program' => array(
  358. 'size' => 'normal',
  359. 'type' => 'varchar',
  360. 'length' => '255',
  361. 'not null' => TRUE,
  362. ),
  363. 'programversion' => array(
  364. 'size' => 'normal',
  365. 'type' => 'varchar',
  366. 'length' => '255',
  367. 'not null' => TRUE,
  368. ),
  369. 'algorithm' => array(
  370. 'size' => 'normal',
  371. 'type' => 'varchar',
  372. 'length' => '255',
  373. 'not null' => FALSE,
  374. ),
  375. 'sourcename' => array(
  376. 'size' => 'normal',
  377. 'type' => 'varchar',
  378. 'length' => '255',
  379. 'not null' => FALSE,
  380. ),
  381. 'sourceversion' => array(
  382. 'size' => 'normal',
  383. 'type' => 'varchar',
  384. 'length' => '255',
  385. 'not null' => FALSE,
  386. ),
  387. 'sourceuri' => array(
  388. 'size' => 'normal',
  389. 'type' => 'text',
  390. 'not null' => FALSE,
  391. ),
  392. 'timeexecuted' => array(
  393. 'size' => 'normal',
  394. 'type' => 'datetime',
  395. 'not null' => TRUE,
  396. 'default' => 'now()',
  397. ),
  398. ),
  399. 'unique keys' => array(
  400. 'analysis_c1' => array(
  401. 0 => 'program',
  402. 1 => 'programversion',
  403. 2 => 'sourcename',
  404. ),
  405. ),
  406. 'primary key' => array(
  407. 0 => 'analysis_id',
  408. ),
  409. 'foreign keys' => array(
  410. ),
  411. 'referring_tables' => array(
  412. 0 => 'analysis_cvterm',
  413. 1 => 'analysis_dbxref',
  414. 2 => 'analysisfeature',
  415. 3 => 'analysis_organism',
  416. 4 => 'analysisprop',
  417. 5 => 'analysis_pub',
  418. 6 => 'analysis_relationship',
  419. 8 => 'nd_experiment_analysis',
  420. 9 => 'phylotree',
  421. 10 => 'project_analysis',
  422. 11 => 'quantification',
  423. ),
  424. );
  425. return $description;
  426. }
  427. /**
  428. * Implements hook_chado_schema_v1_3_analysis_cvterm()
  429. *
  430. * Purpose: To describe the structure of 'analysis_cvterm' to tripal
  431. * @see chado_insert_record()
  432. * @see chado_update_record()
  433. * @see chado_select_record()
  434. * @see chado_generate_var()
  435. * @see chado_expan_var()
  436. *
  437. * @return
  438. * An array describing the 'analysis_cvterm' table
  439. *
  440. * @ingroup tripal_chado_v1.3_schema_api
  441. *
  442. */
  443. function tripal_chado_chado_schema_v1_3_analysis_cvterm() {
  444. $description = array(
  445. 'description' => '',
  446. 'table' => 'analysis_cvterm',
  447. 'fields' => array(
  448. 'analysis_cvterm_id' => array(
  449. 'size' => 'big',
  450. 'type' => 'serial',
  451. 'not null' => TRUE,
  452. ),
  453. 'analysis_id' => array(
  454. 'size' => 'big',
  455. 'type' => 'int',
  456. 'not null' => TRUE,
  457. ),
  458. 'cvterm_id' => array(
  459. 'size' => 'big',
  460. 'type' => 'int',
  461. 'not null' => TRUE,
  462. ),
  463. 'is_not' => array(
  464. 'size' => 'normal',
  465. 'type' => 'boolean',
  466. 'not null' => TRUE,
  467. 'default' => FALSE,
  468. ),
  469. 'rank' => array(
  470. 'size' => 'normal',
  471. 'type' => 'int',
  472. 'not null' => TRUE,
  473. 'default' => 0,
  474. ),
  475. ),
  476. 'unique keys' => array(
  477. 'analysis_cvterm_c1' => array(
  478. 0 => 'analysis_id',
  479. 1 => 'cvterm_id',
  480. 2 => 'rank',
  481. ),
  482. ),
  483. 'indexes' => array(
  484. 'analysis_cvterm_idx1' => array(
  485. 0 => 'analysis_id',
  486. ),
  487. 'analysis_cvterm_idx2' => array(
  488. 0 => 'cvterm_id',
  489. ),
  490. ),
  491. 'primary key' => array(
  492. 0 => 'analysis_cvterm_id',
  493. ),
  494. 'foreign keys' => array(
  495. 'analysis' => array(
  496. 'table' => 'analysis',
  497. 'columns' => array(
  498. 'analysis_id' => 'analysis_id',
  499. ),
  500. ),
  501. 'cvterm' => array(
  502. 'table' => 'cvterm',
  503. 'columns' => array(
  504. 'cvterm_id' => 'cvterm_id',
  505. ),
  506. ),
  507. ),
  508. 'referring_tables' => array(
  509. ),
  510. );
  511. return $description;
  512. }
  513. /**
  514. * Implements hook_chado_schema_v1_3_analysis_dbxref()
  515. *
  516. * Purpose: To describe the structure of 'analysis_dbxref' to tripal
  517. * @see chado_insert_record()
  518. * @see chado_update_record()
  519. * @see chado_select_record()
  520. * @see chado_generate_var()
  521. * @see chado_expan_var()
  522. *
  523. * @return
  524. * An array describing the 'analysis_dbxref' table
  525. *
  526. * @ingroup tripal_chado_v1.3_schema_api
  527. *
  528. */
  529. function tripal_chado_chado_schema_v1_3_analysis_dbxref() {
  530. $description = array(
  531. 'description' => '',
  532. 'table' => 'analysis_dbxref',
  533. 'fields' => array(
  534. 'analysis_dbxref_id' => array(
  535. 'size' => 'big',
  536. 'type' => 'serial',
  537. 'not null' => TRUE,
  538. ),
  539. 'analysis_id' => array(
  540. 'size' => 'big',
  541. 'type' => 'int',
  542. 'not null' => TRUE,
  543. ),
  544. 'dbxref_id' => array(
  545. 'size' => 'big',
  546. 'type' => 'int',
  547. 'not null' => TRUE,
  548. ),
  549. 'is_current' => array(
  550. 'size' => 'normal',
  551. 'type' => 'boolean',
  552. 'not null' => TRUE,
  553. 'default' => 'true',
  554. ),
  555. ),
  556. 'unique keys' => array(
  557. 'analysis_dbxref_c1' => array(
  558. 0 => 'analysis_id',
  559. 1 => 'dbxref_id',
  560. ),
  561. ),
  562. 'indexes' => array(
  563. 'analysis_dbxref_idx1' => array(
  564. 0 => 'analysis_id',
  565. ),
  566. 'analysis_dbxref_idx2' => array(
  567. 0 => 'dbxref_id',
  568. ),
  569. ),
  570. 'primary key' => array(
  571. 0 => 'analysis_dbxref_id',
  572. ),
  573. 'foreign keys' => array(
  574. 'analysis' => array(
  575. 'table' => 'analysis',
  576. 'columns' => array(
  577. 'analysis_id' => 'analysis_id',
  578. ),
  579. ),
  580. 'dbxref' => array(
  581. 'table' => 'dbxref',
  582. 'columns' => array(
  583. 'dbxref_id' => 'dbxref_id',
  584. ),
  585. ),
  586. ),
  587. 'referring_tables' => array(
  588. ),
  589. );
  590. return $description;
  591. }
  592. /**
  593. * Implements hook_chado_schema_v1_3_analysisfeature()
  594. *
  595. * Purpose: To describe the structure of 'analysisfeature' to tripal
  596. * @see chado_insert_record()
  597. * @see chado_update_record()
  598. * @see chado_select_record()
  599. * @see chado_generate_var()
  600. * @see chado_expan_var()
  601. *
  602. * @return
  603. * An array describing the 'analysisfeature' table
  604. *
  605. * @ingroup tripal_chado_v1.3_schema_api
  606. *
  607. */
  608. function tripal_chado_chado_schema_v1_3_analysisfeature() {
  609. $description = array(
  610. 'description' => '',
  611. 'table' => 'analysisfeature',
  612. 'fields' => array(
  613. 'analysisfeature_id' => array(
  614. 'size' => 'big',
  615. 'type' => 'serial',
  616. 'not null' => TRUE,
  617. ),
  618. 'feature_id' => array(
  619. 'size' => 'big',
  620. 'type' => 'int',
  621. 'not null' => TRUE,
  622. ),
  623. 'analysis_id' => array(
  624. 'size' => 'big',
  625. 'type' => 'int',
  626. 'not null' => TRUE,
  627. ),
  628. 'rawscore' => array(
  629. 'size' => 'big',
  630. 'type' => 'float',
  631. 'not null' => FALSE,
  632. ),
  633. 'normscore' => array(
  634. 'size' => 'big',
  635. 'type' => 'float',
  636. 'not null' => FALSE,
  637. ),
  638. 'significance' => array(
  639. 'size' => 'big',
  640. 'type' => 'float',
  641. 'not null' => FALSE,
  642. ),
  643. 'identity' => array(
  644. 'size' => 'big',
  645. 'type' => 'float',
  646. 'not null' => FALSE,
  647. ),
  648. ),
  649. 'unique keys' => array(
  650. 'analysisfeature_c1' => array(
  651. 0 => 'feature_id',
  652. 1 => 'analysis_id',
  653. ),
  654. ),
  655. 'indexes' => array(
  656. 'analysisfeature_idx1' => array(
  657. 0 => 'feature_id',
  658. ),
  659. 'analysisfeature_idx2' => array(
  660. 0 => 'analysis_id',
  661. ),
  662. ),
  663. 'primary key' => array(
  664. 0 => 'analysisfeature_id',
  665. ),
  666. 'foreign keys' => array(
  667. 'feature' => array(
  668. 'table' => 'feature',
  669. 'columns' => array(
  670. 'feature_id' => 'feature_id',
  671. ),
  672. ),
  673. 'analysis' => array(
  674. 'table' => 'analysis',
  675. 'columns' => array(
  676. 'analysis_id' => 'analysis_id',
  677. ),
  678. ),
  679. ),
  680. 'referring_tables' => array(
  681. 0 => 'analysisfeatureprop',
  682. ),
  683. );
  684. return $description;
  685. }
  686. /**
  687. * Implements hook_chado_schema_v1_3_analysisfeatureprop()
  688. *
  689. * Purpose: To describe the structure of 'analysisfeatureprop' to tripal
  690. * @see chado_insert_record()
  691. * @see chado_update_record()
  692. * @see chado_select_record()
  693. * @see chado_generate_var()
  694. * @see chado_expan_var()
  695. *
  696. * @return
  697. * An array describing the 'analysisfeatureprop' table
  698. *
  699. * @ingroup tripal_chado_v1.3_schema_api
  700. *
  701. */
  702. function tripal_chado_chado_schema_v1_3_analysisfeatureprop() {
  703. $description = array(
  704. 'description' => '',
  705. 'table' => 'analysisfeatureprop',
  706. 'fields' => array(
  707. 'analysisfeatureprop_id' => array(
  708. 'size' => 'big',
  709. 'type' => 'serial',
  710. 'not null' => TRUE,
  711. ),
  712. 'analysisfeature_id' => array(
  713. 'size' => 'big',
  714. 'type' => 'int',
  715. 'not null' => TRUE,
  716. ),
  717. 'type_id' => array(
  718. 'size' => 'big',
  719. 'type' => 'int',
  720. 'not null' => TRUE,
  721. ),
  722. 'value' => array(
  723. 'size' => 'normal',
  724. 'type' => 'text',
  725. 'not null' => FALSE,
  726. ),
  727. 'rank' => array(
  728. 'size' => 'normal',
  729. 'type' => 'int',
  730. 'not null' => TRUE,
  731. ),
  732. ),
  733. 'unique keys' => array(
  734. 'analysisfeature_id_type_id_rank' => array(
  735. 0 => 'analysisfeature_id',
  736. 1 => 'type_id',
  737. 2 => 'rank',
  738. ),
  739. ),
  740. 'indexes' => array(
  741. 'analysisfeatureprop_idx1' => array(
  742. 0 => 'analysisfeature_id',
  743. ),
  744. 'analysisfeatureprop_idx2' => array(
  745. 0 => 'type_id',
  746. ),
  747. ),
  748. 'primary key' => array(
  749. 0 => 'analysisfeatureprop_id',
  750. ),
  751. 'foreign keys' => array(
  752. 'analysisfeature' => array(
  753. 'table' => 'analysisfeature',
  754. 'columns' => array(
  755. 'analysisfeature_id' => 'analysisfeature_id',
  756. ),
  757. ),
  758. 'cvterm' => array(
  759. 'table' => 'cvterm',
  760. 'columns' => array(
  761. 'type_id' => 'cvterm_id',
  762. ),
  763. ),
  764. ),
  765. 'referring_tables' => array(
  766. ),
  767. );
  768. return $description;
  769. }
  770. /**
  771. * Implements hook_chado_schema_v1_3_analysis_organism()
  772. *
  773. * Purpose: To describe the structure of 'analysis_organism' to tripal
  774. * @see chado_insert_record()
  775. * @see chado_update_record()
  776. * @see chado_select_record()
  777. * @see chado_generate_var()
  778. * @see chado_expan_var()
  779. *
  780. * @return
  781. * An array describing the 'analysis_organism' table
  782. *
  783. * @ingroup tripal_chado_v1.3_schema_api
  784. *
  785. */
  786. function tripal_chado_chado_schema_v1_3_analysis_organism() {
  787. $description = array(
  788. 'description' => '',
  789. 'table' => 'analysis_organism',
  790. 'fields' => array(
  791. 'analysis_id' => array(
  792. 'size' => 'normal',
  793. 'type' => 'int',
  794. 'not null' => TRUE,
  795. ),
  796. 'organism_id' => array(
  797. 'size' => 'normal',
  798. 'type' => 'int',
  799. 'not null' => TRUE,
  800. ),
  801. ),
  802. 'indexes' => array(
  803. 'networkmod_qtl_indx0' => array(
  804. 0 => 'analysis_id',
  805. ),
  806. 'networkmod_qtl_indx1' => array(
  807. 0 => 'organism_id',
  808. ),
  809. ),
  810. 'foreign keys' => array(
  811. 'analysis' => array(
  812. 'table' => 'analysis',
  813. 'columns' => array(
  814. 'analysis_id' => 'analysis_id',
  815. ),
  816. ),
  817. 'organism' => array(
  818. 'table' => 'organism',
  819. 'columns' => array(
  820. 'organism_id' => 'organism_id',
  821. ),
  822. ),
  823. ),
  824. 'referring_tables' => array(
  825. ),
  826. );
  827. return $description;
  828. }
  829. /**
  830. * Implements hook_chado_schema_v1_3_analysisprop()
  831. *
  832. * Purpose: To describe the structure of 'analysisprop' to tripal
  833. * @see chado_insert_record()
  834. * @see chado_update_record()
  835. * @see chado_select_record()
  836. * @see chado_generate_var()
  837. * @see chado_expan_var()
  838. *
  839. * @return
  840. * An array describing the 'analysisprop' table
  841. *
  842. * @ingroup tripal_chado_v1.3_schema_api
  843. *
  844. */
  845. function tripal_chado_chado_schema_v1_3_analysisprop() {
  846. $description = array(
  847. 'description' => '',
  848. 'table' => 'analysisprop',
  849. 'fields' => array(
  850. 'analysisprop_id' => array(
  851. 'size' => 'big',
  852. 'type' => 'serial',
  853. 'not null' => TRUE,
  854. ),
  855. 'analysis_id' => array(
  856. 'size' => 'big',
  857. 'type' => 'int',
  858. 'not null' => TRUE,
  859. ),
  860. 'type_id' => array(
  861. 'size' => 'big',
  862. 'type' => 'int',
  863. 'not null' => TRUE,
  864. ),
  865. 'value' => array(
  866. 'size' => 'normal',
  867. 'type' => 'text',
  868. 'not null' => FALSE,
  869. ),
  870. 'rank' => array(
  871. 'size' => 'normal',
  872. 'type' => 'int',
  873. 'not null' => TRUE,
  874. 'default' => 0,
  875. ),
  876. ),
  877. 'unique keys' => array(
  878. 'analysisprop_c1' => array(
  879. 0 => 'analysis_id',
  880. 1 => 'type_id',
  881. 2 => 'rank',
  882. ),
  883. ),
  884. 'indexes' => array(
  885. 'analysisprop_idx1' => array(
  886. 0 => 'analysis_id',
  887. ),
  888. 'analysisprop_idx2' => array(
  889. 0 => 'type_id',
  890. ),
  891. ),
  892. 'primary key' => array(
  893. 0 => 'analysisprop_id',
  894. ),
  895. 'foreign keys' => array(
  896. 'analysis' => array(
  897. 'table' => 'analysis',
  898. 'columns' => array(
  899. 'analysis_id' => 'analysis_id',
  900. ),
  901. ),
  902. 'cvterm' => array(
  903. 'table' => 'cvterm',
  904. 'columns' => array(
  905. 'type_id' => 'cvterm_id',
  906. ),
  907. ),
  908. ),
  909. 'referring_tables' => array(
  910. ),
  911. );
  912. return $description;
  913. }
  914. /**
  915. * Implements hook_chado_schema_v1_3_analysis_pub()
  916. *
  917. * Purpose: To describe the structure of 'analysis_pub' to tripal
  918. * @see chado_insert_record()
  919. * @see chado_update_record()
  920. * @see chado_select_record()
  921. * @see chado_generate_var()
  922. * @see chado_expan_var()
  923. *
  924. * @return
  925. * An array describing the 'analysis_pub' table
  926. *
  927. * @ingroup tripal_chado_v1.3_schema_api
  928. *
  929. */
  930. function tripal_chado_chado_schema_v1_3_analysis_pub() {
  931. $description = array(
  932. 'description' => '',
  933. 'table' => 'analysis_pub',
  934. 'fields' => array(
  935. 'analysis_pub_id' => array(
  936. 'size' => 'big',
  937. 'type' => 'serial',
  938. 'not null' => TRUE,
  939. ),
  940. 'analysis_id' => array(
  941. 'size' => 'big',
  942. 'type' => 'int',
  943. 'not null' => TRUE,
  944. ),
  945. 'pub_id' => array(
  946. 'size' => 'big',
  947. 'type' => 'int',
  948. 'not null' => TRUE,
  949. ),
  950. ),
  951. 'unique keys' => array(
  952. 'analysis_pub_c1' => array(
  953. 0 => 'analysis_id',
  954. 1 => 'pub_id',
  955. ),
  956. ),
  957. 'indexes' => array(
  958. 'analysis_pub_idx1' => array(
  959. 0 => 'analysis_id',
  960. ),
  961. 'analysis_pub_idx2' => array(
  962. 0 => 'pub_id',
  963. ),
  964. ),
  965. 'primary key' => array(
  966. 0 => 'analysis_pub_id',
  967. ),
  968. 'foreign keys' => array(
  969. 'analysis' => array(
  970. 'table' => 'analysis',
  971. 'columns' => array(
  972. 'analysis_id' => 'analysis_id',
  973. ),
  974. ),
  975. 'pub' => array(
  976. 'table' => 'pub',
  977. 'columns' => array(
  978. 'pub_id' => 'pub_id',
  979. ),
  980. ),
  981. ),
  982. 'referring_tables' => array(
  983. ),
  984. );
  985. return $description;
  986. }
  987. /**
  988. * Implements hook_chado_schema_v1_3_analysis_relationship()
  989. *
  990. * Purpose: To describe the structure of 'analysis_relationship' to tripal
  991. * @see chado_insert_record()
  992. * @see chado_update_record()
  993. * @see chado_select_record()
  994. * @see chado_generate_var()
  995. * @see chado_expan_var()
  996. *
  997. * @return
  998. * An array describing the 'analysis_relationship' table
  999. *
  1000. * @ingroup tripal_chado_v1.3_schema_api
  1001. *
  1002. */
  1003. function tripal_chado_chado_schema_v1_3_analysis_relationship() {
  1004. $description = array(
  1005. 'description' => '',
  1006. 'table' => 'analysis_relationship',
  1007. 'fields' => array(
  1008. 'analysis_relationship_id' => array(
  1009. 'size' => 'big',
  1010. 'type' => 'serial',
  1011. 'not null' => TRUE,
  1012. ),
  1013. 'subject_id' => array(
  1014. 'size' => 'big',
  1015. 'type' => 'int',
  1016. 'not null' => TRUE,
  1017. ),
  1018. 'object_id' => array(
  1019. 'size' => 'big',
  1020. 'type' => 'int',
  1021. 'not null' => TRUE,
  1022. ),
  1023. 'type_id' => array(
  1024. 'size' => 'big',
  1025. 'type' => 'int',
  1026. 'not null' => TRUE,
  1027. ),
  1028. 'value' => array(
  1029. 'size' => 'normal',
  1030. 'type' => 'text',
  1031. 'not null' => FALSE,
  1032. ),
  1033. 'rank' => array(
  1034. 'size' => 'normal',
  1035. 'type' => 'int',
  1036. 'not null' => TRUE,
  1037. 'default' => 0,
  1038. ),
  1039. ),
  1040. 'unique keys' => array(
  1041. 'analysis_relationship_c1' => array(
  1042. 0 => 'subject_id',
  1043. 1 => 'object_id',
  1044. 2 => 'type_id',
  1045. 3 => 'rank',
  1046. ),
  1047. ),
  1048. 'indexes' => array(
  1049. 'analysis_relationship_idx1' => array(
  1050. 0 => 'subject_id',
  1051. ),
  1052. 'analysis_relationship_idx2' => array(
  1053. 0 => 'object_id',
  1054. ),
  1055. 'analysis_relationship_idx3' => array(
  1056. 0 => 'type_id',
  1057. ),
  1058. ),
  1059. 'primary key' => array(
  1060. 0 => 'analysis_relationship_id',
  1061. ),
  1062. 'foreign keys' => array(
  1063. 'analysis' => array(
  1064. 'table' => 'analysis',
  1065. 'columns' => array(
  1066. 'subject_id' => 'analysis_id',
  1067. 'object_id' => 'analysis_id',
  1068. ),
  1069. ),
  1070. 'cvterm' => array(
  1071. 'table' => 'cvterm',
  1072. 'columns' => array(
  1073. 'type_id' => 'cvterm_id',
  1074. ),
  1075. ),
  1076. ),
  1077. 'referring_tables' => array(
  1078. ),
  1079. );
  1080. return $description;
  1081. }
  1082. /**
  1083. * Implements hook_chado_schema_v1_3_arraydesign()
  1084. *
  1085. * Purpose: To describe the structure of 'arraydesign' to tripal
  1086. * @see chado_insert_record()
  1087. * @see chado_update_record()
  1088. * @see chado_select_record()
  1089. * @see chado_generate_var()
  1090. * @see chado_expan_var()
  1091. *
  1092. * @return
  1093. * An array describing the 'arraydesign' table
  1094. *
  1095. * @ingroup tripal_chado_v1.3_schema_api
  1096. *
  1097. */
  1098. function tripal_chado_chado_schema_v1_3_arraydesign() {
  1099. $description = array(
  1100. 'description' => '',
  1101. 'table' => 'arraydesign',
  1102. 'fields' => array(
  1103. 'arraydesign_id' => array(
  1104. 'size' => 'big',
  1105. 'type' => 'serial',
  1106. 'not null' => TRUE,
  1107. ),
  1108. 'manufacturer_id' => array(
  1109. 'size' => 'big',
  1110. 'type' => 'int',
  1111. 'not null' => TRUE,
  1112. ),
  1113. 'platformtype_id' => array(
  1114. 'size' => 'big',
  1115. 'type' => 'int',
  1116. 'not null' => TRUE,
  1117. ),
  1118. 'substratetype_id' => array(
  1119. 'size' => 'big',
  1120. 'type' => 'int',
  1121. 'not null' => FALSE,
  1122. ),
  1123. 'protocol_id' => array(
  1124. 'size' => 'big',
  1125. 'type' => 'int',
  1126. 'not null' => FALSE,
  1127. ),
  1128. 'dbxref_id' => array(
  1129. 'size' => 'big',
  1130. 'type' => 'int',
  1131. 'not null' => FALSE,
  1132. ),
  1133. 'name' => array(
  1134. 'size' => 'normal',
  1135. 'type' => 'text',
  1136. 'not null' => TRUE,
  1137. ),
  1138. 'version' => array(
  1139. 'size' => 'normal',
  1140. 'type' => 'text',
  1141. 'not null' => FALSE,
  1142. ),
  1143. 'description' => array(
  1144. 'size' => 'normal',
  1145. 'type' => 'text',
  1146. 'not null' => FALSE,
  1147. ),
  1148. 'array_dimensions' => array(
  1149. 'size' => 'normal',
  1150. 'type' => 'text',
  1151. 'not null' => FALSE,
  1152. ),
  1153. 'element_dimensions' => array(
  1154. 'size' => 'normal',
  1155. 'type' => 'text',
  1156. 'not null' => FALSE,
  1157. ),
  1158. 'num_of_elements' => array(
  1159. 'size' => 'normal',
  1160. 'type' => 'int',
  1161. 'not null' => FALSE,
  1162. ),
  1163. 'num_array_columns' => array(
  1164. 'size' => 'normal',
  1165. 'type' => 'int',
  1166. 'not null' => FALSE,
  1167. ),
  1168. 'num_array_rows' => array(
  1169. 'size' => 'normal',
  1170. 'type' => 'int',
  1171. 'not null' => FALSE,
  1172. ),
  1173. 'num_grid_columns' => array(
  1174. 'size' => 'normal',
  1175. 'type' => 'int',
  1176. 'not null' => FALSE,
  1177. ),
  1178. 'num_grid_rows' => array(
  1179. 'size' => 'normal',
  1180. 'type' => 'int',
  1181. 'not null' => FALSE,
  1182. ),
  1183. 'num_sub_columns' => array(
  1184. 'size' => 'normal',
  1185. 'type' => 'int',
  1186. 'not null' => FALSE,
  1187. ),
  1188. 'num_sub_rows' => array(
  1189. 'size' => 'normal',
  1190. 'type' => 'int',
  1191. 'not null' => FALSE,
  1192. ),
  1193. ),
  1194. 'unique keys' => array(
  1195. 'arraydesign_c1' => array(
  1196. 0 => 'name',
  1197. ),
  1198. ),
  1199. 'indexes' => array(
  1200. 'arraydesign_idx1' => array(
  1201. 0 => 'manufacturer_id',
  1202. ),
  1203. 'arraydesign_idx2' => array(
  1204. 0 => 'platformtype_id',
  1205. ),
  1206. 'arraydesign_idx3' => array(
  1207. 0 => 'substratetype_id',
  1208. ),
  1209. 'arraydesign_idx4' => array(
  1210. 0 => 'protocol_id',
  1211. ),
  1212. 'arraydesign_idx5' => array(
  1213. 0 => 'dbxref_id',
  1214. ),
  1215. ),
  1216. 'primary key' => array(
  1217. 0 => 'arraydesign_id',
  1218. ),
  1219. 'foreign keys' => array(
  1220. 'contact' => array(
  1221. 'table' => 'contact',
  1222. 'columns' => array(
  1223. 'manufacturer_id' => 'contact_id',
  1224. ),
  1225. ),
  1226. 'cvterm' => array(
  1227. 'table' => 'cvterm',
  1228. 'columns' => array(
  1229. 'platformtype_id' => 'cvterm_id',
  1230. 'substratetype_id' => 'cvterm_id',
  1231. ),
  1232. ),
  1233. 'protocol' => array(
  1234. 'table' => 'protocol',
  1235. 'columns' => array(
  1236. 'protocol_id' => 'protocol_id',
  1237. ),
  1238. ),
  1239. 'dbxref' => array(
  1240. 'table' => 'dbxref',
  1241. 'columns' => array(
  1242. 'dbxref_id' => 'dbxref_id',
  1243. ),
  1244. ),
  1245. ),
  1246. 'referring_tables' => array(
  1247. 0 => 'arraydesignprop',
  1248. 1 => 'assay',
  1249. 2 => 'element',
  1250. ),
  1251. );
  1252. return $description;
  1253. }
  1254. /**
  1255. * Implements hook_chado_schema_v1_3_arraydesignprop()
  1256. *
  1257. * Purpose: To describe the structure of 'arraydesignprop' to tripal
  1258. * @see chado_insert_record()
  1259. * @see chado_update_record()
  1260. * @see chado_select_record()
  1261. * @see chado_generate_var()
  1262. * @see chado_expan_var()
  1263. *
  1264. * @return
  1265. * An array describing the 'arraydesignprop' table
  1266. *
  1267. * @ingroup tripal_chado_v1.3_schema_api
  1268. *
  1269. */
  1270. function tripal_chado_chado_schema_v1_3_arraydesignprop() {
  1271. $description = array(
  1272. 'description' => '',
  1273. 'table' => 'arraydesignprop',
  1274. 'fields' => array(
  1275. 'arraydesignprop_id' => array(
  1276. 'size' => 'big',
  1277. 'type' => 'serial',
  1278. 'not null' => TRUE,
  1279. ),
  1280. 'arraydesign_id' => array(
  1281. 'size' => 'big',
  1282. 'type' => 'int',
  1283. 'not null' => TRUE,
  1284. ),
  1285. 'type_id' => array(
  1286. 'size' => 'big',
  1287. 'type' => 'int',
  1288. 'not null' => TRUE,
  1289. ),
  1290. 'value' => array(
  1291. 'size' => 'normal',
  1292. 'type' => 'text',
  1293. 'not null' => FALSE,
  1294. ),
  1295. 'rank' => array(
  1296. 'size' => 'normal',
  1297. 'type' => 'int',
  1298. 'not null' => TRUE,
  1299. 'default' => 0,
  1300. ),
  1301. ),
  1302. 'unique keys' => array(
  1303. 'arraydesignprop_c1' => array(
  1304. 0 => 'arraydesign_id',
  1305. 1 => 'type_id',
  1306. 2 => 'rank',
  1307. ),
  1308. ),
  1309. 'indexes' => array(
  1310. 'arraydesignprop_idx1' => array(
  1311. 0 => 'arraydesign_id',
  1312. ),
  1313. 'arraydesignprop_idx2' => array(
  1314. 0 => 'type_id',
  1315. ),
  1316. ),
  1317. 'primary key' => array(
  1318. 0 => 'arraydesignprop_id',
  1319. ),
  1320. 'foreign keys' => array(
  1321. 'arraydesign' => array(
  1322. 'table' => 'arraydesign',
  1323. 'columns' => array(
  1324. 'arraydesign_id' => 'arraydesign_id',
  1325. ),
  1326. ),
  1327. 'cvterm' => array(
  1328. 'table' => 'cvterm',
  1329. 'columns' => array(
  1330. 'type_id' => 'cvterm_id',
  1331. ),
  1332. ),
  1333. ),
  1334. 'referring_tables' => array(
  1335. ),
  1336. );
  1337. return $description;
  1338. }
  1339. /**
  1340. * Implements hook_chado_schema_v1_3_assay()
  1341. *
  1342. * Purpose: To describe the structure of 'assay' to tripal
  1343. * @see chado_insert_record()
  1344. * @see chado_update_record()
  1345. * @see chado_select_record()
  1346. * @see chado_generate_var()
  1347. * @see chado_expan_var()
  1348. *
  1349. * @return
  1350. * An array describing the 'assay' table
  1351. *
  1352. * @ingroup tripal_chado_v1.3_schema_api
  1353. *
  1354. */
  1355. function tripal_chado_chado_schema_v1_3_assay() {
  1356. $description = array(
  1357. 'description' => '',
  1358. 'table' => 'assay',
  1359. 'fields' => array(
  1360. 'assay_id' => array(
  1361. 'size' => 'big',
  1362. 'type' => 'serial',
  1363. 'not null' => TRUE,
  1364. ),
  1365. 'arraydesign_id' => array(
  1366. 'size' => 'big',
  1367. 'type' => 'int',
  1368. 'not null' => TRUE,
  1369. ),
  1370. 'protocol_id' => array(
  1371. 'size' => 'big',
  1372. 'type' => 'int',
  1373. 'not null' => FALSE,
  1374. ),
  1375. 'assaydate' => array(
  1376. 'size' => 'normal',
  1377. 'type' => 'datetime',
  1378. 'not null' => FALSE,
  1379. 'default' => 'now()',
  1380. ),
  1381. 'arrayidentifier' => array(
  1382. 'size' => 'normal',
  1383. 'type' => 'text',
  1384. 'not null' => FALSE,
  1385. ),
  1386. 'arraybatchidentifier' => array(
  1387. 'size' => 'normal',
  1388. 'type' => 'text',
  1389. 'not null' => FALSE,
  1390. ),
  1391. 'operator_id' => array(
  1392. 'size' => 'big',
  1393. 'type' => 'int',
  1394. 'not null' => TRUE,
  1395. ),
  1396. 'dbxref_id' => array(
  1397. 'size' => 'big',
  1398. 'type' => 'int',
  1399. 'not null' => FALSE,
  1400. ),
  1401. 'name' => array(
  1402. 'size' => 'normal',
  1403. 'type' => 'text',
  1404. 'not null' => FALSE,
  1405. ),
  1406. 'description' => array(
  1407. 'size' => 'normal',
  1408. 'type' => 'text',
  1409. 'not null' => FALSE,
  1410. ),
  1411. ),
  1412. 'unique keys' => array(
  1413. 'assay_c1' => array(
  1414. 0 => 'name',
  1415. ),
  1416. ),
  1417. 'indexes' => array(
  1418. 'assay_idx1' => array(
  1419. 0 => 'arraydesign_id',
  1420. ),
  1421. 'assay_idx2' => array(
  1422. 0 => 'protocol_id',
  1423. ),
  1424. 'assay_idx3' => array(
  1425. 0 => 'operator_id',
  1426. ),
  1427. 'assay_idx4' => array(
  1428. 0 => 'dbxref_id',
  1429. ),
  1430. ),
  1431. 'primary key' => array(
  1432. 0 => 'assay_id',
  1433. ),
  1434. 'foreign keys' => array(
  1435. 'arraydesign' => array(
  1436. 'table' => 'arraydesign',
  1437. 'columns' => array(
  1438. 'arraydesign_id' => 'arraydesign_id',
  1439. ),
  1440. ),
  1441. 'protocol' => array(
  1442. 'table' => 'protocol',
  1443. 'columns' => array(
  1444. 'protocol_id' => 'protocol_id',
  1445. ),
  1446. ),
  1447. 'contact' => array(
  1448. 'table' => 'contact',
  1449. 'columns' => array(
  1450. 'operator_id' => 'contact_id',
  1451. ),
  1452. ),
  1453. 'dbxref' => array(
  1454. 'table' => 'dbxref',
  1455. 'columns' => array(
  1456. 'dbxref_id' => 'dbxref_id',
  1457. ),
  1458. ),
  1459. ),
  1460. 'referring_tables' => array(
  1461. 0 => 'acquisition',
  1462. 1 => 'assay_biomaterial',
  1463. 2 => 'assay_project',
  1464. 3 => 'assayprop',
  1465. 4 => 'control',
  1466. 5 => 'study_assay',
  1467. 6 => 'studyfactorvalue',
  1468. ),
  1469. );
  1470. return $description;
  1471. }
  1472. /**
  1473. * Implements hook_chado_schema_v1_3_assay_biomaterial()
  1474. *
  1475. * Purpose: To describe the structure of 'assay_biomaterial' to tripal
  1476. * @see chado_insert_record()
  1477. * @see chado_update_record()
  1478. * @see chado_select_record()
  1479. * @see chado_generate_var()
  1480. * @see chado_expan_var()
  1481. *
  1482. * @return
  1483. * An array describing the 'assay_biomaterial' table
  1484. *
  1485. * @ingroup tripal_chado_v1.3_schema_api
  1486. *
  1487. */
  1488. function tripal_chado_chado_schema_v1_3_assay_biomaterial() {
  1489. $description = array(
  1490. 'description' => '',
  1491. 'table' => 'assay_biomaterial',
  1492. 'fields' => array(
  1493. 'assay_biomaterial_id' => array(
  1494. 'size' => 'big',
  1495. 'type' => 'serial',
  1496. 'not null' => TRUE,
  1497. ),
  1498. 'assay_id' => array(
  1499. 'size' => 'big',
  1500. 'type' => 'int',
  1501. 'not null' => TRUE,
  1502. ),
  1503. 'biomaterial_id' => array(
  1504. 'size' => 'big',
  1505. 'type' => 'int',
  1506. 'not null' => TRUE,
  1507. ),
  1508. 'channel_id' => array(
  1509. 'size' => 'big',
  1510. 'type' => 'int',
  1511. 'not null' => FALSE,
  1512. ),
  1513. 'rank' => array(
  1514. 'size' => 'normal',
  1515. 'type' => 'int',
  1516. 'not null' => TRUE,
  1517. 'default' => 0,
  1518. ),
  1519. ),
  1520. 'unique keys' => array(
  1521. 'assay_biomaterial_c1' => array(
  1522. 0 => 'assay_id',
  1523. 1 => 'biomaterial_id',
  1524. 2 => 'channel_id',
  1525. 3 => 'rank',
  1526. ),
  1527. ),
  1528. 'indexes' => array(
  1529. 'assay_biomaterial_idx1' => array(
  1530. 0 => 'assay_id',
  1531. ),
  1532. 'assay_biomaterial_idx2' => array(
  1533. 0 => 'biomaterial_id',
  1534. ),
  1535. 'assay_biomaterial_idx3' => array(
  1536. 0 => 'channel_id',
  1537. ),
  1538. ),
  1539. 'primary key' => array(
  1540. 0 => 'assay_biomaterial_id',
  1541. ),
  1542. 'foreign keys' => array(
  1543. 'assay' => array(
  1544. 'table' => 'assay',
  1545. 'columns' => array(
  1546. 'assay_id' => 'assay_id',
  1547. ),
  1548. ),
  1549. 'biomaterial' => array(
  1550. 'table' => 'biomaterial',
  1551. 'columns' => array(
  1552. 'biomaterial_id' => 'biomaterial_id',
  1553. ),
  1554. ),
  1555. 'channel' => array(
  1556. 'table' => 'channel',
  1557. 'columns' => array(
  1558. 'channel_id' => 'channel_id',
  1559. ),
  1560. ),
  1561. ),
  1562. 'referring_tables' => array(
  1563. ),
  1564. );
  1565. return $description;
  1566. }
  1567. /**
  1568. * Implements hook_chado_schema_v1_3_assay_project()
  1569. *
  1570. * Purpose: To describe the structure of 'assay_project' to tripal
  1571. * @see chado_insert_record()
  1572. * @see chado_update_record()
  1573. * @see chado_select_record()
  1574. * @see chado_generate_var()
  1575. * @see chado_expan_var()
  1576. *
  1577. * @return
  1578. * An array describing the 'assay_project' table
  1579. *
  1580. * @ingroup tripal_chado_v1.3_schema_api
  1581. *
  1582. */
  1583. function tripal_chado_chado_schema_v1_3_assay_project() {
  1584. $description = array(
  1585. 'description' => '',
  1586. 'table' => 'assay_project',
  1587. 'fields' => array(
  1588. 'assay_project_id' => array(
  1589. 'size' => 'big',
  1590. 'type' => 'serial',
  1591. 'not null' => TRUE,
  1592. ),
  1593. 'assay_id' => array(
  1594. 'size' => 'big',
  1595. 'type' => 'int',
  1596. 'not null' => TRUE,
  1597. ),
  1598. 'project_id' => array(
  1599. 'size' => 'big',
  1600. 'type' => 'int',
  1601. 'not null' => TRUE,
  1602. ),
  1603. ),
  1604. 'unique keys' => array(
  1605. 'assay_project_c1' => array(
  1606. 0 => 'assay_id',
  1607. 1 => 'project_id',
  1608. ),
  1609. ),
  1610. 'indexes' => array(
  1611. 'assay_project_idx1' => array(
  1612. 0 => 'assay_id',
  1613. ),
  1614. 'assay_project_idx2' => array(
  1615. 0 => 'project_id',
  1616. ),
  1617. ),
  1618. 'primary key' => array(
  1619. 0 => 'assay_project_id',
  1620. ),
  1621. 'foreign keys' => array(
  1622. 'assay' => array(
  1623. 'table' => 'assay',
  1624. 'columns' => array(
  1625. 'assay_id' => 'assay_id',
  1626. ),
  1627. ),
  1628. 'project' => array(
  1629. 'table' => 'project',
  1630. 'columns' => array(
  1631. 'project_id' => 'project_id',
  1632. ),
  1633. ),
  1634. ),
  1635. 'referring_tables' => array(
  1636. ),
  1637. );
  1638. return $description;
  1639. }
  1640. /**
  1641. * Implements hook_chado_schema_v1_3_assayprop()
  1642. *
  1643. * Purpose: To describe the structure of 'assayprop' to tripal
  1644. * @see chado_insert_record()
  1645. * @see chado_update_record()
  1646. * @see chado_select_record()
  1647. * @see chado_generate_var()
  1648. * @see chado_expan_var()
  1649. *
  1650. * @return
  1651. * An array describing the 'assayprop' table
  1652. *
  1653. * @ingroup tripal_chado_v1.3_schema_api
  1654. *
  1655. */
  1656. function tripal_chado_chado_schema_v1_3_assayprop() {
  1657. $description = array(
  1658. 'description' => '',
  1659. 'table' => 'assayprop',
  1660. 'fields' => array(
  1661. 'assayprop_id' => array(
  1662. 'size' => 'big',
  1663. 'type' => 'serial',
  1664. 'not null' => TRUE,
  1665. ),
  1666. 'assay_id' => array(
  1667. 'size' => 'big',
  1668. 'type' => 'int',
  1669. 'not null' => TRUE,
  1670. ),
  1671. 'type_id' => array(
  1672. 'size' => 'big',
  1673. 'type' => 'int',
  1674. 'not null' => TRUE,
  1675. ),
  1676. 'value' => array(
  1677. 'size' => 'normal',
  1678. 'type' => 'text',
  1679. 'not null' => FALSE,
  1680. ),
  1681. 'rank' => array(
  1682. 'size' => 'normal',
  1683. 'type' => 'int',
  1684. 'not null' => TRUE,
  1685. 'default' => 0,
  1686. ),
  1687. ),
  1688. 'unique keys' => array(
  1689. 'assayprop_c1' => array(
  1690. 0 => 'assay_id',
  1691. 1 => 'type_id',
  1692. 2 => 'rank',
  1693. ),
  1694. ),
  1695. 'indexes' => array(
  1696. 'assayprop_idx1' => array(
  1697. 0 => 'assay_id',
  1698. ),
  1699. 'assayprop_idx2' => array(
  1700. 0 => 'type_id',
  1701. ),
  1702. ),
  1703. 'primary key' => array(
  1704. 0 => 'assayprop_id',
  1705. ),
  1706. 'foreign keys' => array(
  1707. 'assay' => array(
  1708. 'table' => 'assay',
  1709. 'columns' => array(
  1710. 'assay_id' => 'assay_id',
  1711. ),
  1712. ),
  1713. 'cvterm' => array(
  1714. 'table' => 'cvterm',
  1715. 'columns' => array(
  1716. 'type_id' => 'cvterm_id',
  1717. ),
  1718. ),
  1719. ),
  1720. 'referring_tables' => array(
  1721. ),
  1722. );
  1723. return $description;
  1724. }
  1725. /**
  1726. * Implements hook_chado_schema_v1_3_biomaterial()
  1727. *
  1728. * Purpose: To describe the structure of 'biomaterial' to tripal
  1729. * @see chado_insert_record()
  1730. * @see chado_update_record()
  1731. * @see chado_select_record()
  1732. * @see chado_generate_var()
  1733. * @see chado_expan_var()
  1734. *
  1735. * @return
  1736. * An array describing the 'biomaterial' table
  1737. *
  1738. * @ingroup tripal_chado_v1.3_schema_api
  1739. *
  1740. */
  1741. function tripal_chado_chado_schema_v1_3_biomaterial() {
  1742. $description = array(
  1743. 'description' => '',
  1744. 'table' => 'biomaterial',
  1745. 'fields' => array(
  1746. 'biomaterial_id' => array(
  1747. 'size' => 'big',
  1748. 'type' => 'serial',
  1749. 'not null' => TRUE,
  1750. ),
  1751. 'taxon_id' => array(
  1752. 'size' => 'big',
  1753. 'type' => 'int',
  1754. 'not null' => FALSE,
  1755. ),
  1756. 'biosourceprovider_id' => array(
  1757. 'size' => 'big',
  1758. 'type' => 'int',
  1759. 'not null' => FALSE,
  1760. ),
  1761. 'dbxref_id' => array(
  1762. 'size' => 'big',
  1763. 'type' => 'int',
  1764. 'not null' => FALSE,
  1765. ),
  1766. 'name' => array(
  1767. 'size' => 'normal',
  1768. 'type' => 'text',
  1769. 'not null' => FALSE,
  1770. ),
  1771. 'description' => array(
  1772. 'size' => 'normal',
  1773. 'type' => 'text',
  1774. 'not null' => FALSE,
  1775. ),
  1776. ),
  1777. 'unique keys' => array(
  1778. 'biomaterial_c1' => array(
  1779. 0 => 'name',
  1780. ),
  1781. ),
  1782. 'indexes' => array(
  1783. 'biomaterial_idx1' => array(
  1784. 0 => 'taxon_id',
  1785. ),
  1786. 'biomaterial_idx2' => array(
  1787. 0 => 'biosourceprovider_id',
  1788. ),
  1789. 'biomaterial_idx3' => array(
  1790. 0 => 'dbxref_id',
  1791. ),
  1792. ),
  1793. 'primary key' => array(
  1794. 0 => 'biomaterial_id',
  1795. ),
  1796. 'foreign keys' => array(
  1797. 'organism' => array(
  1798. 'table' => 'organism',
  1799. 'columns' => array(
  1800. 'taxon_id' => 'organism_id',
  1801. ),
  1802. ),
  1803. 'contact' => array(
  1804. 'table' => 'contact',
  1805. 'columns' => array(
  1806. 'biosourceprovider_id' => 'contact_id',
  1807. ),
  1808. ),
  1809. 'dbxref' => array(
  1810. 'table' => 'dbxref',
  1811. 'columns' => array(
  1812. 'dbxref_id' => 'dbxref_id',
  1813. ),
  1814. ),
  1815. ),
  1816. 'referring_tables' => array(
  1817. 0 => 'assay_biomaterial',
  1818. 1 => 'biomaterial_dbxref',
  1819. 2 => 'biomaterialprop',
  1820. 3 => 'biomaterial_relationship',
  1821. 5 => 'biomaterial_treatment',
  1822. 6 => 'treatment',
  1823. ),
  1824. );
  1825. return $description;
  1826. }
  1827. /**
  1828. * Implements hook_chado_schema_v1_3_biomaterial_dbxref()
  1829. *
  1830. * Purpose: To describe the structure of 'biomaterial_dbxref' to tripal
  1831. * @see chado_insert_record()
  1832. * @see chado_update_record()
  1833. * @see chado_select_record()
  1834. * @see chado_generate_var()
  1835. * @see chado_expan_var()
  1836. *
  1837. * @return
  1838. * An array describing the 'biomaterial_dbxref' table
  1839. *
  1840. * @ingroup tripal_chado_v1.3_schema_api
  1841. *
  1842. */
  1843. function tripal_chado_chado_schema_v1_3_biomaterial_dbxref() {
  1844. $description = array(
  1845. 'description' => '',
  1846. 'table' => 'biomaterial_dbxref',
  1847. 'fields' => array(
  1848. 'biomaterial_dbxref_id' => array(
  1849. 'size' => 'big',
  1850. 'type' => 'serial',
  1851. 'not null' => TRUE,
  1852. ),
  1853. 'biomaterial_id' => array(
  1854. 'size' => 'big',
  1855. 'type' => 'int',
  1856. 'not null' => TRUE,
  1857. ),
  1858. 'dbxref_id' => array(
  1859. 'size' => 'big',
  1860. 'type' => 'int',
  1861. 'not null' => TRUE,
  1862. ),
  1863. ),
  1864. 'unique keys' => array(
  1865. 'biomaterial_dbxref_c1' => array(
  1866. 0 => 'biomaterial_id',
  1867. 1 => 'dbxref_id',
  1868. ),
  1869. ),
  1870. 'indexes' => array(
  1871. 'biomaterial_dbxref_idx1' => array(
  1872. 0 => 'biomaterial_id',
  1873. ),
  1874. 'biomaterial_dbxref_idx2' => array(
  1875. 0 => 'dbxref_id',
  1876. ),
  1877. ),
  1878. 'primary key' => array(
  1879. 0 => 'biomaterial_dbxref_id',
  1880. ),
  1881. 'foreign keys' => array(
  1882. 'biomaterial' => array(
  1883. 'table' => 'biomaterial',
  1884. 'columns' => array(
  1885. 'biomaterial_id' => 'biomaterial_id',
  1886. ),
  1887. ),
  1888. 'dbxref' => array(
  1889. 'table' => 'dbxref',
  1890. 'columns' => array(
  1891. 'dbxref_id' => 'dbxref_id',
  1892. ),
  1893. ),
  1894. ),
  1895. 'referring_tables' => array(
  1896. ),
  1897. );
  1898. return $description;
  1899. }
  1900. /**
  1901. * Implements hook_chado_schema_v1_3_biomaterialprop()
  1902. *
  1903. * Purpose: To describe the structure of 'biomaterialprop' to tripal
  1904. * @see chado_insert_record()
  1905. * @see chado_update_record()
  1906. * @see chado_select_record()
  1907. * @see chado_generate_var()
  1908. * @see chado_expan_var()
  1909. *
  1910. * @return
  1911. * An array describing the 'biomaterialprop' table
  1912. *
  1913. * @ingroup tripal_chado_v1.3_schema_api
  1914. *
  1915. */
  1916. function tripal_chado_chado_schema_v1_3_biomaterialprop() {
  1917. $description = array(
  1918. 'description' => '',
  1919. 'table' => 'biomaterialprop',
  1920. 'fields' => array(
  1921. 'biomaterialprop_id' => array(
  1922. 'size' => 'big',
  1923. 'type' => 'serial',
  1924. 'not null' => TRUE,
  1925. ),
  1926. 'biomaterial_id' => array(
  1927. 'size' => 'big',
  1928. 'type' => 'int',
  1929. 'not null' => TRUE,
  1930. ),
  1931. 'type_id' => array(
  1932. 'size' => 'big',
  1933. 'type' => 'int',
  1934. 'not null' => TRUE,
  1935. ),
  1936. 'value' => array(
  1937. 'size' => 'normal',
  1938. 'type' => 'text',
  1939. 'not null' => FALSE,
  1940. ),
  1941. 'rank' => array(
  1942. 'size' => 'normal',
  1943. 'type' => 'int',
  1944. 'not null' => TRUE,
  1945. 'default' => 0,
  1946. ),
  1947. ),
  1948. 'unique keys' => array(
  1949. 'biomaterialprop_c1' => array(
  1950. 0 => 'biomaterial_id',
  1951. 1 => 'type_id',
  1952. 2 => 'rank',
  1953. ),
  1954. ),
  1955. 'indexes' => array(
  1956. 'biomaterialprop_idx1' => array(
  1957. 0 => 'biomaterial_id',
  1958. ),
  1959. 'biomaterialprop_idx2' => array(
  1960. 0 => 'type_id',
  1961. ),
  1962. ),
  1963. 'primary key' => array(
  1964. 0 => 'biomaterialprop_id',
  1965. ),
  1966. 'foreign keys' => array(
  1967. 'biomaterial' => array(
  1968. 'table' => 'biomaterial',
  1969. 'columns' => array(
  1970. 'biomaterial_id' => 'biomaterial_id',
  1971. ),
  1972. ),
  1973. 'cvterm' => array(
  1974. 'table' => 'cvterm',
  1975. 'columns' => array(
  1976. 'type_id' => 'cvterm_id',
  1977. ),
  1978. ),
  1979. ),
  1980. 'referring_tables' => array(
  1981. ),
  1982. );
  1983. return $description;
  1984. }
  1985. /**
  1986. * Implements hook_chado_schema_v1_3_biomaterial_relationship()
  1987. *
  1988. * Purpose: To describe the structure of 'biomaterial_relationship' to tripal
  1989. * @see chado_insert_record()
  1990. * @see chado_update_record()
  1991. * @see chado_select_record()
  1992. * @see chado_generate_var()
  1993. * @see chado_expan_var()
  1994. *
  1995. * @return
  1996. * An array describing the 'biomaterial_relationship' table
  1997. *
  1998. * @ingroup tripal_chado_v1.3_schema_api
  1999. *
  2000. */
  2001. function tripal_chado_chado_schema_v1_3_biomaterial_relationship() {
  2002. $description = array(
  2003. 'description' => '',
  2004. 'table' => 'biomaterial_relationship',
  2005. 'fields' => array(
  2006. 'biomaterial_relationship_id' => array(
  2007. 'size' => 'big',
  2008. 'type' => 'serial',
  2009. 'not null' => TRUE,
  2010. ),
  2011. 'subject_id' => array(
  2012. 'size' => 'big',
  2013. 'type' => 'int',
  2014. 'not null' => TRUE,
  2015. ),
  2016. 'type_id' => array(
  2017. 'size' => 'big',
  2018. 'type' => 'int',
  2019. 'not null' => TRUE,
  2020. ),
  2021. 'object_id' => array(
  2022. 'size' => 'big',
  2023. 'type' => 'int',
  2024. 'not null' => TRUE,
  2025. ),
  2026. ),
  2027. 'unique keys' => array(
  2028. 'biomaterial_relationship_c1' => array(
  2029. 0 => 'subject_id',
  2030. 1 => 'object_id',
  2031. 2 => 'type_id',
  2032. ),
  2033. ),
  2034. 'indexes' => array(
  2035. 'biomaterial_relationship_idx1' => array(
  2036. 0 => 'subject_id',
  2037. ),
  2038. 'biomaterial_relationship_idx2' => array(
  2039. 0 => 'object_id',
  2040. ),
  2041. 'biomaterial_relationship_idx3' => array(
  2042. 0 => 'type_id',
  2043. ),
  2044. ),
  2045. 'primary key' => array(
  2046. 0 => 'biomaterial_relationship_id',
  2047. ),
  2048. 'foreign keys' => array(
  2049. 'biomaterial' => array(
  2050. 'table' => 'biomaterial',
  2051. 'columns' => array(
  2052. 'subject_id' => 'biomaterial_id',
  2053. 'object_id' => 'biomaterial_id',
  2054. ),
  2055. ),
  2056. 'cvterm' => array(
  2057. 'table' => 'cvterm',
  2058. 'columns' => array(
  2059. 'type_id' => 'cvterm_id',
  2060. ),
  2061. ),
  2062. ),
  2063. 'referring_tables' => array(
  2064. ),
  2065. );
  2066. return $description;
  2067. }
  2068. /**
  2069. * Implements hook_chado_schema_v1_3_biomaterial_treatment()
  2070. *
  2071. * Purpose: To describe the structure of 'biomaterial_treatment' to tripal
  2072. * @see chado_insert_record()
  2073. * @see chado_update_record()
  2074. * @see chado_select_record()
  2075. * @see chado_generate_var()
  2076. * @see chado_expan_var()
  2077. *
  2078. * @return
  2079. * An array describing the 'biomaterial_treatment' table
  2080. *
  2081. * @ingroup tripal_chado_v1.3_schema_api
  2082. *
  2083. */
  2084. function tripal_chado_chado_schema_v1_3_biomaterial_treatment() {
  2085. $description = array(
  2086. 'description' => '',
  2087. 'table' => 'biomaterial_treatment',
  2088. 'fields' => array(
  2089. 'biomaterial_treatment_id' => array(
  2090. 'size' => 'big',
  2091. 'type' => 'serial',
  2092. 'not null' => TRUE,
  2093. ),
  2094. 'biomaterial_id' => array(
  2095. 'size' => 'big',
  2096. 'type' => 'int',
  2097. 'not null' => TRUE,
  2098. ),
  2099. 'treatment_id' => array(
  2100. 'size' => 'big',
  2101. 'type' => 'int',
  2102. 'not null' => TRUE,
  2103. ),
  2104. 'unittype_id' => array(
  2105. 'size' => 'big',
  2106. 'type' => 'int',
  2107. 'not null' => FALSE,
  2108. ),
  2109. 'value' => array(
  2110. 'size' => 'normal',
  2111. 'type' => 'float',
  2112. 'not null' => FALSE,
  2113. ),
  2114. 'rank' => array(
  2115. 'size' => 'normal',
  2116. 'type' => 'int',
  2117. 'not null' => TRUE,
  2118. 'default' => 0,
  2119. ),
  2120. ),
  2121. 'unique keys' => array(
  2122. 'biomaterial_treatment_c1' => array(
  2123. 0 => 'biomaterial_id',
  2124. 1 => 'treatment_id',
  2125. ),
  2126. ),
  2127. 'indexes' => array(
  2128. 'biomaterial_treatment_idx1' => array(
  2129. 0 => 'biomaterial_id',
  2130. ),
  2131. 'biomaterial_treatment_idx2' => array(
  2132. 0 => 'treatment_id',
  2133. ),
  2134. 'biomaterial_treatment_idx3' => array(
  2135. 0 => 'unittype_id',
  2136. ),
  2137. ),
  2138. 'primary key' => array(
  2139. 0 => 'biomaterial_treatment_id',
  2140. ),
  2141. 'foreign keys' => array(
  2142. 'biomaterial' => array(
  2143. 'table' => 'biomaterial',
  2144. 'columns' => array(
  2145. 'biomaterial_id' => 'biomaterial_id',
  2146. ),
  2147. ),
  2148. 'treatment' => array(
  2149. 'table' => 'treatment',
  2150. 'columns' => array(
  2151. 'treatment_id' => 'treatment_id',
  2152. ),
  2153. ),
  2154. 'cvterm' => array(
  2155. 'table' => 'cvterm',
  2156. 'columns' => array(
  2157. 'unittype_id' => 'cvterm_id',
  2158. ),
  2159. ),
  2160. ),
  2161. 'referring_tables' => array(
  2162. ),
  2163. );
  2164. return $description;
  2165. }
  2166. /**
  2167. * Implements hook_chado_schema_v1_3_cell_line()
  2168. *
  2169. * Purpose: To describe the structure of 'cell_line' to tripal
  2170. * @see chado_insert_record()
  2171. * @see chado_update_record()
  2172. * @see chado_select_record()
  2173. * @see chado_generate_var()
  2174. * @see chado_expan_var()
  2175. *
  2176. * @return
  2177. * An array describing the 'cell_line' table
  2178. *
  2179. * @ingroup tripal_chado_v1.3_schema_api
  2180. *
  2181. */
  2182. function tripal_chado_chado_schema_v1_3_cell_line() {
  2183. $description = array(
  2184. 'description' => '',
  2185. 'table' => 'cell_line',
  2186. 'fields' => array(
  2187. 'cell_line_id' => array(
  2188. 'size' => 'big',
  2189. 'type' => 'serial',
  2190. 'not null' => TRUE,
  2191. ),
  2192. 'name' => array(
  2193. 'size' => 'normal',
  2194. 'type' => 'varchar',
  2195. 'length' => '255',
  2196. 'not null' => FALSE,
  2197. ),
  2198. 'uniquename' => array(
  2199. 'size' => 'normal',
  2200. 'type' => 'varchar',
  2201. 'length' => '255',
  2202. 'not null' => TRUE,
  2203. ),
  2204. 'organism_id' => array(
  2205. 'size' => 'big',
  2206. 'type' => 'int',
  2207. 'not null' => TRUE,
  2208. ),
  2209. 'timeaccessioned' => array(
  2210. 'size' => 'normal',
  2211. 'type' => 'datetime',
  2212. 'not null' => TRUE,
  2213. 'default' => 'now()',
  2214. ),
  2215. 'timelastmodified' => array(
  2216. 'size' => 'normal',
  2217. 'type' => 'datetime',
  2218. 'not null' => TRUE,
  2219. 'default' => 'now()',
  2220. ),
  2221. ),
  2222. 'unique keys' => array(
  2223. 'cell_line_c1' => array(
  2224. 0 => 'uniquename',
  2225. 1 => 'organism_id',
  2226. ),
  2227. ),
  2228. 'primary key' => array(
  2229. 0 => 'cell_line_id',
  2230. ),
  2231. 'foreign keys' => array(
  2232. 'organism' => array(
  2233. 'table' => 'organism',
  2234. 'columns' => array(
  2235. 'organism_id' => 'organism_id',
  2236. ),
  2237. ),
  2238. ),
  2239. 'referring_tables' => array(
  2240. 0 => 'cell_line_cvterm',
  2241. 1 => 'cell_line_dbxref',
  2242. 2 => 'cell_line_feature',
  2243. 3 => 'cell_line_library',
  2244. 4 => 'cell_lineprop',
  2245. 5 => 'cell_line_pub',
  2246. 6 => 'cell_line_relationship',
  2247. 8 => 'cell_line_synonym',
  2248. ),
  2249. );
  2250. return $description;
  2251. }
  2252. /**
  2253. * Implements hook_chado_schema_v1_3_cell_line_cvterm()
  2254. *
  2255. * Purpose: To describe the structure of 'cell_line_cvterm' to tripal
  2256. * @see chado_insert_record()
  2257. * @see chado_update_record()
  2258. * @see chado_select_record()
  2259. * @see chado_generate_var()
  2260. * @see chado_expan_var()
  2261. *
  2262. * @return
  2263. * An array describing the 'cell_line_cvterm' table
  2264. *
  2265. * @ingroup tripal_chado_v1.3_schema_api
  2266. *
  2267. */
  2268. function tripal_chado_chado_schema_v1_3_cell_line_cvterm() {
  2269. $description = array(
  2270. 'description' => '',
  2271. 'table' => 'cell_line_cvterm',
  2272. 'fields' => array(
  2273. 'cell_line_cvterm_id' => array(
  2274. 'size' => 'big',
  2275. 'type' => 'serial',
  2276. 'not null' => TRUE,
  2277. ),
  2278. 'cell_line_id' => array(
  2279. 'size' => 'big',
  2280. 'type' => 'int',
  2281. 'not null' => TRUE,
  2282. ),
  2283. 'cvterm_id' => array(
  2284. 'size' => 'big',
  2285. 'type' => 'int',
  2286. 'not null' => TRUE,
  2287. ),
  2288. 'pub_id' => array(
  2289. 'size' => 'big',
  2290. 'type' => 'int',
  2291. 'not null' => TRUE,
  2292. ),
  2293. 'rank' => array(
  2294. 'size' => 'normal',
  2295. 'type' => 'int',
  2296. 'not null' => TRUE,
  2297. 'default' => 0,
  2298. ),
  2299. ),
  2300. 'unique keys' => array(
  2301. 'cell_line_cvterm_c1' => array(
  2302. 0 => 'cell_line_id',
  2303. 1 => 'cvterm_id',
  2304. 2 => 'pub_id',
  2305. 3 => 'rank',
  2306. ),
  2307. ),
  2308. 'primary key' => array(
  2309. 0 => 'cell_line_cvterm_id',
  2310. ),
  2311. 'foreign keys' => array(
  2312. 'cell_line' => array(
  2313. 'table' => 'cell_line',
  2314. 'columns' => array(
  2315. 'cell_line_id' => 'cell_line_id',
  2316. ),
  2317. ),
  2318. 'cvterm' => array(
  2319. 'table' => 'cvterm',
  2320. 'columns' => array(
  2321. 'cvterm_id' => 'cvterm_id',
  2322. ),
  2323. ),
  2324. 'pub' => array(
  2325. 'table' => 'pub',
  2326. 'columns' => array(
  2327. 'pub_id' => 'pub_id',
  2328. ),
  2329. ),
  2330. ),
  2331. 'referring_tables' => array(
  2332. 0 => 'cell_line_cvtermprop',
  2333. ),
  2334. );
  2335. return $description;
  2336. }
  2337. /**
  2338. * Implements hook_chado_schema_v1_3_cell_line_cvtermprop()
  2339. *
  2340. * Purpose: To describe the structure of 'cell_line_cvtermprop' to tripal
  2341. * @see chado_insert_record()
  2342. * @see chado_update_record()
  2343. * @see chado_select_record()
  2344. * @see chado_generate_var()
  2345. * @see chado_expan_var()
  2346. *
  2347. * @return
  2348. * An array describing the 'cell_line_cvtermprop' table
  2349. *
  2350. * @ingroup tripal_chado_v1.3_schema_api
  2351. *
  2352. */
  2353. function tripal_chado_chado_schema_v1_3_cell_line_cvtermprop() {
  2354. $description = array(
  2355. 'description' => '',
  2356. 'table' => 'cell_line_cvtermprop',
  2357. 'fields' => array(
  2358. 'cell_line_cvtermprop_id' => array(
  2359. 'size' => 'big',
  2360. 'type' => 'serial',
  2361. 'not null' => TRUE,
  2362. ),
  2363. 'cell_line_cvterm_id' => array(
  2364. 'size' => 'big',
  2365. 'type' => 'int',
  2366. 'not null' => TRUE,
  2367. ),
  2368. 'type_id' => array(
  2369. 'size' => 'big',
  2370. 'type' => 'int',
  2371. 'not null' => TRUE,
  2372. ),
  2373. 'value' => array(
  2374. 'size' => 'normal',
  2375. 'type' => 'text',
  2376. 'not null' => FALSE,
  2377. ),
  2378. 'rank' => array(
  2379. 'size' => 'normal',
  2380. 'type' => 'int',
  2381. 'not null' => TRUE,
  2382. 'default' => 0,
  2383. ),
  2384. ),
  2385. 'unique keys' => array(
  2386. 'cell_line_cvtermprop_c1' => array(
  2387. 0 => 'cell_line_cvterm_id',
  2388. 1 => 'type_id',
  2389. 2 => 'rank',
  2390. ),
  2391. ),
  2392. 'primary key' => array(
  2393. 0 => 'cell_line_cvtermprop_id',
  2394. ),
  2395. 'foreign keys' => array(
  2396. 'cell_line_cvterm' => array(
  2397. 'table' => 'cell_line_cvterm',
  2398. 'columns' => array(
  2399. 'cell_line_cvterm_id' => 'cell_line_cvterm_id',
  2400. ),
  2401. ),
  2402. 'cvterm' => array(
  2403. 'table' => 'cvterm',
  2404. 'columns' => array(
  2405. 'type_id' => 'cvterm_id',
  2406. ),
  2407. ),
  2408. ),
  2409. 'referring_tables' => array(
  2410. ),
  2411. );
  2412. return $description;
  2413. }
  2414. /**
  2415. * Implements hook_chado_schema_v1_3_cell_line_dbxref()
  2416. *
  2417. * Purpose: To describe the structure of 'cell_line_dbxref' to tripal
  2418. * @see chado_insert_record()
  2419. * @see chado_update_record()
  2420. * @see chado_select_record()
  2421. * @see chado_generate_var()
  2422. * @see chado_expan_var()
  2423. *
  2424. * @return
  2425. * An array describing the 'cell_line_dbxref' table
  2426. *
  2427. * @ingroup tripal_chado_v1.3_schema_api
  2428. *
  2429. */
  2430. function tripal_chado_chado_schema_v1_3_cell_line_dbxref() {
  2431. $description = array(
  2432. 'description' => '',
  2433. 'table' => 'cell_line_dbxref',
  2434. 'fields' => array(
  2435. 'cell_line_dbxref_id' => array(
  2436. 'size' => 'big',
  2437. 'type' => 'serial',
  2438. 'not null' => TRUE,
  2439. ),
  2440. 'cell_line_id' => array(
  2441. 'size' => 'big',
  2442. 'type' => 'int',
  2443. 'not null' => TRUE,
  2444. ),
  2445. 'dbxref_id' => array(
  2446. 'size' => 'big',
  2447. 'type' => 'int',
  2448. 'not null' => TRUE,
  2449. ),
  2450. 'is_current' => array(
  2451. 'size' => 'normal',
  2452. 'type' => 'boolean',
  2453. 'not null' => TRUE,
  2454. 'default' => 'true',
  2455. ),
  2456. ),
  2457. 'unique keys' => array(
  2458. 'cell_line_dbxref_c1' => array(
  2459. 0 => 'cell_line_id',
  2460. 1 => 'dbxref_id',
  2461. ),
  2462. ),
  2463. 'primary key' => array(
  2464. 0 => 'cell_line_dbxref_id',
  2465. ),
  2466. 'foreign keys' => array(
  2467. 'cell_line' => array(
  2468. 'table' => 'cell_line',
  2469. 'columns' => array(
  2470. 'cell_line_id' => 'cell_line_id',
  2471. ),
  2472. ),
  2473. 'dbxref' => array(
  2474. 'table' => 'dbxref',
  2475. 'columns' => array(
  2476. 'dbxref_id' => 'dbxref_id',
  2477. ),
  2478. ),
  2479. ),
  2480. 'referring_tables' => array(
  2481. ),
  2482. );
  2483. return $description;
  2484. }
  2485. /**
  2486. * Implements hook_chado_schema_v1_3_cell_line_feature()
  2487. *
  2488. * Purpose: To describe the structure of 'cell_line_feature' to tripal
  2489. * @see chado_insert_record()
  2490. * @see chado_update_record()
  2491. * @see chado_select_record()
  2492. * @see chado_generate_var()
  2493. * @see chado_expan_var()
  2494. *
  2495. * @return
  2496. * An array describing the 'cell_line_feature' table
  2497. *
  2498. * @ingroup tripal_chado_v1.3_schema_api
  2499. *
  2500. */
  2501. function tripal_chado_chado_schema_v1_3_cell_line_feature() {
  2502. $description = array(
  2503. 'description' => '',
  2504. 'table' => 'cell_line_feature',
  2505. 'fields' => array(
  2506. 'cell_line_feature_id' => array(
  2507. 'size' => 'big',
  2508. 'type' => 'serial',
  2509. 'not null' => TRUE,
  2510. ),
  2511. 'cell_line_id' => array(
  2512. 'size' => 'big',
  2513. 'type' => 'int',
  2514. 'not null' => TRUE,
  2515. ),
  2516. 'feature_id' => array(
  2517. 'size' => 'big',
  2518. 'type' => 'int',
  2519. 'not null' => TRUE,
  2520. ),
  2521. 'pub_id' => array(
  2522. 'size' => 'big',
  2523. 'type' => 'int',
  2524. 'not null' => TRUE,
  2525. ),
  2526. ),
  2527. 'unique keys' => array(
  2528. 'cell_line_feature_c1' => array(
  2529. 0 => 'cell_line_id',
  2530. 1 => 'feature_id',
  2531. 2 => 'pub_id',
  2532. ),
  2533. ),
  2534. 'primary key' => array(
  2535. 0 => 'cell_line_feature_id',
  2536. ),
  2537. 'foreign keys' => array(
  2538. 'cell_line' => array(
  2539. 'table' => 'cell_line',
  2540. 'columns' => array(
  2541. 'cell_line_id' => 'cell_line_id',
  2542. ),
  2543. ),
  2544. 'feature' => array(
  2545. 'table' => 'feature',
  2546. 'columns' => array(
  2547. 'feature_id' => 'feature_id',
  2548. ),
  2549. ),
  2550. 'pub' => array(
  2551. 'table' => 'pub',
  2552. 'columns' => array(
  2553. 'pub_id' => 'pub_id',
  2554. ),
  2555. ),
  2556. ),
  2557. 'referring_tables' => array(
  2558. ),
  2559. );
  2560. return $description;
  2561. }
  2562. /**
  2563. * Implements hook_chado_schema_v1_3_cell_line_library()
  2564. *
  2565. * Purpose: To describe the structure of 'cell_line_library' to tripal
  2566. * @see chado_insert_record()
  2567. * @see chado_update_record()
  2568. * @see chado_select_record()
  2569. * @see chado_generate_var()
  2570. * @see chado_expan_var()
  2571. *
  2572. * @return
  2573. * An array describing the 'cell_line_library' table
  2574. *
  2575. * @ingroup tripal_chado_v1.3_schema_api
  2576. *
  2577. */
  2578. function tripal_chado_chado_schema_v1_3_cell_line_library() {
  2579. $description = array(
  2580. 'description' => '',
  2581. 'table' => 'cell_line_library',
  2582. 'fields' => array(
  2583. 'cell_line_library_id' => array(
  2584. 'size' => 'big',
  2585. 'type' => 'serial',
  2586. 'not null' => TRUE,
  2587. ),
  2588. 'cell_line_id' => array(
  2589. 'size' => 'big',
  2590. 'type' => 'int',
  2591. 'not null' => TRUE,
  2592. ),
  2593. 'library_id' => array(
  2594. 'size' => 'big',
  2595. 'type' => 'int',
  2596. 'not null' => TRUE,
  2597. ),
  2598. 'pub_id' => array(
  2599. 'size' => 'big',
  2600. 'type' => 'int',
  2601. 'not null' => TRUE,
  2602. ),
  2603. ),
  2604. 'unique keys' => array(
  2605. 'cell_line_library_c1' => array(
  2606. 0 => 'cell_line_id',
  2607. 1 => 'library_id',
  2608. 2 => 'pub_id',
  2609. ),
  2610. ),
  2611. 'primary key' => array(
  2612. 0 => 'cell_line_library_id',
  2613. ),
  2614. 'foreign keys' => array(
  2615. 'cell_line' => array(
  2616. 'table' => 'cell_line',
  2617. 'columns' => array(
  2618. 'cell_line_id' => 'cell_line_id',
  2619. ),
  2620. ),
  2621. 'library' => array(
  2622. 'table' => 'library',
  2623. 'columns' => array(
  2624. 'library_id' => 'library_id',
  2625. ),
  2626. ),
  2627. 'pub' => array(
  2628. 'table' => 'pub',
  2629. 'columns' => array(
  2630. 'pub_id' => 'pub_id',
  2631. ),
  2632. ),
  2633. ),
  2634. 'referring_tables' => array(
  2635. ),
  2636. );
  2637. return $description;
  2638. }
  2639. /**
  2640. * Implements hook_chado_schema_v1_3_cell_lineprop()
  2641. *
  2642. * Purpose: To describe the structure of 'cell_lineprop' to tripal
  2643. * @see chado_insert_record()
  2644. * @see chado_update_record()
  2645. * @see chado_select_record()
  2646. * @see chado_generate_var()
  2647. * @see chado_expan_var()
  2648. *
  2649. * @return
  2650. * An array describing the 'cell_lineprop' table
  2651. *
  2652. * @ingroup tripal_chado_v1.3_schema_api
  2653. *
  2654. */
  2655. function tripal_chado_chado_schema_v1_3_cell_lineprop() {
  2656. $description = array(
  2657. 'description' => '',
  2658. 'table' => 'cell_lineprop',
  2659. 'fields' => array(
  2660. 'cell_lineprop_id' => array(
  2661. 'size' => 'big',
  2662. 'type' => 'serial',
  2663. 'not null' => TRUE,
  2664. ),
  2665. 'cell_line_id' => array(
  2666. 'size' => 'big',
  2667. 'type' => 'int',
  2668. 'not null' => TRUE,
  2669. ),
  2670. 'type_id' => array(
  2671. 'size' => 'big',
  2672. 'type' => 'int',
  2673. 'not null' => TRUE,
  2674. ),
  2675. 'value' => array(
  2676. 'size' => 'normal',
  2677. 'type' => 'text',
  2678. 'not null' => FALSE,
  2679. ),
  2680. 'rank' => array(
  2681. 'size' => 'normal',
  2682. 'type' => 'int',
  2683. 'not null' => TRUE,
  2684. 'default' => 0,
  2685. ),
  2686. ),
  2687. 'unique keys' => array(
  2688. 'cell_lineprop_c1' => array(
  2689. 0 => 'cell_line_id',
  2690. 1 => 'type_id',
  2691. 2 => 'rank',
  2692. ),
  2693. ),
  2694. 'primary key' => array(
  2695. 0 => 'cell_lineprop_id',
  2696. ),
  2697. 'foreign keys' => array(
  2698. 'cell_line' => array(
  2699. 'table' => 'cell_line',
  2700. 'columns' => array(
  2701. 'cell_line_id' => 'cell_line_id',
  2702. ),
  2703. ),
  2704. 'cvterm' => array(
  2705. 'table' => 'cvterm',
  2706. 'columns' => array(
  2707. 'type_id' => 'cvterm_id',
  2708. ),
  2709. ),
  2710. ),
  2711. 'referring_tables' => array(
  2712. 0 => 'cell_lineprop_pub',
  2713. ),
  2714. );
  2715. return $description;
  2716. }
  2717. /**
  2718. * Implements hook_chado_schema_v1_3_cell_lineprop_pub()
  2719. *
  2720. * Purpose: To describe the structure of 'cell_lineprop_pub' to tripal
  2721. * @see chado_insert_record()
  2722. * @see chado_update_record()
  2723. * @see chado_select_record()
  2724. * @see chado_generate_var()
  2725. * @see chado_expan_var()
  2726. *
  2727. * @return
  2728. * An array describing the 'cell_lineprop_pub' table
  2729. *
  2730. * @ingroup tripal_chado_v1.3_schema_api
  2731. *
  2732. */
  2733. function tripal_chado_chado_schema_v1_3_cell_lineprop_pub() {
  2734. $description = array(
  2735. 'description' => '',
  2736. 'table' => 'cell_lineprop_pub',
  2737. 'fields' => array(
  2738. 'cell_lineprop_pub_id' => array(
  2739. 'size' => 'big',
  2740. 'type' => 'serial',
  2741. 'not null' => TRUE,
  2742. ),
  2743. 'cell_lineprop_id' => array(
  2744. 'size' => 'big',
  2745. 'type' => 'int',
  2746. 'not null' => TRUE,
  2747. ),
  2748. 'pub_id' => array(
  2749. 'size' => 'big',
  2750. 'type' => 'int',
  2751. 'not null' => TRUE,
  2752. ),
  2753. ),
  2754. 'unique keys' => array(
  2755. 'cell_lineprop_pub_c1' => array(
  2756. 0 => 'cell_lineprop_id',
  2757. 1 => 'pub_id',
  2758. ),
  2759. ),
  2760. 'primary key' => array(
  2761. 0 => 'cell_lineprop_pub_id',
  2762. ),
  2763. 'foreign keys' => array(
  2764. 'cell_lineprop' => array(
  2765. 'table' => 'cell_lineprop',
  2766. 'columns' => array(
  2767. 'cell_lineprop_id' => 'cell_lineprop_id',
  2768. ),
  2769. ),
  2770. 'pub' => array(
  2771. 'table' => 'pub',
  2772. 'columns' => array(
  2773. 'pub_id' => 'pub_id',
  2774. ),
  2775. ),
  2776. ),
  2777. 'referring_tables' => array(
  2778. ),
  2779. );
  2780. return $description;
  2781. }
  2782. /**
  2783. * Implements hook_chado_schema_v1_3_cell_line_pub()
  2784. *
  2785. * Purpose: To describe the structure of 'cell_line_pub' to tripal
  2786. * @see chado_insert_record()
  2787. * @see chado_update_record()
  2788. * @see chado_select_record()
  2789. * @see chado_generate_var()
  2790. * @see chado_expan_var()
  2791. *
  2792. * @return
  2793. * An array describing the 'cell_line_pub' table
  2794. *
  2795. * @ingroup tripal_chado_v1.3_schema_api
  2796. *
  2797. */
  2798. function tripal_chado_chado_schema_v1_3_cell_line_pub() {
  2799. $description = array(
  2800. 'description' => '',
  2801. 'table' => 'cell_line_pub',
  2802. 'fields' => array(
  2803. 'cell_line_pub_id' => array(
  2804. 'size' => 'big',
  2805. 'type' => 'serial',
  2806. 'not null' => TRUE,
  2807. ),
  2808. 'cell_line_id' => array(
  2809. 'size' => 'big',
  2810. 'type' => 'int',
  2811. 'not null' => TRUE,
  2812. ),
  2813. 'pub_id' => array(
  2814. 'size' => 'big',
  2815. 'type' => 'int',
  2816. 'not null' => TRUE,
  2817. ),
  2818. ),
  2819. 'unique keys' => array(
  2820. 'cell_line_pub_c1' => array(
  2821. 0 => 'cell_line_id',
  2822. 1 => 'pub_id',
  2823. ),
  2824. ),
  2825. 'primary key' => array(
  2826. 0 => 'cell_line_pub_id',
  2827. ),
  2828. 'foreign keys' => array(
  2829. 'cell_line' => array(
  2830. 'table' => 'cell_line',
  2831. 'columns' => array(
  2832. 'cell_line_id' => 'cell_line_id',
  2833. ),
  2834. ),
  2835. 'pub' => array(
  2836. 'table' => 'pub',
  2837. 'columns' => array(
  2838. 'pub_id' => 'pub_id',
  2839. ),
  2840. ),
  2841. ),
  2842. 'referring_tables' => array(
  2843. ),
  2844. );
  2845. return $description;
  2846. }
  2847. /**
  2848. * Implements hook_chado_schema_v1_3_cell_line_relationship()
  2849. *
  2850. * Purpose: To describe the structure of 'cell_line_relationship' to tripal
  2851. * @see chado_insert_record()
  2852. * @see chado_update_record()
  2853. * @see chado_select_record()
  2854. * @see chado_generate_var()
  2855. * @see chado_expan_var()
  2856. *
  2857. * @return
  2858. * An array describing the 'cell_line_relationship' table
  2859. *
  2860. * @ingroup tripal_chado_v1.3_schema_api
  2861. *
  2862. */
  2863. function tripal_chado_chado_schema_v1_3_cell_line_relationship() {
  2864. $description = array(
  2865. 'description' => '',
  2866. 'table' => 'cell_line_relationship',
  2867. 'fields' => array(
  2868. 'cell_line_relationship_id' => array(
  2869. 'size' => 'big',
  2870. 'type' => 'serial',
  2871. 'not null' => TRUE,
  2872. ),
  2873. 'subject_id' => array(
  2874. 'size' => 'big',
  2875. 'type' => 'int',
  2876. 'not null' => TRUE,
  2877. ),
  2878. 'object_id' => array(
  2879. 'size' => 'big',
  2880. 'type' => 'int',
  2881. 'not null' => TRUE,
  2882. ),
  2883. 'type_id' => array(
  2884. 'size' => 'big',
  2885. 'type' => 'int',
  2886. 'not null' => TRUE,
  2887. ),
  2888. ),
  2889. 'unique keys' => array(
  2890. 'cell_line_relationship_c1' => array(
  2891. 0 => 'subject_id',
  2892. 1 => 'object_id',
  2893. 2 => 'type_id',
  2894. ),
  2895. ),
  2896. 'primary key' => array(
  2897. 0 => 'cell_line_relationship_id',
  2898. ),
  2899. 'foreign keys' => array(
  2900. 'cell_line' => array(
  2901. 'table' => 'cell_line',
  2902. 'columns' => array(
  2903. 'subject_id' => 'cell_line_id',
  2904. 'object_id' => 'cell_line_id',
  2905. ),
  2906. ),
  2907. 'cvterm' => array(
  2908. 'table' => 'cvterm',
  2909. 'columns' => array(
  2910. 'type_id' => 'cvterm_id',
  2911. ),
  2912. ),
  2913. ),
  2914. 'referring_tables' => array(
  2915. ),
  2916. );
  2917. return $description;
  2918. }
  2919. /**
  2920. * Implements hook_chado_schema_v1_3_cell_line_synonym()
  2921. *
  2922. * Purpose: To describe the structure of 'cell_line_synonym' to tripal
  2923. * @see chado_insert_record()
  2924. * @see chado_update_record()
  2925. * @see chado_select_record()
  2926. * @see chado_generate_var()
  2927. * @see chado_expan_var()
  2928. *
  2929. * @return
  2930. * An array describing the 'cell_line_synonym' table
  2931. *
  2932. * @ingroup tripal_chado_v1.3_schema_api
  2933. *
  2934. */
  2935. function tripal_chado_chado_schema_v1_3_cell_line_synonym() {
  2936. $description = array(
  2937. 'description' => '',
  2938. 'table' => 'cell_line_synonym',
  2939. 'fields' => array(
  2940. 'cell_line_synonym_id' => array(
  2941. 'size' => 'big',
  2942. 'type' => 'serial',
  2943. 'not null' => TRUE,
  2944. ),
  2945. 'cell_line_id' => array(
  2946. 'size' => 'big',
  2947. 'type' => 'int',
  2948. 'not null' => TRUE,
  2949. ),
  2950. 'synonym_id' => array(
  2951. 'size' => 'big',
  2952. 'type' => 'int',
  2953. 'not null' => TRUE,
  2954. ),
  2955. 'pub_id' => array(
  2956. 'size' => 'big',
  2957. 'type' => 'int',
  2958. 'not null' => TRUE,
  2959. ),
  2960. 'is_current' => array(
  2961. 'size' => 'normal',
  2962. 'type' => 'boolean',
  2963. 'not null' => TRUE,
  2964. 'default' => FALSE,
  2965. ),
  2966. 'is_internal' => array(
  2967. 'size' => 'normal',
  2968. 'type' => 'boolean',
  2969. 'not null' => TRUE,
  2970. 'default' => FALSE,
  2971. ),
  2972. ),
  2973. 'unique keys' => array(
  2974. 'cell_line_synonym_c1' => array(
  2975. 0 => 'synonym_id',
  2976. 1 => 'cell_line_id',
  2977. 2 => 'pub_id',
  2978. ),
  2979. ),
  2980. 'primary key' => array(
  2981. 0 => 'cell_line_synonym_id',
  2982. ),
  2983. 'foreign keys' => array(
  2984. 'cell_line' => array(
  2985. 'table' => 'cell_line',
  2986. 'columns' => array(
  2987. 'cell_line_id' => 'cell_line_id',
  2988. ),
  2989. ),
  2990. 'synonym' => array(
  2991. 'table' => 'synonym',
  2992. 'columns' => array(
  2993. 'synonym_id' => 'synonym_id',
  2994. ),
  2995. ),
  2996. 'pub' => array(
  2997. 'table' => 'pub',
  2998. 'columns' => array(
  2999. 'pub_id' => 'pub_id',
  3000. ),
  3001. ),
  3002. ),
  3003. 'referring_tables' => array(
  3004. ),
  3005. );
  3006. return $description;
  3007. }
  3008. /**
  3009. * Implements hook_chado_schema_v1_3_chadoprop()
  3010. *
  3011. * Purpose: To describe the structure of 'chadoprop' to tripal
  3012. * @see chado_insert_record()
  3013. * @see chado_update_record()
  3014. * @see chado_select_record()
  3015. * @see chado_generate_var()
  3016. * @see chado_expan_var()
  3017. *
  3018. * @return
  3019. * An array describing the 'chadoprop' table
  3020. *
  3021. * @ingroup tripal_chado_v1.3_schema_api
  3022. *
  3023. */
  3024. function tripal_chado_chado_schema_v1_3_chadoprop() {
  3025. $description = array(
  3026. 'description' => '',
  3027. 'table' => 'chadoprop',
  3028. 'fields' => array(
  3029. 'chadoprop_id' => array(
  3030. 'size' => 'big',
  3031. 'type' => 'serial',
  3032. 'not null' => TRUE,
  3033. ),
  3034. 'type_id' => array(
  3035. 'size' => 'big',
  3036. 'type' => 'int',
  3037. 'not null' => TRUE,
  3038. ),
  3039. 'value' => array(
  3040. 'size' => 'normal',
  3041. 'type' => 'text',
  3042. 'not null' => FALSE,
  3043. ),
  3044. 'rank' => array(
  3045. 'size' => 'normal',
  3046. 'type' => 'int',
  3047. 'not null' => TRUE,
  3048. 'default' => 0,
  3049. ),
  3050. ),
  3051. 'unique keys' => array(
  3052. 'chadoprop_c1' => array(
  3053. 0 => 'type_id',
  3054. 1 => 'rank',
  3055. ),
  3056. ),
  3057. 'primary key' => array(
  3058. 0 => 'chadoprop_id',
  3059. ),
  3060. 'foreign keys' => array(
  3061. 'cvterm' => array(
  3062. 'table' => 'cvterm',
  3063. 'columns' => array(
  3064. 'type_id' => 'cvterm_id',
  3065. ),
  3066. ),
  3067. ),
  3068. 'referring_tables' => array(
  3069. ),
  3070. );
  3071. return $description;
  3072. }
  3073. /**
  3074. * Implements hook_chado_schema_v1_3_channel()
  3075. *
  3076. * Purpose: To describe the structure of 'channel' to tripal
  3077. * @see chado_insert_record()
  3078. * @see chado_update_record()
  3079. * @see chado_select_record()
  3080. * @see chado_generate_var()
  3081. * @see chado_expan_var()
  3082. *
  3083. * @return
  3084. * An array describing the 'channel' table
  3085. *
  3086. * @ingroup tripal_chado_v1.3_schema_api
  3087. *
  3088. */
  3089. function tripal_chado_chado_schema_v1_3_channel() {
  3090. $description = array(
  3091. 'description' => '',
  3092. 'table' => 'channel',
  3093. 'fields' => array(
  3094. 'channel_id' => array(
  3095. 'size' => 'big',
  3096. 'type' => 'serial',
  3097. 'not null' => TRUE,
  3098. ),
  3099. 'name' => array(
  3100. 'size' => 'normal',
  3101. 'type' => 'text',
  3102. 'not null' => TRUE,
  3103. ),
  3104. 'definition' => array(
  3105. 'size' => 'normal',
  3106. 'type' => 'text',
  3107. 'not null' => TRUE,
  3108. ),
  3109. ),
  3110. 'unique keys' => array(
  3111. 'channel_c1' => array(
  3112. 0 => 'name',
  3113. ),
  3114. ),
  3115. 'primary key' => array(
  3116. 0 => 'channel_id',
  3117. ),
  3118. 'foreign keys' => array(
  3119. ),
  3120. 'referring_tables' => array(
  3121. 0 => 'acquisition',
  3122. 1 => 'assay_biomaterial',
  3123. ),
  3124. );
  3125. return $description;
  3126. }
  3127. /**
  3128. * Implements hook_chado_schema_v1_3_contact()
  3129. *
  3130. * Purpose: To describe the structure of 'contact' to tripal
  3131. * @see chado_insert_record()
  3132. * @see chado_update_record()
  3133. * @see chado_select_record()
  3134. * @see chado_generate_var()
  3135. * @see chado_expan_var()
  3136. *
  3137. * @return
  3138. * An array describing the 'contact' table
  3139. *
  3140. * @ingroup tripal_chado_v1.3_schema_api
  3141. *
  3142. */
  3143. function tripal_chado_chado_schema_v1_3_contact() {
  3144. $description = array(
  3145. 'description' => '',
  3146. 'table' => 'contact',
  3147. 'fields' => array(
  3148. 'contact_id' => array(
  3149. 'size' => 'big',
  3150. 'type' => 'serial',
  3151. 'not null' => TRUE,
  3152. ),
  3153. 'type_id' => array(
  3154. 'size' => 'big',
  3155. 'type' => 'int',
  3156. 'not null' => FALSE,
  3157. ),
  3158. 'name' => array(
  3159. 'size' => 'normal',
  3160. 'type' => 'varchar',
  3161. 'length' => '255',
  3162. 'not null' => TRUE,
  3163. ),
  3164. 'description' => array(
  3165. 'size' => 'normal',
  3166. 'type' => 'varchar',
  3167. 'length' => '255',
  3168. 'not null' => FALSE,
  3169. ),
  3170. ),
  3171. 'unique keys' => array(
  3172. 'contact_c1' => array(
  3173. 0 => 'name',
  3174. ),
  3175. ),
  3176. 'primary key' => array(
  3177. 0 => 'contact_id',
  3178. ),
  3179. 'indexes' => array(
  3180. 'library_contact_idx2' => array(
  3181. 0 => 'contact_id',
  3182. ),
  3183. 'pubauthor_contact_idx2' => array(
  3184. 0 => 'contact_id',
  3185. ),
  3186. ),
  3187. 'foreign keys' => array(
  3188. 'cvterm' => array(
  3189. 'table' => 'cvterm',
  3190. 'columns' => array(
  3191. 'type_id' => 'cvterm_id',
  3192. ),
  3193. ),
  3194. ),
  3195. 'referring_tables' => array(
  3196. 0 => 'arraydesign',
  3197. 1 => 'assay',
  3198. 2 => 'biomaterial',
  3199. 3 => 'contactprop',
  3200. 4 => 'contact_relationship',
  3201. 6 => 'feature_contact',
  3202. 7 => 'featuremap_contact',
  3203. 8 => 'library_contact',
  3204. 9 => 'nd_experiment_contact',
  3205. 10 => 'project_contact',
  3206. 11 => 'pubauthor_contact',
  3207. 12 => 'quantification',
  3208. 13 => 'stockcollection',
  3209. 14 => 'study',
  3210. ),
  3211. );
  3212. return $description;
  3213. }
  3214. /**
  3215. * Implements hook_chado_schema_v1_3_contactprop()
  3216. *
  3217. * Purpose: To describe the structure of 'contactprop' to tripal
  3218. * @see chado_insert_record()
  3219. * @see chado_update_record()
  3220. * @see chado_select_record()
  3221. * @see chado_generate_var()
  3222. * @see chado_expan_var()
  3223. *
  3224. * @return
  3225. * An array describing the 'contactprop' table
  3226. *
  3227. * @ingroup tripal_chado_v1.3_schema_api
  3228. *
  3229. */
  3230. function tripal_chado_chado_schema_v1_3_contactprop() {
  3231. $description = array(
  3232. 'description' => '',
  3233. 'table' => 'contactprop',
  3234. 'fields' => array(
  3235. 'contactprop_id' => array(
  3236. 'size' => 'big',
  3237. 'type' => 'serial',
  3238. 'not null' => TRUE,
  3239. ),
  3240. 'contact_id' => array(
  3241. 'size' => 'big',
  3242. 'type' => 'int',
  3243. 'not null' => TRUE,
  3244. ),
  3245. 'type_id' => array(
  3246. 'size' => 'big',
  3247. 'type' => 'int',
  3248. 'not null' => TRUE,
  3249. ),
  3250. 'value' => array(
  3251. 'size' => 'normal',
  3252. 'type' => 'text',
  3253. 'not null' => FALSE,
  3254. ),
  3255. 'rank' => array(
  3256. 'size' => 'normal',
  3257. 'type' => 'int',
  3258. 'not null' => TRUE,
  3259. 'default' => 0,
  3260. ),
  3261. ),
  3262. 'unique keys' => array(
  3263. 'contactprop_c1' => array(
  3264. 0 => 'contact_id',
  3265. 1 => 'type_id',
  3266. 2 => 'rank',
  3267. ),
  3268. ),
  3269. 'indexes' => array(
  3270. 'contactprop_idx1' => array(
  3271. 0 => 'contact_id',
  3272. ),
  3273. 'contactprop_idx2' => array(
  3274. 0 => 'type_id',
  3275. ),
  3276. ),
  3277. 'primary key' => array(
  3278. 0 => 'contactprop_id',
  3279. ),
  3280. 'foreign keys' => array(
  3281. 'contact' => array(
  3282. 'table' => 'contact',
  3283. 'columns' => array(
  3284. 'contact_id' => 'contact_id',
  3285. ),
  3286. ),
  3287. 'cvterm' => array(
  3288. 'table' => 'cvterm',
  3289. 'columns' => array(
  3290. 'type_id' => 'cvterm_id',
  3291. ),
  3292. ),
  3293. ),
  3294. 'referring_tables' => array(
  3295. ),
  3296. );
  3297. return $description;
  3298. }
  3299. /**
  3300. * Implements hook_chado_schema_v1_3_contact_relationship()
  3301. *
  3302. * Purpose: To describe the structure of 'contact_relationship' to tripal
  3303. * @see chado_insert_record()
  3304. * @see chado_update_record()
  3305. * @see chado_select_record()
  3306. * @see chado_generate_var()
  3307. * @see chado_expan_var()
  3308. *
  3309. * @return
  3310. * An array describing the 'contact_relationship' table
  3311. *
  3312. * @ingroup tripal_chado_v1.3_schema_api
  3313. *
  3314. */
  3315. function tripal_chado_chado_schema_v1_3_contact_relationship() {
  3316. $description = array(
  3317. 'description' => '',
  3318. 'table' => 'contact_relationship',
  3319. 'fields' => array(
  3320. 'contact_relationship_id' => array(
  3321. 'size' => 'big',
  3322. 'type' => 'serial',
  3323. 'not null' => TRUE,
  3324. ),
  3325. 'type_id' => array(
  3326. 'size' => 'big',
  3327. 'type' => 'int',
  3328. 'not null' => TRUE,
  3329. ),
  3330. 'subject_id' => array(
  3331. 'size' => 'big',
  3332. 'type' => 'int',
  3333. 'not null' => TRUE,
  3334. ),
  3335. 'object_id' => array(
  3336. 'size' => 'big',
  3337. 'type' => 'int',
  3338. 'not null' => TRUE,
  3339. ),
  3340. ),
  3341. 'unique keys' => array(
  3342. 'contact_relationship_c1' => array(
  3343. 0 => 'subject_id',
  3344. 1 => 'object_id',
  3345. 2 => 'type_id',
  3346. ),
  3347. ),
  3348. 'indexes' => array(
  3349. 'contact_relationship_idx1' => array(
  3350. 0 => 'type_id',
  3351. ),
  3352. 'contact_relationship_idx2' => array(
  3353. 0 => 'subject_id',
  3354. ),
  3355. 'contact_relationship_idx3' => array(
  3356. 0 => 'object_id',
  3357. ),
  3358. ),
  3359. 'primary key' => array(
  3360. 0 => 'contact_relationship_id',
  3361. ),
  3362. 'foreign keys' => array(
  3363. 'cvterm' => array(
  3364. 'table' => 'cvterm',
  3365. 'columns' => array(
  3366. 'type_id' => 'cvterm_id',
  3367. ),
  3368. ),
  3369. 'contact' => array(
  3370. 'table' => 'contact',
  3371. 'columns' => array(
  3372. 'subject_id' => 'contact_id',
  3373. 'object_id' => 'contact_id',
  3374. ),
  3375. ),
  3376. ),
  3377. 'referring_tables' => array(
  3378. ),
  3379. );
  3380. return $description;
  3381. }
  3382. /**
  3383. * Implements hook_chado_schema_v1_3_control()
  3384. *
  3385. * Purpose: To describe the structure of 'control' to tripal
  3386. * @see chado_insert_record()
  3387. * @see chado_update_record()
  3388. * @see chado_select_record()
  3389. * @see chado_generate_var()
  3390. * @see chado_expan_var()
  3391. *
  3392. * @return
  3393. * An array describing the 'control' table
  3394. *
  3395. * @ingroup tripal_chado_v1.3_schema_api
  3396. *
  3397. */
  3398. function tripal_chado_chado_schema_v1_3_control() {
  3399. $description = array(
  3400. 'description' => '',
  3401. 'table' => 'control',
  3402. 'fields' => array(
  3403. 'control_id' => array(
  3404. 'size' => 'big',
  3405. 'type' => 'serial',
  3406. 'not null' => TRUE,
  3407. ),
  3408. 'type_id' => array(
  3409. 'size' => 'big',
  3410. 'type' => 'int',
  3411. 'not null' => TRUE,
  3412. ),
  3413. 'assay_id' => array(
  3414. 'size' => 'big',
  3415. 'type' => 'int',
  3416. 'not null' => TRUE,
  3417. ),
  3418. 'tableinfo_id' => array(
  3419. 'size' => 'big',
  3420. 'type' => 'int',
  3421. 'not null' => TRUE,
  3422. ),
  3423. 'row_id' => array(
  3424. 'size' => 'normal',
  3425. 'type' => 'int',
  3426. 'not null' => TRUE,
  3427. ),
  3428. 'name' => array(
  3429. 'size' => 'normal',
  3430. 'type' => 'text',
  3431. 'not null' => FALSE,
  3432. ),
  3433. 'value' => array(
  3434. 'size' => 'normal',
  3435. 'type' => 'text',
  3436. 'not null' => FALSE,
  3437. ),
  3438. 'rank' => array(
  3439. 'size' => 'normal',
  3440. 'type' => 'int',
  3441. 'not null' => TRUE,
  3442. 'default' => 0,
  3443. ),
  3444. ),
  3445. 'indexes' => array(
  3446. 'control_idx1' => array(
  3447. 0 => 'type_id',
  3448. ),
  3449. 'control_idx2' => array(
  3450. 0 => 'assay_id',
  3451. ),
  3452. 'control_idx3' => array(
  3453. 0 => 'tableinfo_id',
  3454. ),
  3455. 'control_idx4' => array(
  3456. 0 => 'row_id',
  3457. ),
  3458. ),
  3459. 'primary key' => array(
  3460. 0 => 'control_id',
  3461. ),
  3462. 'foreign keys' => array(
  3463. 'cvterm' => array(
  3464. 'table' => 'cvterm',
  3465. 'columns' => array(
  3466. 'type_id' => 'cvterm_id',
  3467. ),
  3468. ),
  3469. 'assay' => array(
  3470. 'table' => 'assay',
  3471. 'columns' => array(
  3472. 'assay_id' => 'assay_id',
  3473. ),
  3474. ),
  3475. 'tableinfo' => array(
  3476. 'table' => 'tableinfo',
  3477. 'columns' => array(
  3478. 'tableinfo_id' => 'tableinfo_id',
  3479. ),
  3480. ),
  3481. ),
  3482. 'referring_tables' => array(
  3483. ),
  3484. );
  3485. return $description;
  3486. }
  3487. /**
  3488. * Implements hook_chado_schema_v1_3_cv()
  3489. *
  3490. * Purpose: To describe the structure of 'cv' to tripal
  3491. * @see chado_insert_record()
  3492. * @see chado_update_record()
  3493. * @see chado_select_record()
  3494. * @see chado_generate_var()
  3495. * @see chado_expan_var()
  3496. *
  3497. * @return
  3498. * An array describing the 'cv' table
  3499. *
  3500. * @ingroup tripal_chado_v1.3_schema_api
  3501. *
  3502. */
  3503. function tripal_chado_chado_schema_v1_3_cv() {
  3504. $description = array(
  3505. 'description' => '',
  3506. 'table' => 'cv',
  3507. 'fields' => array(
  3508. 'cv_id' => array(
  3509. 'size' => 'big',
  3510. 'type' => 'serial',
  3511. 'not null' => TRUE,
  3512. ),
  3513. 'name' => array(
  3514. 'size' => 'normal',
  3515. 'type' => 'varchar',
  3516. 'length' => '255',
  3517. 'not null' => TRUE,
  3518. ),
  3519. 'definition' => array(
  3520. 'size' => 'normal',
  3521. 'type' => 'text',
  3522. 'not null' => FALSE,
  3523. ),
  3524. ),
  3525. 'unique keys' => array(
  3526. 'cv_c1' => array(
  3527. 0 => 'name',
  3528. ),
  3529. ),
  3530. 'primary key' => array(
  3531. 0 => 'cv_id',
  3532. ),
  3533. 'foreign keys' => array(
  3534. ),
  3535. 'referring_tables' => array(
  3536. 0 => 'cvprop',
  3537. 1 => 'cvterm',
  3538. 2 => 'cvtermpath',
  3539. ),
  3540. );
  3541. return $description;
  3542. }
  3543. /**
  3544. * Implements hook_chado_schema_v1_3_cvprop()
  3545. *
  3546. * Purpose: To describe the structure of 'cvprop' to tripal
  3547. * @see chado_insert_record()
  3548. * @see chado_update_record()
  3549. * @see chado_select_record()
  3550. * @see chado_generate_var()
  3551. * @see chado_expan_var()
  3552. *
  3553. * @return
  3554. * An array describing the 'cvprop' table
  3555. *
  3556. * @ingroup tripal_chado_v1.3_schema_api
  3557. *
  3558. */
  3559. function tripal_chado_chado_schema_v1_3_cvprop() {
  3560. $description = array(
  3561. 'description' => '',
  3562. 'table' => 'cvprop',
  3563. 'fields' => array(
  3564. 'cvprop_id' => array(
  3565. 'size' => 'big',
  3566. 'type' => 'serial',
  3567. 'not null' => TRUE,
  3568. ),
  3569. 'cv_id' => array(
  3570. 'size' => 'big',
  3571. 'type' => 'int',
  3572. 'not null' => TRUE,
  3573. ),
  3574. 'type_id' => array(
  3575. 'size' => 'big',
  3576. 'type' => 'int',
  3577. 'not null' => TRUE,
  3578. ),
  3579. 'value' => array(
  3580. 'size' => 'normal',
  3581. 'type' => 'text',
  3582. 'not null' => FALSE,
  3583. ),
  3584. 'rank' => array(
  3585. 'size' => 'normal',
  3586. 'type' => 'int',
  3587. 'not null' => TRUE,
  3588. 'default' => 0,
  3589. ),
  3590. ),
  3591. 'unique keys' => array(
  3592. 'cvprop_c1' => array(
  3593. 0 => 'cv_id',
  3594. 1 => 'type_id',
  3595. 2 => 'rank',
  3596. ),
  3597. ),
  3598. 'primary key' => array(
  3599. 0 => 'cvprop_id',
  3600. ),
  3601. 'foreign keys' => array(
  3602. 'cv' => array(
  3603. 'table' => 'cv',
  3604. 'columns' => array(
  3605. 'cv_id' => 'cv_id',
  3606. ),
  3607. ),
  3608. 'cvterm' => array(
  3609. 'table' => 'cvterm',
  3610. 'columns' => array(
  3611. 'type_id' => 'cvterm_id',
  3612. ),
  3613. ),
  3614. ),
  3615. 'referring_tables' => array(
  3616. ),
  3617. );
  3618. return $description;
  3619. }
  3620. /**
  3621. * Implements hook_chado_schema_v1_3_cv_root_mview()
  3622. *
  3623. * Purpose: To describe the structure of 'cv_root_mview' to tripal
  3624. * @see chado_insert_record()
  3625. * @see chado_update_record()
  3626. * @see chado_select_record()
  3627. * @see chado_generate_var()
  3628. * @see chado_expan_var()
  3629. *
  3630. * @return
  3631. * An array describing the 'cv_root_mview' table
  3632. *
  3633. * @ingroup tripal_chado_v1.3_schema_api
  3634. *
  3635. */
  3636. function tripal_chado_chado_schema_v1_3_cv_root_mview() {
  3637. $description = array(
  3638. 'description' => '',
  3639. 'table' => 'cv_root_mview',
  3640. 'fields' => array(
  3641. 'name' => array(
  3642. 'size' => 'normal',
  3643. 'type' => 'varchar',
  3644. 'length' => '255',
  3645. 'not null' => TRUE,
  3646. ),
  3647. 'cvterm_id' => array(
  3648. 'size' => 'normal',
  3649. 'type' => 'int',
  3650. 'not null' => TRUE,
  3651. ),
  3652. 'cv_id' => array(
  3653. 'size' => 'normal',
  3654. 'type' => 'int',
  3655. 'not null' => TRUE,
  3656. ),
  3657. 'cv_name' => array(
  3658. 'size' => 'normal',
  3659. 'type' => 'varchar',
  3660. 'length' => '255',
  3661. 'not null' => TRUE,
  3662. ),
  3663. ),
  3664. 'indexes' => array(
  3665. 'cv_root_mview_indx1' => array(
  3666. 0 => 'cvterm_id',
  3667. ),
  3668. 'cv_root_mview_indx2' => array(
  3669. 0 => 'cv_id',
  3670. ),
  3671. ),
  3672. 'foreign keys' => array(
  3673. ),
  3674. 'referring_tables' => array(
  3675. ),
  3676. );
  3677. return $description;
  3678. }
  3679. /**
  3680. * Implements hook_chado_schema_v1_3_cvterm()
  3681. *
  3682. * Purpose: To describe the structure of 'cvterm' to tripal
  3683. * @see chado_insert_record()
  3684. * @see chado_update_record()
  3685. * @see chado_select_record()
  3686. * @see chado_generate_var()
  3687. * @see chado_expan_var()
  3688. *
  3689. * @return
  3690. * An array describing the 'cvterm' table
  3691. *
  3692. * @ingroup tripal_chado_v1.3_schema_api
  3693. *
  3694. */
  3695. function tripal_chado_chado_schema_v1_3_cvterm() {
  3696. $description = array(
  3697. 'description' => '',
  3698. 'table' => 'cvterm',
  3699. 'fields' => array(
  3700. 'cvterm_id' => array(
  3701. 'size' => 'big',
  3702. 'type' => 'serial',
  3703. 'not null' => TRUE,
  3704. ),
  3705. 'cv_id' => array(
  3706. 'size' => 'big',
  3707. 'type' => 'int',
  3708. 'not null' => TRUE,
  3709. ),
  3710. 'name' => array(
  3711. 'size' => 'normal',
  3712. 'type' => 'varchar',
  3713. 'length' => '1024',
  3714. 'not null' => TRUE,
  3715. ),
  3716. 'definition' => array(
  3717. 'size' => 'normal',
  3718. 'type' => 'text',
  3719. 'not null' => FALSE,
  3720. ),
  3721. 'dbxref_id' => array(
  3722. 'size' => 'big',
  3723. 'type' => 'int',
  3724. 'not null' => TRUE,
  3725. ),
  3726. 'is_obsolete' => array(
  3727. 'size' => 'normal',
  3728. 'type' => 'int',
  3729. 'not null' => TRUE,
  3730. 'default' => 0,
  3731. ),
  3732. 'is_relationshiptype' => array(
  3733. 'size' => 'normal',
  3734. 'type' => 'int',
  3735. 'not null' => TRUE,
  3736. 'default' => 0,
  3737. ),
  3738. ),
  3739. 'unique keys' => array(
  3740. 'cvterm_c1' => array(
  3741. 0 => 'name',
  3742. 1 => 'cv_id',
  3743. 2 => 'is_obsolete',
  3744. ),
  3745. 'cvterm_c2' => array(
  3746. 0 => 'dbxref_id',
  3747. ),
  3748. ),
  3749. 'indexes' => array(
  3750. 'cvterm_idx1' => array(
  3751. 0 => 'cv_id',
  3752. ),
  3753. 'cvterm_idx2' => array(
  3754. 0 => 'name',
  3755. ),
  3756. 'cvterm_idx3' => array(
  3757. 0 => 'dbxref_id',
  3758. ),
  3759. ),
  3760. 'primary key' => array(
  3761. 0 => 'cvterm_id',
  3762. ),
  3763. 'foreign keys' => array(
  3764. 'cv' => array(
  3765. 'table' => 'cv',
  3766. 'columns' => array(
  3767. 'cv_id' => 'cv_id',
  3768. ),
  3769. ),
  3770. 'dbxref' => array(
  3771. 'table' => 'dbxref',
  3772. 'columns' => array(
  3773. 'dbxref_id' => 'dbxref_id',
  3774. ),
  3775. ),
  3776. ),
  3777. 'referring_tables' => array(
  3778. 0 => 'acquisitionprop',
  3779. 1 => 'acquisition_relationship',
  3780. 2 => 'analysis_cvterm',
  3781. 3 => 'analysisfeatureprop',
  3782. 4 => 'analysisprop',
  3783. 5 => 'analysis_relationship',
  3784. 6 => 'arraydesign',
  3785. 8 => 'arraydesignprop',
  3786. 9 => 'assayprop',
  3787. 10 => 'biomaterialprop',
  3788. 11 => 'biomaterial_relationship',
  3789. 12 => 'biomaterial_treatment',
  3790. 13 => 'cell_line_cvterm',
  3791. 14 => 'cell_line_cvtermprop',
  3792. 15 => 'cell_lineprop',
  3793. 16 => 'cell_line_relationship',
  3794. 17 => 'chadoprop',
  3795. 18 => 'contact',
  3796. 19 => 'contactprop',
  3797. 20 => 'contact_relationship',
  3798. 21 => 'control',
  3799. 22 => 'cvprop',
  3800. 23 => 'cvterm_dbxref',
  3801. 24 => 'cvtermpath',
  3802. 27 => 'cvtermprop',
  3803. 29 => 'cvterm_relationship',
  3804. 32 => 'cvtermsynonym',
  3805. 34 => 'dbprop',
  3806. 35 => 'dbxrefprop',
  3807. 36 => 'element',
  3808. 37 => 'element_relationship',
  3809. 38 => 'elementresult_relationship',
  3810. 39 => 'environment_cvterm',
  3811. 40 => 'expression_cvterm',
  3812. 42 => 'expression_cvtermprop',
  3813. 43 => 'expressionprop',
  3814. 44 => 'feature',
  3815. 45 => 'feature_cvterm',
  3816. 46 => 'feature_cvtermprop',
  3817. 47 => 'feature_expressionprop',
  3818. 48 => 'feature_genotype',
  3819. 49 => 'featuremap',
  3820. 50 => 'featuremapprop',
  3821. 51 => 'featureposprop',
  3822. 52 => 'featureprop',
  3823. 53 => 'feature_pubprop',
  3824. 54 => 'feature_relationship',
  3825. 55 => 'feature_relationshipprop',
  3826. 56 => 'genotype',
  3827. 57 => 'genotypeprop',
  3828. 58 => 'library',
  3829. 59 => 'library_cvterm',
  3830. 60 => 'library_expressionprop',
  3831. 61 => 'library_featureprop',
  3832. 62 => 'libraryprop',
  3833. 63 => 'library_relationship',
  3834. 64 => 'nd_experiment',
  3835. 65 => 'nd_experiment_analysis',
  3836. 66 => 'nd_experimentprop',
  3837. 67 => 'nd_experiment_stock',
  3838. 68 => 'nd_experiment_stockprop',
  3839. 69 => 'nd_geolocationprop',
  3840. 70 => 'nd_protocol',
  3841. 71 => 'nd_protocolprop',
  3842. 72 => 'nd_protocol_reagent',
  3843. 73 => 'nd_reagent',
  3844. 74 => 'nd_reagentprop',
  3845. 75 => 'nd_reagent_relationship',
  3846. 76 => 'organism',
  3847. 77 => 'organism_cvterm',
  3848. 78 => 'organism_cvtermprop',
  3849. 79 => 'organismprop',
  3850. 80 => 'organism_relationship',
  3851. 81 => 'phendesc',
  3852. 82 => 'phenotype',
  3853. 86 => 'phenotype_comparison_cvterm',
  3854. 87 => 'phenotype_cvterm',
  3855. 88 => 'phenotypeprop',
  3856. 89 => 'phenstatement',
  3857. 90 => 'phylonode',
  3858. 91 => 'phylonodeprop',
  3859. 92 => 'phylonode_relationship',
  3860. 93 => 'phylotree',
  3861. 94 => 'phylotreeprop',
  3862. 95 => 'projectprop',
  3863. 96 => 'project_relationship',
  3864. 97 => 'protocol',
  3865. 98 => 'protocolparam',
  3866. 100 => 'pub',
  3867. 101 => 'pubprop',
  3868. 102 => 'pub_relationship',
  3869. 103 => 'quantificationprop',
  3870. 104 => 'quantification_relationship',
  3871. 105 => 'stock',
  3872. 106 => 'stockcollection',
  3873. 107 => 'stockcollectionprop',
  3874. 108 => 'stock_cvterm',
  3875. 109 => 'stock_cvtermprop',
  3876. 110 => 'stock_dbxrefprop',
  3877. 111 => 'stock_feature',
  3878. 112 => 'stock_featuremap',
  3879. 113 => 'stockprop',
  3880. 114 => 'stock_relationship',
  3881. 115 => 'stock_relationship_cvterm',
  3882. 116 => 'studydesignprop',
  3883. 117 => 'studyfactor',
  3884. 118 => 'studyprop',
  3885. 119 => 'studyprop_feature',
  3886. 120 => 'synonym',
  3887. 121 => 'treatment',
  3888. ),
  3889. );
  3890. return $description;
  3891. }
  3892. /**
  3893. * Implements hook_chado_schema_v1_3_cvterm_dbxref()
  3894. *
  3895. * Purpose: To describe the structure of 'cvterm_dbxref' to tripal
  3896. * @see chado_insert_record()
  3897. * @see chado_update_record()
  3898. * @see chado_select_record()
  3899. * @see chado_generate_var()
  3900. * @see chado_expan_var()
  3901. *
  3902. * @return
  3903. * An array describing the 'cvterm_dbxref' table
  3904. *
  3905. * @ingroup tripal_chado_v1.3_schema_api
  3906. *
  3907. */
  3908. function tripal_chado_chado_schema_v1_3_cvterm_dbxref() {
  3909. $description = array(
  3910. 'description' => '',
  3911. 'table' => 'cvterm_dbxref',
  3912. 'fields' => array(
  3913. 'cvterm_dbxref_id' => array(
  3914. 'size' => 'big',
  3915. 'type' => 'serial',
  3916. 'not null' => TRUE,
  3917. ),
  3918. 'cvterm_id' => array(
  3919. 'size' => 'big',
  3920. 'type' => 'int',
  3921. 'not null' => TRUE,
  3922. ),
  3923. 'dbxref_id' => array(
  3924. 'size' => 'big',
  3925. 'type' => 'int',
  3926. 'not null' => TRUE,
  3927. ),
  3928. 'is_for_definition' => array(
  3929. 'size' => 'normal',
  3930. 'type' => 'int',
  3931. 'not null' => TRUE,
  3932. 'default' => 0,
  3933. ),
  3934. ),
  3935. 'unique keys' => array(
  3936. 'cvterm_dbxref_c1' => array(
  3937. 0 => 'cvterm_id',
  3938. 1 => 'dbxref_id',
  3939. ),
  3940. ),
  3941. 'indexes' => array(
  3942. 'cvterm_dbxref_idx1' => array(
  3943. 0 => 'cvterm_id',
  3944. ),
  3945. 'cvterm_dbxref_idx2' => array(
  3946. 0 => 'dbxref_id',
  3947. ),
  3948. ),
  3949. 'primary key' => array(
  3950. 0 => 'cvterm_dbxref_id',
  3951. ),
  3952. 'foreign keys' => array(
  3953. 'cvterm' => array(
  3954. 'table' => 'cvterm',
  3955. 'columns' => array(
  3956. 'cvterm_id' => 'cvterm_id',
  3957. ),
  3958. ),
  3959. 'dbxref' => array(
  3960. 'table' => 'dbxref',
  3961. 'columns' => array(
  3962. 'dbxref_id' => 'dbxref_id',
  3963. ),
  3964. ),
  3965. ),
  3966. 'referring_tables' => array(
  3967. ),
  3968. );
  3969. return $description;
  3970. }
  3971. /**
  3972. * Implements hook_chado_schema_v1_3_cvtermpath()
  3973. *
  3974. * Purpose: To describe the structure of 'cvtermpath' to tripal
  3975. * @see chado_insert_record()
  3976. * @see chado_update_record()
  3977. * @see chado_select_record()
  3978. * @see chado_generate_var()
  3979. * @see chado_expan_var()
  3980. *
  3981. * @return
  3982. * An array describing the 'cvtermpath' table
  3983. *
  3984. * @ingroup tripal_chado_v1.3_schema_api
  3985. *
  3986. */
  3987. function tripal_chado_chado_schema_v1_3_cvtermpath() {
  3988. $description = array(
  3989. 'description' => '',
  3990. 'table' => 'cvtermpath',
  3991. 'fields' => array(
  3992. 'cvtermpath_id' => array(
  3993. 'size' => 'big',
  3994. 'type' => 'serial',
  3995. 'not null' => TRUE,
  3996. ),
  3997. 'type_id' => array(
  3998. 'size' => 'big',
  3999. 'type' => 'int',
  4000. 'not null' => FALSE,
  4001. ),
  4002. 'subject_id' => array(
  4003. 'size' => 'big',
  4004. 'type' => 'int',
  4005. 'not null' => TRUE,
  4006. ),
  4007. 'object_id' => array(
  4008. 'size' => 'big',
  4009. 'type' => 'int',
  4010. 'not null' => TRUE,
  4011. ),
  4012. 'cv_id' => array(
  4013. 'size' => 'big',
  4014. 'type' => 'int',
  4015. 'not null' => TRUE,
  4016. ),
  4017. 'pathdistance' => array(
  4018. 'size' => 'normal',
  4019. 'type' => 'int',
  4020. 'not null' => FALSE,
  4021. ),
  4022. ),
  4023. 'unique keys' => array(
  4024. 'cvtermpath_c1' => array(
  4025. 0 => 'subject_id',
  4026. 1 => 'object_id',
  4027. 2 => 'type_id',
  4028. 3 => 'pathdistance',
  4029. ),
  4030. ),
  4031. 'indexes' => array(
  4032. 'cvtermpath_idx1' => array(
  4033. 0 => 'type_id',
  4034. ),
  4035. 'cvtermpath_idx2' => array(
  4036. 0 => 'subject_id',
  4037. ),
  4038. 'cvtermpath_idx3' => array(
  4039. 0 => 'object_id',
  4040. ),
  4041. 'cvtermpath_idx4' => array(
  4042. 0 => 'cv_id',
  4043. ),
  4044. ),
  4045. 'primary key' => array(
  4046. 0 => 'cvtermpath_id',
  4047. ),
  4048. 'foreign keys' => array(
  4049. 'cvterm' => array(
  4050. 'table' => 'cvterm',
  4051. 'columns' => array(
  4052. 'type_id' => 'cvterm_id',
  4053. 'subject_id' => 'cvterm_id',
  4054. 'object_id' => 'cvterm_id',
  4055. ),
  4056. ),
  4057. 'cv' => array(
  4058. 'table' => 'cv',
  4059. 'columns' => array(
  4060. 'cv_id' => 'cv_id',
  4061. ),
  4062. ),
  4063. ),
  4064. 'referring_tables' => array(
  4065. ),
  4066. );
  4067. return $description;
  4068. }
  4069. /**
  4070. * Implements hook_chado_schema_v1_3_cvtermprop()
  4071. *
  4072. * Purpose: To describe the structure of 'cvtermprop' to tripal
  4073. * @see chado_insert_record()
  4074. * @see chado_update_record()
  4075. * @see chado_select_record()
  4076. * @see chado_generate_var()
  4077. * @see chado_expan_var()
  4078. *
  4079. * @return
  4080. * An array describing the 'cvtermprop' table
  4081. *
  4082. * @ingroup tripal_chado_v1.3_schema_api
  4083. *
  4084. */
  4085. function tripal_chado_chado_schema_v1_3_cvtermprop() {
  4086. $description = array(
  4087. 'description' => '',
  4088. 'table' => 'cvtermprop',
  4089. 'fields' => array(
  4090. 'cvtermprop_id' => array(
  4091. 'size' => 'big',
  4092. 'type' => 'serial',
  4093. 'not null' => TRUE,
  4094. ),
  4095. 'cvterm_id' => array(
  4096. 'size' => 'big',
  4097. 'type' => 'int',
  4098. 'not null' => TRUE,
  4099. ),
  4100. 'type_id' => array(
  4101. 'size' => 'big',
  4102. 'type' => 'int',
  4103. 'not null' => TRUE,
  4104. ),
  4105. 'value' => array(
  4106. 'size' => 'normal',
  4107. 'type' => 'text',
  4108. 'not null' => TRUE,
  4109. 'default' => '',
  4110. ),
  4111. 'rank' => array(
  4112. 'size' => 'normal',
  4113. 'type' => 'int',
  4114. 'not null' => TRUE,
  4115. 'default' => 0,
  4116. ),
  4117. ),
  4118. 'unique keys' => array(
  4119. 'cvtermprop_cvterm_id_type_id_value_rank_key' => array(
  4120. 0 => 'cvterm_id',
  4121. 1 => 'type_id',
  4122. 2 => 'value',
  4123. 3 => 'rank',
  4124. ),
  4125. ),
  4126. 'indexes' => array(
  4127. 'cvtermprop_idx1' => array(
  4128. 0 => 'cvterm_id',
  4129. ),
  4130. 'cvtermprop_idx2' => array(
  4131. 0 => 'type_id',
  4132. ),
  4133. ),
  4134. 'primary key' => array(
  4135. 0 => 'cvtermprop_id',
  4136. ),
  4137. 'foreign keys' => array(
  4138. 'cvterm' => array(
  4139. 'table' => 'cvterm',
  4140. 'columns' => array(
  4141. 'cvterm_id' => 'cvterm_id',
  4142. 'type_id' => 'cvterm_id',
  4143. ),
  4144. ),
  4145. ),
  4146. 'referring_tables' => array(
  4147. ),
  4148. );
  4149. return $description;
  4150. }
  4151. /**
  4152. * Implements hook_chado_schema_v1_3_cvterm_relationship()
  4153. *
  4154. * Purpose: To describe the structure of 'cvterm_relationship' to tripal
  4155. * @see chado_insert_record()
  4156. * @see chado_update_record()
  4157. * @see chado_select_record()
  4158. * @see chado_generate_var()
  4159. * @see chado_expan_var()
  4160. *
  4161. * @return
  4162. * An array describing the 'cvterm_relationship' table
  4163. *
  4164. * @ingroup tripal_chado_v1.3_schema_api
  4165. *
  4166. */
  4167. function tripal_chado_chado_schema_v1_3_cvterm_relationship() {
  4168. $description = array(
  4169. 'description' => '',
  4170. 'table' => 'cvterm_relationship',
  4171. 'fields' => array(
  4172. 'cvterm_relationship_id' => array(
  4173. 'size' => 'big',
  4174. 'type' => 'serial',
  4175. 'not null' => TRUE,
  4176. ),
  4177. 'type_id' => array(
  4178. 'size' => 'big',
  4179. 'type' => 'int',
  4180. 'not null' => TRUE,
  4181. ),
  4182. 'subject_id' => array(
  4183. 'size' => 'big',
  4184. 'type' => 'int',
  4185. 'not null' => TRUE,
  4186. ),
  4187. 'object_id' => array(
  4188. 'size' => 'big',
  4189. 'type' => 'int',
  4190. 'not null' => TRUE,
  4191. ),
  4192. ),
  4193. 'unique keys' => array(
  4194. 'cvterm_relationship_c1' => array(
  4195. 0 => 'subject_id',
  4196. 1 => 'object_id',
  4197. 2 => 'type_id',
  4198. ),
  4199. ),
  4200. 'indexes' => array(
  4201. 'cvterm_relationship_idx1' => array(
  4202. 0 => 'type_id',
  4203. ),
  4204. 'cvterm_relationship_idx2' => array(
  4205. 0 => 'subject_id',
  4206. ),
  4207. 'cvterm_relationship_idx3' => array(
  4208. 0 => 'object_id',
  4209. ),
  4210. ),
  4211. 'primary key' => array(
  4212. 0 => 'cvterm_relationship_id',
  4213. ),
  4214. 'foreign keys' => array(
  4215. 'cvterm' => array(
  4216. 'table' => 'cvterm',
  4217. 'columns' => array(
  4218. 'type_id' => 'cvterm_id',
  4219. 'subject_id' => 'cvterm_id',
  4220. 'object_id' => 'cvterm_id',
  4221. ),
  4222. ),
  4223. ),
  4224. 'referring_tables' => array(
  4225. ),
  4226. );
  4227. return $description;
  4228. }
  4229. /**
  4230. * Implements hook_chado_schema_v1_3_cvtermsynonym()
  4231. *
  4232. * Purpose: To describe the structure of 'cvtermsynonym' to tripal
  4233. * @see chado_insert_record()
  4234. * @see chado_update_record()
  4235. * @see chado_select_record()
  4236. * @see chado_generate_var()
  4237. * @see chado_expan_var()
  4238. *
  4239. * @return
  4240. * An array describing the 'cvtermsynonym' table
  4241. *
  4242. * @ingroup tripal_chado_v1.3_schema_api
  4243. *
  4244. */
  4245. function tripal_chado_chado_schema_v1_3_cvtermsynonym() {
  4246. $description = array(
  4247. 'description' => '',
  4248. 'table' => 'cvtermsynonym',
  4249. 'fields' => array(
  4250. 'cvtermsynonym_id' => array(
  4251. 'size' => 'big',
  4252. 'type' => 'serial',
  4253. 'not null' => TRUE,
  4254. ),
  4255. 'cvterm_id' => array(
  4256. 'size' => 'big',
  4257. 'type' => 'int',
  4258. 'not null' => TRUE,
  4259. ),
  4260. 'synonym' => array(
  4261. 'size' => 'normal',
  4262. 'type' => 'varchar',
  4263. 'length' => '1024',
  4264. 'not null' => TRUE,
  4265. ),
  4266. 'type_id' => array(
  4267. 'size' => 'big',
  4268. 'type' => 'int',
  4269. 'not null' => FALSE,
  4270. ),
  4271. ),
  4272. 'unique keys' => array(
  4273. 'cvtermsynonym_c1' => array(
  4274. 0 => 'cvterm_id',
  4275. 1 => 'synonym',
  4276. ),
  4277. ),
  4278. 'indexes' => array(
  4279. 'cvtermsynonym_idx1' => array(
  4280. 0 => 'cvterm_id',
  4281. ),
  4282. ),
  4283. 'primary key' => array(
  4284. 0 => 'cvtermsynonym_id',
  4285. ),
  4286. 'foreign keys' => array(
  4287. 'cvterm' => array(
  4288. 'table' => 'cvterm',
  4289. 'columns' => array(
  4290. 'cvterm_id' => 'cvterm_id',
  4291. 'type_id' => 'cvterm_id',
  4292. ),
  4293. ),
  4294. ),
  4295. 'referring_tables' => array(
  4296. ),
  4297. );
  4298. return $description;
  4299. }
  4300. /**
  4301. * Implements hook_chado_schema_v1_3_db()
  4302. *
  4303. * Purpose: To describe the structure of 'db' to tripal
  4304. * @see chado_insert_record()
  4305. * @see chado_update_record()
  4306. * @see chado_select_record()
  4307. * @see chado_generate_var()
  4308. * @see chado_expan_var()
  4309. *
  4310. * @return
  4311. * An array describing the 'db' table
  4312. *
  4313. * @ingroup tripal_chado_v1.3_schema_api
  4314. *
  4315. */
  4316. function tripal_chado_chado_schema_v1_3_db() {
  4317. $description = array(
  4318. 'description' => '',
  4319. 'table' => 'db',
  4320. 'fields' => array(
  4321. 'db_id' => array(
  4322. 'size' => 'big',
  4323. 'type' => 'serial',
  4324. 'not null' => TRUE,
  4325. ),
  4326. 'name' => array(
  4327. 'size' => 'normal',
  4328. 'type' => 'varchar',
  4329. 'length' => '255',
  4330. 'not null' => TRUE,
  4331. ),
  4332. 'description' => array(
  4333. 'size' => 'normal',
  4334. 'type' => 'varchar',
  4335. 'length' => '255',
  4336. 'not null' => FALSE,
  4337. ),
  4338. 'urlprefix' => array(
  4339. 'size' => 'normal',
  4340. 'type' => 'varchar',
  4341. 'length' => '255',
  4342. 'not null' => FALSE,
  4343. ),
  4344. 'url' => array(
  4345. 'size' => 'normal',
  4346. 'type' => 'varchar',
  4347. 'length' => '255',
  4348. 'not null' => FALSE,
  4349. ),
  4350. ),
  4351. 'unique keys' => array(
  4352. 'db_c1' => array(
  4353. 0 => 'name',
  4354. ),
  4355. ),
  4356. 'primary key' => array(
  4357. 0 => 'db_id',
  4358. ),
  4359. 'foreign keys' => array(
  4360. ),
  4361. 'referring_tables' => array(
  4362. 0 => 'dbprop',
  4363. 1 => 'dbxref',
  4364. 2 => 'stockcollection_db',
  4365. ),
  4366. );
  4367. return $description;
  4368. }
  4369. /**
  4370. * Implements hook_chado_schema_v1_3_dbprop()
  4371. *
  4372. * Purpose: To describe the structure of 'dbprop' to tripal
  4373. * @see chado_insert_record()
  4374. * @see chado_update_record()
  4375. * @see chado_select_record()
  4376. * @see chado_generate_var()
  4377. * @see chado_expan_var()
  4378. *
  4379. * @return
  4380. * An array describing the 'dbprop' table
  4381. *
  4382. * @ingroup tripal_chado_v1.3_schema_api
  4383. *
  4384. */
  4385. function tripal_chado_chado_schema_v1_3_dbprop() {
  4386. $description = array(
  4387. 'description' => '',
  4388. 'table' => 'dbprop',
  4389. 'fields' => array(
  4390. 'dbprop_id' => array(
  4391. 'size' => 'big',
  4392. 'type' => 'serial',
  4393. 'not null' => TRUE,
  4394. ),
  4395. 'db_id' => array(
  4396. 'size' => 'big',
  4397. 'type' => 'int',
  4398. 'not null' => TRUE,
  4399. ),
  4400. 'type_id' => array(
  4401. 'size' => 'big',
  4402. 'type' => 'int',
  4403. 'not null' => TRUE,
  4404. ),
  4405. 'value' => array(
  4406. 'size' => 'normal',
  4407. 'type' => 'text',
  4408. 'not null' => FALSE,
  4409. ),
  4410. 'rank' => array(
  4411. 'size' => 'normal',
  4412. 'type' => 'int',
  4413. 'not null' => TRUE,
  4414. 'default' => 0,
  4415. ),
  4416. ),
  4417. 'unique keys' => array(
  4418. 'dbprop_c1' => array(
  4419. 0 => 'db_id',
  4420. 1 => 'type_id',
  4421. 2 => 'rank',
  4422. ),
  4423. ),
  4424. 'indexes' => array(
  4425. 'dbprop_idx1' => array(
  4426. 0 => 'db_id',
  4427. ),
  4428. 'dbprop_idx2' => array(
  4429. 0 => 'type_id',
  4430. ),
  4431. ),
  4432. 'primary key' => array(
  4433. 0 => 'dbprop_id',
  4434. ),
  4435. 'foreign keys' => array(
  4436. 'cvterm' => array(
  4437. 'table' => 'cvterm',
  4438. 'columns' => array(
  4439. 'type_id' => 'cvterm_id',
  4440. ),
  4441. ),
  4442. 'db' => array(
  4443. 'table' => 'db',
  4444. 'columns' => array(
  4445. 'db_id' => 'db_id',
  4446. ),
  4447. ),
  4448. ),
  4449. 'referring_tables' => array(
  4450. ),
  4451. );
  4452. return $description;
  4453. }
  4454. /**
  4455. * Implements hook_chado_schema_v1_3_dbxref()
  4456. *
  4457. * Purpose: To describe the structure of 'dbxref' to tripal
  4458. * @see chado_insert_record()
  4459. * @see chado_update_record()
  4460. * @see chado_select_record()
  4461. * @see chado_generate_var()
  4462. * @see chado_expan_var()
  4463. *
  4464. * @return
  4465. * An array describing the 'dbxref' table
  4466. *
  4467. * @ingroup tripal_chado_v1.3_schema_api
  4468. *
  4469. */
  4470. function tripal_chado_chado_schema_v1_3_dbxref() {
  4471. $description = array(
  4472. 'description' => '',
  4473. 'table' => 'dbxref',
  4474. 'fields' => array(
  4475. 'dbxref_id' => array(
  4476. 'size' => 'big',
  4477. 'type' => 'serial',
  4478. 'not null' => TRUE,
  4479. ),
  4480. 'db_id' => array(
  4481. 'size' => 'big',
  4482. 'type' => 'int',
  4483. 'not null' => TRUE,
  4484. ),
  4485. 'accession' => array(
  4486. 'size' => 'normal',
  4487. 'type' => 'varchar',
  4488. 'length' => '1024',
  4489. 'not null' => TRUE,
  4490. ),
  4491. 'version' => array(
  4492. 'size' => 'normal',
  4493. 'type' => 'varchar',
  4494. 'length' => '255',
  4495. 'not null' => TRUE,
  4496. 'default' => '',
  4497. ),
  4498. 'description' => array(
  4499. 'size' => 'normal',
  4500. 'type' => 'text',
  4501. 'not null' => FALSE,
  4502. ),
  4503. ),
  4504. 'unique keys' => array(
  4505. 'dbxref_c1' => array(
  4506. 0 => 'db_id',
  4507. 1 => 'accession',
  4508. 2 => 'version',
  4509. ),
  4510. ),
  4511. 'indexes' => array(
  4512. 'dbxref_idx1' => array(
  4513. 0 => 'db_id',
  4514. ),
  4515. 'dbxref_idx2' => array(
  4516. 0 => 'accession',
  4517. ),
  4518. 'dbxref_idx3' => array(
  4519. 0 => 'version',
  4520. ),
  4521. ),
  4522. 'primary key' => array(
  4523. 0 => 'dbxref_id',
  4524. ),
  4525. 'foreign keys' => array(
  4526. 'db' => array(
  4527. 'table' => 'db',
  4528. 'columns' => array(
  4529. 'db_id' => 'db_id',
  4530. ),
  4531. ),
  4532. ),
  4533. 'referring_tables' => array(
  4534. 0 => 'analysis_dbxref',
  4535. 1 => 'arraydesign',
  4536. 2 => 'assay',
  4537. 3 => 'biomaterial',
  4538. 4 => 'biomaterial_dbxref',
  4539. 5 => 'cell_line_dbxref',
  4540. 6 => 'cvterm',
  4541. 7 => 'cvterm_dbxref',
  4542. 8 => 'dbxrefprop',
  4543. 9 => 'element',
  4544. 10 => 'feature',
  4545. 11 => 'feature_cvterm_dbxref',
  4546. 12 => 'feature_dbxref',
  4547. 13 => 'featuremap_dbxref',
  4548. 14 => 'library_dbxref',
  4549. 15 => 'nd_experiment_dbxref',
  4550. 16 => 'nd_experiment_stock_dbxref',
  4551. 17 => 'organism_dbxref',
  4552. 18 => 'phylonode_dbxref',
  4553. 19 => 'phylotree',
  4554. 20 => 'project_dbxref',
  4555. 21 => 'protocol',
  4556. 22 => 'pub_dbxref',
  4557. 23 => 'stock',
  4558. 24 => 'stock_dbxref',
  4559. 25 => 'study',
  4560. ),
  4561. );
  4562. return $description;
  4563. }
  4564. /**
  4565. * Implements hook_chado_schema_v1_3_dbxrefprop()
  4566. *
  4567. * Purpose: To describe the structure of 'dbxrefprop' to tripal
  4568. * @see chado_insert_record()
  4569. * @see chado_update_record()
  4570. * @see chado_select_record()
  4571. * @see chado_generate_var()
  4572. * @see chado_expan_var()
  4573. *
  4574. * @return
  4575. * An array describing the 'dbxrefprop' table
  4576. *
  4577. * @ingroup tripal_chado_v1.3_schema_api
  4578. *
  4579. */
  4580. function tripal_chado_chado_schema_v1_3_dbxrefprop() {
  4581. $description = array(
  4582. 'description' => '',
  4583. 'table' => 'dbxrefprop',
  4584. 'fields' => array(
  4585. 'dbxrefprop_id' => array(
  4586. 'size' => 'big',
  4587. 'type' => 'serial',
  4588. 'not null' => TRUE,
  4589. ),
  4590. 'dbxref_id' => array(
  4591. 'size' => 'big',
  4592. 'type' => 'int',
  4593. 'not null' => TRUE,
  4594. ),
  4595. 'type_id' => array(
  4596. 'size' => 'big',
  4597. 'type' => 'int',
  4598. 'not null' => TRUE,
  4599. ),
  4600. 'value' => array(
  4601. 'size' => 'normal',
  4602. 'type' => 'text',
  4603. 'not null' => TRUE,
  4604. 'default' => '',
  4605. ),
  4606. 'rank' => array(
  4607. 'size' => 'normal',
  4608. 'type' => 'int',
  4609. 'not null' => TRUE,
  4610. 'default' => 0,
  4611. ),
  4612. ),
  4613. 'unique keys' => array(
  4614. 'dbxrefprop_c1' => array(
  4615. 0 => 'dbxref_id',
  4616. 1 => 'type_id',
  4617. 2 => 'rank',
  4618. ),
  4619. ),
  4620. 'indexes' => array(
  4621. 'dbxrefprop_idx1' => array(
  4622. 0 => 'dbxref_id',
  4623. ),
  4624. 'dbxrefprop_idx2' => array(
  4625. 0 => 'type_id',
  4626. ),
  4627. ),
  4628. 'primary key' => array(
  4629. 0 => 'dbxrefprop_id',
  4630. ),
  4631. 'foreign keys' => array(
  4632. 'dbxref' => array(
  4633. 'table' => 'dbxref',
  4634. 'columns' => array(
  4635. 'dbxref_id' => 'dbxref_id',
  4636. ),
  4637. ),
  4638. 'cvterm' => array(
  4639. 'table' => 'cvterm',
  4640. 'columns' => array(
  4641. 'type_id' => 'cvterm_id',
  4642. ),
  4643. ),
  4644. ),
  4645. 'referring_tables' => array(
  4646. ),
  4647. );
  4648. return $description;
  4649. }
  4650. /**
  4651. * Implements hook_chado_schema_v1_3_eimage()
  4652. *
  4653. * Purpose: To describe the structure of 'eimage' to tripal
  4654. * @see chado_insert_record()
  4655. * @see chado_update_record()
  4656. * @see chado_select_record()
  4657. * @see chado_generate_var()
  4658. * @see chado_expan_var()
  4659. *
  4660. * @return
  4661. * An array describing the 'eimage' table
  4662. *
  4663. * @ingroup tripal_chado_v1.3_schema_api
  4664. *
  4665. */
  4666. function tripal_chado_chado_schema_v1_3_eimage() {
  4667. $description = array(
  4668. 'description' => '',
  4669. 'table' => 'eimage',
  4670. 'fields' => array(
  4671. 'eimage_id' => array(
  4672. 'size' => 'big',
  4673. 'type' => 'serial',
  4674. 'not null' => TRUE,
  4675. ),
  4676. 'eimage_data' => array(
  4677. 'size' => 'normal',
  4678. 'type' => 'text',
  4679. 'not null' => FALSE,
  4680. ),
  4681. 'eimage_type' => array(
  4682. 'size' => 'normal',
  4683. 'type' => 'varchar',
  4684. 'length' => '255',
  4685. 'not null' => TRUE,
  4686. ),
  4687. 'image_uri' => array(
  4688. 'size' => 'normal',
  4689. 'type' => 'varchar',
  4690. 'length' => '255',
  4691. 'not null' => FALSE,
  4692. ),
  4693. ),
  4694. 'primary key' => array(
  4695. 0 => 'eimage_id',
  4696. ),
  4697. 'foreign keys' => array(
  4698. ),
  4699. 'referring_tables' => array(
  4700. 0 => 'expression_image',
  4701. ),
  4702. );
  4703. return $description;
  4704. }
  4705. /**
  4706. * Implements hook_chado_schema_v1_3_element()
  4707. *
  4708. * Purpose: To describe the structure of 'element' to tripal
  4709. * @see chado_insert_record()
  4710. * @see chado_update_record()
  4711. * @see chado_select_record()
  4712. * @see chado_generate_var()
  4713. * @see chado_expan_var()
  4714. *
  4715. * @return
  4716. * An array describing the 'element' table
  4717. *
  4718. * @ingroup tripal_chado_v1.3_schema_api
  4719. *
  4720. */
  4721. function tripal_chado_chado_schema_v1_3_element() {
  4722. $description = array(
  4723. 'description' => '',
  4724. 'table' => 'element',
  4725. 'fields' => array(
  4726. 'element_id' => array(
  4727. 'size' => 'big',
  4728. 'type' => 'serial',
  4729. 'not null' => TRUE,
  4730. ),
  4731. 'feature_id' => array(
  4732. 'size' => 'big',
  4733. 'type' => 'int',
  4734. 'not null' => FALSE,
  4735. ),
  4736. 'arraydesign_id' => array(
  4737. 'size' => 'big',
  4738. 'type' => 'int',
  4739. 'not null' => TRUE,
  4740. ),
  4741. 'type_id' => array(
  4742. 'size' => 'big',
  4743. 'type' => 'int',
  4744. 'not null' => FALSE,
  4745. ),
  4746. 'dbxref_id' => array(
  4747. 'size' => 'big',
  4748. 'type' => 'int',
  4749. 'not null' => FALSE,
  4750. ),
  4751. ),
  4752. 'unique keys' => array(
  4753. 'element_c1' => array(
  4754. 0 => 'feature_id',
  4755. 1 => 'arraydesign_id',
  4756. ),
  4757. ),
  4758. 'indexes' => array(
  4759. 'element_idx1' => array(
  4760. 0 => 'feature_id',
  4761. ),
  4762. 'element_idx2' => array(
  4763. 0 => 'arraydesign_id',
  4764. ),
  4765. 'element_idx3' => array(
  4766. 0 => 'type_id',
  4767. ),
  4768. 'element_idx4' => array(
  4769. 0 => 'dbxref_id',
  4770. ),
  4771. ),
  4772. 'primary key' => array(
  4773. 0 => 'element_id',
  4774. ),
  4775. 'foreign keys' => array(
  4776. 'feature' => array(
  4777. 'table' => 'feature',
  4778. 'columns' => array(
  4779. 'feature_id' => 'feature_id',
  4780. ),
  4781. ),
  4782. 'arraydesign' => array(
  4783. 'table' => 'arraydesign',
  4784. 'columns' => array(
  4785. 'arraydesign_id' => 'arraydesign_id',
  4786. ),
  4787. ),
  4788. 'cvterm' => array(
  4789. 'table' => 'cvterm',
  4790. 'columns' => array(
  4791. 'type_id' => 'cvterm_id',
  4792. ),
  4793. ),
  4794. 'dbxref' => array(
  4795. 'table' => 'dbxref',
  4796. 'columns' => array(
  4797. 'dbxref_id' => 'dbxref_id',
  4798. ),
  4799. ),
  4800. ),
  4801. 'referring_tables' => array(
  4802. 0 => 'element_relationship',
  4803. 2 => 'elementresult',
  4804. ),
  4805. );
  4806. return $description;
  4807. }
  4808. /**
  4809. * Implements hook_chado_schema_v1_3_element_relationship()
  4810. *
  4811. * Purpose: To describe the structure of 'element_relationship' to tripal
  4812. * @see chado_insert_record()
  4813. * @see chado_update_record()
  4814. * @see chado_select_record()
  4815. * @see chado_generate_var()
  4816. * @see chado_expan_var()
  4817. *
  4818. * @return
  4819. * An array describing the 'element_relationship' table
  4820. *
  4821. * @ingroup tripal_chado_v1.3_schema_api
  4822. *
  4823. */
  4824. function tripal_chado_chado_schema_v1_3_element_relationship() {
  4825. $description = array(
  4826. 'description' => '',
  4827. 'table' => 'element_relationship',
  4828. 'fields' => array(
  4829. 'element_relationship_id' => array(
  4830. 'size' => 'big',
  4831. 'type' => 'serial',
  4832. 'not null' => TRUE,
  4833. ),
  4834. 'subject_id' => array(
  4835. 'size' => 'big',
  4836. 'type' => 'int',
  4837. 'not null' => TRUE,
  4838. ),
  4839. 'type_id' => array(
  4840. 'size' => 'big',
  4841. 'type' => 'int',
  4842. 'not null' => TRUE,
  4843. ),
  4844. 'object_id' => array(
  4845. 'size' => 'big',
  4846. 'type' => 'int',
  4847. 'not null' => TRUE,
  4848. ),
  4849. 'value' => array(
  4850. 'size' => 'normal',
  4851. 'type' => 'text',
  4852. 'not null' => FALSE,
  4853. ),
  4854. 'rank' => array(
  4855. 'size' => 'normal',
  4856. 'type' => 'int',
  4857. 'not null' => TRUE,
  4858. 'default' => 0,
  4859. ),
  4860. ),
  4861. 'unique keys' => array(
  4862. 'element_relationship_c1' => array(
  4863. 0 => 'subject_id',
  4864. 1 => 'object_id',
  4865. 2 => 'type_id',
  4866. 3 => 'rank',
  4867. ),
  4868. ),
  4869. 'indexes' => array(
  4870. 'element_relationship_idx1' => array(
  4871. 0 => 'subject_id',
  4872. ),
  4873. 'element_relationship_idx2' => array(
  4874. 0 => 'type_id',
  4875. ),
  4876. 'element_relationship_idx3' => array(
  4877. 0 => 'object_id',
  4878. ),
  4879. 'element_relationship_idx4' => array(
  4880. 0 => 'value',
  4881. ),
  4882. ),
  4883. 'primary key' => array(
  4884. 0 => 'element_relationship_id',
  4885. ),
  4886. 'foreign keys' => array(
  4887. 'element' => array(
  4888. 'table' => 'element',
  4889. 'columns' => array(
  4890. 'subject_id' => 'element_id',
  4891. 'object_id' => 'element_id',
  4892. ),
  4893. ),
  4894. 'cvterm' => array(
  4895. 'table' => 'cvterm',
  4896. 'columns' => array(
  4897. 'type_id' => 'cvterm_id',
  4898. ),
  4899. ),
  4900. ),
  4901. 'referring_tables' => array(
  4902. ),
  4903. );
  4904. return $description;
  4905. }
  4906. /**
  4907. * Implements hook_chado_schema_v1_3_elementresult()
  4908. *
  4909. * Purpose: To describe the structure of 'elementresult' to tripal
  4910. * @see chado_insert_record()
  4911. * @see chado_update_record()
  4912. * @see chado_select_record()
  4913. * @see chado_generate_var()
  4914. * @see chado_expan_var()
  4915. *
  4916. * @return
  4917. * An array describing the 'elementresult' table
  4918. *
  4919. * @ingroup tripal_chado_v1.3_schema_api
  4920. *
  4921. */
  4922. function tripal_chado_chado_schema_v1_3_elementresult() {
  4923. $description = array(
  4924. 'description' => '',
  4925. 'table' => 'elementresult',
  4926. 'fields' => array(
  4927. 'elementresult_id' => array(
  4928. 'size' => 'big',
  4929. 'type' => 'serial',
  4930. 'not null' => TRUE,
  4931. ),
  4932. 'element_id' => array(
  4933. 'size' => 'big',
  4934. 'type' => 'int',
  4935. 'not null' => TRUE,
  4936. ),
  4937. 'quantification_id' => array(
  4938. 'size' => 'big',
  4939. 'type' => 'int',
  4940. 'not null' => TRUE,
  4941. ),
  4942. 'signal' => array(
  4943. 'size' => 'big',
  4944. 'type' => 'float',
  4945. 'not null' => TRUE,
  4946. ),
  4947. ),
  4948. 'unique keys' => array(
  4949. 'elementresult_c1' => array(
  4950. 0 => 'element_id',
  4951. 1 => 'quantification_id',
  4952. ),
  4953. ),
  4954. 'indexes' => array(
  4955. 'elementresult_idx1' => array(
  4956. 0 => 'element_id',
  4957. ),
  4958. 'elementresult_idx2' => array(
  4959. 0 => 'quantification_id',
  4960. ),
  4961. 'elementresult_idx3' => array(
  4962. 0 => 'signal',
  4963. ),
  4964. ),
  4965. 'primary key' => array(
  4966. 0 => 'elementresult_id',
  4967. ),
  4968. 'foreign keys' => array(
  4969. 'element' => array(
  4970. 'table' => 'element',
  4971. 'columns' => array(
  4972. 'element_id' => 'element_id',
  4973. ),
  4974. ),
  4975. 'quantification' => array(
  4976. 'table' => 'quantification',
  4977. 'columns' => array(
  4978. 'quantification_id' => 'quantification_id',
  4979. ),
  4980. ),
  4981. ),
  4982. 'referring_tables' => array(
  4983. 0 => 'elementresult_relationship',
  4984. ),
  4985. );
  4986. return $description;
  4987. }
  4988. /**
  4989. * Implements hook_chado_schema_v1_3_elementresult_relationship()
  4990. *
  4991. * Purpose: To describe the structure of 'elementresult_relationship' to tripal
  4992. * @see chado_insert_record()
  4993. * @see chado_update_record()
  4994. * @see chado_select_record()
  4995. * @see chado_generate_var()
  4996. * @see chado_expan_var()
  4997. *
  4998. * @return
  4999. * An array describing the 'elementresult_relationship' table
  5000. *
  5001. * @ingroup tripal_chado_v1.3_schema_api
  5002. *
  5003. */
  5004. function tripal_chado_chado_schema_v1_3_elementresult_relationship() {
  5005. $description = array(
  5006. 'description' => '',
  5007. 'table' => 'elementresult_relationship',
  5008. 'fields' => array(
  5009. 'elementresult_relationship_id' => array(
  5010. 'size' => 'big',
  5011. 'type' => 'serial',
  5012. 'not null' => TRUE,
  5013. ),
  5014. 'subject_id' => array(
  5015. 'size' => 'big',
  5016. 'type' => 'int',
  5017. 'not null' => TRUE,
  5018. ),
  5019. 'type_id' => array(
  5020. 'size' => 'big',
  5021. 'type' => 'int',
  5022. 'not null' => TRUE,
  5023. ),
  5024. 'object_id' => array(
  5025. 'size' => 'big',
  5026. 'type' => 'int',
  5027. 'not null' => TRUE,
  5028. ),
  5029. 'value' => array(
  5030. 'size' => 'normal',
  5031. 'type' => 'text',
  5032. 'not null' => FALSE,
  5033. ),
  5034. 'rank' => array(
  5035. 'size' => 'normal',
  5036. 'type' => 'int',
  5037. 'not null' => TRUE,
  5038. 'default' => 0,
  5039. ),
  5040. ),
  5041. 'unique keys' => array(
  5042. 'elementresult_relationship_c1' => array(
  5043. 0 => 'subject_id',
  5044. 1 => 'object_id',
  5045. 2 => 'type_id',
  5046. 3 => 'rank',
  5047. ),
  5048. ),
  5049. 'indexes' => array(
  5050. 'elementresult_relationship_idx1' => array(
  5051. 0 => 'subject_id',
  5052. ),
  5053. 'elementresult_relationship_idx2' => array(
  5054. 0 => 'type_id',
  5055. ),
  5056. 'elementresult_relationship_idx3' => array(
  5057. 0 => 'object_id',
  5058. ),
  5059. 'elementresult_relationship_idx4' => array(
  5060. 0 => 'value',
  5061. ),
  5062. ),
  5063. 'primary key' => array(
  5064. 0 => 'elementresult_relationship_id',
  5065. ),
  5066. 'foreign keys' => array(
  5067. 'elementresult' => array(
  5068. 'table' => 'elementresult',
  5069. 'columns' => array(
  5070. 'subject_id' => 'elementresult_id',
  5071. 'object_id' => 'elementresult_id',
  5072. ),
  5073. ),
  5074. 'cvterm' => array(
  5075. 'table' => 'cvterm',
  5076. 'columns' => array(
  5077. 'type_id' => 'cvterm_id',
  5078. ),
  5079. ),
  5080. ),
  5081. 'referring_tables' => array(
  5082. ),
  5083. );
  5084. return $description;
  5085. }
  5086. /**
  5087. * Implements hook_chado_schema_v1_3_environment()
  5088. *
  5089. * Purpose: To describe the structure of 'environment' to tripal
  5090. * @see chado_insert_record()
  5091. * @see chado_update_record()
  5092. * @see chado_select_record()
  5093. * @see chado_generate_var()
  5094. * @see chado_expan_var()
  5095. *
  5096. * @return
  5097. * An array describing the 'environment' table
  5098. *
  5099. * @ingroup tripal_chado_v1.3_schema_api
  5100. *
  5101. */
  5102. function tripal_chado_chado_schema_v1_3_environment() {
  5103. $description = array(
  5104. 'description' => '',
  5105. 'table' => 'environment',
  5106. 'fields' => array(
  5107. 'environment_id' => array(
  5108. 'size' => 'big',
  5109. 'type' => 'serial',
  5110. 'not null' => TRUE,
  5111. ),
  5112. 'uniquename' => array(
  5113. 'size' => 'normal',
  5114. 'type' => 'text',
  5115. 'not null' => TRUE,
  5116. ),
  5117. 'description' => array(
  5118. 'size' => 'normal',
  5119. 'type' => 'text',
  5120. 'not null' => FALSE,
  5121. ),
  5122. ),
  5123. 'unique keys' => array(
  5124. 'environment_c1' => array(
  5125. 0 => 'uniquename',
  5126. ),
  5127. ),
  5128. 'indexes' => array(
  5129. 'environment_idx1' => array(
  5130. 0 => 'uniquename',
  5131. ),
  5132. ),
  5133. 'primary key' => array(
  5134. 0 => 'environment_id',
  5135. ),
  5136. 'foreign keys' => array(
  5137. ),
  5138. 'referring_tables' => array(
  5139. 0 => 'environment_cvterm',
  5140. 1 => 'phendesc',
  5141. 2 => 'phenotype_comparison',
  5142. 4 => 'phenstatement',
  5143. ),
  5144. );
  5145. return $description;
  5146. }
  5147. /**
  5148. * Implements hook_chado_schema_v1_3_environment_cvterm()
  5149. *
  5150. * Purpose: To describe the structure of 'environment_cvterm' to tripal
  5151. * @see chado_insert_record()
  5152. * @see chado_update_record()
  5153. * @see chado_select_record()
  5154. * @see chado_generate_var()
  5155. * @see chado_expan_var()
  5156. *
  5157. * @return
  5158. * An array describing the 'environment_cvterm' table
  5159. *
  5160. * @ingroup tripal_chado_v1.3_schema_api
  5161. *
  5162. */
  5163. function tripal_chado_chado_schema_v1_3_environment_cvterm() {
  5164. $description = array(
  5165. 'description' => '',
  5166. 'table' => 'environment_cvterm',
  5167. 'fields' => array(
  5168. 'environment_cvterm_id' => array(
  5169. 'size' => 'big',
  5170. 'type' => 'serial',
  5171. 'not null' => TRUE,
  5172. ),
  5173. 'environment_id' => array(
  5174. 'size' => 'big',
  5175. 'type' => 'int',
  5176. 'not null' => TRUE,
  5177. ),
  5178. 'cvterm_id' => array(
  5179. 'size' => 'big',
  5180. 'type' => 'int',
  5181. 'not null' => TRUE,
  5182. ),
  5183. ),
  5184. 'unique keys' => array(
  5185. 'environment_cvterm_c1' => array(
  5186. 0 => 'environment_id',
  5187. 1 => 'cvterm_id',
  5188. ),
  5189. ),
  5190. 'indexes' => array(
  5191. 'environment_cvterm_idx1' => array(
  5192. 0 => 'environment_id',
  5193. ),
  5194. 'environment_cvterm_idx2' => array(
  5195. 0 => 'cvterm_id',
  5196. ),
  5197. ),
  5198. 'primary key' => array(
  5199. 0 => 'environment_cvterm_id',
  5200. ),
  5201. 'foreign keys' => array(
  5202. 'environment' => array(
  5203. 'table' => 'environment',
  5204. 'columns' => array(
  5205. 'environment_id' => 'environment_id',
  5206. ),
  5207. ),
  5208. 'cvterm' => array(
  5209. 'table' => 'cvterm',
  5210. 'columns' => array(
  5211. 'cvterm_id' => 'cvterm_id',
  5212. ),
  5213. ),
  5214. ),
  5215. 'referring_tables' => array(
  5216. ),
  5217. );
  5218. return $description;
  5219. }
  5220. /**
  5221. * Implements hook_chado_schema_v1_3_expression()
  5222. *
  5223. * Purpose: To describe the structure of 'expression' to tripal
  5224. * @see chado_insert_record()
  5225. * @see chado_update_record()
  5226. * @see chado_select_record()
  5227. * @see chado_generate_var()
  5228. * @see chado_expan_var()
  5229. *
  5230. * @return
  5231. * An array describing the 'expression' table
  5232. *
  5233. * @ingroup tripal_chado_v1.3_schema_api
  5234. *
  5235. */
  5236. function tripal_chado_chado_schema_v1_3_expression() {
  5237. $description = array(
  5238. 'description' => '',
  5239. 'table' => 'expression',
  5240. 'fields' => array(
  5241. 'expression_id' => array(
  5242. 'size' => 'big',
  5243. 'type' => 'serial',
  5244. 'not null' => TRUE,
  5245. ),
  5246. 'uniquename' => array(
  5247. 'size' => 'normal',
  5248. 'type' => 'text',
  5249. 'not null' => TRUE,
  5250. ),
  5251. 'md5checksum' => array(
  5252. 'size' => 'normal',
  5253. 'type' => 'char',
  5254. 'length' => '32',
  5255. 'not null' => FALSE,
  5256. ),
  5257. 'description' => array(
  5258. 'size' => 'normal',
  5259. 'type' => 'text',
  5260. 'not null' => FALSE,
  5261. ),
  5262. ),
  5263. 'unique keys' => array(
  5264. 'expression_c1' => array(
  5265. 0 => 'uniquename',
  5266. ),
  5267. ),
  5268. 'primary key' => array(
  5269. 0 => 'expression_id',
  5270. ),
  5271. 'foreign keys' => array(
  5272. ),
  5273. 'referring_tables' => array(
  5274. 0 => 'expression_cvterm',
  5275. 1 => 'expression_image',
  5276. 2 => 'expressionprop',
  5277. 3 => 'expression_pub',
  5278. 4 => 'feature_expression',
  5279. 5 => 'library_expression',
  5280. ),
  5281. );
  5282. return $description;
  5283. }
  5284. /**
  5285. * Implements hook_chado_schema_v1_3_expression_cvterm()
  5286. *
  5287. * Purpose: To describe the structure of 'expression_cvterm' to tripal
  5288. * @see chado_insert_record()
  5289. * @see chado_update_record()
  5290. * @see chado_select_record()
  5291. * @see chado_generate_var()
  5292. * @see chado_expan_var()
  5293. *
  5294. * @return
  5295. * An array describing the 'expression_cvterm' table
  5296. *
  5297. * @ingroup tripal_chado_v1.3_schema_api
  5298. *
  5299. */
  5300. function tripal_chado_chado_schema_v1_3_expression_cvterm() {
  5301. $description = array(
  5302. 'description' => '',
  5303. 'table' => 'expression_cvterm',
  5304. 'fields' => array(
  5305. 'expression_cvterm_id' => array(
  5306. 'size' => 'big',
  5307. 'type' => 'serial',
  5308. 'not null' => TRUE,
  5309. ),
  5310. 'expression_id' => array(
  5311. 'size' => 'big',
  5312. 'type' => 'int',
  5313. 'not null' => TRUE,
  5314. ),
  5315. 'cvterm_id' => array(
  5316. 'size' => 'big',
  5317. 'type' => 'int',
  5318. 'not null' => TRUE,
  5319. ),
  5320. 'rank' => array(
  5321. 'size' => 'normal',
  5322. 'type' => 'int',
  5323. 'not null' => TRUE,
  5324. 'default' => 0,
  5325. ),
  5326. 'cvterm_type_id' => array(
  5327. 'size' => 'big',
  5328. 'type' => 'int',
  5329. 'not null' => TRUE,
  5330. ),
  5331. ),
  5332. 'unique keys' => array(
  5333. 'expression_cvterm_c1' => array(
  5334. 0 => 'expression_id',
  5335. 1 => 'cvterm_id',
  5336. 2 => 'rank',
  5337. 3 => 'cvterm_type_id',
  5338. ),
  5339. ),
  5340. 'indexes' => array(
  5341. 'expression_cvterm_idx1' => array(
  5342. 0 => 'expression_id',
  5343. ),
  5344. 'expression_cvterm_idx2' => array(
  5345. 0 => 'cvterm_id',
  5346. ),
  5347. 'expression_cvterm_idx3' => array(
  5348. 0 => 'cvterm_type_id',
  5349. ),
  5350. ),
  5351. 'primary key' => array(
  5352. 0 => 'expression_cvterm_id',
  5353. ),
  5354. 'foreign keys' => array(
  5355. 'expression' => array(
  5356. 'table' => 'expression',
  5357. 'columns' => array(
  5358. 'expression_id' => 'expression_id',
  5359. ),
  5360. ),
  5361. 'cvterm' => array(
  5362. 'table' => 'cvterm',
  5363. 'columns' => array(
  5364. 'cvterm_id' => 'cvterm_id',
  5365. 'cvterm_type_id' => 'cvterm_id',
  5366. ),
  5367. ),
  5368. ),
  5369. 'referring_tables' => array(
  5370. 0 => 'expression_cvtermprop',
  5371. ),
  5372. );
  5373. return $description;
  5374. }
  5375. /**
  5376. * Implements hook_chado_schema_v1_3_expression_cvtermprop()
  5377. *
  5378. * Purpose: To describe the structure of 'expression_cvtermprop' to tripal
  5379. * @see chado_insert_record()
  5380. * @see chado_update_record()
  5381. * @see chado_select_record()
  5382. * @see chado_generate_var()
  5383. * @see chado_expan_var()
  5384. *
  5385. * @return
  5386. * An array describing the 'expression_cvtermprop' table
  5387. *
  5388. * @ingroup tripal_chado_v1.3_schema_api
  5389. *
  5390. */
  5391. function tripal_chado_chado_schema_v1_3_expression_cvtermprop() {
  5392. $description = array(
  5393. 'description' => '',
  5394. 'table' => 'expression_cvtermprop',
  5395. 'fields' => array(
  5396. 'expression_cvtermprop_id' => array(
  5397. 'size' => 'big',
  5398. 'type' => 'serial',
  5399. 'not null' => TRUE,
  5400. ),
  5401. 'expression_cvterm_id' => array(
  5402. 'size' => 'big',
  5403. 'type' => 'int',
  5404. 'not null' => TRUE,
  5405. ),
  5406. 'type_id' => array(
  5407. 'size' => 'big',
  5408. 'type' => 'int',
  5409. 'not null' => TRUE,
  5410. ),
  5411. 'value' => array(
  5412. 'size' => 'normal',
  5413. 'type' => 'text',
  5414. 'not null' => FALSE,
  5415. ),
  5416. 'rank' => array(
  5417. 'size' => 'normal',
  5418. 'type' => 'int',
  5419. 'not null' => TRUE,
  5420. 'default' => 0,
  5421. ),
  5422. ),
  5423. 'unique keys' => array(
  5424. 'expression_cvtermprop_c1' => array(
  5425. 0 => 'expression_cvterm_id',
  5426. 1 => 'type_id',
  5427. 2 => 'rank',
  5428. ),
  5429. ),
  5430. 'indexes' => array(
  5431. 'expression_cvtermprop_idx1' => array(
  5432. 0 => 'expression_cvterm_id',
  5433. ),
  5434. 'expression_cvtermprop_idx2' => array(
  5435. 0 => 'type_id',
  5436. ),
  5437. ),
  5438. 'primary key' => array(
  5439. 0 => 'expression_cvtermprop_id',
  5440. ),
  5441. 'foreign keys' => array(
  5442. 'expression_cvterm' => array(
  5443. 'table' => 'expression_cvterm',
  5444. 'columns' => array(
  5445. 'expression_cvterm_id' => 'expression_cvterm_id',
  5446. ),
  5447. ),
  5448. 'cvterm' => array(
  5449. 'table' => 'cvterm',
  5450. 'columns' => array(
  5451. 'type_id' => 'cvterm_id',
  5452. ),
  5453. ),
  5454. ),
  5455. 'referring_tables' => array(
  5456. ),
  5457. );
  5458. return $description;
  5459. }
  5460. /**
  5461. * Implements hook_chado_schema_v1_3_expression_image()
  5462. *
  5463. * Purpose: To describe the structure of 'expression_image' to tripal
  5464. * @see chado_insert_record()
  5465. * @see chado_update_record()
  5466. * @see chado_select_record()
  5467. * @see chado_generate_var()
  5468. * @see chado_expan_var()
  5469. *
  5470. * @return
  5471. * An array describing the 'expression_image' table
  5472. *
  5473. * @ingroup tripal_chado_v1.3_schema_api
  5474. *
  5475. */
  5476. function tripal_chado_chado_schema_v1_3_expression_image() {
  5477. $description = array(
  5478. 'description' => '',
  5479. 'table' => 'expression_image',
  5480. 'fields' => array(
  5481. 'expression_image_id' => array(
  5482. 'size' => 'big',
  5483. 'type' => 'serial',
  5484. 'not null' => TRUE,
  5485. ),
  5486. 'expression_id' => array(
  5487. 'size' => 'big',
  5488. 'type' => 'int',
  5489. 'not null' => TRUE,
  5490. ),
  5491. 'eimage_id' => array(
  5492. 'size' => 'big',
  5493. 'type' => 'int',
  5494. 'not null' => TRUE,
  5495. ),
  5496. ),
  5497. 'unique keys' => array(
  5498. 'expression_image_c1' => array(
  5499. 0 => 'expression_id',
  5500. 1 => 'eimage_id',
  5501. ),
  5502. ),
  5503. 'indexes' => array(
  5504. 'expression_image_idx1' => array(
  5505. 0 => 'expression_id',
  5506. ),
  5507. 'expression_image_idx2' => array(
  5508. 0 => 'eimage_id',
  5509. ),
  5510. ),
  5511. 'primary key' => array(
  5512. 0 => 'expression_image_id',
  5513. ),
  5514. 'foreign keys' => array(
  5515. 'expression' => array(
  5516. 'table' => 'expression',
  5517. 'columns' => array(
  5518. 'expression_id' => 'expression_id',
  5519. ),
  5520. ),
  5521. 'eimage' => array(
  5522. 'table' => 'eimage',
  5523. 'columns' => array(
  5524. 'eimage_id' => 'eimage_id',
  5525. ),
  5526. ),
  5527. ),
  5528. 'referring_tables' => array(
  5529. ),
  5530. );
  5531. return $description;
  5532. }
  5533. /**
  5534. * Implements hook_chado_schema_v1_3_expressionprop()
  5535. *
  5536. * Purpose: To describe the structure of 'expressionprop' to tripal
  5537. * @see chado_insert_record()
  5538. * @see chado_update_record()
  5539. * @see chado_select_record()
  5540. * @see chado_generate_var()
  5541. * @see chado_expan_var()
  5542. *
  5543. * @return
  5544. * An array describing the 'expressionprop' table
  5545. *
  5546. * @ingroup tripal_chado_v1.3_schema_api
  5547. *
  5548. */
  5549. function tripal_chado_chado_schema_v1_3_expressionprop() {
  5550. $description = array(
  5551. 'description' => '',
  5552. 'table' => 'expressionprop',
  5553. 'fields' => array(
  5554. 'expressionprop_id' => array(
  5555. 'size' => 'big',
  5556. 'type' => 'serial',
  5557. 'not null' => TRUE,
  5558. ),
  5559. 'expression_id' => array(
  5560. 'size' => 'big',
  5561. 'type' => 'int',
  5562. 'not null' => TRUE,
  5563. ),
  5564. 'type_id' => array(
  5565. 'size' => 'big',
  5566. 'type' => 'int',
  5567. 'not null' => TRUE,
  5568. ),
  5569. 'value' => array(
  5570. 'size' => 'normal',
  5571. 'type' => 'text',
  5572. 'not null' => FALSE,
  5573. ),
  5574. 'rank' => array(
  5575. 'size' => 'normal',
  5576. 'type' => 'int',
  5577. 'not null' => TRUE,
  5578. 'default' => 0,
  5579. ),
  5580. ),
  5581. 'unique keys' => array(
  5582. 'expressionprop_c1' => array(
  5583. 0 => 'expression_id',
  5584. 1 => 'type_id',
  5585. 2 => 'rank',
  5586. ),
  5587. ),
  5588. 'indexes' => array(
  5589. 'expressionprop_idx1' => array(
  5590. 0 => 'expression_id',
  5591. ),
  5592. 'expressionprop_idx2' => array(
  5593. 0 => 'type_id',
  5594. ),
  5595. ),
  5596. 'primary key' => array(
  5597. 0 => 'expressionprop_id',
  5598. ),
  5599. 'foreign keys' => array(
  5600. 'expression' => array(
  5601. 'table' => 'expression',
  5602. 'columns' => array(
  5603. 'expression_id' => 'expression_id',
  5604. ),
  5605. ),
  5606. 'cvterm' => array(
  5607. 'table' => 'cvterm',
  5608. 'columns' => array(
  5609. 'type_id' => 'cvterm_id',
  5610. ),
  5611. ),
  5612. ),
  5613. 'referring_tables' => array(
  5614. ),
  5615. );
  5616. return $description;
  5617. }
  5618. /**
  5619. * Implements hook_chado_schema_v1_3_expression_pub()
  5620. *
  5621. * Purpose: To describe the structure of 'expression_pub' to tripal
  5622. * @see chado_insert_record()
  5623. * @see chado_update_record()
  5624. * @see chado_select_record()
  5625. * @see chado_generate_var()
  5626. * @see chado_expan_var()
  5627. *
  5628. * @return
  5629. * An array describing the 'expression_pub' table
  5630. *
  5631. * @ingroup tripal_chado_v1.3_schema_api
  5632. *
  5633. */
  5634. function tripal_chado_chado_schema_v1_3_expression_pub() {
  5635. $description = array(
  5636. 'description' => '',
  5637. 'table' => 'expression_pub',
  5638. 'fields' => array(
  5639. 'expression_pub_id' => array(
  5640. 'size' => 'big',
  5641. 'type' => 'serial',
  5642. 'not null' => TRUE,
  5643. ),
  5644. 'expression_id' => array(
  5645. 'size' => 'big',
  5646. 'type' => 'int',
  5647. 'not null' => TRUE,
  5648. ),
  5649. 'pub_id' => array(
  5650. 'size' => 'big',
  5651. 'type' => 'int',
  5652. 'not null' => TRUE,
  5653. ),
  5654. ),
  5655. 'unique keys' => array(
  5656. 'expression_pub_c1' => array(
  5657. 0 => 'expression_id',
  5658. 1 => 'pub_id',
  5659. ),
  5660. ),
  5661. 'indexes' => array(
  5662. 'expression_pub_idx1' => array(
  5663. 0 => 'expression_id',
  5664. ),
  5665. 'expression_pub_idx2' => array(
  5666. 0 => 'pub_id',
  5667. ),
  5668. ),
  5669. 'primary key' => array(
  5670. 0 => 'expression_pub_id',
  5671. ),
  5672. 'foreign keys' => array(
  5673. 'expression' => array(
  5674. 'table' => 'expression',
  5675. 'columns' => array(
  5676. 'expression_id' => 'expression_id',
  5677. ),
  5678. ),
  5679. 'pub' => array(
  5680. 'table' => 'pub',
  5681. 'columns' => array(
  5682. 'pub_id' => 'pub_id',
  5683. ),
  5684. ),
  5685. ),
  5686. 'referring_tables' => array(
  5687. ),
  5688. );
  5689. return $description;
  5690. }
  5691. /**
  5692. * Implements hook_chado_schema_v1_3_feature()
  5693. *
  5694. * Purpose: To describe the structure of 'feature' to tripal
  5695. * @see chado_insert_record()
  5696. * @see chado_update_record()
  5697. * @see chado_select_record()
  5698. * @see chado_generate_var()
  5699. * @see chado_expan_var()
  5700. *
  5701. * @return
  5702. * An array describing the 'feature' table
  5703. *
  5704. * @ingroup tripal_chado_v1.3_schema_api
  5705. *
  5706. */
  5707. function tripal_chado_chado_schema_v1_3_feature() {
  5708. $description = array(
  5709. 'description' => '',
  5710. 'table' => 'feature',
  5711. 'fields' => array(
  5712. 'feature_id' => array(
  5713. 'size' => 'big',
  5714. 'type' => 'serial',
  5715. 'not null' => TRUE,
  5716. ),
  5717. 'dbxref_id' => array(
  5718. 'size' => 'big',
  5719. 'type' => 'int',
  5720. 'not null' => FALSE,
  5721. ),
  5722. 'organism_id' => array(
  5723. 'size' => 'big',
  5724. 'type' => 'int',
  5725. 'not null' => TRUE,
  5726. ),
  5727. 'name' => array(
  5728. 'size' => 'normal',
  5729. 'type' => 'varchar',
  5730. 'length' => '255',
  5731. 'not null' => FALSE,
  5732. ),
  5733. 'uniquename' => array(
  5734. 'size' => 'normal',
  5735. 'type' => 'text',
  5736. 'not null' => TRUE,
  5737. ),
  5738. 'residues' => array(
  5739. 'size' => 'normal',
  5740. 'type' => 'text',
  5741. 'not null' => FALSE,
  5742. ),
  5743. 'seqlen' => array(
  5744. 'size' => 'big',
  5745. 'type' => 'int',
  5746. 'not null' => FALSE,
  5747. ),
  5748. 'md5checksum' => array(
  5749. 'size' => 'normal',
  5750. 'type' => 'char',
  5751. 'length' => '32',
  5752. 'not null' => FALSE,
  5753. ),
  5754. 'type_id' => array(
  5755. 'size' => 'big',
  5756. 'type' => 'int',
  5757. 'not null' => TRUE,
  5758. ),
  5759. 'is_analysis' => array(
  5760. 'size' => 'normal',
  5761. 'type' => 'boolean',
  5762. 'not null' => TRUE,
  5763. 'default' => FALSE,
  5764. ),
  5765. 'is_obsolete' => array(
  5766. 'size' => 'normal',
  5767. 'type' => 'boolean',
  5768. 'not null' => TRUE,
  5769. 'default' => FALSE,
  5770. ),
  5771. 'timeaccessioned' => array(
  5772. 'size' => 'normal',
  5773. 'type' => 'datetime',
  5774. 'not null' => TRUE,
  5775. 'default' => 'now()',
  5776. ),
  5777. 'timelastmodified' => array(
  5778. 'size' => 'normal',
  5779. 'type' => 'datetime',
  5780. 'not null' => TRUE,
  5781. 'default' => 'now()',
  5782. ),
  5783. ),
  5784. 'unique keys' => array(
  5785. 'feature_c1' => array(
  5786. 0 => 'organism_id',
  5787. 1 => 'uniquename',
  5788. 2 => 'type_id',
  5789. ),
  5790. ),
  5791. 'indexes' => array(
  5792. 'feature_idx1' => array(
  5793. 0 => 'dbxref_id',
  5794. ),
  5795. 'feature_idx2' => array(
  5796. 0 => 'organism_id',
  5797. ),
  5798. 'feature_idx3' => array(
  5799. 0 => 'type_id',
  5800. ),
  5801. 'feature_idx4' => array(
  5802. 0 => 'uniquename',
  5803. ),
  5804. 'feature_name_ind1' => array(
  5805. 0 => 'name',
  5806. ),
  5807. ),
  5808. 'primary key' => array(
  5809. 0 => 'feature_id',
  5810. ),
  5811. 'foreign keys' => array(
  5812. 'dbxref' => array(
  5813. 'table' => 'dbxref',
  5814. 'columns' => array(
  5815. 'dbxref_id' => 'dbxref_id',
  5816. ),
  5817. ),
  5818. 'organism' => array(
  5819. 'table' => 'organism',
  5820. 'columns' => array(
  5821. 'organism_id' => 'organism_id',
  5822. ),
  5823. ),
  5824. 'cvterm' => array(
  5825. 'table' => 'cvterm',
  5826. 'columns' => array(
  5827. 'type_id' => 'cvterm_id',
  5828. ),
  5829. ),
  5830. ),
  5831. 'referring_tables' => array(
  5832. 0 => 'analysisfeature',
  5833. 1 => 'cell_line_feature',
  5834. 2 => 'element',
  5835. 3 => 'feature_contact',
  5836. 4 => 'feature_cvterm',
  5837. 5 => 'feature_dbxref',
  5838. 6 => 'feature_expression',
  5839. 7 => 'feature_genotype',
  5840. 9 => 'featureloc',
  5841. 11 => 'feature_phenotype',
  5842. 12 => 'featurepos',
  5843. 14 => 'featureprop',
  5844. 15 => 'feature_pub',
  5845. 16 => 'featurerange',
  5846. 21 => 'feature_relationship',
  5847. 23 => 'feature_synonym',
  5848. 24 => 'library_feature',
  5849. 25 => 'nd_reagent',
  5850. 26 => 'phylonode',
  5851. 27 => 'project_feature',
  5852. 28 => 'stock_feature',
  5853. 29 => 'studyprop_feature',
  5854. ),
  5855. );
  5856. return $description;
  5857. }
  5858. /**
  5859. * Implements hook_chado_schema_v1_3_feature_contact()
  5860. *
  5861. * Purpose: To describe the structure of 'feature_contact' to tripal
  5862. * @see chado_insert_record()
  5863. * @see chado_update_record()
  5864. * @see chado_select_record()
  5865. * @see chado_generate_var()
  5866. * @see chado_expan_var()
  5867. *
  5868. * @return
  5869. * An array describing the 'feature_contact' table
  5870. *
  5871. * @ingroup tripal_chado_v1.3_schema_api
  5872. *
  5873. */
  5874. function tripal_chado_chado_schema_v1_3_feature_contact() {
  5875. $description = array(
  5876. 'description' => '',
  5877. 'table' => 'feature_contact',
  5878. 'fields' => array(
  5879. 'feature_contact_id' => array(
  5880. 'size' => 'big',
  5881. 'type' => 'serial',
  5882. 'not null' => TRUE,
  5883. ),
  5884. 'feature_id' => array(
  5885. 'size' => 'big',
  5886. 'type' => 'int',
  5887. 'not null' => TRUE,
  5888. ),
  5889. 'contact_id' => array(
  5890. 'size' => 'big',
  5891. 'type' => 'int',
  5892. 'not null' => TRUE,
  5893. ),
  5894. ),
  5895. 'unique keys' => array(
  5896. 'feature_contact_c1' => array(
  5897. 0 => 'feature_id',
  5898. 1 => 'contact_id',
  5899. ),
  5900. ),
  5901. 'indexes' => array(
  5902. 'feature_contact_idx1' => array(
  5903. 0 => 'feature_id',
  5904. ),
  5905. 'feature_contact_idx2' => array(
  5906. 0 => 'contact_id',
  5907. ),
  5908. ),
  5909. 'primary key' => array(
  5910. 0 => 'feature_contact_id',
  5911. ),
  5912. 'foreign keys' => array(
  5913. 'contact' => array(
  5914. 'table' => 'contact',
  5915. 'columns' => array(
  5916. 'contact_id' => 'contact_id',
  5917. ),
  5918. ),
  5919. 'feature' => array(
  5920. 'table' => 'feature',
  5921. 'columns' => array(
  5922. 'feature_id' => 'feature_id',
  5923. ),
  5924. ),
  5925. ),
  5926. 'referring_tables' => array(
  5927. ),
  5928. );
  5929. return $description;
  5930. }
  5931. /**
  5932. * Implements hook_chado_schema_v1_3_feature_cvterm()
  5933. *
  5934. * Purpose: To describe the structure of 'feature_cvterm' to tripal
  5935. * @see chado_insert_record()
  5936. * @see chado_update_record()
  5937. * @see chado_select_record()
  5938. * @see chado_generate_var()
  5939. * @see chado_expan_var()
  5940. *
  5941. * @return
  5942. * An array describing the 'feature_cvterm' table
  5943. *
  5944. * @ingroup tripal_chado_v1.3_schema_api
  5945. *
  5946. */
  5947. function tripal_chado_chado_schema_v1_3_feature_cvterm() {
  5948. $description = array(
  5949. 'description' => '',
  5950. 'table' => 'feature_cvterm',
  5951. 'fields' => array(
  5952. 'feature_cvterm_id' => array(
  5953. 'size' => 'big',
  5954. 'type' => 'serial',
  5955. 'not null' => TRUE,
  5956. ),
  5957. 'feature_id' => array(
  5958. 'size' => 'big',
  5959. 'type' => 'int',
  5960. 'not null' => TRUE,
  5961. ),
  5962. 'cvterm_id' => array(
  5963. 'size' => 'big',
  5964. 'type' => 'int',
  5965. 'not null' => TRUE,
  5966. ),
  5967. 'pub_id' => array(
  5968. 'size' => 'big',
  5969. 'type' => 'int',
  5970. 'not null' => TRUE,
  5971. ),
  5972. 'is_not' => array(
  5973. 'size' => 'normal',
  5974. 'type' => 'boolean',
  5975. 'not null' => TRUE,
  5976. 'default' => FALSE,
  5977. ),
  5978. 'rank' => array(
  5979. 'size' => 'normal',
  5980. 'type' => 'int',
  5981. 'not null' => TRUE,
  5982. 'default' => 0,
  5983. ),
  5984. ),
  5985. 'unique keys' => array(
  5986. 'feature_cvterm_c1' => array(
  5987. 0 => 'feature_id',
  5988. 1 => 'cvterm_id',
  5989. 2 => 'pub_id',
  5990. 3 => 'rank',
  5991. ),
  5992. ),
  5993. 'indexes' => array(
  5994. 'feature_cvterm_idx1' => array(
  5995. 0 => 'feature_id',
  5996. ),
  5997. 'feature_cvterm_idx2' => array(
  5998. 0 => 'cvterm_id',
  5999. ),
  6000. 'feature_cvterm_idx3' => array(
  6001. 0 => 'pub_id',
  6002. ),
  6003. ),
  6004. 'primary key' => array(
  6005. 0 => 'feature_cvterm_id',
  6006. ),
  6007. 'foreign keys' => array(
  6008. 'feature' => array(
  6009. 'table' => 'feature',
  6010. 'columns' => array(
  6011. 'feature_id' => 'feature_id',
  6012. ),
  6013. ),
  6014. 'cvterm' => array(
  6015. 'table' => 'cvterm',
  6016. 'columns' => array(
  6017. 'cvterm_id' => 'cvterm_id',
  6018. ),
  6019. ),
  6020. 'pub' => array(
  6021. 'table' => 'pub',
  6022. 'columns' => array(
  6023. 'pub_id' => 'pub_id',
  6024. ),
  6025. ),
  6026. ),
  6027. 'referring_tables' => array(
  6028. 0 => 'feature_cvterm_dbxref',
  6029. 1 => 'feature_cvtermprop',
  6030. 2 => 'feature_cvterm_pub',
  6031. ),
  6032. );
  6033. return $description;
  6034. }
  6035. /**
  6036. * Implements hook_chado_schema_v1_3_feature_cvterm_dbxref()
  6037. *
  6038. * Purpose: To describe the structure of 'feature_cvterm_dbxref' to tripal
  6039. * @see chado_insert_record()
  6040. * @see chado_update_record()
  6041. * @see chado_select_record()
  6042. * @see chado_generate_var()
  6043. * @see chado_expan_var()
  6044. *
  6045. * @return
  6046. * An array describing the 'feature_cvterm_dbxref' table
  6047. *
  6048. * @ingroup tripal_chado_v1.3_schema_api
  6049. *
  6050. */
  6051. function tripal_chado_chado_schema_v1_3_feature_cvterm_dbxref() {
  6052. $description = array(
  6053. 'description' => '',
  6054. 'table' => 'feature_cvterm_dbxref',
  6055. 'fields' => array(
  6056. 'feature_cvterm_dbxref_id' => array(
  6057. 'size' => 'big',
  6058. 'type' => 'serial',
  6059. 'not null' => TRUE,
  6060. ),
  6061. 'feature_cvterm_id' => array(
  6062. 'size' => 'big',
  6063. 'type' => 'int',
  6064. 'not null' => TRUE,
  6065. ),
  6066. 'dbxref_id' => array(
  6067. 'size' => 'big',
  6068. 'type' => 'int',
  6069. 'not null' => TRUE,
  6070. ),
  6071. ),
  6072. 'unique keys' => array(
  6073. 'feature_cvterm_dbxref_c1' => array(
  6074. 0 => 'feature_cvterm_id',
  6075. 1 => 'dbxref_id',
  6076. ),
  6077. ),
  6078. 'indexes' => array(
  6079. 'feature_cvterm_dbxref_idx1' => array(
  6080. 0 => 'feature_cvterm_id',
  6081. ),
  6082. 'feature_cvterm_dbxref_idx2' => array(
  6083. 0 => 'dbxref_id',
  6084. ),
  6085. ),
  6086. 'primary key' => array(
  6087. 0 => 'feature_cvterm_dbxref_id',
  6088. ),
  6089. 'foreign keys' => array(
  6090. 'feature_cvterm' => array(
  6091. 'table' => 'feature_cvterm',
  6092. 'columns' => array(
  6093. 'feature_cvterm_id' => 'feature_cvterm_id',
  6094. ),
  6095. ),
  6096. 'dbxref' => array(
  6097. 'table' => 'dbxref',
  6098. 'columns' => array(
  6099. 'dbxref_id' => 'dbxref_id',
  6100. ),
  6101. ),
  6102. ),
  6103. 'referring_tables' => array(
  6104. ),
  6105. );
  6106. return $description;
  6107. }
  6108. /**
  6109. * Implements hook_chado_schema_v1_3_feature_cvtermprop()
  6110. *
  6111. * Purpose: To describe the structure of 'feature_cvtermprop' to tripal
  6112. * @see chado_insert_record()
  6113. * @see chado_update_record()
  6114. * @see chado_select_record()
  6115. * @see chado_generate_var()
  6116. * @see chado_expan_var()
  6117. *
  6118. * @return
  6119. * An array describing the 'feature_cvtermprop' table
  6120. *
  6121. * @ingroup tripal_chado_v1.3_schema_api
  6122. *
  6123. */
  6124. function tripal_chado_chado_schema_v1_3_feature_cvtermprop() {
  6125. $description = array(
  6126. 'description' => '',
  6127. 'table' => 'feature_cvtermprop',
  6128. 'fields' => array(
  6129. 'feature_cvtermprop_id' => array(
  6130. 'size' => 'big',
  6131. 'type' => 'serial',
  6132. 'not null' => TRUE,
  6133. ),
  6134. 'feature_cvterm_id' => array(
  6135. 'size' => 'big',
  6136. 'type' => 'int',
  6137. 'not null' => TRUE,
  6138. ),
  6139. 'type_id' => array(
  6140. 'size' => 'big',
  6141. 'type' => 'int',
  6142. 'not null' => TRUE,
  6143. ),
  6144. 'value' => array(
  6145. 'size' => 'normal',
  6146. 'type' => 'text',
  6147. 'not null' => FALSE,
  6148. ),
  6149. 'rank' => array(
  6150. 'size' => 'normal',
  6151. 'type' => 'int',
  6152. 'not null' => TRUE,
  6153. 'default' => 0,
  6154. ),
  6155. ),
  6156. 'unique keys' => array(
  6157. 'feature_cvtermprop_c1' => array(
  6158. 0 => 'feature_cvterm_id',
  6159. 1 => 'type_id',
  6160. 2 => 'rank',
  6161. ),
  6162. ),
  6163. 'indexes' => array(
  6164. 'feature_cvtermprop_idx1' => array(
  6165. 0 => 'feature_cvterm_id',
  6166. ),
  6167. 'feature_cvtermprop_idx2' => array(
  6168. 0 => 'type_id',
  6169. ),
  6170. ),
  6171. 'primary key' => array(
  6172. 0 => 'feature_cvtermprop_id',
  6173. ),
  6174. 'foreign keys' => array(
  6175. 'feature_cvterm' => array(
  6176. 'table' => 'feature_cvterm',
  6177. 'columns' => array(
  6178. 'feature_cvterm_id' => 'feature_cvterm_id',
  6179. ),
  6180. ),
  6181. 'cvterm' => array(
  6182. 'table' => 'cvterm',
  6183. 'columns' => array(
  6184. 'type_id' => 'cvterm_id',
  6185. ),
  6186. ),
  6187. ),
  6188. 'referring_tables' => array(
  6189. ),
  6190. );
  6191. return $description;
  6192. }
  6193. /**
  6194. * Implements hook_chado_schema_v1_3_feature_cvterm_pub()
  6195. *
  6196. * Purpose: To describe the structure of 'feature_cvterm_pub' to tripal
  6197. * @see chado_insert_record()
  6198. * @see chado_update_record()
  6199. * @see chado_select_record()
  6200. * @see chado_generate_var()
  6201. * @see chado_expan_var()
  6202. *
  6203. * @return
  6204. * An array describing the 'feature_cvterm_pub' table
  6205. *
  6206. * @ingroup tripal_chado_v1.3_schema_api
  6207. *
  6208. */
  6209. function tripal_chado_chado_schema_v1_3_feature_cvterm_pub() {
  6210. $description = array(
  6211. 'description' => '',
  6212. 'table' => 'feature_cvterm_pub',
  6213. 'fields' => array(
  6214. 'feature_cvterm_pub_id' => array(
  6215. 'size' => 'big',
  6216. 'type' => 'serial',
  6217. 'not null' => TRUE,
  6218. ),
  6219. 'feature_cvterm_id' => array(
  6220. 'size' => 'big',
  6221. 'type' => 'int',
  6222. 'not null' => TRUE,
  6223. ),
  6224. 'pub_id' => array(
  6225. 'size' => 'big',
  6226. 'type' => 'int',
  6227. 'not null' => TRUE,
  6228. ),
  6229. ),
  6230. 'unique keys' => array(
  6231. 'feature_cvterm_pub_c1' => array(
  6232. 0 => 'feature_cvterm_id',
  6233. 1 => 'pub_id',
  6234. ),
  6235. ),
  6236. 'indexes' => array(
  6237. 'feature_cvterm_pub_idx1' => array(
  6238. 0 => 'feature_cvterm_id',
  6239. ),
  6240. 'feature_cvterm_pub_idx2' => array(
  6241. 0 => 'pub_id',
  6242. ),
  6243. ),
  6244. 'primary key' => array(
  6245. 0 => 'feature_cvterm_pub_id',
  6246. ),
  6247. 'foreign keys' => array(
  6248. 'feature_cvterm' => array(
  6249. 'table' => 'feature_cvterm',
  6250. 'columns' => array(
  6251. 'feature_cvterm_id' => 'feature_cvterm_id',
  6252. ),
  6253. ),
  6254. 'pub' => array(
  6255. 'table' => 'pub',
  6256. 'columns' => array(
  6257. 'pub_id' => 'pub_id',
  6258. ),
  6259. ),
  6260. ),
  6261. 'referring_tables' => array(
  6262. ),
  6263. );
  6264. return $description;
  6265. }
  6266. /**
  6267. * Implements hook_chado_schema_v1_3_feature_dbxref()
  6268. *
  6269. * Purpose: To describe the structure of 'feature_dbxref' to tripal
  6270. * @see chado_insert_record()
  6271. * @see chado_update_record()
  6272. * @see chado_select_record()
  6273. * @see chado_generate_var()
  6274. * @see chado_expan_var()
  6275. *
  6276. * @return
  6277. * An array describing the 'feature_dbxref' table
  6278. *
  6279. * @ingroup tripal_chado_v1.3_schema_api
  6280. *
  6281. */
  6282. function tripal_chado_chado_schema_v1_3_feature_dbxref() {
  6283. $description = array(
  6284. 'description' => '',
  6285. 'table' => 'feature_dbxref',
  6286. 'fields' => array(
  6287. 'feature_dbxref_id' => array(
  6288. 'size' => 'big',
  6289. 'type' => 'serial',
  6290. 'not null' => TRUE,
  6291. ),
  6292. 'feature_id' => array(
  6293. 'size' => 'big',
  6294. 'type' => 'int',
  6295. 'not null' => TRUE,
  6296. ),
  6297. 'dbxref_id' => array(
  6298. 'size' => 'big',
  6299. 'type' => 'int',
  6300. 'not null' => TRUE,
  6301. ),
  6302. 'is_current' => array(
  6303. 'size' => 'normal',
  6304. 'type' => 'boolean',
  6305. 'not null' => TRUE,
  6306. 'default' => 'true',
  6307. ),
  6308. ),
  6309. 'unique keys' => array(
  6310. 'feature_dbxref_c1' => array(
  6311. 0 => 'feature_id',
  6312. 1 => 'dbxref_id',
  6313. ),
  6314. ),
  6315. 'indexes' => array(
  6316. 'feature_dbxref_idx1' => array(
  6317. 0 => 'feature_id',
  6318. ),
  6319. 'feature_dbxref_idx2' => array(
  6320. 0 => 'dbxref_id',
  6321. ),
  6322. ),
  6323. 'primary key' => array(
  6324. 0 => 'feature_dbxref_id',
  6325. ),
  6326. 'foreign keys' => array(
  6327. 'feature' => array(
  6328. 'table' => 'feature',
  6329. 'columns' => array(
  6330. 'feature_id' => 'feature_id',
  6331. ),
  6332. ),
  6333. 'dbxref' => array(
  6334. 'table' => 'dbxref',
  6335. 'columns' => array(
  6336. 'dbxref_id' => 'dbxref_id',
  6337. ),
  6338. ),
  6339. ),
  6340. 'referring_tables' => array(
  6341. ),
  6342. );
  6343. return $description;
  6344. }
  6345. /**
  6346. * Implements hook_chado_schema_v1_3_feature_expression()
  6347. *
  6348. * Purpose: To describe the structure of 'feature_expression' to tripal
  6349. * @see chado_insert_record()
  6350. * @see chado_update_record()
  6351. * @see chado_select_record()
  6352. * @see chado_generate_var()
  6353. * @see chado_expan_var()
  6354. *
  6355. * @return
  6356. * An array describing the 'feature_expression' table
  6357. *
  6358. * @ingroup tripal_chado_v1.3_schema_api
  6359. *
  6360. */
  6361. function tripal_chado_chado_schema_v1_3_feature_expression() {
  6362. $description = array(
  6363. 'description' => '',
  6364. 'table' => 'feature_expression',
  6365. 'fields' => array(
  6366. 'feature_expression_id' => array(
  6367. 'size' => 'big',
  6368. 'type' => 'serial',
  6369. 'not null' => TRUE,
  6370. ),
  6371. 'expression_id' => array(
  6372. 'size' => 'big',
  6373. 'type' => 'int',
  6374. 'not null' => TRUE,
  6375. ),
  6376. 'feature_id' => array(
  6377. 'size' => 'big',
  6378. 'type' => 'int',
  6379. 'not null' => TRUE,
  6380. ),
  6381. 'pub_id' => array(
  6382. 'size' => 'big',
  6383. 'type' => 'int',
  6384. 'not null' => TRUE,
  6385. ),
  6386. ),
  6387. 'unique keys' => array(
  6388. 'feature_expression_c1' => array(
  6389. 0 => 'expression_id',
  6390. 1 => 'feature_id',
  6391. 2 => 'pub_id',
  6392. ),
  6393. ),
  6394. 'indexes' => array(
  6395. 'feature_expression_idx1' => array(
  6396. 0 => 'expression_id',
  6397. ),
  6398. 'feature_expression_idx2' => array(
  6399. 0 => 'feature_id',
  6400. ),
  6401. 'feature_expression_idx3' => array(
  6402. 0 => 'pub_id',
  6403. ),
  6404. ),
  6405. 'primary key' => array(
  6406. 0 => 'feature_expression_id',
  6407. ),
  6408. 'foreign keys' => array(
  6409. 'expression' => array(
  6410. 'table' => 'expression',
  6411. 'columns' => array(
  6412. 'expression_id' => 'expression_id',
  6413. ),
  6414. ),
  6415. 'feature' => array(
  6416. 'table' => 'feature',
  6417. 'columns' => array(
  6418. 'feature_id' => 'feature_id',
  6419. ),
  6420. ),
  6421. 'pub' => array(
  6422. 'table' => 'pub',
  6423. 'columns' => array(
  6424. 'pub_id' => 'pub_id',
  6425. ),
  6426. ),
  6427. ),
  6428. 'referring_tables' => array(
  6429. 0 => 'feature_expressionprop',
  6430. ),
  6431. );
  6432. return $description;
  6433. }
  6434. /**
  6435. * Implements hook_chado_schema_v1_3_feature_expressionprop()
  6436. *
  6437. * Purpose: To describe the structure of 'feature_expressionprop' to tripal
  6438. * @see chado_insert_record()
  6439. * @see chado_update_record()
  6440. * @see chado_select_record()
  6441. * @see chado_generate_var()
  6442. * @see chado_expan_var()
  6443. *
  6444. * @return
  6445. * An array describing the 'feature_expressionprop' table
  6446. *
  6447. * @ingroup tripal_chado_v1.3_schema_api
  6448. *
  6449. */
  6450. function tripal_chado_chado_schema_v1_3_feature_expressionprop() {
  6451. $description = array(
  6452. 'description' => '',
  6453. 'table' => 'feature_expressionprop',
  6454. 'fields' => array(
  6455. 'feature_expressionprop_id' => array(
  6456. 'size' => 'big',
  6457. 'type' => 'serial',
  6458. 'not null' => TRUE,
  6459. ),
  6460. 'feature_expression_id' => array(
  6461. 'size' => 'big',
  6462. 'type' => 'int',
  6463. 'not null' => TRUE,
  6464. ),
  6465. 'type_id' => array(
  6466. 'size' => 'big',
  6467. 'type' => 'int',
  6468. 'not null' => TRUE,
  6469. ),
  6470. 'value' => array(
  6471. 'size' => 'normal',
  6472. 'type' => 'text',
  6473. 'not null' => FALSE,
  6474. ),
  6475. 'rank' => array(
  6476. 'size' => 'normal',
  6477. 'type' => 'int',
  6478. 'not null' => TRUE,
  6479. 'default' => 0,
  6480. ),
  6481. ),
  6482. 'unique keys' => array(
  6483. 'feature_expressionprop_c1' => array(
  6484. 0 => 'feature_expression_id',
  6485. 1 => 'type_id',
  6486. 2 => 'rank',
  6487. ),
  6488. ),
  6489. 'indexes' => array(
  6490. 'feature_expressionprop_idx1' => array(
  6491. 0 => 'feature_expression_id',
  6492. ),
  6493. 'feature_expressionprop_idx2' => array(
  6494. 0 => 'type_id',
  6495. ),
  6496. ),
  6497. 'primary key' => array(
  6498. 0 => 'feature_expressionprop_id',
  6499. ),
  6500. 'foreign keys' => array(
  6501. 'feature_expression' => array(
  6502. 'table' => 'feature_expression',
  6503. 'columns' => array(
  6504. 'feature_expression_id' => 'feature_expression_id',
  6505. ),
  6506. ),
  6507. 'cvterm' => array(
  6508. 'table' => 'cvterm',
  6509. 'columns' => array(
  6510. 'type_id' => 'cvterm_id',
  6511. ),
  6512. ),
  6513. ),
  6514. 'referring_tables' => array(
  6515. ),
  6516. );
  6517. return $description;
  6518. }
  6519. /**
  6520. * Implements hook_chado_schema_v1_3_feature_genotype()
  6521. *
  6522. * Purpose: To describe the structure of 'feature_genotype' to tripal
  6523. * @see chado_insert_record()
  6524. * @see chado_update_record()
  6525. * @see chado_select_record()
  6526. * @see chado_generate_var()
  6527. * @see chado_expan_var()
  6528. *
  6529. * @return
  6530. * An array describing the 'feature_genotype' table
  6531. *
  6532. * @ingroup tripal_chado_v1.3_schema_api
  6533. *
  6534. */
  6535. function tripal_chado_chado_schema_v1_3_feature_genotype() {
  6536. $description = array(
  6537. 'description' => '',
  6538. 'table' => 'feature_genotype',
  6539. 'fields' => array(
  6540. 'feature_genotype_id' => array(
  6541. 'size' => 'big',
  6542. 'type' => 'serial',
  6543. 'not null' => TRUE,
  6544. ),
  6545. 'feature_id' => array(
  6546. 'size' => 'big',
  6547. 'type' => 'int',
  6548. 'not null' => TRUE,
  6549. ),
  6550. 'genotype_id' => array(
  6551. 'size' => 'big',
  6552. 'type' => 'int',
  6553. 'not null' => TRUE,
  6554. ),
  6555. 'chromosome_id' => array(
  6556. 'size' => 'big',
  6557. 'type' => 'int',
  6558. 'not null' => FALSE,
  6559. ),
  6560. 'rank' => array(
  6561. 'size' => 'normal',
  6562. 'type' => 'int',
  6563. 'not null' => TRUE,
  6564. ),
  6565. 'cgroup' => array(
  6566. 'size' => 'normal',
  6567. 'type' => 'int',
  6568. 'not null' => TRUE,
  6569. ),
  6570. 'cvterm_id' => array(
  6571. 'size' => 'big',
  6572. 'type' => 'int',
  6573. 'not null' => TRUE,
  6574. ),
  6575. ),
  6576. 'unique keys' => array(
  6577. 'feature_genotype_c1' => array(
  6578. 0 => 'feature_id',
  6579. 1 => 'genotype_id',
  6580. 2 => 'cvterm_id',
  6581. 3 => 'chromosome_id',
  6582. 4 => 'rank',
  6583. 5 => 'cgroup',
  6584. ),
  6585. ),
  6586. 'indexes' => array(
  6587. 'feature_genotype_idx1' => array(
  6588. 0 => 'feature_id',
  6589. ),
  6590. 'feature_genotype_idx2' => array(
  6591. 0 => 'genotype_id',
  6592. ),
  6593. ),
  6594. 'primary key' => array(
  6595. 0 => 'feature_genotype_id',
  6596. ),
  6597. 'foreign keys' => array(
  6598. 'feature' => array(
  6599. 'table' => 'feature',
  6600. 'columns' => array(
  6601. 'feature_id' => 'feature_id',
  6602. 'chromosome_id' => 'feature_id',
  6603. ),
  6604. ),
  6605. 'genotype' => array(
  6606. 'table' => 'genotype',
  6607. 'columns' => array(
  6608. 'genotype_id' => 'genotype_id',
  6609. ),
  6610. ),
  6611. 'cvterm' => array(
  6612. 'table' => 'cvterm',
  6613. 'columns' => array(
  6614. 'cvterm_id' => 'cvterm_id',
  6615. ),
  6616. ),
  6617. ),
  6618. 'referring_tables' => array(
  6619. ),
  6620. );
  6621. return $description;
  6622. }
  6623. /**
  6624. * Implements hook_chado_schema_v1_3_featureloc()
  6625. *
  6626. * Purpose: To describe the structure of 'featureloc' to tripal
  6627. * @see chado_insert_record()
  6628. * @see chado_update_record()
  6629. * @see chado_select_record()
  6630. * @see chado_generate_var()
  6631. * @see chado_expan_var()
  6632. *
  6633. * @return
  6634. * An array describing the 'featureloc' table
  6635. *
  6636. * @ingroup tripal_chado_v1.3_schema_api
  6637. *
  6638. */
  6639. function tripal_chado_chado_schema_v1_3_featureloc() {
  6640. $description = array(
  6641. 'description' => '',
  6642. 'table' => 'featureloc',
  6643. 'fields' => array(
  6644. 'featureloc_id' => array(
  6645. 'size' => 'big',
  6646. 'type' => 'serial',
  6647. 'not null' => TRUE,
  6648. ),
  6649. 'feature_id' => array(
  6650. 'size' => 'big',
  6651. 'type' => 'int',
  6652. 'not null' => TRUE,
  6653. ),
  6654. 'srcfeature_id' => array(
  6655. 'size' => 'big',
  6656. 'type' => 'int',
  6657. 'not null' => FALSE,
  6658. ),
  6659. 'fmin' => array(
  6660. 'size' => 'big',
  6661. 'type' => 'int',
  6662. 'not null' => FALSE,
  6663. ),
  6664. 'is_fmin_partial' => array(
  6665. 'size' => 'normal',
  6666. 'type' => 'boolean',
  6667. 'not null' => TRUE,
  6668. 'default' => FALSE,
  6669. ),
  6670. 'fmax' => array(
  6671. 'size' => 'big',
  6672. 'type' => 'int',
  6673. 'not null' => FALSE,
  6674. ),
  6675. 'is_fmax_partial' => array(
  6676. 'size' => 'normal',
  6677. 'type' => 'boolean',
  6678. 'not null' => TRUE,
  6679. 'default' => FALSE,
  6680. ),
  6681. 'strand' => array(
  6682. 'size' => 'small',
  6683. 'type' => 'int',
  6684. 'not null' => FALSE,
  6685. ),
  6686. 'phase' => array(
  6687. 'size' => 'normal',
  6688. 'type' => 'int',
  6689. 'not null' => FALSE,
  6690. ),
  6691. 'residue_info' => array(
  6692. 'size' => 'normal',
  6693. 'type' => 'text',
  6694. 'not null' => FALSE,
  6695. ),
  6696. 'locgroup' => array(
  6697. 'size' => 'normal',
  6698. 'type' => 'int',
  6699. 'not null' => TRUE,
  6700. 'default' => 0,
  6701. ),
  6702. 'rank' => array(
  6703. 'size' => 'normal',
  6704. 'type' => 'int',
  6705. 'not null' => TRUE,
  6706. 'default' => 0,
  6707. ),
  6708. ),
  6709. 'indexes' => array(
  6710. 'binloc_boxrange' => array(
  6711. 0 => 'fmin',
  6712. ),
  6713. 'binloc_boxrange_src' => array(
  6714. 0 => 'srcfeature_id',
  6715. 1 => 'fmin',
  6716. ),
  6717. 'featureloc_idx1' => array(
  6718. 0 => 'feature_id',
  6719. ),
  6720. 'featureloc_idx1b' => array(
  6721. 0 => 'feature_id',
  6722. 1 => 'fmin',
  6723. 2 => 'fmax',
  6724. ),
  6725. 'featureloc_idx2' => array(
  6726. 0 => 'srcfeature_id',
  6727. ),
  6728. 'featureloc_idx3' => array(
  6729. 0 => 'srcfeature_id',
  6730. 1 => 'fmin',
  6731. 2 => 'fmax',
  6732. ),
  6733. ),
  6734. 'unique keys' => array(
  6735. 'featureloc_c1' => array(
  6736. 0 => 'feature_id',
  6737. 1 => 'locgroup',
  6738. 2 => 'rank',
  6739. ),
  6740. ),
  6741. 'primary key' => array(
  6742. 0 => 'featureloc_id',
  6743. ),
  6744. 'foreign keys' => array(
  6745. 'feature' => array(
  6746. 'table' => 'feature',
  6747. 'columns' => array(
  6748. 'feature_id' => 'feature_id',
  6749. 'srcfeature_id' => 'feature_id',
  6750. ),
  6751. ),
  6752. ),
  6753. 'referring_tables' => array(
  6754. 0 => 'featureloc_pub',
  6755. ),
  6756. );
  6757. return $description;
  6758. }
  6759. /**
  6760. * Implements hook_chado_schema_v1_3_featureloc_pub()
  6761. *
  6762. * Purpose: To describe the structure of 'featureloc_pub' to tripal
  6763. * @see chado_insert_record()
  6764. * @see chado_update_record()
  6765. * @see chado_select_record()
  6766. * @see chado_generate_var()
  6767. * @see chado_expan_var()
  6768. *
  6769. * @return
  6770. * An array describing the 'featureloc_pub' table
  6771. *
  6772. * @ingroup tripal_chado_v1.3_schema_api
  6773. *
  6774. */
  6775. function tripal_chado_chado_schema_v1_3_featureloc_pub() {
  6776. $description = array(
  6777. 'description' => '',
  6778. 'table' => 'featureloc_pub',
  6779. 'fields' => array(
  6780. 'featureloc_pub_id' => array(
  6781. 'size' => 'big',
  6782. 'type' => 'serial',
  6783. 'not null' => TRUE,
  6784. ),
  6785. 'featureloc_id' => array(
  6786. 'size' => 'big',
  6787. 'type' => 'int',
  6788. 'not null' => TRUE,
  6789. ),
  6790. 'pub_id' => array(
  6791. 'size' => 'big',
  6792. 'type' => 'int',
  6793. 'not null' => TRUE,
  6794. ),
  6795. ),
  6796. 'unique keys' => array(
  6797. 'featureloc_pub_c1' => array(
  6798. 0 => 'featureloc_id',
  6799. 1 => 'pub_id',
  6800. ),
  6801. ),
  6802. 'indexes' => array(
  6803. 'featureloc_pub_idx1' => array(
  6804. 0 => 'featureloc_id',
  6805. ),
  6806. 'featureloc_pub_idx2' => array(
  6807. 0 => 'pub_id',
  6808. ),
  6809. ),
  6810. 'primary key' => array(
  6811. 0 => 'featureloc_pub_id',
  6812. ),
  6813. 'foreign keys' => array(
  6814. 'featureloc' => array(
  6815. 'table' => 'featureloc',
  6816. 'columns' => array(
  6817. 'featureloc_id' => 'featureloc_id',
  6818. ),
  6819. ),
  6820. 'pub' => array(
  6821. 'table' => 'pub',
  6822. 'columns' => array(
  6823. 'pub_id' => 'pub_id',
  6824. ),
  6825. ),
  6826. ),
  6827. 'referring_tables' => array(
  6828. ),
  6829. );
  6830. return $description;
  6831. }
  6832. /**
  6833. * Implements hook_chado_schema_v1_3_featuremap()
  6834. *
  6835. * Purpose: To describe the structure of 'featuremap' to tripal
  6836. * @see chado_insert_record()
  6837. * @see chado_update_record()
  6838. * @see chado_select_record()
  6839. * @see chado_generate_var()
  6840. * @see chado_expan_var()
  6841. *
  6842. * @return
  6843. * An array describing the 'featuremap' table
  6844. *
  6845. * @ingroup tripal_chado_v1.3_schema_api
  6846. *
  6847. */
  6848. function tripal_chado_chado_schema_v1_3_featuremap() {
  6849. $description = array(
  6850. 'description' => '',
  6851. 'table' => 'featuremap',
  6852. 'fields' => array(
  6853. 'featuremap_id' => array(
  6854. 'size' => 'big',
  6855. 'type' => 'serial',
  6856. 'not null' => TRUE,
  6857. ),
  6858. 'name' => array(
  6859. 'size' => 'normal',
  6860. 'type' => 'varchar',
  6861. 'length' => '255',
  6862. 'not null' => FALSE,
  6863. ),
  6864. 'description' => array(
  6865. 'size' => 'normal',
  6866. 'type' => 'text',
  6867. 'not null' => FALSE,
  6868. ),
  6869. 'unittype_id' => array(
  6870. 'size' => 'big',
  6871. 'type' => 'int',
  6872. 'not null' => FALSE,
  6873. ),
  6874. ),
  6875. 'unique keys' => array(
  6876. 'featuremap_c1' => array(
  6877. 0 => 'name',
  6878. ),
  6879. ),
  6880. 'primary key' => array(
  6881. 0 => 'featuremap_id',
  6882. ),
  6883. 'foreign keys' => array(
  6884. 'cvterm' => array(
  6885. 'table' => 'cvterm',
  6886. 'columns' => array(
  6887. 'unittype_id' => 'cvterm_id',
  6888. ),
  6889. ),
  6890. ),
  6891. 'referring_tables' => array(
  6892. 0 => 'featuremap_contact',
  6893. 1 => 'featuremap_dbxref',
  6894. 2 => 'featuremap_organism',
  6895. 3 => 'featuremapprop',
  6896. 4 => 'featuremap_pub',
  6897. 5 => 'featurepos',
  6898. 6 => 'featurerange',
  6899. 7 => 'stock_featuremap',
  6900. ),
  6901. );
  6902. return $description;
  6903. }
  6904. /**
  6905. * Implements hook_chado_schema_v1_3_featuremap_contact()
  6906. *
  6907. * Purpose: To describe the structure of 'featuremap_contact' to tripal
  6908. * @see chado_insert_record()
  6909. * @see chado_update_record()
  6910. * @see chado_select_record()
  6911. * @see chado_generate_var()
  6912. * @see chado_expan_var()
  6913. *
  6914. * @return
  6915. * An array describing the 'featuremap_contact' table
  6916. *
  6917. * @ingroup tripal_chado_v1.3_schema_api
  6918. *
  6919. */
  6920. function tripal_chado_chado_schema_v1_3_featuremap_contact() {
  6921. $description = array(
  6922. 'description' => '',
  6923. 'table' => 'featuremap_contact',
  6924. 'fields' => array(
  6925. 'featuremap_contact_id' => array(
  6926. 'size' => 'big',
  6927. 'type' => 'serial',
  6928. 'not null' => TRUE,
  6929. ),
  6930. 'featuremap_id' => array(
  6931. 'size' => 'big',
  6932. 'type' => 'int',
  6933. 'not null' => TRUE,
  6934. ),
  6935. 'contact_id' => array(
  6936. 'size' => 'big',
  6937. 'type' => 'int',
  6938. 'not null' => TRUE,
  6939. ),
  6940. ),
  6941. 'unique keys' => array(
  6942. 'featuremap_contact_c1' => array(
  6943. 0 => 'featuremap_id',
  6944. 1 => 'contact_id',
  6945. ),
  6946. ),
  6947. 'indexes' => array(
  6948. 'featuremap_contact_idx1' => array(
  6949. 0 => 'featuremap_id',
  6950. ),
  6951. 'featuremap_contact_idx2' => array(
  6952. 0 => 'contact_id',
  6953. ),
  6954. ),
  6955. 'primary key' => array(
  6956. 0 => 'featuremap_contact_id',
  6957. ),
  6958. 'foreign keys' => array(
  6959. 'contact' => array(
  6960. 'table' => 'contact',
  6961. 'columns' => array(
  6962. 'contact_id' => 'contact_id',
  6963. ),
  6964. ),
  6965. 'featuremap' => array(
  6966. 'table' => 'featuremap',
  6967. 'columns' => array(
  6968. 'featuremap_id' => 'featuremap_id',
  6969. ),
  6970. ),
  6971. ),
  6972. 'referring_tables' => array(
  6973. ),
  6974. );
  6975. return $description;
  6976. }
  6977. /**
  6978. * Implements hook_chado_schema_v1_3_featuremap_dbxref()
  6979. *
  6980. * Purpose: To describe the structure of 'featuremap_dbxref' to tripal
  6981. * @see chado_insert_record()
  6982. * @see chado_update_record()
  6983. * @see chado_select_record()
  6984. * @see chado_generate_var()
  6985. * @see chado_expan_var()
  6986. *
  6987. * @return
  6988. * An array describing the 'featuremap_dbxref' table
  6989. *
  6990. * @ingroup tripal_chado_v1.3_schema_api
  6991. *
  6992. */
  6993. function tripal_chado_chado_schema_v1_3_featuremap_dbxref() {
  6994. $description = array(
  6995. 'description' => '',
  6996. 'table' => 'featuremap_dbxref',
  6997. 'fields' => array(
  6998. 'featuremap_dbxref_id' => array(
  6999. 'size' => 'big',
  7000. 'type' => 'serial',
  7001. 'not null' => TRUE,
  7002. ),
  7003. 'featuremap_id' => array(
  7004. 'size' => 'big',
  7005. 'type' => 'int',
  7006. 'not null' => TRUE,
  7007. ),
  7008. 'dbxref_id' => array(
  7009. 'size' => 'big',
  7010. 'type' => 'int',
  7011. 'not null' => TRUE,
  7012. ),
  7013. 'is_current' => array(
  7014. 'size' => 'normal',
  7015. 'type' => 'boolean',
  7016. 'not null' => TRUE,
  7017. 'default' => 'true',
  7018. ),
  7019. ),
  7020. 'unique keys' => array(
  7021. /* @todo: this unique constraint is missing from the actual Chado schema.
  7022. It should be included.
  7023. 'feature_dbxref_c1' => array(
  7024. 0 => 'featuremap_id',
  7025. 1 => 'dbxref_id',
  7026. ),
  7027. */
  7028. ),
  7029. 'indexes' => array(
  7030. 'featuremap_dbxref_idx1' => array(
  7031. 0 => 'featuremap_id',
  7032. ),
  7033. 'featuremap_dbxref_idx2' => array(
  7034. 0 => 'dbxref_id',
  7035. ),
  7036. ),
  7037. 'primary key' => array(
  7038. 0 => 'featuremap_dbxref_id',
  7039. ),
  7040. 'foreign keys' => array(
  7041. 'featuremap' => array(
  7042. 'table' => 'featuremap',
  7043. 'columns' => array(
  7044. 'featuremap_id' => 'featuremap_id',
  7045. ),
  7046. ),
  7047. 'dbxref' => array(
  7048. 'table' => 'dbxref',
  7049. 'columns' => array(
  7050. 'dbxref_id' => 'dbxref_id',
  7051. ),
  7052. ),
  7053. ),
  7054. 'referring_tables' => array(
  7055. ),
  7056. );
  7057. return $description;
  7058. }
  7059. /**
  7060. * Implements hook_chado_schema_v1_3_featuremap_organism()
  7061. *
  7062. * Purpose: To describe the structure of 'featuremap_organism' to tripal
  7063. * @see chado_insert_record()
  7064. * @see chado_update_record()
  7065. * @see chado_select_record()
  7066. * @see chado_generate_var()
  7067. * @see chado_expan_var()
  7068. *
  7069. * @return
  7070. * An array describing the 'featuremap_organism' table
  7071. *
  7072. * @ingroup tripal_chado_v1.3_schema_api
  7073. *
  7074. */
  7075. function tripal_chado_chado_schema_v1_3_featuremap_organism() {
  7076. $description = array(
  7077. 'description' => '',
  7078. 'table' => 'featuremap_organism',
  7079. 'fields' => array(
  7080. 'featuremap_organism_id' => array(
  7081. 'size' => 'big',
  7082. 'type' => 'serial',
  7083. 'not null' => TRUE,
  7084. ),
  7085. 'featuremap_id' => array(
  7086. 'size' => 'big',
  7087. 'type' => 'int',
  7088. 'not null' => TRUE,
  7089. ),
  7090. 'organism_id' => array(
  7091. 'size' => 'big',
  7092. 'type' => 'int',
  7093. 'not null' => TRUE,
  7094. ),
  7095. ),
  7096. 'unique keys' => array(
  7097. 'featuremap_organism_c1' => array(
  7098. 0 => 'featuremap_id',
  7099. 1 => 'organism_id',
  7100. ),
  7101. ),
  7102. 'indexes' => array(
  7103. 'featuremap_organism_idx1' => array(
  7104. 0 => 'featuremap_id',
  7105. ),
  7106. 'featuremap_organism_idx2' => array(
  7107. 0 => 'organism_id',
  7108. ),
  7109. ),
  7110. 'primary key' => array(
  7111. 0 => 'featuremap_organism_id',
  7112. ),
  7113. 'foreign keys' => array(
  7114. 'featuremap' => array(
  7115. 'table' => 'featuremap',
  7116. 'columns' => array(
  7117. 'featuremap_id' => 'featuremap_id',
  7118. ),
  7119. ),
  7120. 'organism' => array(
  7121. 'table' => 'organism',
  7122. 'columns' => array(
  7123. 'organism_id' => 'organism_id',
  7124. ),
  7125. ),
  7126. ),
  7127. 'referring_tables' => array(
  7128. ),
  7129. );
  7130. return $description;
  7131. }
  7132. /**
  7133. * Implements hook_chado_schema_v1_3_featuremapprop()
  7134. *
  7135. * Purpose: To describe the structure of 'featuremapprop' to tripal
  7136. * @see chado_insert_record()
  7137. * @see chado_update_record()
  7138. * @see chado_select_record()
  7139. * @see chado_generate_var()
  7140. * @see chado_expan_var()
  7141. *
  7142. * @return
  7143. * An array describing the 'featuremapprop' table
  7144. *
  7145. * @ingroup tripal_chado_v1.3_schema_api
  7146. *
  7147. */
  7148. function tripal_chado_chado_schema_v1_3_featuremapprop() {
  7149. $description = array(
  7150. 'description' => '',
  7151. 'table' => 'featuremapprop',
  7152. 'fields' => array(
  7153. 'featuremapprop_id' => array(
  7154. 'size' => 'big',
  7155. 'type' => 'serial',
  7156. 'not null' => TRUE,
  7157. ),
  7158. 'featuremap_id' => array(
  7159. 'size' => 'big',
  7160. 'type' => 'int',
  7161. 'not null' => TRUE,
  7162. ),
  7163. 'type_id' => array(
  7164. 'size' => 'big',
  7165. 'type' => 'int',
  7166. 'not null' => TRUE,
  7167. ),
  7168. 'value' => array(
  7169. 'size' => 'normal',
  7170. 'type' => 'text',
  7171. 'not null' => FALSE,
  7172. ),
  7173. 'rank' => array(
  7174. 'size' => 'normal',
  7175. 'type' => 'int',
  7176. 'not null' => TRUE,
  7177. 'default' => 0,
  7178. ),
  7179. ),
  7180. 'unique keys' => array(
  7181. 'featuremapprop_c1' => array(
  7182. 0 => 'featuremap_id',
  7183. 1 => 'type_id',
  7184. 2 => 'rank',
  7185. ),
  7186. ),
  7187. 'indexes' => array(
  7188. 'featuremapprop_idx1' => array(
  7189. 0 => 'featuremap_id',
  7190. ),
  7191. 'featuremapprop_idx2' => array(
  7192. 0 => 'type_id',
  7193. ),
  7194. ),
  7195. 'primary key' => array(
  7196. 0 => 'featuremapprop_id',
  7197. ),
  7198. 'foreign keys' => array(
  7199. 'featuremap' => array(
  7200. 'table' => 'featuremap',
  7201. 'columns' => array(
  7202. 'featuremap_id' => 'featuremap_id',
  7203. ),
  7204. ),
  7205. 'cvterm' => array(
  7206. 'table' => 'cvterm',
  7207. 'columns' => array(
  7208. 'type_id' => 'cvterm_id',
  7209. ),
  7210. ),
  7211. ),
  7212. 'referring_tables' => array(
  7213. ),
  7214. );
  7215. return $description;
  7216. }
  7217. /**
  7218. * Implements hook_chado_schema_v1_3_featuremap_pub()
  7219. *
  7220. * Purpose: To describe the structure of 'featuremap_pub' to tripal
  7221. * @see chado_insert_record()
  7222. * @see chado_update_record()
  7223. * @see chado_select_record()
  7224. * @see chado_generate_var()
  7225. * @see chado_expan_var()
  7226. *
  7227. * @return
  7228. * An array describing the 'featuremap_pub' table
  7229. *
  7230. * @ingroup tripal_chado_v1.3_schema_api
  7231. *
  7232. */
  7233. function tripal_chado_chado_schema_v1_3_featuremap_pub() {
  7234. $description = array(
  7235. 'description' => '',
  7236. 'table' => 'featuremap_pub',
  7237. 'fields' => array(
  7238. 'featuremap_pub_id' => array(
  7239. 'size' => 'big',
  7240. 'type' => 'serial',
  7241. 'not null' => TRUE,
  7242. ),
  7243. 'featuremap_id' => array(
  7244. 'size' => 'big',
  7245. 'type' => 'int',
  7246. 'not null' => TRUE,
  7247. ),
  7248. 'pub_id' => array(
  7249. 'size' => 'big',
  7250. 'type' => 'int',
  7251. 'not null' => TRUE,
  7252. ),
  7253. ),
  7254. 'unique keys' => array(
  7255. /* @todo: this unique constraint is missing from the actual Chado schema.
  7256. It should be included.
  7257. 'feature_pub_c1' => array(
  7258. 0 => 'featuremap_id',
  7259. 1 => 'pub_id',
  7260. ),
  7261. */
  7262. ),
  7263. 'indexes' => array(
  7264. 'featuremap_pub_idx1' => array(
  7265. 0 => 'featuremap_id',
  7266. ),
  7267. 'featuremap_pub_idx2' => array(
  7268. 0 => 'pub_id',
  7269. ),
  7270. ),
  7271. 'primary key' => array(
  7272. 0 => 'featuremap_pub_id',
  7273. ),
  7274. 'foreign keys' => array(
  7275. 'featuremap' => array(
  7276. 'table' => 'featuremap',
  7277. 'columns' => array(
  7278. 'featuremap_id' => 'featuremap_id',
  7279. ),
  7280. ),
  7281. 'pub' => array(
  7282. 'table' => 'pub',
  7283. 'columns' => array(
  7284. 'pub_id' => 'pub_id',
  7285. ),
  7286. ),
  7287. ),
  7288. 'referring_tables' => array(
  7289. ),
  7290. );
  7291. return $description;
  7292. }
  7293. /**
  7294. * Implements hook_chado_schema_v1_3_feature_phenotype()
  7295. *
  7296. * Purpose: To describe the structure of 'feature_phenotype' to tripal
  7297. * @see chado_insert_record()
  7298. * @see chado_update_record()
  7299. * @see chado_select_record()
  7300. * @see chado_generate_var()
  7301. * @see chado_expan_var()
  7302. *
  7303. * @return
  7304. * An array describing the 'feature_phenotype' table
  7305. *
  7306. * @ingroup tripal_chado_v1.3_schema_api
  7307. *
  7308. */
  7309. function tripal_chado_chado_schema_v1_3_feature_phenotype() {
  7310. $description = array(
  7311. 'description' => '',
  7312. 'table' => 'feature_phenotype',
  7313. 'fields' => array(
  7314. 'feature_phenotype_id' => array(
  7315. 'size' => 'big',
  7316. 'type' => 'serial',
  7317. 'not null' => TRUE,
  7318. ),
  7319. 'feature_id' => array(
  7320. 'size' => 'big',
  7321. 'type' => 'int',
  7322. 'not null' => TRUE,
  7323. ),
  7324. 'phenotype_id' => array(
  7325. 'size' => 'big',
  7326. 'type' => 'int',
  7327. 'not null' => TRUE,
  7328. ),
  7329. ),
  7330. 'unique keys' => array(
  7331. 'feature_phenotype_c1' => array(
  7332. 0 => 'feature_id',
  7333. 1 => 'phenotype_id',
  7334. ),
  7335. ),
  7336. 'indexes' => array(
  7337. 'feature_phenotype_idx1' => array(
  7338. 0 => 'feature_id',
  7339. ),
  7340. 'feature_phenotype_idx2' => array(
  7341. 0 => 'phenotype_id',
  7342. ),
  7343. ),
  7344. 'primary key' => array(
  7345. 0 => 'feature_phenotype_id',
  7346. ),
  7347. 'foreign keys' => array(
  7348. 'feature' => array(
  7349. 'table' => 'feature',
  7350. 'columns' => array(
  7351. 'feature_id' => 'feature_id',
  7352. ),
  7353. ),
  7354. 'phenotype' => array(
  7355. 'table' => 'phenotype',
  7356. 'columns' => array(
  7357. 'phenotype_id' => 'phenotype_id',
  7358. ),
  7359. ),
  7360. ),
  7361. 'referring_tables' => array(
  7362. ),
  7363. );
  7364. return $description;
  7365. }
  7366. /**
  7367. * Implements hook_chado_schema_v1_3_featurepos()
  7368. *
  7369. * Purpose: To describe the structure of 'featurepos' to tripal
  7370. * @see chado_insert_record()
  7371. * @see chado_update_record()
  7372. * @see chado_select_record()
  7373. * @see chado_generate_var()
  7374. * @see chado_expan_var()
  7375. *
  7376. * @return
  7377. * An array describing the 'featurepos' table
  7378. *
  7379. * @ingroup tripal_chado_v1.3_schema_api
  7380. *
  7381. */
  7382. function tripal_chado_chado_schema_v1_3_featurepos() {
  7383. $description = array(
  7384. 'description' => '',
  7385. 'table' => 'featurepos',
  7386. 'fields' => array(
  7387. 'featurepos_id' => array(
  7388. 'size' => 'big',
  7389. 'type' => 'serial',
  7390. 'not null' => TRUE,
  7391. ),
  7392. 'featuremap_id' => array(
  7393. 'size' => 'big',
  7394. 'type' => 'int',
  7395. 'not null' => TRUE,
  7396. ),
  7397. 'feature_id' => array(
  7398. 'size' => 'big',
  7399. 'type' => 'int',
  7400. 'not null' => TRUE,
  7401. ),
  7402. 'map_feature_id' => array(
  7403. 'size' => 'big',
  7404. 'type' => 'int',
  7405. 'not null' => TRUE,
  7406. ),
  7407. 'mappos' => array(
  7408. 'size' => 'big',
  7409. 'type' => 'float',
  7410. 'not null' => TRUE,
  7411. ),
  7412. ),
  7413. 'indexes' => array(
  7414. 'featurepos_idx1' => array(
  7415. 0 => 'featuremap_id',
  7416. ),
  7417. 'featurepos_idx2' => array(
  7418. 0 => 'feature_id',
  7419. ),
  7420. 'featurepos_idx3' => array(
  7421. 0 => 'map_feature_id',
  7422. ),
  7423. ),
  7424. 'primary key' => array(
  7425. 0 => 'featurepos_id',
  7426. ),
  7427. 'foreign keys' => array(
  7428. 'featuremap' => array(
  7429. 'table' => 'featuremap',
  7430. 'columns' => array(
  7431. 'featuremap_id' => 'featuremap_id',
  7432. ),
  7433. ),
  7434. 'feature' => array(
  7435. 'table' => 'feature',
  7436. 'columns' => array(
  7437. 'feature_id' => 'feature_id',
  7438. 'map_feature_id' => 'feature_id',
  7439. ),
  7440. ),
  7441. ),
  7442. 'referring_tables' => array(
  7443. 0 => 'featureposprop',
  7444. ),
  7445. );
  7446. return $description;
  7447. }
  7448. /**
  7449. * Implements hook_chado_schema_v1_3_featureposprop()
  7450. *
  7451. * Purpose: To describe the structure of 'featureposprop' to tripal
  7452. * @see chado_insert_record()
  7453. * @see chado_update_record()
  7454. * @see chado_select_record()
  7455. * @see chado_generate_var()
  7456. * @see chado_expan_var()
  7457. *
  7458. * @return
  7459. * An array describing the 'featureposprop' table
  7460. *
  7461. * @ingroup tripal_chado_v1.3_schema_api
  7462. *
  7463. */
  7464. function tripal_chado_chado_schema_v1_3_featureposprop() {
  7465. $description = array(
  7466. 'description' => '',
  7467. 'table' => 'featureposprop',
  7468. 'fields' => array(
  7469. 'featureposprop_id' => array(
  7470. 'size' => 'big',
  7471. 'type' => 'serial',
  7472. 'not null' => TRUE,
  7473. ),
  7474. 'featurepos_id' => array(
  7475. 'size' => 'big',
  7476. 'type' => 'int',
  7477. 'not null' => TRUE,
  7478. ),
  7479. 'type_id' => array(
  7480. 'size' => 'big',
  7481. 'type' => 'int',
  7482. 'not null' => TRUE,
  7483. ),
  7484. 'value' => array(
  7485. 'size' => 'normal',
  7486. 'type' => 'text',
  7487. 'not null' => FALSE,
  7488. ),
  7489. 'rank' => array(
  7490. 'size' => 'normal',
  7491. 'type' => 'int',
  7492. 'not null' => TRUE,
  7493. 'default' => 0,
  7494. ),
  7495. ),
  7496. 'unique keys' => array(
  7497. 'featureposprop_c1' => array(
  7498. 0 => 'featurepos_id',
  7499. 1 => 'type_id',
  7500. 2 => 'rank',
  7501. ),
  7502. ),
  7503. 'indexes' => array(
  7504. 'featureposprop_idx1' => array(
  7505. 0 => 'featurepos_id',
  7506. ),
  7507. 'featureposprop_idx2' => array(
  7508. 0 => 'type_id',
  7509. ),
  7510. ),
  7511. 'primary key' => array(
  7512. 0 => 'featureposprop_id',
  7513. ),
  7514. 'foreign keys' => array(
  7515. 'featurepos' => array(
  7516. 'table' => 'featurepos',
  7517. 'columns' => array(
  7518. 'featurepos_id' => 'featurepos_id',
  7519. ),
  7520. ),
  7521. 'cvterm' => array(
  7522. 'table' => 'cvterm',
  7523. 'columns' => array(
  7524. 'type_id' => 'cvterm_id',
  7525. ),
  7526. ),
  7527. ),
  7528. 'referring_tables' => array(
  7529. ),
  7530. );
  7531. return $description;
  7532. }
  7533. /**
  7534. * Implements hook_chado_schema_v1_3_featureprop()
  7535. *
  7536. * Purpose: To describe the structure of 'featureprop' to tripal
  7537. * @see chado_insert_record()
  7538. * @see chado_update_record()
  7539. * @see chado_select_record()
  7540. * @see chado_generate_var()
  7541. * @see chado_expan_var()
  7542. *
  7543. * @return
  7544. * An array describing the 'featureprop' table
  7545. *
  7546. * @ingroup tripal_chado_v1.3_schema_api
  7547. *
  7548. */
  7549. function tripal_chado_chado_schema_v1_3_featureprop() {
  7550. $description = array(
  7551. 'description' => '',
  7552. 'table' => 'featureprop',
  7553. 'fields' => array(
  7554. 'featureprop_id' => array(
  7555. 'size' => 'big',
  7556. 'type' => 'serial',
  7557. 'not null' => TRUE,
  7558. ),
  7559. 'feature_id' => array(
  7560. 'size' => 'big',
  7561. 'type' => 'int',
  7562. 'not null' => TRUE,
  7563. ),
  7564. 'type_id' => array(
  7565. 'size' => 'big',
  7566. 'type' => 'int',
  7567. 'not null' => TRUE,
  7568. ),
  7569. 'value' => array(
  7570. 'size' => 'normal',
  7571. 'type' => 'text',
  7572. 'not null' => FALSE,
  7573. ),
  7574. 'rank' => array(
  7575. 'size' => 'normal',
  7576. 'type' => 'int',
  7577. 'not null' => TRUE,
  7578. 'default' => 0,
  7579. ),
  7580. ),
  7581. 'unique keys' => array(
  7582. 'featureprop_c1' => array(
  7583. 0 => 'feature_id',
  7584. 1 => 'type_id',
  7585. 2 => 'rank',
  7586. ),
  7587. ),
  7588. 'indexes' => array(
  7589. 'featureprop_idx1' => array(
  7590. 0 => 'feature_id',
  7591. ),
  7592. 'featureprop_idx2' => array(
  7593. 0 => 'type_id',
  7594. ),
  7595. ),
  7596. 'primary key' => array(
  7597. 0 => 'featureprop_id',
  7598. ),
  7599. 'foreign keys' => array(
  7600. 'feature' => array(
  7601. 'table' => 'feature',
  7602. 'columns' => array(
  7603. 'feature_id' => 'feature_id',
  7604. ),
  7605. ),
  7606. 'cvterm' => array(
  7607. 'table' => 'cvterm',
  7608. 'columns' => array(
  7609. 'type_id' => 'cvterm_id',
  7610. ),
  7611. ),
  7612. ),
  7613. 'referring_tables' => array(
  7614. 0 => 'featureprop_pub',
  7615. ),
  7616. );
  7617. return $description;
  7618. }
  7619. /**
  7620. * Implements hook_chado_schema_v1_3_featureprop_pub()
  7621. *
  7622. * Purpose: To describe the structure of 'featureprop_pub' to tripal
  7623. * @see chado_insert_record()
  7624. * @see chado_update_record()
  7625. * @see chado_select_record()
  7626. * @see chado_generate_var()
  7627. * @see chado_expan_var()
  7628. *
  7629. * @return
  7630. * An array describing the 'featureprop_pub' table
  7631. *
  7632. * @ingroup tripal_chado_v1.3_schema_api
  7633. *
  7634. */
  7635. function tripal_chado_chado_schema_v1_3_featureprop_pub() {
  7636. $description = array(
  7637. 'description' => '',
  7638. 'table' => 'featureprop_pub',
  7639. 'fields' => array(
  7640. 'featureprop_pub_id' => array(
  7641. 'size' => 'big',
  7642. 'type' => 'serial',
  7643. 'not null' => TRUE,
  7644. ),
  7645. 'featureprop_id' => array(
  7646. 'size' => 'big',
  7647. 'type' => 'int',
  7648. 'not null' => TRUE,
  7649. ),
  7650. 'pub_id' => array(
  7651. 'size' => 'big',
  7652. 'type' => 'int',
  7653. 'not null' => TRUE,
  7654. ),
  7655. ),
  7656. 'unique keys' => array(
  7657. 'featureprop_pub_c1' => array(
  7658. 0 => 'featureprop_id',
  7659. 1 => 'pub_id',
  7660. ),
  7661. ),
  7662. 'indexes' => array(
  7663. 'featureprop_pub_idx1' => array(
  7664. 0 => 'featureprop_id',
  7665. ),
  7666. 'featureprop_pub_idx2' => array(
  7667. 0 => 'pub_id',
  7668. ),
  7669. ),
  7670. 'primary key' => array(
  7671. 0 => 'featureprop_pub_id',
  7672. ),
  7673. 'foreign keys' => array(
  7674. 'featureprop' => array(
  7675. 'table' => 'featureprop',
  7676. 'columns' => array(
  7677. 'featureprop_id' => 'featureprop_id',
  7678. ),
  7679. ),
  7680. 'pub' => array(
  7681. 'table' => 'pub',
  7682. 'columns' => array(
  7683. 'pub_id' => 'pub_id',
  7684. ),
  7685. ),
  7686. ),
  7687. 'referring_tables' => array(
  7688. ),
  7689. );
  7690. return $description;
  7691. }
  7692. /**
  7693. * Implements hook_chado_schema_v1_3_feature_pub()
  7694. *
  7695. * Purpose: To describe the structure of 'feature_pub' to tripal
  7696. * @see chado_insert_record()
  7697. * @see chado_update_record()
  7698. * @see chado_select_record()
  7699. * @see chado_generate_var()
  7700. * @see chado_expan_var()
  7701. *
  7702. * @return
  7703. * An array describing the 'feature_pub' table
  7704. *
  7705. * @ingroup tripal_chado_v1.3_schema_api
  7706. *
  7707. */
  7708. function tripal_chado_chado_schema_v1_3_feature_pub() {
  7709. $description = array(
  7710. 'description' => '',
  7711. 'table' => 'feature_pub',
  7712. 'fields' => array(
  7713. 'feature_pub_id' => array(
  7714. 'size' => 'big',
  7715. 'type' => 'serial',
  7716. 'not null' => TRUE,
  7717. ),
  7718. 'feature_id' => array(
  7719. 'size' => 'big',
  7720. 'type' => 'int',
  7721. 'not null' => TRUE,
  7722. ),
  7723. 'pub_id' => array(
  7724. 'size' => 'big',
  7725. 'type' => 'int',
  7726. 'not null' => TRUE,
  7727. ),
  7728. ),
  7729. 'unique keys' => array(
  7730. 'feature_pub_c1' => array(
  7731. 0 => 'feature_id',
  7732. 1 => 'pub_id',
  7733. ),
  7734. ),
  7735. 'indexes' => array(
  7736. 'feature_pub_idx1' => array(
  7737. 0 => 'feature_id',
  7738. ),
  7739. 'feature_pub_idx2' => array(
  7740. 0 => 'pub_id',
  7741. ),
  7742. ),
  7743. 'primary key' => array(
  7744. 0 => 'feature_pub_id',
  7745. ),
  7746. 'foreign keys' => array(
  7747. 'feature' => array(
  7748. 'table' => 'feature',
  7749. 'columns' => array(
  7750. 'feature_id' => 'feature_id',
  7751. ),
  7752. ),
  7753. 'pub' => array(
  7754. 'table' => 'pub',
  7755. 'columns' => array(
  7756. 'pub_id' => 'pub_id',
  7757. ),
  7758. ),
  7759. ),
  7760. 'referring_tables' => array(
  7761. 0 => 'feature_pubprop',
  7762. ),
  7763. );
  7764. return $description;
  7765. }
  7766. /**
  7767. * Implements hook_chado_schema_v1_3_feature_pubprop()
  7768. *
  7769. * Purpose: To describe the structure of 'feature_pubprop' to tripal
  7770. * @see chado_insert_record()
  7771. * @see chado_update_record()
  7772. * @see chado_select_record()
  7773. * @see chado_generate_var()
  7774. * @see chado_expan_var()
  7775. *
  7776. * @return
  7777. * An array describing the 'feature_pubprop' table
  7778. *
  7779. * @ingroup tripal_chado_v1.3_schema_api
  7780. *
  7781. */
  7782. function tripal_chado_chado_schema_v1_3_feature_pubprop() {
  7783. $description = array(
  7784. 'description' => '',
  7785. 'table' => 'feature_pubprop',
  7786. 'fields' => array(
  7787. 'feature_pubprop_id' => array(
  7788. 'size' => 'big',
  7789. 'type' => 'serial',
  7790. 'not null' => TRUE,
  7791. ),
  7792. 'feature_pub_id' => array(
  7793. 'size' => 'big',
  7794. 'type' => 'int',
  7795. 'not null' => TRUE,
  7796. ),
  7797. 'type_id' => array(
  7798. 'size' => 'big',
  7799. 'type' => 'int',
  7800. 'not null' => TRUE,
  7801. ),
  7802. 'value' => array(
  7803. 'size' => 'normal',
  7804. 'type' => 'text',
  7805. 'not null' => FALSE,
  7806. ),
  7807. 'rank' => array(
  7808. 'size' => 'normal',
  7809. 'type' => 'int',
  7810. 'not null' => TRUE,
  7811. 'default' => 0,
  7812. ),
  7813. ),
  7814. 'unique keys' => array(
  7815. 'feature_pubprop_c1' => array(
  7816. 0 => 'feature_pub_id',
  7817. 1 => 'type_id',
  7818. 2 => 'rank',
  7819. ),
  7820. ),
  7821. 'indexes' => array(
  7822. 'feature_pubprop_idx1' => array(
  7823. 0 => 'feature_pub_id',
  7824. ),
  7825. ),
  7826. 'primary key' => array(
  7827. 0 => 'feature_pubprop_id',
  7828. ),
  7829. 'foreign keys' => array(
  7830. 'feature_pub' => array(
  7831. 'table' => 'feature_pub',
  7832. 'columns' => array(
  7833. 'feature_pub_id' => 'feature_pub_id',
  7834. ),
  7835. ),
  7836. 'cvterm' => array(
  7837. 'table' => 'cvterm',
  7838. 'columns' => array(
  7839. 'type_id' => 'cvterm_id',
  7840. ),
  7841. ),
  7842. ),
  7843. 'referring_tables' => array(
  7844. ),
  7845. );
  7846. return $description;
  7847. }
  7848. /**
  7849. * Implements hook_chado_schema_v1_3_featurerange()
  7850. *
  7851. * Purpose: To describe the structure of 'featurerange' to tripal
  7852. * @see chado_insert_record()
  7853. * @see chado_update_record()
  7854. * @see chado_select_record()
  7855. * @see chado_generate_var()
  7856. * @see chado_expan_var()
  7857. *
  7858. * @return
  7859. * An array describing the 'featurerange' table
  7860. *
  7861. * @ingroup tripal_chado_v1.3_schema_api
  7862. *
  7863. */
  7864. function tripal_chado_chado_schema_v1_3_featurerange() {
  7865. $description = array(
  7866. 'description' => '',
  7867. 'table' => 'featurerange',
  7868. 'fields' => array(
  7869. 'featurerange_id' => array(
  7870. 'size' => 'big',
  7871. 'type' => 'serial',
  7872. 'not null' => TRUE,
  7873. ),
  7874. 'featuremap_id' => array(
  7875. 'size' => 'big',
  7876. 'type' => 'int',
  7877. 'not null' => TRUE,
  7878. ),
  7879. 'feature_id' => array(
  7880. 'size' => 'big',
  7881. 'type' => 'int',
  7882. 'not null' => TRUE,
  7883. ),
  7884. 'leftstartf_id' => array(
  7885. 'size' => 'big',
  7886. 'type' => 'int',
  7887. 'not null' => TRUE,
  7888. ),
  7889. 'leftendf_id' => array(
  7890. 'size' => 'big',
  7891. 'type' => 'int',
  7892. 'not null' => FALSE,
  7893. ),
  7894. 'rightstartf_id' => array(
  7895. 'size' => 'big',
  7896. 'type' => 'int',
  7897. 'not null' => FALSE,
  7898. ),
  7899. 'rightendf_id' => array(
  7900. 'size' => 'big',
  7901. 'type' => 'int',
  7902. 'not null' => TRUE,
  7903. ),
  7904. 'rangestr' => array(
  7905. 'size' => 'normal',
  7906. 'type' => 'varchar',
  7907. 'length' => '255',
  7908. 'not null' => FALSE,
  7909. ),
  7910. ),
  7911. 'indexes' => array(
  7912. 'featurerange_idx1' => array(
  7913. 0 => 'featuremap_id',
  7914. ),
  7915. 'featurerange_idx2' => array(
  7916. 0 => 'feature_id',
  7917. ),
  7918. 'featurerange_idx3' => array(
  7919. 0 => 'leftstartf_id',
  7920. ),
  7921. 'featurerange_idx4' => array(
  7922. 0 => 'leftendf_id',
  7923. ),
  7924. 'featurerange_idx5' => array(
  7925. 0 => 'rightstartf_id',
  7926. ),
  7927. 'featurerange_idx6' => array(
  7928. 0 => 'rightendf_id',
  7929. ),
  7930. ),
  7931. 'primary key' => array(
  7932. 0 => 'featurerange_id',
  7933. ),
  7934. 'foreign keys' => array(
  7935. 'featuremap' => array(
  7936. 'table' => 'featuremap',
  7937. 'columns' => array(
  7938. 'featuremap_id' => 'featuremap_id',
  7939. ),
  7940. ),
  7941. 'feature' => array(
  7942. 'table' => 'feature',
  7943. 'columns' => array(
  7944. 'feature_id' => 'feature_id',
  7945. 'leftstartf_id' => 'feature_id',
  7946. 'leftendf_id' => 'feature_id',
  7947. 'rightstartf_id' => 'feature_id',
  7948. 'rightendf_id' => 'feature_id',
  7949. ),
  7950. ),
  7951. ),
  7952. 'referring_tables' => array(
  7953. ),
  7954. );
  7955. return $description;
  7956. }
  7957. /**
  7958. * Implements hook_chado_schema_v1_3_feature_relationship()
  7959. *
  7960. * Purpose: To describe the structure of 'feature_relationship' to tripal
  7961. * @see chado_insert_record()
  7962. * @see chado_update_record()
  7963. * @see chado_select_record()
  7964. * @see chado_generate_var()
  7965. * @see chado_expan_var()
  7966. *
  7967. * @return
  7968. * An array describing the 'feature_relationship' table
  7969. *
  7970. * @ingroup tripal_chado_v1.3_schema_api
  7971. *
  7972. */
  7973. function tripal_chado_chado_schema_v1_3_feature_relationship() {
  7974. $description = array(
  7975. 'description' => '',
  7976. 'table' => 'feature_relationship',
  7977. 'fields' => array(
  7978. 'feature_relationship_id' => array(
  7979. 'size' => 'big',
  7980. 'type' => 'serial',
  7981. 'not null' => TRUE,
  7982. ),
  7983. 'subject_id' => array(
  7984. 'size' => 'big',
  7985. 'type' => 'int',
  7986. 'not null' => TRUE,
  7987. ),
  7988. 'object_id' => array(
  7989. 'size' => 'big',
  7990. 'type' => 'int',
  7991. 'not null' => TRUE,
  7992. ),
  7993. 'type_id' => array(
  7994. 'size' => 'big',
  7995. 'type' => 'int',
  7996. 'not null' => TRUE,
  7997. ),
  7998. 'value' => array(
  7999. 'size' => 'normal',
  8000. 'type' => 'text',
  8001. 'not null' => FALSE,
  8002. ),
  8003. 'rank' => array(
  8004. 'size' => 'normal',
  8005. 'type' => 'int',
  8006. 'not null' => TRUE,
  8007. 'default' => 0,
  8008. ),
  8009. ),
  8010. 'unique keys' => array(
  8011. 'feature_relationship_c1' => array(
  8012. 0 => 'subject_id',
  8013. 1 => 'object_id',
  8014. 2 => 'type_id',
  8015. 3 => 'rank',
  8016. ),
  8017. ),
  8018. 'indexes' => array(
  8019. 'feature_relationship_idx1' => array(
  8020. 0 => 'subject_id',
  8021. ),
  8022. 'feature_relationship_idx1b' => array(
  8023. 0 => 'object_id',
  8024. 1 => 'subject_id',
  8025. 2 => 'type_id',
  8026. ),
  8027. 'feature_relationship_idx2' => array(
  8028. 0 => 'object_id',
  8029. ),
  8030. 'feature_relationship_idx3' => array(
  8031. 0 => 'type_id',
  8032. ),
  8033. ),
  8034. 'primary key' => array(
  8035. 0 => 'feature_relationship_id',
  8036. ),
  8037. 'foreign keys' => array(
  8038. 'feature' => array(
  8039. 'table' => 'feature',
  8040. 'columns' => array(
  8041. 'subject_id' => 'feature_id',
  8042. 'object_id' => 'feature_id',
  8043. ),
  8044. ),
  8045. 'cvterm' => array(
  8046. 'table' => 'cvterm',
  8047. 'columns' => array(
  8048. 'type_id' => 'cvterm_id',
  8049. ),
  8050. ),
  8051. ),
  8052. 'referring_tables' => array(
  8053. 0 => 'feature_relationshipprop',
  8054. 1 => 'feature_relationship_pub',
  8055. ),
  8056. );
  8057. return $description;
  8058. }
  8059. /**
  8060. * Implements hook_chado_schema_v1_3_feature_relationshipprop()
  8061. *
  8062. * Purpose: To describe the structure of 'feature_relationshipprop' to tripal
  8063. * @see chado_insert_record()
  8064. * @see chado_update_record()
  8065. * @see chado_select_record()
  8066. * @see chado_generate_var()
  8067. * @see chado_expan_var()
  8068. *
  8069. * @return
  8070. * An array describing the 'feature_relationshipprop' table
  8071. *
  8072. * @ingroup tripal_chado_v1.3_schema_api
  8073. *
  8074. */
  8075. function tripal_chado_chado_schema_v1_3_feature_relationshipprop() {
  8076. $description = array(
  8077. 'description' => '',
  8078. 'table' => 'feature_relationshipprop',
  8079. 'fields' => array(
  8080. 'feature_relationshipprop_id' => array(
  8081. 'size' => 'big',
  8082. 'type' => 'serial',
  8083. 'not null' => TRUE,
  8084. ),
  8085. 'feature_relationship_id' => array(
  8086. 'size' => 'big',
  8087. 'type' => 'int',
  8088. 'not null' => TRUE,
  8089. ),
  8090. 'type_id' => array(
  8091. 'size' => 'big',
  8092. 'type' => 'int',
  8093. 'not null' => TRUE,
  8094. ),
  8095. 'value' => array(
  8096. 'size' => 'normal',
  8097. 'type' => 'text',
  8098. 'not null' => FALSE,
  8099. ),
  8100. 'rank' => array(
  8101. 'size' => 'normal',
  8102. 'type' => 'int',
  8103. 'not null' => TRUE,
  8104. 'default' => 0,
  8105. ),
  8106. ),
  8107. 'unique keys' => array(
  8108. 'feature_relationshipprop_c1' => array(
  8109. 0 => 'feature_relationship_id',
  8110. 1 => 'type_id',
  8111. 2 => 'rank',
  8112. ),
  8113. ),
  8114. 'indexes' => array(
  8115. 'feature_relationshipprop_idx1' => array(
  8116. 0 => 'feature_relationship_id',
  8117. ),
  8118. 'feature_relationshipprop_idx2' => array(
  8119. 0 => 'type_id',
  8120. ),
  8121. ),
  8122. 'primary key' => array(
  8123. 0 => 'feature_relationshipprop_id',
  8124. ),
  8125. 'foreign keys' => array(
  8126. 'feature_relationship' => array(
  8127. 'table' => 'feature_relationship',
  8128. 'columns' => array(
  8129. 'feature_relationship_id' => 'feature_relationship_id',
  8130. ),
  8131. ),
  8132. 'cvterm' => array(
  8133. 'table' => 'cvterm',
  8134. 'columns' => array(
  8135. 'type_id' => 'cvterm_id',
  8136. ),
  8137. ),
  8138. ),
  8139. 'referring_tables' => array(
  8140. 0 => 'feature_relationshipprop_pub',
  8141. ),
  8142. );
  8143. return $description;
  8144. }
  8145. /**
  8146. * Implements hook_chado_schema_v1_3_feature_relationshipprop_pub()
  8147. *
  8148. * Purpose: To describe the structure of 'feature_relationshipprop_pub' to tripal
  8149. * @see chado_insert_record()
  8150. * @see chado_update_record()
  8151. * @see chado_select_record()
  8152. * @see chado_generate_var()
  8153. * @see chado_expan_var()
  8154. *
  8155. * @return
  8156. * An array describing the 'feature_relationshipprop_pub' table
  8157. *
  8158. * @ingroup tripal_chado_v1.3_schema_api
  8159. *
  8160. */
  8161. function tripal_chado_chado_schema_v1_3_feature_relationshipprop_pub() {
  8162. $description = array(
  8163. 'description' => '',
  8164. 'table' => 'feature_relationshipprop_pub',
  8165. 'fields' => array(
  8166. 'feature_relationshipprop_pub_id' => array(
  8167. 'size' => 'big',
  8168. 'type' => 'serial',
  8169. 'not null' => TRUE,
  8170. ),
  8171. 'feature_relationshipprop_id' => array(
  8172. 'size' => 'big',
  8173. 'type' => 'int',
  8174. 'not null' => TRUE,
  8175. ),
  8176. 'pub_id' => array(
  8177. 'size' => 'big',
  8178. 'type' => 'int',
  8179. 'not null' => TRUE,
  8180. ),
  8181. ),
  8182. 'unique keys' => array(
  8183. 'feature_relationshipprop_pub_c1' => array(
  8184. 0 => 'feature_relationshipprop_id',
  8185. 1 => 'pub_id',
  8186. ),
  8187. ),
  8188. 'indexes' => array(
  8189. 'feature_relationshipprop_pub_idx1' => array(
  8190. 0 => 'feature_relationshipprop_id',
  8191. ),
  8192. 'feature_relationshipprop_pub_idx2' => array(
  8193. 0 => 'pub_id',
  8194. ),
  8195. ),
  8196. 'primary key' => array(
  8197. 0 => 'feature_relationshipprop_pub_id',
  8198. ),
  8199. 'foreign keys' => array(
  8200. 'feature_relationshipprop' => array(
  8201. 'table' => 'feature_relationshipprop',
  8202. 'columns' => array(
  8203. 'feature_relationshipprop_id' => 'feature_relationshipprop_id',
  8204. ),
  8205. ),
  8206. 'pub' => array(
  8207. 'table' => 'pub',
  8208. 'columns' => array(
  8209. 'pub_id' => 'pub_id',
  8210. ),
  8211. ),
  8212. ),
  8213. 'referring_tables' => array(
  8214. ),
  8215. );
  8216. return $description;
  8217. }
  8218. /**
  8219. * Implements hook_chado_schema_v1_3_feature_relationship_pub()
  8220. *
  8221. * Purpose: To describe the structure of 'feature_relationship_pub' to tripal
  8222. * @see chado_insert_record()
  8223. * @see chado_update_record()
  8224. * @see chado_select_record()
  8225. * @see chado_generate_var()
  8226. * @see chado_expan_var()
  8227. *
  8228. * @return
  8229. * An array describing the 'feature_relationship_pub' table
  8230. *
  8231. * @ingroup tripal_chado_v1.3_schema_api
  8232. *
  8233. */
  8234. function tripal_chado_chado_schema_v1_3_feature_relationship_pub() {
  8235. $description = array(
  8236. 'description' => '',
  8237. 'table' => 'feature_relationship_pub',
  8238. 'fields' => array(
  8239. 'feature_relationship_pub_id' => array(
  8240. 'size' => 'big',
  8241. 'type' => 'serial',
  8242. 'not null' => TRUE,
  8243. ),
  8244. 'feature_relationship_id' => array(
  8245. 'size' => 'big',
  8246. 'type' => 'int',
  8247. 'not null' => TRUE,
  8248. ),
  8249. 'pub_id' => array(
  8250. 'size' => 'big',
  8251. 'type' => 'int',
  8252. 'not null' => TRUE,
  8253. ),
  8254. ),
  8255. 'unique keys' => array(
  8256. 'feature_relationship_pub_c1' => array(
  8257. 0 => 'feature_relationship_id',
  8258. 1 => 'pub_id',
  8259. ),
  8260. ),
  8261. 'indexes' => array(
  8262. 'feature_relationship_pub_idx1' => array(
  8263. 0 => 'feature_relationship_id',
  8264. ),
  8265. 'feature_relationship_pub_idx2' => array(
  8266. 0 => 'pub_id',
  8267. ),
  8268. ),
  8269. 'primary key' => array(
  8270. 0 => 'feature_relationship_pub_id',
  8271. ),
  8272. 'foreign keys' => array(
  8273. 'feature_relationship' => array(
  8274. 'table' => 'feature_relationship',
  8275. 'columns' => array(
  8276. 'feature_relationship_id' => 'feature_relationship_id',
  8277. ),
  8278. ),
  8279. 'pub' => array(
  8280. 'table' => 'pub',
  8281. 'columns' => array(
  8282. 'pub_id' => 'pub_id',
  8283. ),
  8284. ),
  8285. ),
  8286. 'referring_tables' => array(
  8287. ),
  8288. );
  8289. return $description;
  8290. }
  8291. /**
  8292. * Implements hook_chado_schema_v1_3_feature_synonym()
  8293. *
  8294. * Purpose: To describe the structure of 'feature_synonym' to tripal
  8295. * @see chado_insert_record()
  8296. * @see chado_update_record()
  8297. * @see chado_select_record()
  8298. * @see chado_generate_var()
  8299. * @see chado_expan_var()
  8300. *
  8301. * @return
  8302. * An array describing the 'feature_synonym' table
  8303. *
  8304. * @ingroup tripal_chado_v1.3_schema_api
  8305. *
  8306. */
  8307. function tripal_chado_chado_schema_v1_3_feature_synonym() {
  8308. $description = array(
  8309. 'description' => '',
  8310. 'table' => 'feature_synonym',
  8311. 'fields' => array(
  8312. 'feature_synonym_id' => array(
  8313. 'size' => 'big',
  8314. 'type' => 'serial',
  8315. 'not null' => TRUE,
  8316. ),
  8317. 'synonym_id' => array(
  8318. 'size' => 'big',
  8319. 'type' => 'int',
  8320. 'not null' => TRUE,
  8321. ),
  8322. 'feature_id' => array(
  8323. 'size' => 'big',
  8324. 'type' => 'int',
  8325. 'not null' => TRUE,
  8326. ),
  8327. 'pub_id' => array(
  8328. 'size' => 'big',
  8329. 'type' => 'int',
  8330. 'not null' => TRUE,
  8331. ),
  8332. 'is_current' => array(
  8333. 'size' => 'normal',
  8334. 'type' => 'boolean',
  8335. 'not null' => TRUE,
  8336. 'default' => FALSE,
  8337. ),
  8338. 'is_internal' => array(
  8339. 'size' => 'normal',
  8340. 'type' => 'boolean',
  8341. 'not null' => TRUE,
  8342. 'default' => FALSE,
  8343. ),
  8344. ),
  8345. 'unique keys' => array(
  8346. 'feature_synonym_c1' => array(
  8347. 0 => 'synonym_id',
  8348. 1 => 'feature_id',
  8349. 2 => 'pub_id',
  8350. ),
  8351. ),
  8352. 'indexes' => array(
  8353. 'feature_synonym_idx1' => array(
  8354. 0 => 'synonym_id',
  8355. ),
  8356. 'feature_synonym_idx2' => array(
  8357. 0 => 'feature_id',
  8358. ),
  8359. 'feature_synonym_idx3' => array(
  8360. 0 => 'pub_id',
  8361. ),
  8362. ),
  8363. 'primary key' => array(
  8364. 0 => 'feature_synonym_id',
  8365. ),
  8366. 'foreign keys' => array(
  8367. 'synonym' => array(
  8368. 'table' => 'synonym',
  8369. 'columns' => array(
  8370. 'synonym_id' => 'synonym_id',
  8371. ),
  8372. ),
  8373. 'feature' => array(
  8374. 'table' => 'feature',
  8375. 'columns' => array(
  8376. 'feature_id' => 'feature_id',
  8377. ),
  8378. ),
  8379. 'pub' => array(
  8380. 'table' => 'pub',
  8381. 'columns' => array(
  8382. 'pub_id' => 'pub_id',
  8383. ),
  8384. ),
  8385. ),
  8386. 'referring_tables' => array(
  8387. ),
  8388. );
  8389. return $description;
  8390. }
  8391. /**
  8392. * Implements hook_chado_schema_v1_3_genotype()
  8393. *
  8394. * Purpose: To describe the structure of 'genotype' to tripal
  8395. * @see chado_insert_record()
  8396. * @see chado_update_record()
  8397. * @see chado_select_record()
  8398. * @see chado_generate_var()
  8399. * @see chado_expan_var()
  8400. *
  8401. * @return
  8402. * An array describing the 'genotype' table
  8403. *
  8404. * @ingroup tripal_chado_v1.3_schema_api
  8405. *
  8406. */
  8407. function tripal_chado_chado_schema_v1_3_genotype() {
  8408. $description = array(
  8409. 'description' => '',
  8410. 'table' => 'genotype',
  8411. 'fields' => array(
  8412. 'genotype_id' => array(
  8413. 'size' => 'big',
  8414. 'type' => 'serial',
  8415. 'not null' => TRUE,
  8416. ),
  8417. 'name' => array(
  8418. 'size' => 'normal',
  8419. 'type' => 'text',
  8420. 'not null' => FALSE,
  8421. ),
  8422. 'uniquename' => array(
  8423. 'size' => 'normal',
  8424. 'type' => 'text',
  8425. 'not null' => TRUE,
  8426. ),
  8427. 'description' => array(
  8428. 'size' => 'normal',
  8429. 'type' => 'text',
  8430. 'not null' => FALSE,
  8431. ),
  8432. 'type_id' => array(
  8433. 'size' => 'big',
  8434. 'type' => 'int',
  8435. 'not null' => TRUE,
  8436. ),
  8437. ),
  8438. 'unique keys' => array(
  8439. 'genotype_c1' => array(
  8440. 0 => 'uniquename',
  8441. ),
  8442. ),
  8443. 'indexes' => array(
  8444. 'genotype_idx1' => array(
  8445. 0 => 'uniquename',
  8446. ),
  8447. 'genotype_idx2' => array(
  8448. 0 => 'name',
  8449. ),
  8450. ),
  8451. 'primary key' => array(
  8452. 0 => 'genotype_id',
  8453. ),
  8454. 'foreign keys' => array(
  8455. 'cvterm' => array(
  8456. 'table' => 'cvterm',
  8457. 'columns' => array(
  8458. 'type_id' => 'cvterm_id',
  8459. ),
  8460. ),
  8461. ),
  8462. 'referring_tables' => array(
  8463. 0 => 'feature_genotype',
  8464. 1 => 'genotypeprop',
  8465. 2 => 'nd_experiment_genotype',
  8466. 3 => 'phendesc',
  8467. 4 => 'phenotype_comparison',
  8468. 6 => 'phenstatement',
  8469. 7 => 'stock_genotype',
  8470. ),
  8471. );
  8472. return $description;
  8473. }
  8474. /**
  8475. * Implements hook_chado_schema_v1_3_genotypeprop()
  8476. *
  8477. * Purpose: To describe the structure of 'genotypeprop' to tripal
  8478. * @see chado_insert_record()
  8479. * @see chado_update_record()
  8480. * @see chado_select_record()
  8481. * @see chado_generate_var()
  8482. * @see chado_expan_var()
  8483. *
  8484. * @return
  8485. * An array describing the 'genotypeprop' table
  8486. *
  8487. * @ingroup tripal_chado_v1.3_schema_api
  8488. *
  8489. */
  8490. function tripal_chado_chado_schema_v1_3_genotypeprop() {
  8491. $description = array(
  8492. 'description' => '',
  8493. 'table' => 'genotypeprop',
  8494. 'fields' => array(
  8495. 'genotypeprop_id' => array(
  8496. 'size' => 'big',
  8497. 'type' => 'serial',
  8498. 'not null' => TRUE,
  8499. ),
  8500. 'genotype_id' => array(
  8501. 'size' => 'big',
  8502. 'type' => 'int',
  8503. 'not null' => TRUE,
  8504. ),
  8505. 'type_id' => array(
  8506. 'size' => 'big',
  8507. 'type' => 'int',
  8508. 'not null' => TRUE,
  8509. ),
  8510. 'value' => array(
  8511. 'size' => 'normal',
  8512. 'type' => 'text',
  8513. 'not null' => FALSE,
  8514. ),
  8515. 'rank' => array(
  8516. 'size' => 'normal',
  8517. 'type' => 'int',
  8518. 'not null' => TRUE,
  8519. 'default' => 0,
  8520. ),
  8521. ),
  8522. 'unique keys' => array(
  8523. 'genotypeprop_c1' => array(
  8524. 0 => 'genotype_id',
  8525. 1 => 'type_id',
  8526. 2 => 'rank',
  8527. ),
  8528. ),
  8529. 'indexes' => array(
  8530. 'genotypeprop_idx1' => array(
  8531. 0 => 'genotype_id',
  8532. ),
  8533. 'genotypeprop_idx2' => array(
  8534. 0 => 'type_id',
  8535. ),
  8536. ),
  8537. 'primary key' => array(
  8538. 0 => 'genotypeprop_id',
  8539. ),
  8540. 'foreign keys' => array(
  8541. 'genotype' => array(
  8542. 'table' => 'genotype',
  8543. 'columns' => array(
  8544. 'genotype_id' => 'genotype_id',
  8545. ),
  8546. ),
  8547. 'cvterm' => array(
  8548. 'table' => 'cvterm',
  8549. 'columns' => array(
  8550. 'type_id' => 'cvterm_id',
  8551. ),
  8552. ),
  8553. ),
  8554. 'referring_tables' => array(
  8555. ),
  8556. );
  8557. return $description;
  8558. }
  8559. /**
  8560. * Implements hook_chado_schema_v1_3_library()
  8561. *
  8562. * Purpose: To describe the structure of 'library' to tripal
  8563. * @see chado_insert_record()
  8564. * @see chado_update_record()
  8565. * @see chado_select_record()
  8566. * @see chado_generate_var()
  8567. * @see chado_expan_var()
  8568. *
  8569. * @return
  8570. * An array describing the 'library' table
  8571. *
  8572. * @ingroup tripal_chado_v1.3_schema_api
  8573. *
  8574. */
  8575. function tripal_chado_chado_schema_v1_3_library() {
  8576. $description = array(
  8577. 'description' => '',
  8578. 'table' => 'library',
  8579. 'fields' => array(
  8580. 'library_id' => array(
  8581. 'size' => 'big',
  8582. 'type' => 'serial',
  8583. 'not null' => TRUE,
  8584. ),
  8585. 'organism_id' => array(
  8586. 'size' => 'big',
  8587. 'type' => 'int',
  8588. 'not null' => TRUE,
  8589. ),
  8590. 'name' => array(
  8591. 'size' => 'normal',
  8592. 'type' => 'varchar',
  8593. 'length' => '255',
  8594. 'not null' => FALSE,
  8595. ),
  8596. 'uniquename' => array(
  8597. 'size' => 'normal',
  8598. 'type' => 'text',
  8599. 'not null' => TRUE,
  8600. ),
  8601. 'type_id' => array(
  8602. 'size' => 'big',
  8603. 'type' => 'int',
  8604. 'not null' => TRUE,
  8605. ),
  8606. 'is_obsolete' => array(
  8607. 'size' => 'normal',
  8608. 'type' => 'int',
  8609. 'not null' => TRUE,
  8610. 'default' => 0,
  8611. ),
  8612. 'timeaccessioned' => array(
  8613. 'size' => 'normal',
  8614. 'type' => 'datetime',
  8615. 'not null' => TRUE,
  8616. 'default' => 'now()',
  8617. ),
  8618. 'timelastmodified' => array(
  8619. 'size' => 'normal',
  8620. 'type' => 'datetime',
  8621. 'not null' => TRUE,
  8622. 'default' => 'now()',
  8623. ),
  8624. ),
  8625. 'unique keys' => array(
  8626. 'library_c1' => array(
  8627. 0 => 'organism_id',
  8628. 1 => 'uniquename',
  8629. 2 => 'type_id',
  8630. ),
  8631. ),
  8632. 'indexes' => array(
  8633. 'library_contact_idx1' => array(
  8634. 0 => 'library_id',
  8635. ),
  8636. 'library_idx1' => array(
  8637. 0 => 'organism_id',
  8638. ),
  8639. 'library_idx2' => array(
  8640. 0 => 'type_id',
  8641. ),
  8642. 'library_idx3' => array(
  8643. 0 => 'uniquename',
  8644. ),
  8645. 'library_name_ind1' => array(
  8646. 0 => 'name',
  8647. ),
  8648. ),
  8649. 'primary key' => array(
  8650. 0 => 'library_id',
  8651. ),
  8652. 'foreign keys' => array(
  8653. 'organism' => array(
  8654. 'table' => 'organism',
  8655. 'columns' => array(
  8656. 'organism_id' => 'organism_id',
  8657. ),
  8658. ),
  8659. 'cvterm' => array(
  8660. 'table' => 'cvterm',
  8661. 'columns' => array(
  8662. 'type_id' => 'cvterm_id',
  8663. ),
  8664. ),
  8665. ),
  8666. 'referring_tables' => array(
  8667. 0 => 'cell_line_library',
  8668. 1 => 'library_contact',
  8669. 2 => 'library_cvterm',
  8670. 3 => 'library_dbxref',
  8671. 4 => 'library_expression',
  8672. 5 => 'library_feature',
  8673. 6 => 'libraryprop',
  8674. 7 => 'library_pub',
  8675. 8 => 'library_relationship',
  8676. 10 => 'library_synonym',
  8677. 11 => 'stock_library',
  8678. ),
  8679. );
  8680. return $description;
  8681. }
  8682. /**
  8683. * Implements hook_chado_schema_v1_3_library_contact()
  8684. *
  8685. * Purpose: To describe the structure of 'library_contact' to tripal
  8686. * @see chado_insert_record()
  8687. * @see chado_update_record()
  8688. * @see chado_select_record()
  8689. * @see chado_generate_var()
  8690. * @see chado_expan_var()
  8691. *
  8692. * @return
  8693. * An array describing the 'library_contact' table
  8694. *
  8695. * @ingroup tripal_chado_v1.3_schema_api
  8696. *
  8697. */
  8698. function tripal_chado_chado_schema_v1_3_library_contact() {
  8699. $description = array(
  8700. 'description' => '',
  8701. 'table' => 'library_contact',
  8702. 'fields' => array(
  8703. 'library_contact_id' => array(
  8704. 'size' => 'big',
  8705. 'type' => 'serial',
  8706. 'not null' => TRUE,
  8707. ),
  8708. 'library_id' => array(
  8709. 'size' => 'big',
  8710. 'type' => 'int',
  8711. 'not null' => TRUE,
  8712. ),
  8713. 'contact_id' => array(
  8714. 'size' => 'big',
  8715. 'type' => 'int',
  8716. 'not null' => TRUE,
  8717. ),
  8718. ),
  8719. 'unique keys' => array(
  8720. 'library_contact_c1' => array(
  8721. 0 => 'library_id',
  8722. 1 => 'contact_id',
  8723. ),
  8724. ),
  8725. 'primary key' => array(
  8726. 0 => 'library_contact_id',
  8727. ),
  8728. 'foreign keys' => array(
  8729. 'library' => array(
  8730. 'table' => 'library',
  8731. 'columns' => array(
  8732. 'library_id' => 'library_id',
  8733. ),
  8734. ),
  8735. 'contact' => array(
  8736. 'table' => 'contact',
  8737. 'columns' => array(
  8738. 'contact_id' => 'contact_id',
  8739. ),
  8740. ),
  8741. ),
  8742. 'referring_tables' => array(
  8743. ),
  8744. );
  8745. return $description;
  8746. }
  8747. /**
  8748. * Implements hook_chado_schema_v1_3_library_cvterm()
  8749. *
  8750. * Purpose: To describe the structure of 'library_cvterm' to tripal
  8751. * @see chado_insert_record()
  8752. * @see chado_update_record()
  8753. * @see chado_select_record()
  8754. * @see chado_generate_var()
  8755. * @see chado_expan_var()
  8756. *
  8757. * @return
  8758. * An array describing the 'library_cvterm' table
  8759. *
  8760. * @ingroup tripal_chado_v1.3_schema_api
  8761. *
  8762. */
  8763. function tripal_chado_chado_schema_v1_3_library_cvterm() {
  8764. $description = array(
  8765. 'description' => '',
  8766. 'table' => 'library_cvterm',
  8767. 'fields' => array(
  8768. 'library_cvterm_id' => array(
  8769. 'size' => 'big',
  8770. 'type' => 'serial',
  8771. 'not null' => TRUE,
  8772. ),
  8773. 'library_id' => array(
  8774. 'size' => 'big',
  8775. 'type' => 'int',
  8776. 'not null' => TRUE,
  8777. ),
  8778. 'cvterm_id' => array(
  8779. 'size' => 'big',
  8780. 'type' => 'int',
  8781. 'not null' => TRUE,
  8782. ),
  8783. 'pub_id' => array(
  8784. 'size' => 'big',
  8785. 'type' => 'int',
  8786. 'not null' => TRUE,
  8787. ),
  8788. ),
  8789. 'unique keys' => array(
  8790. 'library_cvterm_c1' => array(
  8791. 0 => 'library_id',
  8792. 1 => 'cvterm_id',
  8793. 2 => 'pub_id',
  8794. ),
  8795. ),
  8796. 'indexes' => array(
  8797. 'library_cvterm_idx1' => array(
  8798. 0 => 'library_id',
  8799. ),
  8800. 'library_cvterm_idx2' => array(
  8801. 0 => 'cvterm_id',
  8802. ),
  8803. 'library_cvterm_idx3' => array(
  8804. 0 => 'pub_id',
  8805. ),
  8806. ),
  8807. 'primary key' => array(
  8808. 0 => 'library_cvterm_id',
  8809. ),
  8810. 'foreign keys' => array(
  8811. 'library' => array(
  8812. 'table' => 'library',
  8813. 'columns' => array(
  8814. 'library_id' => 'library_id',
  8815. ),
  8816. ),
  8817. 'cvterm' => array(
  8818. 'table' => 'cvterm',
  8819. 'columns' => array(
  8820. 'cvterm_id' => 'cvterm_id',
  8821. ),
  8822. ),
  8823. 'pub' => array(
  8824. 'table' => 'pub',
  8825. 'columns' => array(
  8826. 'pub_id' => 'pub_id',
  8827. ),
  8828. ),
  8829. ),
  8830. 'referring_tables' => array(
  8831. ),
  8832. );
  8833. return $description;
  8834. }
  8835. /**
  8836. * Implements hook_chado_schema_v1_3_library_dbxref()
  8837. *
  8838. * Purpose: To describe the structure of 'library_dbxref' to tripal
  8839. * @see chado_insert_record()
  8840. * @see chado_update_record()
  8841. * @see chado_select_record()
  8842. * @see chado_generate_var()
  8843. * @see chado_expan_var()
  8844. *
  8845. * @return
  8846. * An array describing the 'library_dbxref' table
  8847. *
  8848. * @ingroup tripal_chado_v1.3_schema_api
  8849. *
  8850. */
  8851. function tripal_chado_chado_schema_v1_3_library_dbxref() {
  8852. $description = array(
  8853. 'description' => '',
  8854. 'table' => 'library_dbxref',
  8855. 'fields' => array(
  8856. 'library_dbxref_id' => array(
  8857. 'size' => 'big',
  8858. 'type' => 'serial',
  8859. 'not null' => TRUE,
  8860. ),
  8861. 'library_id' => array(
  8862. 'size' => 'big',
  8863. 'type' => 'int',
  8864. 'not null' => TRUE,
  8865. ),
  8866. 'dbxref_id' => array(
  8867. 'size' => 'big',
  8868. 'type' => 'int',
  8869. 'not null' => TRUE,
  8870. ),
  8871. 'is_current' => array(
  8872. 'size' => 'normal',
  8873. 'type' => 'boolean',
  8874. 'not null' => TRUE,
  8875. 'default' => 'true',
  8876. ),
  8877. ),
  8878. 'unique keys' => array(
  8879. 'library_dbxref_c1' => array(
  8880. 0 => 'library_id',
  8881. 1 => 'dbxref_id',
  8882. ),
  8883. ),
  8884. 'indexes' => array(
  8885. 'library_dbxref_idx1' => array(
  8886. 0 => 'library_id',
  8887. ),
  8888. 'library_dbxref_idx2' => array(
  8889. 0 => 'dbxref_id',
  8890. ),
  8891. ),
  8892. 'primary key' => array(
  8893. 0 => 'library_dbxref_id',
  8894. ),
  8895. 'foreign keys' => array(
  8896. 'library' => array(
  8897. 'table' => 'library',
  8898. 'columns' => array(
  8899. 'library_id' => 'library_id',
  8900. ),
  8901. ),
  8902. 'dbxref' => array(
  8903. 'table' => 'dbxref',
  8904. 'columns' => array(
  8905. 'dbxref_id' => 'dbxref_id',
  8906. ),
  8907. ),
  8908. ),
  8909. 'referring_tables' => array(
  8910. ),
  8911. );
  8912. return $description;
  8913. }
  8914. /**
  8915. * Implements hook_chado_schema_v1_3_library_expression()
  8916. *
  8917. * Purpose: To describe the structure of 'library_expression' to tripal
  8918. * @see chado_insert_record()
  8919. * @see chado_update_record()
  8920. * @see chado_select_record()
  8921. * @see chado_generate_var()
  8922. * @see chado_expan_var()
  8923. *
  8924. * @return
  8925. * An array describing the 'library_expression' table
  8926. *
  8927. * @ingroup tripal_chado_v1.3_schema_api
  8928. *
  8929. */
  8930. function tripal_chado_chado_schema_v1_3_library_expression() {
  8931. $description = array(
  8932. 'description' => '',
  8933. 'table' => 'library_expression',
  8934. 'fields' => array(
  8935. 'library_expression_id' => array(
  8936. 'size' => 'big',
  8937. 'type' => 'serial',
  8938. 'not null' => TRUE,
  8939. ),
  8940. 'library_id' => array(
  8941. 'size' => 'big',
  8942. 'type' => 'int',
  8943. 'not null' => TRUE,
  8944. ),
  8945. 'expression_id' => array(
  8946. 'size' => 'big',
  8947. 'type' => 'int',
  8948. 'not null' => TRUE,
  8949. ),
  8950. 'pub_id' => array(
  8951. 'size' => 'big',
  8952. 'type' => 'int',
  8953. 'not null' => TRUE,
  8954. ),
  8955. ),
  8956. 'unique keys' => array(
  8957. 'library_expression_c1' => array(
  8958. 0 => 'library_id',
  8959. 1 => 'expression_id',
  8960. ),
  8961. ),
  8962. 'indexes' => array(
  8963. 'library_expression_idx1' => array(
  8964. 0 => 'library_id',
  8965. ),
  8966. 'library_expression_idx2' => array(
  8967. 0 => 'expression_id',
  8968. ),
  8969. 'library_expression_idx3' => array(
  8970. 0 => 'pub_id',
  8971. ),
  8972. ),
  8973. 'primary key' => array(
  8974. 0 => 'library_expression_id',
  8975. ),
  8976. 'foreign keys' => array(
  8977. 'library' => array(
  8978. 'table' => 'library',
  8979. 'columns' => array(
  8980. 'library_id' => 'library_id',
  8981. ),
  8982. ),
  8983. 'expression' => array(
  8984. 'table' => 'expression',
  8985. 'columns' => array(
  8986. 'expression_id' => 'expression_id',
  8987. ),
  8988. ),
  8989. 'pub' => array(
  8990. 'table' => 'pub',
  8991. 'columns' => array(
  8992. 'pub_id' => 'pub_id',
  8993. ),
  8994. ),
  8995. ),
  8996. 'referring_tables' => array(
  8997. 0 => 'library_expressionprop',
  8998. ),
  8999. );
  9000. return $description;
  9001. }
  9002. /**
  9003. * Implements hook_chado_schema_v1_3_library_expressionprop()
  9004. *
  9005. * Purpose: To describe the structure of 'library_expressionprop' to tripal
  9006. * @see chado_insert_record()
  9007. * @see chado_update_record()
  9008. * @see chado_select_record()
  9009. * @see chado_generate_var()
  9010. * @see chado_expan_var()
  9011. *
  9012. * @return
  9013. * An array describing the 'library_expressionprop' table
  9014. *
  9015. * @ingroup tripal_chado_v1.3_schema_api
  9016. *
  9017. */
  9018. function tripal_chado_chado_schema_v1_3_library_expressionprop() {
  9019. $description = array(
  9020. 'description' => '',
  9021. 'table' => 'library_expressionprop',
  9022. 'fields' => array(
  9023. 'library_expressionprop_id' => array(
  9024. 'size' => 'big',
  9025. 'type' => 'serial',
  9026. 'not null' => TRUE,
  9027. ),
  9028. 'library_expression_id' => array(
  9029. 'size' => 'big',
  9030. 'type' => 'int',
  9031. 'not null' => TRUE,
  9032. ),
  9033. 'type_id' => array(
  9034. 'size' => 'big',
  9035. 'type' => 'int',
  9036. 'not null' => TRUE,
  9037. ),
  9038. 'value' => array(
  9039. 'size' => 'normal',
  9040. 'type' => 'text',
  9041. 'not null' => FALSE,
  9042. ),
  9043. 'rank' => array(
  9044. 'size' => 'normal',
  9045. 'type' => 'int',
  9046. 'not null' => TRUE,
  9047. 'default' => 0,
  9048. ),
  9049. ),
  9050. 'unique keys' => array(
  9051. 'library_expressionprop_c1' => array(
  9052. 0 => 'library_expression_id',
  9053. 1 => 'type_id',
  9054. 2 => 'rank',
  9055. ),
  9056. ),
  9057. 'indexes' => array(
  9058. 'library_expressionprop_idx1' => array(
  9059. 0 => 'library_expression_id',
  9060. ),
  9061. 'library_expressionprop_idx2' => array(
  9062. 0 => 'type_id',
  9063. ),
  9064. ),
  9065. 'primary key' => array(
  9066. 0 => 'library_expressionprop_id',
  9067. ),
  9068. 'foreign keys' => array(
  9069. 'library_expression' => array(
  9070. 'table' => 'library_expression',
  9071. 'columns' => array(
  9072. 'library_expression_id' => 'library_expression_id',
  9073. ),
  9074. ),
  9075. 'cvterm' => array(
  9076. 'table' => 'cvterm',
  9077. 'columns' => array(
  9078. 'type_id' => 'cvterm_id',
  9079. ),
  9080. ),
  9081. ),
  9082. 'referring_tables' => array(
  9083. ),
  9084. );
  9085. return $description;
  9086. }
  9087. /**
  9088. * Implements hook_chado_schema_v1_3_library_feature()
  9089. *
  9090. * Purpose: To describe the structure of 'library_feature' to tripal
  9091. * @see chado_insert_record()
  9092. * @see chado_update_record()
  9093. * @see chado_select_record()
  9094. * @see chado_generate_var()
  9095. * @see chado_expan_var()
  9096. *
  9097. * @return
  9098. * An array describing the 'library_feature' table
  9099. *
  9100. * @ingroup tripal_chado_v1.3_schema_api
  9101. *
  9102. */
  9103. function tripal_chado_chado_schema_v1_3_library_feature() {
  9104. $description = array(
  9105. 'description' => '',
  9106. 'table' => 'library_feature',
  9107. 'fields' => array(
  9108. 'library_feature_id' => array(
  9109. 'size' => 'big',
  9110. 'type' => 'serial',
  9111. 'not null' => TRUE,
  9112. ),
  9113. 'library_id' => array(
  9114. 'size' => 'big',
  9115. 'type' => 'int',
  9116. 'not null' => TRUE,
  9117. ),
  9118. 'feature_id' => array(
  9119. 'size' => 'big',
  9120. 'type' => 'int',
  9121. 'not null' => TRUE,
  9122. ),
  9123. ),
  9124. 'unique keys' => array(
  9125. 'library_feature_c1' => array(
  9126. 0 => 'library_id',
  9127. 1 => 'feature_id',
  9128. ),
  9129. ),
  9130. 'indexes' => array(
  9131. 'library_feature_idx1' => array(
  9132. 0 => 'library_id',
  9133. ),
  9134. 'library_feature_idx2' => array(
  9135. 0 => 'feature_id',
  9136. ),
  9137. ),
  9138. 'primary key' => array(
  9139. 0 => 'library_feature_id',
  9140. ),
  9141. 'foreign keys' => array(
  9142. 'library' => array(
  9143. 'table' => 'library',
  9144. 'columns' => array(
  9145. 'library_id' => 'library_id',
  9146. ),
  9147. ),
  9148. 'feature' => array(
  9149. 'table' => 'feature',
  9150. 'columns' => array(
  9151. 'feature_id' => 'feature_id',
  9152. ),
  9153. ),
  9154. ),
  9155. 'referring_tables' => array(
  9156. 0 => 'library_featureprop',
  9157. ),
  9158. );
  9159. return $description;
  9160. }
  9161. /**
  9162. * Implements hook_chado_schema_v1_3_library_featureprop()
  9163. *
  9164. * Purpose: To describe the structure of 'library_featureprop' to tripal
  9165. * @see chado_insert_record()
  9166. * @see chado_update_record()
  9167. * @see chado_select_record()
  9168. * @see chado_generate_var()
  9169. * @see chado_expan_var()
  9170. *
  9171. * @return
  9172. * An array describing the 'library_featureprop' table
  9173. *
  9174. * @ingroup tripal_chado_v1.3_schema_api
  9175. *
  9176. */
  9177. function tripal_chado_chado_schema_v1_3_library_featureprop() {
  9178. $description = array(
  9179. 'description' => '',
  9180. 'table' => 'library_featureprop',
  9181. 'fields' => array(
  9182. 'library_featureprop_id' => array(
  9183. 'size' => 'big',
  9184. 'type' => 'serial',
  9185. 'not null' => TRUE,
  9186. ),
  9187. 'library_feature_id' => array(
  9188. 'size' => 'big',
  9189. 'type' => 'int',
  9190. 'not null' => TRUE,
  9191. ),
  9192. 'type_id' => array(
  9193. 'size' => 'big',
  9194. 'type' => 'int',
  9195. 'not null' => TRUE,
  9196. ),
  9197. 'value' => array(
  9198. 'size' => 'normal',
  9199. 'type' => 'text',
  9200. 'not null' => FALSE,
  9201. ),
  9202. 'rank' => array(
  9203. 'size' => 'normal',
  9204. 'type' => 'int',
  9205. 'not null' => TRUE,
  9206. 'default' => 0,
  9207. ),
  9208. ),
  9209. 'unique keys' => array(
  9210. 'library_featureprop_c1' => array(
  9211. 0 => 'library_feature_id',
  9212. 1 => 'type_id',
  9213. 2 => 'rank',
  9214. ),
  9215. ),
  9216. 'indexes' => array(
  9217. 'library_featureprop_idx1' => array(
  9218. 0 => 'library_feature_id',
  9219. ),
  9220. 'library_featureprop_idx2' => array(
  9221. 0 => 'type_id',
  9222. ),
  9223. ),
  9224. 'primary key' => array(
  9225. 0 => 'library_featureprop_id',
  9226. ),
  9227. 'foreign keys' => array(
  9228. 'library_feature' => array(
  9229. 'table' => 'library_feature',
  9230. 'columns' => array(
  9231. 'library_feature_id' => 'library_feature_id',
  9232. ),
  9233. ),
  9234. 'cvterm' => array(
  9235. 'table' => 'cvterm',
  9236. 'columns' => array(
  9237. 'type_id' => 'cvterm_id',
  9238. ),
  9239. ),
  9240. ),
  9241. 'referring_tables' => array(
  9242. ),
  9243. );
  9244. return $description;
  9245. }
  9246. /**
  9247. * Implements hook_chado_schema_v1_3_libraryprop()
  9248. *
  9249. * Purpose: To describe the structure of 'libraryprop' to tripal
  9250. * @see chado_insert_record()
  9251. * @see chado_update_record()
  9252. * @see chado_select_record()
  9253. * @see chado_generate_var()
  9254. * @see chado_expan_var()
  9255. *
  9256. * @return
  9257. * An array describing the 'libraryprop' table
  9258. *
  9259. * @ingroup tripal_chado_v1.3_schema_api
  9260. *
  9261. */
  9262. function tripal_chado_chado_schema_v1_3_libraryprop() {
  9263. $description = array(
  9264. 'description' => '',
  9265. 'table' => 'libraryprop',
  9266. 'fields' => array(
  9267. 'libraryprop_id' => array(
  9268. 'size' => 'big',
  9269. 'type' => 'serial',
  9270. 'not null' => TRUE,
  9271. ),
  9272. 'library_id' => array(
  9273. 'size' => 'big',
  9274. 'type' => 'int',
  9275. 'not null' => TRUE,
  9276. ),
  9277. 'type_id' => array(
  9278. 'size' => 'big',
  9279. 'type' => 'int',
  9280. 'not null' => TRUE,
  9281. ),
  9282. 'value' => array(
  9283. 'size' => 'normal',
  9284. 'type' => 'text',
  9285. 'not null' => FALSE,
  9286. ),
  9287. 'rank' => array(
  9288. 'size' => 'normal',
  9289. 'type' => 'int',
  9290. 'not null' => TRUE,
  9291. 'default' => 0,
  9292. ),
  9293. ),
  9294. 'unique keys' => array(
  9295. 'libraryprop_c1' => array(
  9296. 0 => 'library_id',
  9297. 1 => 'type_id',
  9298. 2 => 'rank',
  9299. ),
  9300. ),
  9301. 'indexes' => array(
  9302. 'libraryprop_idx1' => array(
  9303. 0 => 'library_id',
  9304. ),
  9305. 'libraryprop_idx2' => array(
  9306. 0 => 'type_id',
  9307. ),
  9308. ),
  9309. 'primary key' => array(
  9310. 0 => 'libraryprop_id',
  9311. ),
  9312. 'foreign keys' => array(
  9313. 'library' => array(
  9314. 'table' => 'library',
  9315. 'columns' => array(
  9316. 'library_id' => 'library_id',
  9317. ),
  9318. ),
  9319. 'cvterm' => array(
  9320. 'table' => 'cvterm',
  9321. 'columns' => array(
  9322. 'type_id' => 'cvterm_id',
  9323. ),
  9324. ),
  9325. ),
  9326. 'referring_tables' => array(
  9327. 0 => 'libraryprop_pub',
  9328. ),
  9329. );
  9330. return $description;
  9331. }
  9332. /**
  9333. * Implements hook_chado_schema_v1_3_libraryprop_pub()
  9334. *
  9335. * Purpose: To describe the structure of 'libraryprop_pub' to tripal
  9336. * @see chado_insert_record()
  9337. * @see chado_update_record()
  9338. * @see chado_select_record()
  9339. * @see chado_generate_var()
  9340. * @see chado_expan_var()
  9341. *
  9342. * @return
  9343. * An array describing the 'libraryprop_pub' table
  9344. *
  9345. * @ingroup tripal_chado_v1.3_schema_api
  9346. *
  9347. */
  9348. function tripal_chado_chado_schema_v1_3_libraryprop_pub() {
  9349. $description = array(
  9350. 'description' => '',
  9351. 'table' => 'libraryprop_pub',
  9352. 'fields' => array(
  9353. 'libraryprop_pub_id' => array(
  9354. 'size' => 'big',
  9355. 'type' => 'serial',
  9356. 'not null' => TRUE,
  9357. ),
  9358. 'libraryprop_id' => array(
  9359. 'size' => 'big',
  9360. 'type' => 'int',
  9361. 'not null' => TRUE,
  9362. ),
  9363. 'pub_id' => array(
  9364. 'size' => 'big',
  9365. 'type' => 'int',
  9366. 'not null' => TRUE,
  9367. ),
  9368. ),
  9369. 'unique keys' => array(
  9370. 'libraryprop_pub_c1' => array(
  9371. 0 => 'libraryprop_id',
  9372. 1 => 'pub_id',
  9373. ),
  9374. ),
  9375. 'indexes' => array(
  9376. 'libraryprop_pub_idx1' => array(
  9377. 0 => 'libraryprop_id',
  9378. ),
  9379. 'libraryprop_pub_idx2' => array(
  9380. 0 => 'pub_id',
  9381. ),
  9382. ),
  9383. 'primary key' => array(
  9384. 0 => 'libraryprop_pub_id',
  9385. ),
  9386. 'foreign keys' => array(
  9387. 'libraryprop' => array(
  9388. 'table' => 'libraryprop',
  9389. 'columns' => array(
  9390. 'libraryprop_id' => 'libraryprop_id',
  9391. ),
  9392. ),
  9393. 'pub' => array(
  9394. 'table' => 'pub',
  9395. 'columns' => array(
  9396. 'pub_id' => 'pub_id',
  9397. ),
  9398. ),
  9399. ),
  9400. 'referring_tables' => array(
  9401. ),
  9402. );
  9403. return $description;
  9404. }
  9405. /**
  9406. * Implements hook_chado_schema_v1_3_library_pub()
  9407. *
  9408. * Purpose: To describe the structure of 'library_pub' to tripal
  9409. * @see chado_insert_record()
  9410. * @see chado_update_record()
  9411. * @see chado_select_record()
  9412. * @see chado_generate_var()
  9413. * @see chado_expan_var()
  9414. *
  9415. * @return
  9416. * An array describing the 'library_pub' table
  9417. *
  9418. * @ingroup tripal_chado_v1.3_schema_api
  9419. *
  9420. */
  9421. function tripal_chado_chado_schema_v1_3_library_pub() {
  9422. $description = array(
  9423. 'description' => '',
  9424. 'table' => 'library_pub',
  9425. 'fields' => array(
  9426. 'library_pub_id' => array(
  9427. 'size' => 'big',
  9428. 'type' => 'serial',
  9429. 'not null' => TRUE,
  9430. ),
  9431. 'library_id' => array(
  9432. 'size' => 'big',
  9433. 'type' => 'int',
  9434. 'not null' => TRUE,
  9435. ),
  9436. 'pub_id' => array(
  9437. 'size' => 'big',
  9438. 'type' => 'int',
  9439. 'not null' => TRUE,
  9440. ),
  9441. ),
  9442. 'unique keys' => array(
  9443. 'library_pub_c1' => array(
  9444. 0 => 'library_id',
  9445. 1 => 'pub_id',
  9446. ),
  9447. ),
  9448. 'indexes' => array(
  9449. 'library_pub_idx1' => array(
  9450. 0 => 'library_id',
  9451. ),
  9452. 'library_pub_idx2' => array(
  9453. 0 => 'pub_id',
  9454. ),
  9455. ),
  9456. 'primary key' => array(
  9457. 0 => 'library_pub_id',
  9458. ),
  9459. 'foreign keys' => array(
  9460. 'library' => array(
  9461. 'table' => 'library',
  9462. 'columns' => array(
  9463. 'library_id' => 'library_id',
  9464. ),
  9465. ),
  9466. 'pub' => array(
  9467. 'table' => 'pub',
  9468. 'columns' => array(
  9469. 'pub_id' => 'pub_id',
  9470. ),
  9471. ),
  9472. ),
  9473. 'referring_tables' => array(
  9474. ),
  9475. );
  9476. return $description;
  9477. }
  9478. /**
  9479. * Implements hook_chado_schema_v1_3_library_relationship()
  9480. *
  9481. * Purpose: To describe the structure of 'library_relationship' to tripal
  9482. * @see chado_insert_record()
  9483. * @see chado_update_record()
  9484. * @see chado_select_record()
  9485. * @see chado_generate_var()
  9486. * @see chado_expan_var()
  9487. *
  9488. * @return
  9489. * An array describing the 'library_relationship' table
  9490. *
  9491. * @ingroup tripal_chado_v1.3_schema_api
  9492. *
  9493. */
  9494. function tripal_chado_chado_schema_v1_3_library_relationship() {
  9495. $description = array(
  9496. 'description' => '',
  9497. 'table' => 'library_relationship',
  9498. 'fields' => array(
  9499. 'library_relationship_id' => array(
  9500. 'size' => 'big',
  9501. 'type' => 'serial',
  9502. 'not null' => TRUE,
  9503. ),
  9504. 'subject_id' => array(
  9505. 'size' => 'big',
  9506. 'type' => 'int',
  9507. 'not null' => TRUE,
  9508. ),
  9509. 'object_id' => array(
  9510. 'size' => 'big',
  9511. 'type' => 'int',
  9512. 'not null' => TRUE,
  9513. ),
  9514. 'type_id' => array(
  9515. 'size' => 'big',
  9516. 'type' => 'int',
  9517. 'not null' => TRUE,
  9518. ),
  9519. ),
  9520. 'unique keys' => array(
  9521. 'library_relationship_c1' => array(
  9522. 0 => 'subject_id',
  9523. 1 => 'object_id',
  9524. 2 => 'type_id',
  9525. ),
  9526. ),
  9527. 'indexes' => array(
  9528. 'library_relationship_idx1' => array(
  9529. 0 => 'subject_id',
  9530. ),
  9531. 'library_relationship_idx2' => array(
  9532. 0 => 'object_id',
  9533. ),
  9534. 'library_relationship_idx3' => array(
  9535. 0 => 'type_id',
  9536. ),
  9537. ),
  9538. 'primary key' => array(
  9539. 0 => 'library_relationship_id',
  9540. ),
  9541. 'foreign keys' => array(
  9542. 'library' => array(
  9543. 'table' => 'library',
  9544. 'columns' => array(
  9545. 'subject_id' => 'library_id',
  9546. 'object_id' => 'library_id',
  9547. ),
  9548. ),
  9549. 'cvterm' => array(
  9550. 'table' => 'cvterm',
  9551. 'columns' => array(
  9552. 'type_id' => 'cvterm_id',
  9553. ),
  9554. ),
  9555. ),
  9556. 'referring_tables' => array(
  9557. 0 => 'library_relationship_pub',
  9558. ),
  9559. );
  9560. return $description;
  9561. }
  9562. /**
  9563. * Implements hook_chado_schema_v1_3_library_relationship_pub()
  9564. *
  9565. * Purpose: To describe the structure of 'library_relationship_pub' to tripal
  9566. * @see chado_insert_record()
  9567. * @see chado_update_record()
  9568. * @see chado_select_record()
  9569. * @see chado_generate_var()
  9570. * @see chado_expan_var()
  9571. *
  9572. * @return
  9573. * An array describing the 'library_relationship_pub' table
  9574. *
  9575. * @ingroup tripal_chado_v1.3_schema_api
  9576. *
  9577. */
  9578. function tripal_chado_chado_schema_v1_3_library_relationship_pub() {
  9579. $description = array(
  9580. 'description' => '',
  9581. 'table' => 'library_relationship_pub',
  9582. 'fields' => array(
  9583. 'library_relationship_pub_id' => array(
  9584. 'size' => 'big',
  9585. 'type' => 'serial',
  9586. 'not null' => TRUE,
  9587. ),
  9588. 'library_relationship_id' => array(
  9589. 'size' => 'big',
  9590. 'type' => 'int',
  9591. 'not null' => TRUE,
  9592. ),
  9593. 'pub_id' => array(
  9594. 'size' => 'big',
  9595. 'type' => 'int',
  9596. 'not null' => TRUE,
  9597. ),
  9598. ),
  9599. 'unique keys' => array(
  9600. 'library_relationship_pub_c1' => array(
  9601. 0 => 'library_relationship_id',
  9602. 1 => 'pub_id',
  9603. ),
  9604. ),
  9605. 'indexes' => array(
  9606. 'library_relationship_pub_idx1' => array(
  9607. 0 => 'library_relationship_id',
  9608. ),
  9609. 'library_relationship_pub_idx2' => array(
  9610. 0 => 'pub_id',
  9611. ),
  9612. ),
  9613. 'primary key' => array(
  9614. 0 => 'library_relationship_pub_id',
  9615. ),
  9616. 'foreign keys' => array(
  9617. 'library_relationship' => array(
  9618. 'table' => 'library_relationship',
  9619. 'columns' => array(
  9620. 'library_relationship_id' => 'library_relationship_id',
  9621. ),
  9622. ),
  9623. 'pub' => array(
  9624. 'table' => 'pub',
  9625. 'columns' => array(
  9626. 'pub_id' => 'pub_id',
  9627. ),
  9628. ),
  9629. ),
  9630. 'referring_tables' => array(
  9631. ),
  9632. );
  9633. return $description;
  9634. }
  9635. /**
  9636. * Implements hook_chado_schema_v1_3_library_synonym()
  9637. *
  9638. * Purpose: To describe the structure of 'library_synonym' to tripal
  9639. * @see chado_insert_record()
  9640. * @see chado_update_record()
  9641. * @see chado_select_record()
  9642. * @see chado_generate_var()
  9643. * @see chado_expan_var()
  9644. *
  9645. * @return
  9646. * An array describing the 'library_synonym' table
  9647. *
  9648. * @ingroup tripal_chado_v1.3_schema_api
  9649. *
  9650. */
  9651. function tripal_chado_chado_schema_v1_3_library_synonym() {
  9652. $description = array(
  9653. 'description' => '',
  9654. 'table' => 'library_synonym',
  9655. 'fields' => array(
  9656. 'library_synonym_id' => array(
  9657. 'size' => 'big',
  9658. 'type' => 'serial',
  9659. 'not null' => TRUE,
  9660. ),
  9661. 'synonym_id' => array(
  9662. 'size' => 'big',
  9663. 'type' => 'int',
  9664. 'not null' => TRUE,
  9665. ),
  9666. 'library_id' => array(
  9667. 'size' => 'big',
  9668. 'type' => 'int',
  9669. 'not null' => TRUE,
  9670. ),
  9671. 'pub_id' => array(
  9672. 'size' => 'big',
  9673. 'type' => 'int',
  9674. 'not null' => TRUE,
  9675. ),
  9676. 'is_current' => array(
  9677. 'size' => 'normal',
  9678. 'type' => 'boolean',
  9679. 'not null' => TRUE,
  9680. 'default' => 'true',
  9681. ),
  9682. 'is_internal' => array(
  9683. 'size' => 'normal',
  9684. 'type' => 'boolean',
  9685. 'not null' => TRUE,
  9686. 'default' => FALSE,
  9687. ),
  9688. ),
  9689. 'unique keys' => array(
  9690. 'library_synonym_c1' => array(
  9691. 0 => 'synonym_id',
  9692. 1 => 'library_id',
  9693. 2 => 'pub_id',
  9694. ),
  9695. ),
  9696. 'indexes' => array(
  9697. 'library_synonym_idx1' => array(
  9698. 0 => 'synonym_id',
  9699. ),
  9700. 'library_synonym_idx2' => array(
  9701. 0 => 'library_id',
  9702. ),
  9703. 'library_synonym_idx3' => array(
  9704. 0 => 'pub_id',
  9705. ),
  9706. ),
  9707. 'primary key' => array(
  9708. 0 => 'library_synonym_id',
  9709. ),
  9710. 'foreign keys' => array(
  9711. 'synonym' => array(
  9712. 'table' => 'synonym',
  9713. 'columns' => array(
  9714. 'synonym_id' => 'synonym_id',
  9715. ),
  9716. ),
  9717. 'library' => array(
  9718. 'table' => 'library',
  9719. 'columns' => array(
  9720. 'library_id' => 'library_id',
  9721. ),
  9722. ),
  9723. 'pub' => array(
  9724. 'table' => 'pub',
  9725. 'columns' => array(
  9726. 'pub_id' => 'pub_id',
  9727. ),
  9728. ),
  9729. ),
  9730. 'referring_tables' => array(
  9731. ),
  9732. );
  9733. return $description;
  9734. }
  9735. /**
  9736. * Implements hook_chado_schema_v1_3_magedocumentation()
  9737. *
  9738. * Purpose: To describe the structure of 'magedocumentation' to tripal
  9739. * @see chado_insert_record()
  9740. * @see chado_update_record()
  9741. * @see chado_select_record()
  9742. * @see chado_generate_var()
  9743. * @see chado_expan_var()
  9744. *
  9745. * @return
  9746. * An array describing the 'magedocumentation' table
  9747. *
  9748. * @ingroup tripal_chado_v1.3_schema_api
  9749. *
  9750. */
  9751. function tripal_chado_chado_schema_v1_3_magedocumentation() {
  9752. $description = array(
  9753. 'description' => '',
  9754. 'table' => 'magedocumentation',
  9755. 'fields' => array(
  9756. 'magedocumentation_id' => array(
  9757. 'size' => 'big',
  9758. 'type' => 'serial',
  9759. 'not null' => TRUE,
  9760. ),
  9761. 'mageml_id' => array(
  9762. 'size' => 'big',
  9763. 'type' => 'int',
  9764. 'not null' => TRUE,
  9765. ),
  9766. 'tableinfo_id' => array(
  9767. 'size' => 'big',
  9768. 'type' => 'int',
  9769. 'not null' => TRUE,
  9770. ),
  9771. 'row_id' => array(
  9772. 'size' => 'normal',
  9773. 'type' => 'int',
  9774. 'not null' => TRUE,
  9775. ),
  9776. 'mageidentifier' => array(
  9777. 'size' => 'normal',
  9778. 'type' => 'text',
  9779. 'not null' => TRUE,
  9780. ),
  9781. ),
  9782. 'indexes' => array(
  9783. 'magedocumentation_idx1' => array(
  9784. 0 => 'mageml_id',
  9785. ),
  9786. 'magedocumentation_idx2' => array(
  9787. 0 => 'tableinfo_id',
  9788. ),
  9789. 'magedocumentation_idx3' => array(
  9790. 0 => 'row_id',
  9791. ),
  9792. ),
  9793. 'primary key' => array(
  9794. 0 => 'magedocumentation_id',
  9795. ),
  9796. 'foreign keys' => array(
  9797. 'mageml' => array(
  9798. 'table' => 'mageml',
  9799. 'columns' => array(
  9800. 'mageml_id' => 'mageml_id',
  9801. ),
  9802. ),
  9803. 'tableinfo' => array(
  9804. 'table' => 'tableinfo',
  9805. 'columns' => array(
  9806. 'tableinfo_id' => 'tableinfo_id',
  9807. ),
  9808. ),
  9809. ),
  9810. 'referring_tables' => array(
  9811. ),
  9812. );
  9813. return $description;
  9814. }
  9815. /**
  9816. * Implements hook_chado_schema_v1_3_mageml()
  9817. *
  9818. * Purpose: To describe the structure of 'mageml' to tripal
  9819. * @see chado_insert_record()
  9820. * @see chado_update_record()
  9821. * @see chado_select_record()
  9822. * @see chado_generate_var()
  9823. * @see chado_expan_var()
  9824. *
  9825. * @return
  9826. * An array describing the 'mageml' table
  9827. *
  9828. * @ingroup tripal_chado_v1.3_schema_api
  9829. *
  9830. */
  9831. function tripal_chado_chado_schema_v1_3_mageml() {
  9832. $description = array(
  9833. 'description' => '',
  9834. 'table' => 'mageml',
  9835. 'fields' => array(
  9836. 'mageml_id' => array(
  9837. 'size' => 'big',
  9838. 'type' => 'serial',
  9839. 'not null' => TRUE,
  9840. ),
  9841. 'mage_package' => array(
  9842. 'size' => 'normal',
  9843. 'type' => 'text',
  9844. 'not null' => TRUE,
  9845. ),
  9846. 'mage_ml' => array(
  9847. 'size' => 'normal',
  9848. 'type' => 'text',
  9849. 'not null' => TRUE,
  9850. ),
  9851. ),
  9852. 'primary key' => array(
  9853. 0 => 'mageml_id',
  9854. ),
  9855. 'foreign keys' => array(
  9856. ),
  9857. 'referring_tables' => array(
  9858. 0 => 'magedocumentation',
  9859. ),
  9860. );
  9861. return $description;
  9862. }
  9863. /**
  9864. * Implements hook_chado_schema_v1_3_materialized_view()
  9865. *
  9866. * Purpose: To describe the structure of 'materialized_view' to tripal
  9867. * @see chado_insert_record()
  9868. * @see chado_update_record()
  9869. * @see chado_select_record()
  9870. * @see chado_generate_var()
  9871. * @see chado_expan_var()
  9872. *
  9873. * @return
  9874. * An array describing the 'materialized_view' table
  9875. *
  9876. * @ingroup tripal_chado_v1.3_schema_api
  9877. *
  9878. */
  9879. function tripal_chado_chado_schema_v1_3_materialized_view() {
  9880. $description = array(
  9881. 'description' => '',
  9882. 'table' => 'materialized_view',
  9883. 'fields' => array(
  9884. 'materialized_view_id' => array(
  9885. 'size' => 'normal',
  9886. 'type' => 'serial',
  9887. 'not null' => TRUE,
  9888. ),
  9889. 'last_update' => array(
  9890. 'size' => 'normal',
  9891. 'type' => 'datetime',
  9892. 'not null' => FALSE,
  9893. ),
  9894. 'refresh_time' => array(
  9895. 'size' => 'normal',
  9896. 'type' => 'int',
  9897. 'not null' => FALSE,
  9898. ),
  9899. 'name' => array(
  9900. 'size' => 'normal',
  9901. 'type' => 'varchar',
  9902. 'length' => '64',
  9903. 'not null' => FALSE,
  9904. ),
  9905. 'mv_schema' => array(
  9906. 'size' => 'normal',
  9907. 'type' => 'varchar',
  9908. 'length' => '64',
  9909. 'not null' => FALSE,
  9910. ),
  9911. 'mv_table' => array(
  9912. 'size' => 'normal',
  9913. 'type' => 'varchar',
  9914. 'length' => '128',
  9915. 'not null' => FALSE,
  9916. ),
  9917. 'mv_specs' => array(
  9918. 'size' => 'normal',
  9919. 'type' => 'text',
  9920. 'not null' => FALSE,
  9921. ),
  9922. 'indexed' => array(
  9923. 'size' => 'normal',
  9924. 'type' => 'text',
  9925. 'not null' => FALSE,
  9926. ),
  9927. 'query' => array(
  9928. 'size' => 'normal',
  9929. 'type' => 'text',
  9930. 'not null' => FALSE,
  9931. ),
  9932. 'special_index' => array(
  9933. 'size' => 'normal',
  9934. 'type' => 'text',
  9935. 'not null' => FALSE,
  9936. ),
  9937. ),
  9938. 'unique keys' => array(
  9939. 'materialized_view_name_key' => array(
  9940. 0 => 'name',
  9941. ),
  9942. ),
  9943. 'foreign keys' => array(
  9944. ),
  9945. 'referring_tables' => array(
  9946. ),
  9947. );
  9948. return $description;
  9949. }
  9950. /**
  9951. * Implements hook_chado_schema_v1_3_nd_experiment()
  9952. *
  9953. * Purpose: To describe the structure of 'nd_experiment' to tripal
  9954. * @see chado_insert_record()
  9955. * @see chado_update_record()
  9956. * @see chado_select_record()
  9957. * @see chado_generate_var()
  9958. * @see chado_expan_var()
  9959. *
  9960. * @return
  9961. * An array describing the 'nd_experiment' table
  9962. *
  9963. * @ingroup tripal_chado_v1.3_schema_api
  9964. *
  9965. */
  9966. function tripal_chado_chado_schema_v1_3_nd_experiment() {
  9967. $description = array(
  9968. 'description' => '',
  9969. 'table' => 'nd_experiment',
  9970. 'fields' => array(
  9971. 'nd_experiment_id' => array(
  9972. 'size' => 'big',
  9973. 'type' => 'serial',
  9974. 'not null' => TRUE,
  9975. ),
  9976. 'nd_geolocation_id' => array(
  9977. 'size' => 'big',
  9978. 'type' => 'int',
  9979. 'not null' => TRUE,
  9980. ),
  9981. 'type_id' => array(
  9982. 'size' => 'big',
  9983. 'type' => 'int',
  9984. 'not null' => TRUE,
  9985. ),
  9986. ),
  9987. 'indexes' => array(
  9988. 'nd_experiment_idx1' => array(
  9989. 0 => 'nd_geolocation_id',
  9990. ),
  9991. 'nd_experiment_idx2' => array(
  9992. 0 => 'type_id',
  9993. ),
  9994. ),
  9995. 'primary key' => array(
  9996. 0 => 'nd_experiment_id',
  9997. ),
  9998. 'foreign keys' => array(
  9999. 'nd_geolocation' => array(
  10000. 'table' => 'nd_geolocation',
  10001. 'columns' => array(
  10002. 'nd_geolocation_id' => 'nd_geolocation_id',
  10003. ),
  10004. ),
  10005. 'cvterm' => array(
  10006. 'table' => 'cvterm',
  10007. 'columns' => array(
  10008. 'type_id' => 'cvterm_id',
  10009. ),
  10010. ),
  10011. ),
  10012. 'referring_tables' => array(
  10013. 0 => 'nd_experiment_analysis',
  10014. 1 => 'nd_experiment_contact',
  10015. 2 => 'nd_experiment_dbxref',
  10016. 3 => 'nd_experiment_genotype',
  10017. 4 => 'nd_experiment_phenotype',
  10018. 5 => 'nd_experiment_project',
  10019. 6 => 'nd_experimentprop',
  10020. 7 => 'nd_experiment_protocol',
  10021. 8 => 'nd_experiment_pub',
  10022. 9 => 'nd_experiment_stock',
  10023. ),
  10024. );
  10025. return $description;
  10026. }
  10027. /**
  10028. * Implements hook_chado_schema_v1_3_nd_experiment_analysis()
  10029. *
  10030. * Purpose: To describe the structure of 'nd_experiment_analysis' to tripal
  10031. * @see chado_insert_record()
  10032. * @see chado_update_record()
  10033. * @see chado_select_record()
  10034. * @see chado_generate_var()
  10035. * @see chado_expan_var()
  10036. *
  10037. * @return
  10038. * An array describing the 'nd_experiment_analysis' table
  10039. *
  10040. * @ingroup tripal_chado_v1.3_schema_api
  10041. *
  10042. */
  10043. function tripal_chado_chado_schema_v1_3_nd_experiment_analysis() {
  10044. $description = array(
  10045. 'description' => '',
  10046. 'table' => 'nd_experiment_analysis',
  10047. 'fields' => array(
  10048. 'nd_experiment_analysis_id' => array(
  10049. 'size' => 'big',
  10050. 'type' => 'serial',
  10051. 'not null' => TRUE,
  10052. ),
  10053. 'nd_experiment_id' => array(
  10054. 'size' => 'big',
  10055. 'type' => 'int',
  10056. 'not null' => TRUE,
  10057. ),
  10058. 'analysis_id' => array(
  10059. 'size' => 'big',
  10060. 'type' => 'int',
  10061. 'not null' => TRUE,
  10062. ),
  10063. 'type_id' => array(
  10064. 'size' => 'big',
  10065. 'type' => 'int',
  10066. 'not null' => FALSE,
  10067. ),
  10068. ),
  10069. 'indexes' => array(
  10070. 'nd_experiment_analysis_idx1' => array(
  10071. 0 => 'nd_experiment_id',
  10072. ),
  10073. 'nd_experiment_analysis_idx2' => array(
  10074. 0 => 'analysis_id',
  10075. ),
  10076. 'nd_experiment_analysis_idx3' => array(
  10077. 0 => 'type_id',
  10078. ),
  10079. ),
  10080. 'primary key' => array(
  10081. 0 => 'nd_experiment_analysis_id',
  10082. ),
  10083. 'foreign keys' => array(
  10084. 'nd_experiment' => array(
  10085. 'table' => 'nd_experiment',
  10086. 'columns' => array(
  10087. 'nd_experiment_id' => 'nd_experiment_id',
  10088. ),
  10089. ),
  10090. 'analysis' => array(
  10091. 'table' => 'analysis',
  10092. 'columns' => array(
  10093. 'analysis_id' => 'analysis_id',
  10094. ),
  10095. ),
  10096. 'cvterm' => array(
  10097. 'table' => 'cvterm',
  10098. 'columns' => array(
  10099. 'type_id' => 'cvterm_id',
  10100. ),
  10101. ),
  10102. ),
  10103. 'referring_tables' => array(
  10104. ),
  10105. );
  10106. return $description;
  10107. }
  10108. /**
  10109. * Implements hook_chado_schema_v1_3_nd_experiment_contact()
  10110. *
  10111. * Purpose: To describe the structure of 'nd_experiment_contact' to tripal
  10112. * @see chado_insert_record()
  10113. * @see chado_update_record()
  10114. * @see chado_select_record()
  10115. * @see chado_generate_var()
  10116. * @see chado_expan_var()
  10117. *
  10118. * @return
  10119. * An array describing the 'nd_experiment_contact' table
  10120. *
  10121. * @ingroup tripal_chado_v1.3_schema_api
  10122. *
  10123. */
  10124. function tripal_chado_chado_schema_v1_3_nd_experiment_contact() {
  10125. $description = array(
  10126. 'description' => '',
  10127. 'table' => 'nd_experiment_contact',
  10128. 'fields' => array(
  10129. 'nd_experiment_contact_id' => array(
  10130. 'size' => 'big',
  10131. 'type' => 'serial',
  10132. 'not null' => TRUE,
  10133. ),
  10134. 'nd_experiment_id' => array(
  10135. 'size' => 'big',
  10136. 'type' => 'int',
  10137. 'not null' => TRUE,
  10138. ),
  10139. 'contact_id' => array(
  10140. 'size' => 'big',
  10141. 'type' => 'int',
  10142. 'not null' => TRUE,
  10143. ),
  10144. ),
  10145. 'indexes' => array(
  10146. 'nd_experiment_contact_idx1' => array(
  10147. 0 => 'nd_experiment_id',
  10148. ),
  10149. 'nd_experiment_contact_idx2' => array(
  10150. 0 => 'contact_id',
  10151. ),
  10152. ),
  10153. 'primary key' => array(
  10154. 0 => 'nd_experiment_contact_id',
  10155. ),
  10156. 'foreign keys' => array(
  10157. 'nd_experiment' => array(
  10158. 'table' => 'nd_experiment',
  10159. 'columns' => array(
  10160. 'nd_experiment_id' => 'nd_experiment_id',
  10161. ),
  10162. ),
  10163. 'contact' => array(
  10164. 'table' => 'contact',
  10165. 'columns' => array(
  10166. 'contact_id' => 'contact_id',
  10167. ),
  10168. ),
  10169. ),
  10170. 'referring_tables' => array(
  10171. ),
  10172. );
  10173. return $description;
  10174. }
  10175. /**
  10176. * Implements hook_chado_schema_v1_3_nd_experiment_dbxref()
  10177. *
  10178. * Purpose: To describe the structure of 'nd_experiment_dbxref' to tripal
  10179. * @see chado_insert_record()
  10180. * @see chado_update_record()
  10181. * @see chado_select_record()
  10182. * @see chado_generate_var()
  10183. * @see chado_expan_var()
  10184. *
  10185. * @return
  10186. * An array describing the 'nd_experiment_dbxref' table
  10187. *
  10188. * @ingroup tripal_chado_v1.3_schema_api
  10189. *
  10190. */
  10191. function tripal_chado_chado_schema_v1_3_nd_experiment_dbxref() {
  10192. $description = array(
  10193. 'description' => '',
  10194. 'table' => 'nd_experiment_dbxref',
  10195. 'fields' => array(
  10196. 'nd_experiment_dbxref_id' => array(
  10197. 'size' => 'big',
  10198. 'type' => 'serial',
  10199. 'not null' => TRUE,
  10200. ),
  10201. 'nd_experiment_id' => array(
  10202. 'size' => 'big',
  10203. 'type' => 'int',
  10204. 'not null' => TRUE,
  10205. ),
  10206. 'dbxref_id' => array(
  10207. 'size' => 'big',
  10208. 'type' => 'int',
  10209. 'not null' => TRUE,
  10210. ),
  10211. ),
  10212. 'indexes' => array(
  10213. 'nd_experiment_dbxref_idx1' => array(
  10214. 0 => 'nd_experiment_id',
  10215. ),
  10216. 'nd_experiment_dbxref_idx2' => array(
  10217. 0 => 'dbxref_id',
  10218. ),
  10219. ),
  10220. 'primary key' => array(
  10221. 0 => 'nd_experiment_dbxref_id',
  10222. ),
  10223. 'foreign keys' => array(
  10224. 'nd_experiment' => array(
  10225. 'table' => 'nd_experiment',
  10226. 'columns' => array(
  10227. 'nd_experiment_id' => 'nd_experiment_id',
  10228. ),
  10229. ),
  10230. 'dbxref' => array(
  10231. 'table' => 'dbxref',
  10232. 'columns' => array(
  10233. 'dbxref_id' => 'dbxref_id',
  10234. ),
  10235. ),
  10236. ),
  10237. 'referring_tables' => array(
  10238. ),
  10239. );
  10240. return $description;
  10241. }
  10242. /**
  10243. * Implements hook_chado_schema_v1_3_nd_experiment_genotype()
  10244. *
  10245. * Purpose: To describe the structure of 'nd_experiment_genotype' to tripal
  10246. * @see chado_insert_record()
  10247. * @see chado_update_record()
  10248. * @see chado_select_record()
  10249. * @see chado_generate_var()
  10250. * @see chado_expan_var()
  10251. *
  10252. * @return
  10253. * An array describing the 'nd_experiment_genotype' table
  10254. *
  10255. * @ingroup tripal_chado_v1.3_schema_api
  10256. *
  10257. */
  10258. function tripal_chado_chado_schema_v1_3_nd_experiment_genotype() {
  10259. $description = array(
  10260. 'description' => '',
  10261. 'table' => 'nd_experiment_genotype',
  10262. 'fields' => array(
  10263. 'nd_experiment_genotype_id' => array(
  10264. 'size' => 'big',
  10265. 'type' => 'serial',
  10266. 'not null' => TRUE,
  10267. ),
  10268. 'nd_experiment_id' => array(
  10269. 'size' => 'big',
  10270. 'type' => 'int',
  10271. 'not null' => TRUE,
  10272. ),
  10273. 'genotype_id' => array(
  10274. 'size' => 'big',
  10275. 'type' => 'int',
  10276. 'not null' => TRUE,
  10277. ),
  10278. ),
  10279. 'unique keys' => array(
  10280. 'nd_experiment_genotype_c1' => array(
  10281. 0 => 'nd_experiment_id',
  10282. 1 => 'genotype_id',
  10283. ),
  10284. ),
  10285. 'indexes' => array(
  10286. 'nd_experiment_genotype_idx1' => array(
  10287. 0 => 'nd_experiment_id',
  10288. ),
  10289. 'nd_experiment_genotype_idx2' => array(
  10290. 0 => 'genotype_id',
  10291. ),
  10292. ),
  10293. 'primary key' => array(
  10294. 0 => 'nd_experiment_genotype_id',
  10295. ),
  10296. 'foreign keys' => array(
  10297. 'nd_experiment' => array(
  10298. 'table' => 'nd_experiment',
  10299. 'columns' => array(
  10300. 'nd_experiment_id' => 'nd_experiment_id',
  10301. ),
  10302. ),
  10303. 'genotype' => array(
  10304. 'table' => 'genotype',
  10305. 'columns' => array(
  10306. 'genotype_id' => 'genotype_id',
  10307. ),
  10308. ),
  10309. ),
  10310. 'referring_tables' => array(
  10311. ),
  10312. );
  10313. return $description;
  10314. }
  10315. /**
  10316. * Implements hook_chado_schema_v1_3_nd_experiment_phenotype()
  10317. *
  10318. * Purpose: To describe the structure of 'nd_experiment_phenotype' to tripal
  10319. * @see chado_insert_record()
  10320. * @see chado_update_record()
  10321. * @see chado_select_record()
  10322. * @see chado_generate_var()
  10323. * @see chado_expan_var()
  10324. *
  10325. * @return
  10326. * An array describing the 'nd_experiment_phenotype' table
  10327. *
  10328. * @ingroup tripal_chado_v1.3_schema_api
  10329. *
  10330. */
  10331. function tripal_chado_chado_schema_v1_3_nd_experiment_phenotype() {
  10332. $description = array(
  10333. 'description' => '',
  10334. 'table' => 'nd_experiment_phenotype',
  10335. 'fields' => array(
  10336. 'nd_experiment_phenotype_id' => array(
  10337. 'size' => 'big',
  10338. 'type' => 'serial',
  10339. 'not null' => TRUE,
  10340. ),
  10341. 'nd_experiment_id' => array(
  10342. 'size' => 'big',
  10343. 'type' => 'int',
  10344. 'not null' => TRUE,
  10345. ),
  10346. 'phenotype_id' => array(
  10347. 'size' => 'big',
  10348. 'type' => 'int',
  10349. 'not null' => TRUE,
  10350. ),
  10351. ),
  10352. 'unique keys' => array(
  10353. 'nd_experiment_phenotype_c1' => array(
  10354. 0 => 'nd_experiment_id',
  10355. 1 => 'phenotype_id',
  10356. ),
  10357. ),
  10358. 'indexes' => array(
  10359. 'nd_experiment_phenotype_idx1' => array(
  10360. 0 => 'nd_experiment_id',
  10361. ),
  10362. 'nd_experiment_phenotype_idx2' => array(
  10363. 0 => 'phenotype_id',
  10364. ),
  10365. ),
  10366. 'primary key' => array(
  10367. 0 => 'nd_experiment_phenotype_id',
  10368. ),
  10369. 'foreign keys' => array(
  10370. 'nd_experiment' => array(
  10371. 'table' => 'nd_experiment',
  10372. 'columns' => array(
  10373. 'nd_experiment_id' => 'nd_experiment_id',
  10374. ),
  10375. ),
  10376. 'phenotype' => array(
  10377. 'table' => 'phenotype',
  10378. 'columns' => array(
  10379. 'phenotype_id' => 'phenotype_id',
  10380. ),
  10381. ),
  10382. ),
  10383. 'referring_tables' => array(
  10384. ),
  10385. );
  10386. return $description;
  10387. }
  10388. /**
  10389. * Implements hook_chado_schema_v1_3_nd_experiment_project()
  10390. *
  10391. * Purpose: To describe the structure of 'nd_experiment_project' to tripal
  10392. * @see chado_insert_record()
  10393. * @see chado_update_record()
  10394. * @see chado_select_record()
  10395. * @see chado_generate_var()
  10396. * @see chado_expan_var()
  10397. *
  10398. * @return
  10399. * An array describing the 'nd_experiment_project' table
  10400. *
  10401. * @ingroup tripal_chado_v1.3_schema_api
  10402. *
  10403. */
  10404. function tripal_chado_chado_schema_v1_3_nd_experiment_project() {
  10405. $description = array(
  10406. 'description' => '',
  10407. 'table' => 'nd_experiment_project',
  10408. 'fields' => array(
  10409. 'nd_experiment_project_id' => array(
  10410. 'size' => 'big',
  10411. 'type' => 'serial',
  10412. 'not null' => TRUE,
  10413. ),
  10414. 'project_id' => array(
  10415. 'size' => 'big',
  10416. 'type' => 'int',
  10417. 'not null' => TRUE,
  10418. ),
  10419. 'nd_experiment_id' => array(
  10420. 'size' => 'big',
  10421. 'type' => 'int',
  10422. 'not null' => TRUE,
  10423. ),
  10424. ),
  10425. 'unique keys' => array(
  10426. 'nd_experiment_project_c1' => array(
  10427. 0 => 'project_id',
  10428. 1 => 'nd_experiment_id',
  10429. ),
  10430. ),
  10431. 'indexes' => array(
  10432. 'nd_experiment_project_idx1' => array(
  10433. 0 => 'project_id',
  10434. ),
  10435. 'nd_experiment_project_idx2' => array(
  10436. 0 => 'nd_experiment_id',
  10437. ),
  10438. ),
  10439. 'primary key' => array(
  10440. 0 => 'nd_experiment_project_id',
  10441. ),
  10442. 'foreign keys' => array(
  10443. 'project' => array(
  10444. 'table' => 'project',
  10445. 'columns' => array(
  10446. 'project_id' => 'project_id',
  10447. ),
  10448. ),
  10449. 'nd_experiment' => array(
  10450. 'table' => 'nd_experiment',
  10451. 'columns' => array(
  10452. 'nd_experiment_id' => 'nd_experiment_id',
  10453. ),
  10454. ),
  10455. ),
  10456. 'referring_tables' => array(
  10457. ),
  10458. );
  10459. return $description;
  10460. }
  10461. /**
  10462. * Implements hook_chado_schema_v1_3_nd_experimentprop()
  10463. *
  10464. * Purpose: To describe the structure of 'nd_experimentprop' to tripal
  10465. * @see chado_insert_record()
  10466. * @see chado_update_record()
  10467. * @see chado_select_record()
  10468. * @see chado_generate_var()
  10469. * @see chado_expan_var()
  10470. *
  10471. * @return
  10472. * An array describing the 'nd_experimentprop' table
  10473. *
  10474. * @ingroup tripal_chado_v1.3_schema_api
  10475. *
  10476. */
  10477. function tripal_chado_chado_schema_v1_3_nd_experimentprop() {
  10478. $description = array(
  10479. 'description' => '',
  10480. 'table' => 'nd_experimentprop',
  10481. 'fields' => array(
  10482. 'nd_experimentprop_id' => array(
  10483. 'size' => 'big',
  10484. 'type' => 'serial',
  10485. 'not null' => TRUE,
  10486. ),
  10487. 'nd_experiment_id' => array(
  10488. 'size' => 'big',
  10489. 'type' => 'int',
  10490. 'not null' => TRUE,
  10491. ),
  10492. 'type_id' => array(
  10493. 'size' => 'big',
  10494. 'type' => 'int',
  10495. 'not null' => TRUE,
  10496. ),
  10497. 'value' => array(
  10498. 'size' => 'normal',
  10499. 'type' => 'text',
  10500. 'not null' => FALSE,
  10501. ),
  10502. 'rank' => array(
  10503. 'size' => 'normal',
  10504. 'type' => 'int',
  10505. 'not null' => TRUE,
  10506. 'default' => 0,
  10507. ),
  10508. ),
  10509. 'unique keys' => array(
  10510. 'nd_experimentprop_c1' => array(
  10511. 0 => 'nd_experiment_id',
  10512. 1 => 'type_id',
  10513. 2 => 'rank',
  10514. ),
  10515. ),
  10516. 'indexes' => array(
  10517. 'nd_experimentprop_idx1' => array(
  10518. 0 => 'nd_experiment_id',
  10519. ),
  10520. 'nd_experimentprop_idx2' => array(
  10521. 0 => 'type_id',
  10522. ),
  10523. ),
  10524. 'primary key' => array(
  10525. 0 => 'nd_experimentprop_id',
  10526. ),
  10527. 'foreign keys' => array(
  10528. 'nd_experiment' => array(
  10529. 'table' => 'nd_experiment',
  10530. 'columns' => array(
  10531. 'nd_experiment_id' => 'nd_experiment_id',
  10532. ),
  10533. ),
  10534. 'cvterm' => array(
  10535. 'table' => 'cvterm',
  10536. 'columns' => array(
  10537. 'type_id' => 'cvterm_id',
  10538. ),
  10539. ),
  10540. ),
  10541. 'referring_tables' => array(
  10542. ),
  10543. );
  10544. return $description;
  10545. }
  10546. /**
  10547. * Implements hook_chado_schema_v1_3_nd_experiment_protocol()
  10548. *
  10549. * Purpose: To describe the structure of 'nd_experiment_protocol' to tripal
  10550. * @see chado_insert_record()
  10551. * @see chado_update_record()
  10552. * @see chado_select_record()
  10553. * @see chado_generate_var()
  10554. * @see chado_expan_var()
  10555. *
  10556. * @return
  10557. * An array describing the 'nd_experiment_protocol' table
  10558. *
  10559. * @ingroup tripal_chado_v1.3_schema_api
  10560. *
  10561. */
  10562. function tripal_chado_chado_schema_v1_3_nd_experiment_protocol() {
  10563. $description = array(
  10564. 'description' => '',
  10565. 'table' => 'nd_experiment_protocol',
  10566. 'fields' => array(
  10567. 'nd_experiment_protocol_id' => array(
  10568. 'size' => 'big',
  10569. 'type' => 'serial',
  10570. 'not null' => TRUE,
  10571. ),
  10572. 'nd_experiment_id' => array(
  10573. 'size' => 'big',
  10574. 'type' => 'int',
  10575. 'not null' => TRUE,
  10576. ),
  10577. 'nd_protocol_id' => array(
  10578. 'size' => 'big',
  10579. 'type' => 'int',
  10580. 'not null' => TRUE,
  10581. ),
  10582. ),
  10583. 'indexes' => array(
  10584. 'nd_experiment_protocol_idx1' => array(
  10585. 0 => 'nd_experiment_id',
  10586. ),
  10587. 'nd_experiment_protocol_idx2' => array(
  10588. 0 => 'nd_protocol_id',
  10589. ),
  10590. ),
  10591. 'primary key' => array(
  10592. 0 => 'nd_experiment_protocol_id',
  10593. ),
  10594. 'foreign keys' => array(
  10595. 'nd_experiment' => array(
  10596. 'table' => 'nd_experiment',
  10597. 'columns' => array(
  10598. 'nd_experiment_id' => 'nd_experiment_id',
  10599. ),
  10600. ),
  10601. 'nd_protocol' => array(
  10602. 'table' => 'nd_protocol',
  10603. 'columns' => array(
  10604. 'nd_protocol_id' => 'nd_protocol_id',
  10605. ),
  10606. ),
  10607. ),
  10608. 'referring_tables' => array(
  10609. ),
  10610. );
  10611. return $description;
  10612. }
  10613. /**
  10614. * Implements hook_chado_schema_v1_3_nd_experiment_pub()
  10615. *
  10616. * Purpose: To describe the structure of 'nd_experiment_pub' to tripal
  10617. * @see chado_insert_record()
  10618. * @see chado_update_record()
  10619. * @see chado_select_record()
  10620. * @see chado_generate_var()
  10621. * @see chado_expan_var()
  10622. *
  10623. * @return
  10624. * An array describing the 'nd_experiment_pub' table
  10625. *
  10626. * @ingroup tripal_chado_v1.3_schema_api
  10627. *
  10628. */
  10629. function tripal_chado_chado_schema_v1_3_nd_experiment_pub() {
  10630. $description = array(
  10631. 'description' => '',
  10632. 'table' => 'nd_experiment_pub',
  10633. 'fields' => array(
  10634. 'nd_experiment_pub_id' => array(
  10635. 'size' => 'big',
  10636. 'type' => 'serial',
  10637. 'not null' => TRUE,
  10638. ),
  10639. 'nd_experiment_id' => array(
  10640. 'size' => 'big',
  10641. 'type' => 'int',
  10642. 'not null' => TRUE,
  10643. ),
  10644. 'pub_id' => array(
  10645. 'size' => 'big',
  10646. 'type' => 'int',
  10647. 'not null' => TRUE,
  10648. ),
  10649. ),
  10650. 'unique keys' => array(
  10651. 'nd_experiment_pub_c1' => array(
  10652. 0 => 'nd_experiment_id',
  10653. 1 => 'pub_id',
  10654. ),
  10655. ),
  10656. 'indexes' => array(
  10657. 'nd_experiment_pub_idx1' => array(
  10658. 0 => 'nd_experiment_id',
  10659. ),
  10660. 'nd_experiment_pub_idx2' => array(
  10661. 0 => 'pub_id',
  10662. ),
  10663. ),
  10664. 'primary key' => array(
  10665. 0 => 'nd_experiment_pub_id',
  10666. ),
  10667. 'foreign keys' => array(
  10668. 'nd_experiment' => array(
  10669. 'table' => 'nd_experiment',
  10670. 'columns' => array(
  10671. 'nd_experiment_id' => 'nd_experiment_id',
  10672. ),
  10673. ),
  10674. 'pub' => array(
  10675. 'table' => 'pub',
  10676. 'columns' => array(
  10677. 'pub_id' => 'pub_id',
  10678. ),
  10679. ),
  10680. ),
  10681. 'referring_tables' => array(
  10682. ),
  10683. );
  10684. return $description;
  10685. }
  10686. /**
  10687. * Implements hook_chado_schema_v1_3_nd_experiment_stock()
  10688. *
  10689. * Purpose: To describe the structure of 'nd_experiment_stock' to tripal
  10690. * @see chado_insert_record()
  10691. * @see chado_update_record()
  10692. * @see chado_select_record()
  10693. * @see chado_generate_var()
  10694. * @see chado_expan_var()
  10695. *
  10696. * @return
  10697. * An array describing the 'nd_experiment_stock' table
  10698. *
  10699. * @ingroup tripal_chado_v1.3_schema_api
  10700. *
  10701. */
  10702. function tripal_chado_chado_schema_v1_3_nd_experiment_stock() {
  10703. $description = array(
  10704. 'description' => '',
  10705. 'table' => 'nd_experiment_stock',
  10706. 'fields' => array(
  10707. 'nd_experiment_stock_id' => array(
  10708. 'size' => 'big',
  10709. 'type' => 'serial',
  10710. 'not null' => TRUE,
  10711. ),
  10712. 'nd_experiment_id' => array(
  10713. 'size' => 'big',
  10714. 'type' => 'int',
  10715. 'not null' => TRUE,
  10716. ),
  10717. 'stock_id' => array(
  10718. 'size' => 'big',
  10719. 'type' => 'int',
  10720. 'not null' => TRUE,
  10721. ),
  10722. 'type_id' => array(
  10723. 'size' => 'big',
  10724. 'type' => 'int',
  10725. 'not null' => TRUE,
  10726. ),
  10727. ),
  10728. 'indexes' => array(
  10729. 'nd_experiment_stock_idx1' => array(
  10730. 0 => 'nd_experiment_id',
  10731. ),
  10732. 'nd_experiment_stock_idx2' => array(
  10733. 0 => 'stock_id',
  10734. ),
  10735. 'nd_experiment_stock_idx3' => array(
  10736. 0 => 'type_id',
  10737. ),
  10738. ),
  10739. 'primary key' => array(
  10740. 0 => 'nd_experiment_stock_id',
  10741. ),
  10742. 'foreign keys' => array(
  10743. 'nd_experiment' => array(
  10744. 'table' => 'nd_experiment',
  10745. 'columns' => array(
  10746. 'nd_experiment_id' => 'nd_experiment_id',
  10747. ),
  10748. ),
  10749. 'stock' => array(
  10750. 'table' => 'stock',
  10751. 'columns' => array(
  10752. 'stock_id' => 'stock_id',
  10753. ),
  10754. ),
  10755. 'cvterm' => array(
  10756. 'table' => 'cvterm',
  10757. 'columns' => array(
  10758. 'type_id' => 'cvterm_id',
  10759. ),
  10760. ),
  10761. ),
  10762. 'referring_tables' => array(
  10763. 0 => 'nd_experiment_stock_dbxref',
  10764. 1 => 'nd_experiment_stockprop',
  10765. ),
  10766. );
  10767. return $description;
  10768. }
  10769. /**
  10770. * Implements hook_chado_schema_v1_3_nd_experiment_stock_dbxref()
  10771. *
  10772. * Purpose: To describe the structure of 'nd_experiment_stock_dbxref' to tripal
  10773. * @see chado_insert_record()
  10774. * @see chado_update_record()
  10775. * @see chado_select_record()
  10776. * @see chado_generate_var()
  10777. * @see chado_expan_var()
  10778. *
  10779. * @return
  10780. * An array describing the 'nd_experiment_stock_dbxref' table
  10781. *
  10782. * @ingroup tripal_chado_v1.3_schema_api
  10783. *
  10784. */
  10785. function tripal_chado_chado_schema_v1_3_nd_experiment_stock_dbxref() {
  10786. $description = array(
  10787. 'description' => '',
  10788. 'table' => 'nd_experiment_stock_dbxref',
  10789. 'fields' => array(
  10790. 'nd_experiment_stock_dbxref_id' => array(
  10791. 'size' => 'big',
  10792. 'type' => 'serial',
  10793. 'not null' => TRUE,
  10794. ),
  10795. 'nd_experiment_stock_id' => array(
  10796. 'size' => 'big',
  10797. 'type' => 'int',
  10798. 'not null' => TRUE,
  10799. ),
  10800. 'dbxref_id' => array(
  10801. 'size' => 'big',
  10802. 'type' => 'int',
  10803. 'not null' => TRUE,
  10804. ),
  10805. ),
  10806. 'indexes' => array(
  10807. 'nd_experiment_stock_dbxref_idx1' => array(
  10808. 0 => 'nd_experiment_stock_id',
  10809. ),
  10810. 'nd_experiment_stock_dbxref_idx2' => array(
  10811. 0 => 'dbxref_id',
  10812. ),
  10813. ),
  10814. 'primary key' => array(
  10815. 0 => 'nd_experiment_stock_dbxref_id',
  10816. ),
  10817. 'foreign keys' => array(
  10818. 'nd_experiment_stock' => array(
  10819. 'table' => 'nd_experiment_stock',
  10820. 'columns' => array(
  10821. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  10822. ),
  10823. ),
  10824. 'dbxref' => array(
  10825. 'table' => 'dbxref',
  10826. 'columns' => array(
  10827. 'dbxref_id' => 'dbxref_id',
  10828. ),
  10829. ),
  10830. ),
  10831. 'referring_tables' => array(
  10832. ),
  10833. );
  10834. return $description;
  10835. }
  10836. /**
  10837. * Implements hook_chado_schema_v1_3_nd_experiment_stockprop()
  10838. *
  10839. * Purpose: To describe the structure of 'nd_experiment_stockprop' to tripal
  10840. * @see chado_insert_record()
  10841. * @see chado_update_record()
  10842. * @see chado_select_record()
  10843. * @see chado_generate_var()
  10844. * @see chado_expan_var()
  10845. *
  10846. * @return
  10847. * An array describing the 'nd_experiment_stockprop' table
  10848. *
  10849. * @ingroup tripal_chado_v1.3_schema_api
  10850. *
  10851. */
  10852. function tripal_chado_chado_schema_v1_3_nd_experiment_stockprop() {
  10853. $description = array(
  10854. 'description' => '',
  10855. 'table' => 'nd_experiment_stockprop',
  10856. 'fields' => array(
  10857. 'nd_experiment_stockprop_id' => array(
  10858. 'size' => 'big',
  10859. 'type' => 'serial',
  10860. 'not null' => TRUE,
  10861. ),
  10862. 'nd_experiment_stock_id' => array(
  10863. 'size' => 'big',
  10864. 'type' => 'int',
  10865. 'not null' => TRUE,
  10866. ),
  10867. 'type_id' => array(
  10868. 'size' => 'big',
  10869. 'type' => 'int',
  10870. 'not null' => TRUE,
  10871. ),
  10872. 'value' => array(
  10873. 'size' => 'normal',
  10874. 'type' => 'text',
  10875. 'not null' => FALSE,
  10876. ),
  10877. 'rank' => array(
  10878. 'size' => 'normal',
  10879. 'type' => 'int',
  10880. 'not null' => TRUE,
  10881. 'default' => 0,
  10882. ),
  10883. ),
  10884. 'unique keys' => array(
  10885. 'nd_experiment_stockprop_c1' => array(
  10886. 0 => 'nd_experiment_stock_id',
  10887. 1 => 'type_id',
  10888. 2 => 'rank',
  10889. ),
  10890. ),
  10891. 'indexes' => array(
  10892. 'nd_experiment_stockprop_idx1' => array(
  10893. 0 => 'nd_experiment_stock_id',
  10894. ),
  10895. 'nd_experiment_stockprop_idx2' => array(
  10896. 0 => 'type_id',
  10897. ),
  10898. ),
  10899. 'primary key' => array(
  10900. 0 => 'nd_experiment_stockprop_id',
  10901. ),
  10902. 'foreign keys' => array(
  10903. 'nd_experiment_stock' => array(
  10904. 'table' => 'nd_experiment_stock',
  10905. 'columns' => array(
  10906. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  10907. ),
  10908. ),
  10909. 'cvterm' => array(
  10910. 'table' => 'cvterm',
  10911. 'columns' => array(
  10912. 'type_id' => 'cvterm_id',
  10913. ),
  10914. ),
  10915. ),
  10916. 'referring_tables' => array(
  10917. ),
  10918. );
  10919. return $description;
  10920. }
  10921. /**
  10922. * Implements hook_chado_schema_v1_3_nd_geolocation()
  10923. *
  10924. * Purpose: To describe the structure of 'nd_geolocation' to tripal
  10925. * @see chado_insert_record()
  10926. * @see chado_update_record()
  10927. * @see chado_select_record()
  10928. * @see chado_generate_var()
  10929. * @see chado_expan_var()
  10930. *
  10931. * @return
  10932. * An array describing the 'nd_geolocation' table
  10933. *
  10934. * @ingroup tripal_chado_v1.3_schema_api
  10935. *
  10936. */
  10937. function tripal_chado_chado_schema_v1_3_nd_geolocation() {
  10938. $description = array(
  10939. 'description' => '',
  10940. 'table' => 'nd_geolocation',
  10941. 'fields' => array(
  10942. 'nd_geolocation_id' => array(
  10943. 'size' => 'big',
  10944. 'type' => 'serial',
  10945. 'not null' => TRUE,
  10946. ),
  10947. 'description' => array(
  10948. 'size' => 'normal',
  10949. 'type' => 'text',
  10950. 'not null' => FALSE,
  10951. ),
  10952. 'latitude' => array(
  10953. 'size' => 'normal',
  10954. 'type' => 'float',
  10955. 'not null' => FALSE,
  10956. ),
  10957. 'longitude' => array(
  10958. 'size' => 'normal',
  10959. 'type' => 'float',
  10960. 'not null' => FALSE,
  10961. ),
  10962. 'geodetic_datum' => array(
  10963. 'size' => 'normal',
  10964. 'type' => 'varchar',
  10965. 'length' => '32',
  10966. 'not null' => FALSE,
  10967. ),
  10968. 'altitude' => array(
  10969. 'size' => 'normal',
  10970. 'type' => 'float',
  10971. 'not null' => FALSE,
  10972. ),
  10973. ),
  10974. 'indexes' => array(
  10975. 'nd_geolocation_idx1' => array(
  10976. 0 => 'latitude',
  10977. ),
  10978. 'nd_geolocation_idx2' => array(
  10979. 0 => 'longitude',
  10980. ),
  10981. 'nd_geolocation_idx3' => array(
  10982. 0 => 'altitude',
  10983. ),
  10984. ),
  10985. 'primary key' => array(
  10986. 0 => 'nd_geolocation_id',
  10987. ),
  10988. 'foreign keys' => array(
  10989. ),
  10990. 'referring_tables' => array(
  10991. 0 => 'nd_experiment',
  10992. 1 => 'nd_geolocationprop',
  10993. ),
  10994. );
  10995. return $description;
  10996. }
  10997. /**
  10998. * Implements hook_chado_schema_v1_3_nd_geolocationprop()
  10999. *
  11000. * Purpose: To describe the structure of 'nd_geolocationprop' to tripal
  11001. * @see chado_insert_record()
  11002. * @see chado_update_record()
  11003. * @see chado_select_record()
  11004. * @see chado_generate_var()
  11005. * @see chado_expan_var()
  11006. *
  11007. * @return
  11008. * An array describing the 'nd_geolocationprop' table
  11009. *
  11010. * @ingroup tripal_chado_v1.3_schema_api
  11011. *
  11012. */
  11013. function tripal_chado_chado_schema_v1_3_nd_geolocationprop() {
  11014. $description = array(
  11015. 'description' => '',
  11016. 'table' => 'nd_geolocationprop',
  11017. 'fields' => array(
  11018. 'nd_geolocationprop_id' => array(
  11019. 'size' => 'big',
  11020. 'type' => 'serial',
  11021. 'not null' => TRUE,
  11022. ),
  11023. 'nd_geolocation_id' => array(
  11024. 'size' => 'big',
  11025. 'type' => 'int',
  11026. 'not null' => TRUE,
  11027. ),
  11028. 'type_id' => array(
  11029. 'size' => 'big',
  11030. 'type' => 'int',
  11031. 'not null' => TRUE,
  11032. ),
  11033. 'value' => array(
  11034. 'size' => 'normal',
  11035. 'type' => 'text',
  11036. 'not null' => FALSE,
  11037. ),
  11038. 'rank' => array(
  11039. 'size' => 'normal',
  11040. 'type' => 'int',
  11041. 'not null' => TRUE,
  11042. 'default' => 0,
  11043. ),
  11044. ),
  11045. 'unique keys' => array(
  11046. 'nd_geolocationprop_c1' => array(
  11047. 0 => 'nd_geolocation_id',
  11048. 1 => 'type_id',
  11049. 2 => 'rank',
  11050. ),
  11051. ),
  11052. 'indexes' => array(
  11053. 'nd_geolocationprop_idx1' => array(
  11054. 0 => 'nd_geolocation_id',
  11055. ),
  11056. 'nd_geolocationprop_idx2' => array(
  11057. 0 => 'type_id',
  11058. ),
  11059. ),
  11060. 'primary key' => array(
  11061. 0 => 'nd_geolocationprop_id',
  11062. ),
  11063. 'foreign keys' => array(
  11064. 'nd_geolocation' => array(
  11065. 'table' => 'nd_geolocation',
  11066. 'columns' => array(
  11067. 'nd_geolocation_id' => 'nd_geolocation_id',
  11068. ),
  11069. ),
  11070. 'cvterm' => array(
  11071. 'table' => 'cvterm',
  11072. 'columns' => array(
  11073. 'type_id' => 'cvterm_id',
  11074. ),
  11075. ),
  11076. ),
  11077. 'referring_tables' => array(
  11078. ),
  11079. );
  11080. return $description;
  11081. }
  11082. /**
  11083. * Implements hook_chado_schema_v1_3_nd_protocol()
  11084. *
  11085. * Purpose: To describe the structure of 'nd_protocol' to tripal
  11086. * @see chado_insert_record()
  11087. * @see chado_update_record()
  11088. * @see chado_select_record()
  11089. * @see chado_generate_var()
  11090. * @see chado_expan_var()
  11091. *
  11092. * @return
  11093. * An array describing the 'nd_protocol' table
  11094. *
  11095. * @ingroup tripal_chado_v1.3_schema_api
  11096. *
  11097. */
  11098. function tripal_chado_chado_schema_v1_3_nd_protocol() {
  11099. $description = array(
  11100. 'description' => '',
  11101. 'table' => 'nd_protocol',
  11102. 'fields' => array(
  11103. 'nd_protocol_id' => array(
  11104. 'size' => 'big',
  11105. 'type' => 'serial',
  11106. 'not null' => TRUE,
  11107. ),
  11108. 'name' => array(
  11109. 'size' => 'normal',
  11110. 'type' => 'varchar',
  11111. 'length' => '255',
  11112. 'not null' => TRUE,
  11113. ),
  11114. 'type_id' => array(
  11115. 'size' => 'big',
  11116. 'type' => 'int',
  11117. 'not null' => TRUE,
  11118. ),
  11119. ),
  11120. 'indexes' => array(
  11121. 'nd_protocol_idx1' => array(
  11122. 0 => 'type_id',
  11123. ),
  11124. ),
  11125. 'unique keys' => array(
  11126. 'nd_protocol_name_key' => array(
  11127. 0 => 'name',
  11128. ),
  11129. ),
  11130. 'primary key' => array(
  11131. 0 => 'nd_protocol_id',
  11132. ),
  11133. 'foreign keys' => array(
  11134. 'cvterm' => array(
  11135. 'table' => 'cvterm',
  11136. 'columns' => array(
  11137. 'type_id' => 'cvterm_id',
  11138. ),
  11139. ),
  11140. ),
  11141. 'referring_tables' => array(
  11142. 0 => 'nd_experiment_protocol',
  11143. 1 => 'nd_protocolprop',
  11144. 2 => 'nd_protocol_reagent',
  11145. ),
  11146. );
  11147. return $description;
  11148. }
  11149. /**
  11150. * Implements hook_chado_schema_v1_3_nd_protocolprop()
  11151. *
  11152. * Purpose: To describe the structure of 'nd_protocolprop' to tripal
  11153. * @see chado_insert_record()
  11154. * @see chado_update_record()
  11155. * @see chado_select_record()
  11156. * @see chado_generate_var()
  11157. * @see chado_expan_var()
  11158. *
  11159. * @return
  11160. * An array describing the 'nd_protocolprop' table
  11161. *
  11162. * @ingroup tripal_chado_v1.3_schema_api
  11163. *
  11164. */
  11165. function tripal_chado_chado_schema_v1_3_nd_protocolprop() {
  11166. $description = array(
  11167. 'description' => '',
  11168. 'table' => 'nd_protocolprop',
  11169. 'fields' => array(
  11170. 'nd_protocolprop_id' => array(
  11171. 'size' => 'big',
  11172. 'type' => 'serial',
  11173. 'not null' => TRUE,
  11174. ),
  11175. 'nd_protocol_id' => array(
  11176. 'size' => 'big',
  11177. 'type' => 'int',
  11178. 'not null' => TRUE,
  11179. ),
  11180. 'type_id' => array(
  11181. 'size' => 'big',
  11182. 'type' => 'int',
  11183. 'not null' => TRUE,
  11184. ),
  11185. 'value' => array(
  11186. 'size' => 'normal',
  11187. 'type' => 'text',
  11188. 'not null' => FALSE,
  11189. ),
  11190. 'rank' => array(
  11191. 'size' => 'normal',
  11192. 'type' => 'int',
  11193. 'not null' => TRUE,
  11194. 'default' => 0,
  11195. ),
  11196. ),
  11197. 'unique keys' => array(
  11198. 'nd_protocolprop_c1' => array(
  11199. 0 => 'nd_protocol_id',
  11200. 1 => 'type_id',
  11201. 2 => 'rank',
  11202. ),
  11203. ),
  11204. 'indexes' => array(
  11205. 'nd_protocolprop_idx1' => array(
  11206. 0 => 'nd_protocol_id',
  11207. ),
  11208. 'nd_protocolprop_idx2' => array(
  11209. 0 => 'type_id',
  11210. ),
  11211. ),
  11212. 'primary key' => array(
  11213. 0 => 'nd_protocolprop_id',
  11214. ),
  11215. 'foreign keys' => array(
  11216. 'nd_protocol' => array(
  11217. 'table' => 'nd_protocol',
  11218. 'columns' => array(
  11219. 'nd_protocol_id' => 'nd_protocol_id',
  11220. ),
  11221. ),
  11222. 'cvterm' => array(
  11223. 'table' => 'cvterm',
  11224. 'columns' => array(
  11225. 'type_id' => 'cvterm_id',
  11226. ),
  11227. ),
  11228. ),
  11229. 'referring_tables' => array(
  11230. ),
  11231. );
  11232. return $description;
  11233. }
  11234. /**
  11235. * Implements hook_chado_schema_v1_3_nd_protocol_reagent()
  11236. *
  11237. * Purpose: To describe the structure of 'nd_protocol_reagent' to tripal
  11238. * @see chado_insert_record()
  11239. * @see chado_update_record()
  11240. * @see chado_select_record()
  11241. * @see chado_generate_var()
  11242. * @see chado_expan_var()
  11243. *
  11244. * @return
  11245. * An array describing the 'nd_protocol_reagent' table
  11246. *
  11247. * @ingroup tripal_chado_v1.3_schema_api
  11248. *
  11249. */
  11250. function tripal_chado_chado_schema_v1_3_nd_protocol_reagent() {
  11251. $description = array(
  11252. 'description' => '',
  11253. 'table' => 'nd_protocol_reagent',
  11254. 'fields' => array(
  11255. 'nd_protocol_reagent_id' => array(
  11256. 'size' => 'big',
  11257. 'type' => 'serial',
  11258. 'not null' => TRUE,
  11259. ),
  11260. 'nd_protocol_id' => array(
  11261. 'size' => 'big',
  11262. 'type' => 'int',
  11263. 'not null' => TRUE,
  11264. ),
  11265. 'reagent_id' => array(
  11266. 'size' => 'big',
  11267. 'type' => 'int',
  11268. 'not null' => TRUE,
  11269. ),
  11270. 'type_id' => array(
  11271. 'size' => 'big',
  11272. 'type' => 'int',
  11273. 'not null' => TRUE,
  11274. ),
  11275. ),
  11276. 'indexes' => array(
  11277. 'nd_protocol_reagent_idx1' => array(
  11278. 0 => 'nd_protocol_id',
  11279. ),
  11280. 'nd_protocol_reagent_idx2' => array(
  11281. 0 => 'reagent_id',
  11282. ),
  11283. 'nd_protocol_reagent_idx3' => array(
  11284. 0 => 'type_id',
  11285. ),
  11286. ),
  11287. 'primary key' => array(
  11288. 0 => 'nd_protocol_reagent_id',
  11289. ),
  11290. 'foreign keys' => array(
  11291. 'nd_protocol' => array(
  11292. 'table' => 'nd_protocol',
  11293. 'columns' => array(
  11294. 'nd_protocol_id' => 'nd_protocol_id',
  11295. ),
  11296. ),
  11297. 'nd_reagent' => array(
  11298. 'table' => 'nd_reagent',
  11299. 'columns' => array(
  11300. 'reagent_id' => 'nd_reagent_id',
  11301. ),
  11302. ),
  11303. 'cvterm' => array(
  11304. 'table' => 'cvterm',
  11305. 'columns' => array(
  11306. 'type_id' => 'cvterm_id',
  11307. ),
  11308. ),
  11309. ),
  11310. 'referring_tables' => array(
  11311. ),
  11312. );
  11313. return $description;
  11314. }
  11315. /**
  11316. * Implements hook_chado_schema_v1_3_nd_reagent()
  11317. *
  11318. * Purpose: To describe the structure of 'nd_reagent' to tripal
  11319. * @see chado_insert_record()
  11320. * @see chado_update_record()
  11321. * @see chado_select_record()
  11322. * @see chado_generate_var()
  11323. * @see chado_expan_var()
  11324. *
  11325. * @return
  11326. * An array describing the 'nd_reagent' table
  11327. *
  11328. * @ingroup tripal_chado_v1.3_schema_api
  11329. *
  11330. */
  11331. function tripal_chado_chado_schema_v1_3_nd_reagent() {
  11332. $description = array(
  11333. 'description' => '',
  11334. 'table' => 'nd_reagent',
  11335. 'fields' => array(
  11336. 'nd_reagent_id' => array(
  11337. 'size' => 'big',
  11338. 'type' => 'serial',
  11339. 'not null' => TRUE,
  11340. ),
  11341. 'name' => array(
  11342. 'size' => 'normal',
  11343. 'type' => 'varchar',
  11344. 'length' => '80',
  11345. 'not null' => TRUE,
  11346. ),
  11347. 'type_id' => array(
  11348. 'size' => 'big',
  11349. 'type' => 'int',
  11350. 'not null' => TRUE,
  11351. ),
  11352. 'feature_id' => array(
  11353. 'size' => 'big',
  11354. 'type' => 'int',
  11355. 'not null' => FALSE,
  11356. ),
  11357. ),
  11358. 'indexes' => array(
  11359. 'nd_reagent_idx1' => array(
  11360. 0 => 'type_id',
  11361. ),
  11362. 'nd_reagent_idx2' => array(
  11363. 0 => 'feature_id',
  11364. ),
  11365. ),
  11366. 'primary key' => array(
  11367. 0 => 'nd_reagent_id',
  11368. ),
  11369. 'foreign keys' => array(
  11370. 'cvterm' => array(
  11371. 'table' => 'cvterm',
  11372. 'columns' => array(
  11373. 'type_id' => 'cvterm_id',
  11374. ),
  11375. ),
  11376. 'feature' => array(
  11377. 'table' => 'feature',
  11378. 'columns' => array(
  11379. 'feature_id' => 'feature_id',
  11380. ),
  11381. ),
  11382. ),
  11383. 'referring_tables' => array(
  11384. 0 => 'nd_protocol_reagent',
  11385. 1 => 'nd_reagentprop',
  11386. 2 => 'nd_reagent_relationship',
  11387. ),
  11388. );
  11389. return $description;
  11390. }
  11391. /**
  11392. * Implements hook_chado_schema_v1_3_nd_reagentprop()
  11393. *
  11394. * Purpose: To describe the structure of 'nd_reagentprop' to tripal
  11395. * @see chado_insert_record()
  11396. * @see chado_update_record()
  11397. * @see chado_select_record()
  11398. * @see chado_generate_var()
  11399. * @see chado_expan_var()
  11400. *
  11401. * @return
  11402. * An array describing the 'nd_reagentprop' table
  11403. *
  11404. * @ingroup tripal_chado_v1.3_schema_api
  11405. *
  11406. */
  11407. function tripal_chado_chado_schema_v1_3_nd_reagentprop() {
  11408. $description = array(
  11409. 'description' => '',
  11410. 'table' => 'nd_reagentprop',
  11411. 'fields' => array(
  11412. 'nd_reagentprop_id' => array(
  11413. 'size' => 'big',
  11414. 'type' => 'serial',
  11415. 'not null' => TRUE,
  11416. ),
  11417. 'nd_reagent_id' => array(
  11418. 'size' => 'big',
  11419. 'type' => 'int',
  11420. 'not null' => TRUE,
  11421. ),
  11422. 'type_id' => array(
  11423. 'size' => 'big',
  11424. 'type' => 'int',
  11425. 'not null' => TRUE,
  11426. ),
  11427. 'value' => array(
  11428. 'size' => 'normal',
  11429. 'type' => 'text',
  11430. 'not null' => FALSE,
  11431. ),
  11432. 'rank' => array(
  11433. 'size' => 'normal',
  11434. 'type' => 'int',
  11435. 'not null' => TRUE,
  11436. 'default' => 0,
  11437. ),
  11438. ),
  11439. 'unique keys' => array(
  11440. 'nd_reagentprop_c1' => array(
  11441. 0 => 'nd_reagent_id',
  11442. 1 => 'type_id',
  11443. 2 => 'rank',
  11444. ),
  11445. ),
  11446. 'indexes' => array(
  11447. 'nd_reagentprop_idx1' => array(
  11448. 0 => 'nd_reagent_id',
  11449. ),
  11450. 'nd_reagentprop_idx2' => array(
  11451. 0 => 'type_id',
  11452. ),
  11453. ),
  11454. 'primary key' => array(
  11455. 0 => 'nd_reagentprop_id',
  11456. ),
  11457. 'foreign keys' => array(
  11458. 'nd_reagent' => array(
  11459. 'table' => 'nd_reagent',
  11460. 'columns' => array(
  11461. 'nd_reagent_id' => 'nd_reagent_id',
  11462. ),
  11463. ),
  11464. 'cvterm' => array(
  11465. 'table' => 'cvterm',
  11466. 'columns' => array(
  11467. 'type_id' => 'cvterm_id',
  11468. ),
  11469. ),
  11470. ),
  11471. 'referring_tables' => array(
  11472. ),
  11473. );
  11474. return $description;
  11475. }
  11476. /**
  11477. * Implements hook_chado_schema_v1_3_nd_reagent_relationship()
  11478. *
  11479. * Purpose: To describe the structure of 'nd_reagent_relationship' to tripal
  11480. * @see chado_insert_record()
  11481. * @see chado_update_record()
  11482. * @see chado_select_record()
  11483. * @see chado_generate_var()
  11484. * @see chado_expan_var()
  11485. *
  11486. * @return
  11487. * An array describing the 'nd_reagent_relationship' table
  11488. *
  11489. * @ingroup tripal_chado_v1.3_schema_api
  11490. *
  11491. */
  11492. function tripal_chado_chado_schema_v1_3_nd_reagent_relationship() {
  11493. $description = array(
  11494. 'description' => '',
  11495. 'table' => 'nd_reagent_relationship',
  11496. 'fields' => array(
  11497. 'nd_reagent_relationship_id' => array(
  11498. 'size' => 'big',
  11499. 'type' => 'serial',
  11500. 'not null' => TRUE,
  11501. ),
  11502. 'subject_reagent_id' => array(
  11503. 'size' => 'big',
  11504. 'type' => 'int',
  11505. 'not null' => TRUE,
  11506. ),
  11507. 'object_reagent_id' => array(
  11508. 'size' => 'big',
  11509. 'type' => 'int',
  11510. 'not null' => TRUE,
  11511. ),
  11512. 'type_id' => array(
  11513. 'size' => 'big',
  11514. 'type' => 'int',
  11515. 'not null' => TRUE,
  11516. ),
  11517. ),
  11518. 'indexes' => array(
  11519. 'nd_reagent_relationship_idx1' => array(
  11520. 0 => 'subject_reagent_id',
  11521. ),
  11522. 'nd_reagent_relationship_idx2' => array(
  11523. 0 => 'object_reagent_id',
  11524. ),
  11525. 'nd_reagent_relationship_idx3' => array(
  11526. 0 => 'type_id',
  11527. ),
  11528. ),
  11529. 'primary key' => array(
  11530. 0 => 'nd_reagent_relationship_id',
  11531. ),
  11532. 'foreign keys' => array(
  11533. 'nd_reagent' => array(
  11534. 'table' => 'nd_reagent',
  11535. 'columns' => array(
  11536. 'subject_reagent_id' => 'nd_reagent_id',
  11537. 'object_reagent_id' => 'nd_reagent_id',
  11538. ),
  11539. ),
  11540. 'cvterm' => array(
  11541. 'table' => 'cvterm',
  11542. 'columns' => array(
  11543. 'type_id' => 'cvterm_id',
  11544. ),
  11545. ),
  11546. ),
  11547. 'referring_tables' => array(
  11548. ),
  11549. );
  11550. return $description;
  11551. }
  11552. /**
  11553. * Implements hook_chado_schema_v1_3_organism()
  11554. *
  11555. * Purpose: To describe the structure of 'organism' to tripal
  11556. * @see chado_insert_record()
  11557. * @see chado_update_record()
  11558. * @see chado_select_record()
  11559. * @see chado_generate_var()
  11560. * @see chado_expan_var()
  11561. *
  11562. * @return
  11563. * An array describing the 'organism' table
  11564. *
  11565. * @ingroup tripal_chado_v1.3_schema_api
  11566. *
  11567. */
  11568. function tripal_chado_chado_schema_v1_3_organism() {
  11569. $description = array(
  11570. 'description' => '',
  11571. 'table' => 'organism',
  11572. 'fields' => array(
  11573. 'organism_id' => array(
  11574. 'size' => 'big',
  11575. 'type' => 'serial',
  11576. 'not null' => TRUE,
  11577. ),
  11578. 'abbreviation' => array(
  11579. 'size' => 'normal',
  11580. 'type' => 'varchar',
  11581. 'length' => '255',
  11582. 'not null' => FALSE,
  11583. ),
  11584. 'genus' => array(
  11585. 'size' => 'normal',
  11586. 'type' => 'varchar',
  11587. 'length' => '255',
  11588. 'not null' => TRUE,
  11589. ),
  11590. 'species' => array(
  11591. 'size' => 'normal',
  11592. 'type' => 'varchar',
  11593. 'length' => '255',
  11594. 'not null' => TRUE,
  11595. ),
  11596. 'common_name' => array(
  11597. 'size' => 'normal',
  11598. 'type' => 'varchar',
  11599. 'length' => '255',
  11600. 'not null' => FALSE,
  11601. ),
  11602. 'infraspecific_name' => array(
  11603. 'size' => 'normal',
  11604. 'type' => 'varchar',
  11605. 'length' => '1024',
  11606. 'not null' => FALSE,
  11607. ),
  11608. 'type_id' => array(
  11609. 'size' => 'big',
  11610. 'type' => 'int',
  11611. 'not null' => FALSE,
  11612. ),
  11613. 'comment' => array(
  11614. 'size' => 'normal',
  11615. 'type' => 'text',
  11616. 'not null' => FALSE,
  11617. ),
  11618. ),
  11619. 'unique keys' => array(
  11620. 'organism_c1' => array(
  11621. 0 => 'genus',
  11622. 1 => 'species',
  11623. 2 => 'type_id',
  11624. 3 => 'infraspecific_name',
  11625. ),
  11626. ),
  11627. 'primary key' => array(
  11628. 0 => 'organism_id',
  11629. ),
  11630. 'foreign keys' => array(
  11631. 'cvterm' => array(
  11632. 'table' => 'cvterm',
  11633. 'columns' => array(
  11634. 'type_id' => 'cvterm_id',
  11635. ),
  11636. ),
  11637. ),
  11638. 'referring_tables' => array(
  11639. 0 => 'analysis_organism',
  11640. 1 => 'biomaterial',
  11641. 2 => 'cell_line',
  11642. 3 => 'feature',
  11643. 4 => 'featuremap_organism',
  11644. 5 => 'library',
  11645. 6 => 'organism_cvterm',
  11646. 7 => 'organism_dbxref',
  11647. 8 => 'organismprop',
  11648. 9 => 'organism_pub',
  11649. 10 => 'organism_relationship',
  11650. 12 => 'phenotype_comparison',
  11651. 13 => 'phylonode_organism',
  11652. 14 => 'stock',
  11653. ),
  11654. );
  11655. return $description;
  11656. }
  11657. /**
  11658. * Implements hook_chado_schema_v1_3_organism_cvterm()
  11659. *
  11660. * Purpose: To describe the structure of 'organism_cvterm' to tripal
  11661. * @see chado_insert_record()
  11662. * @see chado_update_record()
  11663. * @see chado_select_record()
  11664. * @see chado_generate_var()
  11665. * @see chado_expan_var()
  11666. *
  11667. * @return
  11668. * An array describing the 'organism_cvterm' table
  11669. *
  11670. * @ingroup tripal_chado_v1.3_schema_api
  11671. *
  11672. */
  11673. function tripal_chado_chado_schema_v1_3_organism_cvterm() {
  11674. $description = array(
  11675. 'description' => '',
  11676. 'table' => 'organism_cvterm',
  11677. 'fields' => array(
  11678. 'organism_cvterm_id' => array(
  11679. 'size' => 'big',
  11680. 'type' => 'serial',
  11681. 'not null' => TRUE,
  11682. ),
  11683. 'organism_id' => array(
  11684. 'size' => 'big',
  11685. 'type' => 'int',
  11686. 'not null' => TRUE,
  11687. ),
  11688. 'cvterm_id' => array(
  11689. 'size' => 'big',
  11690. 'type' => 'int',
  11691. 'not null' => TRUE,
  11692. ),
  11693. 'rank' => array(
  11694. 'size' => 'normal',
  11695. 'type' => 'int',
  11696. 'not null' => TRUE,
  11697. 'default' => 0,
  11698. ),
  11699. 'pub_id' => array(
  11700. 'size' => 'big',
  11701. 'type' => 'int',
  11702. 'not null' => TRUE,
  11703. ),
  11704. ),
  11705. 'unique keys' => array(
  11706. 'organism_cvterm_c1' => array(
  11707. 0 => 'organism_id',
  11708. 1 => 'cvterm_id',
  11709. 2 => 'pub_id',
  11710. ),
  11711. ),
  11712. 'indexes' => array(
  11713. 'organism_cvterm_idx1' => array(
  11714. 0 => 'organism_id',
  11715. ),
  11716. 'organism_cvterm_idx2' => array(
  11717. 0 => 'cvterm_id',
  11718. ),
  11719. ),
  11720. 'primary key' => array(
  11721. 0 => 'organism_cvterm_id',
  11722. ),
  11723. 'foreign keys' => array(
  11724. 'organism' => array(
  11725. 'table' => 'organism',
  11726. 'columns' => array(
  11727. 'organism_id' => 'organism_id',
  11728. ),
  11729. ),
  11730. 'cvterm' => array(
  11731. 'table' => 'cvterm',
  11732. 'columns' => array(
  11733. 'cvterm_id' => 'cvterm_id',
  11734. ),
  11735. ),
  11736. 'pub' => array(
  11737. 'table' => 'pub',
  11738. 'columns' => array(
  11739. 'pub_id' => 'pub_id',
  11740. ),
  11741. ),
  11742. ),
  11743. 'referring_tables' => array(
  11744. 0 => 'organism_cvtermprop',
  11745. ),
  11746. );
  11747. return $description;
  11748. }
  11749. /**
  11750. * Implements hook_chado_schema_v1_3_organism_cvtermprop()
  11751. *
  11752. * Purpose: To describe the structure of 'organism_cvtermprop' to tripal
  11753. * @see chado_insert_record()
  11754. * @see chado_update_record()
  11755. * @see chado_select_record()
  11756. * @see chado_generate_var()
  11757. * @see chado_expan_var()
  11758. *
  11759. * @return
  11760. * An array describing the 'organism_cvtermprop' table
  11761. *
  11762. * @ingroup tripal_chado_v1.3_schema_api
  11763. *
  11764. */
  11765. function tripal_chado_chado_schema_v1_3_organism_cvtermprop() {
  11766. $description = array(
  11767. 'description' => '',
  11768. 'table' => 'organism_cvtermprop',
  11769. 'fields' => array(
  11770. 'organism_cvtermprop_id' => array(
  11771. 'size' => 'big',
  11772. 'type' => 'serial',
  11773. 'not null' => TRUE,
  11774. ),
  11775. 'organism_cvterm_id' => array(
  11776. 'size' => 'big',
  11777. 'type' => 'int',
  11778. 'not null' => TRUE,
  11779. ),
  11780. 'type_id' => array(
  11781. 'size' => 'big',
  11782. 'type' => 'int',
  11783. 'not null' => TRUE,
  11784. ),
  11785. 'value' => array(
  11786. 'size' => 'normal',
  11787. 'type' => 'text',
  11788. 'not null' => FALSE,
  11789. ),
  11790. 'rank' => array(
  11791. 'size' => 'normal',
  11792. 'type' => 'int',
  11793. 'not null' => TRUE,
  11794. 'default' => 0,
  11795. ),
  11796. ),
  11797. 'unique keys' => array(
  11798. 'organism_cvtermprop_c1' => array(
  11799. 0 => 'organism_cvterm_id',
  11800. 1 => 'type_id',
  11801. 2 => 'rank',
  11802. ),
  11803. ),
  11804. 'indexes' => array(
  11805. 'organism_cvtermprop_idx1' => array(
  11806. 0 => 'organism_cvterm_id',
  11807. ),
  11808. 'organism_cvtermprop_idx2' => array(
  11809. 0 => 'type_id',
  11810. ),
  11811. ),
  11812. 'primary key' => array(
  11813. 0 => 'organism_cvtermprop_id',
  11814. ),
  11815. 'foreign keys' => array(
  11816. 'organism_cvterm' => array(
  11817. 'table' => 'organism_cvterm',
  11818. 'columns' => array(
  11819. 'organism_cvterm_id' => 'organism_cvterm_id',
  11820. ),
  11821. ),
  11822. 'cvterm' => array(
  11823. 'table' => 'cvterm',
  11824. 'columns' => array(
  11825. 'type_id' => 'cvterm_id',
  11826. ),
  11827. ),
  11828. ),
  11829. 'referring_tables' => array(
  11830. ),
  11831. );
  11832. return $description;
  11833. }
  11834. /**
  11835. * Implements hook_chado_schema_v1_3_organism_dbxref()
  11836. *
  11837. * Purpose: To describe the structure of 'organism_dbxref' to tripal
  11838. * @see chado_insert_record()
  11839. * @see chado_update_record()
  11840. * @see chado_select_record()
  11841. * @see chado_generate_var()
  11842. * @see chado_expan_var()
  11843. *
  11844. * @return
  11845. * An array describing the 'organism_dbxref' table
  11846. *
  11847. * @ingroup tripal_chado_v1.3_schema_api
  11848. *
  11849. */
  11850. function tripal_chado_chado_schema_v1_3_organism_dbxref() {
  11851. $description = array(
  11852. 'description' => '',
  11853. 'table' => 'organism_dbxref',
  11854. 'fields' => array(
  11855. 'organism_dbxref_id' => array(
  11856. 'size' => 'big',
  11857. 'type' => 'serial',
  11858. 'not null' => TRUE,
  11859. ),
  11860. 'organism_id' => array(
  11861. 'size' => 'big',
  11862. 'type' => 'int',
  11863. 'not null' => TRUE,
  11864. ),
  11865. 'dbxref_id' => array(
  11866. 'size' => 'big',
  11867. 'type' => 'int',
  11868. 'not null' => TRUE,
  11869. ),
  11870. ),
  11871. 'unique keys' => array(
  11872. 'organism_dbxref_c1' => array(
  11873. 0 => 'organism_id',
  11874. 1 => 'dbxref_id',
  11875. ),
  11876. ),
  11877. 'indexes' => array(
  11878. 'organism_dbxref_idx1' => array(
  11879. 0 => 'organism_id',
  11880. ),
  11881. 'organism_dbxref_idx2' => array(
  11882. 0 => 'dbxref_id',
  11883. ),
  11884. ),
  11885. 'primary key' => array(
  11886. 0 => 'organism_dbxref_id',
  11887. ),
  11888. 'foreign keys' => array(
  11889. 'organism' => array(
  11890. 'table' => 'organism',
  11891. 'columns' => array(
  11892. 'organism_id' => 'organism_id',
  11893. ),
  11894. ),
  11895. 'dbxref' => array(
  11896. 'table' => 'dbxref',
  11897. 'columns' => array(
  11898. 'dbxref_id' => 'dbxref_id',
  11899. ),
  11900. ),
  11901. ),
  11902. 'referring_tables' => array(
  11903. ),
  11904. );
  11905. return $description;
  11906. }
  11907. /**
  11908. * Implements hook_chado_schema_v1_3_organism_feature_count()
  11909. *
  11910. * Purpose: To describe the structure of 'organism_feature_count' to tripal
  11911. * @see chado_insert_record()
  11912. * @see chado_update_record()
  11913. * @see chado_select_record()
  11914. * @see chado_generate_var()
  11915. * @see chado_expan_var()
  11916. *
  11917. * @return
  11918. * An array describing the 'organism_feature_count' table
  11919. *
  11920. * @ingroup tripal_chado_v1.3_schema_api
  11921. *
  11922. */
  11923. function tripal_chado_chado_schema_v1_3_organism_feature_count() {
  11924. $description = array(
  11925. 'description' => '',
  11926. 'table' => 'organism_feature_count',
  11927. 'fields' => array(
  11928. 'organism_id' => array(
  11929. 'size' => 'normal',
  11930. 'type' => 'int',
  11931. 'not null' => TRUE,
  11932. ),
  11933. 'genus' => array(
  11934. 'size' => 'normal',
  11935. 'type' => 'varchar',
  11936. 'length' => '255',
  11937. 'not null' => TRUE,
  11938. ),
  11939. 'species' => array(
  11940. 'size' => 'normal',
  11941. 'type' => 'varchar',
  11942. 'length' => '255',
  11943. 'not null' => TRUE,
  11944. ),
  11945. 'common_name' => array(
  11946. 'size' => 'normal',
  11947. 'type' => 'varchar',
  11948. 'length' => '255',
  11949. 'not null' => FALSE,
  11950. ),
  11951. 'num_features' => array(
  11952. 'size' => 'normal',
  11953. 'type' => 'int',
  11954. 'not null' => TRUE,
  11955. ),
  11956. 'cvterm_id' => array(
  11957. 'size' => 'normal',
  11958. 'type' => 'int',
  11959. 'not null' => TRUE,
  11960. ),
  11961. 'feature_type' => array(
  11962. 'size' => 'normal',
  11963. 'type' => 'varchar',
  11964. 'length' => '255',
  11965. 'not null' => TRUE,
  11966. ),
  11967. ),
  11968. 'indexes' => array(
  11969. 'organism_feature_count_idx1' => array(
  11970. 0 => 'organism_id',
  11971. ),
  11972. 'organism_feature_count_idx2' => array(
  11973. 0 => 'cvterm_id',
  11974. ),
  11975. 'organism_feature_count_idx3' => array(
  11976. 0 => 'feature_type',
  11977. ),
  11978. ),
  11979. 'foreign keys' => array(
  11980. ),
  11981. 'referring_tables' => array(
  11982. ),
  11983. );
  11984. return $description;
  11985. }
  11986. /**
  11987. * Implements hook_chado_schema_v1_3_organismprop()
  11988. *
  11989. * Purpose: To describe the structure of 'organismprop' to tripal
  11990. * @see chado_insert_record()
  11991. * @see chado_update_record()
  11992. * @see chado_select_record()
  11993. * @see chado_generate_var()
  11994. * @see chado_expan_var()
  11995. *
  11996. * @return
  11997. * An array describing the 'organismprop' table
  11998. *
  11999. * @ingroup tripal_chado_v1.3_schema_api
  12000. *
  12001. */
  12002. function tripal_chado_chado_schema_v1_3_organismprop() {
  12003. $description = array(
  12004. 'description' => '',
  12005. 'table' => 'organismprop',
  12006. 'fields' => array(
  12007. 'organismprop_id' => array(
  12008. 'size' => 'big',
  12009. 'type' => 'serial',
  12010. 'not null' => TRUE,
  12011. ),
  12012. 'organism_id' => array(
  12013. 'size' => 'big',
  12014. 'type' => 'int',
  12015. 'not null' => TRUE,
  12016. ),
  12017. 'type_id' => array(
  12018. 'size' => 'big',
  12019. 'type' => 'int',
  12020. 'not null' => TRUE,
  12021. ),
  12022. 'value' => array(
  12023. 'size' => 'normal',
  12024. 'type' => 'text',
  12025. 'not null' => FALSE,
  12026. ),
  12027. 'rank' => array(
  12028. 'size' => 'normal',
  12029. 'type' => 'int',
  12030. 'not null' => TRUE,
  12031. 'default' => 0,
  12032. ),
  12033. ),
  12034. 'unique keys' => array(
  12035. 'organismprop_c1' => array(
  12036. 0 => 'organism_id',
  12037. 1 => 'type_id',
  12038. 2 => 'rank',
  12039. ),
  12040. ),
  12041. 'indexes' => array(
  12042. 'organismprop_idx1' => array(
  12043. 0 => 'organism_id',
  12044. ),
  12045. 'organismprop_idx2' => array(
  12046. 0 => 'type_id',
  12047. ),
  12048. ),
  12049. 'primary key' => array(
  12050. 0 => 'organismprop_id',
  12051. ),
  12052. 'foreign keys' => array(
  12053. 'organism' => array(
  12054. 'table' => 'organism',
  12055. 'columns' => array(
  12056. 'organism_id' => 'organism_id',
  12057. ),
  12058. ),
  12059. 'cvterm' => array(
  12060. 'table' => 'cvterm',
  12061. 'columns' => array(
  12062. 'type_id' => 'cvterm_id',
  12063. ),
  12064. ),
  12065. ),
  12066. 'referring_tables' => array(
  12067. 0 => 'organismprop_pub',
  12068. ),
  12069. );
  12070. return $description;
  12071. }
  12072. /**
  12073. * Implements hook_chado_schema_v1_3_organismprop_pub()
  12074. *
  12075. * Purpose: To describe the structure of 'organismprop_pub' to tripal
  12076. * @see chado_insert_record()
  12077. * @see chado_update_record()
  12078. * @see chado_select_record()
  12079. * @see chado_generate_var()
  12080. * @see chado_expan_var()
  12081. *
  12082. * @return
  12083. * An array describing the 'organismprop_pub' table
  12084. *
  12085. * @ingroup tripal_chado_v1.3_schema_api
  12086. *
  12087. */
  12088. function tripal_chado_chado_schema_v1_3_organismprop_pub() {
  12089. $description = array(
  12090. 'description' => '',
  12091. 'table' => 'organismprop_pub',
  12092. 'fields' => array(
  12093. 'organismprop_pub_id' => array(
  12094. 'size' => 'big',
  12095. 'type' => 'serial',
  12096. 'not null' => TRUE,
  12097. ),
  12098. 'organismprop_id' => array(
  12099. 'size' => 'big',
  12100. 'type' => 'int',
  12101. 'not null' => TRUE,
  12102. ),
  12103. 'pub_id' => array(
  12104. 'size' => 'big',
  12105. 'type' => 'int',
  12106. 'not null' => TRUE,
  12107. ),
  12108. 'value' => array(
  12109. 'size' => 'normal',
  12110. 'type' => 'text',
  12111. 'not null' => FALSE,
  12112. ),
  12113. 'rank' => array(
  12114. 'size' => 'normal',
  12115. 'type' => 'int',
  12116. 'not null' => TRUE,
  12117. 'default' => 0,
  12118. ),
  12119. ),
  12120. 'unique keys' => array(
  12121. 'organismprop_pub_c1' => array(
  12122. 0 => 'organismprop_id',
  12123. 1 => 'pub_id',
  12124. ),
  12125. ),
  12126. 'indexes' => array(
  12127. 'organismprop_pub_idx1' => array(
  12128. 0 => 'organismprop_id',
  12129. ),
  12130. 'organismprop_pub_idx2' => array(
  12131. 0 => 'pub_id',
  12132. ),
  12133. ),
  12134. 'primary key' => array(
  12135. 0 => 'organismprop_pub_id',
  12136. ),
  12137. 'foreign keys' => array(
  12138. 'organismprop' => array(
  12139. 'table' => 'organismprop',
  12140. 'columns' => array(
  12141. 'organismprop_id' => 'organismprop_id',
  12142. ),
  12143. ),
  12144. 'pub' => array(
  12145. 'table' => 'pub',
  12146. 'columns' => array(
  12147. 'pub_id' => 'pub_id',
  12148. ),
  12149. ),
  12150. ),
  12151. 'referring_tables' => array(
  12152. ),
  12153. );
  12154. return $description;
  12155. }
  12156. /**
  12157. * Implements hook_chado_schema_v1_3_organism_pub()
  12158. *
  12159. * Purpose: To describe the structure of 'organism_pub' to tripal
  12160. * @see chado_insert_record()
  12161. * @see chado_update_record()
  12162. * @see chado_select_record()
  12163. * @see chado_generate_var()
  12164. * @see chado_expan_var()
  12165. *
  12166. * @return
  12167. * An array describing the 'organism_pub' table
  12168. *
  12169. * @ingroup tripal_chado_v1.3_schema_api
  12170. *
  12171. */
  12172. function tripal_chado_chado_schema_v1_3_organism_pub() {
  12173. $description = array(
  12174. 'description' => '',
  12175. 'table' => 'organism_pub',
  12176. 'fields' => array(
  12177. 'organism_pub_id' => array(
  12178. 'size' => 'big',
  12179. 'type' => 'serial',
  12180. 'not null' => TRUE,
  12181. ),
  12182. 'organism_id' => array(
  12183. 'size' => 'big',
  12184. 'type' => 'int',
  12185. 'not null' => TRUE,
  12186. ),
  12187. 'pub_id' => array(
  12188. 'size' => 'big',
  12189. 'type' => 'int',
  12190. 'not null' => TRUE,
  12191. ),
  12192. ),
  12193. 'unique keys' => array(
  12194. 'organism_pub_c1' => array(
  12195. 0 => 'organism_id',
  12196. 1 => 'pub_id',
  12197. ),
  12198. ),
  12199. 'indexes' => array(
  12200. 'organism_pub_idx1' => array(
  12201. 0 => 'organism_id',
  12202. ),
  12203. 'organism_pub_idx2' => array(
  12204. 0 => 'pub_id',
  12205. ),
  12206. ),
  12207. 'primary key' => array(
  12208. 0 => 'organism_pub_id',
  12209. ),
  12210. 'foreign keys' => array(
  12211. 'organism' => array(
  12212. 'table' => 'organism',
  12213. 'columns' => array(
  12214. 'organism_id' => 'organism_id',
  12215. ),
  12216. ),
  12217. 'pub' => array(
  12218. 'table' => 'pub',
  12219. 'columns' => array(
  12220. 'pub_id' => 'pub_id',
  12221. ),
  12222. ),
  12223. ),
  12224. 'referring_tables' => array(
  12225. ),
  12226. );
  12227. return $description;
  12228. }
  12229. /**
  12230. * Implements hook_chado_schema_v1_3_organism_relationship()
  12231. *
  12232. * Purpose: To describe the structure of 'organism_relationship' to tripal
  12233. * @see chado_insert_record()
  12234. * @see chado_update_record()
  12235. * @see chado_select_record()
  12236. * @see chado_generate_var()
  12237. * @see chado_expan_var()
  12238. *
  12239. * @return
  12240. * An array describing the 'organism_relationship' table
  12241. *
  12242. * @ingroup tripal_chado_v1.3_schema_api
  12243. *
  12244. */
  12245. function tripal_chado_chado_schema_v1_3_organism_relationship() {
  12246. $description = array(
  12247. 'description' => '',
  12248. 'table' => 'organism_relationship',
  12249. 'fields' => array(
  12250. 'organism_relationship_id' => array(
  12251. 'size' => 'big',
  12252. 'type' => 'serial',
  12253. 'not null' => TRUE,
  12254. ),
  12255. 'subject_id' => array(
  12256. 'size' => 'big',
  12257. 'type' => 'int',
  12258. 'not null' => TRUE,
  12259. ),
  12260. 'object_id' => array(
  12261. 'size' => 'big',
  12262. 'type' => 'int',
  12263. 'not null' => TRUE,
  12264. ),
  12265. 'type_id' => array(
  12266. 'size' => 'big',
  12267. 'type' => 'int',
  12268. 'not null' => TRUE,
  12269. ),
  12270. 'rank' => array(
  12271. 'size' => 'normal',
  12272. 'type' => 'int',
  12273. 'not null' => TRUE,
  12274. 'default' => 0,
  12275. ),
  12276. ),
  12277. 'unique keys' => array(
  12278. 'organism_relationship_c1' => array(
  12279. 0 => 'subject_id',
  12280. 1 => 'object_id',
  12281. 2 => 'type_id',
  12282. 3 => 'rank',
  12283. ),
  12284. ),
  12285. 'indexes' => array(
  12286. 'organism_relationship_idx1' => array(
  12287. 0 => 'subject_id',
  12288. ),
  12289. 'organism_relationship_idx2' => array(
  12290. 0 => 'object_id',
  12291. ),
  12292. 'organism_relationship_idx3' => array(
  12293. 0 => 'type_id',
  12294. ),
  12295. ),
  12296. 'primary key' => array(
  12297. 0 => 'organism_relationship_id',
  12298. ),
  12299. 'foreign keys' => array(
  12300. 'organism' => array(
  12301. 'table' => 'organism',
  12302. 'columns' => array(
  12303. 'object_id' => 'organism_id',
  12304. 'subject_id' => 'organism_id',
  12305. ),
  12306. ),
  12307. 'cvterm' => array(
  12308. 'table' => 'cvterm',
  12309. 'columns' => array(
  12310. 'type_id' => 'cvterm_id',
  12311. ),
  12312. ),
  12313. ),
  12314. 'referring_tables' => array(
  12315. ),
  12316. );
  12317. return $description;
  12318. }
  12319. /**
  12320. * Implements hook_chado_schema_v1_3_phendesc()
  12321. *
  12322. * Purpose: To describe the structure of 'phendesc' to tripal
  12323. * @see chado_insert_record()
  12324. * @see chado_update_record()
  12325. * @see chado_select_record()
  12326. * @see chado_generate_var()
  12327. * @see chado_expan_var()
  12328. *
  12329. * @return
  12330. * An array describing the 'phendesc' table
  12331. *
  12332. * @ingroup tripal_chado_v1.3_schema_api
  12333. *
  12334. */
  12335. function tripal_chado_chado_schema_v1_3_phendesc() {
  12336. $description = array(
  12337. 'description' => '',
  12338. 'table' => 'phendesc',
  12339. 'fields' => array(
  12340. 'phendesc_id' => array(
  12341. 'size' => 'big',
  12342. 'type' => 'serial',
  12343. 'not null' => TRUE,
  12344. ),
  12345. 'genotype_id' => array(
  12346. 'size' => 'big',
  12347. 'type' => 'int',
  12348. 'not null' => TRUE,
  12349. ),
  12350. 'environment_id' => array(
  12351. 'size' => 'big',
  12352. 'type' => 'int',
  12353. 'not null' => TRUE,
  12354. ),
  12355. 'description' => array(
  12356. 'size' => 'normal',
  12357. 'type' => 'text',
  12358. 'not null' => TRUE,
  12359. ),
  12360. 'type_id' => array(
  12361. 'size' => 'big',
  12362. 'type' => 'int',
  12363. 'not null' => TRUE,
  12364. ),
  12365. 'pub_id' => array(
  12366. 'size' => 'big',
  12367. 'type' => 'int',
  12368. 'not null' => TRUE,
  12369. ),
  12370. ),
  12371. 'unique keys' => array(
  12372. 'phendesc_c1' => array(
  12373. 0 => 'genotype_id',
  12374. 1 => 'environment_id',
  12375. 2 => 'type_id',
  12376. 3 => 'pub_id',
  12377. ),
  12378. ),
  12379. 'indexes' => array(
  12380. 'phendesc_idx1' => array(
  12381. 0 => 'genotype_id',
  12382. ),
  12383. 'phendesc_idx2' => array(
  12384. 0 => 'environment_id',
  12385. ),
  12386. 'phendesc_idx3' => array(
  12387. 0 => 'pub_id',
  12388. ),
  12389. ),
  12390. 'primary key' => array(
  12391. 0 => 'phendesc_id',
  12392. ),
  12393. 'foreign keys' => array(
  12394. 'genotype' => array(
  12395. 'table' => 'genotype',
  12396. 'columns' => array(
  12397. 'genotype_id' => 'genotype_id',
  12398. ),
  12399. ),
  12400. 'environment' => array(
  12401. 'table' => 'environment',
  12402. 'columns' => array(
  12403. 'environment_id' => 'environment_id',
  12404. ),
  12405. ),
  12406. 'cvterm' => array(
  12407. 'table' => 'cvterm',
  12408. 'columns' => array(
  12409. 'type_id' => 'cvterm_id',
  12410. ),
  12411. ),
  12412. 'pub' => array(
  12413. 'table' => 'pub',
  12414. 'columns' => array(
  12415. 'pub_id' => 'pub_id',
  12416. ),
  12417. ),
  12418. ),
  12419. 'referring_tables' => array(
  12420. ),
  12421. );
  12422. return $description;
  12423. }
  12424. /**
  12425. * Implements hook_chado_schema_v1_3_phenotype()
  12426. *
  12427. * Purpose: To describe the structure of 'phenotype' to tripal
  12428. * @see chado_insert_record()
  12429. * @see chado_update_record()
  12430. * @see chado_select_record()
  12431. * @see chado_generate_var()
  12432. * @see chado_expan_var()
  12433. *
  12434. * @return
  12435. * An array describing the 'phenotype' table
  12436. *
  12437. * @ingroup tripal_chado_v1.3_schema_api
  12438. *
  12439. */
  12440. function tripal_chado_chado_schema_v1_3_phenotype() {
  12441. $description = array(
  12442. 'description' => '',
  12443. 'table' => 'phenotype',
  12444. 'fields' => array(
  12445. 'phenotype_id' => array(
  12446. 'size' => 'big',
  12447. 'type' => 'serial',
  12448. 'not null' => TRUE,
  12449. ),
  12450. 'uniquename' => array(
  12451. 'size' => 'normal',
  12452. 'type' => 'text',
  12453. 'not null' => TRUE,
  12454. ),
  12455. 'name' => array(
  12456. 'size' => 'normal',
  12457. 'type' => 'text',
  12458. 'not null' => FALSE,
  12459. ),
  12460. 'observable_id' => array(
  12461. 'size' => 'big',
  12462. 'type' => 'int',
  12463. 'not null' => FALSE,
  12464. ),
  12465. 'attr_id' => array(
  12466. 'size' => 'big',
  12467. 'type' => 'int',
  12468. 'not null' => FALSE,
  12469. ),
  12470. 'value' => array(
  12471. 'size' => 'normal',
  12472. 'type' => 'text',
  12473. 'not null' => FALSE,
  12474. ),
  12475. 'cvalue_id' => array(
  12476. 'size' => 'big',
  12477. 'type' => 'int',
  12478. 'not null' => FALSE,
  12479. ),
  12480. 'assay_id' => array(
  12481. 'size' => 'big',
  12482. 'type' => 'int',
  12483. 'not null' => FALSE,
  12484. ),
  12485. ),
  12486. 'unique keys' => array(
  12487. 'phenotype_c1' => array(
  12488. 0 => 'uniquename',
  12489. ),
  12490. ),
  12491. 'indexes' => array(
  12492. 'phenotype_idx1' => array(
  12493. 0 => 'cvalue_id',
  12494. ),
  12495. 'phenotype_idx2' => array(
  12496. 0 => 'observable_id',
  12497. ),
  12498. 'phenotype_idx3' => array(
  12499. 0 => 'attr_id',
  12500. ),
  12501. ),
  12502. 'primary key' => array(
  12503. 0 => 'phenotype_id',
  12504. ),
  12505. 'foreign keys' => array(
  12506. 'cvterm' => array(
  12507. 'table' => 'cvterm',
  12508. 'columns' => array(
  12509. 'observable_id' => 'cvterm_id',
  12510. 'attr_id' => 'cvterm_id',
  12511. 'cvalue_id' => 'cvterm_id',
  12512. 'assay_id' => 'cvterm_id',
  12513. ),
  12514. ),
  12515. ),
  12516. 'referring_tables' => array(
  12517. 0 => 'feature_phenotype',
  12518. 1 => 'nd_experiment_phenotype',
  12519. 2 => 'phenotype_comparison',
  12520. 4 => 'phenotype_cvterm',
  12521. 5 => 'phenotypeprop',
  12522. 6 => 'phenstatement',
  12523. ),
  12524. );
  12525. return $description;
  12526. }
  12527. /**
  12528. * Implements hook_chado_schema_v1_3_phenotype_comparison()
  12529. *
  12530. * Purpose: To describe the structure of 'phenotype_comparison' to tripal
  12531. * @see chado_insert_record()
  12532. * @see chado_update_record()
  12533. * @see chado_select_record()
  12534. * @see chado_generate_var()
  12535. * @see chado_expan_var()
  12536. *
  12537. * @return
  12538. * An array describing the 'phenotype_comparison' table
  12539. *
  12540. * @ingroup tripal_chado_v1.3_schema_api
  12541. *
  12542. */
  12543. function tripal_chado_chado_schema_v1_3_phenotype_comparison() {
  12544. $description = array(
  12545. 'description' => '',
  12546. 'table' => 'phenotype_comparison',
  12547. 'fields' => array(
  12548. 'phenotype_comparison_id' => array(
  12549. 'size' => 'big',
  12550. 'type' => 'serial',
  12551. 'not null' => TRUE,
  12552. ),
  12553. 'genotype1_id' => array(
  12554. 'size' => 'big',
  12555. 'type' => 'int',
  12556. 'not null' => TRUE,
  12557. ),
  12558. 'environment1_id' => array(
  12559. 'size' => 'big',
  12560. 'type' => 'int',
  12561. 'not null' => TRUE,
  12562. ),
  12563. 'genotype2_id' => array(
  12564. 'size' => 'big',
  12565. 'type' => 'int',
  12566. 'not null' => TRUE,
  12567. ),
  12568. 'environment2_id' => array(
  12569. 'size' => 'big',
  12570. 'type' => 'int',
  12571. 'not null' => TRUE,
  12572. ),
  12573. 'phenotype1_id' => array(
  12574. 'size' => 'big',
  12575. 'type' => 'int',
  12576. 'not null' => TRUE,
  12577. ),
  12578. 'phenotype2_id' => array(
  12579. 'size' => 'big',
  12580. 'type' => 'int',
  12581. 'not null' => FALSE,
  12582. ),
  12583. 'pub_id' => array(
  12584. 'size' => 'big',
  12585. 'type' => 'int',
  12586. 'not null' => TRUE,
  12587. ),
  12588. 'organism_id' => array(
  12589. 'size' => 'big',
  12590. 'type' => 'int',
  12591. 'not null' => TRUE,
  12592. ),
  12593. ),
  12594. 'unique keys' => array(
  12595. 'phenotype_comparison_c1' => array(
  12596. 0 => 'genotype1_id',
  12597. 1 => 'environment1_id',
  12598. 2 => 'genotype2_id',
  12599. 3 => 'environment2_id',
  12600. 4 => 'phenotype1_id',
  12601. 5 => 'pub_id',
  12602. ),
  12603. ),
  12604. 'indexes' => array(
  12605. 'phenotype_comparison_idx1' => array(
  12606. 0 => 'genotype1_id',
  12607. ),
  12608. 'phenotype_comparison_idx2' => array(
  12609. 0 => 'genotype2_id',
  12610. ),
  12611. 'phenotype_comparison_idx4' => array(
  12612. 0 => 'pub_id',
  12613. ),
  12614. ),
  12615. 'primary key' => array(
  12616. 0 => 'phenotype_comparison_id',
  12617. ),
  12618. 'foreign keys' => array(
  12619. 'genotype' => array(
  12620. 'table' => 'genotype',
  12621. 'columns' => array(
  12622. 'genotype1_id' => 'genotype_id',
  12623. 'genotype2_id' => 'genotype_id',
  12624. ),
  12625. ),
  12626. 'environment' => array(
  12627. 'table' => 'environment',
  12628. 'columns' => array(
  12629. 'environment1_id' => 'environment_id',
  12630. 'environment2_id' => 'environment_id',
  12631. ),
  12632. ),
  12633. 'phenotype' => array(
  12634. 'table' => 'phenotype',
  12635. 'columns' => array(
  12636. 'phenotype1_id' => 'phenotype_id',
  12637. 'phenotype2_id' => 'phenotype_id',
  12638. ),
  12639. ),
  12640. 'pub' => array(
  12641. 'table' => 'pub',
  12642. 'columns' => array(
  12643. 'pub_id' => 'pub_id',
  12644. ),
  12645. ),
  12646. 'organism' => array(
  12647. 'table' => 'organism',
  12648. 'columns' => array(
  12649. 'organism_id' => 'organism_id',
  12650. ),
  12651. ),
  12652. ),
  12653. 'referring_tables' => array(
  12654. 0 => 'phenotype_comparison_cvterm',
  12655. ),
  12656. );
  12657. return $description;
  12658. }
  12659. /**
  12660. * Implements hook_chado_schema_v1_3_phenotype_comparison_cvterm()
  12661. *
  12662. * Purpose: To describe the structure of 'phenotype_comparison_cvterm' to tripal
  12663. * @see chado_insert_record()
  12664. * @see chado_update_record()
  12665. * @see chado_select_record()
  12666. * @see chado_generate_var()
  12667. * @see chado_expan_var()
  12668. *
  12669. * @return
  12670. * An array describing the 'phenotype_comparison_cvterm' table
  12671. *
  12672. * @ingroup tripal_chado_v1.3_schema_api
  12673. *
  12674. */
  12675. function tripal_chado_chado_schema_v1_3_phenotype_comparison_cvterm() {
  12676. $description = array(
  12677. 'description' => '',
  12678. 'table' => 'phenotype_comparison_cvterm',
  12679. 'fields' => array(
  12680. 'phenotype_comparison_cvterm_id' => array(
  12681. 'size' => 'big',
  12682. 'type' => 'serial',
  12683. 'not null' => TRUE,
  12684. ),
  12685. 'phenotype_comparison_id' => array(
  12686. 'size' => 'big',
  12687. 'type' => 'int',
  12688. 'not null' => TRUE,
  12689. ),
  12690. 'cvterm_id' => array(
  12691. 'size' => 'big',
  12692. 'type' => 'int',
  12693. 'not null' => TRUE,
  12694. ),
  12695. 'pub_id' => array(
  12696. 'size' => 'big',
  12697. 'type' => 'int',
  12698. 'not null' => TRUE,
  12699. ),
  12700. 'rank' => array(
  12701. 'size' => 'normal',
  12702. 'type' => 'int',
  12703. 'not null' => TRUE,
  12704. 'default' => 0,
  12705. ),
  12706. ),
  12707. 'unique keys' => array(
  12708. 'phenotype_comparison_cvterm_c1' => array(
  12709. 0 => 'phenotype_comparison_id',
  12710. 1 => 'cvterm_id',
  12711. ),
  12712. ),
  12713. 'indexes' => array(
  12714. 'phenotype_comparison_cvterm_idx1' => array(
  12715. 0 => 'phenotype_comparison_id',
  12716. ),
  12717. 'phenotype_comparison_cvterm_idx2' => array(
  12718. 0 => 'cvterm_id',
  12719. ),
  12720. ),
  12721. 'primary key' => array(
  12722. 0 => 'phenotype_comparison_cvterm_id',
  12723. ),
  12724. 'foreign keys' => array(
  12725. 'phenotype_comparison' => array(
  12726. 'table' => 'phenotype_comparison',
  12727. 'columns' => array(
  12728. 'phenotype_comparison_id' => 'phenotype_comparison_id',
  12729. ),
  12730. ),
  12731. 'cvterm' => array(
  12732. 'table' => 'cvterm',
  12733. 'columns' => array(
  12734. 'cvterm_id' => 'cvterm_id',
  12735. ),
  12736. ),
  12737. 'pub' => array(
  12738. 'table' => 'pub',
  12739. 'columns' => array(
  12740. 'pub_id' => 'pub_id',
  12741. ),
  12742. ),
  12743. ),
  12744. 'referring_tables' => array(
  12745. ),
  12746. );
  12747. return $description;
  12748. }
  12749. /**
  12750. * Implements hook_chado_schema_v1_3_phenotype_cvterm()
  12751. *
  12752. * Purpose: To describe the structure of 'phenotype_cvterm' to tripal
  12753. * @see chado_insert_record()
  12754. * @see chado_update_record()
  12755. * @see chado_select_record()
  12756. * @see chado_generate_var()
  12757. * @see chado_expan_var()
  12758. *
  12759. * @return
  12760. * An array describing the 'phenotype_cvterm' table
  12761. *
  12762. * @ingroup tripal_chado_v1.3_schema_api
  12763. *
  12764. */
  12765. function tripal_chado_chado_schema_v1_3_phenotype_cvterm() {
  12766. $description = array(
  12767. 'description' => '',
  12768. 'table' => 'phenotype_cvterm',
  12769. 'fields' => array(
  12770. 'phenotype_cvterm_id' => array(
  12771. 'size' => 'big',
  12772. 'type' => 'serial',
  12773. 'not null' => TRUE,
  12774. ),
  12775. 'phenotype_id' => array(
  12776. 'size' => 'big',
  12777. 'type' => 'int',
  12778. 'not null' => TRUE,
  12779. ),
  12780. 'cvterm_id' => array(
  12781. 'size' => 'big',
  12782. 'type' => 'int',
  12783. 'not null' => TRUE,
  12784. ),
  12785. 'rank' => array(
  12786. 'size' => 'normal',
  12787. 'type' => 'int',
  12788. 'not null' => TRUE,
  12789. 'default' => 0,
  12790. ),
  12791. ),
  12792. 'unique keys' => array(
  12793. 'phenotype_cvterm_c1' => array(
  12794. 0 => 'phenotype_id',
  12795. 1 => 'cvterm_id',
  12796. 2 => 'rank',
  12797. ),
  12798. ),
  12799. 'indexes' => array(
  12800. 'phenotype_cvterm_idx1' => array(
  12801. 0 => 'phenotype_id',
  12802. ),
  12803. 'phenotype_cvterm_idx2' => array(
  12804. 0 => 'cvterm_id',
  12805. ),
  12806. ),
  12807. 'primary key' => array(
  12808. 0 => 'phenotype_cvterm_id',
  12809. ),
  12810. 'foreign keys' => array(
  12811. 'phenotype' => array(
  12812. 'table' => 'phenotype',
  12813. 'columns' => array(
  12814. 'phenotype_id' => 'phenotype_id',
  12815. ),
  12816. ),
  12817. 'cvterm' => array(
  12818. 'table' => 'cvterm',
  12819. 'columns' => array(
  12820. 'cvterm_id' => 'cvterm_id',
  12821. ),
  12822. ),
  12823. ),
  12824. 'referring_tables' => array(
  12825. ),
  12826. );
  12827. return $description;
  12828. }
  12829. /**
  12830. * Implements hook_chado_schema_v1_3_phenotypeprop()
  12831. *
  12832. * Purpose: To describe the structure of 'phenotypeprop' to tripal
  12833. * @see chado_insert_record()
  12834. * @see chado_update_record()
  12835. * @see chado_select_record()
  12836. * @see chado_generate_var()
  12837. * @see chado_expan_var()
  12838. *
  12839. * @return
  12840. * An array describing the 'phenotypeprop' table
  12841. *
  12842. * @ingroup tripal_chado_v1.3_schema_api
  12843. *
  12844. */
  12845. function tripal_chado_chado_schema_v1_3_phenotypeprop() {
  12846. $description = array(
  12847. 'description' => '',
  12848. 'table' => 'phenotypeprop',
  12849. 'fields' => array(
  12850. 'phenotypeprop_id' => array(
  12851. 'size' => 'big',
  12852. 'type' => 'serial',
  12853. 'not null' => TRUE,
  12854. ),
  12855. 'phenotype_id' => array(
  12856. 'size' => 'big',
  12857. 'type' => 'int',
  12858. 'not null' => TRUE,
  12859. ),
  12860. 'type_id' => array(
  12861. 'size' => 'big',
  12862. 'type' => 'int',
  12863. 'not null' => TRUE,
  12864. ),
  12865. 'value' => array(
  12866. 'size' => 'normal',
  12867. 'type' => 'text',
  12868. 'not null' => FALSE,
  12869. ),
  12870. 'rank' => array(
  12871. 'size' => 'normal',
  12872. 'type' => 'int',
  12873. 'not null' => TRUE,
  12874. 'default' => 0,
  12875. ),
  12876. ),
  12877. 'unique keys' => array(
  12878. 'phenotypeprop_c1' => array(
  12879. 0 => 'phenotype_id',
  12880. 1 => 'type_id',
  12881. 2 => 'rank',
  12882. ),
  12883. ),
  12884. 'indexes' => array(
  12885. 'phenotypeprop_idx1' => array(
  12886. 0 => 'phenotype_id',
  12887. ),
  12888. 'phenotypeprop_idx2' => array(
  12889. 0 => 'type_id',
  12890. ),
  12891. ),
  12892. 'primary key' => array(
  12893. 0 => 'phenotypeprop_id',
  12894. ),
  12895. 'foreign keys' => array(
  12896. 'phenotype' => array(
  12897. 'table' => 'phenotype',
  12898. 'columns' => array(
  12899. 'phenotype_id' => 'phenotype_id',
  12900. ),
  12901. ),
  12902. 'cvterm' => array(
  12903. 'table' => 'cvterm',
  12904. 'columns' => array(
  12905. 'type_id' => 'cvterm_id',
  12906. ),
  12907. ),
  12908. ),
  12909. 'referring_tables' => array(
  12910. ),
  12911. );
  12912. return $description;
  12913. }
  12914. /**
  12915. * Implements hook_chado_schema_v1_3_phenstatement()
  12916. *
  12917. * Purpose: To describe the structure of 'phenstatement' to tripal
  12918. * @see chado_insert_record()
  12919. * @see chado_update_record()
  12920. * @see chado_select_record()
  12921. * @see chado_generate_var()
  12922. * @see chado_expan_var()
  12923. *
  12924. * @return
  12925. * An array describing the 'phenstatement' table
  12926. *
  12927. * @ingroup tripal_chado_v1.3_schema_api
  12928. *
  12929. */
  12930. function tripal_chado_chado_schema_v1_3_phenstatement() {
  12931. $description = array(
  12932. 'description' => '',
  12933. 'table' => 'phenstatement',
  12934. 'fields' => array(
  12935. 'phenstatement_id' => array(
  12936. 'size' => 'big',
  12937. 'type' => 'serial',
  12938. 'not null' => TRUE,
  12939. ),
  12940. 'genotype_id' => array(
  12941. 'size' => 'big',
  12942. 'type' => 'int',
  12943. 'not null' => TRUE,
  12944. ),
  12945. 'environment_id' => array(
  12946. 'size' => 'big',
  12947. 'type' => 'int',
  12948. 'not null' => TRUE,
  12949. ),
  12950. 'phenotype_id' => array(
  12951. 'size' => 'big',
  12952. 'type' => 'int',
  12953. 'not null' => TRUE,
  12954. ),
  12955. 'type_id' => array(
  12956. 'size' => 'big',
  12957. 'type' => 'int',
  12958. 'not null' => TRUE,
  12959. ),
  12960. 'pub_id' => array(
  12961. 'size' => 'big',
  12962. 'type' => 'int',
  12963. 'not null' => TRUE,
  12964. ),
  12965. ),
  12966. 'unique keys' => array(
  12967. 'phenstatement_c1' => array(
  12968. 0 => 'genotype_id',
  12969. 1 => 'phenotype_id',
  12970. 2 => 'environment_id',
  12971. 3 => 'type_id',
  12972. 4 => 'pub_id',
  12973. ),
  12974. ),
  12975. 'indexes' => array(
  12976. 'phenstatement_idx1' => array(
  12977. 0 => 'genotype_id',
  12978. ),
  12979. 'phenstatement_idx2' => array(
  12980. 0 => 'phenotype_id',
  12981. ),
  12982. ),
  12983. 'primary key' => array(
  12984. 0 => 'phenstatement_id',
  12985. ),
  12986. 'foreign keys' => array(
  12987. 'genotype' => array(
  12988. 'table' => 'genotype',
  12989. 'columns' => array(
  12990. 'genotype_id' => 'genotype_id',
  12991. ),
  12992. ),
  12993. 'environment' => array(
  12994. 'table' => 'environment',
  12995. 'columns' => array(
  12996. 'environment_id' => 'environment_id',
  12997. ),
  12998. ),
  12999. 'phenotype' => array(
  13000. 'table' => 'phenotype',
  13001. 'columns' => array(
  13002. 'phenotype_id' => 'phenotype_id',
  13003. ),
  13004. ),
  13005. 'cvterm' => array(
  13006. 'table' => 'cvterm',
  13007. 'columns' => array(
  13008. 'type_id' => 'cvterm_id',
  13009. ),
  13010. ),
  13011. 'pub' => array(
  13012. 'table' => 'pub',
  13013. 'columns' => array(
  13014. 'pub_id' => 'pub_id',
  13015. ),
  13016. ),
  13017. ),
  13018. 'referring_tables' => array(
  13019. ),
  13020. );
  13021. return $description;
  13022. }
  13023. /**
  13024. * Implements hook_chado_schema_v1_3_phylonode()
  13025. *
  13026. * Purpose: To describe the structure of 'phylonode' to tripal
  13027. * @see chado_insert_record()
  13028. * @see chado_update_record()
  13029. * @see chado_select_record()
  13030. * @see chado_generate_var()
  13031. * @see chado_expan_var()
  13032. *
  13033. * @return
  13034. * An array describing the 'phylonode' table
  13035. *
  13036. * @ingroup tripal_chado_v1.3_schema_api
  13037. *
  13038. */
  13039. function tripal_chado_chado_schema_v1_3_phylonode() {
  13040. $description = array(
  13041. 'description' => '',
  13042. 'table' => 'phylonode',
  13043. 'fields' => array(
  13044. 'phylonode_id' => array(
  13045. 'size' => 'big',
  13046. 'type' => 'serial',
  13047. 'not null' => TRUE,
  13048. ),
  13049. 'phylotree_id' => array(
  13050. 'size' => 'big',
  13051. 'type' => 'int',
  13052. 'not null' => TRUE,
  13053. ),
  13054. 'parent_phylonode_id' => array(
  13055. 'size' => 'big',
  13056. 'type' => 'int',
  13057. 'not null' => FALSE,
  13058. ),
  13059. 'left_idx' => array(
  13060. 'size' => 'normal',
  13061. 'type' => 'int',
  13062. 'not null' => TRUE,
  13063. ),
  13064. 'right_idx' => array(
  13065. 'size' => 'normal',
  13066. 'type' => 'int',
  13067. 'not null' => TRUE,
  13068. ),
  13069. 'type_id' => array(
  13070. 'size' => 'big',
  13071. 'type' => 'int',
  13072. 'not null' => FALSE,
  13073. ),
  13074. 'feature_id' => array(
  13075. 'size' => 'big',
  13076. 'type' => 'int',
  13077. 'not null' => FALSE,
  13078. ),
  13079. 'label' => array(
  13080. 'size' => 'normal',
  13081. 'type' => 'varchar',
  13082. 'length' => '255',
  13083. 'not null' => FALSE,
  13084. ),
  13085. 'distance' => array(
  13086. 'size' => 'big',
  13087. 'type' => 'float',
  13088. 'not null' => FALSE,
  13089. ),
  13090. ),
  13091. 'indexes' => array(
  13092. 'parent_phylonode_id' => array(
  13093. 0 => 'parent_phylonode_id',
  13094. ),
  13095. ),
  13096. 'unique keys' => array(
  13097. 'phylonode_phylotree_id_left_idx_key' => array(
  13098. 0 => 'phylotree_id',
  13099. 1 => 'left_idx',
  13100. ),
  13101. 'phylonode_phylotree_id_right_idx_key' => array(
  13102. 0 => 'phylotree_id',
  13103. 1 => 'right_idx',
  13104. ),
  13105. ),
  13106. 'primary key' => array(
  13107. 0 => 'phylonode_id',
  13108. ),
  13109. 'foreign keys' => array(
  13110. 'phylotree' => array(
  13111. 'table' => 'phylotree',
  13112. 'columns' => array(
  13113. 'phylotree_id' => 'phylotree_id',
  13114. ),
  13115. ),
  13116. 'phylonode' => array(
  13117. 'table' => 'phylonode',
  13118. 'columns' => array(
  13119. 'parent_phylonode_id' => 'phylonode_id',
  13120. ),
  13121. ),
  13122. 'cvterm' => array(
  13123. 'table' => 'cvterm',
  13124. 'columns' => array(
  13125. 'type_id' => 'cvterm_id',
  13126. ),
  13127. ),
  13128. 'feature' => array(
  13129. 'table' => 'feature',
  13130. 'columns' => array(
  13131. 'feature_id' => 'feature_id',
  13132. ),
  13133. ),
  13134. ),
  13135. 'referring_tables' => array(
  13136. 0 => 'phylonode',
  13137. 1 => 'phylonode_dbxref',
  13138. 2 => 'phylonode_organism',
  13139. 3 => 'phylonodeprop',
  13140. 4 => 'phylonode_pub',
  13141. 5 => 'phylonode_relationship',
  13142. ),
  13143. );
  13144. return $description;
  13145. }
  13146. /**
  13147. * Implements hook_chado_schema_v1_3_phylonode_dbxref()
  13148. *
  13149. * Purpose: To describe the structure of 'phylonode_dbxref' to tripal
  13150. * @see chado_insert_record()
  13151. * @see chado_update_record()
  13152. * @see chado_select_record()
  13153. * @see chado_generate_var()
  13154. * @see chado_expan_var()
  13155. *
  13156. * @return
  13157. * An array describing the 'phylonode_dbxref' table
  13158. *
  13159. * @ingroup tripal_chado_v1.3_schema_api
  13160. *
  13161. */
  13162. function tripal_chado_chado_schema_v1_3_phylonode_dbxref() {
  13163. $description = array(
  13164. 'description' => '',
  13165. 'table' => 'phylonode_dbxref',
  13166. 'fields' => array(
  13167. 'phylonode_dbxref_id' => array(
  13168. 'size' => 'big',
  13169. 'type' => 'serial',
  13170. 'not null' => TRUE,
  13171. ),
  13172. 'phylonode_id' => array(
  13173. 'size' => 'big',
  13174. 'type' => 'int',
  13175. 'not null' => TRUE,
  13176. ),
  13177. 'dbxref_id' => array(
  13178. 'size' => 'big',
  13179. 'type' => 'int',
  13180. 'not null' => TRUE,
  13181. ),
  13182. ),
  13183. 'indexes' => array(
  13184. 'phylonode_dbxref_idx1' => array(
  13185. 0 => 'phylonode_id',
  13186. ),
  13187. 'phylonode_dbxref_idx2' => array(
  13188. 0 => 'dbxref_id',
  13189. ),
  13190. ),
  13191. 'unique keys' => array(
  13192. 'phylonode_dbxref_phylonode_id_dbxref_id_key' => array(
  13193. 0 => 'phylonode_id',
  13194. 1 => 'dbxref_id',
  13195. ),
  13196. ),
  13197. 'primary key' => array(
  13198. 0 => 'phylonode_dbxref_id',
  13199. ),
  13200. 'foreign keys' => array(
  13201. 'phylonode' => array(
  13202. 'table' => 'phylonode',
  13203. 'columns' => array(
  13204. 'phylonode_id' => 'phylonode_id',
  13205. ),
  13206. ),
  13207. 'dbxref' => array(
  13208. 'table' => 'dbxref',
  13209. 'columns' => array(
  13210. 'dbxref_id' => 'dbxref_id',
  13211. ),
  13212. ),
  13213. ),
  13214. 'referring_tables' => array(
  13215. ),
  13216. );
  13217. return $description;
  13218. }
  13219. /**
  13220. * Implements hook_chado_schema_v1_3_phylonode_organism()
  13221. *
  13222. * Purpose: To describe the structure of 'phylonode_organism' to tripal
  13223. * @see chado_insert_record()
  13224. * @see chado_update_record()
  13225. * @see chado_select_record()
  13226. * @see chado_generate_var()
  13227. * @see chado_expan_var()
  13228. *
  13229. * @return
  13230. * An array describing the 'phylonode_organism' table
  13231. *
  13232. * @ingroup tripal_chado_v1.3_schema_api
  13233. *
  13234. */
  13235. function tripal_chado_chado_schema_v1_3_phylonode_organism() {
  13236. $description = array(
  13237. 'description' => '',
  13238. 'table' => 'phylonode_organism',
  13239. 'fields' => array(
  13240. 'phylonode_organism_id' => array(
  13241. 'size' => 'big',
  13242. 'type' => 'serial',
  13243. 'not null' => TRUE,
  13244. ),
  13245. 'phylonode_id' => array(
  13246. 'size' => 'big',
  13247. 'type' => 'int',
  13248. 'not null' => TRUE,
  13249. ),
  13250. 'organism_id' => array(
  13251. 'size' => 'big',
  13252. 'type' => 'int',
  13253. 'not null' => TRUE,
  13254. ),
  13255. ),
  13256. 'indexes' => array(
  13257. 'phylonode_organism_idx1' => array(
  13258. 0 => 'phylonode_id',
  13259. ),
  13260. 'phylonode_organism_idx2' => array(
  13261. 0 => 'organism_id',
  13262. ),
  13263. ),
  13264. 'unique keys' => array(
  13265. 'phylonode_organism_phylonode_id_key' => array(
  13266. 0 => 'phylonode_id',
  13267. ),
  13268. ),
  13269. 'primary key' => array(
  13270. 0 => 'phylonode_organism_id',
  13271. ),
  13272. 'foreign keys' => array(
  13273. 'phylonode' => array(
  13274. 'table' => 'phylonode',
  13275. 'columns' => array(
  13276. 'phylonode_id' => 'phylonode_id',
  13277. ),
  13278. ),
  13279. 'organism' => array(
  13280. 'table' => 'organism',
  13281. 'columns' => array(
  13282. 'organism_id' => 'organism_id',
  13283. ),
  13284. ),
  13285. ),
  13286. 'referring_tables' => array(
  13287. ),
  13288. );
  13289. return $description;
  13290. }
  13291. /**
  13292. * Implements hook_chado_schema_v1_3_phylonodeprop()
  13293. *
  13294. * Purpose: To describe the structure of 'phylonodeprop' to tripal
  13295. * @see chado_insert_record()
  13296. * @see chado_update_record()
  13297. * @see chado_select_record()
  13298. * @see chado_generate_var()
  13299. * @see chado_expan_var()
  13300. *
  13301. * @return
  13302. * An array describing the 'phylonodeprop' table
  13303. *
  13304. * @ingroup tripal_chado_v1.3_schema_api
  13305. *
  13306. */
  13307. function tripal_chado_chado_schema_v1_3_phylonodeprop() {
  13308. $description = array(
  13309. 'description' => '',
  13310. 'table' => 'phylonodeprop',
  13311. 'fields' => array(
  13312. 'phylonodeprop_id' => array(
  13313. 'size' => 'big',
  13314. 'type' => 'serial',
  13315. 'not null' => TRUE,
  13316. ),
  13317. 'phylonode_id' => array(
  13318. 'size' => 'big',
  13319. 'type' => 'int',
  13320. 'not null' => TRUE,
  13321. ),
  13322. 'type_id' => array(
  13323. 'size' => 'big',
  13324. 'type' => 'int',
  13325. 'not null' => TRUE,
  13326. ),
  13327. 'value' => array(
  13328. 'size' => 'normal',
  13329. 'type' => 'text',
  13330. 'not null' => TRUE,
  13331. 'default' => '',
  13332. ),
  13333. 'rank' => array(
  13334. 'size' => 'normal',
  13335. 'type' => 'int',
  13336. 'not null' => TRUE,
  13337. 'default' => 0,
  13338. ),
  13339. ),
  13340. 'indexes' => array(
  13341. 'phylonodeprop_idx1' => array(
  13342. 0 => 'phylonode_id',
  13343. ),
  13344. 'phylonodeprop_idx2' => array(
  13345. 0 => 'type_id',
  13346. ),
  13347. ),
  13348. 'unique keys' => array(
  13349. 'phylonodeprop_phylonode_id_type_id_value_rank_key' => array(
  13350. 0 => 'phylonode_id',
  13351. 1 => 'type_id',
  13352. 2 => 'value',
  13353. 3 => 'rank',
  13354. ),
  13355. ),
  13356. 'primary key' => array(
  13357. 0 => 'phylonodeprop_id',
  13358. ),
  13359. 'foreign keys' => array(
  13360. 'phylonode' => array(
  13361. 'table' => 'phylonode',
  13362. 'columns' => array(
  13363. 'phylonode_id' => 'phylonode_id',
  13364. ),
  13365. ),
  13366. 'cvterm' => array(
  13367. 'table' => 'cvterm',
  13368. 'columns' => array(
  13369. 'type_id' => 'cvterm_id',
  13370. ),
  13371. ),
  13372. ),
  13373. 'referring_tables' => array(
  13374. ),
  13375. );
  13376. return $description;
  13377. }
  13378. /**
  13379. * Implements hook_chado_schema_v1_3_phylonode_pub()
  13380. *
  13381. * Purpose: To describe the structure of 'phylonode_pub' to tripal
  13382. * @see chado_insert_record()
  13383. * @see chado_update_record()
  13384. * @see chado_select_record()
  13385. * @see chado_generate_var()
  13386. * @see chado_expan_var()
  13387. *
  13388. * @return
  13389. * An array describing the 'phylonode_pub' table
  13390. *
  13391. * @ingroup tripal_chado_v1.3_schema_api
  13392. *
  13393. */
  13394. function tripal_chado_chado_schema_v1_3_phylonode_pub() {
  13395. $description = array(
  13396. 'description' => '',
  13397. 'table' => 'phylonode_pub',
  13398. 'fields' => array(
  13399. 'phylonode_pub_id' => array(
  13400. 'size' => 'big',
  13401. 'type' => 'serial',
  13402. 'not null' => TRUE,
  13403. ),
  13404. 'phylonode_id' => array(
  13405. 'size' => 'big',
  13406. 'type' => 'int',
  13407. 'not null' => TRUE,
  13408. ),
  13409. 'pub_id' => array(
  13410. 'size' => 'big',
  13411. 'type' => 'int',
  13412. 'not null' => TRUE,
  13413. ),
  13414. ),
  13415. 'indexes' => array(
  13416. 'phylonode_pub_idx1' => array(
  13417. 0 => 'phylonode_id',
  13418. ),
  13419. 'phylonode_pub_idx2' => array(
  13420. 0 => 'pub_id',
  13421. ),
  13422. ),
  13423. 'unique keys' => array(
  13424. 'phylonode_pub_phylonode_id_pub_id_key' => array(
  13425. 0 => 'phylonode_id',
  13426. 1 => 'pub_id',
  13427. ),
  13428. ),
  13429. 'primary key' => array(
  13430. 0 => 'phylonode_pub_id',
  13431. ),
  13432. 'foreign keys' => array(
  13433. 'phylonode' => array(
  13434. 'table' => 'phylonode',
  13435. 'columns' => array(
  13436. 'phylonode_id' => 'phylonode_id',
  13437. ),
  13438. ),
  13439. 'pub' => array(
  13440. 'table' => 'pub',
  13441. 'columns' => array(
  13442. 'pub_id' => 'pub_id',
  13443. ),
  13444. ),
  13445. ),
  13446. 'referring_tables' => array(
  13447. ),
  13448. );
  13449. return $description;
  13450. }
  13451. /**
  13452. * Implements hook_chado_schema_v1_3_phylonode_relationship()
  13453. *
  13454. * Purpose: To describe the structure of 'phylonode_relationship' to tripal
  13455. * @see chado_insert_record()
  13456. * @see chado_update_record()
  13457. * @see chado_select_record()
  13458. * @see chado_generate_var()
  13459. * @see chado_expan_var()
  13460. *
  13461. * @return
  13462. * An array describing the 'phylonode_relationship' table
  13463. *
  13464. * @ingroup tripal_chado_v1.3_schema_api
  13465. *
  13466. */
  13467. function tripal_chado_chado_schema_v1_3_phylonode_relationship() {
  13468. $description = array(
  13469. 'description' => '',
  13470. 'table' => 'phylonode_relationship',
  13471. 'fields' => array(
  13472. 'phylonode_relationship_id' => array(
  13473. 'size' => 'big',
  13474. 'type' => 'serial',
  13475. 'not null' => TRUE,
  13476. ),
  13477. 'subject_id' => array(
  13478. 'size' => 'big',
  13479. 'type' => 'int',
  13480. 'not null' => TRUE,
  13481. ),
  13482. 'object_id' => array(
  13483. 'size' => 'big',
  13484. 'type' => 'int',
  13485. 'not null' => TRUE,
  13486. ),
  13487. 'type_id' => array(
  13488. 'size' => 'big',
  13489. 'type' => 'int',
  13490. 'not null' => TRUE,
  13491. ),
  13492. 'rank' => array(
  13493. 'size' => 'normal',
  13494. 'type' => 'int',
  13495. 'not null' => FALSE,
  13496. ),
  13497. 'phylotree_id' => array(
  13498. 'size' => 'big',
  13499. 'type' => 'int',
  13500. 'not null' => TRUE,
  13501. ),
  13502. ),
  13503. 'indexes' => array(
  13504. 'phylonode_relationship_idx1' => array(
  13505. 0 => 'subject_id',
  13506. ),
  13507. 'phylonode_relationship_idx2' => array(
  13508. 0 => 'object_id',
  13509. ),
  13510. 'phylonode_relationship_idx3' => array(
  13511. 0 => 'type_id',
  13512. ),
  13513. ),
  13514. 'primary key' => array(
  13515. 0 => 'phylonode_relationship_id',
  13516. ),
  13517. 'unique keys' => array(
  13518. 'phylonode_relationship_subject_id_object_id_type_id_key' => array(
  13519. 0 => 'subject_id',
  13520. 1 => 'object_id',
  13521. 2 => 'type_id',
  13522. ),
  13523. ),
  13524. 'foreign keys' => array(
  13525. 'phylonode' => array(
  13526. 'table' => 'phylonode',
  13527. 'columns' => array(
  13528. 'subject_id' => 'phylonode_id',
  13529. 'object_id' => 'phylonode_id',
  13530. ),
  13531. ),
  13532. 'cvterm' => array(
  13533. 'table' => 'cvterm',
  13534. 'columns' => array(
  13535. 'type_id' => 'cvterm_id',
  13536. ),
  13537. ),
  13538. 'phylotree' => array(
  13539. 'table' => 'phylotree',
  13540. 'columns' => array(
  13541. 'phylotree_id' => 'phylotree_id',
  13542. ),
  13543. ),
  13544. ),
  13545. 'referring_tables' => array(
  13546. ),
  13547. );
  13548. return $description;
  13549. }
  13550. /**
  13551. * Implements hook_chado_schema_v1_3_phylotree()
  13552. *
  13553. * Purpose: To describe the structure of 'phylotree' to tripal
  13554. * @see chado_insert_record()
  13555. * @see chado_update_record()
  13556. * @see chado_select_record()
  13557. * @see chado_generate_var()
  13558. * @see chado_expan_var()
  13559. *
  13560. * @return
  13561. * An array describing the 'phylotree' table
  13562. *
  13563. * @ingroup tripal_chado_v1.3_schema_api
  13564. *
  13565. */
  13566. function tripal_chado_chado_schema_v1_3_phylotree() {
  13567. $description = array(
  13568. 'description' => '',
  13569. 'table' => 'phylotree',
  13570. 'fields' => array(
  13571. 'phylotree_id' => array(
  13572. 'size' => 'big',
  13573. 'type' => 'serial',
  13574. 'not null' => TRUE,
  13575. ),
  13576. 'dbxref_id' => array(
  13577. 'size' => 'big',
  13578. 'type' => 'int',
  13579. 'not null' => TRUE,
  13580. ),
  13581. 'name' => array(
  13582. 'size' => 'normal',
  13583. 'type' => 'varchar',
  13584. 'length' => '255',
  13585. 'not null' => FALSE,
  13586. ),
  13587. 'type_id' => array(
  13588. 'size' => 'big',
  13589. 'type' => 'int',
  13590. 'not null' => FALSE,
  13591. ),
  13592. 'analysis_id' => array(
  13593. 'size' => 'big',
  13594. 'type' => 'int',
  13595. 'not null' => FALSE,
  13596. ),
  13597. 'comment' => array(
  13598. 'size' => 'normal',
  13599. 'type' => 'text',
  13600. 'not null' => FALSE,
  13601. ),
  13602. ),
  13603. 'indexes' => array(
  13604. 'phylotree_idx1' => array(
  13605. 0 => 'phylotree_id',
  13606. ),
  13607. ),
  13608. 'primary key' => array(
  13609. 0 => 'phylotree_id',
  13610. ),
  13611. 'foreign keys' => array(
  13612. 'dbxref' => array(
  13613. 'table' => 'dbxref',
  13614. 'columns' => array(
  13615. 'dbxref_id' => 'dbxref_id',
  13616. ),
  13617. ),
  13618. 'cvterm' => array(
  13619. 'table' => 'cvterm',
  13620. 'columns' => array(
  13621. 'type_id' => 'cvterm_id',
  13622. ),
  13623. ),
  13624. 'analysis' => array(
  13625. 'table' => 'analysis',
  13626. 'columns' => array(
  13627. 'analysis_id' => 'analysis_id',
  13628. ),
  13629. ),
  13630. ),
  13631. 'referring_tables' => array(
  13632. 0 => 'phylonode',
  13633. 1 => 'phylonode_relationship',
  13634. 2 => 'phylotreeprop',
  13635. 3 => 'phylotree_pub',
  13636. ),
  13637. );
  13638. return $description;
  13639. }
  13640. /**
  13641. * Implements hook_chado_schema_v1_3_phylotreeprop()
  13642. *
  13643. * Purpose: To describe the structure of 'phylotreeprop' to tripal
  13644. * @see chado_insert_record()
  13645. * @see chado_update_record()
  13646. * @see chado_select_record()
  13647. * @see chado_generate_var()
  13648. * @see chado_expan_var()
  13649. *
  13650. * @return
  13651. * An array describing the 'phylotreeprop' table
  13652. *
  13653. * @ingroup tripal_chado_v1.3_schema_api
  13654. *
  13655. */
  13656. function tripal_chado_chado_schema_v1_3_phylotreeprop() {
  13657. $description = array(
  13658. 'description' => '',
  13659. 'table' => 'phylotreeprop',
  13660. 'fields' => array(
  13661. 'phylotreeprop_id' => array(
  13662. 'size' => 'big',
  13663. 'type' => 'serial',
  13664. 'not null' => TRUE,
  13665. ),
  13666. 'phylotree_id' => array(
  13667. 'size' => 'big',
  13668. 'type' => 'int',
  13669. 'not null' => TRUE,
  13670. ),
  13671. 'type_id' => array(
  13672. 'size' => 'big',
  13673. 'type' => 'int',
  13674. 'not null' => TRUE,
  13675. ),
  13676. 'value' => array(
  13677. 'size' => 'normal',
  13678. 'type' => 'text',
  13679. 'not null' => FALSE,
  13680. ),
  13681. 'rank' => array(
  13682. 'size' => 'normal',
  13683. 'type' => 'int',
  13684. 'not null' => TRUE,
  13685. 'default' => 0,
  13686. ),
  13687. ),
  13688. 'unique keys' => array(
  13689. 'phylotreeprop_c1' => array(
  13690. 0 => 'phylotree_id',
  13691. 1 => 'type_id',
  13692. 2 => 'rank',
  13693. ),
  13694. ),
  13695. 'indexes' => array(
  13696. 'phylotreeprop_idx1' => array(
  13697. 0 => 'phylotree_id',
  13698. ),
  13699. 'phylotreeprop_idx2' => array(
  13700. 0 => 'type_id',
  13701. ),
  13702. ),
  13703. 'primary key' => array(
  13704. 0 => 'phylotreeprop_id',
  13705. ),
  13706. 'foreign keys' => array(
  13707. 'phylotree' => array(
  13708. 'table' => 'phylotree',
  13709. 'columns' => array(
  13710. 'phylotree_id' => 'phylotree_id',
  13711. ),
  13712. ),
  13713. 'cvterm' => array(
  13714. 'table' => 'cvterm',
  13715. 'columns' => array(
  13716. 'type_id' => 'cvterm_id',
  13717. ),
  13718. ),
  13719. ),
  13720. 'referring_tables' => array(
  13721. ),
  13722. );
  13723. return $description;
  13724. }
  13725. /**
  13726. * Implements hook_chado_schema_v1_3_phylotree_pub()
  13727. *
  13728. * Purpose: To describe the structure of 'phylotree_pub' to tripal
  13729. * @see chado_insert_record()
  13730. * @see chado_update_record()
  13731. * @see chado_select_record()
  13732. * @see chado_generate_var()
  13733. * @see chado_expan_var()
  13734. *
  13735. * @return
  13736. * An array describing the 'phylotree_pub' table
  13737. *
  13738. * @ingroup tripal_chado_v1.3_schema_api
  13739. *
  13740. */
  13741. function tripal_chado_chado_schema_v1_3_phylotree_pub() {
  13742. $description = array(
  13743. 'description' => '',
  13744. 'table' => 'phylotree_pub',
  13745. 'fields' => array(
  13746. 'phylotree_pub_id' => array(
  13747. 'size' => 'big',
  13748. 'type' => 'serial',
  13749. 'not null' => TRUE,
  13750. ),
  13751. 'phylotree_id' => array(
  13752. 'size' => 'big',
  13753. 'type' => 'int',
  13754. 'not null' => TRUE,
  13755. ),
  13756. 'pub_id' => array(
  13757. 'size' => 'big',
  13758. 'type' => 'int',
  13759. 'not null' => TRUE,
  13760. ),
  13761. ),
  13762. 'indexes' => array(
  13763. 'phylotree_pub_idx1' => array(
  13764. 0 => 'phylotree_id',
  13765. ),
  13766. 'phylotree_pub_idx2' => array(
  13767. 0 => 'pub_id',
  13768. ),
  13769. ),
  13770. 'unique keys' => array(
  13771. 'phylotree_pub_phylotree_id_pub_id_key' => array(
  13772. 0 => 'phylotree_id',
  13773. 1 => 'pub_id',
  13774. ),
  13775. ),
  13776. 'primary key' => array(
  13777. 0 => 'phylotree_pub_id',
  13778. ),
  13779. 'foreign keys' => array(
  13780. 'phylotree' => array(
  13781. 'table' => 'phylotree',
  13782. 'columns' => array(
  13783. 'phylotree_id' => 'phylotree_id',
  13784. ),
  13785. ),
  13786. 'pub' => array(
  13787. 'table' => 'pub',
  13788. 'columns' => array(
  13789. 'pub_id' => 'pub_id',
  13790. ),
  13791. ),
  13792. ),
  13793. 'referring_tables' => array(
  13794. ),
  13795. );
  13796. return $description;
  13797. }
  13798. /**
  13799. * Implements hook_chado_schema_v1_3_project()
  13800. *
  13801. * Purpose: To describe the structure of 'project' to tripal
  13802. * @see chado_insert_record()
  13803. * @see chado_update_record()
  13804. * @see chado_select_record()
  13805. * @see chado_generate_var()
  13806. * @see chado_expan_var()
  13807. *
  13808. * @return
  13809. * An array describing the 'project' table
  13810. *
  13811. * @ingroup tripal_chado_v1.3_schema_api
  13812. *
  13813. */
  13814. function tripal_chado_chado_schema_v1_3_project() {
  13815. $description = array(
  13816. 'description' => '',
  13817. 'table' => 'project',
  13818. 'fields' => array(
  13819. 'project_id' => array(
  13820. 'size' => 'big',
  13821. 'type' => 'serial',
  13822. 'not null' => TRUE,
  13823. ),
  13824. 'name' => array(
  13825. 'size' => 'normal',
  13826. 'type' => 'varchar',
  13827. 'length' => '255',
  13828. 'not null' => TRUE,
  13829. ),
  13830. 'description' => array(
  13831. 'size' => 'normal',
  13832. 'type' => 'text',
  13833. 'not null' => FALSE,
  13834. ),
  13835. ),
  13836. 'unique keys' => array(
  13837. 'project_c1' => array(
  13838. 0 => 'name',
  13839. ),
  13840. ),
  13841. 'primary key' => array(
  13842. 0 => 'project_id',
  13843. ),
  13844. 'foreign keys' => array(
  13845. ),
  13846. 'referring_tables' => array(
  13847. 0 => 'assay_project',
  13848. 1 => 'nd_experiment_project',
  13849. 2 => 'project_analysis',
  13850. 3 => 'project_contact',
  13851. 4 => 'project_dbxref',
  13852. 5 => 'project_feature',
  13853. 6 => 'projectprop',
  13854. 7 => 'project_pub',
  13855. 8 => 'project_relationship',
  13856. 10 => 'project_stock',
  13857. ),
  13858. );
  13859. return $description;
  13860. }
  13861. /**
  13862. * Implements hook_chado_schema_v1_3_project_analysis()
  13863. *
  13864. * Purpose: To describe the structure of 'project_analysis' to tripal
  13865. * @see chado_insert_record()
  13866. * @see chado_update_record()
  13867. * @see chado_select_record()
  13868. * @see chado_generate_var()
  13869. * @see chado_expan_var()
  13870. *
  13871. * @return
  13872. * An array describing the 'project_analysis' table
  13873. *
  13874. * @ingroup tripal_chado_v1.3_schema_api
  13875. *
  13876. */
  13877. function tripal_chado_chado_schema_v1_3_project_analysis() {
  13878. $description = array(
  13879. 'description' => '',
  13880. 'table' => 'project_analysis',
  13881. 'fields' => array(
  13882. 'project_analysis_id' => array(
  13883. 'size' => 'big',
  13884. 'type' => 'serial',
  13885. 'not null' => TRUE,
  13886. ),
  13887. 'project_id' => array(
  13888. 'size' => 'big',
  13889. 'type' => 'int',
  13890. 'not null' => TRUE,
  13891. ),
  13892. 'analysis_id' => array(
  13893. 'size' => 'big',
  13894. 'type' => 'int',
  13895. 'not null' => TRUE,
  13896. ),
  13897. 'rank' => array(
  13898. 'size' => 'normal',
  13899. 'type' => 'int',
  13900. 'not null' => TRUE,
  13901. 'default' => 0,
  13902. ),
  13903. ),
  13904. 'unique keys' => array(
  13905. 'project_analysis_c1' => array(
  13906. 0 => 'project_id',
  13907. 1 => 'analysis_id',
  13908. ),
  13909. ),
  13910. 'indexes' => array(
  13911. 'project_analysis_idx1' => array(
  13912. 0 => 'project_id',
  13913. ),
  13914. 'project_analysis_idx2' => array(
  13915. 0 => 'analysis_id',
  13916. ),
  13917. ),
  13918. 'primary key' => array(
  13919. 0 => 'project_analysis_id',
  13920. ),
  13921. 'foreign keys' => array(
  13922. 'project' => array(
  13923. 'table' => 'project',
  13924. 'columns' => array(
  13925. 'project_id' => 'project_id',
  13926. ),
  13927. ),
  13928. 'analysis' => array(
  13929. 'table' => 'analysis',
  13930. 'columns' => array(
  13931. 'analysis_id' => 'analysis_id',
  13932. ),
  13933. ),
  13934. ),
  13935. 'referring_tables' => array(
  13936. ),
  13937. );
  13938. return $description;
  13939. }
  13940. /**
  13941. * Implements hook_chado_schema_v1_3_project_contact()
  13942. *
  13943. * Purpose: To describe the structure of 'project_contact' to tripal
  13944. * @see chado_insert_record()
  13945. * @see chado_update_record()
  13946. * @see chado_select_record()
  13947. * @see chado_generate_var()
  13948. * @see chado_expan_var()
  13949. *
  13950. * @return
  13951. * An array describing the 'project_contact' table
  13952. *
  13953. * @ingroup tripal_chado_v1.3_schema_api
  13954. *
  13955. */
  13956. function tripal_chado_chado_schema_v1_3_project_contact() {
  13957. $description = array(
  13958. 'description' => '',
  13959. 'table' => 'project_contact',
  13960. 'fields' => array(
  13961. 'project_contact_id' => array(
  13962. 'size' => 'big',
  13963. 'type' => 'serial',
  13964. 'not null' => TRUE,
  13965. ),
  13966. 'project_id' => array(
  13967. 'size' => 'big',
  13968. 'type' => 'int',
  13969. 'not null' => TRUE,
  13970. ),
  13971. 'contact_id' => array(
  13972. 'size' => 'big',
  13973. 'type' => 'int',
  13974. 'not null' => TRUE,
  13975. ),
  13976. ),
  13977. 'unique keys' => array(
  13978. 'project_contact_c1' => array(
  13979. 0 => 'project_id',
  13980. 1 => 'contact_id',
  13981. ),
  13982. ),
  13983. 'indexes' => array(
  13984. 'project_contact_idx1' => array(
  13985. 0 => 'project_id',
  13986. ),
  13987. 'project_contact_idx2' => array(
  13988. 0 => 'contact_id',
  13989. ),
  13990. ),
  13991. 'primary key' => array(
  13992. 0 => 'project_contact_id',
  13993. ),
  13994. 'foreign keys' => array(
  13995. 'project' => array(
  13996. 'table' => 'project',
  13997. 'columns' => array(
  13998. 'project_id' => 'project_id',
  13999. ),
  14000. ),
  14001. 'contact' => array(
  14002. 'table' => 'contact',
  14003. 'columns' => array(
  14004. 'contact_id' => 'contact_id',
  14005. ),
  14006. ),
  14007. ),
  14008. 'referring_tables' => array(
  14009. ),
  14010. );
  14011. return $description;
  14012. }
  14013. /**
  14014. * Implements hook_chado_schema_v1_3_project_dbxref()
  14015. *
  14016. * Purpose: To describe the structure of 'project_dbxref' to tripal
  14017. * @see chado_insert_record()
  14018. * @see chado_update_record()
  14019. * @see chado_select_record()
  14020. * @see chado_generate_var()
  14021. * @see chado_expan_var()
  14022. *
  14023. * @return
  14024. * An array describing the 'project_dbxref' table
  14025. *
  14026. * @ingroup tripal_chado_v1.3_schema_api
  14027. *
  14028. */
  14029. function tripal_chado_chado_schema_v1_3_project_dbxref() {
  14030. $description = array(
  14031. 'description' => '',
  14032. 'table' => 'project_dbxref',
  14033. 'fields' => array(
  14034. 'project_dbxref_id' => array(
  14035. 'size' => 'big',
  14036. 'type' => 'serial',
  14037. 'not null' => TRUE,
  14038. ),
  14039. 'project_id' => array(
  14040. 'size' => 'big',
  14041. 'type' => 'int',
  14042. 'not null' => TRUE,
  14043. ),
  14044. 'dbxref_id' => array(
  14045. 'size' => 'big',
  14046. 'type' => 'int',
  14047. 'not null' => TRUE,
  14048. ),
  14049. 'is_current' => array(
  14050. 'size' => 'normal',
  14051. 'type' => 'boolean',
  14052. 'not null' => TRUE,
  14053. 'default' => 'true',
  14054. ),
  14055. ),
  14056. 'unique keys' => array(
  14057. 'project_dbxref_c1' => array(
  14058. 0 => 'project_id',
  14059. 1 => 'dbxref_id',
  14060. ),
  14061. ),
  14062. 'indexes' => array(
  14063. 'project_dbxref_idx1' => array(
  14064. 0 => 'project_id',
  14065. ),
  14066. 'project_dbxref_idx2' => array(
  14067. 0 => 'dbxref_id',
  14068. ),
  14069. ),
  14070. 'primary key' => array(
  14071. 0 => 'project_dbxref_id',
  14072. ),
  14073. 'foreign keys' => array(
  14074. 'dbxref' => array(
  14075. 'table' => 'dbxref',
  14076. 'columns' => array(
  14077. 'dbxref_id' => 'dbxref_id',
  14078. ),
  14079. ),
  14080. 'project' => array(
  14081. 'table' => 'project',
  14082. 'columns' => array(
  14083. 'project_id' => 'project_id',
  14084. ),
  14085. ),
  14086. ),
  14087. 'referring_tables' => array(
  14088. ),
  14089. );
  14090. return $description;
  14091. }
  14092. /**
  14093. * Implements hook_chado_schema_v1_3_project_feature()
  14094. *
  14095. * Purpose: To describe the structure of 'project_feature' to tripal
  14096. * @see chado_insert_record()
  14097. * @see chado_update_record()
  14098. * @see chado_select_record()
  14099. * @see chado_generate_var()
  14100. * @see chado_expan_var()
  14101. *
  14102. * @return
  14103. * An array describing the 'project_feature' table
  14104. *
  14105. * @ingroup tripal_chado_v1.3_schema_api
  14106. *
  14107. */
  14108. function tripal_chado_chado_schema_v1_3_project_feature() {
  14109. $description = array(
  14110. 'description' => '',
  14111. 'table' => 'project_feature',
  14112. 'fields' => array(
  14113. 'project_feature_id' => array(
  14114. 'size' => 'big',
  14115. 'type' => 'serial',
  14116. 'not null' => TRUE,
  14117. ),
  14118. 'feature_id' => array(
  14119. 'size' => 'big',
  14120. 'type' => 'int',
  14121. 'not null' => TRUE,
  14122. ),
  14123. 'project_id' => array(
  14124. 'size' => 'big',
  14125. 'type' => 'int',
  14126. 'not null' => TRUE,
  14127. ),
  14128. ),
  14129. 'unique keys' => array(
  14130. 'project_feature_c1' => array(
  14131. 0 => 'feature_id',
  14132. 1 => 'project_id',
  14133. ),
  14134. ),
  14135. 'indexes' => array(
  14136. 'project_feature_idx1' => array(
  14137. 0 => 'feature_id',
  14138. ),
  14139. 'project_feature_idx2' => array(
  14140. 0 => 'project_id',
  14141. ),
  14142. ),
  14143. 'primary key' => array(
  14144. 0 => 'project_feature_id',
  14145. ),
  14146. 'foreign keys' => array(
  14147. 'feature' => array(
  14148. 'table' => 'feature',
  14149. 'columns' => array(
  14150. 'feature_id' => 'feature_id',
  14151. ),
  14152. ),
  14153. 'project' => array(
  14154. 'table' => 'project',
  14155. 'columns' => array(
  14156. 'project_id' => 'project_id',
  14157. ),
  14158. ),
  14159. ),
  14160. 'referring_tables' => array(
  14161. ),
  14162. );
  14163. return $description;
  14164. }
  14165. /**
  14166. * Implements hook_chado_schema_v1_3_projectprop()
  14167. *
  14168. * Purpose: To describe the structure of 'projectprop' to tripal
  14169. * @see chado_insert_record()
  14170. * @see chado_update_record()
  14171. * @see chado_select_record()
  14172. * @see chado_generate_var()
  14173. * @see chado_expan_var()
  14174. *
  14175. * @return
  14176. * An array describing the 'projectprop' table
  14177. *
  14178. * @ingroup tripal_chado_v1.3_schema_api
  14179. *
  14180. */
  14181. function tripal_chado_chado_schema_v1_3_projectprop() {
  14182. $description = array(
  14183. 'description' => '',
  14184. 'table' => 'projectprop',
  14185. 'fields' => array(
  14186. 'projectprop_id' => array(
  14187. 'size' => 'big',
  14188. 'type' => 'serial',
  14189. 'not null' => TRUE,
  14190. ),
  14191. 'project_id' => array(
  14192. 'size' => 'big',
  14193. 'type' => 'int',
  14194. 'not null' => TRUE,
  14195. ),
  14196. 'type_id' => array(
  14197. 'size' => 'big',
  14198. 'type' => 'int',
  14199. 'not null' => TRUE,
  14200. ),
  14201. 'value' => array(
  14202. 'size' => 'normal',
  14203. 'type' => 'text',
  14204. 'not null' => FALSE,
  14205. ),
  14206. 'rank' => array(
  14207. 'size' => 'normal',
  14208. 'type' => 'int',
  14209. 'not null' => TRUE,
  14210. 'default' => 0,
  14211. ),
  14212. ),
  14213. 'unique keys' => array(
  14214. 'projectprop_c1' => array(
  14215. 0 => 'project_id',
  14216. 1 => 'type_id',
  14217. 2 => 'rank',
  14218. ),
  14219. ),
  14220. 'primary key' => array(
  14221. 0 => 'projectprop_id',
  14222. ),
  14223. 'foreign keys' => array(
  14224. 'project' => array(
  14225. 'table' => 'project',
  14226. 'columns' => array(
  14227. 'project_id' => 'project_id',
  14228. ),
  14229. ),
  14230. 'cvterm' => array(
  14231. 'table' => 'cvterm',
  14232. 'columns' => array(
  14233. 'type_id' => 'cvterm_id',
  14234. ),
  14235. ),
  14236. ),
  14237. 'referring_tables' => array(
  14238. ),
  14239. );
  14240. return $description;
  14241. }
  14242. /**
  14243. * Implements hook_chado_schema_v1_3_project_pub()
  14244. *
  14245. * Purpose: To describe the structure of 'project_pub' to tripal
  14246. * @see chado_insert_record()
  14247. * @see chado_update_record()
  14248. * @see chado_select_record()
  14249. * @see chado_generate_var()
  14250. * @see chado_expan_var()
  14251. *
  14252. * @return
  14253. * An array describing the 'project_pub' table
  14254. *
  14255. * @ingroup tripal_chado_v1.3_schema_api
  14256. *
  14257. */
  14258. function tripal_chado_chado_schema_v1_3_project_pub() {
  14259. $description = array(
  14260. 'description' => '',
  14261. 'table' => 'project_pub',
  14262. 'fields' => array(
  14263. 'project_pub_id' => array(
  14264. 'size' => 'big',
  14265. 'type' => 'serial',
  14266. 'not null' => TRUE,
  14267. ),
  14268. 'project_id' => array(
  14269. 'size' => 'big',
  14270. 'type' => 'int',
  14271. 'not null' => TRUE,
  14272. ),
  14273. 'pub_id' => array(
  14274. 'size' => 'big',
  14275. 'type' => 'int',
  14276. 'not null' => TRUE,
  14277. ),
  14278. ),
  14279. 'unique keys' => array(
  14280. 'project_pub_c1' => array(
  14281. 0 => 'project_id',
  14282. 1 => 'pub_id',
  14283. ),
  14284. ),
  14285. 'indexes' => array(
  14286. 'project_pub_idx1' => array(
  14287. 0 => 'project_id',
  14288. ),
  14289. 'project_pub_idx2' => array(
  14290. 0 => 'pub_id',
  14291. ),
  14292. ),
  14293. 'primary key' => array(
  14294. 0 => 'project_pub_id',
  14295. ),
  14296. 'foreign keys' => array(
  14297. 'project' => array(
  14298. 'table' => 'project',
  14299. 'columns' => array(
  14300. 'project_id' => 'project_id',
  14301. ),
  14302. ),
  14303. 'pub' => array(
  14304. 'table' => 'pub',
  14305. 'columns' => array(
  14306. 'pub_id' => 'pub_id',
  14307. ),
  14308. ),
  14309. ),
  14310. 'referring_tables' => array(
  14311. ),
  14312. );
  14313. return $description;
  14314. }
  14315. /**
  14316. * Implements hook_chado_schema_v1_3_project_relationship()
  14317. *
  14318. * Purpose: To describe the structure of 'project_relationship' to tripal
  14319. * @see chado_insert_record()
  14320. * @see chado_update_record()
  14321. * @see chado_select_record()
  14322. * @see chado_generate_var()
  14323. * @see chado_expan_var()
  14324. *
  14325. * @return
  14326. * An array describing the 'project_relationship' table
  14327. *
  14328. * @ingroup tripal_chado_v1.3_schema_api
  14329. *
  14330. */
  14331. function tripal_chado_chado_schema_v1_3_project_relationship() {
  14332. $description = array(
  14333. 'description' => '',
  14334. 'table' => 'project_relationship',
  14335. 'fields' => array(
  14336. 'project_relationship_id' => array(
  14337. 'size' => 'big',
  14338. 'type' => 'serial',
  14339. 'not null' => TRUE,
  14340. ),
  14341. 'subject_project_id' => array(
  14342. 'size' => 'big',
  14343. 'type' => 'int',
  14344. 'not null' => TRUE,
  14345. ),
  14346. 'object_project_id' => array(
  14347. 'size' => 'big',
  14348. 'type' => 'int',
  14349. 'not null' => TRUE,
  14350. ),
  14351. 'type_id' => array(
  14352. 'size' => 'big',
  14353. 'type' => 'int',
  14354. 'not null' => TRUE,
  14355. ),
  14356. ),
  14357. 'unique keys' => array(
  14358. 'project_relationship_c1' => array(
  14359. 0 => 'subject_project_id',
  14360. 1 => 'object_project_id',
  14361. 2 => 'type_id',
  14362. ),
  14363. ),
  14364. 'primary key' => array(
  14365. 0 => 'project_relationship_id',
  14366. ),
  14367. 'foreign keys' => array(
  14368. 'project' => array(
  14369. 'table' => 'project',
  14370. 'columns' => array(
  14371. 'subject_project_id' => 'project_id',
  14372. 'object_project_id' => 'project_id',
  14373. ),
  14374. ),
  14375. 'cvterm' => array(
  14376. 'table' => 'cvterm',
  14377. 'columns' => array(
  14378. 'type_id' => 'cvterm_id',
  14379. ),
  14380. ),
  14381. ),
  14382. 'referring_tables' => array(
  14383. ),
  14384. );
  14385. return $description;
  14386. }
  14387. /**
  14388. * Implements hook_chado_schema_v1_3_project_stock()
  14389. *
  14390. * Purpose: To describe the structure of 'project_stock' to tripal
  14391. * @see chado_insert_record()
  14392. * @see chado_update_record()
  14393. * @see chado_select_record()
  14394. * @see chado_generate_var()
  14395. * @see chado_expan_var()
  14396. *
  14397. * @return
  14398. * An array describing the 'project_stock' table
  14399. *
  14400. * @ingroup tripal_chado_v1.3_schema_api
  14401. *
  14402. */
  14403. function tripal_chado_chado_schema_v1_3_project_stock() {
  14404. $description = array(
  14405. 'description' => '',
  14406. 'table' => 'project_stock',
  14407. 'fields' => array(
  14408. 'project_stock_id' => array(
  14409. 'size' => 'big',
  14410. 'type' => 'serial',
  14411. 'not null' => TRUE,
  14412. ),
  14413. 'stock_id' => array(
  14414. 'size' => 'big',
  14415. 'type' => 'int',
  14416. 'not null' => TRUE,
  14417. ),
  14418. 'project_id' => array(
  14419. 'size' => 'big',
  14420. 'type' => 'int',
  14421. 'not null' => TRUE,
  14422. ),
  14423. ),
  14424. 'unique keys' => array(
  14425. 'project_stock_c1' => array(
  14426. 0 => 'stock_id',
  14427. 1 => 'project_id',
  14428. ),
  14429. ),
  14430. 'indexes' => array(
  14431. 'project_stock_idx1' => array(
  14432. 0 => 'stock_id',
  14433. ),
  14434. 'project_stock_idx2' => array(
  14435. 0 => 'project_id',
  14436. ),
  14437. ),
  14438. 'primary key' => array(
  14439. 0 => 'project_stock_id',
  14440. ),
  14441. 'foreign keys' => array(
  14442. 'stock' => array(
  14443. 'table' => 'stock',
  14444. 'columns' => array(
  14445. 'stock_id' => 'stock_id',
  14446. ),
  14447. ),
  14448. 'project' => array(
  14449. 'table' => 'project',
  14450. 'columns' => array(
  14451. 'project_id' => 'project_id',
  14452. ),
  14453. ),
  14454. ),
  14455. 'referring_tables' => array(
  14456. ),
  14457. );
  14458. return $description;
  14459. }
  14460. /**
  14461. * Implements hook_chado_schema_v1_3_protocol()
  14462. *
  14463. * Purpose: To describe the structure of 'protocol' to tripal
  14464. * @see chado_insert_record()
  14465. * @see chado_update_record()
  14466. * @see chado_select_record()
  14467. * @see chado_generate_var()
  14468. * @see chado_expan_var()
  14469. *
  14470. * @return
  14471. * An array describing the 'protocol' table
  14472. *
  14473. * @ingroup tripal_chado_v1.3_schema_api
  14474. *
  14475. */
  14476. function tripal_chado_chado_schema_v1_3_protocol() {
  14477. $description = array(
  14478. 'description' => '',
  14479. 'table' => 'protocol',
  14480. 'fields' => array(
  14481. 'protocol_id' => array(
  14482. 'size' => 'big',
  14483. 'type' => 'serial',
  14484. 'not null' => TRUE,
  14485. ),
  14486. 'type_id' => array(
  14487. 'size' => 'big',
  14488. 'type' => 'int',
  14489. 'not null' => TRUE,
  14490. ),
  14491. 'pub_id' => array(
  14492. 'size' => 'big',
  14493. 'type' => 'int',
  14494. 'not null' => FALSE,
  14495. ),
  14496. 'dbxref_id' => array(
  14497. 'size' => 'big',
  14498. 'type' => 'int',
  14499. 'not null' => FALSE,
  14500. ),
  14501. 'name' => array(
  14502. 'size' => 'normal',
  14503. 'type' => 'text',
  14504. 'not null' => TRUE,
  14505. ),
  14506. 'uri' => array(
  14507. 'size' => 'normal',
  14508. 'type' => 'text',
  14509. 'not null' => FALSE,
  14510. ),
  14511. 'protocoldescription' => array(
  14512. 'size' => 'normal',
  14513. 'type' => 'text',
  14514. 'not null' => FALSE,
  14515. ),
  14516. 'hardwaredescription' => array(
  14517. 'size' => 'normal',
  14518. 'type' => 'text',
  14519. 'not null' => FALSE,
  14520. ),
  14521. 'softwaredescription' => array(
  14522. 'size' => 'normal',
  14523. 'type' => 'text',
  14524. 'not null' => FALSE,
  14525. ),
  14526. ),
  14527. 'unique keys' => array(
  14528. 'protocol_c1' => array(
  14529. 0 => 'name',
  14530. ),
  14531. ),
  14532. 'indexes' => array(
  14533. 'protocol_idx1' => array(
  14534. 0 => 'type_id',
  14535. ),
  14536. 'protocol_idx2' => array(
  14537. 0 => 'pub_id',
  14538. ),
  14539. 'protocol_idx3' => array(
  14540. 0 => 'dbxref_id',
  14541. ),
  14542. ),
  14543. 'primary key' => array(
  14544. 0 => 'protocol_id',
  14545. ),
  14546. 'foreign keys' => array(
  14547. 'cvterm' => array(
  14548. 'table' => 'cvterm',
  14549. 'columns' => array(
  14550. 'type_id' => 'cvterm_id',
  14551. ),
  14552. ),
  14553. 'pub' => array(
  14554. 'table' => 'pub',
  14555. 'columns' => array(
  14556. 'pub_id' => 'pub_id',
  14557. ),
  14558. ),
  14559. 'dbxref' => array(
  14560. 'table' => 'dbxref',
  14561. 'columns' => array(
  14562. 'dbxref_id' => 'dbxref_id',
  14563. ),
  14564. ),
  14565. ),
  14566. 'referring_tables' => array(
  14567. 0 => 'acquisition',
  14568. 1 => 'arraydesign',
  14569. 2 => 'assay',
  14570. 3 => 'protocolparam',
  14571. 4 => 'quantification',
  14572. 5 => 'treatment',
  14573. ),
  14574. );
  14575. return $description;
  14576. }
  14577. /**
  14578. * Implements hook_chado_schema_v1_3_protocolparam()
  14579. *
  14580. * Purpose: To describe the structure of 'protocolparam' to tripal
  14581. * @see chado_insert_record()
  14582. * @see chado_update_record()
  14583. * @see chado_select_record()
  14584. * @see chado_generate_var()
  14585. * @see chado_expan_var()
  14586. *
  14587. * @return
  14588. * An array describing the 'protocolparam' table
  14589. *
  14590. * @ingroup tripal_chado_v1.3_schema_api
  14591. *
  14592. */
  14593. function tripal_chado_chado_schema_v1_3_protocolparam() {
  14594. $description = array(
  14595. 'description' => '',
  14596. 'table' => 'protocolparam',
  14597. 'fields' => array(
  14598. 'protocolparam_id' => array(
  14599. 'size' => 'big',
  14600. 'type' => 'serial',
  14601. 'not null' => TRUE,
  14602. ),
  14603. 'protocol_id' => array(
  14604. 'size' => 'big',
  14605. 'type' => 'int',
  14606. 'not null' => TRUE,
  14607. ),
  14608. 'name' => array(
  14609. 'size' => 'normal',
  14610. 'type' => 'text',
  14611. 'not null' => TRUE,
  14612. ),
  14613. 'datatype_id' => array(
  14614. 'size' => 'big',
  14615. 'type' => 'int',
  14616. 'not null' => FALSE,
  14617. ),
  14618. 'unittype_id' => array(
  14619. 'size' => 'big',
  14620. 'type' => 'int',
  14621. 'not null' => FALSE,
  14622. ),
  14623. 'value' => array(
  14624. 'size' => 'normal',
  14625. 'type' => 'text',
  14626. 'not null' => FALSE,
  14627. ),
  14628. 'rank' => array(
  14629. 'size' => 'normal',
  14630. 'type' => 'int',
  14631. 'not null' => TRUE,
  14632. 'default' => 0,
  14633. ),
  14634. ),
  14635. 'indexes' => array(
  14636. 'protocolparam_idx1' => array(
  14637. 0 => 'protocol_id',
  14638. ),
  14639. 'protocolparam_idx2' => array(
  14640. 0 => 'datatype_id',
  14641. ),
  14642. 'protocolparam_idx3' => array(
  14643. 0 => 'unittype_id',
  14644. ),
  14645. ),
  14646. 'primary key' => array(
  14647. 0 => 'protocolparam_id',
  14648. ),
  14649. 'foreign keys' => array(
  14650. 'protocol' => array(
  14651. 'table' => 'protocol',
  14652. 'columns' => array(
  14653. 'protocol_id' => 'protocol_id',
  14654. ),
  14655. ),
  14656. 'cvterm' => array(
  14657. 'table' => 'cvterm',
  14658. 'columns' => array(
  14659. 'datatype_id' => 'cvterm_id',
  14660. 'unittype_id' => 'cvterm_id',
  14661. ),
  14662. ),
  14663. ),
  14664. 'referring_tables' => array(
  14665. ),
  14666. );
  14667. return $description;
  14668. }
  14669. /**
  14670. * Implements hook_chado_schema_v1_3_pub()
  14671. *
  14672. * Purpose: To describe the structure of 'pub' to tripal
  14673. * @see chado_insert_record()
  14674. * @see chado_update_record()
  14675. * @see chado_select_record()
  14676. * @see chado_generate_var()
  14677. * @see chado_expan_var()
  14678. *
  14679. * @return
  14680. * An array describing the 'pub' table
  14681. *
  14682. * @ingroup tripal_chado_v1.3_schema_api
  14683. *
  14684. */
  14685. function tripal_chado_chado_schema_v1_3_pub() {
  14686. $description = array(
  14687. 'description' => '',
  14688. 'table' => 'pub',
  14689. 'fields' => array(
  14690. 'pub_id' => array(
  14691. 'size' => 'big',
  14692. 'type' => 'serial',
  14693. 'not null' => TRUE,
  14694. ),
  14695. 'title' => array(
  14696. 'size' => 'normal',
  14697. 'type' => 'text',
  14698. 'not null' => FALSE,
  14699. ),
  14700. 'volumetitle' => array(
  14701. 'size' => 'normal',
  14702. 'type' => 'text',
  14703. 'not null' => FALSE,
  14704. ),
  14705. 'volume' => array(
  14706. 'size' => 'normal',
  14707. 'type' => 'varchar',
  14708. 'length' => '255',
  14709. 'not null' => FALSE,
  14710. ),
  14711. 'series_name' => array(
  14712. 'size' => 'normal',
  14713. 'type' => 'varchar',
  14714. 'length' => '255',
  14715. 'not null' => FALSE,
  14716. ),
  14717. 'issue' => array(
  14718. 'size' => 'normal',
  14719. 'type' => 'varchar',
  14720. 'length' => '255',
  14721. 'not null' => FALSE,
  14722. ),
  14723. 'pyear' => array(
  14724. 'size' => 'normal',
  14725. 'type' => 'varchar',
  14726. 'length' => '255',
  14727. 'not null' => FALSE,
  14728. ),
  14729. 'pages' => array(
  14730. 'size' => 'normal',
  14731. 'type' => 'varchar',
  14732. 'length' => '255',
  14733. 'not null' => FALSE,
  14734. ),
  14735. 'miniref' => array(
  14736. 'size' => 'normal',
  14737. 'type' => 'varchar',
  14738. 'length' => '255',
  14739. 'not null' => FALSE,
  14740. ),
  14741. 'uniquename' => array(
  14742. 'size' => 'normal',
  14743. 'type' => 'text',
  14744. 'not null' => TRUE,
  14745. ),
  14746. 'type_id' => array(
  14747. 'size' => 'big',
  14748. 'type' => 'int',
  14749. 'not null' => TRUE,
  14750. ),
  14751. 'is_obsolete' => array(
  14752. 'size' => 'normal',
  14753. 'type' => 'boolean',
  14754. 'not null' => FALSE,
  14755. 'default' => FALSE,
  14756. ),
  14757. 'publisher' => array(
  14758. 'size' => 'normal',
  14759. 'type' => 'varchar',
  14760. 'length' => '255',
  14761. 'not null' => FALSE,
  14762. ),
  14763. 'pubplace' => array(
  14764. 'size' => 'normal',
  14765. 'type' => 'varchar',
  14766. 'length' => '255',
  14767. 'not null' => FALSE,
  14768. ),
  14769. ),
  14770. 'unique keys' => array(
  14771. 'pub_c1' => array(
  14772. 0 => 'uniquename',
  14773. ),
  14774. ),
  14775. 'indexes' => array(
  14776. 'pub_idx1' => array(
  14777. 0 => 'type_id',
  14778. ),
  14779. ),
  14780. 'primary key' => array(
  14781. 0 => 'pub_id',
  14782. ),
  14783. 'foreign keys' => array(
  14784. 'cvterm' => array(
  14785. 'table' => 'cvterm',
  14786. 'columns' => array(
  14787. 'type_id' => 'cvterm_id',
  14788. ),
  14789. ),
  14790. ),
  14791. 'referring_tables' => array(
  14792. 0 => 'analysis_pub',
  14793. 1 => 'cell_line_cvterm',
  14794. 2 => 'cell_line_feature',
  14795. 3 => 'cell_line_library',
  14796. 4 => 'cell_lineprop_pub',
  14797. 5 => 'cell_line_pub',
  14798. 6 => 'cell_line_synonym',
  14799. 7 => 'expression_pub',
  14800. 8 => 'feature_cvterm',
  14801. 9 => 'feature_cvterm_pub',
  14802. 10 => 'feature_expression',
  14803. 11 => 'featureloc_pub',
  14804. 12 => 'featuremap_pub',
  14805. 13 => 'featureprop_pub',
  14806. 14 => 'feature_pub',
  14807. 15 => 'feature_relationshipprop_pub',
  14808. 16 => 'feature_relationship_pub',
  14809. 17 => 'feature_synonym',
  14810. 18 => 'library_cvterm',
  14811. 19 => 'library_expression',
  14812. 20 => 'libraryprop_pub',
  14813. 21 => 'library_pub',
  14814. 22 => 'library_relationship_pub',
  14815. 23 => 'library_synonym',
  14816. 24 => 'nd_experiment_pub',
  14817. 25 => 'organism_cvterm',
  14818. 26 => 'organismprop_pub',
  14819. 27 => 'organism_pub',
  14820. 28 => 'phendesc',
  14821. 29 => 'phenotype_comparison',
  14822. 30 => 'phenotype_comparison_cvterm',
  14823. 31 => 'phenstatement',
  14824. 32 => 'phylonode_pub',
  14825. 33 => 'phylotree_pub',
  14826. 34 => 'project_pub',
  14827. 35 => 'protocol',
  14828. 36 => 'pubauthor',
  14829. 37 => 'pub_dbxref',
  14830. 38 => 'pubprop',
  14831. 39 => 'pub_relationship',
  14832. 41 => 'stock_cvterm',
  14833. 42 => 'stockprop_pub',
  14834. 43 => 'stock_pub',
  14835. 44 => 'stock_relationship_cvterm',
  14836. 45 => 'stock_relationship_pub',
  14837. 46 => 'study',
  14838. ),
  14839. );
  14840. return $description;
  14841. }
  14842. /**
  14843. * Implements hook_chado_schema_v1_3_pubauthor()
  14844. *
  14845. * Purpose: To describe the structure of 'pubauthor' to tripal
  14846. * @see chado_insert_record()
  14847. * @see chado_update_record()
  14848. * @see chado_select_record()
  14849. * @see chado_generate_var()
  14850. * @see chado_expan_var()
  14851. *
  14852. * @return
  14853. * An array describing the 'pubauthor' table
  14854. *
  14855. * @ingroup tripal_chado_v1.3_schema_api
  14856. *
  14857. */
  14858. function tripal_chado_chado_schema_v1_3_pubauthor() {
  14859. $description = array(
  14860. 'description' => '',
  14861. 'table' => 'pubauthor',
  14862. 'fields' => array(
  14863. 'pubauthor_id' => array(
  14864. 'size' => 'big',
  14865. 'type' => 'serial',
  14866. 'not null' => TRUE,
  14867. ),
  14868. 'pub_id' => array(
  14869. 'size' => 'big',
  14870. 'type' => 'int',
  14871. 'not null' => TRUE,
  14872. ),
  14873. 'rank' => array(
  14874. 'size' => 'normal',
  14875. 'type' => 'int',
  14876. 'not null' => TRUE,
  14877. ),
  14878. 'editor' => array(
  14879. 'size' => 'normal',
  14880. 'type' => 'boolean',
  14881. 'not null' => FALSE,
  14882. 'default' => FALSE,
  14883. ),
  14884. 'surname' => array(
  14885. 'size' => 'normal',
  14886. 'type' => 'varchar',
  14887. 'length' => '100',
  14888. 'not null' => TRUE,
  14889. ),
  14890. 'givennames' => array(
  14891. 'size' => 'normal',
  14892. 'type' => 'varchar',
  14893. 'length' => '100',
  14894. 'not null' => FALSE,
  14895. ),
  14896. 'suffix' => array(
  14897. 'size' => 'normal',
  14898. 'type' => 'varchar',
  14899. 'length' => '100',
  14900. 'not null' => FALSE,
  14901. ),
  14902. ),
  14903. 'unique keys' => array(
  14904. 'pubauthor_c1' => array(
  14905. 0 => 'pub_id',
  14906. 1 => 'rank',
  14907. ),
  14908. ),
  14909. 'indexes' => array(
  14910. 'pubauthor_contact_idx1' => array(
  14911. 0 => 'pubauthor_id',
  14912. ),
  14913. 'pubauthor_idx2' => array(
  14914. 0 => 'pub_id',
  14915. ),
  14916. ),
  14917. 'primary key' => array(
  14918. 0 => 'pubauthor_id',
  14919. ),
  14920. 'foreign keys' => array(
  14921. 'pub' => array(
  14922. 'table' => 'pub',
  14923. 'columns' => array(
  14924. 'pub_id' => 'pub_id',
  14925. ),
  14926. ),
  14927. ),
  14928. 'referring_tables' => array(
  14929. 0 => 'pubauthor_contact',
  14930. ),
  14931. );
  14932. return $description;
  14933. }
  14934. /**
  14935. * Implements hook_chado_schema_v1_3_pubauthor_contact()
  14936. *
  14937. * Purpose: To describe the structure of 'pubauthor_contact' to tripal
  14938. * @see chado_insert_record()
  14939. * @see chado_update_record()
  14940. * @see chado_select_record()
  14941. * @see chado_generate_var()
  14942. * @see chado_expan_var()
  14943. *
  14944. * @return
  14945. * An array describing the 'pubauthor_contact' table
  14946. *
  14947. * @ingroup tripal_chado_v1.3_schema_api
  14948. *
  14949. */
  14950. function tripal_chado_chado_schema_v1_3_pubauthor_contact() {
  14951. $description = array(
  14952. 'description' => '',
  14953. 'table' => 'pubauthor_contact',
  14954. 'fields' => array(
  14955. 'pubauthor_contact_id' => array(
  14956. 'size' => 'big',
  14957. 'type' => 'serial',
  14958. 'not null' => TRUE,
  14959. ),
  14960. 'contact_id' => array(
  14961. 'size' => 'big',
  14962. 'type' => 'int',
  14963. 'not null' => TRUE,
  14964. ),
  14965. 'pubauthor_id' => array(
  14966. 'size' => 'big',
  14967. 'type' => 'int',
  14968. 'not null' => TRUE,
  14969. ),
  14970. ),
  14971. 'unique keys' => array(
  14972. 'pubauthor_contact_c1' => array(
  14973. 0 => 'contact_id',
  14974. 1 => 'pubauthor_id',
  14975. ),
  14976. ),
  14977. 'primary key' => array(
  14978. 0 => 'pubauthor_contact_id',
  14979. ),
  14980. 'foreign keys' => array(
  14981. 'pubauthor' => array(
  14982. 'table' => 'pubauthor',
  14983. 'columns' => array(
  14984. 'pubauthor_id' => 'pubauthor_id',
  14985. ),
  14986. ),
  14987. 'contact' => array(
  14988. 'table' => 'contact',
  14989. 'columns' => array(
  14990. 'contact_id' => 'contact_id',
  14991. ),
  14992. ),
  14993. ),
  14994. 'referring_tables' => array(
  14995. ),
  14996. );
  14997. return $description;
  14998. }
  14999. /**
  15000. * Implements hook_chado_schema_v1_3_pub_dbxref()
  15001. *
  15002. * Purpose: To describe the structure of 'pub_dbxref' to tripal
  15003. * @see chado_insert_record()
  15004. * @see chado_update_record()
  15005. * @see chado_select_record()
  15006. * @see chado_generate_var()
  15007. * @see chado_expan_var()
  15008. *
  15009. * @return
  15010. * An array describing the 'pub_dbxref' table
  15011. *
  15012. * @ingroup tripal_chado_v1.3_schema_api
  15013. *
  15014. */
  15015. function tripal_chado_chado_schema_v1_3_pub_dbxref() {
  15016. $description = array(
  15017. 'description' => '',
  15018. 'table' => 'pub_dbxref',
  15019. 'fields' => array(
  15020. 'pub_dbxref_id' => array(
  15021. 'size' => 'big',
  15022. 'type' => 'serial',
  15023. 'not null' => TRUE,
  15024. ),
  15025. 'pub_id' => array(
  15026. 'size' => 'big',
  15027. 'type' => 'int',
  15028. 'not null' => TRUE,
  15029. ),
  15030. 'dbxref_id' => array(
  15031. 'size' => 'big',
  15032. 'type' => 'int',
  15033. 'not null' => TRUE,
  15034. ),
  15035. 'is_current' => array(
  15036. 'size' => 'normal',
  15037. 'type' => 'boolean',
  15038. 'not null' => TRUE,
  15039. 'default' => 'true',
  15040. ),
  15041. ),
  15042. 'unique keys' => array(
  15043. 'pub_dbxref_c1' => array(
  15044. 0 => 'pub_id',
  15045. 1 => 'dbxref_id',
  15046. ),
  15047. ),
  15048. 'indexes' => array(
  15049. 'pub_dbxref_idx1' => array(
  15050. 0 => 'pub_id',
  15051. ),
  15052. 'pub_dbxref_idx2' => array(
  15053. 0 => 'dbxref_id',
  15054. ),
  15055. ),
  15056. 'primary key' => array(
  15057. 0 => 'pub_dbxref_id',
  15058. ),
  15059. 'foreign keys' => array(
  15060. 'pub' => array(
  15061. 'table' => 'pub',
  15062. 'columns' => array(
  15063. 'pub_id' => 'pub_id',
  15064. ),
  15065. ),
  15066. 'dbxref' => array(
  15067. 'table' => 'dbxref',
  15068. 'columns' => array(
  15069. 'dbxref_id' => 'dbxref_id',
  15070. ),
  15071. ),
  15072. ),
  15073. 'referring_tables' => array(
  15074. ),
  15075. );
  15076. return $description;
  15077. }
  15078. /**
  15079. * Implements hook_chado_schema_v1_3_pubprop()
  15080. *
  15081. * Purpose: To describe the structure of 'pubprop' to tripal
  15082. * @see chado_insert_record()
  15083. * @see chado_update_record()
  15084. * @see chado_select_record()
  15085. * @see chado_generate_var()
  15086. * @see chado_expan_var()
  15087. *
  15088. * @return
  15089. * An array describing the 'pubprop' table
  15090. *
  15091. * @ingroup tripal_chado_v1.3_schema_api
  15092. *
  15093. */
  15094. function tripal_chado_chado_schema_v1_3_pubprop() {
  15095. $description = array(
  15096. 'description' => '',
  15097. 'table' => 'pubprop',
  15098. 'fields' => array(
  15099. 'pubprop_id' => array(
  15100. 'size' => 'big',
  15101. 'type' => 'serial',
  15102. 'not null' => TRUE,
  15103. ),
  15104. 'pub_id' => array(
  15105. 'size' => 'big',
  15106. 'type' => 'int',
  15107. 'not null' => TRUE,
  15108. ),
  15109. 'type_id' => array(
  15110. 'size' => 'big',
  15111. 'type' => 'int',
  15112. 'not null' => TRUE,
  15113. ),
  15114. 'value' => array(
  15115. 'size' => 'normal',
  15116. 'type' => 'text',
  15117. 'not null' => TRUE,
  15118. ),
  15119. 'rank' => array(
  15120. 'size' => 'normal',
  15121. 'type' => 'int',
  15122. 'not null' => FALSE,
  15123. ),
  15124. ),
  15125. 'unique keys' => array(
  15126. 'pubprop_c1' => array(
  15127. 0 => 'pub_id',
  15128. 1 => 'type_id',
  15129. 2 => 'rank',
  15130. ),
  15131. ),
  15132. 'indexes' => array(
  15133. 'pubprop_idx1' => array(
  15134. 0 => 'pub_id',
  15135. ),
  15136. 'pubprop_idx2' => array(
  15137. 0 => 'type_id',
  15138. ),
  15139. ),
  15140. 'primary key' => array(
  15141. 0 => 'pubprop_id',
  15142. ),
  15143. 'foreign keys' => array(
  15144. 'pub' => array(
  15145. 'table' => 'pub',
  15146. 'columns' => array(
  15147. 'pub_id' => 'pub_id',
  15148. ),
  15149. ),
  15150. 'cvterm' => array(
  15151. 'table' => 'cvterm',
  15152. 'columns' => array(
  15153. 'type_id' => 'cvterm_id',
  15154. ),
  15155. ),
  15156. ),
  15157. 'referring_tables' => array(
  15158. ),
  15159. );
  15160. return $description;
  15161. }
  15162. /**
  15163. * Implements hook_chado_schema_v1_3_pub_relationship()
  15164. *
  15165. * Purpose: To describe the structure of 'pub_relationship' to tripal
  15166. * @see chado_insert_record()
  15167. * @see chado_update_record()
  15168. * @see chado_select_record()
  15169. * @see chado_generate_var()
  15170. * @see chado_expan_var()
  15171. *
  15172. * @return
  15173. * An array describing the 'pub_relationship' table
  15174. *
  15175. * @ingroup tripal_chado_v1.3_schema_api
  15176. *
  15177. */
  15178. function tripal_chado_chado_schema_v1_3_pub_relationship() {
  15179. $description = array(
  15180. 'description' => '',
  15181. 'table' => 'pub_relationship',
  15182. 'fields' => array(
  15183. 'pub_relationship_id' => array(
  15184. 'size' => 'big',
  15185. 'type' => 'serial',
  15186. 'not null' => TRUE,
  15187. ),
  15188. 'subject_id' => array(
  15189. 'size' => 'big',
  15190. 'type' => 'int',
  15191. 'not null' => TRUE,
  15192. ),
  15193. 'object_id' => array(
  15194. 'size' => 'big',
  15195. 'type' => 'int',
  15196. 'not null' => TRUE,
  15197. ),
  15198. 'type_id' => array(
  15199. 'size' => 'big',
  15200. 'type' => 'int',
  15201. 'not null' => TRUE,
  15202. ),
  15203. ),
  15204. 'unique keys' => array(
  15205. 'pub_relationship_c1' => array(
  15206. 0 => 'subject_id',
  15207. 1 => 'object_id',
  15208. 2 => 'type_id',
  15209. ),
  15210. ),
  15211. 'indexes' => array(
  15212. 'pub_relationship_idx1' => array(
  15213. 0 => 'subject_id',
  15214. ),
  15215. 'pub_relationship_idx2' => array(
  15216. 0 => 'object_id',
  15217. ),
  15218. 'pub_relationship_idx3' => array(
  15219. 0 => 'type_id',
  15220. ),
  15221. ),
  15222. 'primary key' => array(
  15223. 0 => 'pub_relationship_id',
  15224. ),
  15225. 'foreign keys' => array(
  15226. 'pub' => array(
  15227. 'table' => 'pub',
  15228. 'columns' => array(
  15229. 'subject_id' => 'pub_id',
  15230. 'object_id' => 'pub_id',
  15231. ),
  15232. ),
  15233. 'cvterm' => array(
  15234. 'table' => 'cvterm',
  15235. 'columns' => array(
  15236. 'type_id' => 'cvterm_id',
  15237. ),
  15238. ),
  15239. ),
  15240. 'referring_tables' => array(
  15241. ),
  15242. );
  15243. return $description;
  15244. }
  15245. /**
  15246. * Implements hook_chado_schema_v1_3_quantification()
  15247. *
  15248. * Purpose: To describe the structure of 'quantification' to tripal
  15249. * @see chado_insert_record()
  15250. * @see chado_update_record()
  15251. * @see chado_select_record()
  15252. * @see chado_generate_var()
  15253. * @see chado_expan_var()
  15254. *
  15255. * @return
  15256. * An array describing the 'quantification' table
  15257. *
  15258. * @ingroup tripal_chado_v1.3_schema_api
  15259. *
  15260. */
  15261. function tripal_chado_chado_schema_v1_3_quantification() {
  15262. $description = array(
  15263. 'description' => '',
  15264. 'table' => 'quantification',
  15265. 'fields' => array(
  15266. 'quantification_id' => array(
  15267. 'size' => 'big',
  15268. 'type' => 'serial',
  15269. 'not null' => TRUE,
  15270. ),
  15271. 'acquisition_id' => array(
  15272. 'size' => 'big',
  15273. 'type' => 'int',
  15274. 'not null' => TRUE,
  15275. ),
  15276. 'operator_id' => array(
  15277. 'size' => 'big',
  15278. 'type' => 'int',
  15279. 'not null' => FALSE,
  15280. ),
  15281. 'protocol_id' => array(
  15282. 'size' => 'big',
  15283. 'type' => 'int',
  15284. 'not null' => FALSE,
  15285. ),
  15286. 'analysis_id' => array(
  15287. 'size' => 'big',
  15288. 'type' => 'int',
  15289. 'not null' => TRUE,
  15290. ),
  15291. 'quantificationdate' => array(
  15292. 'size' => 'normal',
  15293. 'type' => 'datetime',
  15294. 'not null' => FALSE,
  15295. 'default' => 'now()',
  15296. ),
  15297. 'name' => array(
  15298. 'size' => 'normal',
  15299. 'type' => 'text',
  15300. 'not null' => FALSE,
  15301. ),
  15302. 'uri' => array(
  15303. 'size' => 'normal',
  15304. 'type' => 'text',
  15305. 'not null' => FALSE,
  15306. ),
  15307. ),
  15308. 'unique keys' => array(
  15309. 'quantification_c1' => array(
  15310. 0 => 'name',
  15311. 1 => 'analysis_id',
  15312. ),
  15313. ),
  15314. 'indexes' => array(
  15315. 'quantification_idx1' => array(
  15316. 0 => 'acquisition_id',
  15317. ),
  15318. 'quantification_idx2' => array(
  15319. 0 => 'operator_id',
  15320. ),
  15321. 'quantification_idx3' => array(
  15322. 0 => 'protocol_id',
  15323. ),
  15324. 'quantification_idx4' => array(
  15325. 0 => 'analysis_id',
  15326. ),
  15327. ),
  15328. 'primary key' => array(
  15329. 0 => 'quantification_id',
  15330. ),
  15331. 'foreign keys' => array(
  15332. 'acquisition' => array(
  15333. 'table' => 'acquisition',
  15334. 'columns' => array(
  15335. 'acquisition_id' => 'acquisition_id',
  15336. ),
  15337. ),
  15338. 'contact' => array(
  15339. 'table' => 'contact',
  15340. 'columns' => array(
  15341. 'operator_id' => 'contact_id',
  15342. ),
  15343. ),
  15344. 'protocol' => array(
  15345. 'table' => 'protocol',
  15346. 'columns' => array(
  15347. 'protocol_id' => 'protocol_id',
  15348. ),
  15349. ),
  15350. 'analysis' => array(
  15351. 'table' => 'analysis',
  15352. 'columns' => array(
  15353. 'analysis_id' => 'analysis_id',
  15354. ),
  15355. ),
  15356. ),
  15357. 'referring_tables' => array(
  15358. 0 => 'elementresult',
  15359. 1 => 'quantificationprop',
  15360. 2 => 'quantification_relationship',
  15361. ),
  15362. );
  15363. return $description;
  15364. }
  15365. /**
  15366. * Implements hook_chado_schema_v1_3_quantificationprop()
  15367. *
  15368. * Purpose: To describe the structure of 'quantificationprop' to tripal
  15369. * @see chado_insert_record()
  15370. * @see chado_update_record()
  15371. * @see chado_select_record()
  15372. * @see chado_generate_var()
  15373. * @see chado_expan_var()
  15374. *
  15375. * @return
  15376. * An array describing the 'quantificationprop' table
  15377. *
  15378. * @ingroup tripal_chado_v1.3_schema_api
  15379. *
  15380. */
  15381. function tripal_chado_chado_schema_v1_3_quantificationprop() {
  15382. $description = array(
  15383. 'description' => '',
  15384. 'table' => 'quantificationprop',
  15385. 'fields' => array(
  15386. 'quantificationprop_id' => array(
  15387. 'size' => 'big',
  15388. 'type' => 'serial',
  15389. 'not null' => TRUE,
  15390. ),
  15391. 'quantification_id' => array(
  15392. 'size' => 'big',
  15393. 'type' => 'int',
  15394. 'not null' => TRUE,
  15395. ),
  15396. 'type_id' => array(
  15397. 'size' => 'big',
  15398. 'type' => 'int',
  15399. 'not null' => TRUE,
  15400. ),
  15401. 'value' => array(
  15402. 'size' => 'normal',
  15403. 'type' => 'text',
  15404. 'not null' => FALSE,
  15405. ),
  15406. 'rank' => array(
  15407. 'size' => 'normal',
  15408. 'type' => 'int',
  15409. 'not null' => TRUE,
  15410. 'default' => 0,
  15411. ),
  15412. ),
  15413. 'unique keys' => array(
  15414. 'quantificationprop_c1' => array(
  15415. 0 => 'quantification_id',
  15416. 1 => 'type_id',
  15417. 2 => 'rank',
  15418. ),
  15419. ),
  15420. 'indexes' => array(
  15421. 'quantificationprop_idx1' => array(
  15422. 0 => 'quantification_id',
  15423. ),
  15424. 'quantificationprop_idx2' => array(
  15425. 0 => 'type_id',
  15426. ),
  15427. ),
  15428. 'primary key' => array(
  15429. 0 => 'quantificationprop_id',
  15430. ),
  15431. 'foreign keys' => array(
  15432. 'quantification' => array(
  15433. 'table' => 'quantification',
  15434. 'columns' => array(
  15435. 'quantification_id' => 'quantification_id',
  15436. ),
  15437. ),
  15438. 'cvterm' => array(
  15439. 'table' => 'cvterm',
  15440. 'columns' => array(
  15441. 'type_id' => 'cvterm_id',
  15442. ),
  15443. ),
  15444. ),
  15445. 'referring_tables' => array(
  15446. ),
  15447. );
  15448. return $description;
  15449. }
  15450. /**
  15451. * Implements hook_chado_schema_v1_3_quantification_relationship()
  15452. *
  15453. * Purpose: To describe the structure of 'quantification_relationship' to tripal
  15454. * @see chado_insert_record()
  15455. * @see chado_update_record()
  15456. * @see chado_select_record()
  15457. * @see chado_generate_var()
  15458. * @see chado_expan_var()
  15459. *
  15460. * @return
  15461. * An array describing the 'quantification_relationship' table
  15462. *
  15463. * @ingroup tripal_chado_v1.3_schema_api
  15464. *
  15465. */
  15466. function tripal_chado_chado_schema_v1_3_quantification_relationship() {
  15467. $description = array(
  15468. 'description' => '',
  15469. 'table' => 'quantification_relationship',
  15470. 'fields' => array(
  15471. 'quantification_relationship_id' => array(
  15472. 'size' => 'big',
  15473. 'type' => 'serial',
  15474. 'not null' => TRUE,
  15475. ),
  15476. 'subject_id' => array(
  15477. 'size' => 'big',
  15478. 'type' => 'int',
  15479. 'not null' => TRUE,
  15480. ),
  15481. 'type_id' => array(
  15482. 'size' => 'big',
  15483. 'type' => 'int',
  15484. 'not null' => TRUE,
  15485. ),
  15486. 'object_id' => array(
  15487. 'size' => 'big',
  15488. 'type' => 'int',
  15489. 'not null' => TRUE,
  15490. ),
  15491. ),
  15492. 'unique keys' => array(
  15493. 'quantification_relationship_c1' => array(
  15494. 0 => 'subject_id',
  15495. 1 => 'object_id',
  15496. 2 => 'type_id',
  15497. ),
  15498. ),
  15499. 'indexes' => array(
  15500. 'quantification_relationship_idx1' => array(
  15501. 0 => 'subject_id',
  15502. ),
  15503. 'quantification_relationship_idx2' => array(
  15504. 0 => 'type_id',
  15505. ),
  15506. 'quantification_relationship_idx3' => array(
  15507. 0 => 'object_id',
  15508. ),
  15509. ),
  15510. 'primary key' => array(
  15511. 0 => 'quantification_relationship_id',
  15512. ),
  15513. 'foreign keys' => array(
  15514. 'quantification' => array(
  15515. 'table' => 'quantification',
  15516. 'columns' => array(
  15517. 'subject_id' => 'quantification_id',
  15518. 'object_id' => 'quantification_id',
  15519. ),
  15520. ),
  15521. 'cvterm' => array(
  15522. 'table' => 'cvterm',
  15523. 'columns' => array(
  15524. 'type_id' => 'cvterm_id',
  15525. ),
  15526. ),
  15527. ),
  15528. 'referring_tables' => array(
  15529. ),
  15530. );
  15531. return $description;
  15532. }
  15533. /**
  15534. * Implements hook_chado_schema_v1_3_stock()
  15535. *
  15536. * Purpose: To describe the structure of 'stock' to tripal
  15537. * @see chado_insert_record()
  15538. * @see chado_update_record()
  15539. * @see chado_select_record()
  15540. * @see chado_generate_var()
  15541. * @see chado_expan_var()
  15542. *
  15543. * @return
  15544. * An array describing the 'stock' table
  15545. *
  15546. * @ingroup tripal_chado_v1.3_schema_api
  15547. *
  15548. */
  15549. function tripal_chado_chado_schema_v1_3_stock() {
  15550. $description = array(
  15551. 'description' => '',
  15552. 'table' => 'stock',
  15553. 'fields' => array(
  15554. 'stock_id' => array(
  15555. 'size' => 'big',
  15556. 'type' => 'serial',
  15557. 'not null' => TRUE,
  15558. ),
  15559. 'dbxref_id' => array(
  15560. 'size' => 'big',
  15561. 'type' => 'int',
  15562. 'not null' => FALSE,
  15563. ),
  15564. 'organism_id' => array(
  15565. 'size' => 'big',
  15566. 'type' => 'int',
  15567. 'not null' => FALSE,
  15568. ),
  15569. 'name' => array(
  15570. 'size' => 'normal',
  15571. 'type' => 'varchar',
  15572. 'length' => '255',
  15573. 'not null' => FALSE,
  15574. ),
  15575. 'uniquename' => array(
  15576. 'size' => 'normal',
  15577. 'type' => 'text',
  15578. 'not null' => TRUE,
  15579. ),
  15580. 'description' => array(
  15581. 'size' => 'normal',
  15582. 'type' => 'text',
  15583. 'not null' => FALSE,
  15584. ),
  15585. 'type_id' => array(
  15586. 'size' => 'big',
  15587. 'type' => 'int',
  15588. 'not null' => TRUE,
  15589. ),
  15590. 'is_obsolete' => array(
  15591. 'size' => 'normal',
  15592. 'type' => 'boolean',
  15593. 'not null' => TRUE,
  15594. 'default' => FALSE,
  15595. ),
  15596. ),
  15597. 'unique keys' => array(
  15598. 'stock_c1' => array(
  15599. 0 => 'organism_id',
  15600. 1 => 'uniquename',
  15601. 2 => 'type_id',
  15602. ),
  15603. ),
  15604. 'indexes' => array(
  15605. 'stock_idx1' => array(
  15606. 0 => 'dbxref_id',
  15607. ),
  15608. 'stock_idx2' => array(
  15609. 0 => 'organism_id',
  15610. ),
  15611. 'stock_idx3' => array(
  15612. 0 => 'type_id',
  15613. ),
  15614. 'stock_idx4' => array(
  15615. 0 => 'uniquename',
  15616. ),
  15617. 'stock_name_ind1' => array(
  15618. 0 => 'name',
  15619. ),
  15620. ),
  15621. 'primary key' => array(
  15622. 0 => 'stock_id',
  15623. ),
  15624. 'foreign keys' => array(
  15625. 'dbxref' => array(
  15626. 'table' => 'dbxref',
  15627. 'columns' => array(
  15628. 'dbxref_id' => 'dbxref_id',
  15629. ),
  15630. ),
  15631. 'organism' => array(
  15632. 'table' => 'organism',
  15633. 'columns' => array(
  15634. 'organism_id' => 'organism_id',
  15635. ),
  15636. ),
  15637. 'cvterm' => array(
  15638. 'table' => 'cvterm',
  15639. 'columns' => array(
  15640. 'type_id' => 'cvterm_id',
  15641. ),
  15642. ),
  15643. ),
  15644. 'referring_tables' => array(
  15645. 0 => 'nd_experiment_stock',
  15646. 1 => 'project_stock',
  15647. 2 => 'stockcollection_stock',
  15648. 3 => 'stock_cvterm',
  15649. 4 => 'stock_dbxref',
  15650. 5 => 'stock_feature',
  15651. 6 => 'stock_featuremap',
  15652. 7 => 'stock_genotype',
  15653. 8 => 'stock_library',
  15654. 9 => 'stockprop',
  15655. 10 => 'stock_pub',
  15656. 11 => 'stock_relationship',
  15657. ),
  15658. );
  15659. return $description;
  15660. }
  15661. /**
  15662. * Implements hook_chado_schema_v1_3_stockcollection()
  15663. *
  15664. * Purpose: To describe the structure of 'stockcollection' to tripal
  15665. * @see chado_insert_record()
  15666. * @see chado_update_record()
  15667. * @see chado_select_record()
  15668. * @see chado_generate_var()
  15669. * @see chado_expan_var()
  15670. *
  15671. * @return
  15672. * An array describing the 'stockcollection' table
  15673. *
  15674. * @ingroup tripal_chado_v1.3_schema_api
  15675. *
  15676. */
  15677. function tripal_chado_chado_schema_v1_3_stockcollection() {
  15678. $description = array(
  15679. 'description' => '',
  15680. 'table' => 'stockcollection',
  15681. 'fields' => array(
  15682. 'stockcollection_id' => array(
  15683. 'size' => 'big',
  15684. 'type' => 'serial',
  15685. 'not null' => TRUE,
  15686. ),
  15687. 'type_id' => array(
  15688. 'size' => 'big',
  15689. 'type' => 'int',
  15690. 'not null' => TRUE,
  15691. ),
  15692. 'contact_id' => array(
  15693. 'size' => 'big',
  15694. 'type' => 'int',
  15695. 'not null' => FALSE,
  15696. ),
  15697. 'name' => array(
  15698. 'size' => 'normal',
  15699. 'type' => 'varchar',
  15700. 'length' => '255',
  15701. 'not null' => FALSE,
  15702. ),
  15703. 'uniquename' => array(
  15704. 'size' => 'normal',
  15705. 'type' => 'text',
  15706. 'not null' => TRUE,
  15707. ),
  15708. ),
  15709. 'unique keys' => array(
  15710. 'stockcollection_c1' => array(
  15711. 0 => 'uniquename',
  15712. 1 => 'type_id',
  15713. ),
  15714. ),
  15715. 'indexes' => array(
  15716. 'stockcollection_idx1' => array(
  15717. 0 => 'contact_id',
  15718. ),
  15719. 'stockcollection_idx2' => array(
  15720. 0 => 'type_id',
  15721. ),
  15722. 'stockcollection_idx3' => array(
  15723. 0 => 'uniquename',
  15724. ),
  15725. 'stockcollection_name_ind1' => array(
  15726. 0 => 'name',
  15727. ),
  15728. ),
  15729. 'primary key' => array(
  15730. 0 => 'stockcollection_id',
  15731. ),
  15732. 'foreign keys' => array(
  15733. 'cvterm' => array(
  15734. 'table' => 'cvterm',
  15735. 'columns' => array(
  15736. 'type_id' => 'cvterm_id',
  15737. ),
  15738. ),
  15739. 'contact' => array(
  15740. 'table' => 'contact',
  15741. 'columns' => array(
  15742. 'contact_id' => 'contact_id',
  15743. ),
  15744. ),
  15745. ),
  15746. 'referring_tables' => array(
  15747. 0 => 'stockcollection_db',
  15748. 1 => 'stockcollectionprop',
  15749. 2 => 'stockcollection_stock',
  15750. ),
  15751. );
  15752. return $description;
  15753. }
  15754. /**
  15755. * Implements hook_chado_schema_v1_3_stockcollection_db()
  15756. *
  15757. * Purpose: To describe the structure of 'stockcollection_db' to tripal
  15758. * @see chado_insert_record()
  15759. * @see chado_update_record()
  15760. * @see chado_select_record()
  15761. * @see chado_generate_var()
  15762. * @see chado_expan_var()
  15763. *
  15764. * @return
  15765. * An array describing the 'stockcollection_db' table
  15766. *
  15767. * @ingroup tripal_chado_v1.3_schema_api
  15768. *
  15769. */
  15770. function tripal_chado_chado_schema_v1_3_stockcollection_db() {
  15771. $description = array(
  15772. 'description' => '',
  15773. 'table' => 'stockcollection_db',
  15774. 'fields' => array(
  15775. 'stockcollection_db_id' => array(
  15776. 'size' => 'big',
  15777. 'type' => 'serial',
  15778. 'not null' => TRUE,
  15779. ),
  15780. 'stockcollection_id' => array(
  15781. 'size' => 'big',
  15782. 'type' => 'int',
  15783. 'not null' => TRUE,
  15784. ),
  15785. 'db_id' => array(
  15786. 'size' => 'big',
  15787. 'type' => 'int',
  15788. 'not null' => TRUE,
  15789. ),
  15790. ),
  15791. 'unique keys' => array(
  15792. 'stockcollection_db_c1' => array(
  15793. 0 => 'stockcollection_id',
  15794. 1 => 'db_id',
  15795. ),
  15796. ),
  15797. 'indexes' => array(
  15798. 'stockcollection_db_idx1' => array(
  15799. 0 => 'stockcollection_id',
  15800. ),
  15801. 'stockcollection_db_idx2' => array(
  15802. 0 => 'db_id',
  15803. ),
  15804. ),
  15805. 'primary key' => array(
  15806. 0 => 'stockcollection_db_id',
  15807. ),
  15808. 'foreign keys' => array(
  15809. 'db' => array(
  15810. 'table' => 'db',
  15811. 'columns' => array(
  15812. 'db_id' => 'db_id',
  15813. ),
  15814. ),
  15815. 'stockcollection' => array(
  15816. 'table' => 'stockcollection',
  15817. 'columns' => array(
  15818. 'stockcollection_id' => 'stockcollection_id',
  15819. ),
  15820. ),
  15821. ),
  15822. 'referring_tables' => array(
  15823. ),
  15824. );
  15825. return $description;
  15826. }
  15827. /**
  15828. * Implements hook_chado_schema_v1_3_stockcollectionprop()
  15829. *
  15830. * Purpose: To describe the structure of 'stockcollectionprop' to tripal
  15831. * @see chado_insert_record()
  15832. * @see chado_update_record()
  15833. * @see chado_select_record()
  15834. * @see chado_generate_var()
  15835. * @see chado_expan_var()
  15836. *
  15837. * @return
  15838. * An array describing the 'stockcollectionprop' table
  15839. *
  15840. * @ingroup tripal_chado_v1.3_schema_api
  15841. *
  15842. */
  15843. function tripal_chado_chado_schema_v1_3_stockcollectionprop() {
  15844. $description = array(
  15845. 'description' => '',
  15846. 'table' => 'stockcollectionprop',
  15847. 'fields' => array(
  15848. 'stockcollectionprop_id' => array(
  15849. 'size' => 'big',
  15850. 'type' => 'serial',
  15851. 'not null' => TRUE,
  15852. ),
  15853. 'stockcollection_id' => array(
  15854. 'size' => 'big',
  15855. 'type' => 'int',
  15856. 'not null' => TRUE,
  15857. ),
  15858. 'type_id' => array(
  15859. 'size' => 'big',
  15860. 'type' => 'int',
  15861. 'not null' => TRUE,
  15862. ),
  15863. 'value' => array(
  15864. 'size' => 'normal',
  15865. 'type' => 'text',
  15866. 'not null' => FALSE,
  15867. ),
  15868. 'rank' => array(
  15869. 'size' => 'normal',
  15870. 'type' => 'int',
  15871. 'not null' => TRUE,
  15872. 'default' => 0,
  15873. ),
  15874. ),
  15875. 'unique keys' => array(
  15876. 'stockcollectionprop_c1' => array(
  15877. 0 => 'stockcollection_id',
  15878. 1 => 'type_id',
  15879. 2 => 'rank',
  15880. ),
  15881. ),
  15882. 'indexes' => array(
  15883. 'stockcollectionprop_idx1' => array(
  15884. 0 => 'stockcollection_id',
  15885. ),
  15886. 'stockcollectionprop_idx2' => array(
  15887. 0 => 'type_id',
  15888. ),
  15889. ),
  15890. 'primary key' => array(
  15891. 0 => 'stockcollectionprop_id',
  15892. ),
  15893. 'foreign keys' => array(
  15894. 'stockcollection' => array(
  15895. 'table' => 'stockcollection',
  15896. 'columns' => array(
  15897. 'stockcollection_id' => 'stockcollection_id',
  15898. ),
  15899. ),
  15900. 'cvterm' => array(
  15901. 'table' => 'cvterm',
  15902. 'columns' => array(
  15903. 'type_id' => 'cvterm_id',
  15904. ),
  15905. ),
  15906. ),
  15907. 'referring_tables' => array(
  15908. ),
  15909. );
  15910. return $description;
  15911. }
  15912. /**
  15913. * Implements hook_chado_schema_v1_3_stockcollection_stock()
  15914. *
  15915. * Purpose: To describe the structure of 'stockcollection_stock' to tripal
  15916. * @see chado_insert_record()
  15917. * @see chado_update_record()
  15918. * @see chado_select_record()
  15919. * @see chado_generate_var()
  15920. * @see chado_expan_var()
  15921. *
  15922. * @return
  15923. * An array describing the 'stockcollection_stock' table
  15924. *
  15925. * @ingroup tripal_chado_v1.3_schema_api
  15926. *
  15927. */
  15928. function tripal_chado_chado_schema_v1_3_stockcollection_stock() {
  15929. $description = array(
  15930. 'description' => '',
  15931. 'table' => 'stockcollection_stock',
  15932. 'fields' => array(
  15933. 'stockcollection_stock_id' => array(
  15934. 'size' => 'big',
  15935. 'type' => 'serial',
  15936. 'not null' => TRUE,
  15937. ),
  15938. 'stockcollection_id' => array(
  15939. 'size' => 'big',
  15940. 'type' => 'int',
  15941. 'not null' => TRUE,
  15942. ),
  15943. 'stock_id' => array(
  15944. 'size' => 'big',
  15945. 'type' => 'int',
  15946. 'not null' => TRUE,
  15947. ),
  15948. ),
  15949. 'unique keys' => array(
  15950. 'stockcollection_stock_c1' => array(
  15951. 0 => 'stockcollection_id',
  15952. 1 => 'stock_id',
  15953. ),
  15954. ),
  15955. 'indexes' => array(
  15956. 'stockcollection_stock_idx1' => array(
  15957. 0 => 'stockcollection_id',
  15958. ),
  15959. 'stockcollection_stock_idx2' => array(
  15960. 0 => 'stock_id',
  15961. ),
  15962. ),
  15963. 'primary key' => array(
  15964. 0 => 'stockcollection_stock_id',
  15965. ),
  15966. 'foreign keys' => array(
  15967. 'stockcollection' => array(
  15968. 'table' => 'stockcollection',
  15969. 'columns' => array(
  15970. 'stockcollection_id' => 'stockcollection_id',
  15971. ),
  15972. ),
  15973. 'stock' => array(
  15974. 'table' => 'stock',
  15975. 'columns' => array(
  15976. 'stock_id' => 'stock_id',
  15977. ),
  15978. ),
  15979. ),
  15980. 'referring_tables' => array(
  15981. ),
  15982. );
  15983. return $description;
  15984. }
  15985. /**
  15986. * Implements hook_chado_schema_v1_3_stock_cvterm()
  15987. *
  15988. * Purpose: To describe the structure of 'stock_cvterm' to tripal
  15989. * @see chado_insert_record()
  15990. * @see chado_update_record()
  15991. * @see chado_select_record()
  15992. * @see chado_generate_var()
  15993. * @see chado_expan_var()
  15994. *
  15995. * @return
  15996. * An array describing the 'stock_cvterm' table
  15997. *
  15998. * @ingroup tripal_chado_v1.3_schema_api
  15999. *
  16000. */
  16001. function tripal_chado_chado_schema_v1_3_stock_cvterm() {
  16002. $description = array(
  16003. 'description' => '',
  16004. 'table' => 'stock_cvterm',
  16005. 'fields' => array(
  16006. 'stock_cvterm_id' => array(
  16007. 'size' => 'big',
  16008. 'type' => 'serial',
  16009. 'not null' => TRUE,
  16010. ),
  16011. 'stock_id' => array(
  16012. 'size' => 'big',
  16013. 'type' => 'int',
  16014. 'not null' => TRUE,
  16015. ),
  16016. 'cvterm_id' => array(
  16017. 'size' => 'big',
  16018. 'type' => 'int',
  16019. 'not null' => TRUE,
  16020. ),
  16021. 'pub_id' => array(
  16022. 'size' => 'big',
  16023. 'type' => 'int',
  16024. 'not null' => TRUE,
  16025. ),
  16026. 'is_not' => array(
  16027. 'size' => 'normal',
  16028. 'type' => 'boolean',
  16029. 'not null' => TRUE,
  16030. 'default' => FALSE,
  16031. ),
  16032. 'rank' => array(
  16033. 'size' => 'normal',
  16034. 'type' => 'int',
  16035. 'not null' => TRUE,
  16036. 'default' => 0,
  16037. ),
  16038. ),
  16039. 'unique keys' => array(
  16040. 'stock_cvterm_c1' => array(
  16041. 0 => 'stock_id',
  16042. 1 => 'cvterm_id',
  16043. 2 => 'pub_id',
  16044. 3 => 'rank',
  16045. ),
  16046. ),
  16047. 'indexes' => array(
  16048. 'stock_cvterm_idx1' => array(
  16049. 0 => 'stock_id',
  16050. ),
  16051. 'stock_cvterm_idx2' => array(
  16052. 0 => 'cvterm_id',
  16053. ),
  16054. 'stock_cvterm_idx3' => array(
  16055. 0 => 'pub_id',
  16056. ),
  16057. ),
  16058. 'primary key' => array(
  16059. 0 => 'stock_cvterm_id',
  16060. ),
  16061. 'foreign keys' => array(
  16062. 'stock' => array(
  16063. 'table' => 'stock',
  16064. 'columns' => array(
  16065. 'stock_id' => 'stock_id',
  16066. ),
  16067. ),
  16068. 'cvterm' => array(
  16069. 'table' => 'cvterm',
  16070. 'columns' => array(
  16071. 'cvterm_id' => 'cvterm_id',
  16072. ),
  16073. ),
  16074. 'pub' => array(
  16075. 'table' => 'pub',
  16076. 'columns' => array(
  16077. 'pub_id' => 'pub_id',
  16078. ),
  16079. ),
  16080. ),
  16081. 'referring_tables' => array(
  16082. 0 => 'stock_cvtermprop',
  16083. ),
  16084. );
  16085. return $description;
  16086. }
  16087. /**
  16088. * Implements hook_chado_schema_v1_3_stock_cvtermprop()
  16089. *
  16090. * Purpose: To describe the structure of 'stock_cvtermprop' to tripal
  16091. * @see chado_insert_record()
  16092. * @see chado_update_record()
  16093. * @see chado_select_record()
  16094. * @see chado_generate_var()
  16095. * @see chado_expan_var()
  16096. *
  16097. * @return
  16098. * An array describing the 'stock_cvtermprop' table
  16099. *
  16100. * @ingroup tripal_chado_v1.3_schema_api
  16101. *
  16102. */
  16103. function tripal_chado_chado_schema_v1_3_stock_cvtermprop() {
  16104. $description = array(
  16105. 'description' => '',
  16106. 'table' => 'stock_cvtermprop',
  16107. 'fields' => array(
  16108. 'stock_cvtermprop_id' => array(
  16109. 'size' => 'big',
  16110. 'type' => 'serial',
  16111. 'not null' => TRUE,
  16112. ),
  16113. 'stock_cvterm_id' => array(
  16114. 'size' => 'big',
  16115. 'type' => 'int',
  16116. 'not null' => TRUE,
  16117. ),
  16118. 'type_id' => array(
  16119. 'size' => 'big',
  16120. 'type' => 'int',
  16121. 'not null' => TRUE,
  16122. ),
  16123. 'value' => array(
  16124. 'size' => 'normal',
  16125. 'type' => 'text',
  16126. 'not null' => FALSE,
  16127. ),
  16128. 'rank' => array(
  16129. 'size' => 'normal',
  16130. 'type' => 'int',
  16131. 'not null' => TRUE,
  16132. 'default' => 0,
  16133. ),
  16134. ),
  16135. 'unique keys' => array(
  16136. 'stock_cvtermprop_c1' => array(
  16137. 0 => 'stock_cvterm_id',
  16138. 1 => 'type_id',
  16139. 2 => 'rank',
  16140. ),
  16141. ),
  16142. 'indexes' => array(
  16143. 'stock_cvtermprop_idx1' => array(
  16144. 0 => 'stock_cvterm_id',
  16145. ),
  16146. 'stock_cvtermprop_idx2' => array(
  16147. 0 => 'type_id',
  16148. ),
  16149. ),
  16150. 'primary key' => array(
  16151. 0 => 'stock_cvtermprop_id',
  16152. ),
  16153. 'foreign keys' => array(
  16154. 'stock_cvterm' => array(
  16155. 'table' => 'stock_cvterm',
  16156. 'columns' => array(
  16157. 'stock_cvterm_id' => 'stock_cvterm_id',
  16158. ),
  16159. ),
  16160. 'cvterm' => array(
  16161. 'table' => 'cvterm',
  16162. 'columns' => array(
  16163. 'type_id' => 'cvterm_id',
  16164. ),
  16165. ),
  16166. ),
  16167. 'referring_tables' => array(
  16168. ),
  16169. );
  16170. return $description;
  16171. }
  16172. /**
  16173. * Implements hook_chado_schema_v1_3_stock_dbxref()
  16174. *
  16175. * Purpose: To describe the structure of 'stock_dbxref' to tripal
  16176. * @see chado_insert_record()
  16177. * @see chado_update_record()
  16178. * @see chado_select_record()
  16179. * @see chado_generate_var()
  16180. * @see chado_expan_var()
  16181. *
  16182. * @return
  16183. * An array describing the 'stock_dbxref' table
  16184. *
  16185. * @ingroup tripal_chado_v1.3_schema_api
  16186. *
  16187. */
  16188. function tripal_chado_chado_schema_v1_3_stock_dbxref() {
  16189. $description = array(
  16190. 'description' => '',
  16191. 'table' => 'stock_dbxref',
  16192. 'fields' => array(
  16193. 'stock_dbxref_id' => array(
  16194. 'size' => 'big',
  16195. 'type' => 'serial',
  16196. 'not null' => TRUE,
  16197. ),
  16198. 'stock_id' => array(
  16199. 'size' => 'big',
  16200. 'type' => 'int',
  16201. 'not null' => TRUE,
  16202. ),
  16203. 'dbxref_id' => array(
  16204. 'size' => 'big',
  16205. 'type' => 'int',
  16206. 'not null' => TRUE,
  16207. ),
  16208. 'is_current' => array(
  16209. 'size' => 'normal',
  16210. 'type' => 'boolean',
  16211. 'not null' => TRUE,
  16212. 'default' => 'true',
  16213. ),
  16214. ),
  16215. 'unique keys' => array(
  16216. 'stock_dbxref_c1' => array(
  16217. 0 => 'stock_id',
  16218. 1 => 'dbxref_id',
  16219. ),
  16220. ),
  16221. 'indexes' => array(
  16222. 'stock_dbxref_idx1' => array(
  16223. 0 => 'stock_id',
  16224. ),
  16225. 'stock_dbxref_idx2' => array(
  16226. 0 => 'dbxref_id',
  16227. ),
  16228. ),
  16229. 'primary key' => array(
  16230. 0 => 'stock_dbxref_id',
  16231. ),
  16232. 'foreign keys' => array(
  16233. 'stock' => array(
  16234. 'table' => 'stock',
  16235. 'columns' => array(
  16236. 'stock_id' => 'stock_id',
  16237. ),
  16238. ),
  16239. 'dbxref' => array(
  16240. 'table' => 'dbxref',
  16241. 'columns' => array(
  16242. 'dbxref_id' => 'dbxref_id',
  16243. ),
  16244. ),
  16245. ),
  16246. 'referring_tables' => array(
  16247. 0 => 'stock_dbxrefprop',
  16248. ),
  16249. );
  16250. return $description;
  16251. }
  16252. /**
  16253. * Implements hook_chado_schema_v1_3_stock_dbxrefprop()
  16254. *
  16255. * Purpose: To describe the structure of 'stock_dbxrefprop' to tripal
  16256. * @see chado_insert_record()
  16257. * @see chado_update_record()
  16258. * @see chado_select_record()
  16259. * @see chado_generate_var()
  16260. * @see chado_expan_var()
  16261. *
  16262. * @return
  16263. * An array describing the 'stock_dbxrefprop' table
  16264. *
  16265. * @ingroup tripal_chado_v1.3_schema_api
  16266. *
  16267. */
  16268. function tripal_chado_chado_schema_v1_3_stock_dbxrefprop() {
  16269. $description = array(
  16270. 'description' => '',
  16271. 'table' => 'stock_dbxrefprop',
  16272. 'fields' => array(
  16273. 'stock_dbxrefprop_id' => array(
  16274. 'size' => 'big',
  16275. 'type' => 'serial',
  16276. 'not null' => TRUE,
  16277. ),
  16278. 'stock_dbxref_id' => array(
  16279. 'size' => 'big',
  16280. 'type' => 'int',
  16281. 'not null' => TRUE,
  16282. ),
  16283. 'type_id' => array(
  16284. 'size' => 'big',
  16285. 'type' => 'int',
  16286. 'not null' => TRUE,
  16287. ),
  16288. 'value' => array(
  16289. 'size' => 'normal',
  16290. 'type' => 'text',
  16291. 'not null' => FALSE,
  16292. ),
  16293. 'rank' => array(
  16294. 'size' => 'normal',
  16295. 'type' => 'int',
  16296. 'not null' => TRUE,
  16297. 'default' => 0,
  16298. ),
  16299. ),
  16300. 'unique keys' => array(
  16301. 'stock_dbxrefprop_c1' => array(
  16302. 0 => 'stock_dbxref_id',
  16303. 1 => 'type_id',
  16304. 2 => 'rank',
  16305. ),
  16306. ),
  16307. 'indexes' => array(
  16308. 'stock_dbxrefprop_idx1' => array(
  16309. 0 => 'stock_dbxref_id',
  16310. ),
  16311. 'stock_dbxrefprop_idx2' => array(
  16312. 0 => 'type_id',
  16313. ),
  16314. ),
  16315. 'primary key' => array(
  16316. 0 => 'stock_dbxrefprop_id',
  16317. ),
  16318. 'foreign keys' => array(
  16319. 'stock_dbxref' => array(
  16320. 'table' => 'stock_dbxref',
  16321. 'columns' => array(
  16322. 'stock_dbxref_id' => 'stock_dbxref_id',
  16323. ),
  16324. ),
  16325. 'cvterm' => array(
  16326. 'table' => 'cvterm',
  16327. 'columns' => array(
  16328. 'type_id' => 'cvterm_id',
  16329. ),
  16330. ),
  16331. ),
  16332. 'referring_tables' => array(
  16333. ),
  16334. );
  16335. return $description;
  16336. }
  16337. /**
  16338. * Implements hook_chado_schema_v1_3_stock_feature()
  16339. *
  16340. * Purpose: To describe the structure of 'stock_feature' to tripal
  16341. * @see chado_insert_record()
  16342. * @see chado_update_record()
  16343. * @see chado_select_record()
  16344. * @see chado_generate_var()
  16345. * @see chado_expan_var()
  16346. *
  16347. * @return
  16348. * An array describing the 'stock_feature' table
  16349. *
  16350. * @ingroup tripal_chado_v1.3_schema_api
  16351. *
  16352. */
  16353. function tripal_chado_chado_schema_v1_3_stock_feature() {
  16354. $description = array(
  16355. 'description' => '',
  16356. 'table' => 'stock_feature',
  16357. 'fields' => array(
  16358. 'stock_feature_id' => array(
  16359. 'size' => 'big',
  16360. 'type' => 'serial',
  16361. 'not null' => TRUE,
  16362. ),
  16363. 'feature_id' => array(
  16364. 'size' => 'big',
  16365. 'type' => 'int',
  16366. 'not null' => TRUE,
  16367. ),
  16368. 'stock_id' => array(
  16369. 'size' => 'big',
  16370. 'type' => 'int',
  16371. 'not null' => TRUE,
  16372. ),
  16373. 'type_id' => array(
  16374. 'size' => 'big',
  16375. 'type' => 'int',
  16376. 'not null' => TRUE,
  16377. ),
  16378. 'rank' => array(
  16379. 'size' => 'normal',
  16380. 'type' => 'int',
  16381. 'not null' => TRUE,
  16382. 'default' => 0,
  16383. ),
  16384. ),
  16385. 'unique keys' => array(
  16386. 'stock_feature_c1' => array(
  16387. 0 => 'feature_id',
  16388. 1 => 'stock_id',
  16389. 2 => 'type_id',
  16390. 3 => 'rank',
  16391. ),
  16392. ),
  16393. 'indexes' => array(
  16394. 'stock_feature_idx1' => array(
  16395. 0 => 'stock_feature_id',
  16396. ),
  16397. 'stock_feature_idx2' => array(
  16398. 0 => 'feature_id',
  16399. ),
  16400. 'stock_feature_idx3' => array(
  16401. 0 => 'stock_id',
  16402. ),
  16403. 'stock_feature_idx4' => array(
  16404. 0 => 'type_id',
  16405. ),
  16406. ),
  16407. 'primary key' => array(
  16408. 0 => 'stock_feature_id',
  16409. ),
  16410. 'foreign keys' => array(
  16411. 'feature' => array(
  16412. 'table' => 'feature',
  16413. 'columns' => array(
  16414. 'feature_id' => 'feature_id',
  16415. ),
  16416. ),
  16417. 'stock' => array(
  16418. 'table' => 'stock',
  16419. 'columns' => array(
  16420. 'stock_id' => 'stock_id',
  16421. ),
  16422. ),
  16423. 'cvterm' => array(
  16424. 'table' => 'cvterm',
  16425. 'columns' => array(
  16426. 'type_id' => 'cvterm_id',
  16427. ),
  16428. ),
  16429. ),
  16430. 'referring_tables' => array(
  16431. ),
  16432. );
  16433. return $description;
  16434. }
  16435. /**
  16436. * Implements hook_chado_schema_v1_3_stock_featuremap()
  16437. *
  16438. * Purpose: To describe the structure of 'stock_featuremap' to tripal
  16439. * @see chado_insert_record()
  16440. * @see chado_update_record()
  16441. * @see chado_select_record()
  16442. * @see chado_generate_var()
  16443. * @see chado_expan_var()
  16444. *
  16445. * @return
  16446. * An array describing the 'stock_featuremap' table
  16447. *
  16448. * @ingroup tripal_chado_v1.3_schema_api
  16449. *
  16450. */
  16451. function tripal_chado_chado_schema_v1_3_stock_featuremap() {
  16452. $description = array(
  16453. 'description' => '',
  16454. 'table' => 'stock_featuremap',
  16455. 'fields' => array(
  16456. 'stock_featuremap_id' => array(
  16457. 'size' => 'big',
  16458. 'type' => 'serial',
  16459. 'not null' => TRUE,
  16460. ),
  16461. 'featuremap_id' => array(
  16462. 'size' => 'big',
  16463. 'type' => 'int',
  16464. 'not null' => TRUE,
  16465. ),
  16466. 'stock_id' => array(
  16467. 'size' => 'big',
  16468. 'type' => 'int',
  16469. 'not null' => TRUE,
  16470. ),
  16471. 'type_id' => array(
  16472. 'size' => 'big',
  16473. 'type' => 'int',
  16474. 'not null' => FALSE,
  16475. ),
  16476. ),
  16477. 'unique keys' => array(
  16478. 'stock_featuremap_c1' => array(
  16479. 0 => 'featuremap_id',
  16480. 1 => 'stock_id',
  16481. 2 => 'type_id',
  16482. ),
  16483. ),
  16484. 'indexes' => array(
  16485. 'stock_featuremap_idx1' => array(
  16486. 0 => 'featuremap_id',
  16487. ),
  16488. 'stock_featuremap_idx2' => array(
  16489. 0 => 'stock_id',
  16490. ),
  16491. 'stock_featuremap_idx3' => array(
  16492. 0 => 'type_id',
  16493. ),
  16494. ),
  16495. 'primary key' => array(
  16496. 0 => 'stock_featuremap_id',
  16497. ),
  16498. 'foreign keys' => array(
  16499. 'featuremap' => array(
  16500. 'table' => 'featuremap',
  16501. 'columns' => array(
  16502. 'featuremap_id' => 'featuremap_id',
  16503. ),
  16504. ),
  16505. 'stock' => array(
  16506. 'table' => 'stock',
  16507. 'columns' => array(
  16508. 'stock_id' => 'stock_id',
  16509. ),
  16510. ),
  16511. 'cvterm' => array(
  16512. 'table' => 'cvterm',
  16513. 'columns' => array(
  16514. 'type_id' => 'cvterm_id',
  16515. ),
  16516. ),
  16517. ),
  16518. 'referring_tables' => array(
  16519. ),
  16520. );
  16521. return $description;
  16522. }
  16523. /**
  16524. * Implements hook_chado_schema_v1_3_stock_genotype()
  16525. *
  16526. * Purpose: To describe the structure of 'stock_genotype' to tripal
  16527. * @see chado_insert_record()
  16528. * @see chado_update_record()
  16529. * @see chado_select_record()
  16530. * @see chado_generate_var()
  16531. * @see chado_expan_var()
  16532. *
  16533. * @return
  16534. * An array describing the 'stock_genotype' table
  16535. *
  16536. * @ingroup tripal_chado_v1.3_schema_api
  16537. *
  16538. */
  16539. function tripal_chado_chado_schema_v1_3_stock_genotype() {
  16540. $description = array(
  16541. 'description' => '',
  16542. 'table' => 'stock_genotype',
  16543. 'fields' => array(
  16544. 'stock_genotype_id' => array(
  16545. 'size' => 'big',
  16546. 'type' => 'serial',
  16547. 'not null' => TRUE,
  16548. ),
  16549. 'stock_id' => array(
  16550. 'size' => 'big',
  16551. 'type' => 'int',
  16552. 'not null' => TRUE,
  16553. ),
  16554. 'genotype_id' => array(
  16555. 'size' => 'big',
  16556. 'type' => 'int',
  16557. 'not null' => TRUE,
  16558. ),
  16559. ),
  16560. 'unique keys' => array(
  16561. 'stock_genotype_c1' => array(
  16562. 0 => 'stock_id',
  16563. 1 => 'genotype_id',
  16564. ),
  16565. ),
  16566. 'indexes' => array(
  16567. 'stock_genotype_idx1' => array(
  16568. 0 => 'stock_id',
  16569. ),
  16570. 'stock_genotype_idx2' => array(
  16571. 0 => 'genotype_id',
  16572. ),
  16573. ),
  16574. 'primary key' => array(
  16575. 0 => 'stock_genotype_id',
  16576. ),
  16577. 'foreign keys' => array(
  16578. 'stock' => array(
  16579. 'table' => 'stock',
  16580. 'columns' => array(
  16581. 'stock_id' => 'stock_id',
  16582. ),
  16583. ),
  16584. 'genotype' => array(
  16585. 'table' => 'genotype',
  16586. 'columns' => array(
  16587. 'genotype_id' => 'genotype_id',
  16588. ),
  16589. ),
  16590. ),
  16591. 'referring_tables' => array(
  16592. ),
  16593. );
  16594. return $description;
  16595. }
  16596. /**
  16597. * Implements hook_chado_schema_v1_3_stock_library()
  16598. *
  16599. * Purpose: To describe the structure of 'stock_library' to tripal
  16600. * @see chado_insert_record()
  16601. * @see chado_update_record()
  16602. * @see chado_select_record()
  16603. * @see chado_generate_var()
  16604. * @see chado_expan_var()
  16605. *
  16606. * @return
  16607. * An array describing the 'stock_library' table
  16608. *
  16609. * @ingroup tripal_chado_v1.3_schema_api
  16610. *
  16611. */
  16612. function tripal_chado_chado_schema_v1_3_stock_library() {
  16613. $description = array(
  16614. 'description' => '',
  16615. 'table' => 'stock_library',
  16616. 'fields' => array(
  16617. 'stock_library_id' => array(
  16618. 'size' => 'big',
  16619. 'type' => 'serial',
  16620. 'not null' => TRUE,
  16621. ),
  16622. 'library_id' => array(
  16623. 'size' => 'big',
  16624. 'type' => 'int',
  16625. 'not null' => TRUE,
  16626. ),
  16627. 'stock_id' => array(
  16628. 'size' => 'big',
  16629. 'type' => 'int',
  16630. 'not null' => TRUE,
  16631. ),
  16632. ),
  16633. 'unique keys' => array(
  16634. 'stock_library_c1' => array(
  16635. 0 => 'library_id',
  16636. 1 => 'stock_id',
  16637. ),
  16638. ),
  16639. 'indexes' => array(
  16640. 'stock_library_idx1' => array(
  16641. 0 => 'library_id',
  16642. ),
  16643. 'stock_library_idx2' => array(
  16644. 0 => 'stock_id',
  16645. ),
  16646. ),
  16647. 'primary key' => array(
  16648. 0 => 'stock_library_id',
  16649. ),
  16650. 'foreign keys' => array(
  16651. 'library' => array(
  16652. 'table' => 'library',
  16653. 'columns' => array(
  16654. 'library_id' => 'library_id',
  16655. ),
  16656. ),
  16657. 'stock' => array(
  16658. 'table' => 'stock',
  16659. 'columns' => array(
  16660. 'stock_id' => 'stock_id',
  16661. ),
  16662. ),
  16663. ),
  16664. 'referring_tables' => array(
  16665. ),
  16666. );
  16667. return $description;
  16668. }
  16669. /**
  16670. * Implements hook_chado_schema_v1_3_stockprop()
  16671. *
  16672. * Purpose: To describe the structure of 'stockprop' to tripal
  16673. * @see chado_insert_record()
  16674. * @see chado_update_record()
  16675. * @see chado_select_record()
  16676. * @see chado_generate_var()
  16677. * @see chado_expan_var()
  16678. *
  16679. * @return
  16680. * An array describing the 'stockprop' table
  16681. *
  16682. * @ingroup tripal_chado_v1.3_schema_api
  16683. *
  16684. */
  16685. function tripal_chado_chado_schema_v1_3_stockprop() {
  16686. $description = array(
  16687. 'description' => '',
  16688. 'table' => 'stockprop',
  16689. 'fields' => array(
  16690. 'stockprop_id' => array(
  16691. 'size' => 'big',
  16692. 'type' => 'serial',
  16693. 'not null' => TRUE,
  16694. ),
  16695. 'stock_id' => array(
  16696. 'size' => 'big',
  16697. 'type' => 'int',
  16698. 'not null' => TRUE,
  16699. ),
  16700. 'type_id' => array(
  16701. 'size' => 'big',
  16702. 'type' => 'int',
  16703. 'not null' => TRUE,
  16704. ),
  16705. 'value' => array(
  16706. 'size' => 'normal',
  16707. 'type' => 'text',
  16708. 'not null' => FALSE,
  16709. ),
  16710. 'rank' => array(
  16711. 'size' => 'normal',
  16712. 'type' => 'int',
  16713. 'not null' => TRUE,
  16714. 'default' => 0,
  16715. ),
  16716. ),
  16717. 'unique keys' => array(
  16718. 'stockprop_c1' => array(
  16719. 0 => 'stock_id',
  16720. 1 => 'type_id',
  16721. 2 => 'rank',
  16722. ),
  16723. ),
  16724. 'indexes' => array(
  16725. 'stockprop_idx1' => array(
  16726. 0 => 'stock_id',
  16727. ),
  16728. 'stockprop_idx2' => array(
  16729. 0 => 'type_id',
  16730. ),
  16731. ),
  16732. 'primary key' => array(
  16733. 0 => 'stockprop_id',
  16734. ),
  16735. 'foreign keys' => array(
  16736. 'stock' => array(
  16737. 'table' => 'stock',
  16738. 'columns' => array(
  16739. 'stock_id' => 'stock_id',
  16740. ),
  16741. ),
  16742. 'cvterm' => array(
  16743. 'table' => 'cvterm',
  16744. 'columns' => array(
  16745. 'type_id' => 'cvterm_id',
  16746. ),
  16747. ),
  16748. ),
  16749. 'referring_tables' => array(
  16750. 0 => 'stockprop_pub',
  16751. ),
  16752. );
  16753. return $description;
  16754. }
  16755. /**
  16756. * Implements hook_chado_schema_v1_3_stockprop_pub()
  16757. *
  16758. * Purpose: To describe the structure of 'stockprop_pub' to tripal
  16759. * @see chado_insert_record()
  16760. * @see chado_update_record()
  16761. * @see chado_select_record()
  16762. * @see chado_generate_var()
  16763. * @see chado_expan_var()
  16764. *
  16765. * @return
  16766. * An array describing the 'stockprop_pub' table
  16767. *
  16768. * @ingroup tripal_chado_v1.3_schema_api
  16769. *
  16770. */
  16771. function tripal_chado_chado_schema_v1_3_stockprop_pub() {
  16772. $description = array(
  16773. 'description' => '',
  16774. 'table' => 'stockprop_pub',
  16775. 'fields' => array(
  16776. 'stockprop_pub_id' => array(
  16777. 'size' => 'big',
  16778. 'type' => 'serial',
  16779. 'not null' => TRUE,
  16780. ),
  16781. 'stockprop_id' => array(
  16782. 'size' => 'big',
  16783. 'type' => 'int',
  16784. 'not null' => TRUE,
  16785. ),
  16786. 'pub_id' => array(
  16787. 'size' => 'big',
  16788. 'type' => 'int',
  16789. 'not null' => TRUE,
  16790. ),
  16791. ),
  16792. 'unique keys' => array(
  16793. 'stockprop_pub_c1' => array(
  16794. 0 => 'stockprop_id',
  16795. 1 => 'pub_id',
  16796. ),
  16797. ),
  16798. 'indexes' => array(
  16799. 'stockprop_pub_idx1' => array(
  16800. 0 => 'stockprop_id',
  16801. ),
  16802. 'stockprop_pub_idx2' => array(
  16803. 0 => 'pub_id',
  16804. ),
  16805. ),
  16806. 'primary key' => array(
  16807. 0 => 'stockprop_pub_id',
  16808. ),
  16809. 'foreign keys' => array(
  16810. 'stockprop' => array(
  16811. 'table' => 'stockprop',
  16812. 'columns' => array(
  16813. 'stockprop_id' => 'stockprop_id',
  16814. ),
  16815. ),
  16816. 'pub' => array(
  16817. 'table' => 'pub',
  16818. 'columns' => array(
  16819. 'pub_id' => 'pub_id',
  16820. ),
  16821. ),
  16822. ),
  16823. 'referring_tables' => array(
  16824. ),
  16825. );
  16826. return $description;
  16827. }
  16828. /**
  16829. * Implements hook_chado_schema_v1_3_stock_pub()
  16830. *
  16831. * Purpose: To describe the structure of 'stock_pub' to tripal
  16832. * @see chado_insert_record()
  16833. * @see chado_update_record()
  16834. * @see chado_select_record()
  16835. * @see chado_generate_var()
  16836. * @see chado_expan_var()
  16837. *
  16838. * @return
  16839. * An array describing the 'stock_pub' table
  16840. *
  16841. * @ingroup tripal_chado_v1.3_schema_api
  16842. *
  16843. */
  16844. function tripal_chado_chado_schema_v1_3_stock_pub() {
  16845. $description = array(
  16846. 'description' => '',
  16847. 'table' => 'stock_pub',
  16848. 'fields' => array(
  16849. 'stock_pub_id' => array(
  16850. 'size' => 'big',
  16851. 'type' => 'serial',
  16852. 'not null' => TRUE,
  16853. ),
  16854. 'stock_id' => array(
  16855. 'size' => 'big',
  16856. 'type' => 'int',
  16857. 'not null' => TRUE,
  16858. ),
  16859. 'pub_id' => array(
  16860. 'size' => 'big',
  16861. 'type' => 'int',
  16862. 'not null' => TRUE,
  16863. ),
  16864. ),
  16865. 'unique keys' => array(
  16866. 'stock_pub_c1' => array(
  16867. 0 => 'stock_id',
  16868. 1 => 'pub_id',
  16869. ),
  16870. ),
  16871. 'indexes' => array(
  16872. 'stock_pub_idx1' => array(
  16873. 0 => 'stock_id',
  16874. ),
  16875. 'stock_pub_idx2' => array(
  16876. 0 => 'pub_id',
  16877. ),
  16878. ),
  16879. 'primary key' => array(
  16880. 0 => 'stock_pub_id',
  16881. ),
  16882. 'foreign keys' => array(
  16883. 'stock' => array(
  16884. 'table' => 'stock',
  16885. 'columns' => array(
  16886. 'stock_id' => 'stock_id',
  16887. ),
  16888. ),
  16889. 'pub' => array(
  16890. 'table' => 'pub',
  16891. 'columns' => array(
  16892. 'pub_id' => 'pub_id',
  16893. ),
  16894. ),
  16895. ),
  16896. 'referring_tables' => array(
  16897. ),
  16898. );
  16899. return $description;
  16900. }
  16901. /**
  16902. * Implements hook_chado_schema_v1_3_stock_relationship()
  16903. *
  16904. * Purpose: To describe the structure of 'stock_relationship' to tripal
  16905. * @see chado_insert_record()
  16906. * @see chado_update_record()
  16907. * @see chado_select_record()
  16908. * @see chado_generate_var()
  16909. * @see chado_expan_var()
  16910. *
  16911. * @return
  16912. * An array describing the 'stock_relationship' table
  16913. *
  16914. * @ingroup tripal_chado_v1.3_schema_api
  16915. *
  16916. */
  16917. function tripal_chado_chado_schema_v1_3_stock_relationship() {
  16918. $description = array(
  16919. 'description' => '',
  16920. 'table' => 'stock_relationship',
  16921. 'fields' => array(
  16922. 'stock_relationship_id' => array(
  16923. 'size' => 'big',
  16924. 'type' => 'serial',
  16925. 'not null' => TRUE,
  16926. ),
  16927. 'subject_id' => array(
  16928. 'size' => 'big',
  16929. 'type' => 'int',
  16930. 'not null' => TRUE,
  16931. ),
  16932. 'object_id' => array(
  16933. 'size' => 'big',
  16934. 'type' => 'int',
  16935. 'not null' => TRUE,
  16936. ),
  16937. 'type_id' => array(
  16938. 'size' => 'big',
  16939. 'type' => 'int',
  16940. 'not null' => TRUE,
  16941. ),
  16942. 'value' => array(
  16943. 'size' => 'normal',
  16944. 'type' => 'text',
  16945. 'not null' => FALSE,
  16946. ),
  16947. 'rank' => array(
  16948. 'size' => 'normal',
  16949. 'type' => 'int',
  16950. 'not null' => TRUE,
  16951. 'default' => 0,
  16952. ),
  16953. ),
  16954. 'unique keys' => array(
  16955. 'stock_relationship_c1' => array(
  16956. 0 => 'subject_id',
  16957. 1 => 'object_id',
  16958. 2 => 'type_id',
  16959. 3 => 'rank',
  16960. ),
  16961. ),
  16962. 'indexes' => array(
  16963. 'stock_relationship_idx1' => array(
  16964. 0 => 'subject_id',
  16965. ),
  16966. 'stock_relationship_idx2' => array(
  16967. 0 => 'object_id',
  16968. ),
  16969. 'stock_relationship_idx3' => array(
  16970. 0 => 'type_id',
  16971. ),
  16972. ),
  16973. 'primary key' => array(
  16974. 0 => 'stock_relationship_id',
  16975. ),
  16976. 'foreign keys' => array(
  16977. 'stock' => array(
  16978. 'table' => 'stock',
  16979. 'columns' => array(
  16980. 'subject_id' => 'stock_id',
  16981. 'object_id' => 'stock_id',
  16982. ),
  16983. ),
  16984. 'cvterm' => array(
  16985. 'table' => 'cvterm',
  16986. 'columns' => array(
  16987. 'type_id' => 'cvterm_id',
  16988. ),
  16989. ),
  16990. ),
  16991. 'referring_tables' => array(
  16992. 0 => 'stock_relationship_cvterm',
  16993. 1 => 'stock_relationship_pub',
  16994. ),
  16995. );
  16996. return $description;
  16997. }
  16998. /**
  16999. * Implements hook_chado_schema_v1_3_stock_relationship_cvterm()
  17000. *
  17001. * Purpose: To describe the structure of 'stock_relationship_cvterm' to tripal
  17002. * @see chado_insert_record()
  17003. * @see chado_update_record()
  17004. * @see chado_select_record()
  17005. * @see chado_generate_var()
  17006. * @see chado_expan_var()
  17007. *
  17008. * @return
  17009. * An array describing the 'stock_relationship_cvterm' table
  17010. *
  17011. * @ingroup tripal_chado_v1.3_schema_api
  17012. *
  17013. */
  17014. function tripal_chado_chado_schema_v1_3_stock_relationship_cvterm() {
  17015. $description = array(
  17016. 'description' => '',
  17017. 'table' => 'stock_relationship_cvterm',
  17018. 'fields' => array(
  17019. 'stock_relationship_cvterm_id' => array(
  17020. 'size' => 'big',
  17021. 'type' => 'serial',
  17022. 'not null' => TRUE,
  17023. ),
  17024. 'stock_relationship_id' => array(
  17025. 'size' => 'big',
  17026. 'type' => 'int',
  17027. 'not null' => TRUE,
  17028. ),
  17029. 'cvterm_id' => array(
  17030. 'size' => 'big',
  17031. 'type' => 'int',
  17032. 'not null' => TRUE,
  17033. ),
  17034. 'pub_id' => array(
  17035. 'size' => 'big',
  17036. 'type' => 'int',
  17037. 'not null' => FALSE,
  17038. ),
  17039. ),
  17040. 'primary key' => array(
  17041. 0 => 'stock_relationship_cvterm_id',
  17042. ),
  17043. 'foreign keys' => array(
  17044. 'stock_relationship' => array(
  17045. 'table' => 'stock_relationship',
  17046. 'columns' => array(
  17047. 'stock_relationship_id' => 'stock_relationship_id',
  17048. ),
  17049. ),
  17050. 'cvterm' => array(
  17051. 'table' => 'cvterm',
  17052. 'columns' => array(
  17053. 'cvterm_id' => 'cvterm_id',
  17054. ),
  17055. ),
  17056. 'pub' => array(
  17057. 'table' => 'pub',
  17058. 'columns' => array(
  17059. 'pub_id' => 'pub_id',
  17060. ),
  17061. ),
  17062. ),
  17063. 'referring_tables' => array(
  17064. ),
  17065. );
  17066. return $description;
  17067. }
  17068. /**
  17069. * Implements hook_chado_schema_v1_3_stock_relationship_pub()
  17070. *
  17071. * Purpose: To describe the structure of 'stock_relationship_pub' to tripal
  17072. * @see chado_insert_record()
  17073. * @see chado_update_record()
  17074. * @see chado_select_record()
  17075. * @see chado_generate_var()
  17076. * @see chado_expan_var()
  17077. *
  17078. * @return
  17079. * An array describing the 'stock_relationship_pub' table
  17080. *
  17081. * @ingroup tripal_chado_v1.3_schema_api
  17082. *
  17083. */
  17084. function tripal_chado_chado_schema_v1_3_stock_relationship_pub() {
  17085. $description = array(
  17086. 'description' => '',
  17087. 'table' => 'stock_relationship_pub',
  17088. 'fields' => array(
  17089. 'stock_relationship_pub_id' => array(
  17090. 'size' => 'big',
  17091. 'type' => 'serial',
  17092. 'not null' => TRUE,
  17093. ),
  17094. 'stock_relationship_id' => array(
  17095. 'size' => 'big',
  17096. 'type' => 'int',
  17097. 'not null' => TRUE,
  17098. ),
  17099. 'pub_id' => array(
  17100. 'size' => 'big',
  17101. 'type' => 'int',
  17102. 'not null' => TRUE,
  17103. ),
  17104. ),
  17105. 'unique keys' => array(
  17106. 'stock_relationship_pub_c1' => array(
  17107. 0 => 'stock_relationship_id',
  17108. 1 => 'pub_id',
  17109. ),
  17110. ),
  17111. 'indexes' => array(
  17112. 'stock_relationship_pub_idx1' => array(
  17113. 0 => 'stock_relationship_id',
  17114. ),
  17115. 'stock_relationship_pub_idx2' => array(
  17116. 0 => 'pub_id',
  17117. ),
  17118. ),
  17119. 'primary key' => array(
  17120. 0 => 'stock_relationship_pub_id',
  17121. ),
  17122. 'foreign keys' => array(
  17123. 'stock_relationship' => array(
  17124. 'table' => 'stock_relationship',
  17125. 'columns' => array(
  17126. 'stock_relationship_id' => 'stock_relationship_id',
  17127. ),
  17128. ),
  17129. 'pub' => array(
  17130. 'table' => 'pub',
  17131. 'columns' => array(
  17132. 'pub_id' => 'pub_id',
  17133. ),
  17134. ),
  17135. ),
  17136. 'referring_tables' => array(
  17137. ),
  17138. );
  17139. return $description;
  17140. }
  17141. /**
  17142. * Implements hook_chado_schema_v1_3_study()
  17143. *
  17144. * Purpose: To describe the structure of 'study' to tripal
  17145. * @see chado_insert_record()
  17146. * @see chado_update_record()
  17147. * @see chado_select_record()
  17148. * @see chado_generate_var()
  17149. * @see chado_expan_var()
  17150. *
  17151. * @return
  17152. * An array describing the 'study' table
  17153. *
  17154. * @ingroup tripal_chado_v1.3_schema_api
  17155. *
  17156. */
  17157. function tripal_chado_chado_schema_v1_3_study() {
  17158. $description = array(
  17159. 'description' => '',
  17160. 'table' => 'study',
  17161. 'fields' => array(
  17162. 'study_id' => array(
  17163. 'size' => 'big',
  17164. 'type' => 'serial',
  17165. 'not null' => TRUE,
  17166. ),
  17167. 'contact_id' => array(
  17168. 'size' => 'big',
  17169. 'type' => 'int',
  17170. 'not null' => TRUE,
  17171. ),
  17172. 'pub_id' => array(
  17173. 'size' => 'big',
  17174. 'type' => 'int',
  17175. 'not null' => FALSE,
  17176. ),
  17177. 'dbxref_id' => array(
  17178. 'size' => 'big',
  17179. 'type' => 'int',
  17180. 'not null' => FALSE,
  17181. ),
  17182. 'name' => array(
  17183. 'size' => 'normal',
  17184. 'type' => 'text',
  17185. 'not null' => TRUE,
  17186. ),
  17187. 'description' => array(
  17188. 'size' => 'normal',
  17189. 'type' => 'text',
  17190. 'not null' => FALSE,
  17191. ),
  17192. ),
  17193. 'unique keys' => array(
  17194. 'study_c1' => array(
  17195. 0 => 'name',
  17196. ),
  17197. ),
  17198. 'indexes' => array(
  17199. 'study_idx1' => array(
  17200. 0 => 'contact_id',
  17201. ),
  17202. 'study_idx2' => array(
  17203. 0 => 'pub_id',
  17204. ),
  17205. 'study_idx3' => array(
  17206. 0 => 'dbxref_id',
  17207. ),
  17208. ),
  17209. 'primary key' => array(
  17210. 0 => 'study_id',
  17211. ),
  17212. 'foreign keys' => array(
  17213. 'contact' => array(
  17214. 'table' => 'contact',
  17215. 'columns' => array(
  17216. 'contact_id' => 'contact_id',
  17217. ),
  17218. ),
  17219. 'pub' => array(
  17220. 'table' => 'pub',
  17221. 'columns' => array(
  17222. 'pub_id' => 'pub_id',
  17223. ),
  17224. ),
  17225. 'dbxref' => array(
  17226. 'table' => 'dbxref',
  17227. 'columns' => array(
  17228. 'dbxref_id' => 'dbxref_id',
  17229. ),
  17230. ),
  17231. ),
  17232. 'referring_tables' => array(
  17233. 0 => 'study_assay',
  17234. 1 => 'studydesign',
  17235. 2 => 'studyprop',
  17236. ),
  17237. );
  17238. return $description;
  17239. }
  17240. /**
  17241. * Implements hook_chado_schema_v1_3_study_assay()
  17242. *
  17243. * Purpose: To describe the structure of 'study_assay' to tripal
  17244. * @see chado_insert_record()
  17245. * @see chado_update_record()
  17246. * @see chado_select_record()
  17247. * @see chado_generate_var()
  17248. * @see chado_expan_var()
  17249. *
  17250. * @return
  17251. * An array describing the 'study_assay' table
  17252. *
  17253. * @ingroup tripal_chado_v1.3_schema_api
  17254. *
  17255. */
  17256. function tripal_chado_chado_schema_v1_3_study_assay() {
  17257. $description = array(
  17258. 'description' => '',
  17259. 'table' => 'study_assay',
  17260. 'fields' => array(
  17261. 'study_assay_id' => array(
  17262. 'size' => 'big',
  17263. 'type' => 'serial',
  17264. 'not null' => TRUE,
  17265. ),
  17266. 'study_id' => array(
  17267. 'size' => 'big',
  17268. 'type' => 'int',
  17269. 'not null' => TRUE,
  17270. ),
  17271. 'assay_id' => array(
  17272. 'size' => 'big',
  17273. 'type' => 'int',
  17274. 'not null' => TRUE,
  17275. ),
  17276. ),
  17277. 'unique keys' => array(
  17278. 'study_assay_c1' => array(
  17279. 0 => 'study_id',
  17280. 1 => 'assay_id',
  17281. ),
  17282. ),
  17283. 'indexes' => array(
  17284. 'study_assay_idx1' => array(
  17285. 0 => 'study_id',
  17286. ),
  17287. 'study_assay_idx2' => array(
  17288. 0 => 'assay_id',
  17289. ),
  17290. ),
  17291. 'primary key' => array(
  17292. 0 => 'study_assay_id',
  17293. ),
  17294. 'foreign keys' => array(
  17295. 'study' => array(
  17296. 'table' => 'study',
  17297. 'columns' => array(
  17298. 'study_id' => 'study_id',
  17299. ),
  17300. ),
  17301. 'assay' => array(
  17302. 'table' => 'assay',
  17303. 'columns' => array(
  17304. 'assay_id' => 'assay_id',
  17305. ),
  17306. ),
  17307. ),
  17308. 'referring_tables' => array(
  17309. ),
  17310. );
  17311. return $description;
  17312. }
  17313. /**
  17314. * Implements hook_chado_schema_v1_3_studydesign()
  17315. *
  17316. * Purpose: To describe the structure of 'studydesign' to tripal
  17317. * @see chado_insert_record()
  17318. * @see chado_update_record()
  17319. * @see chado_select_record()
  17320. * @see chado_generate_var()
  17321. * @see chado_expan_var()
  17322. *
  17323. * @return
  17324. * An array describing the 'studydesign' table
  17325. *
  17326. * @ingroup tripal_chado_v1.3_schema_api
  17327. *
  17328. */
  17329. function tripal_chado_chado_schema_v1_3_studydesign() {
  17330. $description = array(
  17331. 'description' => '',
  17332. 'table' => 'studydesign',
  17333. 'fields' => array(
  17334. 'studydesign_id' => array(
  17335. 'size' => 'big',
  17336. 'type' => 'serial',
  17337. 'not null' => TRUE,
  17338. ),
  17339. 'study_id' => array(
  17340. 'size' => 'big',
  17341. 'type' => 'int',
  17342. 'not null' => TRUE,
  17343. ),
  17344. 'description' => array(
  17345. 'size' => 'normal',
  17346. 'type' => 'text',
  17347. 'not null' => FALSE,
  17348. ),
  17349. ),
  17350. 'indexes' => array(
  17351. 'studydesign_idx1' => array(
  17352. 0 => 'study_id',
  17353. ),
  17354. ),
  17355. 'primary key' => array(
  17356. 0 => 'studydesign_id',
  17357. ),
  17358. 'foreign keys' => array(
  17359. 'study' => array(
  17360. 'table' => 'study',
  17361. 'columns' => array(
  17362. 'study_id' => 'study_id',
  17363. ),
  17364. ),
  17365. ),
  17366. 'referring_tables' => array(
  17367. 0 => 'studydesignprop',
  17368. 1 => 'studyfactor',
  17369. ),
  17370. );
  17371. return $description;
  17372. }
  17373. /**
  17374. * Implements hook_chado_schema_v1_3_studydesignprop()
  17375. *
  17376. * Purpose: To describe the structure of 'studydesignprop' to tripal
  17377. * @see chado_insert_record()
  17378. * @see chado_update_record()
  17379. * @see chado_select_record()
  17380. * @see chado_generate_var()
  17381. * @see chado_expan_var()
  17382. *
  17383. * @return
  17384. * An array describing the 'studydesignprop' table
  17385. *
  17386. * @ingroup tripal_chado_v1.3_schema_api
  17387. *
  17388. */
  17389. function tripal_chado_chado_schema_v1_3_studydesignprop() {
  17390. $description = array(
  17391. 'description' => '',
  17392. 'table' => 'studydesignprop',
  17393. 'fields' => array(
  17394. 'studydesignprop_id' => array(
  17395. 'size' => 'big',
  17396. 'type' => 'serial',
  17397. 'not null' => TRUE,
  17398. ),
  17399. 'studydesign_id' => array(
  17400. 'size' => 'big',
  17401. 'type' => 'int',
  17402. 'not null' => TRUE,
  17403. ),
  17404. 'type_id' => array(
  17405. 'size' => 'big',
  17406. 'type' => 'int',
  17407. 'not null' => TRUE,
  17408. ),
  17409. 'value' => array(
  17410. 'size' => 'normal',
  17411. 'type' => 'text',
  17412. 'not null' => FALSE,
  17413. ),
  17414. 'rank' => array(
  17415. 'size' => 'normal',
  17416. 'type' => 'int',
  17417. 'not null' => TRUE,
  17418. 'default' => 0,
  17419. ),
  17420. ),
  17421. 'unique keys' => array(
  17422. 'studydesignprop_c1' => array(
  17423. 0 => 'studydesign_id',
  17424. 1 => 'type_id',
  17425. 2 => 'rank',
  17426. ),
  17427. ),
  17428. 'indexes' => array(
  17429. 'studydesignprop_idx1' => array(
  17430. 0 => 'studydesign_id',
  17431. ),
  17432. 'studydesignprop_idx2' => array(
  17433. 0 => 'type_id',
  17434. ),
  17435. ),
  17436. 'primary key' => array(
  17437. 0 => 'studydesignprop_id',
  17438. ),
  17439. 'foreign keys' => array(
  17440. 'studydesign' => array(
  17441. 'table' => 'studydesign',
  17442. 'columns' => array(
  17443. 'studydesign_id' => 'studydesign_id',
  17444. ),
  17445. ),
  17446. 'cvterm' => array(
  17447. 'table' => 'cvterm',
  17448. 'columns' => array(
  17449. 'type_id' => 'cvterm_id',
  17450. ),
  17451. ),
  17452. ),
  17453. 'referring_tables' => array(
  17454. ),
  17455. );
  17456. return $description;
  17457. }
  17458. /**
  17459. * Implements hook_chado_schema_v1_3_studyfactor()
  17460. *
  17461. * Purpose: To describe the structure of 'studyfactor' to tripal
  17462. * @see chado_insert_record()
  17463. * @see chado_update_record()
  17464. * @see chado_select_record()
  17465. * @see chado_generate_var()
  17466. * @see chado_expan_var()
  17467. *
  17468. * @return
  17469. * An array describing the 'studyfactor' table
  17470. *
  17471. * @ingroup tripal_chado_v1.3_schema_api
  17472. *
  17473. */
  17474. function tripal_chado_chado_schema_v1_3_studyfactor() {
  17475. $description = array(
  17476. 'description' => '',
  17477. 'table' => 'studyfactor',
  17478. 'fields' => array(
  17479. 'studyfactor_id' => array(
  17480. 'size' => 'big',
  17481. 'type' => 'serial',
  17482. 'not null' => TRUE,
  17483. ),
  17484. 'studydesign_id' => array(
  17485. 'size' => 'big',
  17486. 'type' => 'int',
  17487. 'not null' => TRUE,
  17488. ),
  17489. 'type_id' => array(
  17490. 'size' => 'big',
  17491. 'type' => 'int',
  17492. 'not null' => FALSE,
  17493. ),
  17494. 'name' => array(
  17495. 'size' => 'normal',
  17496. 'type' => 'text',
  17497. 'not null' => TRUE,
  17498. ),
  17499. 'description' => array(
  17500. 'size' => 'normal',
  17501. 'type' => 'text',
  17502. 'not null' => FALSE,
  17503. ),
  17504. ),
  17505. 'indexes' => array(
  17506. 'studyfactor_idx1' => array(
  17507. 0 => 'studydesign_id',
  17508. ),
  17509. 'studyfactor_idx2' => array(
  17510. 0 => 'type_id',
  17511. ),
  17512. ),
  17513. 'primary key' => array(
  17514. 0 => 'studyfactor_id',
  17515. ),
  17516. 'foreign keys' => array(
  17517. 'studydesign' => array(
  17518. 'table' => 'studydesign',
  17519. 'columns' => array(
  17520. 'studydesign_id' => 'studydesign_id',
  17521. ),
  17522. ),
  17523. 'cvterm' => array(
  17524. 'table' => 'cvterm',
  17525. 'columns' => array(
  17526. 'type_id' => 'cvterm_id',
  17527. ),
  17528. ),
  17529. ),
  17530. 'referring_tables' => array(
  17531. 0 => 'studyfactorvalue',
  17532. ),
  17533. );
  17534. return $description;
  17535. }
  17536. /**
  17537. * Implements hook_chado_schema_v1_3_studyfactorvalue()
  17538. *
  17539. * Purpose: To describe the structure of 'studyfactorvalue' to tripal
  17540. * @see chado_insert_record()
  17541. * @see chado_update_record()
  17542. * @see chado_select_record()
  17543. * @see chado_generate_var()
  17544. * @see chado_expan_var()
  17545. *
  17546. * @return
  17547. * An array describing the 'studyfactorvalue' table
  17548. *
  17549. * @ingroup tripal_chado_v1.3_schema_api
  17550. *
  17551. */
  17552. function tripal_chado_chado_schema_v1_3_studyfactorvalue() {
  17553. $description = array(
  17554. 'description' => '',
  17555. 'table' => 'studyfactorvalue',
  17556. 'fields' => array(
  17557. 'studyfactorvalue_id' => array(
  17558. 'size' => 'big',
  17559. 'type' => 'serial',
  17560. 'not null' => TRUE,
  17561. ),
  17562. 'studyfactor_id' => array(
  17563. 'size' => 'big',
  17564. 'type' => 'int',
  17565. 'not null' => TRUE,
  17566. ),
  17567. 'assay_id' => array(
  17568. 'size' => 'big',
  17569. 'type' => 'int',
  17570. 'not null' => TRUE,
  17571. ),
  17572. 'factorvalue' => array(
  17573. 'size' => 'normal',
  17574. 'type' => 'text',
  17575. 'not null' => FALSE,
  17576. ),
  17577. 'name' => array(
  17578. 'size' => 'normal',
  17579. 'type' => 'text',
  17580. 'not null' => FALSE,
  17581. ),
  17582. 'rank' => array(
  17583. 'size' => 'normal',
  17584. 'type' => 'int',
  17585. 'not null' => TRUE,
  17586. 'default' => 0,
  17587. ),
  17588. ),
  17589. 'indexes' => array(
  17590. 'studyfactorvalue_idx1' => array(
  17591. 0 => 'studyfactor_id',
  17592. ),
  17593. 'studyfactorvalue_idx2' => array(
  17594. 0 => 'assay_id',
  17595. ),
  17596. ),
  17597. 'primary key' => array(
  17598. 0 => 'studyfactorvalue_id',
  17599. ),
  17600. 'foreign keys' => array(
  17601. 'studyfactor' => array(
  17602. 'table' => 'studyfactor',
  17603. 'columns' => array(
  17604. 'studyfactor_id' => 'studyfactor_id',
  17605. ),
  17606. ),
  17607. 'assay' => array(
  17608. 'table' => 'assay',
  17609. 'columns' => array(
  17610. 'assay_id' => 'assay_id',
  17611. ),
  17612. ),
  17613. ),
  17614. 'referring_tables' => array(
  17615. ),
  17616. );
  17617. return $description;
  17618. }
  17619. /**
  17620. * Implements hook_chado_schema_v1_3_studyprop()
  17621. *
  17622. * Purpose: To describe the structure of 'studyprop' to tripal
  17623. * @see chado_insert_record()
  17624. * @see chado_update_record()
  17625. * @see chado_select_record()
  17626. * @see chado_generate_var()
  17627. * @see chado_expan_var()
  17628. *
  17629. * @return
  17630. * An array describing the 'studyprop' table
  17631. *
  17632. * @ingroup tripal_chado_v1.3_schema_api
  17633. *
  17634. */
  17635. function tripal_chado_chado_schema_v1_3_studyprop() {
  17636. $description = array(
  17637. 'description' => '',
  17638. 'table' => 'studyprop',
  17639. 'fields' => array(
  17640. 'studyprop_id' => array(
  17641. 'size' => 'big',
  17642. 'type' => 'serial',
  17643. 'not null' => TRUE,
  17644. ),
  17645. 'study_id' => array(
  17646. 'size' => 'big',
  17647. 'type' => 'int',
  17648. 'not null' => TRUE,
  17649. ),
  17650. 'type_id' => array(
  17651. 'size' => 'big',
  17652. 'type' => 'int',
  17653. 'not null' => TRUE,
  17654. ),
  17655. 'value' => array(
  17656. 'size' => 'normal',
  17657. 'type' => 'text',
  17658. 'not null' => FALSE,
  17659. ),
  17660. 'rank' => array(
  17661. 'size' => 'normal',
  17662. 'type' => 'int',
  17663. 'not null' => TRUE,
  17664. 'default' => 0,
  17665. ),
  17666. ),
  17667. 'indexes' => array(
  17668. 'studyprop_idx1' => array(
  17669. 0 => 'study_id',
  17670. ),
  17671. 'studyprop_idx2' => array(
  17672. 0 => 'type_id',
  17673. ),
  17674. ),
  17675. 'primary key' => array(
  17676. 0 => 'studyprop_id',
  17677. ),
  17678. 'unique keys' => array(
  17679. 'studyprop_study_id_type_id_rank_key' => array(
  17680. 0 => 'study_id',
  17681. 1 => 'type_id',
  17682. 2 => 'rank',
  17683. ),
  17684. ),
  17685. 'foreign keys' => array(
  17686. 'study' => array(
  17687. 'table' => 'study',
  17688. 'columns' => array(
  17689. 'study_id' => 'study_id',
  17690. ),
  17691. ),
  17692. 'cvterm' => array(
  17693. 'table' => 'cvterm',
  17694. 'columns' => array(
  17695. 'type_id' => 'cvterm_id',
  17696. ),
  17697. ),
  17698. ),
  17699. 'referring_tables' => array(
  17700. 0 => 'studyprop_feature',
  17701. ),
  17702. );
  17703. return $description;
  17704. }
  17705. /**
  17706. * Implements hook_chado_schema_v1_3_studyprop_feature()
  17707. *
  17708. * Purpose: To describe the structure of 'studyprop_feature' to tripal
  17709. * @see chado_insert_record()
  17710. * @see chado_update_record()
  17711. * @see chado_select_record()
  17712. * @see chado_generate_var()
  17713. * @see chado_expan_var()
  17714. *
  17715. * @return
  17716. * An array describing the 'studyprop_feature' table
  17717. *
  17718. * @ingroup tripal_chado_v1.3_schema_api
  17719. *
  17720. */
  17721. function tripal_chado_chado_schema_v1_3_studyprop_feature() {
  17722. $description = array(
  17723. 'description' => '',
  17724. 'table' => 'studyprop_feature',
  17725. 'fields' => array(
  17726. 'studyprop_feature_id' => array(
  17727. 'size' => 'big',
  17728. 'type' => 'serial',
  17729. 'not null' => TRUE,
  17730. ),
  17731. 'studyprop_id' => array(
  17732. 'size' => 'big',
  17733. 'type' => 'int',
  17734. 'not null' => TRUE,
  17735. ),
  17736. 'feature_id' => array(
  17737. 'size' => 'big',
  17738. 'type' => 'int',
  17739. 'not null' => TRUE,
  17740. ),
  17741. 'type_id' => array(
  17742. 'size' => 'big',
  17743. 'type' => 'int',
  17744. 'not null' => FALSE,
  17745. ),
  17746. ),
  17747. 'indexes' => array(
  17748. 'studyprop_feature_idx1' => array(
  17749. 0 => 'studyprop_id',
  17750. ),
  17751. 'studyprop_feature_idx2' => array(
  17752. 0 => 'feature_id',
  17753. ),
  17754. ),
  17755. 'primary key' => array(
  17756. 0 => 'studyprop_feature_id',
  17757. ),
  17758. 'unique keys' => array(
  17759. 'studyprop_feature_studyprop_id_feature_id_key' => array(
  17760. 0 => 'studyprop_id',
  17761. 1 => 'feature_id',
  17762. ),
  17763. ),
  17764. 'foreign keys' => array(
  17765. 'studyprop' => array(
  17766. 'table' => 'studyprop',
  17767. 'columns' => array(
  17768. 'studyprop_id' => 'studyprop_id',
  17769. ),
  17770. ),
  17771. 'feature' => array(
  17772. 'table' => 'feature',
  17773. 'columns' => array(
  17774. 'feature_id' => 'feature_id',
  17775. ),
  17776. ),
  17777. 'cvterm' => array(
  17778. 'table' => 'cvterm',
  17779. 'columns' => array(
  17780. 'type_id' => 'cvterm_id',
  17781. ),
  17782. ),
  17783. ),
  17784. 'referring_tables' => array(
  17785. ),
  17786. );
  17787. return $description;
  17788. }
  17789. /**
  17790. * Implements hook_chado_schema_v1_3_synonym()
  17791. *
  17792. * Purpose: To describe the structure of 'synonym' to tripal
  17793. * @see chado_insert_record()
  17794. * @see chado_update_record()
  17795. * @see chado_select_record()
  17796. * @see chado_generate_var()
  17797. * @see chado_expan_var()
  17798. *
  17799. * @return
  17800. * An array describing the 'synonym' table
  17801. *
  17802. * @ingroup tripal_chado_v1.3_schema_api
  17803. *
  17804. */
  17805. function tripal_chado_chado_schema_v1_3_synonym() {
  17806. $description = array(
  17807. 'description' => '',
  17808. 'table' => 'synonym',
  17809. 'fields' => array(
  17810. 'synonym_id' => array(
  17811. 'size' => 'big',
  17812. 'type' => 'serial',
  17813. 'not null' => TRUE,
  17814. ),
  17815. 'name' => array(
  17816. 'size' => 'normal',
  17817. 'type' => 'varchar',
  17818. 'length' => '255',
  17819. 'not null' => TRUE,
  17820. ),
  17821. 'type_id' => array(
  17822. 'size' => 'big',
  17823. 'type' => 'int',
  17824. 'not null' => TRUE,
  17825. ),
  17826. 'synonym_sgml' => array(
  17827. 'size' => 'normal',
  17828. 'type' => 'varchar',
  17829. 'length' => '255',
  17830. 'not null' => TRUE,
  17831. ),
  17832. ),
  17833. 'unique keys' => array(
  17834. 'synonym_c1' => array(
  17835. 0 => 'name',
  17836. 1 => 'type_id',
  17837. ),
  17838. ),
  17839. 'indexes' => array(
  17840. 'synonym_idx1' => array(
  17841. 0 => 'type_id',
  17842. ),
  17843. ),
  17844. 'primary key' => array(
  17845. 0 => 'synonym_id',
  17846. ),
  17847. 'foreign keys' => array(
  17848. 'cvterm' => array(
  17849. 'table' => 'cvterm',
  17850. 'columns' => array(
  17851. 'type_id' => 'cvterm_id',
  17852. ),
  17853. ),
  17854. ),
  17855. 'referring_tables' => array(
  17856. 0 => 'cell_line_synonym',
  17857. 1 => 'feature_synonym',
  17858. 2 => 'library_synonym',
  17859. ),
  17860. );
  17861. return $description;
  17862. }
  17863. /**
  17864. * Implements hook_chado_schema_v1_3_tableinfo()
  17865. *
  17866. * Purpose: To describe the structure of 'tableinfo' to tripal
  17867. * @see chado_insert_record()
  17868. * @see chado_update_record()
  17869. * @see chado_select_record()
  17870. * @see chado_generate_var()
  17871. * @see chado_expan_var()
  17872. *
  17873. * @return
  17874. * An array describing the 'tableinfo' table
  17875. *
  17876. * @ingroup tripal_chado_v1.3_schema_api
  17877. *
  17878. */
  17879. function tripal_chado_chado_schema_v1_3_tableinfo() {
  17880. $description = array(
  17881. 'description' => '',
  17882. 'table' => 'tableinfo',
  17883. 'fields' => array(
  17884. 'tableinfo_id' => array(
  17885. 'size' => 'big',
  17886. 'type' => 'serial',
  17887. 'not null' => TRUE,
  17888. ),
  17889. 'name' => array(
  17890. 'size' => 'normal',
  17891. 'type' => 'varchar',
  17892. 'length' => '30',
  17893. 'not null' => TRUE,
  17894. ),
  17895. 'primary_key_column' => array(
  17896. 'size' => 'normal',
  17897. 'type' => 'varchar',
  17898. 'length' => '30',
  17899. 'not null' => FALSE,
  17900. ),
  17901. 'is_view' => array(
  17902. 'size' => 'normal',
  17903. 'type' => 'int',
  17904. 'not null' => TRUE,
  17905. 'default' => 0,
  17906. ),
  17907. 'view_on_table_id' => array(
  17908. 'size' => 'big',
  17909. 'type' => 'int',
  17910. 'not null' => FALSE,
  17911. ),
  17912. 'superclass_table_id' => array(
  17913. 'size' => 'big',
  17914. 'type' => 'int',
  17915. 'not null' => FALSE,
  17916. ),
  17917. 'is_updateable' => array(
  17918. 'size' => 'normal',
  17919. 'type' => 'int',
  17920. 'not null' => TRUE,
  17921. 'default' => 1,
  17922. ),
  17923. 'modification_date' => array(
  17924. 'size' => 'normal',
  17925. 'type' => 'date',
  17926. 'not null' => TRUE,
  17927. 'default' => 'now()',
  17928. ),
  17929. ),
  17930. 'unique keys' => array(
  17931. 'tableinfo_c1' => array(
  17932. 0 => 'name',
  17933. ),
  17934. ),
  17935. 'primary key' => array(
  17936. 0 => 'tableinfo_id',
  17937. ),
  17938. 'foreign keys' => array(
  17939. ),
  17940. 'referring_tables' => array(
  17941. 0 => 'control',
  17942. 1 => 'magedocumentation',
  17943. ),
  17944. );
  17945. return $description;
  17946. }
  17947. /**
  17948. * Implements hook_chado_schema_v1_3_treatment()
  17949. *
  17950. * Purpose: To describe the structure of 'treatment' to tripal
  17951. * @see chado_insert_record()
  17952. * @see chado_update_record()
  17953. * @see chado_select_record()
  17954. * @see chado_generate_var()
  17955. * @see chado_expan_var()
  17956. *
  17957. * @return
  17958. * An array describing the 'treatment' table
  17959. *
  17960. * @ingroup tripal_chado_v1.3_schema_api
  17961. *
  17962. */
  17963. function tripal_chado_chado_schema_v1_3_treatment() {
  17964. $description = array(
  17965. 'description' => '',
  17966. 'table' => 'treatment',
  17967. 'fields' => array(
  17968. 'treatment_id' => array(
  17969. 'size' => 'big',
  17970. 'type' => 'serial',
  17971. 'not null' => TRUE,
  17972. ),
  17973. 'rank' => array(
  17974. 'size' => 'normal',
  17975. 'type' => 'int',
  17976. 'not null' => TRUE,
  17977. 'default' => 0,
  17978. ),
  17979. 'biomaterial_id' => array(
  17980. 'size' => 'big',
  17981. 'type' => 'int',
  17982. 'not null' => TRUE,
  17983. ),
  17984. 'type_id' => array(
  17985. 'size' => 'big',
  17986. 'type' => 'int',
  17987. 'not null' => TRUE,
  17988. ),
  17989. 'protocol_id' => array(
  17990. 'size' => 'big',
  17991. 'type' => 'int',
  17992. 'not null' => FALSE,
  17993. ),
  17994. 'name' => array(
  17995. 'size' => 'normal',
  17996. 'type' => 'text',
  17997. 'not null' => FALSE,
  17998. ),
  17999. ),
  18000. 'indexes' => array(
  18001. 'treatment_idx1' => array(
  18002. 0 => 'biomaterial_id',
  18003. ),
  18004. 'treatment_idx2' => array(
  18005. 0 => 'type_id',
  18006. ),
  18007. 'treatment_idx3' => array(
  18008. 0 => 'protocol_id',
  18009. ),
  18010. ),
  18011. 'primary key' => array(
  18012. 0 => 'treatment_id',
  18013. ),
  18014. 'foreign keys' => array(
  18015. 'biomaterial' => array(
  18016. 'table' => 'biomaterial',
  18017. 'columns' => array(
  18018. 'biomaterial_id' => 'biomaterial_id',
  18019. ),
  18020. ),
  18021. 'cvterm' => array(
  18022. 'table' => 'cvterm',
  18023. 'columns' => array(
  18024. 'type_id' => 'cvterm_id',
  18025. ),
  18026. ),
  18027. 'protocol' => array(
  18028. 'table' => 'protocol',
  18029. 'columns' => array(
  18030. 'protocol_id' => 'protocol_id',
  18031. ),
  18032. ),
  18033. ),
  18034. 'referring_tables' => array(
  18035. 0 => 'biomaterial_treatment',
  18036. ),
  18037. );
  18038. return $description;
  18039. }
  18040. /**
  18041. * Lists the table names in the v1.3 chado schema
  18042. *
  18043. * @return
  18044. * An array containing all of the table names
  18045. *
  18046. * @ingroup tripal_chado_v1.3_schema_api
  18047. *
  18048. */
  18049. function tripal_chado_chado_get_v1_3_tables() {
  18050. $tables = array(
  18051. 'acquisition',
  18052. 'acquisitionprop',
  18053. 'acquisition_relationship',
  18054. 'analysis',
  18055. 'analysis_cvterm',
  18056. 'analysis_dbxref',
  18057. 'analysisfeature',
  18058. 'analysisfeatureprop',
  18059. 'analysis_organism',
  18060. 'analysisprop',
  18061. 'analysis_pub',
  18062. 'analysis_relationship',
  18063. 'arraydesign',
  18064. 'arraydesignprop',
  18065. 'assay',
  18066. 'assay_biomaterial',
  18067. 'assay_project',
  18068. 'assayprop',
  18069. 'biomaterial',
  18070. 'biomaterial_dbxref',
  18071. 'biomaterialprop',
  18072. 'biomaterial_relationship',
  18073. 'biomaterial_treatment',
  18074. 'cell_line',
  18075. 'cell_line_cvterm',
  18076. 'cell_line_cvtermprop',
  18077. 'cell_line_dbxref',
  18078. 'cell_line_feature',
  18079. 'cell_line_library',
  18080. 'cell_lineprop',
  18081. 'cell_lineprop_pub',
  18082. 'cell_line_pub',
  18083. 'cell_line_relationship',
  18084. 'cell_line_synonym',
  18085. 'chadoprop',
  18086. 'channel',
  18087. 'contact',
  18088. 'contactprop',
  18089. 'contact_relationship',
  18090. 'control',
  18091. 'cv',
  18092. 'cvprop',
  18093. 'cv_root_mview',
  18094. 'cvterm',
  18095. 'cvterm_dbxref',
  18096. 'cvtermpath',
  18097. 'cvtermprop',
  18098. 'cvterm_relationship',
  18099. 'cvtermsynonym',
  18100. 'db',
  18101. 'dbprop',
  18102. 'dbxref',
  18103. 'dbxrefprop',
  18104. 'eimage',
  18105. 'element',
  18106. 'element_relationship',
  18107. 'elementresult',
  18108. 'elementresult_relationship',
  18109. 'environment',
  18110. 'environment_cvterm',
  18111. 'expression',
  18112. 'expression_cvterm',
  18113. 'expression_cvtermprop',
  18114. 'expression_image',
  18115. 'expressionprop',
  18116. 'expression_pub',
  18117. 'feature',
  18118. 'feature_contact',
  18119. 'feature_cvterm',
  18120. 'feature_cvterm_dbxref',
  18121. 'feature_cvtermprop',
  18122. 'feature_cvterm_pub',
  18123. 'feature_dbxref',
  18124. 'feature_expression',
  18125. 'feature_expressionprop',
  18126. 'feature_genotype',
  18127. 'featureloc',
  18128. 'featureloc_pub',
  18129. 'featuremap',
  18130. 'featuremap_contact',
  18131. 'featuremap_dbxref',
  18132. 'featuremap_organism',
  18133. 'featuremapprop',
  18134. 'featuremap_pub',
  18135. 'feature_phenotype',
  18136. 'featurepos',
  18137. 'featureposprop',
  18138. 'featureprop',
  18139. 'featureprop_pub',
  18140. 'feature_pub',
  18141. 'feature_pubprop',
  18142. 'featurerange',
  18143. 'feature_relationship',
  18144. 'feature_relationshipprop',
  18145. 'feature_relationshipprop_pub',
  18146. 'feature_relationship_pub',
  18147. 'feature_synonym',
  18148. 'genotype',
  18149. 'genotypeprop',
  18150. 'library',
  18151. 'library_contact',
  18152. 'library_cvterm',
  18153. 'library_dbxref',
  18154. 'library_expression',
  18155. 'library_expressionprop',
  18156. 'library_feature',
  18157. 'library_featureprop',
  18158. 'libraryprop',
  18159. 'libraryprop_pub',
  18160. 'library_pub',
  18161. 'library_relationship',
  18162. 'library_relationship_pub',
  18163. 'library_synonym',
  18164. 'magedocumentation',
  18165. 'mageml',
  18166. 'materialized_view',
  18167. 'nd_experiment',
  18168. 'nd_experiment_analysis',
  18169. 'nd_experiment_contact',
  18170. 'nd_experiment_dbxref',
  18171. 'nd_experiment_genotype',
  18172. 'nd_experiment_phenotype',
  18173. 'nd_experiment_project',
  18174. 'nd_experimentprop',
  18175. 'nd_experiment_protocol',
  18176. 'nd_experiment_pub',
  18177. 'nd_experiment_stock',
  18178. 'nd_experiment_stock_dbxref',
  18179. 'nd_experiment_stockprop',
  18180. 'nd_geolocation',
  18181. 'nd_geolocationprop',
  18182. 'nd_protocol',
  18183. 'nd_protocolprop',
  18184. 'nd_protocol_reagent',
  18185. 'nd_reagent',
  18186. 'nd_reagentprop',
  18187. 'nd_reagent_relationship',
  18188. 'organism',
  18189. 'organism_cvterm',
  18190. 'organism_cvtermprop',
  18191. 'organism_dbxref',
  18192. 'organism_feature_count',
  18193. 'organismprop',
  18194. 'organismprop_pub',
  18195. 'organism_pub',
  18196. 'organism_relationship',
  18197. 'phendesc',
  18198. 'phenotype',
  18199. 'phenotype_comparison',
  18200. 'phenotype_comparison_cvterm',
  18201. 'phenotype_cvterm',
  18202. 'phenotypeprop',
  18203. 'phenstatement',
  18204. 'phylonode',
  18205. 'phylonode_dbxref',
  18206. 'phylonode_organism',
  18207. 'phylonodeprop',
  18208. 'phylonode_pub',
  18209. 'phylonode_relationship',
  18210. 'phylotree',
  18211. 'phylotreeprop',
  18212. 'phylotree_pub',
  18213. 'project',
  18214. 'project_analysis',
  18215. 'project_contact',
  18216. 'project_dbxref',
  18217. 'project_feature',
  18218. 'projectprop',
  18219. 'project_pub',
  18220. 'project_relationship',
  18221. 'project_stock',
  18222. 'protocol',
  18223. 'protocolparam',
  18224. 'pub',
  18225. 'pubauthor',
  18226. 'pubauthor_contact',
  18227. 'pub_dbxref',
  18228. 'pubprop',
  18229. 'pub_relationship',
  18230. 'quantification',
  18231. 'quantificationprop',
  18232. 'quantification_relationship',
  18233. 'stock',
  18234. 'stockcollection',
  18235. 'stockcollection_db',
  18236. 'stockcollectionprop',
  18237. 'stockcollection_stock',
  18238. 'stock_cvterm',
  18239. 'stock_cvtermprop',
  18240. 'stock_dbxref',
  18241. 'stock_dbxrefprop',
  18242. 'stock_feature',
  18243. 'stock_featuremap',
  18244. 'stock_genotype',
  18245. 'stock_library',
  18246. 'stockprop',
  18247. 'stockprop_pub',
  18248. 'stock_pub',
  18249. 'stock_relationship',
  18250. 'stock_relationship_cvterm',
  18251. 'stock_relationship_pub',
  18252. 'study',
  18253. 'study_assay',
  18254. 'studydesign',
  18255. 'studydesignprop',
  18256. 'studyfactor',
  18257. 'studyfactorvalue',
  18258. 'studyprop',
  18259. 'studyprop_feature',
  18260. 'synonym',
  18261. 'tableinfo',
  18262. 'treatment',
  18263. );
  18264. return $tables;
  18265. }