tripal_chado.schema_v1.2.api.inc 335 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206
  1. <?php
  2. /**
  3. * @file
  4. * Describes the chado tables in version 1.2
  5. */
  6. /**
  7. * @defgroup tripal_schema_v1_2_api Chado v1.2 Schema
  8. * @ingroup tripal_chado_schema_api
  9. * @{
  10. * Provides an application programming interface (API) for describing Chado tables.
  11. * This API consists of a set of functions, one for each table in Chado. Each
  12. * function simply returns a Drupal style array that defines the table.
  13. *
  14. * Because Drupal 6 does not handle foreign key (FK) relationships, which are needed to
  15. * for Tripal Views, they have been added to the schema defintitions below.
  16. *
  17. * The functions provided in this documentation should not be called as is, but if you need
  18. * the Drupal-style array definition for any table, use the following function
  19. * call:
  20. *
  21. * $table_desc = chado_get_schema($table)
  22. *
  23. * where the variable $table contains the name of the table you want to
  24. * retireve. The chado_get_schema function determines the appropriate version of
  25. * Chado and uses the Drupal hook infrastructure to call the appropriate
  26. * hook function to retrieve the table schema.
  27. *
  28. * If you need to augment these schema definitions within your own module, you need to
  29. * implement the hook_chado_schema_v1_2_[table name]() hook where [table name] is the
  30. * name of the chado table whose schema definition you want to augment.
  31. * @}
  32. */
  33. /**
  34. * Implements hook_chado_schema_v1_2_acquisition()
  35. * Purpose: To describe the structure of 'acquisition' to tripal
  36. * @see chado_insert_record()
  37. * @see chado_update_record()
  38. * @see chado_select_record()
  39. *
  40. * @return
  41. * An array describing the 'acquisition' table
  42. *
  43. * @ingroup tripal_chado_v1.2_schema_api
  44. *
  45. */
  46. function tripal_chado_chado_schema_v1_2_acquisition() {
  47. $description = array(
  48. 'description' => '',
  49. 'fields' => array(
  50. 'acquisition_id' => array(
  51. 'description' => '',
  52. 'type' => 'serial',
  53. 'not null' => TRUE,
  54. ),
  55. 'assay_id' => array(
  56. 'description' => '',
  57. 'type' => 'int',
  58. 'not null' => TRUE,
  59. ),
  60. 'protocol_id' => array(
  61. 'description' => '',
  62. 'type' => 'int',
  63. 'not null' => FALSE,
  64. ),
  65. 'channel_id' => array(
  66. 'description' => '',
  67. 'type' => 'int',
  68. 'not null' => FALSE,
  69. ),
  70. 'acquisitiondate' => array(
  71. 'description' => '',
  72. 'type' => 'datetime',
  73. 'not null' => FALSE,
  74. 'default' => 'now()',
  75. ),
  76. 'name' => array(
  77. 'description' => '',
  78. 'type' => 'text',
  79. 'not null' => FALSE,
  80. ),
  81. 'uri' => array(
  82. 'description' => '',
  83. 'type' => 'text',
  84. 'not null' => FALSE,
  85. ),
  86. ),
  87. 'primary key' => array(
  88. 0 => 'acquisition_id',
  89. ),
  90. 'unique keys' => array(
  91. 'acquisition_c1' => array(
  92. 0 => 'name',
  93. ),
  94. ),
  95. 'indexes' => array(
  96. 'acquisition_idx1' => array(
  97. 0 => 'assay_id',
  98. ),
  99. 'acquisition_idx2' => array(
  100. 0 => 'protocol_id',
  101. ),
  102. 'acquisition_idx3' => array(
  103. 0 => 'channel_id',
  104. ),
  105. ),
  106. 'foreign keys' => array(
  107. 'protocol' => array(
  108. 'table' => 'protocol',
  109. 'columns' => array(
  110. 'protocol_id' => 'protocol_id',
  111. ),
  112. ),
  113. 'assay' => array(
  114. 'table' => 'assay',
  115. 'columns' => array(
  116. 'assay_id' => 'assay_id',
  117. ),
  118. ),
  119. 'channel' => array(
  120. 'table' => 'channel',
  121. 'columns' => array(
  122. 'channel_id' => 'channel_id',
  123. ),
  124. ),
  125. ),
  126. 'table' => 'acquisition',
  127. 'referring_tables' => array(
  128. 0 => 'acquisition_relationship',
  129. 2 => 'acquisitionprop',
  130. 3 => 'quantification',
  131. ),
  132. );
  133. return $description;
  134. }
  135. /**
  136. * Implements hook_chado_schema_v1_2_acquisition_relationship()
  137. * Purpose: To describe the structure of 'acquisition_relationship' to tripal
  138. * @see chado_insert_record()
  139. * @see chado_update_record()
  140. * @see chado_select_record()
  141. *
  142. * @return
  143. * An array describing the 'acquisition_relationship' table
  144. *
  145. * @ingroup tripal_chado_v1.2_schema_api
  146. *
  147. */
  148. function tripal_chado_chado_schema_v1_2_acquisition_relationship() {
  149. $description = array(
  150. 'description' => '',
  151. 'fields' => array(
  152. 'acquisition_relationship_id' => array(
  153. 'description' => '',
  154. 'type' => 'serial',
  155. 'not null' => TRUE,
  156. ),
  157. 'subject_id' => array(
  158. 'description' => '',
  159. 'type' => 'int',
  160. 'not null' => TRUE,
  161. ),
  162. 'type_id' => array(
  163. 'description' => '',
  164. 'type' => 'int',
  165. 'not null' => TRUE,
  166. ),
  167. 'object_id' => array(
  168. 'description' => '',
  169. 'type' => 'int',
  170. 'not null' => TRUE,
  171. ),
  172. 'value' => array(
  173. 'description' => '',
  174. 'type' => 'text',
  175. 'not null' => FALSE,
  176. ),
  177. 'rank' => array(
  178. 'description' => '',
  179. 'type' => 'int',
  180. 'not null' => TRUE,
  181. 'default' => 0,
  182. ),
  183. ),
  184. 'primary key' => array(
  185. 0 => 'acquisition_relationship_id',
  186. ),
  187. 'unique keys' => array(
  188. 'acquisition_relationship_c1' => array(
  189. 0 => 'subject_id',
  190. 1 => 'object_id',
  191. 2 => 'type_id',
  192. 3 => 'rank',
  193. ),
  194. ),
  195. 'indexes' => array(
  196. 'acquisition_relationship_idx1' => array(
  197. 0 => 'subject_id',
  198. ),
  199. 'acquisition_relationship_idx2' => array(
  200. 0 => 'type_id',
  201. ),
  202. 'acquisition_relationship_idx3' => array(
  203. 0 => 'object_id',
  204. ),
  205. ),
  206. 'foreign keys' => array(
  207. 'cvterm' => array(
  208. 'table' => 'cvterm',
  209. 'columns' => array(
  210. 'type_id' => 'cvterm_id',
  211. ),
  212. ),
  213. 'acquisition' => array(
  214. 'table' => 'acquisition',
  215. 'columns' => array(
  216. 'subject_id' => 'acquisition_id',
  217. 'object_id' => 'acquisition_id',
  218. ),
  219. ),
  220. ),
  221. 'table' => 'acquisition_relationship',
  222. 'referring_tables' => NULL,
  223. );
  224. return $description;
  225. }
  226. /**
  227. * Implements hook_chado_schema_v1_2_acquisitionprop()
  228. * Purpose: To describe the structure of 'acquisitionprop' to tripal
  229. * @see chado_insert_record()
  230. * @see chado_update_record()
  231. * @see chado_select_record()
  232. *
  233. * @return
  234. * An array describing the 'acquisitionprop' table
  235. *
  236. * @ingroup tripal_chado_v1.2_schema_api
  237. *
  238. */
  239. function tripal_chado_chado_schema_v1_2_acquisitionprop() {
  240. $description = array(
  241. 'description' => '',
  242. 'fields' => array(
  243. 'acquisitionprop_id' => array(
  244. 'description' => '',
  245. 'type' => 'serial',
  246. 'not null' => TRUE,
  247. ),
  248. 'acquisition_id' => array(
  249. 'description' => '',
  250. 'type' => 'int',
  251. 'not null' => TRUE,
  252. ),
  253. 'type_id' => array(
  254. 'description' => '',
  255. 'type' => 'int',
  256. 'not null' => TRUE,
  257. ),
  258. 'value' => array(
  259. 'description' => '',
  260. 'type' => 'text',
  261. 'not null' => FALSE,
  262. ),
  263. 'rank' => array(
  264. 'description' => '',
  265. 'type' => 'int',
  266. 'not null' => TRUE,
  267. 'default' => 0,
  268. ),
  269. ),
  270. 'primary key' => array(
  271. 0 => 'acquisitionprop_id',
  272. ),
  273. 'unique keys' => array(
  274. 'acquisitionprop_c1' => array(
  275. 0 => 'acquisition_id',
  276. 1 => 'type_id',
  277. 2 => 'rank',
  278. ),
  279. ),
  280. 'indexes' => array(
  281. 'acquisitionprop_idx1' => array(
  282. 0 => 'acquisition_id',
  283. ),
  284. 'acquisitionprop_idx2' => array(
  285. 0 => 'type_id',
  286. ),
  287. ),
  288. 'foreign keys' => array(
  289. 'cvterm' => array(
  290. 'table' => 'cvterm',
  291. 'columns' => array(
  292. 'type_id' => 'cvterm_id',
  293. ),
  294. ),
  295. 'acquisition' => array(
  296. 'table' => 'acquisition',
  297. 'columns' => array(
  298. 'acquisition_id' => 'acquisition_id',
  299. ),
  300. ),
  301. ),
  302. 'table' => 'acquisitionprop',
  303. 'referring_tables' => NULL,
  304. );
  305. return $description;
  306. }
  307. /**
  308. * Implements hook_chado_schema_v1_2_analysis()
  309. * Purpose: To describe the structure of 'analysis' to tripal
  310. * @see chado_insert_record()
  311. * @see chado_update_record()
  312. * @see chado_select_record()
  313. *
  314. * @return
  315. * An array describing the 'analysis' table
  316. *
  317. * @ingroup tripal_chado_v1.2_schema_api
  318. *
  319. */
  320. function tripal_chado_chado_schema_v1_2_analysis() {
  321. $description = array(
  322. 'referring_tables' => array(
  323. 0 => 'analysisfeature',
  324. 1 => 'analysisprop',
  325. 2 => 'phylotree',
  326. 3 => 'quantification',
  327. ),
  328. 'description' => '',
  329. 'fields' => array(
  330. 'analysis_id' => array(
  331. 'description' => '',
  332. 'type' => 'serial',
  333. 'not null' => TRUE,
  334. ),
  335. 'name' => array(
  336. 'description' => '',
  337. 'type' => 'varchar',
  338. 'length' => '255',
  339. 'not null' => FALSE,
  340. ),
  341. 'description' => array(
  342. 'description' => '',
  343. 'type' => 'text',
  344. 'not null' => FALSE,
  345. ),
  346. 'program' => array(
  347. 'description' => '',
  348. 'type' => 'varchar',
  349. 'length' => '255',
  350. 'not null' => TRUE,
  351. ),
  352. 'programversion' => array(
  353. 'description' => '',
  354. 'type' => 'varchar',
  355. 'length' => '255',
  356. 'not null' => TRUE,
  357. ),
  358. 'algorithm' => array(
  359. 'description' => '',
  360. 'type' => 'varchar',
  361. 'length' => '255',
  362. 'not null' => FALSE,
  363. ),
  364. 'sourcename' => array(
  365. 'description' => '',
  366. 'type' => 'varchar',
  367. 'length' => '255',
  368. 'not null' => FALSE,
  369. ),
  370. 'sourceversion' => array(
  371. 'description' => '',
  372. 'type' => 'varchar',
  373. 'length' => '255',
  374. 'not null' => FALSE,
  375. ),
  376. 'sourceuri' => array(
  377. 'description' => '',
  378. 'type' => 'text',
  379. 'not null' => FALSE,
  380. ),
  381. 'timeexecuted' => array(
  382. 'description' => '',
  383. 'type' => 'datetime',
  384. 'not null' => TRUE,
  385. 'default' => 'now()',
  386. ),
  387. ),
  388. 'primary key' => array(
  389. 0 => 'analysis_id',
  390. ),
  391. 'unique keys' => array(
  392. 'analysis_c1' => array(
  393. 0 => 'program',
  394. 1 => 'programversion',
  395. 2 => 'sourcename',
  396. ),
  397. ),
  398. 'foreign keys' => array(
  399. ),
  400. 'table' => 'analysis',
  401. );
  402. return $description;
  403. }
  404. /**
  405. * Implements hook_chado_schema_v1_2_analysisfeature()
  406. * Purpose: To describe the structure of 'analysisfeature' to tripal
  407. * @see chado_insert_record()
  408. * @see chado_update_record()
  409. * @see chado_select_record()
  410. *
  411. * @return
  412. * An array describing the 'analysisfeature' table
  413. *
  414. * @ingroup tripal_chado_v1.2_schema_api
  415. *
  416. */
  417. function tripal_chado_chado_schema_v1_2_analysisfeature() {
  418. $description = array(
  419. 'description' => '',
  420. 'fields' => array(
  421. 'analysisfeature_id' => array(
  422. 'description' => '',
  423. 'type' => 'serial',
  424. 'not null' => TRUE,
  425. ),
  426. 'feature_id' => array(
  427. 'description' => '',
  428. 'type' => 'int',
  429. 'not null' => TRUE,
  430. ),
  431. 'analysis_id' => array(
  432. 'description' => '',
  433. 'type' => 'int',
  434. 'not null' => TRUE,
  435. ),
  436. 'rawscore' => array(
  437. 'description' => '',
  438. 'type' => 'float',
  439. 'size' => 'big',
  440. 'not null' => FALSE,
  441. ),
  442. 'normscore' => array(
  443. 'description' => '',
  444. 'type' => 'float',
  445. 'size' => 'big',
  446. 'not null' => FALSE,
  447. ),
  448. 'significance' => array(
  449. 'description' => '',
  450. 'type' => 'float',
  451. 'size' => 'big',
  452. 'not null' => FALSE,
  453. ),
  454. 'identity' => array(
  455. 'description' => '',
  456. 'type' => 'float',
  457. 'size' => 'big',
  458. 'not null' => FALSE,
  459. ),
  460. ),
  461. 'primary key' => array(
  462. 0 => 'analysisfeature_id',
  463. ),
  464. 'unique keys' => array(
  465. 'analysisfeature_c1' => array(
  466. 0 => 'feature_id',
  467. 1 => 'analysis_id',
  468. ),
  469. ),
  470. 'indexes' => array(
  471. 'analysisfeature_idx1' => array(
  472. 0 => 'feature_id',
  473. ),
  474. 'analysisfeature_idx2' => array(
  475. 0 => 'analysis_id',
  476. ),
  477. ),
  478. 'foreign keys' => array(
  479. 'analysis' => array(
  480. 'table' => 'analysis',
  481. 'columns' => array(
  482. 'analysis_id' => 'analysis_id',
  483. ),
  484. ),
  485. 'feature' => array(
  486. 'table' => 'feature',
  487. 'columns' => array(
  488. 'feature_id' => 'feature_id',
  489. ),
  490. ),
  491. ),
  492. 'table' => 'analysisfeature',
  493. 'referring_tables' => array(
  494. 0 => 'analysisfeatureprop',
  495. ),
  496. );
  497. return $description;
  498. }
  499. /**
  500. * Implements hook_chado_schema_v1_2_analysisfeatureprop()
  501. * Purpose: To describe the structure of 'analysisfeatureprop' to tripal
  502. * @see chado_insert_record()
  503. * @see chado_update_record()
  504. * @see chado_select_record()
  505. *
  506. * @return
  507. * An array describing the 'analysisfeatureprop' table
  508. *
  509. * @ingroup tripal_chado_v1.2_schema_api
  510. *
  511. */
  512. function tripal_chado_chado_schema_v1_2_analysisfeatureprop() {
  513. $description = array(
  514. 'description' => '',
  515. 'fields' => array(
  516. 'analysisfeatureprop_id' => array(
  517. 'description' => '',
  518. 'type' => 'serial',
  519. 'not null' => TRUE,
  520. ),
  521. 'analysisfeature_id' => array(
  522. 'description' => '',
  523. 'type' => 'int',
  524. 'not null' => TRUE,
  525. ),
  526. 'type_id' => array(
  527. 'description' => '',
  528. 'type' => 'int',
  529. 'not null' => TRUE,
  530. ),
  531. 'value' => array(
  532. 'description' => '',
  533. 'type' => 'text',
  534. 'not null' => FALSE,
  535. ),
  536. 'rank' => array(
  537. 'description' => '',
  538. 'type' => 'int',
  539. 'not null' => TRUE,
  540. ),
  541. ),
  542. 'primary key' => array(
  543. 0 => 'analysisfeatureprop_id',
  544. ),
  545. 'unique keys' => array(
  546. 'analysisfeature_id_type_id_rank' => array(
  547. 0 => 'analysisfeature_id',
  548. 1 => 'type_id',
  549. 2 => 'rank',
  550. ),
  551. ),
  552. 'foreign keys' => array(
  553. 'cvterm' => array(
  554. 'table' => 'cvterm',
  555. 'columns' => array(
  556. 'type_id' => 'cvterm_id',
  557. ),
  558. ),
  559. 'analysisfeature' => array(
  560. 'table' => 'analysisfeature',
  561. 'columns' => array(
  562. 'analysisfeature_id' => 'analysisfeature_id',
  563. ),
  564. ),
  565. ),
  566. 'table' => 'analysisfeatureprop',
  567. 'referring_tables' => NULL,
  568. );
  569. return $description;
  570. }
  571. /**
  572. * Implements hook_chado_schema_v1_2_analysisprop()
  573. * Purpose: To describe the structure of 'analysisprop' to tripal
  574. * @see chado_insert_record()
  575. * @see chado_update_record()
  576. * @see chado_select_record()
  577. *
  578. * @return
  579. * An array describing the 'analysisprop' table
  580. *
  581. * @ingroup tripal_chado_v1.2_schema_api
  582. *
  583. */
  584. function tripal_chado_chado_schema_v1_2_analysisprop() {
  585. $description = array(
  586. 'description' => '',
  587. 'fields' => array(
  588. 'analysisprop_id' => array(
  589. 'description' => '',
  590. 'type' => 'serial',
  591. 'not null' => TRUE,
  592. ),
  593. 'analysis_id' => array(
  594. 'description' => '',
  595. 'type' => 'int',
  596. 'not null' => TRUE,
  597. ),
  598. 'type_id' => array(
  599. 'description' => '',
  600. 'type' => 'int',
  601. 'not null' => TRUE,
  602. ),
  603. 'value' => array(
  604. 'description' => '',
  605. 'type' => 'text',
  606. 'not null' => FALSE,
  607. ),
  608. 'rank' => array(
  609. 'description' => '',
  610. 'type' => 'int',
  611. 'not null' => TRUE,
  612. 'default' => 0,
  613. ),
  614. ),
  615. 'primary key' => array(
  616. 0 => 'analysisprop_id',
  617. ),
  618. 'unique keys' => array(
  619. 'analysisprop_c1' => array(
  620. 0 => 'analysis_id',
  621. 1 => 'type_id',
  622. 2 => 'rank',
  623. ),
  624. ),
  625. 'indexes' => array(
  626. 'analysisprop_idx1' => array(
  627. 0 => 'analysis_id',
  628. ),
  629. 'analysisprop_idx2' => array(
  630. 0 => 'type_id',
  631. ),
  632. ),
  633. 'foreign keys' => array(
  634. 'cvterm' => array(
  635. 'table' => 'cvterm',
  636. 'columns' => array(
  637. 'type_id' => 'cvterm_id',
  638. ),
  639. ),
  640. 'analysis' => array(
  641. 'table' => 'analysis',
  642. 'columns' => array(
  643. 'analysis_id' => 'analysis_id',
  644. ),
  645. ),
  646. ),
  647. 'table' => 'analysisprop',
  648. 'referring_tables' => NULL,
  649. );
  650. return $description;
  651. }
  652. /**
  653. * Implements hook_chado_schema_v1_2_arraydesign()
  654. * Purpose: To describe the structure of 'arraydesign' to tripal
  655. * @see chado_insert_record()
  656. * @see chado_update_record()
  657. * @see chado_select_record()
  658. *
  659. * @return
  660. * An array describing the 'arraydesign' table
  661. *
  662. * @ingroup tripal_chado_v1.2_schema_api
  663. *
  664. */
  665. function tripal_chado_chado_schema_v1_2_arraydesign() {
  666. $description = array(
  667. 'description' => '',
  668. 'fields' => array(
  669. 'arraydesign_id' => array(
  670. 'description' => '',
  671. 'type' => 'serial',
  672. 'not null' => TRUE,
  673. ),
  674. 'manufacturer_id' => array(
  675. 'description' => '',
  676. 'type' => 'int',
  677. 'not null' => TRUE,
  678. ),
  679. 'platformtype_id' => array(
  680. 'description' => '',
  681. 'type' => 'int',
  682. 'not null' => TRUE,
  683. ),
  684. 'substratetype_id' => array(
  685. 'description' => '',
  686. 'type' => 'int',
  687. 'not null' => FALSE,
  688. ),
  689. 'protocol_id' => array(
  690. 'description' => '',
  691. 'type' => 'int',
  692. 'not null' => FALSE,
  693. ),
  694. 'dbxref_id' => array(
  695. 'description' => '',
  696. 'type' => 'int',
  697. 'not null' => FALSE,
  698. ),
  699. 'name' => array(
  700. 'description' => '',
  701. 'type' => 'text',
  702. 'not null' => TRUE,
  703. ),
  704. 'version' => array(
  705. 'description' => '',
  706. 'type' => 'text',
  707. 'not null' => FALSE,
  708. ),
  709. 'description' => array(
  710. 'description' => '',
  711. 'type' => 'text',
  712. 'not null' => FALSE,
  713. ),
  714. 'array_dimensions' => array(
  715. 'description' => '',
  716. 'type' => 'text',
  717. 'not null' => FALSE,
  718. ),
  719. 'element_dimensions' => array(
  720. 'description' => '',
  721. 'type' => 'text',
  722. 'not null' => FALSE,
  723. ),
  724. 'num_of_elements' => array(
  725. 'description' => '',
  726. 'type' => 'int',
  727. 'not null' => FALSE,
  728. ),
  729. 'num_array_columns' => array(
  730. 'description' => '',
  731. 'type' => 'int',
  732. 'not null' => FALSE,
  733. ),
  734. 'num_array_rows' => array(
  735. 'description' => '',
  736. 'type' => 'int',
  737. 'not null' => FALSE,
  738. ),
  739. 'num_grid_columns' => array(
  740. 'description' => '',
  741. 'type' => 'int',
  742. 'not null' => FALSE,
  743. ),
  744. 'num_grid_rows' => array(
  745. 'description' => '',
  746. 'type' => 'int',
  747. 'not null' => FALSE,
  748. ),
  749. 'num_sub_columns' => array(
  750. 'description' => '',
  751. 'type' => 'int',
  752. 'not null' => FALSE,
  753. ),
  754. 'num_sub_rows' => array(
  755. 'description' => '',
  756. 'type' => 'int',
  757. 'not null' => FALSE,
  758. ),
  759. ),
  760. 'primary key' => array(
  761. 0 => 'arraydesign_id',
  762. ),
  763. 'unique keys' => array(
  764. 'arraydesign_c1' => array(
  765. 0 => 'name',
  766. ),
  767. ),
  768. 'indexes' => array(
  769. 'arraydesign_idx1' => array(
  770. 0 => 'manufacturer_id',
  771. ),
  772. 'arraydesign_idx2' => array(
  773. 0 => 'platformtype_id',
  774. ),
  775. 'arraydesign_idx3' => array(
  776. 0 => 'substratetype_id',
  777. ),
  778. 'arraydesign_idx4' => array(
  779. 0 => 'protocol_id',
  780. ),
  781. 'arraydesign_idx5' => array(
  782. 0 => 'dbxref_id',
  783. ),
  784. ),
  785. 'foreign keys' => array(
  786. 'cvterm' => array(
  787. 'table' => 'cvterm',
  788. 'columns' => array(
  789. 'platformtype_id' => 'cvterm_id',
  790. 'substratetype_id' => 'cvterm_id',
  791. ),
  792. ),
  793. 'dbxref' => array(
  794. 'table' => 'dbxref',
  795. 'columns' => array(
  796. 'dbxref_id' => 'dbxref_id',
  797. ),
  798. ),
  799. 'contact' => array(
  800. 'table' => 'contact',
  801. 'columns' => array(
  802. 'manufacturer_id' => 'contact_id',
  803. ),
  804. ),
  805. 'protocol' => array(
  806. 'table' => 'protocol',
  807. 'columns' => array(
  808. 'protocol_id' => 'protocol_id',
  809. ),
  810. ),
  811. ),
  812. 'table' => 'arraydesign',
  813. 'referring_tables' => array(
  814. 0 => 'arraydesignprop',
  815. 1 => 'assay',
  816. 2 => 'element',
  817. ),
  818. );
  819. return $description;
  820. }
  821. /**
  822. * Implements hook_chado_schema_v1_2_arraydesignprop()
  823. * Purpose: To describe the structure of 'arraydesignprop' to tripal
  824. * @see chado_insert_record()
  825. * @see chado_update_record()
  826. * @see chado_select_record()
  827. *
  828. * @return
  829. * An array describing the 'arraydesignprop' table
  830. *
  831. * @ingroup tripal_chado_v1.2_schema_api
  832. *
  833. */
  834. function tripal_chado_chado_schema_v1_2_arraydesignprop() {
  835. $description = array(
  836. 'description' => '',
  837. 'fields' => array(
  838. 'arraydesignprop_id' => array(
  839. 'description' => '',
  840. 'type' => 'serial',
  841. 'not null' => TRUE,
  842. ),
  843. 'arraydesign_id' => array(
  844. 'description' => '',
  845. 'type' => 'int',
  846. 'not null' => TRUE,
  847. ),
  848. 'type_id' => array(
  849. 'description' => '',
  850. 'type' => 'int',
  851. 'not null' => TRUE,
  852. ),
  853. 'value' => array(
  854. 'description' => '',
  855. 'type' => 'text',
  856. 'not null' => FALSE,
  857. ),
  858. 'rank' => array(
  859. 'description' => '',
  860. 'type' => 'int',
  861. 'not null' => TRUE,
  862. 'default' => 0,
  863. ),
  864. ),
  865. 'primary key' => array(
  866. 0 => 'arraydesignprop_id',
  867. ),
  868. 'unique keys' => array(
  869. 'arraydesignprop_c1' => array(
  870. 0 => 'arraydesign_id',
  871. 1 => 'type_id',
  872. 2 => 'rank',
  873. ),
  874. ),
  875. 'indexes' => array(
  876. 'arraydesignprop_idx1' => array(
  877. 0 => 'arraydesign_id',
  878. ),
  879. 'arraydesignprop_idx2' => array(
  880. 0 => 'type_id',
  881. ),
  882. ),
  883. 'foreign keys' => array(
  884. 'cvterm' => array(
  885. 'table' => 'cvterm',
  886. 'columns' => array(
  887. 'type_id' => 'cvterm_id',
  888. ),
  889. ),
  890. 'arraydesign' => array(
  891. 'table' => 'arraydesign',
  892. 'columns' => array(
  893. 'arraydesign_id' => 'arraydesign_id',
  894. ),
  895. ),
  896. ),
  897. 'table' => 'arraydesignprop',
  898. 'referring_tables' => NULL,
  899. );
  900. return $description;
  901. }
  902. /**
  903. * Implements hook_chado_schema_v1_2_assay()
  904. * Purpose: To describe the structure of 'assay' to tripal
  905. * @see chado_insert_record()
  906. * @see chado_update_record()
  907. * @see chado_select_record()
  908. *
  909. * @return
  910. * An array describing the 'assay' table
  911. *
  912. * @ingroup tripal_chado_v1.2_schema_api
  913. *
  914. */
  915. function tripal_chado_chado_schema_v1_2_assay() {
  916. $description = array(
  917. 'description' => '',
  918. 'fields' => array(
  919. 'assay_id' => array(
  920. 'description' => '',
  921. 'type' => 'serial',
  922. 'not null' => TRUE,
  923. ),
  924. 'arraydesign_id' => array(
  925. 'description' => '',
  926. 'type' => 'int',
  927. 'not null' => TRUE,
  928. ),
  929. 'protocol_id' => array(
  930. 'description' => '',
  931. 'type' => 'int',
  932. 'not null' => FALSE,
  933. ),
  934. 'assaydate' => array(
  935. 'description' => '',
  936. 'type' => 'datetime',
  937. 'not null' => FALSE,
  938. 'default' => 'now()',
  939. ),
  940. 'arrayidentifier' => array(
  941. 'description' => '',
  942. 'type' => 'text',
  943. 'not null' => FALSE,
  944. ),
  945. 'arraybatchidentifier' => array(
  946. 'description' => '',
  947. 'type' => 'text',
  948. 'not null' => FALSE,
  949. ),
  950. 'operator_id' => array(
  951. 'description' => '',
  952. 'type' => 'int',
  953. 'not null' => TRUE,
  954. ),
  955. 'dbxref_id' => array(
  956. 'description' => '',
  957. 'type' => 'int',
  958. 'not null' => FALSE,
  959. ),
  960. 'name' => array(
  961. 'description' => '',
  962. 'type' => 'text',
  963. 'not null' => FALSE,
  964. ),
  965. 'description' => array(
  966. 'description' => '',
  967. 'type' => 'text',
  968. 'not null' => FALSE,
  969. ),
  970. ),
  971. 'primary key' => array(
  972. 0 => 'assay_id',
  973. ),
  974. 'unique keys' => array(
  975. 'assay_c1' => array(
  976. 0 => 'name',
  977. ),
  978. ),
  979. 'indexes' => array(
  980. 'assay_idx1' => array(
  981. 0 => 'arraydesign_id',
  982. ),
  983. 'assay_idx2' => array(
  984. 0 => 'protocol_id',
  985. ),
  986. 'assay_idx3' => array(
  987. 0 => 'operator_id',
  988. ),
  989. 'assay_idx4' => array(
  990. 0 => 'dbxref_id',
  991. ),
  992. ),
  993. 'foreign keys' => array(
  994. 'dbxref' => array(
  995. 'table' => 'dbxref',
  996. 'columns' => array(
  997. 'dbxref_id' => 'dbxref_id',
  998. ),
  999. ),
  1000. 'contact' => array(
  1001. 'table' => 'contact',
  1002. 'columns' => array(
  1003. 'operator_id' => 'contact_id',
  1004. ),
  1005. ),
  1006. 'arraydesign' => array(
  1007. 'table' => 'arraydesign',
  1008. 'columns' => array(
  1009. 'arraydesign_id' => 'arraydesign_id',
  1010. ),
  1011. ),
  1012. 'protocol' => array(
  1013. 'table' => 'protocol',
  1014. 'columns' => array(
  1015. 'protocol_id' => 'protocol_id',
  1016. ),
  1017. ),
  1018. ),
  1019. 'table' => 'assay',
  1020. 'referring_tables' => array(
  1021. 0 => 'acquisition',
  1022. 1 => 'assay_biomaterial',
  1023. 2 => 'assay_project',
  1024. 3 => 'assayprop',
  1025. 4 => 'control',
  1026. 5 => 'study_assay',
  1027. 6 => 'studyfactorvalue',
  1028. ),
  1029. );
  1030. return $description;
  1031. }
  1032. /**
  1033. * Implements hook_chado_schema_v1_2_assay_biomaterial()
  1034. * Purpose: To describe the structure of 'assay_biomaterial' to tripal
  1035. * @see chado_insert_record()
  1036. * @see chado_update_record()
  1037. * @see chado_select_record()
  1038. *
  1039. * @return
  1040. * An array describing the 'assay_biomaterial' table
  1041. *
  1042. * @ingroup tripal_chado_v1.2_schema_api
  1043. *
  1044. */
  1045. function tripal_chado_chado_schema_v1_2_assay_biomaterial() {
  1046. $description = array(
  1047. 'description' => '',
  1048. 'fields' => array(
  1049. 'assay_biomaterial_id' => array(
  1050. 'description' => '',
  1051. 'type' => 'serial',
  1052. 'not null' => TRUE,
  1053. ),
  1054. 'assay_id' => array(
  1055. 'description' => '',
  1056. 'type' => 'int',
  1057. 'not null' => TRUE,
  1058. ),
  1059. 'biomaterial_id' => array(
  1060. 'description' => '',
  1061. 'type' => 'int',
  1062. 'not null' => TRUE,
  1063. ),
  1064. 'channel_id' => array(
  1065. 'description' => '',
  1066. 'type' => 'int',
  1067. 'not null' => FALSE,
  1068. ),
  1069. 'rank' => array(
  1070. 'description' => '',
  1071. 'type' => 'int',
  1072. 'not null' => TRUE,
  1073. 'default' => 0,
  1074. ),
  1075. ),
  1076. 'primary key' => array(
  1077. 0 => 'assay_biomaterial_id',
  1078. ),
  1079. 'unique keys' => array(
  1080. 'assay_biomaterial_c1' => array(
  1081. 0 => 'assay_id',
  1082. 1 => 'biomaterial_id',
  1083. 2 => 'channel_id',
  1084. 3 => 'rank',
  1085. ),
  1086. ),
  1087. 'indexes' => array(
  1088. 'assay_biomaterial_idx1' => array(
  1089. 0 => 'assay_id',
  1090. ),
  1091. 'assay_biomaterial_idx2' => array(
  1092. 0 => 'biomaterial_id',
  1093. ),
  1094. 'assay_biomaterial_idx3' => array(
  1095. 0 => 'channel_id',
  1096. ),
  1097. ),
  1098. 'foreign keys' => array(
  1099. 'assay' => array(
  1100. 'table' => 'assay',
  1101. 'columns' => array(
  1102. 'assay_id' => 'assay_id',
  1103. ),
  1104. ),
  1105. 'biomaterial' => array(
  1106. 'table' => 'biomaterial',
  1107. 'columns' => array(
  1108. 'biomaterial_id' => 'biomaterial_id',
  1109. ),
  1110. ),
  1111. 'channel' => array(
  1112. 'table' => 'channel',
  1113. 'columns' => array(
  1114. 'channel_id' => 'channel_id',
  1115. ),
  1116. ),
  1117. ),
  1118. 'table' => 'assay_biomaterial',
  1119. 'referring_tables' => NULL,
  1120. );
  1121. return $description;
  1122. }
  1123. /**
  1124. * Implements hook_chado_schema_v1_2_assay_project()
  1125. * Purpose: To describe the structure of 'assay_project' to tripal
  1126. * @see chado_insert_record()
  1127. * @see chado_update_record()
  1128. * @see chado_select_record()
  1129. *
  1130. * @return
  1131. * An array describing the 'assay_project' table
  1132. *
  1133. * @ingroup tripal_chado_v1.2_schema_api
  1134. *
  1135. */
  1136. function tripal_chado_chado_schema_v1_2_assay_project() {
  1137. $description = array(
  1138. 'description' => '',
  1139. 'fields' => array(
  1140. 'assay_project_id' => array(
  1141. 'description' => '',
  1142. 'type' => 'serial',
  1143. 'not null' => TRUE,
  1144. ),
  1145. 'assay_id' => array(
  1146. 'description' => '',
  1147. 'type' => 'int',
  1148. 'not null' => TRUE,
  1149. ),
  1150. 'project_id' => array(
  1151. 'description' => '',
  1152. 'type' => 'int',
  1153. 'not null' => TRUE,
  1154. ),
  1155. ),
  1156. 'primary key' => array(
  1157. 0 => 'assay_project_id',
  1158. ),
  1159. 'unique keys' => array(
  1160. 'assay_project_c1' => array(
  1161. 0 => 'assay_id',
  1162. 1 => 'project_id',
  1163. ),
  1164. ),
  1165. 'indexes' => array(
  1166. 'assay_project_idx1' => array(
  1167. 0 => 'assay_id',
  1168. ),
  1169. 'assay_project_idx2' => array(
  1170. 0 => 'project_id',
  1171. ),
  1172. ),
  1173. 'foreign keys' => array(
  1174. 'project' => array(
  1175. 'table' => 'project',
  1176. 'columns' => array(
  1177. 'project_id' => 'project_id',
  1178. ),
  1179. ),
  1180. 'assay' => array(
  1181. 'table' => 'assay',
  1182. 'columns' => array(
  1183. 'assay_id' => 'assay_id',
  1184. ),
  1185. ),
  1186. ),
  1187. 'table' => 'assay_project',
  1188. 'referring_tables' => NULL,
  1189. );
  1190. return $description;
  1191. }
  1192. /**
  1193. * Implements hook_chado_schema_v1_2_assayprop()
  1194. * Purpose: To describe the structure of 'assayprop' to tripal
  1195. * @see chado_insert_record()
  1196. * @see chado_update_record()
  1197. * @see chado_select_record()
  1198. *
  1199. * @return
  1200. * An array describing the 'assayprop' table
  1201. *
  1202. * @ingroup tripal_chado_v1.2_schema_api
  1203. *
  1204. */
  1205. function tripal_chado_chado_schema_v1_2_assayprop() {
  1206. $description = array(
  1207. 'description' => '',
  1208. 'fields' => array(
  1209. 'assayprop_id' => array(
  1210. 'description' => '',
  1211. 'type' => 'serial',
  1212. 'not null' => TRUE,
  1213. ),
  1214. 'assay_id' => array(
  1215. 'description' => '',
  1216. 'type' => 'int',
  1217. 'not null' => TRUE,
  1218. ),
  1219. 'type_id' => array(
  1220. 'description' => '',
  1221. 'type' => 'int',
  1222. 'not null' => TRUE,
  1223. ),
  1224. 'value' => array(
  1225. 'description' => '',
  1226. 'type' => 'text',
  1227. 'not null' => FALSE,
  1228. ),
  1229. 'rank' => array(
  1230. 'description' => '',
  1231. 'type' => 'int',
  1232. 'not null' => TRUE,
  1233. 'default' => 0,
  1234. ),
  1235. ),
  1236. 'primary key' => array(
  1237. 0 => 'assayprop_id',
  1238. ),
  1239. 'unique keys' => array(
  1240. 'assayprop_c1' => array(
  1241. 0 => 'assay_id',
  1242. 1 => 'type_id',
  1243. 2 => 'rank',
  1244. ),
  1245. ),
  1246. 'indexes' => array(
  1247. 'assayprop_idx1' => array(
  1248. 0 => 'assay_id',
  1249. ),
  1250. 'assayprop_idx2' => array(
  1251. 0 => 'type_id',
  1252. ),
  1253. ),
  1254. 'foreign keys' => array(
  1255. 'cvterm' => array(
  1256. 'table' => 'cvterm',
  1257. 'columns' => array(
  1258. 'type_id' => 'cvterm_id',
  1259. ),
  1260. ),
  1261. 'assay' => array(
  1262. 'table' => 'assay',
  1263. 'columns' => array(
  1264. 'assay_id' => 'assay_id',
  1265. ),
  1266. ),
  1267. ),
  1268. 'table' => 'assayprop',
  1269. 'referring_tables' => NULL,
  1270. );
  1271. return $description;
  1272. }
  1273. /**
  1274. * Implements hook_chado_schema_v1_2_biomaterial()
  1275. * Purpose: To describe the structure of 'biomaterial' to tripal
  1276. * @see chado_insert_record()
  1277. * @see chado_update_record()
  1278. * @see chado_select_record()
  1279. *
  1280. * @return
  1281. * An array describing the 'biomaterial' table
  1282. *
  1283. * @ingroup tripal_chado_v1.2_schema_api
  1284. *
  1285. */
  1286. function tripal_chado_chado_schema_v1_2_biomaterial() {
  1287. $description = array(
  1288. 'description' => '',
  1289. 'fields' => array(
  1290. 'biomaterial_id' => array(
  1291. 'description' => '',
  1292. 'type' => 'serial',
  1293. 'not null' => TRUE,
  1294. ),
  1295. 'taxon_id' => array(
  1296. 'description' => '',
  1297. 'type' => 'int',
  1298. 'not null' => FALSE,
  1299. ),
  1300. 'biosourceprovider_id' => array(
  1301. 'description' => '',
  1302. 'type' => 'int',
  1303. 'not null' => FALSE,
  1304. ),
  1305. 'dbxref_id' => array(
  1306. 'description' => '',
  1307. 'type' => 'int',
  1308. 'not null' => FALSE,
  1309. ),
  1310. 'name' => array(
  1311. 'description' => '',
  1312. 'type' => 'text',
  1313. 'not null' => FALSE,
  1314. ),
  1315. 'description' => array(
  1316. 'description' => '',
  1317. 'type' => 'text',
  1318. 'not null' => FALSE,
  1319. ),
  1320. ),
  1321. 'primary key' => array(
  1322. 0 => 'biomaterial_id',
  1323. ),
  1324. 'unique keys' => array(
  1325. 'biomaterial_c1' => array(
  1326. 0 => 'name',
  1327. ),
  1328. ),
  1329. 'indexes' => array(
  1330. 'biomaterial_idx1' => array(
  1331. 0 => 'taxon_id',
  1332. ),
  1333. 'biomaterial_idx2' => array(
  1334. 0 => 'biosourceprovider_id',
  1335. ),
  1336. 'biomaterial_idx3' => array(
  1337. 0 => 'dbxref_id',
  1338. ),
  1339. ),
  1340. 'foreign keys' => array(
  1341. 'organism' => array(
  1342. 'table' => 'organism',
  1343. 'columns' => array(
  1344. 'taxon_id' => 'organism_id',
  1345. ),
  1346. ),
  1347. 'dbxref' => array(
  1348. 'table' => 'dbxref',
  1349. 'columns' => array(
  1350. 'dbxref_id' => 'dbxref_id',
  1351. ),
  1352. ),
  1353. 'contact' => array(
  1354. 'table' => 'contact',
  1355. 'columns' => array(
  1356. 'biosourceprovider_id' => 'contact_id',
  1357. ),
  1358. ),
  1359. ),
  1360. 'table' => 'biomaterial',
  1361. 'referring_tables' => array(
  1362. 0 => 'assay_biomaterial',
  1363. 1 => 'biomaterial_dbxref',
  1364. 2 => 'biomaterial_relationship',
  1365. 4 => 'biomaterial_treatment',
  1366. 5 => 'biomaterialprop',
  1367. 6 => 'treatment',
  1368. ),
  1369. );
  1370. return $description;
  1371. }
  1372. /**
  1373. * Implements hook_chado_schema_v1_2_biomaterial_dbxref()
  1374. * Purpose: To describe the structure of 'biomaterial_dbxref' to tripal
  1375. * @see chado_insert_record()
  1376. * @see chado_update_record()
  1377. * @see chado_select_record()
  1378. *
  1379. * @return
  1380. * An array describing the 'biomaterial_dbxref' table
  1381. *
  1382. * @ingroup tripal_chado_v1.2_schema_api
  1383. *
  1384. */
  1385. function tripal_chado_chado_schema_v1_2_biomaterial_dbxref() {
  1386. $description = array(
  1387. 'description' => '',
  1388. 'fields' => array(
  1389. 'biomaterial_dbxref_id' => array(
  1390. 'description' => '',
  1391. 'type' => 'serial',
  1392. 'not null' => TRUE,
  1393. ),
  1394. 'biomaterial_id' => array(
  1395. 'description' => '',
  1396. 'type' => 'int',
  1397. 'not null' => TRUE,
  1398. ),
  1399. 'dbxref_id' => array(
  1400. 'description' => '',
  1401. 'type' => 'int',
  1402. 'not null' => TRUE,
  1403. ),
  1404. ),
  1405. 'primary key' => array(
  1406. 0 => 'biomaterial_dbxref_id',
  1407. ),
  1408. 'unique keys' => array(
  1409. 'biomaterial_dbxref_c1' => array(
  1410. 0 => 'biomaterial_id',
  1411. 1 => 'dbxref_id',
  1412. ),
  1413. ),
  1414. 'indexes' => array(
  1415. 'biomaterial_dbxref_idx1' => array(
  1416. 0 => 'biomaterial_id',
  1417. ),
  1418. 'biomaterial_dbxref_idx2' => array(
  1419. 0 => 'dbxref_id',
  1420. ),
  1421. ),
  1422. 'foreign keys' => array(
  1423. 'dbxref' => array(
  1424. 'table' => 'dbxref',
  1425. 'columns' => array(
  1426. 'dbxref_id' => 'dbxref_id',
  1427. ),
  1428. ),
  1429. 'biomaterial' => array(
  1430. 'table' => 'biomaterial',
  1431. 'columns' => array(
  1432. 'biomaterial_id' => 'biomaterial_id',
  1433. ),
  1434. ),
  1435. ),
  1436. 'table' => 'biomaterial_dbxref',
  1437. 'referring_tables' => NULL,
  1438. );
  1439. return $description;
  1440. }
  1441. /**
  1442. * Implements hook_chado_schema_v1_2_biomaterial_relationship()
  1443. * Purpose: To describe the structure of 'biomaterial_relationship' to tripal
  1444. * @see chado_insert_record()
  1445. * @see chado_update_record()
  1446. * @see chado_select_record()
  1447. *
  1448. * @return
  1449. * An array describing the 'biomaterial_relationship' table
  1450. *
  1451. * @ingroup tripal_chado_v1.2_schema_api
  1452. *
  1453. */
  1454. function tripal_chado_chado_schema_v1_2_biomaterial_relationship() {
  1455. $description = array(
  1456. 'description' => '',
  1457. 'fields' => array(
  1458. 'biomaterial_relationship_id' => array(
  1459. 'description' => '',
  1460. 'type' => 'serial',
  1461. 'not null' => TRUE,
  1462. ),
  1463. 'subject_id' => array(
  1464. 'description' => '',
  1465. 'type' => 'int',
  1466. 'not null' => TRUE,
  1467. ),
  1468. 'type_id' => array(
  1469. 'description' => '',
  1470. 'type' => 'int',
  1471. 'not null' => TRUE,
  1472. ),
  1473. 'object_id' => array(
  1474. 'description' => '',
  1475. 'type' => 'int',
  1476. 'not null' => TRUE,
  1477. ),
  1478. ),
  1479. 'primary key' => array(
  1480. 0 => 'biomaterial_relationship_id',
  1481. ),
  1482. 'unique keys' => array(
  1483. 'biomaterial_relationship_c1' => array(
  1484. 0 => 'subject_id',
  1485. 1 => 'object_id',
  1486. 2 => 'type_id',
  1487. ),
  1488. ),
  1489. 'indexes' => array(
  1490. 'biomaterial_relationship_idx1' => array(
  1491. 0 => 'subject_id',
  1492. ),
  1493. 'biomaterial_relationship_idx2' => array(
  1494. 0 => 'object_id',
  1495. ),
  1496. 'biomaterial_relationship_idx3' => array(
  1497. 0 => 'type_id',
  1498. ),
  1499. ),
  1500. 'foreign keys' => array(
  1501. 'cvterm' => array(
  1502. 'table' => 'cvterm',
  1503. 'columns' => array(
  1504. 'type_id' => 'cvterm_id',
  1505. ),
  1506. ),
  1507. 'biomaterial' => array(
  1508. 'table' => 'biomaterial',
  1509. 'columns' => array(
  1510. 'subject_id' => 'biomaterial_id',
  1511. 'object_id' => 'biomaterial_id',
  1512. ),
  1513. ),
  1514. ),
  1515. 'table' => 'biomaterial_relationship',
  1516. 'referring_tables' => NULL,
  1517. );
  1518. return $description;
  1519. }
  1520. /**
  1521. * Implements hook_chado_schema_v1_2_biomaterial_treatment()
  1522. * Purpose: To describe the structure of 'biomaterial_treatment' to tripal
  1523. * @see chado_insert_record()
  1524. * @see chado_update_record()
  1525. * @see chado_select_record()
  1526. *
  1527. * @return
  1528. * An array describing the 'biomaterial_treatment' table
  1529. *
  1530. * @ingroup tripal_chado_v1.2_schema_api
  1531. *
  1532. */
  1533. function tripal_chado_chado_schema_v1_2_biomaterial_treatment() {
  1534. $description = array(
  1535. 'description' => '',
  1536. 'fields' => array(
  1537. 'biomaterial_treatment_id' => array(
  1538. 'description' => '',
  1539. 'type' => 'serial',
  1540. 'not null' => TRUE,
  1541. ),
  1542. 'biomaterial_id' => array(
  1543. 'description' => '',
  1544. 'type' => 'int',
  1545. 'not null' => TRUE,
  1546. ),
  1547. 'treatment_id' => array(
  1548. 'description' => '',
  1549. 'type' => 'int',
  1550. 'not null' => TRUE,
  1551. ),
  1552. 'unittype_id' => array(
  1553. 'description' => '',
  1554. 'type' => 'int',
  1555. 'not null' => FALSE,
  1556. ),
  1557. 'value' => array(
  1558. 'description' => '',
  1559. 'type' => 'float',
  1560. 'not null' => FALSE,
  1561. ),
  1562. 'rank' => array(
  1563. 'description' => '',
  1564. 'type' => 'int',
  1565. 'not null' => TRUE,
  1566. 'default' => 0,
  1567. ),
  1568. ),
  1569. 'primary key' => array(
  1570. 0 => 'biomaterial_treatment_id',
  1571. ),
  1572. 'unique keys' => array(
  1573. 'biomaterial_treatment_c1' => array(
  1574. 0 => 'biomaterial_id',
  1575. 1 => 'treatment_id',
  1576. ),
  1577. ),
  1578. 'indexes' => array(
  1579. 'biomaterial_treatment_idx1' => array(
  1580. 0 => 'biomaterial_id',
  1581. ),
  1582. 'biomaterial_treatment_idx2' => array(
  1583. 0 => 'treatment_id',
  1584. ),
  1585. 'biomaterial_treatment_idx3' => array(
  1586. 0 => 'unittype_id',
  1587. ),
  1588. ),
  1589. 'foreign keys' => array(
  1590. 'cvterm' => array(
  1591. 'table' => 'cvterm',
  1592. 'columns' => array(
  1593. 'unittype_id' => 'cvterm_id',
  1594. ),
  1595. ),
  1596. 'biomaterial' => array(
  1597. 'table' => 'biomaterial',
  1598. 'columns' => array(
  1599. 'biomaterial_id' => 'biomaterial_id',
  1600. ),
  1601. ),
  1602. 'treatment' => array(
  1603. 'table' => 'treatment',
  1604. 'columns' => array(
  1605. 'treatment_id' => 'treatment_id',
  1606. ),
  1607. ),
  1608. ),
  1609. 'table' => 'biomaterial_treatment',
  1610. 'referring_tables' => NULL,
  1611. );
  1612. return $description;
  1613. }
  1614. /**
  1615. * Implements hook_chado_schema_v1_2_biomaterialprop()
  1616. * Purpose: To describe the structure of 'biomaterialprop' to tripal
  1617. * @see chado_insert_record()
  1618. * @see chado_update_record()
  1619. * @see chado_select_record()
  1620. *
  1621. * @return
  1622. * An array describing the 'biomaterialprop' table
  1623. *
  1624. * @ingroup tripal_chado_v1.2_schema_api
  1625. *
  1626. */
  1627. function tripal_chado_chado_schema_v1_2_biomaterialprop() {
  1628. $description = array(
  1629. 'description' => '',
  1630. 'fields' => array(
  1631. 'biomaterialprop_id' => array(
  1632. 'description' => '',
  1633. 'type' => 'serial',
  1634. 'not null' => TRUE,
  1635. ),
  1636. 'biomaterial_id' => array(
  1637. 'description' => '',
  1638. 'type' => 'int',
  1639. 'not null' => TRUE,
  1640. ),
  1641. 'type_id' => array(
  1642. 'description' => '',
  1643. 'type' => 'int',
  1644. 'not null' => TRUE,
  1645. ),
  1646. 'value' => array(
  1647. 'description' => '',
  1648. 'type' => 'text',
  1649. 'not null' => FALSE,
  1650. ),
  1651. 'rank' => array(
  1652. 'description' => '',
  1653. 'type' => 'int',
  1654. 'not null' => TRUE,
  1655. 'default' => 0,
  1656. ),
  1657. ),
  1658. 'primary key' => array(
  1659. 0 => 'biomaterialprop_id',
  1660. ),
  1661. 'unique keys' => array(
  1662. 'biomaterialprop_c1' => array(
  1663. 0 => 'biomaterial_id',
  1664. 1 => 'type_id',
  1665. 2 => 'rank',
  1666. ),
  1667. ),
  1668. 'indexes' => array(
  1669. 'biomaterialprop_idx1' => array(
  1670. 0 => 'biomaterial_id',
  1671. ),
  1672. 'biomaterialprop_idx2' => array(
  1673. 0 => 'type_id',
  1674. ),
  1675. ),
  1676. 'foreign keys' => array(
  1677. 'cvterm' => array(
  1678. 'table' => 'cvterm',
  1679. 'columns' => array(
  1680. 'type_id' => 'cvterm_id',
  1681. ),
  1682. ),
  1683. 'biomaterial' => array(
  1684. 'table' => 'biomaterial',
  1685. 'columns' => array(
  1686. 'biomaterial_id' => 'biomaterial_id',
  1687. ),
  1688. ),
  1689. ),
  1690. 'table' => 'biomaterialprop',
  1691. 'referring_tables' => NULL,
  1692. );
  1693. return $description;
  1694. }
  1695. /**
  1696. * Implements hook_chado_schema_v1_2_cell_line()
  1697. * Purpose: To describe the structure of 'cell_line' to tripal
  1698. * @see chado_insert_record()
  1699. * @see chado_update_record()
  1700. * @see chado_select_record()
  1701. *
  1702. * @return
  1703. * An array describing the 'cell_line' table
  1704. *
  1705. * @ingroup tripal_chado_v1.2_schema_api
  1706. *
  1707. */
  1708. function tripal_chado_chado_schema_v1_2_cell_line() {
  1709. $description = array(
  1710. 'description' => '',
  1711. 'fields' => array(
  1712. 'cell_line_id' => array(
  1713. 'description' => '',
  1714. 'type' => 'serial',
  1715. 'not null' => TRUE,
  1716. ),
  1717. 'name' => array(
  1718. 'description' => '',
  1719. 'type' => 'varchar',
  1720. 'length' => '255',
  1721. 'not null' => FALSE,
  1722. ),
  1723. 'uniquename' => array(
  1724. 'description' => '',
  1725. 'type' => 'varchar',
  1726. 'length' => '255',
  1727. 'not null' => TRUE,
  1728. ),
  1729. 'organism_id' => array(
  1730. 'description' => '',
  1731. 'type' => 'int',
  1732. 'not null' => TRUE,
  1733. ),
  1734. 'timeaccessioned' => array(
  1735. 'description' => '',
  1736. 'type' => 'datetime',
  1737. 'not null' => TRUE,
  1738. 'default' => 'now()',
  1739. ),
  1740. 'timelastmodified' => array(
  1741. 'description' => '',
  1742. 'type' => 'datetime',
  1743. 'not null' => TRUE,
  1744. 'default' => 'now()',
  1745. ),
  1746. ),
  1747. 'primary key' => array(
  1748. 0 => 'cell_line_id',
  1749. ),
  1750. 'unique keys' => array(
  1751. 'cell_line_c1' => array(
  1752. 0 => 'uniquename',
  1753. 1 => 'organism_id',
  1754. ),
  1755. ),
  1756. 'foreign keys' => array(
  1757. 'organism' => array(
  1758. 'table' => 'organism',
  1759. 'columns' => array(
  1760. 'organism_id' => 'organism_id',
  1761. ),
  1762. ),
  1763. ),
  1764. 'table' => 'cell_line',
  1765. 'referring_tables' => array(
  1766. 0 => 'cell_line_cvterm',
  1767. 1 => 'cell_line_dbxref',
  1768. 2 => 'cell_line_feature',
  1769. 3 => 'cell_line_library',
  1770. 4 => 'cell_line_pub',
  1771. 5 => 'cell_line_relationship',
  1772. 7 => 'cell_line_synonym',
  1773. 8 => 'cell_lineprop',
  1774. ),
  1775. );
  1776. return $description;
  1777. }
  1778. /**
  1779. * Implements hook_chado_schema_v1_2_cell_line_cvterm()
  1780. * Purpose: To describe the structure of 'cell_line_cvterm' to tripal
  1781. * @see chado_insert_record()
  1782. * @see chado_update_record()
  1783. * @see chado_select_record()
  1784. *
  1785. * @return
  1786. * An array describing the 'cell_line_cvterm' table
  1787. *
  1788. * @ingroup tripal_chado_v1.2_schema_api
  1789. *
  1790. */
  1791. function tripal_chado_chado_schema_v1_2_cell_line_cvterm() {
  1792. $description = array(
  1793. 'description' => '',
  1794. 'fields' => array(
  1795. 'cell_line_cvterm_id' => array(
  1796. 'description' => '',
  1797. 'type' => 'serial',
  1798. 'not null' => TRUE,
  1799. ),
  1800. 'cell_line_id' => array(
  1801. 'description' => '',
  1802. 'type' => 'int',
  1803. 'not null' => TRUE,
  1804. ),
  1805. 'cvterm_id' => array(
  1806. 'description' => '',
  1807. 'type' => 'int',
  1808. 'not null' => TRUE,
  1809. ),
  1810. 'pub_id' => array(
  1811. 'description' => '',
  1812. 'type' => 'int',
  1813. 'not null' => TRUE,
  1814. ),
  1815. 'rank' => array(
  1816. 'description' => '',
  1817. 'type' => 'int',
  1818. 'not null' => TRUE,
  1819. 'default' => 0,
  1820. ),
  1821. ),
  1822. 'primary key' => array(
  1823. 0 => 'cell_line_cvterm_id',
  1824. ),
  1825. 'unique keys' => array(
  1826. 'cell_line_cvterm_c1' => array(
  1827. 0 => 'cell_line_id',
  1828. 1 => 'cvterm_id',
  1829. 2 => 'pub_id',
  1830. 3 => 'rank',
  1831. ),
  1832. ),
  1833. 'foreign keys' => array(
  1834. 'cvterm' => array(
  1835. 'table' => 'cvterm',
  1836. 'columns' => array(
  1837. 'cvterm_id' => 'cvterm_id',
  1838. ),
  1839. ),
  1840. 'pub' => array(
  1841. 'table' => 'pub',
  1842. 'columns' => array(
  1843. 'pub_id' => 'pub_id',
  1844. ),
  1845. ),
  1846. 'cell_line' => array(
  1847. 'table' => 'cell_line',
  1848. 'columns' => array(
  1849. 'cell_line_id' => 'cell_line_id',
  1850. ),
  1851. ),
  1852. ),
  1853. 'table' => 'cell_line_cvterm',
  1854. 'referring_tables' => array(
  1855. 0 => 'cell_line_cvtermprop',
  1856. ),
  1857. );
  1858. return $description;
  1859. }
  1860. /**
  1861. * Implements hook_chado_schema_v1_2_cell_line_cvtermprop()
  1862. * Purpose: To describe the structure of 'cell_line_cvtermprop' to tripal
  1863. * @see chado_insert_record()
  1864. * @see chado_update_record()
  1865. * @see chado_select_record()
  1866. *
  1867. * @return
  1868. * An array describing the 'cell_line_cvtermprop' table
  1869. *
  1870. * @ingroup tripal_chado_v1.2_schema_api
  1871. *
  1872. */
  1873. function tripal_chado_chado_schema_v1_2_cell_line_cvtermprop() {
  1874. $description = array(
  1875. 'description' => '',
  1876. 'fields' => array(
  1877. 'cell_line_cvtermprop_id' => array(
  1878. 'description' => '',
  1879. 'type' => 'serial',
  1880. 'not null' => TRUE,
  1881. ),
  1882. 'cell_line_cvterm_id' => array(
  1883. 'description' => '',
  1884. 'type' => 'int',
  1885. 'not null' => TRUE,
  1886. ),
  1887. 'type_id' => array(
  1888. 'description' => '',
  1889. 'type' => 'int',
  1890. 'not null' => TRUE,
  1891. ),
  1892. 'value' => array(
  1893. 'description' => '',
  1894. 'type' => 'text',
  1895. 'not null' => FALSE,
  1896. ),
  1897. 'rank' => array(
  1898. 'description' => '',
  1899. 'type' => 'int',
  1900. 'not null' => TRUE,
  1901. 'default' => 0,
  1902. ),
  1903. ),
  1904. 'primary key' => array(
  1905. 0 => 'cell_line_cvtermprop_id',
  1906. ),
  1907. 'unique keys' => array(
  1908. 'cell_line_cvtermprop_c1' => array(
  1909. 0 => 'cell_line_cvterm_id',
  1910. 1 => 'type_id',
  1911. 2 => 'rank',
  1912. ),
  1913. ),
  1914. 'foreign keys' => array(
  1915. 'cvterm' => array(
  1916. 'table' => 'cvterm',
  1917. 'columns' => array(
  1918. 'type_id' => 'cvterm_id',
  1919. ),
  1920. ),
  1921. 'cell_line_cvterm' => array(
  1922. 'table' => 'cell_line_cvterm',
  1923. 'columns' => array(
  1924. 'cell_line_cvterm_id' => 'cell_line_cvterm_id',
  1925. ),
  1926. ),
  1927. ),
  1928. 'table' => 'cell_line_cvtermprop',
  1929. 'referring_tables' => NULL,
  1930. );
  1931. return $description;
  1932. }
  1933. /**
  1934. * Implements hook_chado_schema_v1_2_cell_line_dbxref()
  1935. * Purpose: To describe the structure of 'cell_line_dbxref' to tripal
  1936. * @see chado_insert_record()
  1937. * @see chado_update_record()
  1938. * @see chado_select_record()
  1939. *
  1940. * @return
  1941. * An array describing the 'cell_line_dbxref' table
  1942. *
  1943. * @ingroup tripal_chado_v1.2_schema_api
  1944. *
  1945. */
  1946. function tripal_chado_chado_schema_v1_2_cell_line_dbxref() {
  1947. $description = array(
  1948. 'description' => '',
  1949. 'fields' => array(
  1950. 'cell_line_dbxref_id' => array(
  1951. 'description' => '',
  1952. 'type' => 'serial',
  1953. 'not null' => TRUE,
  1954. ),
  1955. 'cell_line_id' => array(
  1956. 'description' => '',
  1957. 'type' => 'int',
  1958. 'not null' => TRUE,
  1959. ),
  1960. 'dbxref_id' => array(
  1961. 'description' => '',
  1962. 'type' => 'int',
  1963. 'not null' => TRUE,
  1964. ),
  1965. 'is_current' => array(
  1966. 'description' => '',
  1967. 'type' => 'boolean',
  1968. 'not null' => TRUE,
  1969. 'default' => 'true',
  1970. ),
  1971. ),
  1972. 'primary key' => array(
  1973. 0 => 'cell_line_dbxref_id',
  1974. ),
  1975. 'unique keys' => array(
  1976. 'cell_line_dbxref_c1' => array(
  1977. 0 => 'cell_line_id',
  1978. 1 => 'dbxref_id',
  1979. ),
  1980. ),
  1981. 'foreign keys' => array(
  1982. 'dbxref' => array(
  1983. 'table' => 'dbxref',
  1984. 'columns' => array(
  1985. 'dbxref_id' => 'dbxref_id',
  1986. ),
  1987. ),
  1988. 'cell_line' => array(
  1989. 'table' => 'cell_line',
  1990. 'columns' => array(
  1991. 'cell_line_id' => 'cell_line_id',
  1992. ),
  1993. ),
  1994. ),
  1995. 'table' => 'cell_line_dbxref',
  1996. 'referring_tables' => NULL,
  1997. );
  1998. return $description;
  1999. }
  2000. /**
  2001. * Implements hook_chado_schema_v1_2_cell_line_feature()
  2002. * Purpose: To describe the structure of 'cell_line_feature' to tripal
  2003. * @see chado_insert_record()
  2004. * @see chado_update_record()
  2005. * @see chado_select_record()
  2006. *
  2007. * @return
  2008. * An array describing the 'cell_line_feature' table
  2009. *
  2010. * @ingroup tripal_chado_v1.2_schema_api
  2011. *
  2012. */
  2013. function tripal_chado_chado_schema_v1_2_cell_line_feature() {
  2014. $description = array(
  2015. 'description' => '',
  2016. 'fields' => array(
  2017. 'cell_line_feature_id' => array(
  2018. 'description' => '',
  2019. 'type' => 'serial',
  2020. 'not null' => TRUE,
  2021. ),
  2022. 'cell_line_id' => array(
  2023. 'description' => '',
  2024. 'type' => 'int',
  2025. 'not null' => TRUE,
  2026. ),
  2027. 'feature_id' => array(
  2028. 'description' => '',
  2029. 'type' => 'int',
  2030. 'not null' => TRUE,
  2031. ),
  2032. 'pub_id' => array(
  2033. 'description' => '',
  2034. 'type' => 'int',
  2035. 'not null' => TRUE,
  2036. ),
  2037. ),
  2038. 'primary key' => array(
  2039. 0 => 'cell_line_feature_id',
  2040. ),
  2041. 'unique keys' => array(
  2042. 'cell_line_feature_c1' => array(
  2043. 0 => 'cell_line_id',
  2044. 1 => 'feature_id',
  2045. 2 => 'pub_id',
  2046. ),
  2047. ),
  2048. 'foreign keys' => array(
  2049. 'pub' => array(
  2050. 'table' => 'pub',
  2051. 'columns' => array(
  2052. 'pub_id' => 'pub_id',
  2053. ),
  2054. ),
  2055. 'feature' => array(
  2056. 'table' => 'feature',
  2057. 'columns' => array(
  2058. 'feature_id' => 'feature_id',
  2059. ),
  2060. ),
  2061. 'cell_line' => array(
  2062. 'table' => 'cell_line',
  2063. 'columns' => array(
  2064. 'cell_line_id' => 'cell_line_id',
  2065. ),
  2066. ),
  2067. ),
  2068. 'table' => 'cell_line_feature',
  2069. 'referring_tables' => NULL,
  2070. );
  2071. return $description;
  2072. }
  2073. /**
  2074. * Implements hook_chado_schema_v1_2_cell_line_library()
  2075. * Purpose: To describe the structure of 'cell_line_library' to tripal
  2076. * @see chado_insert_record()
  2077. * @see chado_update_record()
  2078. * @see chado_select_record()
  2079. *
  2080. * @return
  2081. * An array describing the 'cell_line_library' table
  2082. *
  2083. * @ingroup tripal_chado_v1.2_schema_api
  2084. *
  2085. */
  2086. function tripal_chado_chado_schema_v1_2_cell_line_library() {
  2087. $description = array(
  2088. 'description' => '',
  2089. 'fields' => array(
  2090. 'cell_line_library_id' => array(
  2091. 'description' => '',
  2092. 'type' => 'serial',
  2093. 'not null' => TRUE,
  2094. ),
  2095. 'cell_line_id' => array(
  2096. 'description' => '',
  2097. 'type' => 'int',
  2098. 'not null' => TRUE,
  2099. ),
  2100. 'library_id' => array(
  2101. 'description' => '',
  2102. 'type' => 'int',
  2103. 'not null' => TRUE,
  2104. ),
  2105. 'pub_id' => array(
  2106. 'description' => '',
  2107. 'type' => 'int',
  2108. 'not null' => TRUE,
  2109. ),
  2110. ),
  2111. 'primary key' => array(
  2112. 0 => 'cell_line_library_id',
  2113. ),
  2114. 'unique keys' => array(
  2115. 'cell_line_library_c1' => array(
  2116. 0 => 'cell_line_id',
  2117. 1 => 'library_id',
  2118. 2 => 'pub_id',
  2119. ),
  2120. ),
  2121. 'foreign keys' => array(
  2122. 'pub' => array(
  2123. 'table' => 'pub',
  2124. 'columns' => array(
  2125. 'pub_id' => 'pub_id',
  2126. ),
  2127. ),
  2128. 'library' => array(
  2129. 'table' => 'library',
  2130. 'columns' => array(
  2131. 'library_id' => 'library_id',
  2132. ),
  2133. ),
  2134. 'cell_line' => array(
  2135. 'table' => 'cell_line',
  2136. 'columns' => array(
  2137. 'cell_line_id' => 'cell_line_id',
  2138. ),
  2139. ),
  2140. ),
  2141. 'table' => 'cell_line_library',
  2142. 'referring_tables' => NULL,
  2143. );
  2144. return $description;
  2145. }
  2146. /**
  2147. * Implements hook_chado_schema_v1_2_cell_line_pub()
  2148. * Purpose: To describe the structure of 'cell_line_pub' to tripal
  2149. * @see chado_insert_record()
  2150. * @see chado_update_record()
  2151. * @see chado_select_record()
  2152. *
  2153. * @return
  2154. * An array describing the 'cell_line_pub' table
  2155. *
  2156. * @ingroup tripal_chado_v1.2_schema_api
  2157. *
  2158. */
  2159. function tripal_chado_chado_schema_v1_2_cell_line_pub() {
  2160. $description = array(
  2161. 'description' => '',
  2162. 'fields' => array(
  2163. 'cell_line_pub_id' => array(
  2164. 'description' => '',
  2165. 'type' => 'serial',
  2166. 'not null' => TRUE,
  2167. ),
  2168. 'cell_line_id' => array(
  2169. 'description' => '',
  2170. 'type' => 'int',
  2171. 'not null' => TRUE,
  2172. ),
  2173. 'pub_id' => array(
  2174. 'description' => '',
  2175. 'type' => 'int',
  2176. 'not null' => TRUE,
  2177. ),
  2178. ),
  2179. 'primary key' => array(
  2180. 0 => 'cell_line_pub_id',
  2181. ),
  2182. 'unique keys' => array(
  2183. 'cell_line_pub_c1' => array(
  2184. 0 => 'cell_line_id',
  2185. 1 => 'pub_id',
  2186. ),
  2187. ),
  2188. 'foreign keys' => array(
  2189. 'pub' => array(
  2190. 'table' => 'pub',
  2191. 'columns' => array(
  2192. 'pub_id' => 'pub_id',
  2193. ),
  2194. ),
  2195. 'cell_line' => array(
  2196. 'table' => 'cell_line',
  2197. 'columns' => array(
  2198. 'cell_line_id' => 'cell_line_id',
  2199. ),
  2200. ),
  2201. ),
  2202. 'table' => 'cell_line_pub',
  2203. 'referring_tables' => NULL,
  2204. );
  2205. return $description;
  2206. }
  2207. /**
  2208. * Implements hook_chado_schema_v1_2_cell_line_relationship()
  2209. * Purpose: To describe the structure of 'cell_line_relationship' to tripal
  2210. * @see chado_insert_record()
  2211. * @see chado_update_record()
  2212. * @see chado_select_record()
  2213. *
  2214. * @return
  2215. * An array describing the 'cell_line_relationship' table
  2216. *
  2217. * @ingroup tripal_chado_v1.2_schema_api
  2218. *
  2219. */
  2220. function tripal_chado_chado_schema_v1_2_cell_line_relationship() {
  2221. $description = array(
  2222. 'description' => '',
  2223. 'fields' => array(
  2224. 'cell_line_relationship_id' => array(
  2225. 'description' => '',
  2226. 'type' => 'serial',
  2227. 'not null' => TRUE,
  2228. ),
  2229. 'subject_id' => array(
  2230. 'description' => '',
  2231. 'type' => 'int',
  2232. 'not null' => TRUE,
  2233. ),
  2234. 'object_id' => array(
  2235. 'description' => '',
  2236. 'type' => 'int',
  2237. 'not null' => TRUE,
  2238. ),
  2239. 'type_id' => array(
  2240. 'description' => '',
  2241. 'type' => 'int',
  2242. 'not null' => TRUE,
  2243. ),
  2244. ),
  2245. 'primary key' => array(
  2246. 0 => 'cell_line_relationship_id',
  2247. ),
  2248. 'unique keys' => array(
  2249. 'cell_line_relationship_c1' => array(
  2250. 0 => 'subject_id',
  2251. 1 => 'object_id',
  2252. 2 => 'type_id',
  2253. ),
  2254. ),
  2255. 'foreign keys' => array(
  2256. 'cvterm' => array(
  2257. 'table' => 'cvterm',
  2258. 'columns' => array(
  2259. 'type_id' => 'cvterm_id',
  2260. ),
  2261. ),
  2262. 'cell_line' => array(
  2263. 'table' => 'cell_line',
  2264. 'columns' => array(
  2265. 'subject_id' => 'cell_line_id',
  2266. 'object_id' => 'cell_line_id',
  2267. ),
  2268. ),
  2269. ),
  2270. 'table' => 'cell_line_relationship',
  2271. 'referring_tables' => NULL,
  2272. );
  2273. return $description;
  2274. }
  2275. /**
  2276. * Implements hook_chado_schema_v1_2_cell_line_synonym()
  2277. * Purpose: To describe the structure of 'cell_line_synonym' to tripal
  2278. * @see chado_insert_record()
  2279. * @see chado_update_record()
  2280. * @see chado_select_record()
  2281. *
  2282. * @return
  2283. * An array describing the 'cell_line_synonym' table
  2284. *
  2285. * @ingroup tripal_chado_v1.2_schema_api
  2286. *
  2287. */
  2288. function tripal_chado_chado_schema_v1_2_cell_line_synonym() {
  2289. $description = array(
  2290. 'description' => '',
  2291. 'fields' => array(
  2292. 'cell_line_synonym_id' => array(
  2293. 'description' => '',
  2294. 'type' => 'serial',
  2295. 'not null' => TRUE,
  2296. ),
  2297. 'cell_line_id' => array(
  2298. 'description' => '',
  2299. 'type' => 'int',
  2300. 'not null' => TRUE,
  2301. ),
  2302. 'synonym_id' => array(
  2303. 'description' => '',
  2304. 'type' => 'int',
  2305. 'not null' => TRUE,
  2306. ),
  2307. 'pub_id' => array(
  2308. 'description' => '',
  2309. 'type' => 'int',
  2310. 'not null' => TRUE,
  2311. ),
  2312. 'is_current' => array(
  2313. 'description' => '',
  2314. 'type' => 'boolean',
  2315. 'not null' => TRUE,
  2316. 'default' => 'false',
  2317. ),
  2318. 'is_internal' => array(
  2319. 'description' => '',
  2320. 'type' => 'boolean',
  2321. 'not null' => TRUE,
  2322. 'default' => 'false',
  2323. ),
  2324. ),
  2325. 'primary key' => array(
  2326. 0 => 'cell_line_synonym_id',
  2327. ),
  2328. 'unique keys' => array(
  2329. 'cell_line_synonym_c1' => array(
  2330. 0 => 'synonym_id',
  2331. 1 => 'cell_line_id',
  2332. 2 => 'pub_id',
  2333. ),
  2334. ),
  2335. 'foreign keys' => array(
  2336. 'pub' => array(
  2337. 'table' => 'pub',
  2338. 'columns' => array(
  2339. 'pub_id' => 'pub_id',
  2340. ),
  2341. ),
  2342. 'synonym' => array(
  2343. 'table' => 'synonym',
  2344. 'columns' => array(
  2345. 'synonym_id' => 'synonym_id',
  2346. ),
  2347. ),
  2348. 'cell_line' => array(
  2349. 'table' => 'cell_line',
  2350. 'columns' => array(
  2351. 'cell_line_id' => 'cell_line_id',
  2352. ),
  2353. ),
  2354. ),
  2355. 'table' => 'cell_line_synonym',
  2356. 'referring_tables' => NULL,
  2357. );
  2358. return $description;
  2359. }
  2360. /**
  2361. * Implements hook_chado_schema_v1_2_cell_lineprop()
  2362. * Purpose: To describe the structure of 'cell_lineprop' to tripal
  2363. * @see chado_insert_record()
  2364. * @see chado_update_record()
  2365. * @see chado_select_record()
  2366. *
  2367. * @return
  2368. * An array describing the 'cell_lineprop' table
  2369. *
  2370. * @ingroup tripal_chado_v1.2_schema_api
  2371. *
  2372. */
  2373. function tripal_chado_chado_schema_v1_2_cell_lineprop() {
  2374. $description = array(
  2375. 'description' => '',
  2376. 'fields' => array(
  2377. 'cell_lineprop_id' => array(
  2378. 'description' => '',
  2379. 'type' => 'serial',
  2380. 'not null' => TRUE,
  2381. ),
  2382. 'cell_line_id' => array(
  2383. 'description' => '',
  2384. 'type' => 'int',
  2385. 'not null' => TRUE,
  2386. ),
  2387. 'type_id' => array(
  2388. 'description' => '',
  2389. 'type' => 'int',
  2390. 'not null' => TRUE,
  2391. ),
  2392. 'value' => array(
  2393. 'description' => '',
  2394. 'type' => 'text',
  2395. 'not null' => FALSE,
  2396. ),
  2397. 'rank' => array(
  2398. 'description' => '',
  2399. 'type' => 'int',
  2400. 'not null' => TRUE,
  2401. 'default' => 0,
  2402. ),
  2403. ),
  2404. 'primary key' => array(
  2405. 0 => 'cell_lineprop_id',
  2406. ),
  2407. 'unique keys' => array(
  2408. 'cell_lineprop_c1' => array(
  2409. 0 => 'cell_line_id',
  2410. 1 => 'type_id',
  2411. 2 => 'rank',
  2412. ),
  2413. ),
  2414. 'foreign keys' => array(
  2415. 'cvterm' => array(
  2416. 'table' => 'cvterm',
  2417. 'columns' => array(
  2418. 'type_id' => 'cvterm_id',
  2419. ),
  2420. ),
  2421. 'cell_line' => array(
  2422. 'table' => 'cell_line',
  2423. 'columns' => array(
  2424. 'cell_line_id' => 'cell_line_id',
  2425. ),
  2426. ),
  2427. ),
  2428. 'table' => 'cell_lineprop',
  2429. 'referring_tables' => array(
  2430. 0 => 'cell_lineprop_pub',
  2431. ),
  2432. );
  2433. return $description;
  2434. }
  2435. /**
  2436. * Implements hook_chado_schema_v1_2_cell_lineprop_pub()
  2437. * Purpose: To describe the structure of 'cell_lineprop_pub' to tripal
  2438. * @see chado_insert_record()
  2439. * @see chado_update_record()
  2440. * @see chado_select_record()
  2441. *
  2442. * @return
  2443. * An array describing the 'cell_lineprop_pub' table
  2444. *
  2445. * @ingroup tripal_chado_v1.2_schema_api
  2446. *
  2447. */
  2448. function tripal_chado_chado_schema_v1_2_cell_lineprop_pub() {
  2449. $description = array(
  2450. 'description' => '',
  2451. 'fields' => array(
  2452. 'cell_lineprop_pub_id' => array(
  2453. 'description' => '',
  2454. 'type' => 'serial',
  2455. 'not null' => TRUE,
  2456. ),
  2457. 'cell_lineprop_id' => array(
  2458. 'description' => '',
  2459. 'type' => 'int',
  2460. 'not null' => TRUE,
  2461. ),
  2462. 'pub_id' => array(
  2463. 'description' => '',
  2464. 'type' => 'int',
  2465. 'not null' => TRUE,
  2466. ),
  2467. ),
  2468. 'primary key' => array(
  2469. 0 => 'cell_lineprop_pub_id',
  2470. ),
  2471. 'unique keys' => array(
  2472. 'cell_lineprop_pub_c1' => array(
  2473. 0 => 'cell_lineprop_id',
  2474. 1 => 'pub_id',
  2475. ),
  2476. ),
  2477. 'foreign keys' => array(
  2478. 'pub' => array(
  2479. 'table' => 'pub',
  2480. 'columns' => array(
  2481. 'pub_id' => 'pub_id',
  2482. ),
  2483. ),
  2484. 'cell_lineprop' => array(
  2485. 'table' => 'cell_lineprop',
  2486. 'columns' => array(
  2487. 'cell_lineprop_id' => 'cell_lineprop_id',
  2488. ),
  2489. ),
  2490. ),
  2491. 'table' => 'cell_lineprop_pub',
  2492. 'referring_tables' => NULL,
  2493. );
  2494. return $description;
  2495. }
  2496. /**
  2497. * Implements hook_chado_schema_v1_2_chadoprop()
  2498. * Purpose: To describe the structure of 'chadoprop' to tripal
  2499. * @see chado_insert_record()
  2500. * @see chado_update_record()
  2501. * @see chado_select_record()
  2502. *
  2503. * @return
  2504. * An array describing the 'chadoprop' table
  2505. *
  2506. * @ingroup tripal_chado_v1.2_schema_api
  2507. *
  2508. */
  2509. function tripal_chado_chado_schema_v1_2_chadoprop() {
  2510. $description = array(
  2511. 'description' => '',
  2512. 'fields' => array(
  2513. 'chadoprop_id' => array(
  2514. 'description' => '',
  2515. 'type' => 'serial',
  2516. 'not null' => TRUE,
  2517. ),
  2518. 'type_id' => array(
  2519. 'description' => '',
  2520. 'type' => 'int',
  2521. 'not null' => TRUE,
  2522. ),
  2523. 'value' => array(
  2524. 'description' => '',
  2525. 'type' => 'text',
  2526. 'not null' => FALSE,
  2527. ),
  2528. 'rank' => array(
  2529. 'description' => '',
  2530. 'type' => 'int',
  2531. 'not null' => TRUE,
  2532. 'default' => 0,
  2533. ),
  2534. ),
  2535. 'primary key' => array(
  2536. 0 => 'chadoprop_id',
  2537. ),
  2538. 'unique keys' => array(
  2539. 'chadoprop_c1' => array(
  2540. 0 => 'type_id',
  2541. 1 => 'rank',
  2542. ),
  2543. ),
  2544. 'foreign keys' => array(
  2545. 'cvterm' => array(
  2546. 'table' => 'cvterm',
  2547. 'columns' => array(
  2548. 'type_id' => 'cvterm_id',
  2549. ),
  2550. ),
  2551. ),
  2552. 'table' => 'chadoprop',
  2553. 'referring_tables' => NULL,
  2554. );
  2555. return $description;
  2556. }
  2557. /**
  2558. * Implements hook_chado_schema_v1_2_channel()
  2559. * Purpose: To describe the structure of 'channel' to tripal
  2560. * @see chado_insert_record()
  2561. * @see chado_update_record()
  2562. * @see chado_select_record()
  2563. *
  2564. * @return
  2565. * An array describing the 'channel' table
  2566. *
  2567. * @ingroup tripal_chado_v1.2_schema_api
  2568. *
  2569. */
  2570. function tripal_chado_chado_schema_v1_2_channel() {
  2571. $description = array(
  2572. 'description' => '',
  2573. 'fields' => array(
  2574. 'channel_id' => array(
  2575. 'description' => '',
  2576. 'type' => 'serial',
  2577. 'not null' => TRUE,
  2578. ),
  2579. 'name' => array(
  2580. 'description' => '',
  2581. 'type' => 'text',
  2582. 'not null' => TRUE,
  2583. ),
  2584. 'definition' => array(
  2585. 'description' => '',
  2586. 'type' => 'text',
  2587. 'not null' => TRUE,
  2588. ),
  2589. ),
  2590. 'primary key' => array(
  2591. 0 => 'channel_id',
  2592. ),
  2593. 'unique keys' => array(
  2594. 'channel_c1' => array(
  2595. 0 => 'name',
  2596. ),
  2597. ),
  2598. 'foreign keys' => array(
  2599. ),
  2600. 'table' => 'channel',
  2601. 'referring_tables' => array(
  2602. 0 => 'acquisition',
  2603. 1 => 'assay_biomaterial',
  2604. ),
  2605. );
  2606. return $description;
  2607. }
  2608. /**
  2609. * Implements hook_chado_schema_v1_2_contact()
  2610. * Purpose: To describe the structure of 'contact' to tripal
  2611. * @see chado_insert_record()
  2612. * @see chado_update_record()
  2613. * @see chado_select_record()
  2614. *
  2615. * @return
  2616. * An array describing the 'contact' table
  2617. *
  2618. * @ingroup tripal_chado_v1.2_schema_api
  2619. *
  2620. */
  2621. function tripal_chado_chado_schema_v1_2_contact() {
  2622. $description = array(
  2623. 'description' => '',
  2624. 'fields' => array(
  2625. 'contact_id' => array(
  2626. 'description' => '',
  2627. 'type' => 'serial',
  2628. 'not null' => TRUE,
  2629. ),
  2630. 'type_id' => array(
  2631. 'description' => '',
  2632. 'type' => 'int',
  2633. 'not null' => FALSE,
  2634. ),
  2635. 'name' => array(
  2636. 'description' => '',
  2637. 'type' => 'varchar',
  2638. 'length' => '255',
  2639. 'not null' => TRUE,
  2640. ),
  2641. 'description' => array(
  2642. 'description' => '',
  2643. 'type' => 'varchar',
  2644. 'length' => '255',
  2645. 'not null' => FALSE,
  2646. ),
  2647. ),
  2648. 'primary key' => array(
  2649. 0 => 'contact_id',
  2650. ),
  2651. 'unique keys' => array(
  2652. 'contact_c1' => array(
  2653. 0 => 'name',
  2654. ),
  2655. ),
  2656. 'foreign keys' => array(
  2657. 'cvterm' => array(
  2658. 'table' => 'cvterm',
  2659. 'columns' => array(
  2660. 'type_id' => 'cvterm_id',
  2661. ),
  2662. ),
  2663. ),
  2664. 'table' => 'contact',
  2665. 'referring_tables' => array(
  2666. 0 => 'arraydesign',
  2667. 1 => 'assay',
  2668. 2 => 'biomaterial',
  2669. 3 => 'contact_relationship',
  2670. 5 => 'nd_experiment_contact',
  2671. 6 => 'project_contact',
  2672. 14 => 'quantification',
  2673. 15 => 'stockcollection',
  2674. 16 => 'study',
  2675. ),
  2676. );
  2677. return $description;
  2678. }
  2679. /**
  2680. * Implements hook_chado_schema_v1_2_contact_relationship()
  2681. * Purpose: To describe the structure of 'contact_relationship' to tripal
  2682. * @see chado_insert_record()
  2683. * @see chado_update_record()
  2684. * @see chado_select_record()
  2685. *
  2686. * @return
  2687. * An array describing the 'contact_relationship' table
  2688. *
  2689. * @ingroup tripal_chado_v1.2_schema_api
  2690. *
  2691. */
  2692. function tripal_chado_chado_schema_v1_2_contact_relationship() {
  2693. $description = array(
  2694. 'description' => '',
  2695. 'fields' => array(
  2696. 'contact_relationship_id' => array(
  2697. 'description' => '',
  2698. 'type' => 'serial',
  2699. 'not null' => TRUE,
  2700. ),
  2701. 'type_id' => array(
  2702. 'description' => '',
  2703. 'type' => 'int',
  2704. 'not null' => TRUE,
  2705. ),
  2706. 'subject_id' => array(
  2707. 'description' => '',
  2708. 'type' => 'int',
  2709. 'not null' => TRUE,
  2710. ),
  2711. 'object_id' => array(
  2712. 'description' => '',
  2713. 'type' => 'int',
  2714. 'not null' => TRUE,
  2715. ),
  2716. ),
  2717. 'primary key' => array(
  2718. 0 => 'contact_relationship_id',
  2719. ),
  2720. 'unique keys' => array(
  2721. 'contact_relationship_c1' => array(
  2722. 0 => 'subject_id',
  2723. 1 => 'object_id',
  2724. 2 => 'type_id',
  2725. ),
  2726. ),
  2727. 'indexes' => array(
  2728. 'contact_relationship_idx1' => array(
  2729. 0 => 'type_id',
  2730. ),
  2731. 'contact_relationship_idx2' => array(
  2732. 0 => 'subject_id',
  2733. ),
  2734. 'contact_relationship_idx3' => array(
  2735. 0 => 'object_id',
  2736. ),
  2737. ),
  2738. 'foreign keys' => array(
  2739. 'cvterm' => array(
  2740. 'table' => 'cvterm',
  2741. 'columns' => array(
  2742. 'type_id' => 'cvterm_id',
  2743. ),
  2744. ),
  2745. 'contact' => array(
  2746. 'table' => 'contact',
  2747. 'columns' => array(
  2748. 'subject_id' => 'contact_id',
  2749. 'object_id' => 'contact_id',
  2750. ),
  2751. ),
  2752. ),
  2753. 'table' => 'contact_relationship',
  2754. 'referring_tables' => NULL,
  2755. );
  2756. return $description;
  2757. }
  2758. /**
  2759. * Implements hook_chado_schema_v1_2_control()
  2760. * Purpose: To describe the structure of 'control' to tripal
  2761. * @see chado_insert_record()
  2762. * @see chado_update_record()
  2763. * @see chado_select_record()
  2764. *
  2765. * @return
  2766. * An array describing the 'control' table
  2767. *
  2768. * @ingroup tripal_chado_v1.2_schema_api
  2769. *
  2770. */
  2771. function tripal_chado_chado_schema_v1_2_control() {
  2772. $description = array(
  2773. 'description' => '',
  2774. 'fields' => array(
  2775. 'control_id' => array(
  2776. 'description' => '',
  2777. 'type' => 'serial',
  2778. 'not null' => TRUE,
  2779. ),
  2780. 'type_id' => array(
  2781. 'description' => '',
  2782. 'type' => 'int',
  2783. 'not null' => TRUE,
  2784. ),
  2785. 'assay_id' => array(
  2786. 'description' => '',
  2787. 'type' => 'int',
  2788. 'not null' => TRUE,
  2789. ),
  2790. 'tableinfo_id' => array(
  2791. 'description' => '',
  2792. 'type' => 'int',
  2793. 'not null' => TRUE,
  2794. ),
  2795. 'row_id' => array(
  2796. 'description' => '',
  2797. 'type' => 'int',
  2798. 'not null' => TRUE,
  2799. ),
  2800. 'name' => array(
  2801. 'description' => '',
  2802. 'type' => 'text',
  2803. 'not null' => FALSE,
  2804. ),
  2805. 'value' => array(
  2806. 'description' => '',
  2807. 'type' => 'text',
  2808. 'not null' => FALSE,
  2809. ),
  2810. 'rank' => array(
  2811. 'description' => '',
  2812. 'type' => 'int',
  2813. 'not null' => TRUE,
  2814. 'default' => 0,
  2815. ),
  2816. ),
  2817. 'primary key' => array(
  2818. 0 => 'control_id',
  2819. ),
  2820. 'unique keys' => array(),
  2821. 'indexes' => array(
  2822. 'control_idx1' => array(
  2823. 0 => 'type_id',
  2824. ),
  2825. 'control_idx2' => array(
  2826. 0 => 'assay_id',
  2827. ),
  2828. 'control_idx3' => array(
  2829. 0 => 'tableinfo_id',
  2830. ),
  2831. 'control_idx4' => array(
  2832. 0 => 'row_id',
  2833. ),
  2834. ),
  2835. 'foreign keys' => array(
  2836. 'cvterm' => array(
  2837. 'table' => 'cvterm',
  2838. 'columns' => array(
  2839. 'type_id' => 'cvterm_id',
  2840. ),
  2841. ),
  2842. 'tableinfo' => array(
  2843. 'table' => 'tableinfo',
  2844. 'columns' => array(
  2845. 'tableinfo_id' => 'tableinfo_id',
  2846. ),
  2847. ),
  2848. 'assay' => array(
  2849. 'table' => 'assay',
  2850. 'columns' => array(
  2851. 'assay_id' => 'assay_id',
  2852. ),
  2853. ),
  2854. ),
  2855. 'table' => 'control',
  2856. 'referring_tables' => NULL,
  2857. );
  2858. return $description;
  2859. }
  2860. /**
  2861. * Implements hook_chado_schema_v1_2_cv()
  2862. * Purpose: To describe the structure of 'cv' to tripal
  2863. * @see chado_insert_record()
  2864. * @see chado_update_record()
  2865. * @see chado_select_record()
  2866. *
  2867. * @return
  2868. * An array describing the 'cv' table
  2869. *
  2870. * @ingroup tripal_chado_v1.2_schema_api
  2871. *
  2872. */
  2873. function tripal_chado_chado_schema_v1_2_cv() {
  2874. $description = array(
  2875. 'description' => '',
  2876. 'fields' => array(
  2877. 'cv_id' => array(
  2878. 'description' => '',
  2879. 'type' => 'serial',
  2880. 'not null' => TRUE,
  2881. ),
  2882. 'name' => array(
  2883. 'description' => '',
  2884. 'type' => 'varchar',
  2885. 'length' => '255',
  2886. 'not null' => TRUE,
  2887. ),
  2888. 'definition' => array(
  2889. 'description' => '',
  2890. 'type' => 'text',
  2891. 'not null' => FALSE,
  2892. ),
  2893. ),
  2894. 'primary key' => array(
  2895. 0 => 'cv_id',
  2896. ),
  2897. 'unique keys' => array(
  2898. 'cv_c1' => array(
  2899. 0 => 'name',
  2900. ),
  2901. ),
  2902. 'foreign keys' => array(
  2903. ),
  2904. 'table' => 'cv',
  2905. 'referring_tables' => array(
  2906. 0 => 'cvprop',
  2907. 1 => 'cvterm',
  2908. 2 => 'cvtermpath',
  2909. ),
  2910. );
  2911. return $description;
  2912. }
  2913. /**
  2914. * Implements hook_chado_schema_v1_2_cvprop()
  2915. * Purpose: To describe the structure of 'cvprop' to tripal
  2916. * @see chado_insert_record()
  2917. * @see chado_update_record()
  2918. * @see chado_select_record()
  2919. *
  2920. * @return
  2921. * An array describing the 'cvprop' table
  2922. *
  2923. * @ingroup tripal_chado_v1.2_schema_api
  2924. *
  2925. */
  2926. function tripal_chado_chado_schema_v1_2_cvprop() {
  2927. $description = array(
  2928. 'description' => '',
  2929. 'fields' => array(
  2930. 'cvprop_id' => array(
  2931. 'description' => '',
  2932. 'type' => 'serial',
  2933. 'not null' => TRUE,
  2934. ),
  2935. 'cv_id' => array(
  2936. 'description' => '',
  2937. 'type' => 'int',
  2938. 'not null' => TRUE,
  2939. ),
  2940. 'type_id' => array(
  2941. 'description' => '',
  2942. 'type' => 'int',
  2943. 'not null' => TRUE,
  2944. ),
  2945. 'value' => array(
  2946. 'description' => '',
  2947. 'type' => 'text',
  2948. 'not null' => FALSE,
  2949. ),
  2950. 'rank' => array(
  2951. 'description' => '',
  2952. 'type' => 'int',
  2953. 'not null' => TRUE,
  2954. 'default' => 0,
  2955. ),
  2956. ),
  2957. 'primary key' => array(
  2958. 0 => 'cvprop_id',
  2959. ),
  2960. 'unique keys' => array(
  2961. 'cvprop_c1' => array(
  2962. 0 => 'cv_id',
  2963. 1 => 'type_id',
  2964. 2 => 'rank',
  2965. ),
  2966. ),
  2967. 'foreign keys' => array(
  2968. 'cvterm' => array(
  2969. 'table' => 'cvterm',
  2970. 'columns' => array(
  2971. 'type_id' => 'cvterm_id',
  2972. ),
  2973. ),
  2974. 'cv' => array(
  2975. 'table' => 'cv',
  2976. 'columns' => array(
  2977. 'cv_id' => 'cv_id',
  2978. ),
  2979. ),
  2980. ),
  2981. 'table' => 'cvprop',
  2982. 'referring_tables' => NULL,
  2983. );
  2984. return $description;
  2985. }
  2986. /**
  2987. * Implements hook_chado_schema_v1_2_cvterm()
  2988. * Purpose: To describe the structure of 'cvterm' to tripal
  2989. * @see chado_insert_record()
  2990. * @see chado_update_record()
  2991. * @see chado_select_record()
  2992. *
  2993. * @return
  2994. * An array describing the 'cvterm' table
  2995. *
  2996. * @ingroup tripal_chado_v1.2_schema_api
  2997. *
  2998. */
  2999. function tripal_chado_chado_schema_v1_2_cvterm() {
  3000. $description = array(
  3001. 'description' => '',
  3002. 'fields' => array(
  3003. 'cvterm_id' => array(
  3004. 'description' => '',
  3005. 'type' => 'serial',
  3006. 'not null' => TRUE,
  3007. ),
  3008. 'cv_id' => array(
  3009. 'description' => '',
  3010. 'type' => 'int',
  3011. 'not null' => TRUE,
  3012. ),
  3013. 'name' => array(
  3014. 'description' => '',
  3015. 'type' => 'varchar',
  3016. 'length' => '1024',
  3017. 'not null' => TRUE,
  3018. ),
  3019. 'definition' => array(
  3020. 'description' => '',
  3021. 'type' => 'text',
  3022. 'not null' => FALSE,
  3023. ),
  3024. 'dbxref_id' => array(
  3025. 'description' => '',
  3026. 'type' => 'int',
  3027. 'not null' => TRUE,
  3028. ),
  3029. 'is_obsolete' => array(
  3030. 'description' => '',
  3031. 'type' => 'int',
  3032. 'not null' => TRUE,
  3033. 'default' => 0,
  3034. ),
  3035. 'is_relationshiptype' => array(
  3036. 'description' => '',
  3037. 'type' => 'int',
  3038. 'not null' => TRUE,
  3039. 'default' => 0,
  3040. ),
  3041. ),
  3042. 'primary key' => array(
  3043. 0 => 'cvterm_id',
  3044. ),
  3045. 'unique keys' => array(
  3046. 'cvterm_c1' => array(
  3047. 0 => 'name',
  3048. 1 => 'cv_id',
  3049. 2 => 'is_obsolete',
  3050. ),
  3051. 'cvterm_c2' => array(
  3052. 0 => 'dbxref_id',
  3053. ),
  3054. ),
  3055. 'indexes' => array(
  3056. 'cvterm_idx1' => array(
  3057. 0 => 'cv_id',
  3058. ),
  3059. 'cvterm_idx2' => array(
  3060. 0 => 'name',
  3061. ),
  3062. 'cvterm_idx3' => array(
  3063. 0 => 'dbxref_id',
  3064. ),
  3065. ),
  3066. 'foreign keys' => array(
  3067. 'cv' => array(
  3068. 'table' => 'cv',
  3069. 'columns' => array(
  3070. 'cv_id' => 'cv_id',
  3071. ),
  3072. ),
  3073. 'dbxref' => array(
  3074. 'table' => 'dbxref',
  3075. 'columns' => array(
  3076. 'dbxref_id' => 'dbxref_id',
  3077. ),
  3078. ),
  3079. ),
  3080. 'table' => 'cvterm',
  3081. 'referring_tables' => array(
  3082. 0 => 'acquisition_relationship',
  3083. 1 => 'acquisitionprop',
  3084. 2 => 'analysisfeatureprop',
  3085. 3 => 'analysisprop',
  3086. 4 => 'arraydesign',
  3087. 6 => 'arraydesignprop',
  3088. 7 => 'assayprop',
  3089. 8 => 'biomaterial_relationship',
  3090. 9 => 'biomaterial_treatment',
  3091. 10 => 'biomaterialprop',
  3092. 11 => 'cell_line_cvterm',
  3093. 12 => 'cell_line_cvtermprop',
  3094. 13 => 'cell_line_relationship',
  3095. 14 => 'cell_lineprop',
  3096. 15 => 'chadoprop',
  3097. 23 => 'contact',
  3098. 24 => 'contact_relationship',
  3099. 25 => 'control',
  3100. 26 => 'cvprop',
  3101. 27 => 'cvterm_dbxref',
  3102. 28 => 'cvterm_relationship',
  3103. 31 => 'cvtermpath',
  3104. 34 => 'cvtermprop',
  3105. 36 => 'cvtermsynonym',
  3106. 38 => 'dbxrefprop',
  3107. 39 => 'element',
  3108. 40 => 'element_relationship',
  3109. 41 => 'elementresult_relationship',
  3110. 42 => 'environment_cvterm',
  3111. 43 => 'expression_cvterm',
  3112. 45 => 'expression_cvtermprop',
  3113. 46 => 'expressionprop',
  3114. 47 => 'feature',
  3115. 48 => 'feature_cvterm',
  3116. 49 => 'feature_cvtermprop',
  3117. 50 => 'feature_expressionprop',
  3118. 51 => 'feature_genotype',
  3119. 52 => 'feature_pubprop',
  3120. 53 => 'feature_relationship',
  3121. 54 => 'feature_relationshipprop',
  3122. 55 => 'featuremap',
  3123. 56 => 'featureprop',
  3124. 57 => 'genotype',
  3125. 58 => 'genotypeprop',
  3126. 66 => 'library',
  3127. 67 => 'library_cvterm',
  3128. 68 => 'libraryprop',
  3129. 69 => 'nd_experiment',
  3130. 70 => 'nd_experiment_stock',
  3131. 71 => 'nd_experiment_stockprop',
  3132. 72 => 'nd_experimentprop',
  3133. 73 => 'nd_geolocationprop',
  3134. 74 => 'nd_protocol',
  3135. 75 => 'nd_protocol_reagent',
  3136. 76 => 'nd_protocolprop',
  3137. 77 => 'nd_reagent',
  3138. 78 => 'nd_reagent_relationship',
  3139. 79 => 'nd_reagentprop',
  3140. 80 => 'organismprop',
  3141. 81 => 'phendesc',
  3142. 82 => 'phenotype',
  3143. 86 => 'phenotype_comparison_cvterm',
  3144. 87 => 'phenotype_cvterm',
  3145. 88 => 'phenstatement',
  3146. 89 => 'phylonode',
  3147. 90 => 'phylonode_relationship',
  3148. 91 => 'phylonodeprop',
  3149. 92 => 'phylotree',
  3150. 93 => 'project_relationship',
  3151. 101 => 'projectprop',
  3152. 109 => 'protocol',
  3153. 110 => 'protocolparam',
  3154. 112 => 'pub',
  3155. 113 => 'pub_relationship',
  3156. 114 => 'pubprop',
  3157. 115 => 'quantification_relationship',
  3158. 116 => 'quantificationprop',
  3159. 117 => 'stock',
  3160. 118 => 'stock_cvterm',
  3161. 119 => 'stock_cvtermprop',
  3162. 127 => 'stock_dbxrefprop',
  3163. 135 => 'stock_relationship',
  3164. 136 => 'stock_relationship_cvterm',
  3165. 144 => 'stockcollection',
  3166. 145 => 'stockcollectionprop',
  3167. 146 => 'stockprop',
  3168. 147 => 'studydesignprop',
  3169. 148 => 'studyfactor',
  3170. 149 => 'studyprop',
  3171. 150 => 'studyprop_feature',
  3172. 151 => 'synonym',
  3173. 152 => 'treatment',
  3174. ),
  3175. );
  3176. return $description;
  3177. }
  3178. /**
  3179. * Implements hook_chado_schema_v1_2_cvterm_dbxref()
  3180. * Purpose: To describe the structure of 'cvterm_dbxref' to tripal
  3181. * @see chado_insert_record()
  3182. * @see chado_update_record()
  3183. * @see chado_select_record()
  3184. *
  3185. * @return
  3186. * An array describing the 'cvterm_dbxref' table
  3187. *
  3188. * @ingroup tripal_chado_v1.2_schema_api
  3189. *
  3190. */
  3191. function tripal_chado_chado_schema_v1_2_cvterm_dbxref() {
  3192. $description = array(
  3193. 'description' => '',
  3194. 'fields' => array(
  3195. 'cvterm_dbxref_id' => array(
  3196. 'description' => '',
  3197. 'type' => 'serial',
  3198. 'not null' => TRUE,
  3199. ),
  3200. 'cvterm_id' => array(
  3201. 'description' => '',
  3202. 'type' => 'int',
  3203. 'not null' => TRUE,
  3204. ),
  3205. 'dbxref_id' => array(
  3206. 'description' => '',
  3207. 'type' => 'int',
  3208. 'not null' => TRUE,
  3209. ),
  3210. 'is_for_definition' => array(
  3211. 'description' => '',
  3212. 'type' => 'int',
  3213. 'not null' => TRUE,
  3214. 'default' => 0,
  3215. ),
  3216. ),
  3217. 'primary key' => array(
  3218. 0 => 'cvterm_dbxref_id',
  3219. ),
  3220. 'unique keys' => array(
  3221. 'cvterm_dbxref_c1' => array(
  3222. 0 => 'cvterm_id',
  3223. 1 => 'dbxref_id',
  3224. ),
  3225. ),
  3226. 'indexes' => array(
  3227. 'cvterm_dbxref_idx1' => array(
  3228. 0 => 'cvterm_id',
  3229. ),
  3230. 'cvterm_dbxref_idx2' => array(
  3231. 0 => 'dbxref_id',
  3232. ),
  3233. ),
  3234. 'foreign keys' => array(
  3235. 'cvterm' => array(
  3236. 'table' => 'cvterm',
  3237. 'columns' => array(
  3238. 'cvterm_id' => 'cvterm_id',
  3239. ),
  3240. ),
  3241. 'dbxref' => array(
  3242. 'table' => 'dbxref',
  3243. 'columns' => array(
  3244. 'dbxref_id' => 'dbxref_id',
  3245. ),
  3246. ),
  3247. ),
  3248. 'table' => 'cvterm_dbxref',
  3249. 'referring_tables' => NULL,
  3250. );
  3251. return $description;
  3252. }
  3253. /**
  3254. * Implements hook_chado_schema_v1_2_cvterm_relationship()
  3255. * Purpose: To describe the structure of 'cvterm_relationship' to tripal
  3256. * @see chado_insert_record()
  3257. * @see chado_update_record()
  3258. * @see chado_select_record()
  3259. *
  3260. * @return
  3261. * An array describing the 'cvterm_relationship' table
  3262. *
  3263. * @ingroup tripal_chado_v1.2_schema_api
  3264. *
  3265. */
  3266. function tripal_chado_chado_schema_v1_2_cvterm_relationship() {
  3267. $description = array(
  3268. 'description' => '',
  3269. 'fields' => array(
  3270. 'cvterm_relationship_id' => array(
  3271. 'description' => '',
  3272. 'type' => 'serial',
  3273. 'not null' => TRUE,
  3274. ),
  3275. 'type_id' => array(
  3276. 'description' => '',
  3277. 'type' => 'int',
  3278. 'not null' => TRUE,
  3279. ),
  3280. 'subject_id' => array(
  3281. 'description' => '',
  3282. 'type' => 'int',
  3283. 'not null' => TRUE,
  3284. ),
  3285. 'object_id' => array(
  3286. 'description' => '',
  3287. 'type' => 'int',
  3288. 'not null' => TRUE,
  3289. ),
  3290. ),
  3291. 'primary key' => array(
  3292. 0 => 'cvterm_relationship_id',
  3293. ),
  3294. 'unique keys' => array(
  3295. 'cvterm_relationship_c1' => array(
  3296. 0 => 'subject_id',
  3297. 1 => 'object_id',
  3298. 2 => 'type_id',
  3299. ),
  3300. ),
  3301. 'indexes' => array(
  3302. 'cvterm_relationship_idx1' => array(
  3303. 0 => 'type_id',
  3304. ),
  3305. 'cvterm_relationship_idx2' => array(
  3306. 0 => 'subject_id',
  3307. ),
  3308. 'cvterm_relationship_idx3' => array(
  3309. 0 => 'object_id',
  3310. ),
  3311. ),
  3312. 'foreign keys' => array(
  3313. 'cvterm' => array(
  3314. 'table' => 'cvterm',
  3315. 'columns' => array(
  3316. 'type_id' => 'cvterm_id',
  3317. 'subject_id' => 'cvterm_id',
  3318. 'object_id' => 'cvterm_id',
  3319. ),
  3320. ),
  3321. ),
  3322. 'table' => 'cvterm_relationship',
  3323. 'referring_tables' => NULL,
  3324. );
  3325. return $description;
  3326. }
  3327. /**
  3328. * Implements hook_chado_schema_v1_2_cvtermpath()
  3329. * Purpose: To describe the structure of 'cvtermpath' to tripal
  3330. * @see chado_insert_record()
  3331. * @see chado_update_record()
  3332. * @see chado_select_record()
  3333. *
  3334. * @return
  3335. * An array describing the 'cvtermpath' table
  3336. *
  3337. * @ingroup tripal_chado_v1.2_schema_api
  3338. *
  3339. */
  3340. function tripal_chado_chado_schema_v1_2_cvtermpath() {
  3341. $description = array(
  3342. 'description' => '',
  3343. 'fields' => array(
  3344. 'cvtermpath_id' => array(
  3345. 'description' => '',
  3346. 'type' => 'serial',
  3347. 'not null' => TRUE,
  3348. ),
  3349. 'type_id' => array(
  3350. 'description' => '',
  3351. 'type' => 'int',
  3352. 'not null' => FALSE,
  3353. ),
  3354. 'subject_id' => array(
  3355. 'description' => '',
  3356. 'type' => 'int',
  3357. 'not null' => TRUE,
  3358. ),
  3359. 'object_id' => array(
  3360. 'description' => '',
  3361. 'type' => 'int',
  3362. 'not null' => TRUE,
  3363. ),
  3364. 'cv_id' => array(
  3365. 'description' => '',
  3366. 'type' => 'int',
  3367. 'not null' => TRUE,
  3368. ),
  3369. 'pathdistance' => array(
  3370. 'description' => '',
  3371. 'type' => 'int',
  3372. 'not null' => FALSE,
  3373. ),
  3374. ),
  3375. 'primary key' => array(
  3376. 0 => 'cvtermpath_id',
  3377. ),
  3378. 'unique keys' => array(
  3379. 'cvtermpath_c1' => array(
  3380. 0 => 'subject_id',
  3381. 1 => 'object_id',
  3382. 2 => 'type_id',
  3383. 3 => 'pathdistance',
  3384. ),
  3385. ),
  3386. 'indexes' => array(
  3387. 'cvtermpath_idx1' => array(
  3388. 0 => 'type_id',
  3389. ),
  3390. 'cvtermpath_idx2' => array(
  3391. 0 => 'subject_id',
  3392. ),
  3393. 'cvtermpath_idx3' => array(
  3394. 0 => 'object_id',
  3395. ),
  3396. 'cvtermpath_idx4' => array(
  3397. 0 => 'cv_id',
  3398. ),
  3399. ),
  3400. 'foreign keys' => array(
  3401. 'cvterm' => array(
  3402. 'table' => 'cvterm',
  3403. 'columns' => array(
  3404. 'type_id' => 'cvterm_id',
  3405. 'subject_id' => 'cvterm_id',
  3406. 'object_id' => 'cvterm_id',
  3407. ),
  3408. ),
  3409. 'cv' => array(
  3410. 'table' => 'cv',
  3411. 'columns' => array(
  3412. 'cv_id' => 'cv_id',
  3413. ),
  3414. ),
  3415. ),
  3416. 'table' => 'cvtermpath',
  3417. 'referring_tables' => NULL,
  3418. );
  3419. return $description;
  3420. }
  3421. /**
  3422. * Implements hook_chado_schema_v1_2_cvtermprop()
  3423. * Purpose: To describe the structure of 'cvtermprop' to tripal
  3424. * @see chado_insert_record()
  3425. * @see chado_update_record()
  3426. * @see chado_select_record()
  3427. *
  3428. * @return
  3429. * An array describing the 'cvtermprop' table
  3430. *
  3431. * @ingroup tripal_chado_v1.2_schema_api
  3432. *
  3433. */
  3434. function tripal_chado_chado_schema_v1_2_cvtermprop() {
  3435. $description = array(
  3436. 'description' => '',
  3437. 'fields' => array(
  3438. 'cvtermprop_id' => array(
  3439. 'description' => '',
  3440. 'type' => 'serial',
  3441. 'not null' => TRUE,
  3442. ),
  3443. 'cvterm_id' => array(
  3444. 'description' => '',
  3445. 'type' => 'int',
  3446. 'not null' => TRUE,
  3447. ),
  3448. 'type_id' => array(
  3449. 'description' => '',
  3450. 'type' => 'int',
  3451. 'not null' => TRUE,
  3452. ),
  3453. 'value' => array(
  3454. 'description' => '',
  3455. 'type' => 'text',
  3456. 'not null' => TRUE,
  3457. 'default' => '',
  3458. ),
  3459. 'rank' => array(
  3460. 'description' => '',
  3461. 'type' => 'int',
  3462. 'not null' => TRUE,
  3463. 'default' => 0,
  3464. ),
  3465. ),
  3466. 'primary key' => array(
  3467. 0 => 'cvtermprop_id',
  3468. ),
  3469. 'unique keys' => array(
  3470. 'cvterm_id' => array(
  3471. 0 => 'cvterm_id',
  3472. 1 => 'type_id',
  3473. 2 => 'value',
  3474. 3 => 'rank',
  3475. ),
  3476. ),
  3477. 'indexes' => array(
  3478. 'cvtermprop_idx1' => array(
  3479. 0 => 'cvterm_id',
  3480. ),
  3481. 'cvtermprop_idx2' => array(
  3482. 0 => 'type_id',
  3483. ),
  3484. ),
  3485. 'foreign keys' => array(
  3486. 'cvterm' => array(
  3487. 'table' => 'cvterm',
  3488. 'columns' => array(
  3489. 'cvterm_id' => 'cvterm_id',
  3490. 'type_id' => 'cvterm_id',
  3491. ),
  3492. ),
  3493. ),
  3494. 'table' => 'cvtermprop',
  3495. 'referring_tables' => NULL,
  3496. );
  3497. return $description;
  3498. }
  3499. /**
  3500. * Implements hook_chado_schema_v1_2_cvtermsynonym()
  3501. * Purpose: To describe the structure of 'cvtermsynonym' to tripal
  3502. * @see chado_insert_record()
  3503. * @see chado_update_record()
  3504. * @see chado_select_record()
  3505. *
  3506. * @return
  3507. * An array describing the 'cvtermsynonym' table
  3508. *
  3509. * @ingroup tripal_chado_v1.2_schema_api
  3510. *
  3511. */
  3512. function tripal_chado_chado_schema_v1_2_cvtermsynonym() {
  3513. $description = array(
  3514. 'description' => '',
  3515. 'fields' => array(
  3516. 'cvtermsynonym_id' => array(
  3517. 'description' => '',
  3518. 'type' => 'serial',
  3519. 'not null' => TRUE,
  3520. ),
  3521. 'cvterm_id' => array(
  3522. 'description' => '',
  3523. 'type' => 'int',
  3524. 'not null' => TRUE,
  3525. ),
  3526. 'synonym' => array(
  3527. 'description' => '',
  3528. 'type' => 'varchar',
  3529. 'length' => '1024',
  3530. 'not null' => TRUE,
  3531. ),
  3532. 'type_id' => array(
  3533. 'description' => '',
  3534. 'type' => 'int',
  3535. 'not null' => FALSE,
  3536. ),
  3537. ),
  3538. 'primary key' => array(
  3539. 0 => 'cvtermsynonym_id',
  3540. ),
  3541. 'unique keys' => array(
  3542. 'cvtermsynonym_c1' => array(
  3543. 0 => 'cvterm_id',
  3544. 1 => 'synonym',
  3545. ),
  3546. ),
  3547. 'indexes' => array(
  3548. 'cvtermsynonym_idx1' => array(
  3549. 0 => 'cvterm_id',
  3550. ),
  3551. ),
  3552. 'foreign keys' => array(
  3553. 'cvterm' => array(
  3554. 'table' => 'cvterm',
  3555. 'columns' => array(
  3556. 'cvterm_id' => 'cvterm_id',
  3557. 'type_id' => 'cvterm_id',
  3558. ),
  3559. ),
  3560. ),
  3561. 'table' => 'cvtermsynonym',
  3562. 'referring_tables' => NULL,
  3563. );
  3564. return $description;
  3565. }
  3566. /**
  3567. * Implements hook_chado_schema_v1_2_db()
  3568. * Purpose: To describe the structure of 'db' to tripal
  3569. * @see chado_insert_record()
  3570. * @see chado_update_record()
  3571. * @see chado_select_record()
  3572. *
  3573. * @return
  3574. * An array describing the 'db' table
  3575. *
  3576. * @ingroup tripal_chado_v1.2_schema_api
  3577. *
  3578. */
  3579. function tripal_chado_chado_schema_v1_2_db() {
  3580. $description = array(
  3581. 'description' => '',
  3582. 'fields' => array(
  3583. 'db_id' => array(
  3584. 'description' => '',
  3585. 'type' => 'serial',
  3586. 'not null' => TRUE,
  3587. ),
  3588. 'name' => array(
  3589. 'description' => '',
  3590. 'type' => 'varchar',
  3591. 'length' => '255',
  3592. 'not null' => TRUE,
  3593. ),
  3594. 'description' => array(
  3595. 'description' => '',
  3596. 'type' => 'varchar',
  3597. 'length' => '255',
  3598. 'not null' => FALSE,
  3599. ),
  3600. 'urlprefix' => array(
  3601. 'description' => '',
  3602. 'type' => 'varchar',
  3603. 'length' => '255',
  3604. 'not null' => FALSE,
  3605. ),
  3606. 'url' => array(
  3607. 'description' => '',
  3608. 'type' => 'varchar',
  3609. 'length' => '255',
  3610. 'not null' => FALSE,
  3611. ),
  3612. ),
  3613. 'primary key' => array(
  3614. 0 => 'db_id',
  3615. ),
  3616. 'unique keys' => array(
  3617. 'db_c1' => array(
  3618. 0 => 'name',
  3619. ),
  3620. ),
  3621. 'foreign keys' => array(
  3622. ),
  3623. 'table' => 'db',
  3624. 'referring_tables' => array(
  3625. 0 => 'dbxref',
  3626. ),
  3627. );
  3628. return $description;
  3629. }
  3630. /**
  3631. * Implements hook_chado_schema_v1_2_dbxref()
  3632. * Purpose: To describe the structure of 'dbxref' to tripal
  3633. * @see chado_insert_record()
  3634. * @see chado_update_record()
  3635. * @see chado_select_record()
  3636. *
  3637. * @return
  3638. * An array describing the 'dbxref' table
  3639. *
  3640. * @ingroup tripal_chado_v1.2_schema_api
  3641. *
  3642. */
  3643. function tripal_chado_chado_schema_v1_2_dbxref() {
  3644. $description = array(
  3645. 'description' => '',
  3646. 'fields' => array(
  3647. 'dbxref_id' => array(
  3648. 'description' => '',
  3649. 'type' => 'serial',
  3650. 'not null' => TRUE,
  3651. ),
  3652. 'db_id' => array(
  3653. 'description' => '',
  3654. 'type' => 'int',
  3655. 'not null' => TRUE,
  3656. ),
  3657. 'accession' => array(
  3658. 'description' => '',
  3659. 'type' => 'varchar',
  3660. 'length' => '255',
  3661. 'not null' => TRUE,
  3662. ),
  3663. 'version' => array(
  3664. 'description' => '',
  3665. 'type' => 'varchar',
  3666. 'length' => '255',
  3667. 'not null' => TRUE,
  3668. 'default' => '',
  3669. ),
  3670. 'description' => array(
  3671. 'description' => '',
  3672. 'type' => 'text',
  3673. 'not null' => FALSE,
  3674. ),
  3675. ),
  3676. 'primary key' => array(
  3677. 0 => 'dbxref_id',
  3678. ),
  3679. 'unique keys' => array(
  3680. 'dbxref_c1' => array(
  3681. 0 => 'db_id',
  3682. 1 => 'accession',
  3683. 2 => 'version',
  3684. ),
  3685. ),
  3686. 'indexes' => array(
  3687. 'dbxref_idx1' => array(
  3688. 0 => 'db_id',
  3689. ),
  3690. 'dbxref_idx2' => array(
  3691. 0 => 'accession',
  3692. ),
  3693. 'dbxref_idx3' => array(
  3694. 0 => 'version',
  3695. ),
  3696. ),
  3697. 'foreign keys' => array(
  3698. 'db' => array(
  3699. 'table' => 'db',
  3700. 'columns' => array(
  3701. 'db_id' => 'db_id',
  3702. ),
  3703. ),
  3704. ),
  3705. 'table' => 'dbxref',
  3706. 'referring_tables' => array(
  3707. 0 => 'arraydesign',
  3708. 1 => 'assay',
  3709. 2 => 'biomaterial',
  3710. 3 => 'biomaterial_dbxref',
  3711. 4 => 'cell_line_dbxref',
  3712. 5 => 'cvterm',
  3713. 6 => 'cvterm_dbxref',
  3714. 7 => 'dbxrefprop',
  3715. 8 => 'element',
  3716. 9 => 'feature',
  3717. 10 => 'feature_cvterm_dbxref',
  3718. 11 => 'feature_dbxref',
  3719. 12 => 'library_dbxref',
  3720. 13 => 'nd_experiment_dbxref',
  3721. 14 => 'nd_experiment_stock_dbxref',
  3722. 15 => 'organism_dbxref',
  3723. 16 => 'phylonode_dbxref',
  3724. 17 => 'phylotree',
  3725. 18 => 'protocol',
  3726. 19 => 'pub_dbxref',
  3727. 20 => 'stock',
  3728. 21 => 'stock_dbxref',
  3729. 22 => 'study',
  3730. ),
  3731. );
  3732. return $description;
  3733. }
  3734. /**
  3735. * Implements hook_chado_schema_v1_2_dbxrefprop()
  3736. * Purpose: To describe the structure of 'dbxrefprop' to tripal
  3737. * @see chado_insert_record()
  3738. * @see chado_update_record()
  3739. * @see chado_select_record()
  3740. *
  3741. * @return
  3742. * An array describing the 'dbxrefprop' table
  3743. *
  3744. * @ingroup tripal_chado_v1.2_schema_api
  3745. *
  3746. */
  3747. function tripal_chado_chado_schema_v1_2_dbxrefprop() {
  3748. $description = array(
  3749. 'description' => '',
  3750. 'fields' => array(
  3751. 'dbxrefprop_id' => array(
  3752. 'description' => '',
  3753. 'type' => 'serial',
  3754. 'not null' => TRUE,
  3755. ),
  3756. 'dbxref_id' => array(
  3757. 'description' => '',
  3758. 'type' => 'int',
  3759. 'not null' => TRUE,
  3760. ),
  3761. 'type_id' => array(
  3762. 'description' => '',
  3763. 'type' => 'int',
  3764. 'not null' => TRUE,
  3765. ),
  3766. 'value' => array(
  3767. 'description' => '',
  3768. 'type' => 'text',
  3769. 'not null' => TRUE,
  3770. 'default' => '',
  3771. ),
  3772. 'rank' => array(
  3773. 'description' => '',
  3774. 'type' => 'int',
  3775. 'not null' => TRUE,
  3776. 'default' => 0,
  3777. ),
  3778. ),
  3779. 'primary key' => array(
  3780. 0 => 'dbxrefprop_id',
  3781. ),
  3782. 'unique keys' => array(
  3783. 'dbxrefprop_c1' => array(
  3784. 0 => 'dbxref_id',
  3785. 1 => 'type_id',
  3786. 2 => 'rank',
  3787. ),
  3788. ),
  3789. 'indexes' => array(
  3790. 'dbxrefprop_idx1' => array(
  3791. 0 => 'dbxref_id',
  3792. ),
  3793. 'dbxrefprop_idx2' => array(
  3794. 0 => 'type_id',
  3795. ),
  3796. ),
  3797. 'foreign keys' => array(
  3798. 'cvterm' => array(
  3799. 'table' => 'cvterm',
  3800. 'columns' => array(
  3801. 'type_id' => 'cvterm_id',
  3802. ),
  3803. ),
  3804. 'dbxref' => array(
  3805. 'table' => 'dbxref',
  3806. 'columns' => array(
  3807. 'dbxref_id' => 'dbxref_id',
  3808. ),
  3809. ),
  3810. ),
  3811. 'table' => 'dbxrefprop',
  3812. 'referring_tables' => NULL,
  3813. );
  3814. return $description;
  3815. }
  3816. /**
  3817. * Implements hook_chado_schema_v1_2_eimage()
  3818. * Purpose: To describe the structure of 'eimage' to tripal
  3819. * @see chado_insert_record()
  3820. * @see chado_update_record()
  3821. * @see chado_select_record()
  3822. *
  3823. * @return
  3824. * An array describing the 'eimage' table
  3825. *
  3826. * @ingroup tripal_chado_v1.2_schema_api
  3827. *
  3828. */
  3829. function tripal_chado_chado_schema_v1_2_eimage() {
  3830. $description = array(
  3831. 'description' => '',
  3832. 'fields' => array(
  3833. 'eimage_id' => array(
  3834. 'description' => '',
  3835. 'type' => 'serial',
  3836. 'not null' => TRUE,
  3837. ),
  3838. 'eimage_data' => array(
  3839. 'description' => '',
  3840. 'type' => 'text',
  3841. 'not null' => FALSE,
  3842. ),
  3843. 'eimage_type' => array(
  3844. 'description' => '',
  3845. 'type' => 'varchar',
  3846. 'length' => '255',
  3847. 'not null' => TRUE,
  3848. ),
  3849. 'image_uri' => array(
  3850. 'description' => '',
  3851. 'type' => 'varchar',
  3852. 'length' => '255',
  3853. 'not null' => FALSE,
  3854. ),
  3855. ),
  3856. 'primary key' => array(
  3857. 0 => 'eimage_id',
  3858. ),
  3859. 'unique keys' => array(),
  3860. 'foreign keys' => array(
  3861. ),
  3862. 'table' => 'eimage',
  3863. 'referring_tables' => array(
  3864. 0 => 'expression_image',
  3865. ),
  3866. );
  3867. return $description;
  3868. }
  3869. /**
  3870. * Implements hook_chado_schema_v1_2_element()
  3871. * Purpose: To describe the structure of 'element' to tripal
  3872. * @see chado_insert_record()
  3873. * @see chado_update_record()
  3874. * @see chado_select_record()
  3875. *
  3876. * @return
  3877. * An array describing the 'element' table
  3878. *
  3879. * @ingroup tripal_chado_v1.2_schema_api
  3880. *
  3881. */
  3882. function tripal_chado_chado_schema_v1_2_element() {
  3883. $description = array(
  3884. 'description' => '',
  3885. 'fields' => array(
  3886. 'element_id' => array(
  3887. 'description' => '',
  3888. 'type' => 'serial',
  3889. 'not null' => TRUE,
  3890. ),
  3891. 'feature_id' => array(
  3892. 'description' => '',
  3893. 'type' => 'int',
  3894. 'not null' => FALSE,
  3895. ),
  3896. 'arraydesign_id' => array(
  3897. 'description' => '',
  3898. 'type' => 'int',
  3899. 'not null' => TRUE,
  3900. ),
  3901. 'type_id' => array(
  3902. 'description' => '',
  3903. 'type' => 'int',
  3904. 'not null' => FALSE,
  3905. ),
  3906. 'dbxref_id' => array(
  3907. 'description' => '',
  3908. 'type' => 'int',
  3909. 'not null' => FALSE,
  3910. ),
  3911. ),
  3912. 'primary key' => array(
  3913. 0 => 'element_id',
  3914. ),
  3915. 'unique keys' => array(
  3916. 'element_c1' => array(
  3917. 0 => 'feature_id',
  3918. 1 => 'arraydesign_id',
  3919. ),
  3920. ),
  3921. 'indexes' => array(
  3922. 'element_idx1' => array(
  3923. 0 => 'feature_id',
  3924. ),
  3925. 'element_idx2' => array(
  3926. 0 => 'arraydesign_id',
  3927. ),
  3928. 'element_idx3' => array(
  3929. 0 => 'type_id',
  3930. ),
  3931. 'element_idx4' => array(
  3932. 0 => 'dbxref_id',
  3933. ),
  3934. ),
  3935. 'foreign keys' => array(
  3936. 'cvterm' => array(
  3937. 'table' => 'cvterm',
  3938. 'columns' => array(
  3939. 'type_id' => 'cvterm_id',
  3940. ),
  3941. ),
  3942. 'dbxref' => array(
  3943. 'table' => 'dbxref',
  3944. 'columns' => array(
  3945. 'dbxref_id' => 'dbxref_id',
  3946. ),
  3947. ),
  3948. 'feature' => array(
  3949. 'table' => 'feature',
  3950. 'columns' => array(
  3951. 'feature_id' => 'feature_id',
  3952. ),
  3953. ),
  3954. 'arraydesign' => array(
  3955. 'table' => 'arraydesign',
  3956. 'columns' => array(
  3957. 'arraydesign_id' => 'arraydesign_id',
  3958. ),
  3959. ),
  3960. ),
  3961. 'table' => 'element',
  3962. 'referring_tables' => array(
  3963. 0 => 'element_relationship',
  3964. 2 => 'elementresult',
  3965. ),
  3966. );
  3967. return $description;
  3968. }
  3969. /**
  3970. * Implements hook_chado_schema_v1_2_element_relationship()
  3971. * Purpose: To describe the structure of 'element_relationship' to tripal
  3972. * @see chado_insert_record()
  3973. * @see chado_update_record()
  3974. * @see chado_select_record()
  3975. *
  3976. * @return
  3977. * An array describing the 'element_relationship' table
  3978. *
  3979. * @ingroup tripal_chado_v1.2_schema_api
  3980. *
  3981. */
  3982. function tripal_chado_chado_schema_v1_2_element_relationship() {
  3983. $description = array(
  3984. 'description' => '',
  3985. 'fields' => array(
  3986. 'element_relationship_id' => array(
  3987. 'description' => '',
  3988. 'type' => 'serial',
  3989. 'not null' => TRUE,
  3990. ),
  3991. 'subject_id' => array(
  3992. 'description' => '',
  3993. 'type' => 'int',
  3994. 'not null' => TRUE,
  3995. ),
  3996. 'type_id' => array(
  3997. 'description' => '',
  3998. 'type' => 'int',
  3999. 'not null' => TRUE,
  4000. ),
  4001. 'object_id' => array(
  4002. 'description' => '',
  4003. 'type' => 'int',
  4004. 'not null' => TRUE,
  4005. ),
  4006. 'value' => array(
  4007. 'description' => '',
  4008. 'type' => 'text',
  4009. 'not null' => FALSE,
  4010. ),
  4011. 'rank' => array(
  4012. 'description' => '',
  4013. 'type' => 'int',
  4014. 'not null' => TRUE,
  4015. 'default' => 0,
  4016. ),
  4017. ),
  4018. 'primary key' => array(
  4019. 0 => 'element_relationship_id',
  4020. ),
  4021. 'unique keys' => array(
  4022. 'element_relationship_c1' => array(
  4023. 0 => 'subject_id',
  4024. 1 => 'object_id',
  4025. 2 => 'type_id',
  4026. 3 => 'rank',
  4027. ),
  4028. ),
  4029. 'indexes' => array(
  4030. 'element_relationship_idx1' => array(
  4031. 0 => 'subject_id',
  4032. ),
  4033. 'element_relationship_idx2' => array(
  4034. 0 => 'type_id',
  4035. ),
  4036. 'element_relationship_idx3' => array(
  4037. 0 => 'object_id',
  4038. ),
  4039. 'element_relationship_idx4' => array(
  4040. 0 => 'value',
  4041. ),
  4042. ),
  4043. 'foreign keys' => array(
  4044. 'cvterm' => array(
  4045. 'table' => 'cvterm',
  4046. 'columns' => array(
  4047. 'type_id' => 'cvterm_id',
  4048. ),
  4049. ),
  4050. 'element' => array(
  4051. 'table' => 'element',
  4052. 'columns' => array(
  4053. 'subject_id' => 'element_id',
  4054. 'object_id' => 'element_id',
  4055. ),
  4056. ),
  4057. ),
  4058. 'table' => 'element_relationship',
  4059. 'referring_tables' => NULL,
  4060. );
  4061. return $description;
  4062. }
  4063. /**
  4064. * Implements hook_chado_schema_v1_2_elementresult()
  4065. * Purpose: To describe the structure of 'elementresult' to tripal
  4066. * @see chado_insert_record()
  4067. * @see chado_update_record()
  4068. * @see chado_select_record()
  4069. *
  4070. * @return
  4071. * An array describing the 'elementresult' table
  4072. *
  4073. * @ingroup tripal_chado_v1.2_schema_api
  4074. *
  4075. */
  4076. function tripal_chado_chado_schema_v1_2_elementresult() {
  4077. $description = array(
  4078. 'description' => '',
  4079. 'fields' => array(
  4080. 'elementresult_id' => array(
  4081. 'description' => '',
  4082. 'type' => 'serial',
  4083. 'not null' => TRUE,
  4084. ),
  4085. 'element_id' => array(
  4086. 'description' => '',
  4087. 'type' => 'int',
  4088. 'not null' => TRUE,
  4089. ),
  4090. 'quantification_id' => array(
  4091. 'description' => '',
  4092. 'type' => 'int',
  4093. 'not null' => TRUE,
  4094. ),
  4095. 'signal' => array(
  4096. 'description' => '',
  4097. 'type' => 'float',
  4098. 'size' => 'big',
  4099. 'not null' => TRUE,
  4100. ),
  4101. ),
  4102. 'primary key' => array(
  4103. 0 => 'elementresult_id',
  4104. ),
  4105. 'unique keys' => array(
  4106. 'elementresult_c1' => array(
  4107. 0 => 'element_id',
  4108. 1 => 'quantification_id',
  4109. ),
  4110. ),
  4111. 'indexes' => array(
  4112. 'elementresult_idx1' => array(
  4113. 0 => 'element_id',
  4114. ),
  4115. 'elementresult_idx2' => array(
  4116. 0 => 'quantification_id',
  4117. ),
  4118. 'elementresult_idx3' => array(
  4119. 0 => 'signal',
  4120. ),
  4121. ),
  4122. 'foreign keys' => array(
  4123. 'quantification' => array(
  4124. 'table' => 'quantification',
  4125. 'columns' => array(
  4126. 'quantification_id' => 'quantification_id',
  4127. ),
  4128. ),
  4129. 'element' => array(
  4130. 'table' => 'element',
  4131. 'columns' => array(
  4132. 'element_id' => 'element_id',
  4133. ),
  4134. ),
  4135. ),
  4136. 'table' => 'elementresult',
  4137. 'referring_tables' => array(
  4138. 0 => 'elementresult_relationship',
  4139. ),
  4140. );
  4141. return $description;
  4142. }
  4143. /**
  4144. * Implements hook_chado_schema_v1_2_elementresult_relationship()
  4145. * Purpose: To describe the structure of 'elementresult_relationship' to tripal
  4146. * @see chado_insert_record()
  4147. * @see chado_update_record()
  4148. * @see chado_select_record()
  4149. *
  4150. * @return
  4151. * An array describing the 'elementresult_relationship' table
  4152. *
  4153. * @ingroup tripal_chado_v1.2_schema_api
  4154. *
  4155. */
  4156. function tripal_chado_chado_schema_v1_2_elementresult_relationship() {
  4157. $description = array(
  4158. 'description' => '',
  4159. 'fields' => array(
  4160. 'elementresult_relationship_id' => array(
  4161. 'description' => '',
  4162. 'type' => 'serial',
  4163. 'not null' => TRUE,
  4164. ),
  4165. 'subject_id' => array(
  4166. 'description' => '',
  4167. 'type' => 'int',
  4168. 'not null' => TRUE,
  4169. ),
  4170. 'type_id' => array(
  4171. 'description' => '',
  4172. 'type' => 'int',
  4173. 'not null' => TRUE,
  4174. ),
  4175. 'object_id' => array(
  4176. 'description' => '',
  4177. 'type' => 'int',
  4178. 'not null' => TRUE,
  4179. ),
  4180. 'value' => array(
  4181. 'description' => '',
  4182. 'type' => 'text',
  4183. 'not null' => FALSE,
  4184. ),
  4185. 'rank' => array(
  4186. 'description' => '',
  4187. 'type' => 'int',
  4188. 'not null' => TRUE,
  4189. 'default' => 0,
  4190. ),
  4191. ),
  4192. 'primary key' => array(
  4193. 0 => 'elementresult_relationship_id',
  4194. ),
  4195. 'unique keys' => array(
  4196. 'elementresult_relationship_c1' => array(
  4197. 0 => 'subject_id',
  4198. 1 => 'object_id',
  4199. 2 => 'type_id',
  4200. 3 => 'rank',
  4201. ),
  4202. ),
  4203. 'indexes' => array(
  4204. 'elementresult_relationship_idx1' => array(
  4205. 0 => 'subject_id',
  4206. ),
  4207. 'elementresult_relationship_idx2' => array(
  4208. 0 => 'type_id',
  4209. ),
  4210. 'elementresult_relationship_idx3' => array(
  4211. 0 => 'object_id',
  4212. ),
  4213. 'elementresult_relationship_idx4' => array(
  4214. 0 => 'value',
  4215. ),
  4216. ),
  4217. 'foreign keys' => array(
  4218. 'cvterm' => array(
  4219. 'table' => 'cvterm',
  4220. 'columns' => array(
  4221. 'type_id' => 'cvterm_id',
  4222. ),
  4223. ),
  4224. 'elementresult' => array(
  4225. 'table' => 'elementresult',
  4226. 'columns' => array(
  4227. 'subject_id' => 'elementresult_id',
  4228. 'object_id' => 'elementresult_id',
  4229. ),
  4230. ),
  4231. ),
  4232. 'table' => 'elementresult_relationship',
  4233. 'referring_tables' => NULL,
  4234. );
  4235. return $description;
  4236. }
  4237. /**
  4238. * Implements hook_chado_schema_v1_2_environment()
  4239. * Purpose: To describe the structure of 'environment' to tripal
  4240. * @see chado_insert_record()
  4241. * @see chado_update_record()
  4242. * @see chado_select_record()
  4243. *
  4244. * @return
  4245. * An array describing the 'environment' table
  4246. *
  4247. * @ingroup tripal_chado_v1.2_schema_api
  4248. *
  4249. */
  4250. function tripal_chado_chado_schema_v1_2_environment() {
  4251. $description = array(
  4252. 'description' => '',
  4253. 'fields' => array(
  4254. 'environment_id' => array(
  4255. 'description' => '',
  4256. 'type' => 'serial',
  4257. 'not null' => TRUE,
  4258. ),
  4259. 'uniquename' => array(
  4260. 'description' => '',
  4261. 'type' => 'text',
  4262. 'not null' => TRUE,
  4263. ),
  4264. 'description' => array(
  4265. 'description' => '',
  4266. 'type' => 'text',
  4267. 'not null' => FALSE,
  4268. ),
  4269. ),
  4270. 'primary key' => array(
  4271. 0 => 'environment_id',
  4272. ),
  4273. 'unique keys' => array(
  4274. 'environment_c1' => array(
  4275. 0 => 'uniquename',
  4276. ),
  4277. ),
  4278. 'indexes' => array(
  4279. 'environment_idx1' => array(
  4280. 0 => 'uniquename',
  4281. ),
  4282. ),
  4283. 'foreign keys' => array(
  4284. ),
  4285. 'table' => 'environment',
  4286. 'referring_tables' => array(
  4287. 0 => 'environment_cvterm',
  4288. 1 => 'phendesc',
  4289. 2 => 'phenotype_comparison',
  4290. 4 => 'phenstatement',
  4291. ),
  4292. );
  4293. return $description;
  4294. }
  4295. /**
  4296. * Implements hook_chado_schema_v1_2_environment_cvterm()
  4297. * Purpose: To describe the structure of 'environment_cvterm' to tripal
  4298. * @see chado_insert_record()
  4299. * @see chado_update_record()
  4300. * @see chado_select_record()
  4301. *
  4302. * @return
  4303. * An array describing the 'environment_cvterm' table
  4304. *
  4305. * @ingroup tripal_chado_v1.2_schema_api
  4306. *
  4307. */
  4308. function tripal_chado_chado_schema_v1_2_environment_cvterm() {
  4309. $description = array(
  4310. 'description' => '',
  4311. 'fields' => array(
  4312. 'environment_cvterm_id' => array(
  4313. 'description' => '',
  4314. 'type' => 'serial',
  4315. 'not null' => TRUE,
  4316. ),
  4317. 'environment_id' => array(
  4318. 'description' => '',
  4319. 'type' => 'int',
  4320. 'not null' => TRUE,
  4321. ),
  4322. 'cvterm_id' => array(
  4323. 'description' => '',
  4324. 'type' => 'int',
  4325. 'not null' => TRUE,
  4326. ),
  4327. ),
  4328. 'primary key' => array(
  4329. 0 => 'environment_cvterm_id',
  4330. ),
  4331. 'unique keys' => array(
  4332. 'environment_cvterm_c1' => array(
  4333. 0 => 'environment_id',
  4334. 1 => 'cvterm_id',
  4335. ),
  4336. ),
  4337. 'indexes' => array(
  4338. 'environment_cvterm_idx1' => array(
  4339. 0 => 'environment_id',
  4340. ),
  4341. 'environment_cvterm_idx2' => array(
  4342. 0 => 'cvterm_id',
  4343. ),
  4344. ),
  4345. 'foreign keys' => array(
  4346. 'cvterm' => array(
  4347. 'table' => 'cvterm',
  4348. 'columns' => array(
  4349. 'cvterm_id' => 'cvterm_id',
  4350. ),
  4351. ),
  4352. 'environment' => array(
  4353. 'table' => 'environment',
  4354. 'columns' => array(
  4355. 'environment_id' => 'environment_id',
  4356. ),
  4357. ),
  4358. ),
  4359. 'table' => 'environment_cvterm',
  4360. 'referring_tables' => NULL,
  4361. );
  4362. return $description;
  4363. }
  4364. /**
  4365. * Implements hook_chado_schema_v1_2_expression()
  4366. * Purpose: To describe the structure of 'expression' to tripal
  4367. * @see chado_insert_record()
  4368. * @see chado_update_record()
  4369. * @see chado_select_record()
  4370. *
  4371. * @return
  4372. * An array describing the 'expression' table
  4373. *
  4374. * @ingroup tripal_chado_v1.2_schema_api
  4375. *
  4376. */
  4377. function tripal_chado_chado_schema_v1_2_expression() {
  4378. $description = array(
  4379. 'description' => '',
  4380. 'fields' => array(
  4381. 'expression_id' => array(
  4382. 'description' => '',
  4383. 'type' => 'serial',
  4384. 'not null' => TRUE,
  4385. ),
  4386. 'uniquename' => array(
  4387. 'description' => '',
  4388. 'type' => 'text',
  4389. 'not null' => TRUE,
  4390. ),
  4391. 'md5checksum' => array(
  4392. 'description' => '',
  4393. 'type' => 'char',
  4394. 'length' => '32',
  4395. 'not null' => FALSE,
  4396. ),
  4397. 'description' => array(
  4398. 'description' => '',
  4399. 'type' => 'text',
  4400. 'not null' => FALSE,
  4401. ),
  4402. ),
  4403. 'primary key' => array(
  4404. 0 => 'expression_id',
  4405. ),
  4406. 'unique keys' => array(
  4407. 'expression_c1' => array(
  4408. 0 => 'uniquename',
  4409. ),
  4410. ),
  4411. 'foreign keys' => array(
  4412. ),
  4413. 'table' => 'expression',
  4414. 'referring_tables' => array(
  4415. 0 => 'expression_cvterm',
  4416. 1 => 'expression_image',
  4417. 2 => 'expression_pub',
  4418. 3 => 'expressionprop',
  4419. 4 => 'feature_expression',
  4420. ),
  4421. );
  4422. return $description;
  4423. }
  4424. /**
  4425. * Implements hook_chado_schema_v1_2_expression_cvterm()
  4426. * Purpose: To describe the structure of 'expression_cvterm' to tripal
  4427. * @see chado_insert_record()
  4428. * @see chado_update_record()
  4429. * @see chado_select_record()
  4430. *
  4431. * @return
  4432. * An array describing the 'expression_cvterm' table
  4433. *
  4434. * @ingroup tripal_chado_v1.2_schema_api
  4435. *
  4436. */
  4437. function tripal_chado_chado_schema_v1_2_expression_cvterm() {
  4438. $description = array(
  4439. 'description' => '',
  4440. 'fields' => array(
  4441. 'expression_cvterm_id' => array(
  4442. 'description' => '',
  4443. 'type' => 'serial',
  4444. 'not null' => TRUE,
  4445. ),
  4446. 'expression_id' => array(
  4447. 'description' => '',
  4448. 'type' => 'int',
  4449. 'not null' => TRUE,
  4450. ),
  4451. 'cvterm_id' => array(
  4452. 'description' => '',
  4453. 'type' => 'int',
  4454. 'not null' => TRUE,
  4455. ),
  4456. 'rank' => array(
  4457. 'description' => '',
  4458. 'type' => 'int',
  4459. 'not null' => TRUE,
  4460. 'default' => 0,
  4461. ),
  4462. 'cvterm_type_id' => array(
  4463. 'description' => '',
  4464. 'type' => 'int',
  4465. 'not null' => TRUE,
  4466. ),
  4467. ),
  4468. 'primary key' => array(
  4469. 0 => 'expression_cvterm_id',
  4470. ),
  4471. 'unique keys' => array(
  4472. 'expression_cvterm_c1' => array(
  4473. 0 => 'expression_id',
  4474. 1 => 'cvterm_id',
  4475. 2 => 'cvterm_type_id',
  4476. ),
  4477. ),
  4478. 'indexes' => array(
  4479. 'expression_cvterm_idx1' => array(
  4480. 0 => 'expression_id',
  4481. ),
  4482. 'expression_cvterm_idx2' => array(
  4483. 0 => 'cvterm_id',
  4484. ),
  4485. 'expression_cvterm_idx3' => array(
  4486. 0 => 'cvterm_type_id',
  4487. ),
  4488. ),
  4489. 'foreign keys' => array(
  4490. 'cvterm' => array(
  4491. 'table' => 'cvterm',
  4492. 'columns' => array(
  4493. 'cvterm_id' => 'cvterm_id',
  4494. 'cvterm_type_id' => 'cvterm_id',
  4495. ),
  4496. ),
  4497. 'expression' => array(
  4498. 'table' => 'expression',
  4499. 'columns' => array(
  4500. 'expression_id' => 'expression_id',
  4501. ),
  4502. ),
  4503. ),
  4504. 'table' => 'expression_cvterm',
  4505. 'referring_tables' => array(
  4506. 0 => 'expression_cvtermprop',
  4507. ),
  4508. );
  4509. return $description;
  4510. }
  4511. /**
  4512. * Implements hook_chado_schema_v1_2_expression_cvtermprop()
  4513. * Purpose: To describe the structure of 'expression_cvtermprop' to tripal
  4514. * @see chado_insert_record()
  4515. * @see chado_update_record()
  4516. * @see chado_select_record()
  4517. *
  4518. * @return
  4519. * An array describing the 'expression_cvtermprop' table
  4520. *
  4521. * @ingroup tripal_chado_v1.2_schema_api
  4522. *
  4523. */
  4524. function tripal_chado_chado_schema_v1_2_expression_cvtermprop() {
  4525. $description = array(
  4526. 'description' => '',
  4527. 'fields' => array(
  4528. 'expression_cvtermprop_id' => array(
  4529. 'description' => '',
  4530. 'type' => 'serial',
  4531. 'not null' => TRUE,
  4532. ),
  4533. 'expression_cvterm_id' => array(
  4534. 'description' => '',
  4535. 'type' => 'int',
  4536. 'not null' => TRUE,
  4537. ),
  4538. 'type_id' => array(
  4539. 'description' => '',
  4540. 'type' => 'int',
  4541. 'not null' => TRUE,
  4542. ),
  4543. 'value' => array(
  4544. 'description' => '',
  4545. 'type' => 'text',
  4546. 'not null' => FALSE,
  4547. ),
  4548. 'rank' => array(
  4549. 'description' => '',
  4550. 'type' => 'int',
  4551. 'not null' => TRUE,
  4552. 'default' => 0,
  4553. ),
  4554. ),
  4555. 'primary key' => array(
  4556. 0 => 'expression_cvtermprop_id',
  4557. ),
  4558. 'unique keys' => array(
  4559. 'expression_cvtermprop_c1' => array(
  4560. 0 => 'expression_cvterm_id',
  4561. 1 => 'type_id',
  4562. 2 => 'rank',
  4563. ),
  4564. ),
  4565. 'indexes' => array(
  4566. 'expression_cvtermprop_idx1' => array(
  4567. 0 => 'expression_cvterm_id',
  4568. ),
  4569. 'expression_cvtermprop_idx2' => array(
  4570. 0 => 'type_id',
  4571. ),
  4572. ),
  4573. 'foreign keys' => array(
  4574. 'cvterm' => array(
  4575. 'table' => 'cvterm',
  4576. 'columns' => array(
  4577. 'type_id' => 'cvterm_id',
  4578. ),
  4579. ),
  4580. 'expression_cvterm' => array(
  4581. 'table' => 'expression_cvterm',
  4582. 'columns' => array(
  4583. 'expression_cvterm_id' => 'expression_cvterm_id',
  4584. ),
  4585. ),
  4586. ),
  4587. 'table' => 'expression_cvtermprop',
  4588. 'referring_tables' => NULL,
  4589. );
  4590. return $description;
  4591. }
  4592. /**
  4593. * Implements hook_chado_schema_v1_2_expression_image()
  4594. * Purpose: To describe the structure of 'expression_image' to tripal
  4595. * @see chado_insert_record()
  4596. * @see chado_update_record()
  4597. * @see chado_select_record()
  4598. *
  4599. * @return
  4600. * An array describing the 'expression_image' table
  4601. *
  4602. * @ingroup tripal_chado_v1.2_schema_api
  4603. *
  4604. */
  4605. function tripal_chado_chado_schema_v1_2_expression_image() {
  4606. $description = array(
  4607. 'description' => '',
  4608. 'fields' => array(
  4609. 'expression_image_id' => array(
  4610. 'description' => '',
  4611. 'type' => 'serial',
  4612. 'not null' => TRUE,
  4613. ),
  4614. 'expression_id' => array(
  4615. 'description' => '',
  4616. 'type' => 'int',
  4617. 'not null' => TRUE,
  4618. ),
  4619. 'eimage_id' => array(
  4620. 'description' => '',
  4621. 'type' => 'int',
  4622. 'not null' => TRUE,
  4623. ),
  4624. ),
  4625. 'primary key' => array(
  4626. 0 => 'expression_image_id',
  4627. ),
  4628. 'unique keys' => array(
  4629. 'expression_image_c1' => array(
  4630. 0 => 'expression_id',
  4631. 1 => 'eimage_id',
  4632. ),
  4633. ),
  4634. 'indexes' => array(
  4635. 'expression_image_idx1' => array(
  4636. 0 => 'expression_id',
  4637. ),
  4638. 'expression_image_idx2' => array(
  4639. 0 => 'eimage_id',
  4640. ),
  4641. ),
  4642. 'foreign keys' => array(
  4643. 'expression' => array(
  4644. 'table' => 'expression',
  4645. 'columns' => array(
  4646. 'expression_id' => 'expression_id',
  4647. ),
  4648. ),
  4649. 'eimage' => array(
  4650. 'table' => 'eimage',
  4651. 'columns' => array(
  4652. 'eimage_id' => 'eimage_id',
  4653. ),
  4654. ),
  4655. ),
  4656. 'table' => 'expression_image',
  4657. 'referring_tables' => NULL,
  4658. );
  4659. return $description;
  4660. }
  4661. /**
  4662. * Implements hook_chado_schema_v1_2_expression_pub()
  4663. * Purpose: To describe the structure of 'expression_pub' to tripal
  4664. * @see chado_insert_record()
  4665. * @see chado_update_record()
  4666. * @see chado_select_record()
  4667. *
  4668. * @return
  4669. * An array describing the 'expression_pub' table
  4670. *
  4671. * @ingroup tripal_chado_v1.2_schema_api
  4672. *
  4673. */
  4674. function tripal_chado_chado_schema_v1_2_expression_pub() {
  4675. $description = array(
  4676. 'description' => '',
  4677. 'fields' => array(
  4678. 'expression_pub_id' => array(
  4679. 'description' => '',
  4680. 'type' => 'serial',
  4681. 'not null' => TRUE,
  4682. ),
  4683. 'expression_id' => array(
  4684. 'description' => '',
  4685. 'type' => 'int',
  4686. 'not null' => TRUE,
  4687. ),
  4688. 'pub_id' => array(
  4689. 'description' => '',
  4690. 'type' => 'int',
  4691. 'not null' => TRUE,
  4692. ),
  4693. ),
  4694. 'primary key' => array(
  4695. 0 => 'expression_pub_id',
  4696. ),
  4697. 'unique keys' => array(
  4698. 'expression_pub_c1' => array(
  4699. 0 => 'expression_id',
  4700. 1 => 'pub_id',
  4701. ),
  4702. ),
  4703. 'indexes' => array(
  4704. 'expression_pub_idx1' => array(
  4705. 0 => 'expression_id',
  4706. ),
  4707. 'expression_pub_idx2' => array(
  4708. 0 => 'pub_id',
  4709. ),
  4710. ),
  4711. 'foreign keys' => array(
  4712. 'pub' => array(
  4713. 'table' => 'pub',
  4714. 'columns' => array(
  4715. 'pub_id' => 'pub_id',
  4716. ),
  4717. ),
  4718. 'expression' => array(
  4719. 'table' => 'expression',
  4720. 'columns' => array(
  4721. 'expression_id' => 'expression_id',
  4722. ),
  4723. ),
  4724. ),
  4725. 'table' => 'expression_pub',
  4726. 'referring_tables' => NULL,
  4727. );
  4728. return $description;
  4729. }
  4730. /**
  4731. * Implements hook_chado_schema_v1_2_expressionprop()
  4732. * Purpose: To describe the structure of 'expressionprop' to tripal
  4733. * @see chado_insert_record()
  4734. * @see chado_update_record()
  4735. * @see chado_select_record()
  4736. *
  4737. * @return
  4738. * An array describing the 'expressionprop' table
  4739. *
  4740. * @ingroup tripal_chado_v1.2_schema_api
  4741. *
  4742. */
  4743. function tripal_chado_chado_schema_v1_2_expressionprop() {
  4744. $description = array(
  4745. 'description' => '',
  4746. 'fields' => array(
  4747. 'expressionprop_id' => array(
  4748. 'description' => '',
  4749. 'type' => 'serial',
  4750. 'not null' => TRUE,
  4751. ),
  4752. 'expression_id' => array(
  4753. 'description' => '',
  4754. 'type' => 'int',
  4755. 'not null' => TRUE,
  4756. ),
  4757. 'type_id' => array(
  4758. 'description' => '',
  4759. 'type' => 'int',
  4760. 'not null' => TRUE,
  4761. ),
  4762. 'value' => array(
  4763. 'description' => '',
  4764. 'type' => 'text',
  4765. 'not null' => FALSE,
  4766. ),
  4767. 'rank' => array(
  4768. 'description' => '',
  4769. 'type' => 'int',
  4770. 'not null' => TRUE,
  4771. 'default' => 0,
  4772. ),
  4773. ),
  4774. 'primary key' => array(
  4775. 0 => 'expressionprop_id',
  4776. ),
  4777. 'unique keys' => array(
  4778. 'expressionprop_c1' => array(
  4779. 0 => 'expression_id',
  4780. 1 => 'type_id',
  4781. 2 => 'rank',
  4782. ),
  4783. ),
  4784. 'indexes' => array(
  4785. 'expressionprop_idx1' => array(
  4786. 0 => 'expression_id',
  4787. ),
  4788. 'expressionprop_idx2' => array(
  4789. 0 => 'type_id',
  4790. ),
  4791. ),
  4792. 'foreign keys' => array(
  4793. 'cvterm' => array(
  4794. 'table' => 'cvterm',
  4795. 'columns' => array(
  4796. 'type_id' => 'cvterm_id',
  4797. ),
  4798. ),
  4799. 'expression' => array(
  4800. 'table' => 'expression',
  4801. 'columns' => array(
  4802. 'expression_id' => 'expression_id',
  4803. ),
  4804. ),
  4805. ),
  4806. 'table' => 'expressionprop',
  4807. 'referring_tables' => NULL,
  4808. );
  4809. return $description;
  4810. }
  4811. /**
  4812. * Implements hook_chado_schema_v1_2_feature()
  4813. * Purpose: To describe the structure of 'feature' to tripal
  4814. * @see chado_insert_record()
  4815. * @see chado_update_record()
  4816. * @see chado_select_record()
  4817. *
  4818. * @return
  4819. * An array describing the 'feature' table
  4820. *
  4821. * @ingroup tripal_chado_v1.2_schema_api
  4822. *
  4823. */
  4824. function tripal_chado_chado_schema_v1_2_feature() {
  4825. $description = array(
  4826. 'description' => '',
  4827. 'fields' => array(
  4828. 'feature_id' => array(
  4829. 'description' => '',
  4830. 'type' => 'serial',
  4831. 'not null' => TRUE,
  4832. ),
  4833. 'dbxref_id' => array(
  4834. 'description' => '',
  4835. 'type' => 'int',
  4836. 'not null' => FALSE,
  4837. ),
  4838. 'organism_id' => array(
  4839. 'description' => '',
  4840. 'type' => 'int',
  4841. 'not null' => TRUE,
  4842. ),
  4843. 'name' => array(
  4844. 'description' => '',
  4845. 'type' => 'varchar',
  4846. 'length' => '255',
  4847. 'not null' => FALSE,
  4848. ),
  4849. 'uniquename' => array(
  4850. 'description' => '',
  4851. 'type' => 'text',
  4852. 'not null' => TRUE,
  4853. ),
  4854. 'residues' => array(
  4855. 'description' => '',
  4856. 'type' => 'text',
  4857. 'not null' => FALSE,
  4858. ),
  4859. 'seqlen' => array(
  4860. 'description' => '',
  4861. 'type' => 'int',
  4862. 'not null' => FALSE,
  4863. ),
  4864. 'md5checksum' => array(
  4865. 'description' => '',
  4866. 'type' => 'char',
  4867. 'length' => '32',
  4868. 'not null' => FALSE,
  4869. ),
  4870. 'type_id' => array(
  4871. 'description' => '',
  4872. 'type' => 'int',
  4873. 'not null' => TRUE,
  4874. ),
  4875. 'is_analysis' => array(
  4876. 'description' => '',
  4877. 'type' => 'boolean',
  4878. 'not null' => TRUE,
  4879. 'default' => 'false',
  4880. ),
  4881. 'is_obsolete' => array(
  4882. 'description' => '',
  4883. 'type' => 'boolean',
  4884. 'not null' => TRUE,
  4885. 'default' => 'false',
  4886. ),
  4887. 'timeaccessioned' => array(
  4888. 'description' => '',
  4889. 'type' => 'datetime',
  4890. 'not null' => TRUE,
  4891. 'default' => 'now()',
  4892. ),
  4893. 'timelastmodified' => array(
  4894. 'description' => '',
  4895. 'type' => 'datetime',
  4896. 'not null' => TRUE,
  4897. 'default' => 'now()',
  4898. ),
  4899. ),
  4900. 'primary key' => array(
  4901. 0 => 'feature_id',
  4902. ),
  4903. 'unique keys' => array(
  4904. 'feature_c1' => array(
  4905. 0 => 'organism_id',
  4906. 1 => 'uniquename',
  4907. 2 => 'type_id',
  4908. ),
  4909. ),
  4910. 'indexes' => array(
  4911. 'feature_idx1' => array(
  4912. 0 => 'dbxref_id',
  4913. ),
  4914. 'feature_idx2' => array(
  4915. 0 => 'organism_id',
  4916. ),
  4917. 'feature_idx3' => array(
  4918. 0 => 'type_id',
  4919. ),
  4920. 'feature_idx4' => array(
  4921. 0 => 'uniquename',
  4922. ),
  4923. 'feature_name_ind1' => array(
  4924. 0 => 'name',
  4925. ),
  4926. ),
  4927. 'foreign keys' => array(
  4928. 'organism' => array(
  4929. 'table' => 'organism',
  4930. 'columns' => array(
  4931. 'organism_id' => 'organism_id',
  4932. ),
  4933. ),
  4934. 'cvterm' => array(
  4935. 'table' => 'cvterm',
  4936. 'columns' => array(
  4937. 'type_id' => 'cvterm_id',
  4938. ),
  4939. ),
  4940. 'dbxref' => array(
  4941. 'table' => 'dbxref',
  4942. 'columns' => array(
  4943. 'dbxref_id' => 'dbxref_id',
  4944. ),
  4945. ),
  4946. ),
  4947. 'table' => 'feature',
  4948. 'referring_tables' => array(
  4949. 0 => 'analysisfeature',
  4950. 1 => 'cell_line_feature',
  4951. 2 => 'element',
  4952. 3 => 'feature_cvterm',
  4953. 4 => 'feature_dbxref',
  4954. 5 => 'feature_expression',
  4955. 6 => 'feature_genotype',
  4956. 8 => 'feature_phenotype',
  4957. 9 => 'feature_pub',
  4958. 10 => 'feature_relationship',
  4959. 12 => 'feature_synonym',
  4960. 13 => 'featureloc',
  4961. 15 => 'featurepos',
  4962. 17 => 'featureprop',
  4963. 18 => 'featurerange',
  4964. 23 => 'library_feature',
  4965. 24 => 'phylonode',
  4966. 25 => 'studyprop_feature',
  4967. ),
  4968. );
  4969. return $description;
  4970. }
  4971. /**
  4972. * Implements hook_chado_schema_v1_2_feature_cvterm()
  4973. * Purpose: To describe the structure of 'feature_cvterm' to tripal
  4974. * @see chado_insert_record()
  4975. * @see chado_update_record()
  4976. * @see chado_select_record()
  4977. *
  4978. * @return
  4979. * An array describing the 'feature_cvterm' table
  4980. *
  4981. * @ingroup tripal_chado_v1.2_schema_api
  4982. *
  4983. */
  4984. function tripal_chado_chado_schema_v1_2_feature_cvterm() {
  4985. $description = array(
  4986. 'description' => '',
  4987. 'fields' => array(
  4988. 'feature_cvterm_id' => array(
  4989. 'description' => '',
  4990. 'type' => 'serial',
  4991. 'not null' => TRUE,
  4992. ),
  4993. 'feature_id' => array(
  4994. 'description' => '',
  4995. 'type' => 'int',
  4996. 'not null' => TRUE,
  4997. ),
  4998. 'cvterm_id' => array(
  4999. 'description' => '',
  5000. 'type' => 'int',
  5001. 'not null' => TRUE,
  5002. ),
  5003. 'pub_id' => array(
  5004. 'description' => '',
  5005. 'type' => 'int',
  5006. 'not null' => TRUE,
  5007. ),
  5008. 'is_not' => array(
  5009. 'description' => '',
  5010. 'type' => 'boolean',
  5011. 'not null' => TRUE,
  5012. 'default' => 'false',
  5013. ),
  5014. 'rank' => array(
  5015. 'description' => '',
  5016. 'type' => 'int',
  5017. 'not null' => TRUE,
  5018. 'default' => 0,
  5019. ),
  5020. ),
  5021. 'primary key' => array(
  5022. 0 => 'feature_cvterm_id',
  5023. ),
  5024. 'unique keys' => array(
  5025. 'feature_cvterm_c1' => array(
  5026. 0 => 'feature_id',
  5027. 1 => 'cvterm_id',
  5028. 2 => 'pub_id',
  5029. 3 => 'rank',
  5030. ),
  5031. ),
  5032. 'indexes' => array(
  5033. 'feature_cvterm_idx1' => array(
  5034. 0 => 'feature_id',
  5035. ),
  5036. 'feature_cvterm_idx2' => array(
  5037. 0 => 'cvterm_id',
  5038. ),
  5039. 'feature_cvterm_idx3' => array(
  5040. 0 => 'pub_id',
  5041. ),
  5042. ),
  5043. 'foreign keys' => array(
  5044. 'cvterm' => array(
  5045. 'table' => 'cvterm',
  5046. 'columns' => array(
  5047. 'cvterm_id' => 'cvterm_id',
  5048. ),
  5049. ),
  5050. 'pub' => array(
  5051. 'table' => 'pub',
  5052. 'columns' => array(
  5053. 'pub_id' => 'pub_id',
  5054. ),
  5055. ),
  5056. 'feature' => array(
  5057. 'table' => 'feature',
  5058. 'columns' => array(
  5059. 'feature_id' => 'feature_id',
  5060. ),
  5061. ),
  5062. ),
  5063. 'table' => 'feature_cvterm',
  5064. 'referring_tables' => array(
  5065. 0 => 'feature_cvterm_dbxref',
  5066. 1 => 'feature_cvterm_pub',
  5067. 2 => 'feature_cvtermprop',
  5068. ),
  5069. );
  5070. return $description;
  5071. }
  5072. /**
  5073. * Implements hook_chado_schema_v1_2_feature_cvterm_dbxref()
  5074. * Purpose: To describe the structure of 'feature_cvterm_dbxref' to tripal
  5075. * @see chado_insert_record()
  5076. * @see chado_update_record()
  5077. * @see chado_select_record()
  5078. *
  5079. * @return
  5080. * An array describing the 'feature_cvterm_dbxref' table
  5081. *
  5082. * @ingroup tripal_chado_v1.2_schema_api
  5083. *
  5084. */
  5085. function tripal_chado_chado_schema_v1_2_feature_cvterm_dbxref() {
  5086. $description = array(
  5087. 'description' => '',
  5088. 'fields' => array(
  5089. 'feature_cvterm_dbxref_id' => array(
  5090. 'description' => '',
  5091. 'type' => 'serial',
  5092. 'not null' => TRUE,
  5093. ),
  5094. 'feature_cvterm_id' => array(
  5095. 'description' => '',
  5096. 'type' => 'int',
  5097. 'not null' => TRUE,
  5098. ),
  5099. 'dbxref_id' => array(
  5100. 'description' => '',
  5101. 'type' => 'int',
  5102. 'not null' => TRUE,
  5103. ),
  5104. ),
  5105. 'primary key' => array(
  5106. 0 => 'feature_cvterm_dbxref_id',
  5107. ),
  5108. 'unique keys' => array(
  5109. 'feature_cvterm_dbxref_c1' => array(
  5110. 0 => 'feature_cvterm_id',
  5111. 1 => 'dbxref_id',
  5112. ),
  5113. ),
  5114. 'indexes' => array(
  5115. 'feature_cvterm_dbxref_idx1' => array(
  5116. 0 => 'feature_cvterm_id',
  5117. ),
  5118. 'feature_cvterm_dbxref_idx2' => array(
  5119. 0 => 'dbxref_id',
  5120. ),
  5121. ),
  5122. 'foreign keys' => array(
  5123. 'feature_cvterm' => array(
  5124. 'table' => 'feature_cvterm',
  5125. 'columns' => array(
  5126. 'feature_cvterm_id' => 'feature_cvterm_id',
  5127. ),
  5128. ),
  5129. 'dbxref' => array(
  5130. 'table' => 'dbxref',
  5131. 'columns' => array(
  5132. 'dbxref_id' => 'dbxref_id',
  5133. ),
  5134. ),
  5135. ),
  5136. 'table' => 'feature_cvterm_dbxref',
  5137. 'referring_tables' => NULL,
  5138. );
  5139. return $description;
  5140. }
  5141. /**
  5142. * Implements hook_chado_schema_v1_2_feature_cvterm_pub()
  5143. * Purpose: To describe the structure of 'feature_cvterm_pub' to tripal
  5144. * @see chado_insert_record()
  5145. * @see chado_update_record()
  5146. * @see chado_select_record()
  5147. *
  5148. * @return
  5149. * An array describing the 'feature_cvterm_pub' table
  5150. *
  5151. * @ingroup tripal_chado_v1.2_schema_api
  5152. *
  5153. */
  5154. function tripal_chado_chado_schema_v1_2_feature_cvterm_pub() {
  5155. $description = array(
  5156. 'description' => '',
  5157. 'fields' => array(
  5158. 'feature_cvterm_pub_id' => array(
  5159. 'description' => '',
  5160. 'type' => 'serial',
  5161. 'not null' => TRUE,
  5162. ),
  5163. 'feature_cvterm_id' => array(
  5164. 'description' => '',
  5165. 'type' => 'int',
  5166. 'not null' => TRUE,
  5167. ),
  5168. 'pub_id' => array(
  5169. 'description' => '',
  5170. 'type' => 'int',
  5171. 'not null' => TRUE,
  5172. ),
  5173. ),
  5174. 'primary key' => array(
  5175. 0 => 'feature_cvterm_pub_id',
  5176. ),
  5177. 'unique keys' => array(
  5178. 'feature_cvterm_pub_c1' => array(
  5179. 0 => 'feature_cvterm_id',
  5180. 1 => 'pub_id',
  5181. ),
  5182. ),
  5183. 'indexes' => array(
  5184. 'feature_cvterm_pub_idx1' => array(
  5185. 0 => 'feature_cvterm_id',
  5186. ),
  5187. 'feature_cvterm_pub_idx2' => array(
  5188. 0 => 'pub_id',
  5189. ),
  5190. ),
  5191. 'foreign keys' => array(
  5192. 'feature_cvterm' => array(
  5193. 'table' => 'feature_cvterm',
  5194. 'columns' => array(
  5195. 'feature_cvterm_id' => 'feature_cvterm_id',
  5196. ),
  5197. ),
  5198. 'pub' => array(
  5199. 'table' => 'pub',
  5200. 'columns' => array(
  5201. 'pub_id' => 'pub_id',
  5202. ),
  5203. ),
  5204. ),
  5205. 'table' => 'feature_cvterm_pub',
  5206. 'referring_tables' => NULL,
  5207. );
  5208. return $description;
  5209. }
  5210. /**
  5211. * Implements hook_chado_schema_v1_2_feature_cvtermprop()
  5212. * Purpose: To describe the structure of 'feature_cvtermprop' to tripal
  5213. * @see chado_insert_record()
  5214. * @see chado_update_record()
  5215. * @see chado_select_record()
  5216. *
  5217. * @return
  5218. * An array describing the 'feature_cvtermprop' table
  5219. *
  5220. * @ingroup tripal_chado_v1.2_schema_api
  5221. *
  5222. */
  5223. function tripal_chado_chado_schema_v1_2_feature_cvtermprop() {
  5224. $description = array(
  5225. 'description' => '',
  5226. 'fields' => array(
  5227. 'feature_cvtermprop_id' => array(
  5228. 'description' => '',
  5229. 'type' => 'serial',
  5230. 'not null' => TRUE,
  5231. ),
  5232. 'feature_cvterm_id' => array(
  5233. 'description' => '',
  5234. 'type' => 'int',
  5235. 'not null' => TRUE,
  5236. ),
  5237. 'type_id' => array(
  5238. 'description' => '',
  5239. 'type' => 'int',
  5240. 'not null' => TRUE,
  5241. ),
  5242. 'value' => array(
  5243. 'description' => '',
  5244. 'type' => 'text',
  5245. 'not null' => FALSE,
  5246. ),
  5247. 'rank' => array(
  5248. 'description' => '',
  5249. 'type' => 'int',
  5250. 'not null' => TRUE,
  5251. 'default' => 0,
  5252. ),
  5253. ),
  5254. 'primary key' => array(
  5255. 0 => 'feature_cvtermprop_id',
  5256. ),
  5257. 'unique keys' => array(
  5258. 'feature_cvtermprop_c1' => array(
  5259. 0 => 'feature_cvterm_id',
  5260. 1 => 'type_id',
  5261. 2 => 'rank',
  5262. ),
  5263. ),
  5264. 'indexes' => array(
  5265. 'feature_cvtermprop_idx1' => array(
  5266. 0 => 'feature_cvterm_id',
  5267. ),
  5268. 'feature_cvtermprop_idx2' => array(
  5269. 0 => 'type_id',
  5270. ),
  5271. ),
  5272. 'foreign keys' => array(
  5273. 'cvterm' => array(
  5274. 'table' => 'cvterm',
  5275. 'columns' => array(
  5276. 'type_id' => 'cvterm_id',
  5277. ),
  5278. ),
  5279. 'feature_cvterm' => array(
  5280. 'table' => 'feature_cvterm',
  5281. 'columns' => array(
  5282. 'feature_cvterm_id' => 'feature_cvterm_id',
  5283. ),
  5284. ),
  5285. ),
  5286. 'table' => 'feature_cvtermprop',
  5287. 'referring_tables' => NULL,
  5288. );
  5289. return $description;
  5290. }
  5291. /**
  5292. * Implements hook_chado_schema_v1_2_feature_dbxref()
  5293. * Purpose: To describe the structure of 'feature_dbxref' to tripal
  5294. * @see chado_insert_record()
  5295. * @see chado_update_record()
  5296. * @see chado_select_record()
  5297. *
  5298. * @return
  5299. * An array describing the 'feature_dbxref' table
  5300. *
  5301. * @ingroup tripal_chado_v1.2_schema_api
  5302. *
  5303. */
  5304. function tripal_chado_chado_schema_v1_2_feature_dbxref() {
  5305. $description = array(
  5306. 'description' => '',
  5307. 'fields' => array(
  5308. 'feature_dbxref_id' => array(
  5309. 'description' => '',
  5310. 'type' => 'serial',
  5311. 'not null' => TRUE,
  5312. ),
  5313. 'feature_id' => array(
  5314. 'description' => '',
  5315. 'type' => 'int',
  5316. 'not null' => TRUE,
  5317. ),
  5318. 'dbxref_id' => array(
  5319. 'description' => '',
  5320. 'type' => 'int',
  5321. 'not null' => TRUE,
  5322. ),
  5323. 'is_current' => array(
  5324. 'description' => '',
  5325. 'type' => 'boolean',
  5326. 'not null' => TRUE,
  5327. 'default' => 'true',
  5328. ),
  5329. ),
  5330. 'primary key' => array(
  5331. 0 => 'feature_dbxref_id',
  5332. ),
  5333. 'unique keys' => array(
  5334. 'feature_dbxref_c1' => array(
  5335. 0 => 'feature_id',
  5336. 1 => 'dbxref_id',
  5337. ),
  5338. ),
  5339. 'indexes' => array(
  5340. 'feature_dbxref_idx1' => array(
  5341. 0 => 'feature_id',
  5342. ),
  5343. 'feature_dbxref_idx2' => array(
  5344. 0 => 'dbxref_id',
  5345. ),
  5346. ),
  5347. 'foreign keys' => array(
  5348. 'dbxref' => array(
  5349. 'table' => 'dbxref',
  5350. 'columns' => array(
  5351. 'dbxref_id' => 'dbxref_id',
  5352. ),
  5353. ),
  5354. 'feature' => array(
  5355. 'table' => 'feature',
  5356. 'columns' => array(
  5357. 'feature_id' => 'feature_id',
  5358. ),
  5359. ),
  5360. ),
  5361. 'table' => 'feature_dbxref',
  5362. 'referring_tables' => NULL,
  5363. );
  5364. return $description;
  5365. }
  5366. /**
  5367. * Implements hook_chado_schema_v1_2_feature_expression()
  5368. * Purpose: To describe the structure of 'feature_expression' to tripal
  5369. * @see chado_insert_record()
  5370. * @see chado_update_record()
  5371. * @see chado_select_record()
  5372. *
  5373. * @return
  5374. * An array describing the 'feature_expression' table
  5375. *
  5376. * @ingroup tripal_chado_v1.2_schema_api
  5377. *
  5378. */
  5379. function tripal_chado_chado_schema_v1_2_feature_expression() {
  5380. $description = array(
  5381. 'description' => '',
  5382. 'fields' => array(
  5383. 'feature_expression_id' => array(
  5384. 'description' => '',
  5385. 'type' => 'serial',
  5386. 'not null' => TRUE,
  5387. ),
  5388. 'expression_id' => array(
  5389. 'description' => '',
  5390. 'type' => 'int',
  5391. 'not null' => TRUE,
  5392. ),
  5393. 'feature_id' => array(
  5394. 'description' => '',
  5395. 'type' => 'int',
  5396. 'not null' => TRUE,
  5397. ),
  5398. 'pub_id' => array(
  5399. 'description' => '',
  5400. 'type' => 'int',
  5401. 'not null' => TRUE,
  5402. ),
  5403. ),
  5404. 'primary key' => array(
  5405. 0 => 'feature_expression_id',
  5406. ),
  5407. 'unique keys' => array(
  5408. 'feature_expression_c1' => array(
  5409. 0 => 'expression_id',
  5410. 1 => 'feature_id',
  5411. 2 => 'pub_id',
  5412. ),
  5413. ),
  5414. 'indexes' => array(
  5415. 'feature_expression_idx1' => array(
  5416. 0 => 'expression_id',
  5417. ),
  5418. 'feature_expression_idx2' => array(
  5419. 0 => 'feature_id',
  5420. ),
  5421. 'feature_expression_idx3' => array(
  5422. 0 => 'pub_id',
  5423. ),
  5424. ),
  5425. 'foreign keys' => array(
  5426. 'pub' => array(
  5427. 'table' => 'pub',
  5428. 'columns' => array(
  5429. 'pub_id' => 'pub_id',
  5430. ),
  5431. ),
  5432. 'feature' => array(
  5433. 'table' => 'feature',
  5434. 'columns' => array(
  5435. 'feature_id' => 'feature_id',
  5436. ),
  5437. ),
  5438. 'expression' => array(
  5439. 'table' => 'expression',
  5440. 'columns' => array(
  5441. 'expression_id' => 'expression_id',
  5442. ),
  5443. ),
  5444. ),
  5445. 'table' => 'feature_expression',
  5446. 'referring_tables' => array(
  5447. 0 => 'feature_expressionprop',
  5448. ),
  5449. );
  5450. return $description;
  5451. }
  5452. /**
  5453. * Implements hook_chado_schema_v1_2_feature_expressionprop()
  5454. * Purpose: To describe the structure of 'feature_expressionprop' to tripal
  5455. * @see chado_insert_record()
  5456. * @see chado_update_record()
  5457. * @see chado_select_record()
  5458. *
  5459. * @return
  5460. * An array describing the 'feature_expressionprop' table
  5461. *
  5462. * @ingroup tripal_chado_v1.2_schema_api
  5463. *
  5464. */
  5465. function tripal_chado_chado_schema_v1_2_feature_expressionprop() {
  5466. $description = array(
  5467. 'description' => '',
  5468. 'fields' => array(
  5469. 'feature_expressionprop_id' => array(
  5470. 'description' => '',
  5471. 'type' => 'serial',
  5472. 'not null' => TRUE,
  5473. ),
  5474. 'feature_expression_id' => array(
  5475. 'description' => '',
  5476. 'type' => 'int',
  5477. 'not null' => TRUE,
  5478. ),
  5479. 'type_id' => array(
  5480. 'description' => '',
  5481. 'type' => 'int',
  5482. 'not null' => TRUE,
  5483. ),
  5484. 'value' => array(
  5485. 'description' => '',
  5486. 'type' => 'text',
  5487. 'not null' => FALSE,
  5488. ),
  5489. 'rank' => array(
  5490. 'description' => '',
  5491. 'type' => 'int',
  5492. 'not null' => TRUE,
  5493. 'default' => 0,
  5494. ),
  5495. ),
  5496. 'primary key' => array(
  5497. 0 => 'feature_expressionprop_id',
  5498. ),
  5499. 'unique keys' => array(
  5500. 'feature_expressionprop_c1' => array(
  5501. 0 => 'feature_expression_id',
  5502. 1 => 'type_id',
  5503. 2 => 'rank',
  5504. ),
  5505. ),
  5506. 'indexes' => array(
  5507. 'feature_expressionprop_idx1' => array(
  5508. 0 => 'feature_expression_id',
  5509. ),
  5510. 'feature_expressionprop_idx2' => array(
  5511. 0 => 'type_id',
  5512. ),
  5513. ),
  5514. 'foreign keys' => array(
  5515. 'cvterm' => array(
  5516. 'table' => 'cvterm',
  5517. 'columns' => array(
  5518. 'type_id' => 'cvterm_id',
  5519. ),
  5520. ),
  5521. 'feature_expression' => array(
  5522. 'table' => 'feature_expression',
  5523. 'columns' => array(
  5524. 'feature_expression_id' => 'feature_expression_id',
  5525. ),
  5526. ),
  5527. ),
  5528. 'table' => 'feature_expressionprop',
  5529. 'referring_tables' => NULL,
  5530. );
  5531. return $description;
  5532. }
  5533. /**
  5534. * Implements hook_chado_schema_v1_2_feature_genotype()
  5535. * Purpose: To describe the structure of 'feature_genotype' to tripal
  5536. * @see chado_insert_record()
  5537. * @see chado_update_record()
  5538. * @see chado_select_record()
  5539. *
  5540. * @return
  5541. * An array describing the 'feature_genotype' table
  5542. *
  5543. * @ingroup tripal_chado_v1.2_schema_api
  5544. *
  5545. */
  5546. function tripal_chado_chado_schema_v1_2_feature_genotype() {
  5547. $description = array(
  5548. 'description' => '',
  5549. 'fields' => array(
  5550. 'feature_genotype_id' => array(
  5551. 'description' => '',
  5552. 'type' => 'serial',
  5553. 'not null' => TRUE,
  5554. ),
  5555. 'feature_id' => array(
  5556. 'description' => '',
  5557. 'type' => 'int',
  5558. 'not null' => TRUE,
  5559. ),
  5560. 'genotype_id' => array(
  5561. 'description' => '',
  5562. 'type' => 'int',
  5563. 'not null' => TRUE,
  5564. ),
  5565. 'chromosome_id' => array(
  5566. 'description' => '',
  5567. 'type' => 'int',
  5568. 'not null' => FALSE,
  5569. ),
  5570. 'rank' => array(
  5571. 'description' => '',
  5572. 'type' => 'int',
  5573. 'not null' => TRUE,
  5574. ),
  5575. 'cgroup' => array(
  5576. 'description' => '',
  5577. 'type' => 'int',
  5578. 'not null' => TRUE,
  5579. ),
  5580. 'cvterm_id' => array(
  5581. 'description' => '',
  5582. 'type' => 'int',
  5583. 'not null' => TRUE,
  5584. ),
  5585. ),
  5586. 'primary key' => array(
  5587. 0 => 'feature_genotype_id',
  5588. ),
  5589. 'unique keys' => array(
  5590. 'feature_genotype_c1' => array(
  5591. 0 => 'feature_id',
  5592. 1 => 'genotype_id',
  5593. 2 => 'cvterm_id',
  5594. 3 => 'chromosome_id',
  5595. 4 => 'rank',
  5596. 5 => 'cgroup',
  5597. ),
  5598. ),
  5599. 'indexes' => array(
  5600. 'feature_genotype_idx1' => array(
  5601. 0 => 'feature_id',
  5602. ),
  5603. 'feature_genotype_idx2' => array(
  5604. 0 => 'genotype_id',
  5605. ),
  5606. ),
  5607. 'foreign keys' => array(
  5608. 'cvterm' => array(
  5609. 'table' => 'cvterm',
  5610. 'columns' => array(
  5611. 'cvterm_id' => 'cvterm_id',
  5612. ),
  5613. ),
  5614. 'feature' => array(
  5615. 'table' => 'feature',
  5616. 'columns' => array(
  5617. 'feature_id' => 'feature_id',
  5618. 'chromosome_id' => 'feature_id',
  5619. ),
  5620. ),
  5621. 'genotype' => array(
  5622. 'table' => 'genotype',
  5623. 'columns' => array(
  5624. 'genotype_id' => 'genotype_id',
  5625. ),
  5626. ),
  5627. ),
  5628. 'table' => 'feature_genotype',
  5629. 'referring_tables' => NULL,
  5630. );
  5631. return $description;
  5632. }
  5633. /**
  5634. * Implements hook_chado_schema_v1_2_feature_phenotype()
  5635. * Purpose: To describe the structure of 'feature_phenotype' to tripal
  5636. * @see chado_insert_record()
  5637. * @see chado_update_record()
  5638. * @see chado_select_record()
  5639. *
  5640. * @return
  5641. * An array describing the 'feature_phenotype' table
  5642. *
  5643. * @ingroup tripal_chado_v1.2_schema_api
  5644. *
  5645. */
  5646. function tripal_chado_chado_schema_v1_2_feature_phenotype() {
  5647. $description = array(
  5648. 'description' => '',
  5649. 'fields' => array(
  5650. 'feature_phenotype_id' => array(
  5651. 'description' => '',
  5652. 'type' => 'serial',
  5653. 'not null' => TRUE,
  5654. ),
  5655. 'feature_id' => array(
  5656. 'description' => '',
  5657. 'type' => 'int',
  5658. 'not null' => TRUE,
  5659. ),
  5660. 'phenotype_id' => array(
  5661. 'description' => '',
  5662. 'type' => 'int',
  5663. 'not null' => TRUE,
  5664. ),
  5665. ),
  5666. 'primary key' => array(
  5667. 0 => 'feature_phenotype_id',
  5668. ),
  5669. 'unique keys' => array(
  5670. 'feature_phenotype_c1' => array(
  5671. 0 => 'feature_id',
  5672. 1 => 'phenotype_id',
  5673. ),
  5674. ),
  5675. 'indexes' => array(
  5676. 'feature_phenotype_idx1' => array(
  5677. 0 => 'feature_id',
  5678. ),
  5679. 'feature_phenotype_idx2' => array(
  5680. 0 => 'phenotype_id',
  5681. ),
  5682. ),
  5683. 'foreign keys' => array(
  5684. 'feature' => array(
  5685. 'table' => 'feature',
  5686. 'columns' => array(
  5687. 'feature_id' => 'feature_id',
  5688. ),
  5689. ),
  5690. 'phenotype' => array(
  5691. 'table' => 'phenotype',
  5692. 'columns' => array(
  5693. 'phenotype_id' => 'phenotype_id',
  5694. ),
  5695. ),
  5696. ),
  5697. 'table' => 'feature_phenotype',
  5698. 'referring_tables' => NULL,
  5699. );
  5700. return $description;
  5701. }
  5702. /**
  5703. * Implements hook_chado_schema_v1_2_feature_pub()
  5704. * Purpose: To describe the structure of 'feature_pub' to tripal
  5705. * @see chado_insert_record()
  5706. * @see chado_update_record()
  5707. * @see chado_select_record()
  5708. *
  5709. * @return
  5710. * An array describing the 'feature_pub' table
  5711. *
  5712. * @ingroup tripal_chado_v1.2_schema_api
  5713. *
  5714. */
  5715. function tripal_chado_chado_schema_v1_2_feature_pub() {
  5716. $description = array(
  5717. 'description' => '',
  5718. 'fields' => array(
  5719. 'feature_pub_id' => array(
  5720. 'description' => '',
  5721. 'type' => 'serial',
  5722. 'not null' => TRUE,
  5723. ),
  5724. 'feature_id' => array(
  5725. 'description' => '',
  5726. 'type' => 'int',
  5727. 'not null' => TRUE,
  5728. ),
  5729. 'pub_id' => array(
  5730. 'description' => '',
  5731. 'type' => 'int',
  5732. 'not null' => TRUE,
  5733. ),
  5734. ),
  5735. 'primary key' => array(
  5736. 0 => 'feature_pub_id',
  5737. ),
  5738. 'unique keys' => array(
  5739. 'feature_pub_c1' => array(
  5740. 0 => 'feature_id',
  5741. 1 => 'pub_id',
  5742. ),
  5743. ),
  5744. 'indexes' => array(
  5745. 'feature_pub_idx1' => array(
  5746. 0 => 'feature_id',
  5747. ),
  5748. 'feature_pub_idx2' => array(
  5749. 0 => 'pub_id',
  5750. ),
  5751. ),
  5752. 'foreign keys' => array(
  5753. 'pub' => array(
  5754. 'table' => 'pub',
  5755. 'columns' => array(
  5756. 'pub_id' => 'pub_id',
  5757. ),
  5758. ),
  5759. 'feature' => array(
  5760. 'table' => 'feature',
  5761. 'columns' => array(
  5762. 'feature_id' => 'feature_id',
  5763. ),
  5764. ),
  5765. ),
  5766. 'table' => 'feature_pub',
  5767. 'referring_tables' => array(
  5768. 0 => 'feature_pubprop',
  5769. ),
  5770. );
  5771. return $description;
  5772. }
  5773. /**
  5774. * Implements hook_chado_schema_v1_2_feature_pubprop()
  5775. * Purpose: To describe the structure of 'feature_pubprop' to tripal
  5776. * @see chado_insert_record()
  5777. * @see chado_update_record()
  5778. * @see chado_select_record()
  5779. *
  5780. * @return
  5781. * An array describing the 'feature_pubprop' table
  5782. *
  5783. * @ingroup tripal_chado_v1.2_schema_api
  5784. *
  5785. */
  5786. function tripal_chado_chado_schema_v1_2_feature_pubprop() {
  5787. $description = array(
  5788. 'description' => '',
  5789. 'fields' => array(
  5790. 'feature_pubprop_id' => array(
  5791. 'description' => '',
  5792. 'type' => 'serial',
  5793. 'not null' => TRUE,
  5794. ),
  5795. 'feature_pub_id' => array(
  5796. 'description' => '',
  5797. 'type' => 'int',
  5798. 'not null' => TRUE,
  5799. ),
  5800. 'type_id' => array(
  5801. 'description' => '',
  5802. 'type' => 'int',
  5803. 'not null' => TRUE,
  5804. ),
  5805. 'value' => array(
  5806. 'description' => '',
  5807. 'type' => 'text',
  5808. 'not null' => FALSE,
  5809. ),
  5810. 'rank' => array(
  5811. 'description' => '',
  5812. 'type' => 'int',
  5813. 'not null' => TRUE,
  5814. 'default' => 0,
  5815. ),
  5816. ),
  5817. 'primary key' => array(
  5818. 0 => 'feature_pubprop_id',
  5819. ),
  5820. 'unique keys' => array(
  5821. 'feature_pubprop_c1' => array(
  5822. 0 => 'feature_pub_id',
  5823. 1 => 'type_id',
  5824. 2 => 'rank',
  5825. ),
  5826. ),
  5827. 'indexes' => array(
  5828. 'feature_pubprop_idx1' => array(
  5829. 0 => 'feature_pub_id',
  5830. ),
  5831. ),
  5832. 'foreign keys' => array(
  5833. 'cvterm' => array(
  5834. 'table' => 'cvterm',
  5835. 'columns' => array(
  5836. 'type_id' => 'cvterm_id',
  5837. ),
  5838. ),
  5839. 'feature_pub' => array(
  5840. 'table' => 'feature_pub',
  5841. 'columns' => array(
  5842. 'feature_pub_id' => 'feature_pub_id',
  5843. ),
  5844. ),
  5845. ),
  5846. 'table' => 'feature_pubprop',
  5847. 'referring_tables' => NULL,
  5848. );
  5849. return $description;
  5850. }
  5851. /**
  5852. * Implements hook_chado_schema_v1_2_feature_relationship()
  5853. * Purpose: To describe the structure of 'feature_relationship' to tripal
  5854. * @see chado_insert_record()
  5855. * @see chado_update_record()
  5856. * @see chado_select_record()
  5857. *
  5858. * @return
  5859. * An array describing the 'feature_relationship' table
  5860. *
  5861. * @ingroup tripal_chado_v1.2_schema_api
  5862. *
  5863. */
  5864. function tripal_chado_chado_schema_v1_2_feature_relationship() {
  5865. $description = array(
  5866. 'description' => '',
  5867. 'fields' => array(
  5868. 'feature_relationship_id' => array(
  5869. 'description' => '',
  5870. 'type' => 'serial',
  5871. 'not null' => TRUE,
  5872. ),
  5873. 'subject_id' => array(
  5874. 'description' => '',
  5875. 'type' => 'int',
  5876. 'not null' => TRUE,
  5877. ),
  5878. 'object_id' => array(
  5879. 'description' => '',
  5880. 'type' => 'int',
  5881. 'not null' => TRUE,
  5882. ),
  5883. 'type_id' => array(
  5884. 'description' => '',
  5885. 'type' => 'int',
  5886. 'not null' => TRUE,
  5887. ),
  5888. 'value' => array(
  5889. 'description' => '',
  5890. 'type' => 'text',
  5891. 'not null' => FALSE,
  5892. ),
  5893. 'rank' => array(
  5894. 'description' => '',
  5895. 'type' => 'int',
  5896. 'not null' => TRUE,
  5897. 'default' => 0,
  5898. ),
  5899. ),
  5900. 'primary key' => array(
  5901. 0 => 'feature_relationship_id',
  5902. ),
  5903. 'unique keys' => array(
  5904. 'feature_relationship_c1' => array(
  5905. 0 => 'subject_id',
  5906. 1 => 'object_id',
  5907. 2 => 'type_id',
  5908. 3 => 'rank',
  5909. ),
  5910. ),
  5911. 'indexes' => array(
  5912. 'feature_relationship_idx1' => array(
  5913. 0 => 'subject_id',
  5914. ),
  5915. 'feature_relationship_idx2' => array(
  5916. 0 => 'object_id',
  5917. ),
  5918. 'feature_relationship_idx3' => array(
  5919. 0 => 'type_id',
  5920. ),
  5921. ),
  5922. 'foreign keys' => array(
  5923. 'cvterm' => array(
  5924. 'table' => 'cvterm',
  5925. 'columns' => array(
  5926. 'type_id' => 'cvterm_id',
  5927. ),
  5928. ),
  5929. 'feature' => array(
  5930. 'table' => 'feature',
  5931. 'columns' => array(
  5932. 'subject_id' => 'feature_id',
  5933. 'object_id' => 'feature_id',
  5934. ),
  5935. ),
  5936. ),
  5937. 'table' => 'feature_relationship',
  5938. 'referring_tables' => array(
  5939. 0 => 'feature_relationship_pub',
  5940. 1 => 'feature_relationshipprop',
  5941. ),
  5942. );
  5943. return $description;
  5944. }
  5945. /**
  5946. * Implements hook_chado_schema_v1_2_feature_relationship_pub()
  5947. * Purpose: To describe the structure of 'feature_relationship_pub' to tripal
  5948. * @see chado_insert_record()
  5949. * @see chado_update_record()
  5950. * @see chado_select_record()
  5951. *
  5952. * @return
  5953. * An array describing the 'feature_relationship_pub' table
  5954. *
  5955. * @ingroup tripal_chado_v1.2_schema_api
  5956. *
  5957. */
  5958. function tripal_chado_chado_schema_v1_2_feature_relationship_pub() {
  5959. $description = array(
  5960. 'description' => '',
  5961. 'fields' => array(
  5962. 'feature_relationship_pub_id' => array(
  5963. 'description' => '',
  5964. 'type' => 'serial',
  5965. 'not null' => TRUE,
  5966. ),
  5967. 'feature_relationship_id' => array(
  5968. 'description' => '',
  5969. 'type' => 'int',
  5970. 'not null' => TRUE,
  5971. ),
  5972. 'pub_id' => array(
  5973. 'description' => '',
  5974. 'type' => 'int',
  5975. 'not null' => TRUE,
  5976. ),
  5977. ),
  5978. 'primary key' => array(
  5979. 0 => 'feature_relationship_pub_id',
  5980. ),
  5981. 'unique keys' => array(
  5982. 'feature_relationship_pub_c1' => array(
  5983. 0 => 'feature_relationship_id',
  5984. 1 => 'pub_id',
  5985. ),
  5986. ),
  5987. 'indexes' => array(
  5988. 'feature_relationship_pub_idx1' => array(
  5989. 0 => 'feature_relationship_id',
  5990. ),
  5991. 'feature_relationship_pub_idx2' => array(
  5992. 0 => 'pub_id',
  5993. ),
  5994. ),
  5995. 'foreign keys' => array(
  5996. 'feature_relationship' => array(
  5997. 'table' => 'feature_relationship',
  5998. 'columns' => array(
  5999. 'feature_relationship_id' => 'feature_relationship_id',
  6000. ),
  6001. ),
  6002. 'pub' => array(
  6003. 'table' => 'pub',
  6004. 'columns' => array(
  6005. 'pub_id' => 'pub_id',
  6006. ),
  6007. ),
  6008. ),
  6009. 'table' => 'feature_relationship_pub',
  6010. 'referring_tables' => NULL,
  6011. );
  6012. return $description;
  6013. }
  6014. /**
  6015. * Implements hook_chado_schema_v1_2_feature_relationshipprop()
  6016. * Purpose: To describe the structure of 'feature_relationshipprop' to tripal
  6017. * @see chado_insert_record()
  6018. * @see chado_update_record()
  6019. * @see chado_select_record()
  6020. *
  6021. * @return
  6022. * An array describing the 'feature_relationshipprop' table
  6023. *
  6024. * @ingroup tripal_chado_v1.2_schema_api
  6025. *
  6026. */
  6027. function tripal_chado_chado_schema_v1_2_feature_relationshipprop() {
  6028. $description = array(
  6029. 'description' => '',
  6030. 'fields' => array(
  6031. 'feature_relationshipprop_id' => array(
  6032. 'description' => '',
  6033. 'type' => 'serial',
  6034. 'not null' => TRUE,
  6035. ),
  6036. 'feature_relationship_id' => array(
  6037. 'description' => '',
  6038. 'type' => 'int',
  6039. 'not null' => TRUE,
  6040. ),
  6041. 'type_id' => array(
  6042. 'description' => '',
  6043. 'type' => 'int',
  6044. 'not null' => TRUE,
  6045. ),
  6046. 'value' => array(
  6047. 'description' => '',
  6048. 'type' => 'text',
  6049. 'not null' => FALSE,
  6050. ),
  6051. 'rank' => array(
  6052. 'description' => '',
  6053. 'type' => 'int',
  6054. 'not null' => TRUE,
  6055. 'default' => 0,
  6056. ),
  6057. ),
  6058. 'primary key' => array(
  6059. 0 => 'feature_relationshipprop_id',
  6060. ),
  6061. 'unique keys' => array(
  6062. 'feature_relationshipprop_c1' => array(
  6063. 0 => 'feature_relationship_id',
  6064. 1 => 'type_id',
  6065. 2 => 'rank',
  6066. ),
  6067. ),
  6068. 'indexes' => array(
  6069. 'feature_relationshipprop_idx1' => array(
  6070. 0 => 'feature_relationship_id',
  6071. ),
  6072. 'feature_relationshipprop_idx2' => array(
  6073. 0 => 'type_id',
  6074. ),
  6075. ),
  6076. 'foreign keys' => array(
  6077. 'cvterm' => array(
  6078. 'table' => 'cvterm',
  6079. 'columns' => array(
  6080. 'type_id' => 'cvterm_id',
  6081. ),
  6082. ),
  6083. 'feature_relationship' => array(
  6084. 'table' => 'feature_relationship',
  6085. 'columns' => array(
  6086. 'feature_relationship_id' => 'feature_relationship_id',
  6087. ),
  6088. ),
  6089. ),
  6090. 'table' => 'feature_relationshipprop',
  6091. 'referring_tables' => array(
  6092. 0 => 'feature_relationshipprop_pub',
  6093. ),
  6094. );
  6095. return $description;
  6096. }
  6097. /**
  6098. * Implements hook_chado_schema_v1_2_feature_relationshipprop_pub()
  6099. * Purpose: To describe the structure of 'feature_relationshipprop_pub' to tripal
  6100. * @see chado_insert_record()
  6101. * @see chado_update_record()
  6102. * @see chado_select_record()
  6103. *
  6104. * @return
  6105. * An array describing the 'feature_relationshipprop_pub' table
  6106. *
  6107. * @ingroup tripal_chado_v1.2_schema_api
  6108. *
  6109. */
  6110. function tripal_chado_chado_schema_v1_2_feature_relationshipprop_pub() {
  6111. $description = array(
  6112. 'description' => '',
  6113. 'fields' => array(
  6114. 'feature_relationshipprop_pub_id' => array(
  6115. 'description' => '',
  6116. 'type' => 'serial',
  6117. 'not null' => TRUE,
  6118. ),
  6119. 'feature_relationshipprop_id' => array(
  6120. 'description' => '',
  6121. 'type' => 'int',
  6122. 'not null' => TRUE,
  6123. ),
  6124. 'pub_id' => array(
  6125. 'description' => '',
  6126. 'type' => 'int',
  6127. 'not null' => TRUE,
  6128. ),
  6129. ),
  6130. 'primary key' => array(
  6131. 0 => 'feature_relationshipprop_pub_id',
  6132. ),
  6133. 'unique keys' => array(
  6134. 'feature_relationshipprop_pub_c1' => array(
  6135. 0 => 'feature_relationshipprop_id',
  6136. 1 => 'pub_id',
  6137. ),
  6138. ),
  6139. 'indexes' => array(
  6140. 'feature_relationshipprop_pub_idx1' => array(
  6141. 0 => 'feature_relationshipprop_id',
  6142. ),
  6143. 'feature_relationshipprop_pub_idx2' => array(
  6144. 0 => 'pub_id',
  6145. ),
  6146. ),
  6147. 'foreign keys' => array(
  6148. 'feature_relationshipprop' => array(
  6149. 'table' => 'feature_relationshipprop',
  6150. 'columns' => array(
  6151. 'feature_relationshipprop_id' => 'feature_relationshipprop_id',
  6152. ),
  6153. ),
  6154. 'pub' => array(
  6155. 'table' => 'pub',
  6156. 'columns' => array(
  6157. 'pub_id' => 'pub_id',
  6158. ),
  6159. ),
  6160. ),
  6161. 'table' => 'feature_relationshipprop_pub',
  6162. 'referring_tables' => NULL,
  6163. );
  6164. return $description;
  6165. }
  6166. /**
  6167. * Implements hook_chado_schema_v1_2_feature_synonym()
  6168. * Purpose: To describe the structure of 'feature_synonym' to tripal
  6169. * @see chado_insert_record()
  6170. * @see chado_update_record()
  6171. * @see chado_select_record()
  6172. *
  6173. * @return
  6174. * An array describing the 'feature_synonym' table
  6175. *
  6176. * @ingroup tripal_chado_v1.2_schema_api
  6177. *
  6178. */
  6179. function tripal_chado_chado_schema_v1_2_feature_synonym() {
  6180. $description = array(
  6181. 'description' => '',
  6182. 'fields' => array(
  6183. 'feature_synonym_id' => array(
  6184. 'description' => '',
  6185. 'type' => 'serial',
  6186. 'not null' => TRUE,
  6187. ),
  6188. 'synonym_id' => array(
  6189. 'description' => '',
  6190. 'type' => 'int',
  6191. 'not null' => TRUE,
  6192. ),
  6193. 'feature_id' => array(
  6194. 'description' => '',
  6195. 'type' => 'int',
  6196. 'not null' => TRUE,
  6197. ),
  6198. 'pub_id' => array(
  6199. 'description' => '',
  6200. 'type' => 'int',
  6201. 'not null' => TRUE,
  6202. ),
  6203. 'is_current' => array(
  6204. 'description' => '',
  6205. 'type' => 'boolean',
  6206. 'not null' => TRUE,
  6207. 'default' => 'false',
  6208. ),
  6209. 'is_internal' => array(
  6210. 'description' => '',
  6211. 'type' => 'boolean',
  6212. 'not null' => TRUE,
  6213. 'default' => 'false',
  6214. ),
  6215. ),
  6216. 'primary key' => array(
  6217. 0 => 'feature_synonym_id',
  6218. ),
  6219. 'unique keys' => array(
  6220. 'feature_synonym_c1' => array(
  6221. 0 => 'synonym_id',
  6222. 1 => 'feature_id',
  6223. 2 => 'pub_id',
  6224. ),
  6225. ),
  6226. 'indexes' => array(
  6227. 'feature_synonym_idx1' => array(
  6228. 0 => 'synonym_id',
  6229. ),
  6230. 'feature_synonym_idx2' => array(
  6231. 0 => 'feature_id',
  6232. ),
  6233. 'feature_synonym_idx3' => array(
  6234. 0 => 'pub_id',
  6235. ),
  6236. ),
  6237. 'foreign keys' => array(
  6238. 'pub' => array(
  6239. 'table' => 'pub',
  6240. 'columns' => array(
  6241. 'pub_id' => 'pub_id',
  6242. ),
  6243. ),
  6244. 'feature' => array(
  6245. 'table' => 'feature',
  6246. 'columns' => array(
  6247. 'feature_id' => 'feature_id',
  6248. ),
  6249. ),
  6250. 'synonym' => array(
  6251. 'table' => 'synonym',
  6252. 'columns' => array(
  6253. 'synonym_id' => 'synonym_id',
  6254. ),
  6255. ),
  6256. ),
  6257. 'table' => 'feature_synonym',
  6258. 'referring_tables' => NULL,
  6259. );
  6260. return $description;
  6261. }
  6262. /**
  6263. * Implements hook_chado_schema_v1_2_featureloc()
  6264. * Purpose: To describe the structure of 'featureloc' to tripal
  6265. * @see chado_insert_record()
  6266. * @see chado_update_record()
  6267. * @see chado_select_record()
  6268. *
  6269. * @return
  6270. * An array describing the 'featureloc' table
  6271. *
  6272. * @ingroup tripal_chado_v1.2_schema_api
  6273. *
  6274. */
  6275. function tripal_chado_chado_schema_v1_2_featureloc() {
  6276. $description = array(
  6277. 'description' => '',
  6278. 'fields' => array(
  6279. 'featureloc_id' => array(
  6280. 'description' => '',
  6281. 'type' => 'serial',
  6282. 'not null' => TRUE,
  6283. ),
  6284. 'feature_id' => array(
  6285. 'description' => '',
  6286. 'type' => 'int',
  6287. 'not null' => TRUE,
  6288. ),
  6289. 'srcfeature_id' => array(
  6290. 'description' => '',
  6291. 'type' => 'int',
  6292. 'not null' => FALSE,
  6293. ),
  6294. 'fmin' => array(
  6295. 'description' => '',
  6296. 'type' => 'int',
  6297. 'not null' => FALSE,
  6298. ),
  6299. 'is_fmin_partial' => array(
  6300. 'description' => '',
  6301. 'type' => 'boolean',
  6302. 'not null' => TRUE,
  6303. 'default' => 'false',
  6304. ),
  6305. 'fmax' => array(
  6306. 'description' => '',
  6307. 'type' => 'int',
  6308. 'not null' => FALSE,
  6309. ),
  6310. 'is_fmax_partial' => array(
  6311. 'description' => '',
  6312. 'type' => 'boolean',
  6313. 'not null' => TRUE,
  6314. 'default' => 'false',
  6315. ),
  6316. 'strand' => array(
  6317. 'description' => '',
  6318. 'type' => 'int',
  6319. 'size' => 'small',
  6320. 'not null' => FALSE,
  6321. ),
  6322. 'phase' => array(
  6323. 'description' => '',
  6324. 'type' => 'int',
  6325. 'not null' => FALSE,
  6326. ),
  6327. 'residue_info' => array(
  6328. 'description' => '',
  6329. 'type' => 'text',
  6330. 'not null' => FALSE,
  6331. ),
  6332. 'locgroup' => array(
  6333. 'description' => '',
  6334. 'type' => 'int',
  6335. 'not null' => TRUE,
  6336. 'default' => 0,
  6337. ),
  6338. 'rank' => array(
  6339. 'description' => '',
  6340. 'type' => 'int',
  6341. 'not null' => TRUE,
  6342. 'default' => 0,
  6343. ),
  6344. ),
  6345. 'primary key' => array(
  6346. 0 => 'featureloc_id',
  6347. ),
  6348. 'unique keys' => array(
  6349. 'featureloc_c1' => array(
  6350. 0 => 'feature_id',
  6351. 1 => 'locgroup',
  6352. 2 => 'rank',
  6353. ),
  6354. ),
  6355. 'indexes' => array(
  6356. 'binloc_boxrange' => array(
  6357. 0 => 'fmin',
  6358. ),
  6359. 'binloc_boxrange_src' => array(
  6360. 0 => 'srcfeature_id',
  6361. 1 => 'fmin',
  6362. ),
  6363. 'featureloc_idx1' => array(
  6364. 0 => 'feature_id',
  6365. ),
  6366. 'featureloc_idx2' => array(
  6367. 0 => 'srcfeature_id',
  6368. ),
  6369. 'featureloc_idx3' => array(
  6370. 0 => 'srcfeature_id',
  6371. 1 => 'fmin',
  6372. 2 => 'fmax',
  6373. ),
  6374. ),
  6375. 'foreign keys' => array(
  6376. 'feature' => array(
  6377. 'table' => 'feature',
  6378. 'columns' => array(
  6379. 'feature_id' => 'feature_id',
  6380. 'srcfeature_id' => 'feature_id',
  6381. ),
  6382. ),
  6383. ),
  6384. 'referring_tables' => array(
  6385. 0 => 'featureloc_pub',
  6386. ),
  6387. 'table' => 'featureloc',
  6388. );
  6389. return $description;
  6390. }
  6391. /**
  6392. * Implements hook_chado_schema_v1_2_featureloc_pub()
  6393. * Purpose: To describe the structure of 'featureloc_pub' to tripal
  6394. * @see chado_insert_record()
  6395. * @see chado_update_record()
  6396. * @see chado_select_record()
  6397. *
  6398. * @return
  6399. * An array describing the 'featureloc_pub' table
  6400. *
  6401. * @ingroup tripal_chado_v1.2_schema_api
  6402. *
  6403. */
  6404. function tripal_chado_chado_schema_v1_2_featureloc_pub() {
  6405. $description = array(
  6406. 'description' => '',
  6407. 'fields' => array(
  6408. 'featureloc_pub_id' => array(
  6409. 'description' => '',
  6410. 'type' => 'serial',
  6411. 'not null' => TRUE,
  6412. ),
  6413. 'featureloc_id' => array(
  6414. 'description' => '',
  6415. 'type' => 'int',
  6416. 'not null' => TRUE,
  6417. ),
  6418. 'pub_id' => array(
  6419. 'description' => '',
  6420. 'type' => 'int',
  6421. 'not null' => TRUE,
  6422. ),
  6423. ),
  6424. 'primary key' => array(
  6425. 0 => 'featureloc_pub_id',
  6426. ),
  6427. 'unique keys' => array(
  6428. 'featureloc_pub_c1' => array(
  6429. 0 => 'featureloc_id',
  6430. 1 => 'pub_id',
  6431. ),
  6432. ),
  6433. 'indexes' => array(
  6434. 'featureloc_pub_idx1' => array(
  6435. 0 => 'featureloc_id',
  6436. ),
  6437. 'featureloc_pub_idx2' => array(
  6438. 0 => 'pub_id',
  6439. ),
  6440. ),
  6441. 'foreign keys' => array(
  6442. 'featureloc' => array(
  6443. 'table' => 'featureloc',
  6444. 'columns' => array(
  6445. 'featureloc_id' => 'featureloc_id',
  6446. ),
  6447. ),
  6448. 'pub' => array(
  6449. 'table' => 'pub',
  6450. 'columns' => array(
  6451. 'pub_id' => 'pub_id',
  6452. ),
  6453. ),
  6454. ),
  6455. 'table' => 'featureloc_pub',
  6456. 'referring_tables' => NULL,
  6457. );
  6458. return $description;
  6459. }
  6460. /**
  6461. * Implements hook_chado_schema_v1_2_featuremap()
  6462. * Purpose: To describe the structure of 'featuremap' to tripal
  6463. * @see chado_insert_record()
  6464. * @see chado_update_record()
  6465. * @see chado_select_record()
  6466. *
  6467. * @return
  6468. * An array describing the 'featuremap' table
  6469. *
  6470. * @ingroup tripal_chado_v1.2_schema_api
  6471. *
  6472. */
  6473. function tripal_chado_chado_schema_v1_2_featuremap() {
  6474. $description = array(
  6475. 'description' => '',
  6476. 'fields' => array(
  6477. 'featuremap_id' => array(
  6478. 'description' => '',
  6479. 'type' => 'serial',
  6480. 'not null' => TRUE,
  6481. ),
  6482. 'name' => array(
  6483. 'description' => '',
  6484. 'type' => 'varchar',
  6485. 'length' => '255',
  6486. 'not null' => FALSE,
  6487. ),
  6488. 'description' => array(
  6489. 'description' => '',
  6490. 'type' => 'text',
  6491. 'not null' => FALSE,
  6492. ),
  6493. 'unittype_id' => array(
  6494. 'description' => '',
  6495. 'type' => 'int',
  6496. 'not null' => FALSE,
  6497. ),
  6498. ),
  6499. 'primary key' => array(
  6500. 0 => 'featuremap_id',
  6501. ),
  6502. 'unique keys' => array(
  6503. 'featuremap_c1' => array(
  6504. 0 => 'name',
  6505. ),
  6506. ),
  6507. 'foreign keys' => array(
  6508. 'cvterm' => array(
  6509. 'table' => 'cvterm',
  6510. 'columns' => array(
  6511. 'unittype_id' => 'cvterm_id',
  6512. ),
  6513. ),
  6514. ),
  6515. 'table' => 'featuremap',
  6516. 'referring_tables' => array(
  6517. 0 => 'featuremap_pub',
  6518. 1 => 'featurepos',
  6519. 2 => 'featurerange',
  6520. ),
  6521. );
  6522. return $description;
  6523. }
  6524. /**
  6525. * Implements hook_chado_schema_v1_2_featuremap_pub()
  6526. * Purpose: To describe the structure of 'featuremap_pub' to tripal
  6527. * @see chado_insert_record()
  6528. * @see chado_update_record()
  6529. * @see chado_select_record()
  6530. *
  6531. * @return
  6532. * An array describing the 'featuremap_pub' table
  6533. *
  6534. * @ingroup tripal_chado_v1.2_schema_api
  6535. *
  6536. */
  6537. function tripal_chado_chado_schema_v1_2_featuremap_pub() {
  6538. $description = array(
  6539. 'description' => '',
  6540. 'fields' => array(
  6541. 'featuremap_pub_id' => array(
  6542. 'description' => '',
  6543. 'type' => 'serial',
  6544. 'not null' => TRUE,
  6545. ),
  6546. 'featuremap_id' => array(
  6547. 'description' => '',
  6548. 'type' => 'int',
  6549. 'not null' => TRUE,
  6550. ),
  6551. 'pub_id' => array(
  6552. 'description' => '',
  6553. 'type' => 'int',
  6554. 'not null' => TRUE,
  6555. ),
  6556. ),
  6557. 'primary key' => array(
  6558. 0 => 'featuremap_pub_id',
  6559. ),
  6560. 'unique keys' => array(),
  6561. 'indexes' => array(
  6562. 'featuremap_pub_idx1' => array(
  6563. 0 => 'featuremap_id',
  6564. ),
  6565. 'featuremap_pub_idx2' => array(
  6566. 0 => 'pub_id',
  6567. ),
  6568. ),
  6569. 'foreign keys' => array(
  6570. 'pub' => array(
  6571. 'table' => 'pub',
  6572. 'columns' => array(
  6573. 'pub_id' => 'pub_id',
  6574. ),
  6575. ),
  6576. 'featuremap' => array(
  6577. 'table' => 'featuremap',
  6578. 'columns' => array(
  6579. 'featuremap_id' => 'featuremap_id',
  6580. ),
  6581. ),
  6582. ),
  6583. 'table' => 'featuremap_pub',
  6584. 'referring_tables' => NULL,
  6585. );
  6586. return $description;
  6587. }
  6588. /**
  6589. * Implements hook_chado_schema_v1_2_featurepos()
  6590. * Purpose: To describe the structure of 'featurepos' to tripal
  6591. * @see chado_insert_record()
  6592. * @see chado_update_record()
  6593. * @see chado_select_record()
  6594. *
  6595. * @return
  6596. * An array describing the 'featurepos' table
  6597. *
  6598. * @ingroup tripal_chado_v1.2_schema_api
  6599. *
  6600. */
  6601. function tripal_chado_chado_schema_v1_2_featurepos() {
  6602. $description = array(
  6603. 'description' => '',
  6604. 'fields' => array(
  6605. 'featurepos_id' => array(
  6606. 'description' => '',
  6607. 'type' => 'serial',
  6608. 'not null' => TRUE,
  6609. ),
  6610. 'featuremap_id' => array(
  6611. 'description' => '',
  6612. 'type' => 'serial',
  6613. 'not null' => TRUE,
  6614. ),
  6615. 'feature_id' => array(
  6616. 'description' => '',
  6617. 'type' => 'int',
  6618. 'not null' => TRUE,
  6619. ),
  6620. 'map_feature_id' => array(
  6621. 'description' => '',
  6622. 'type' => 'int',
  6623. 'not null' => TRUE,
  6624. ),
  6625. 'mappos' => array(
  6626. 'description' => '',
  6627. 'type' => 'float',
  6628. 'size' => 'big',
  6629. 'not null' => TRUE,
  6630. ),
  6631. ),
  6632. 'primary key' => array(
  6633. 0 => 'featurepos_id',
  6634. ),
  6635. 'unique keys' => array(),
  6636. 'indexes' => array(
  6637. 'featurepos_idx1' => array(
  6638. 0 => 'featuremap_id',
  6639. ),
  6640. 'featurepos_idx2' => array(
  6641. 0 => 'feature_id',
  6642. ),
  6643. 'featurepos_idx3' => array(
  6644. 0 => 'map_feature_id',
  6645. ),
  6646. ),
  6647. 'foreign keys' => array(
  6648. 'feature' => array(
  6649. 'table' => 'feature',
  6650. 'columns' => array(
  6651. 'feature_id' => 'feature_id',
  6652. 'map_feature_id' => 'feature_id',
  6653. ),
  6654. ),
  6655. 'featuremap' => array(
  6656. 'table' => 'featuremap',
  6657. 'columns' => array(
  6658. 'featuremap_id' => 'featuremap_id',
  6659. ),
  6660. ),
  6661. ),
  6662. 'table' => 'featurepos',
  6663. 'referring_tables' => NULL,
  6664. );
  6665. return $description;
  6666. }
  6667. /**
  6668. * Implements hook_chado_schema_v1_2_featureprop()
  6669. * Purpose: To describe the structure of 'featureprop' to tripal
  6670. * @see chado_insert_record()
  6671. * @see chado_update_record()
  6672. * @see chado_select_record()
  6673. *
  6674. * @return
  6675. * An array describing the 'featureprop' table
  6676. *
  6677. * @ingroup tripal_chado_v1.2_schema_api
  6678. *
  6679. */
  6680. function tripal_chado_chado_schema_v1_2_featureprop() {
  6681. $description = array(
  6682. 'description' => '',
  6683. 'fields' => array(
  6684. 'featureprop_id' => array(
  6685. 'description' => '',
  6686. 'type' => 'serial',
  6687. 'not null' => TRUE,
  6688. ),
  6689. 'feature_id' => array(
  6690. 'description' => '',
  6691. 'type' => 'int',
  6692. 'not null' => TRUE,
  6693. ),
  6694. 'type_id' => array(
  6695. 'description' => '',
  6696. 'type' => 'int',
  6697. 'not null' => TRUE,
  6698. ),
  6699. 'value' => array(
  6700. 'description' => '',
  6701. 'type' => 'text',
  6702. 'not null' => FALSE,
  6703. ),
  6704. 'rank' => array(
  6705. 'description' => '',
  6706. 'type' => 'int',
  6707. 'not null' => TRUE,
  6708. 'default' => 0,
  6709. ),
  6710. ),
  6711. 'primary key' => array(
  6712. 0 => 'featureprop_id',
  6713. ),
  6714. 'unique keys' => array(
  6715. 'featureprop_c1' => array(
  6716. 0 => 'feature_id',
  6717. 1 => 'type_id',
  6718. 2 => 'rank',
  6719. ),
  6720. ),
  6721. 'indexes' => array(
  6722. 'featureprop_idx1' => array(
  6723. 0 => 'feature_id',
  6724. ),
  6725. 'featureprop_idx2' => array(
  6726. 0 => 'type_id',
  6727. ),
  6728. ),
  6729. 'foreign keys' => array(
  6730. 'cvterm' => array(
  6731. 'table' => 'cvterm',
  6732. 'columns' => array(
  6733. 'type_id' => 'cvterm_id',
  6734. ),
  6735. ),
  6736. 'feature' => array(
  6737. 'table' => 'feature',
  6738. 'columns' => array(
  6739. 'feature_id' => 'feature_id',
  6740. ),
  6741. ),
  6742. ),
  6743. 'table' => 'featureprop',
  6744. 'referring_tables' => array(
  6745. 0 => 'featureprop_pub',
  6746. ),
  6747. );
  6748. return $description;
  6749. }
  6750. /**
  6751. * Implements hook_chado_schema_v1_2_featureprop_pub()
  6752. * Purpose: To describe the structure of 'featureprop_pub' to tripal
  6753. * @see chado_insert_record()
  6754. * @see chado_update_record()
  6755. * @see chado_select_record()
  6756. *
  6757. * @return
  6758. * An array describing the 'featureprop_pub' table
  6759. *
  6760. * @ingroup tripal_chado_v1.2_schema_api
  6761. *
  6762. */
  6763. function tripal_chado_chado_schema_v1_2_featureprop_pub() {
  6764. $description = array(
  6765. 'description' => '',
  6766. 'fields' => array(
  6767. 'featureprop_pub_id' => array(
  6768. 'description' => '',
  6769. 'type' => 'serial',
  6770. 'not null' => TRUE,
  6771. ),
  6772. 'featureprop_id' => array(
  6773. 'description' => '',
  6774. 'type' => 'int',
  6775. 'not null' => TRUE,
  6776. ),
  6777. 'pub_id' => array(
  6778. 'description' => '',
  6779. 'type' => 'int',
  6780. 'not null' => TRUE,
  6781. ),
  6782. ),
  6783. 'primary key' => array(
  6784. 0 => 'featureprop_pub_id',
  6785. ),
  6786. 'unique keys' => array(
  6787. 'featureprop_pub_c1' => array(
  6788. 0 => 'featureprop_id',
  6789. 1 => 'pub_id',
  6790. ),
  6791. ),
  6792. 'indexes' => array(
  6793. 'featureprop_pub_idx1' => array(
  6794. 0 => 'featureprop_id',
  6795. ),
  6796. 'featureprop_pub_idx2' => array(
  6797. 0 => 'pub_id',
  6798. ),
  6799. ),
  6800. 'foreign keys' => array(
  6801. 'featureprop' => array(
  6802. 'table' => 'featureprop',
  6803. 'columns' => array(
  6804. 'featureprop_id' => 'featureprop_id',
  6805. ),
  6806. ),
  6807. 'pub' => array(
  6808. 'table' => 'pub',
  6809. 'columns' => array(
  6810. 'pub_id' => 'pub_id',
  6811. ),
  6812. ),
  6813. ),
  6814. 'table' => 'featureprop_pub',
  6815. 'referring_tables' => NULL,
  6816. );
  6817. return $description;
  6818. }
  6819. /**
  6820. * Implements hook_chado_schema_v1_2_featurerange()
  6821. * Purpose: To describe the structure of 'featurerange' to tripal
  6822. * @see chado_insert_record()
  6823. * @see chado_update_record()
  6824. * @see chado_select_record()
  6825. *
  6826. * @return
  6827. * An array describing the 'featurerange' table
  6828. *
  6829. * @ingroup tripal_chado_v1.2_schema_api
  6830. *
  6831. */
  6832. function tripal_chado_chado_schema_v1_2_featurerange() {
  6833. $description = array(
  6834. 'description' => '',
  6835. 'fields' => array(
  6836. 'featurerange_id' => array(
  6837. 'description' => '',
  6838. 'type' => 'serial',
  6839. 'not null' => TRUE,
  6840. ),
  6841. 'featuremap_id' => array(
  6842. 'description' => '',
  6843. 'type' => 'int',
  6844. 'not null' => TRUE,
  6845. ),
  6846. 'feature_id' => array(
  6847. 'description' => '',
  6848. 'type' => 'int',
  6849. 'not null' => TRUE,
  6850. ),
  6851. 'leftstartf_id' => array(
  6852. 'description' => '',
  6853. 'type' => 'int',
  6854. 'not null' => TRUE,
  6855. ),
  6856. 'leftendf_id' => array(
  6857. 'description' => '',
  6858. 'type' => 'int',
  6859. 'not null' => FALSE,
  6860. ),
  6861. 'rightstartf_id' => array(
  6862. 'description' => '',
  6863. 'type' => 'int',
  6864. 'not null' => FALSE,
  6865. ),
  6866. 'rightendf_id' => array(
  6867. 'description' => '',
  6868. 'type' => 'int',
  6869. 'not null' => TRUE,
  6870. ),
  6871. 'rangestr' => array(
  6872. 'description' => '',
  6873. 'type' => 'varchar',
  6874. 'length' => '255',
  6875. 'not null' => FALSE,
  6876. ),
  6877. ),
  6878. 'primary key' => array(
  6879. 0 => 'featurerange_id',
  6880. ),
  6881. 'unique keys' => array(),
  6882. 'indexes' => array(
  6883. 'featurerange_idx1' => array(
  6884. 0 => 'featuremap_id',
  6885. ),
  6886. 'featurerange_idx2' => array(
  6887. 0 => 'feature_id',
  6888. ),
  6889. 'featurerange_idx3' => array(
  6890. 0 => 'leftstartf_id',
  6891. ),
  6892. 'featurerange_idx4' => array(
  6893. 0 => 'leftendf_id',
  6894. ),
  6895. 'featurerange_idx5' => array(
  6896. 0 => 'rightstartf_id',
  6897. ),
  6898. 'featurerange_idx6' => array(
  6899. 0 => 'rightendf_id',
  6900. ),
  6901. ),
  6902. 'foreign keys' => array(
  6903. 'feature' => array(
  6904. 'table' => 'feature',
  6905. 'columns' => array(
  6906. 'feature_id' => 'feature_id',
  6907. 'leftstartf_id' => 'feature_id',
  6908. 'leftendf_id' => 'feature_id',
  6909. 'rightstartf_id' => 'feature_id',
  6910. 'rightendf_id' => 'feature_id',
  6911. ),
  6912. ),
  6913. 'featuremap' => array(
  6914. 'table' => 'featuremap',
  6915. 'columns' => array(
  6916. 'featuremap_id' => 'featuremap_id',
  6917. ),
  6918. ),
  6919. ),
  6920. 'table' => 'featurerange',
  6921. 'referring_tables' => NULL,
  6922. );
  6923. return $description;
  6924. }
  6925. /**
  6926. * Implements hook_chado_schema_v1_2_genotype()
  6927. * Purpose: To describe the structure of 'genotype' to tripal
  6928. * @see chado_insert_record()
  6929. * @see chado_update_record()
  6930. * @see chado_select_record()
  6931. *
  6932. * @return
  6933. * An array describing the 'genotype' table
  6934. *
  6935. * @ingroup tripal_chado_v1.2_schema_api
  6936. *
  6937. */
  6938. function tripal_chado_chado_schema_v1_2_genotype() {
  6939. $description = array(
  6940. 'description' => '',
  6941. 'fields' => array(
  6942. 'genotype_id' => array(
  6943. 'description' => '',
  6944. 'type' => 'serial',
  6945. 'not null' => TRUE,
  6946. ),
  6947. 'name' => array(
  6948. 'description' => '',
  6949. 'type' => 'text',
  6950. 'not null' => FALSE,
  6951. ),
  6952. 'uniquename' => array(
  6953. 'description' => '',
  6954. 'type' => 'text',
  6955. 'not null' => TRUE,
  6956. ),
  6957. 'description' => array(
  6958. 'description' => '',
  6959. 'type' => 'varchar',
  6960. 'length' => '255',
  6961. 'not null' => FALSE,
  6962. ),
  6963. 'type_id' => array(
  6964. 'description' => '',
  6965. 'type' => 'int',
  6966. 'not null' => TRUE,
  6967. ),
  6968. ),
  6969. 'primary key' => array(
  6970. 0 => 'genotype_id',
  6971. ),
  6972. 'unique keys' => array(
  6973. 'genotype_c1' => array(
  6974. 0 => 'uniquename',
  6975. ),
  6976. ),
  6977. 'indexes' => array(
  6978. 'genotype_idx1' => array(
  6979. 0 => 'uniquename',
  6980. ),
  6981. 'genotype_idx2' => array(
  6982. 0 => 'name',
  6983. ),
  6984. ),
  6985. 'foreign keys' => array(
  6986. 'cvterm' => array(
  6987. 'table' => 'cvterm',
  6988. 'columns' => array(
  6989. 'type_id' => 'cvterm_id',
  6990. ),
  6991. ),
  6992. ),
  6993. 'table' => 'genotype',
  6994. 'referring_tables' => array(
  6995. 0 => 'feature_genotype',
  6996. 1 => 'genotypeprop',
  6997. 9 => 'nd_experiment_genotype',
  6998. 10 => 'phendesc',
  6999. 11 => 'phenotype_comparison',
  7000. 13 => 'phenstatement',
  7001. 14 => 'stock_genotype',
  7002. ),
  7003. );
  7004. return $description;
  7005. }
  7006. /**
  7007. * Implements hook_chado_schema_v1_2_genotypeprop()
  7008. * Purpose: To describe the structure of 'genotypeprop' to tripal
  7009. * @see chado_insert_record()
  7010. * @see chado_update_record()
  7011. * @see chado_select_record()
  7012. *
  7013. * @return
  7014. * An array describing the 'genotypeprop' table
  7015. *
  7016. * @ingroup tripal_chado_v1.2_schema_api
  7017. *
  7018. */
  7019. function tripal_chado_chado_schema_v1_2_genotypeprop() {
  7020. $description = array(
  7021. 'description' => '',
  7022. 'fields' => array(
  7023. 'genotypeprop_id' => array(
  7024. 'description' => '',
  7025. 'type' => 'serial',
  7026. 'not null' => TRUE,
  7027. ),
  7028. 'genotype_id' => array(
  7029. 'description' => '',
  7030. 'type' => 'int',
  7031. 'not null' => TRUE,
  7032. ),
  7033. 'type_id' => array(
  7034. 'description' => '',
  7035. 'type' => 'int',
  7036. 'not null' => TRUE,
  7037. ),
  7038. 'value' => array(
  7039. 'description' => '',
  7040. 'type' => 'text',
  7041. 'not null' => FALSE,
  7042. ),
  7043. 'rank' => array(
  7044. 'description' => '',
  7045. 'type' => 'int',
  7046. 'not null' => TRUE,
  7047. 'default' => 0,
  7048. ),
  7049. ),
  7050. 'primary key' => array(
  7051. 0 => 'genotypeprop_id',
  7052. ),
  7053. 'unique keys' => array(
  7054. 'genotypeprop_c1' => array(
  7055. 0 => 'genotype_id',
  7056. 1 => 'type_id',
  7057. 2 => 'rank',
  7058. ),
  7059. ),
  7060. 'indexes' => array(
  7061. 'genotypeprop_idx1' => array(
  7062. 0 => 'genotype_id',
  7063. ),
  7064. 'genotypeprop_idx2' => array(
  7065. 0 => 'type_id',
  7066. ),
  7067. ),
  7068. 'foreign keys' => array(
  7069. 'cvterm' => array(
  7070. 'table' => 'cvterm',
  7071. 'columns' => array(
  7072. 'type_id' => 'cvterm_id',
  7073. ),
  7074. ),
  7075. 'genotype' => array(
  7076. 'table' => 'genotype',
  7077. 'columns' => array(
  7078. 'genotype_id' => 'genotype_id',
  7079. ),
  7080. ),
  7081. ),
  7082. 'table' => 'genotypeprop',
  7083. 'referring_tables' => NULL,
  7084. );
  7085. return $description;
  7086. }
  7087. /**
  7088. * Implements hook_chado_schema_v1_2_library()
  7089. * Purpose: To describe the structure of 'library' to tripal
  7090. * @see chado_insert_record()
  7091. * @see chado_update_record()
  7092. * @see chado_select_record()
  7093. *
  7094. * @return
  7095. * An array describing the 'library' table
  7096. *
  7097. * @ingroup tripal_chado_v1.2_schema_api
  7098. *
  7099. */
  7100. function tripal_chado_chado_schema_v1_2_library() {
  7101. $description = array(
  7102. 'description' => '',
  7103. 'fields' => array(
  7104. 'library_id' => array(
  7105. 'description' => '',
  7106. 'type' => 'serial',
  7107. 'not null' => TRUE,
  7108. ),
  7109. 'organism_id' => array(
  7110. 'description' => '',
  7111. 'type' => 'int',
  7112. 'not null' => TRUE,
  7113. ),
  7114. 'name' => array(
  7115. 'description' => '',
  7116. 'type' => 'varchar',
  7117. 'length' => '255',
  7118. 'not null' => FALSE,
  7119. ),
  7120. 'uniquename' => array(
  7121. 'description' => '',
  7122. 'type' => 'text',
  7123. 'not null' => TRUE,
  7124. ),
  7125. 'type_id' => array(
  7126. 'description' => '',
  7127. 'type' => 'int',
  7128. 'not null' => TRUE,
  7129. ),
  7130. 'is_obsolete' => array(
  7131. 'description' => '',
  7132. 'type' => 'int',
  7133. 'not null' => TRUE,
  7134. 'default' => 0,
  7135. ),
  7136. 'timeaccessioned' => array(
  7137. 'description' => '',
  7138. 'type' => 'datetime',
  7139. 'not null' => TRUE,
  7140. 'default' => 'now()',
  7141. ),
  7142. 'timelastmodified' => array(
  7143. 'description' => '',
  7144. 'type' => 'datetime',
  7145. 'not null' => TRUE,
  7146. 'default' => 'now()',
  7147. ),
  7148. ),
  7149. 'primary key' => array(
  7150. 0 => 'library_id',
  7151. ),
  7152. 'unique keys' => array(
  7153. 'library_c1' => array(
  7154. 0 => 'organism_id',
  7155. 1 => 'uniquename',
  7156. 2 => 'type_id',
  7157. ),
  7158. ),
  7159. 'indexes' => array(
  7160. 'library_idx1' => array(
  7161. 0 => 'organism_id',
  7162. ),
  7163. 'library_idx2' => array(
  7164. 0 => 'type_id',
  7165. ),
  7166. 'library_idx3' => array(
  7167. 0 => 'uniquename',
  7168. ),
  7169. 'library_name_ind1' => array(
  7170. 0 => 'name',
  7171. ),
  7172. ),
  7173. 'foreign keys' => array(
  7174. 'organism' => array(
  7175. 'table' => 'organism',
  7176. 'columns' => array(
  7177. 'organism_id' => 'organism_id',
  7178. ),
  7179. ),
  7180. 'cvterm' => array(
  7181. 'table' => 'cvterm',
  7182. 'columns' => array(
  7183. 'type_id' => 'cvterm_id',
  7184. ),
  7185. ),
  7186. ),
  7187. 'referring_tables' => array(
  7188. 0 => 'cell_line_library',
  7189. 1 => 'library_cvterm',
  7190. 2 => 'library_dbxref',
  7191. 3 => 'library_feature',
  7192. 4 => 'library_pub',
  7193. 5 => 'library_synonym',
  7194. 6 => 'libraryprop',
  7195. ),
  7196. 'table' => 'library',
  7197. );
  7198. return $description;
  7199. }
  7200. /**
  7201. * Implements hook_chado_schema_v1_2_library_cvterm()
  7202. * Purpose: To describe the structure of 'library_cvterm' to tripal
  7203. * @see chado_insert_record()
  7204. * @see chado_update_record()
  7205. * @see chado_select_record()
  7206. *
  7207. * @return
  7208. * An array describing the 'library_cvterm' table
  7209. *
  7210. * @ingroup tripal_chado_v1.2_schema_api
  7211. *
  7212. */
  7213. function tripal_chado_chado_schema_v1_2_library_cvterm() {
  7214. $description = array(
  7215. 'description' => '',
  7216. 'fields' => array(
  7217. 'library_cvterm_id' => array(
  7218. 'description' => '',
  7219. 'type' => 'serial',
  7220. 'not null' => TRUE,
  7221. ),
  7222. 'library_id' => array(
  7223. 'description' => '',
  7224. 'type' => 'int',
  7225. 'not null' => TRUE,
  7226. ),
  7227. 'cvterm_id' => array(
  7228. 'description' => '',
  7229. 'type' => 'int',
  7230. 'not null' => TRUE,
  7231. ),
  7232. 'pub_id' => array(
  7233. 'description' => '',
  7234. 'type' => 'int',
  7235. 'not null' => TRUE,
  7236. ),
  7237. ),
  7238. 'primary key' => array(
  7239. 0 => 'library_cvterm_id',
  7240. ),
  7241. 'unique keys' => array(
  7242. 'library_cvterm_c1' => array(
  7243. 0 => 'library_id',
  7244. 1 => 'cvterm_id',
  7245. 2 => 'pub_id',
  7246. ),
  7247. ),
  7248. 'indexes' => array(
  7249. 'library_cvterm_idx1' => array(
  7250. 0 => 'library_id',
  7251. ),
  7252. 'library_cvterm_idx2' => array(
  7253. 0 => 'cvterm_id',
  7254. ),
  7255. 'library_cvterm_idx3' => array(
  7256. 0 => 'pub_id',
  7257. ),
  7258. ),
  7259. 'foreign keys' => array(
  7260. 'cvterm' => array(
  7261. 'table' => 'cvterm',
  7262. 'columns' => array(
  7263. 'cvterm_id' => 'cvterm_id',
  7264. ),
  7265. ),
  7266. 'pub' => array(
  7267. 'table' => 'pub',
  7268. 'columns' => array(
  7269. 'pub_id' => 'pub_id',
  7270. ),
  7271. ),
  7272. 'library' => array(
  7273. 'table' => 'library',
  7274. 'columns' => array(
  7275. 'library_id' => 'library_id',
  7276. ),
  7277. ),
  7278. ),
  7279. 'table' => 'library_cvterm',
  7280. 'referring_tables' => NULL,
  7281. );
  7282. return $description;
  7283. }
  7284. /**
  7285. * Implements hook_chado_schema_v1_2_library_dbxref()
  7286. * Purpose: To describe the structure of 'library_dbxref' to tripal
  7287. * @see chado_insert_record()
  7288. * @see chado_update_record()
  7289. * @see chado_select_record()
  7290. *
  7291. * @return
  7292. * An array describing the 'library_dbxref' table
  7293. *
  7294. * @ingroup tripal_chado_v1.2_schema_api
  7295. *
  7296. */
  7297. function tripal_chado_chado_schema_v1_2_library_dbxref() {
  7298. $description = array(
  7299. 'description' => '',
  7300. 'fields' => array(
  7301. 'library_dbxref_id' => array(
  7302. 'description' => '',
  7303. 'type' => 'serial',
  7304. 'not null' => TRUE,
  7305. ),
  7306. 'library_id' => array(
  7307. 'description' => '',
  7308. 'type' => 'int',
  7309. 'not null' => TRUE,
  7310. ),
  7311. 'dbxref_id' => array(
  7312. 'description' => '',
  7313. 'type' => 'int',
  7314. 'not null' => TRUE,
  7315. ),
  7316. 'is_current' => array(
  7317. 'description' => '',
  7318. 'type' => 'boolean',
  7319. 'not null' => TRUE,
  7320. 'default' => 'true',
  7321. ),
  7322. ),
  7323. 'primary key' => array(
  7324. 0 => 'library_dbxref_id',
  7325. ),
  7326. 'unique keys' => array(
  7327. 'library_dbxref_c1' => array(
  7328. 0 => 'library_id',
  7329. 1 => 'dbxref_id',
  7330. ),
  7331. ),
  7332. 'indexes' => array(
  7333. 'library_dbxref_idx1' => array(
  7334. 0 => 'library_id',
  7335. ),
  7336. 'library_dbxref_idx2' => array(
  7337. 0 => 'dbxref_id',
  7338. ),
  7339. ),
  7340. 'foreign keys' => array(
  7341. 'dbxref' => array(
  7342. 'table' => 'dbxref',
  7343. 'columns' => array(
  7344. 'dbxref_id' => 'dbxref_id',
  7345. ),
  7346. ),
  7347. 'library' => array(
  7348. 'table' => 'library',
  7349. 'columns' => array(
  7350. 'library_id' => 'library_id',
  7351. ),
  7352. ),
  7353. ),
  7354. 'table' => 'library_dbxref',
  7355. 'referring_tables' => NULL,
  7356. );
  7357. return $description;
  7358. }
  7359. /**
  7360. * Implements hook_chado_schema_v1_2_library_feature()
  7361. * Purpose: To describe the structure of 'library_feature' to tripal
  7362. * @see chado_insert_record()
  7363. * @see chado_update_record()
  7364. * @see chado_select_record()
  7365. *
  7366. * @return
  7367. * An array describing the 'library_feature' table
  7368. *
  7369. * @ingroup tripal_chado_v1.2_schema_api
  7370. *
  7371. */
  7372. function tripal_chado_chado_schema_v1_2_library_feature() {
  7373. $description = array(
  7374. 'description' => '',
  7375. 'fields' => array(
  7376. 'library_feature_id' => array(
  7377. 'description' => '',
  7378. 'type' => 'serial',
  7379. 'not null' => TRUE,
  7380. ),
  7381. 'library_id' => array(
  7382. 'description' => '',
  7383. 'type' => 'int',
  7384. 'not null' => TRUE,
  7385. ),
  7386. 'feature_id' => array(
  7387. 'description' => '',
  7388. 'type' => 'int',
  7389. 'not null' => TRUE,
  7390. ),
  7391. ),
  7392. 'primary key' => array(
  7393. 0 => 'library_feature_id',
  7394. ),
  7395. 'unique keys' => array(
  7396. 'library_feature_c1' => array(
  7397. 0 => 'library_id',
  7398. 1 => 'feature_id',
  7399. ),
  7400. ),
  7401. 'indexes' => array(
  7402. 'library_feature_idx1' => array(
  7403. 0 => 'library_id',
  7404. ),
  7405. 'library_feature_idx2' => array(
  7406. 0 => 'feature_id',
  7407. ),
  7408. ),
  7409. 'foreign keys' => array(
  7410. 'feature' => array(
  7411. 'table' => 'feature',
  7412. 'columns' => array(
  7413. 'feature_id' => 'feature_id',
  7414. ),
  7415. ),
  7416. 'library' => array(
  7417. 'table' => 'library',
  7418. 'columns' => array(
  7419. 'library_id' => 'library_id',
  7420. ),
  7421. ),
  7422. ),
  7423. 'table' => 'library_feature',
  7424. 'referring_tables' => NULL,
  7425. );
  7426. return $description;
  7427. }
  7428. /**
  7429. * Implements hook_chado_schema_v1_2_library_pub()
  7430. * Purpose: To describe the structure of 'library_pub' to tripal
  7431. * @see chado_insert_record()
  7432. * @see chado_update_record()
  7433. * @see chado_select_record()
  7434. *
  7435. * @return
  7436. * An array describing the 'library_pub' table
  7437. *
  7438. * @ingroup tripal_chado_v1.2_schema_api
  7439. *
  7440. */
  7441. function tripal_chado_chado_schema_v1_2_library_pub() {
  7442. $description = array(
  7443. 'description' => '',
  7444. 'fields' => array(
  7445. 'library_pub_id' => array(
  7446. 'description' => '',
  7447. 'type' => 'serial',
  7448. 'not null' => TRUE,
  7449. ),
  7450. 'library_id' => array(
  7451. 'description' => '',
  7452. 'type' => 'int',
  7453. 'not null' => TRUE,
  7454. ),
  7455. 'pub_id' => array(
  7456. 'description' => '',
  7457. 'type' => 'int',
  7458. 'not null' => TRUE,
  7459. ),
  7460. ),
  7461. 'primary key' => array(
  7462. 0 => 'library_pub_id',
  7463. ),
  7464. 'unique keys' => array(
  7465. 'library_pub_c1' => array(
  7466. 0 => 'library_id',
  7467. 1 => 'pub_id',
  7468. ),
  7469. ),
  7470. 'indexes' => array(
  7471. 'library_pub_idx1' => array(
  7472. 0 => 'library_id',
  7473. ),
  7474. 'library_pub_idx2' => array(
  7475. 0 => 'pub_id',
  7476. ),
  7477. ),
  7478. 'foreign keys' => array(
  7479. 'pub' => array(
  7480. 'table' => 'pub',
  7481. 'columns' => array(
  7482. 'pub_id' => 'pub_id',
  7483. ),
  7484. ),
  7485. 'library' => array(
  7486. 'table' => 'library',
  7487. 'columns' => array(
  7488. 'library_id' => 'library_id',
  7489. ),
  7490. ),
  7491. ),
  7492. 'table' => 'library_pub',
  7493. 'referring_tables' => NULL,
  7494. );
  7495. return $description;
  7496. }
  7497. /**
  7498. * Implements hook_chado_schema_v1_2_library_synonym()
  7499. * Purpose: To describe the structure of 'library_synonym' to tripal
  7500. * @see chado_insert_record()
  7501. * @see chado_update_record()
  7502. * @see chado_select_record()
  7503. *
  7504. * @return
  7505. * An array describing the 'library_synonym' table
  7506. *
  7507. * @ingroup tripal_chado_v1.2_schema_api
  7508. *
  7509. */
  7510. function tripal_chado_chado_schema_v1_2_library_synonym() {
  7511. $description = array(
  7512. 'description' => '',
  7513. 'fields' => array(
  7514. 'library_synonym_id' => array(
  7515. 'description' => '',
  7516. 'type' => 'serial',
  7517. 'not null' => TRUE,
  7518. ),
  7519. 'synonym_id' => array(
  7520. 'description' => '',
  7521. 'type' => 'int',
  7522. 'not null' => TRUE,
  7523. ),
  7524. 'library_id' => array(
  7525. 'description' => '',
  7526. 'type' => 'int',
  7527. 'not null' => TRUE,
  7528. ),
  7529. 'pub_id' => array(
  7530. 'description' => '',
  7531. 'type' => 'int',
  7532. 'not null' => TRUE,
  7533. ),
  7534. 'is_current' => array(
  7535. 'description' => '',
  7536. 'type' => 'boolean',
  7537. 'not null' => TRUE,
  7538. 'default' => 'true',
  7539. ),
  7540. 'is_internal' => array(
  7541. 'description' => '',
  7542. 'type' => 'boolean',
  7543. 'not null' => TRUE,
  7544. 'default' => 'false',
  7545. ),
  7546. ),
  7547. 'primary key' => array(
  7548. 0 => 'library_synonym_id',
  7549. ),
  7550. 'unique keys' => array(
  7551. 'library_synonym_c1' => array(
  7552. 0 => 'synonym_id',
  7553. 1 => 'library_id',
  7554. 2 => 'pub_id',
  7555. ),
  7556. ),
  7557. 'indexes' => array(
  7558. 'library_synonym_idx1' => array(
  7559. 0 => 'synonym_id',
  7560. ),
  7561. 'library_synonym_idx2' => array(
  7562. 0 => 'library_id',
  7563. ),
  7564. 'library_synonym_idx3' => array(
  7565. 0 => 'pub_id',
  7566. ),
  7567. ),
  7568. 'foreign keys' => array(
  7569. 'pub' => array(
  7570. 'table' => 'pub',
  7571. 'columns' => array(
  7572. 'pub_id' => 'pub_id',
  7573. ),
  7574. ),
  7575. 'synonym' => array(
  7576. 'table' => 'synonym',
  7577. 'columns' => array(
  7578. 'synonym_id' => 'synonym_id',
  7579. ),
  7580. ),
  7581. 'library' => array(
  7582. 'table' => 'library',
  7583. 'columns' => array(
  7584. 'library_id' => 'library_id',
  7585. ),
  7586. ),
  7587. ),
  7588. 'table' => 'library_synonym',
  7589. 'referring_tables' => NULL,
  7590. );
  7591. return $description;
  7592. }
  7593. /**
  7594. * Implements hook_chado_schema_v1_2_libraryprop()
  7595. * Purpose: To describe the structure of 'libraryprop' to tripal
  7596. * @see chado_insert_record()
  7597. * @see chado_update_record()
  7598. * @see chado_select_record()
  7599. *
  7600. * @return
  7601. * An array describing the 'libraryprop' table
  7602. *
  7603. * @ingroup tripal_chado_v1.2_schema_api
  7604. *
  7605. */
  7606. function tripal_chado_chado_schema_v1_2_libraryprop() {
  7607. $description = array(
  7608. 'description' => '',
  7609. 'fields' => array(
  7610. 'libraryprop_id' => array(
  7611. 'description' => '',
  7612. 'type' => 'serial',
  7613. 'not null' => TRUE,
  7614. ),
  7615. 'library_id' => array(
  7616. 'description' => '',
  7617. 'type' => 'int',
  7618. 'not null' => TRUE,
  7619. ),
  7620. 'type_id' => array(
  7621. 'description' => '',
  7622. 'type' => 'int',
  7623. 'not null' => TRUE,
  7624. ),
  7625. 'value' => array(
  7626. 'description' => '',
  7627. 'type' => 'text',
  7628. 'not null' => FALSE,
  7629. ),
  7630. 'rank' => array(
  7631. 'description' => '',
  7632. 'type' => 'int',
  7633. 'not null' => TRUE,
  7634. 'default' => 0,
  7635. ),
  7636. ),
  7637. 'primary key' => array(
  7638. 0 => 'libraryprop_id',
  7639. ),
  7640. 'unique keys' => array(
  7641. 'libraryprop_c1' => array(
  7642. 0 => 'library_id',
  7643. 1 => 'type_id',
  7644. 2 => 'rank',
  7645. ),
  7646. ),
  7647. 'indexes' => array(
  7648. 'libraryprop_idx1' => array(
  7649. 0 => 'library_id',
  7650. ),
  7651. 'libraryprop_idx2' => array(
  7652. 0 => 'type_id',
  7653. ),
  7654. ),
  7655. 'foreign keys' => array(
  7656. 'cvterm' => array(
  7657. 'table' => 'cvterm',
  7658. 'columns' => array(
  7659. 'type_id' => 'cvterm_id',
  7660. ),
  7661. ),
  7662. 'library' => array(
  7663. 'table' => 'library',
  7664. 'columns' => array(
  7665. 'library_id' => 'library_id',
  7666. ),
  7667. ),
  7668. ),
  7669. 'table' => 'libraryprop',
  7670. 'referring_tables' => array(
  7671. 0 => 'libraryprop_pub',
  7672. ),
  7673. );
  7674. return $description;
  7675. }
  7676. /**
  7677. * Implements hook_chado_schema_v1_2_libraryprop_pub()
  7678. * Purpose: To describe the structure of 'libraryprop_pub' to tripal
  7679. * @see chado_insert_record()
  7680. * @see chado_update_record()
  7681. * @see chado_select_record()
  7682. *
  7683. * @return
  7684. * An array describing the 'libraryprop_pub' table
  7685. *
  7686. * @ingroup tripal_chado_v1.2_schema_api
  7687. *
  7688. */
  7689. function tripal_chado_chado_schema_v1_2_libraryprop_pub() {
  7690. $description = array(
  7691. 'description' => '',
  7692. 'fields' => array(
  7693. 'libraryprop_pub_id' => array(
  7694. 'description' => '',
  7695. 'type' => 'serial',
  7696. 'not null' => TRUE,
  7697. ),
  7698. 'libraryprop_id' => array(
  7699. 'description' => '',
  7700. 'type' => 'int',
  7701. 'not null' => TRUE,
  7702. ),
  7703. 'pub_id' => array(
  7704. 'description' => '',
  7705. 'type' => 'int',
  7706. 'not null' => TRUE,
  7707. ),
  7708. ),
  7709. 'primary key' => array(
  7710. 0 => 'libraryprop_pub_id',
  7711. ),
  7712. 'unique keys' => array(
  7713. 'libraryprop_pub_c1' => array(
  7714. 0 => 'libraryprop_id',
  7715. 1 => 'pub_id',
  7716. ),
  7717. ),
  7718. 'indexes' => array(
  7719. 'libraryprop_pub_idx1' => array(
  7720. 0 => 'libraryprop_id',
  7721. ),
  7722. 'libraryprop_pub_idx2' => array(
  7723. 0 => 'pub_id',
  7724. ),
  7725. ),
  7726. 'foreign keys' => array(
  7727. 'pub' => array(
  7728. 'table' => 'pub',
  7729. 'columns' => array(
  7730. 'pub_id' => 'pub_id',
  7731. ),
  7732. ),
  7733. 'libraryprop' => array(
  7734. 'table' => 'libraryprop',
  7735. 'columns' => array(
  7736. 'libraryprop_id' => 'libraryprop_id',
  7737. ),
  7738. ),
  7739. ),
  7740. 'table' => 'libraryprop_pub',
  7741. 'referring_tables' => NULL,
  7742. );
  7743. return $description;
  7744. }
  7745. /**
  7746. * Implements hook_chado_schema_v1_2_magedocumentation()
  7747. * Purpose: To describe the structure of 'magedocumentation' to tripal
  7748. * @see chado_insert_record()
  7749. * @see chado_update_record()
  7750. * @see chado_select_record()
  7751. *
  7752. * @return
  7753. * An array describing the 'magedocumentation' table
  7754. *
  7755. * @ingroup tripal_chado_v1.2_schema_api
  7756. *
  7757. */
  7758. function tripal_chado_chado_schema_v1_2_magedocumentation() {
  7759. $description = array(
  7760. 'description' => '',
  7761. 'fields' => array(
  7762. 'magedocumentation_id' => array(
  7763. 'description' => '',
  7764. 'type' => 'serial',
  7765. 'not null' => TRUE,
  7766. ),
  7767. 'mageml_id' => array(
  7768. 'description' => '',
  7769. 'type' => 'int',
  7770. 'not null' => TRUE,
  7771. ),
  7772. 'tableinfo_id' => array(
  7773. 'description' => '',
  7774. 'type' => 'int',
  7775. 'not null' => TRUE,
  7776. ),
  7777. 'row_id' => array(
  7778. 'description' => '',
  7779. 'type' => 'int',
  7780. 'not null' => TRUE,
  7781. ),
  7782. 'mageidentifier' => array(
  7783. 'description' => '',
  7784. 'type' => 'text',
  7785. 'not null' => TRUE,
  7786. ),
  7787. ),
  7788. 'primary key' => array(
  7789. 0 => 'magedocumentation_id',
  7790. ),
  7791. 'unique keys' => array(),
  7792. 'indexes' => array(
  7793. 'magedocumentation_idx1' => array(
  7794. 0 => 'mageml_id',
  7795. ),
  7796. 'magedocumentation_idx2' => array(
  7797. 0 => 'tableinfo_id',
  7798. ),
  7799. 'magedocumentation_idx3' => array(
  7800. 0 => 'row_id',
  7801. ),
  7802. ),
  7803. 'foreign keys' => array(
  7804. 'tableinfo' => array(
  7805. 'table' => 'tableinfo',
  7806. 'columns' => array(
  7807. 'tableinfo_id' => 'tableinfo_id',
  7808. ),
  7809. ),
  7810. 'mageml' => array(
  7811. 'table' => 'mageml',
  7812. 'columns' => array(
  7813. 'mageml_id' => 'mageml_id',
  7814. ),
  7815. ),
  7816. ),
  7817. 'table' => 'magedocumentation',
  7818. 'referring_tables' => NULL,
  7819. );
  7820. return $description;
  7821. }
  7822. /**
  7823. * Implements hook_chado_schema_v1_2_mageml()
  7824. * Purpose: To describe the structure of 'mageml' to tripal
  7825. * @see chado_insert_record()
  7826. * @see chado_update_record()
  7827. * @see chado_select_record()
  7828. *
  7829. * @return
  7830. * An array describing the 'mageml' table
  7831. *
  7832. * @ingroup tripal_chado_v1.2_schema_api
  7833. *
  7834. */
  7835. function tripal_chado_chado_schema_v1_2_mageml() {
  7836. $description = array(
  7837. 'description' => '',
  7838. 'fields' => array(
  7839. 'mageml_id' => array(
  7840. 'description' => '',
  7841. 'type' => 'serial',
  7842. 'not null' => TRUE,
  7843. ),
  7844. 'mage_package' => array(
  7845. 'description' => '',
  7846. 'type' => 'text',
  7847. 'not null' => TRUE,
  7848. ),
  7849. 'mage_ml' => array(
  7850. 'description' => '',
  7851. 'type' => 'text',
  7852. 'not null' => TRUE,
  7853. ),
  7854. ),
  7855. 'primary key' => array(
  7856. 0 => 'mageml_id',
  7857. ),
  7858. 'unique keys' => array(),
  7859. 'foreign keys' => array(
  7860. ),
  7861. 'table' => 'mageml',
  7862. 'referring_tables' => array(
  7863. 0 => 'magedocumentation',
  7864. ),
  7865. );
  7866. return $description;
  7867. }
  7868. /**
  7869. * Implements hook_chado_schema_v1_2_nd_experiment()
  7870. * Purpose: To describe the structure of 'nd_experiment' to tripal
  7871. * @see chado_insert_record()
  7872. * @see chado_update_record()
  7873. * @see chado_select_record()
  7874. *
  7875. * @return
  7876. * An array describing the 'nd_experiment' table
  7877. *
  7878. * @ingroup tripal_chado_v1.2_schema_api
  7879. *
  7880. */
  7881. function tripal_chado_chado_schema_v1_2_nd_experiment() {
  7882. $description = array(
  7883. 'description' => '',
  7884. 'fields' => array(
  7885. 'nd_experiment_id' => array(
  7886. 'description' => '',
  7887. 'type' => 'serial',
  7888. 'not null' => TRUE,
  7889. ),
  7890. 'nd_geolocation_id' => array(
  7891. 'description' => '',
  7892. 'type' => 'int',
  7893. 'not null' => TRUE,
  7894. ),
  7895. 'type_id' => array(
  7896. 'description' => '',
  7897. 'type' => 'int',
  7898. 'not null' => TRUE,
  7899. ),
  7900. ),
  7901. 'primary key' => array(
  7902. 0 => 'nd_experiment_id',
  7903. ),
  7904. 'unique keys' => array(),
  7905. 'foreign keys' => array(
  7906. 'cvterm' => array(
  7907. 'table' => 'cvterm',
  7908. 'columns' => array(
  7909. 'type_id' => 'cvterm_id',
  7910. ),
  7911. ),
  7912. 'nd_geolocation' => array(
  7913. 'table' => 'nd_geolocation',
  7914. 'columns' => array(
  7915. 'nd_geolocation_id' => 'nd_geolocation_id',
  7916. ),
  7917. ),
  7918. ),
  7919. 'table' => 'nd_experiment',
  7920. 'referring_tables' => array(
  7921. 0 => 'nd_experiment_contact',
  7922. 1 => 'nd_experiment_dbxref',
  7923. 2 => 'nd_experiment_genotype',
  7924. 3 => 'nd_experiment_phenotype',
  7925. 4 => 'nd_experiment_project',
  7926. 5 => 'nd_experiment_protocol',
  7927. 6 => 'nd_experiment_pub',
  7928. 7 => 'nd_experiment_stock',
  7929. 8 => 'nd_experimentprop',
  7930. ),
  7931. );
  7932. return $description;
  7933. }
  7934. /**
  7935. * Implements hook_chado_schema_v1_2_nd_experiment_contact()
  7936. * Purpose: To describe the structure of 'nd_experiment_contact' to tripal
  7937. * @see chado_insert_record()
  7938. * @see chado_update_record()
  7939. * @see chado_select_record()
  7940. *
  7941. * @return
  7942. * An array describing the 'nd_experiment_contact' table
  7943. *
  7944. * @ingroup tripal_chado_v1.2_schema_api
  7945. *
  7946. */
  7947. function tripal_chado_chado_schema_v1_2_nd_experiment_contact() {
  7948. $description = array(
  7949. 'description' => '',
  7950. 'fields' => array(
  7951. 'nd_experiment_contact_id' => array(
  7952. 'description' => '',
  7953. 'type' => 'serial',
  7954. 'not null' => TRUE,
  7955. ),
  7956. 'nd_experiment_id' => array(
  7957. 'description' => '',
  7958. 'type' => 'int',
  7959. 'not null' => TRUE,
  7960. ),
  7961. 'contact_id' => array(
  7962. 'description' => '',
  7963. 'type' => 'int',
  7964. 'not null' => TRUE,
  7965. ),
  7966. ),
  7967. 'primary key' => array(
  7968. 0 => 'nd_experiment_contact_id',
  7969. ),
  7970. 'unique keys' => array(),
  7971. 'foreign keys' => array(
  7972. 'contact' => array(
  7973. 'table' => 'contact',
  7974. 'columns' => array(
  7975. 'contact_id' => 'contact_id',
  7976. ),
  7977. ),
  7978. 'nd_experiment' => array(
  7979. 'table' => 'nd_experiment',
  7980. 'columns' => array(
  7981. 'nd_experiment_id' => 'nd_experiment_id',
  7982. ),
  7983. ),
  7984. ),
  7985. 'table' => 'nd_experiment_contact',
  7986. 'referring_tables' => NULL,
  7987. );
  7988. return $description;
  7989. }
  7990. /**
  7991. * Implements hook_chado_schema_v1_2_nd_experiment_dbxref()
  7992. * Purpose: To describe the structure of 'nd_experiment_dbxref' to tripal
  7993. * @see chado_insert_record()
  7994. * @see chado_update_record()
  7995. * @see chado_select_record()
  7996. *
  7997. * @return
  7998. * An array describing the 'nd_experiment_dbxref' table
  7999. *
  8000. * @ingroup tripal_chado_v1.2_schema_api
  8001. *
  8002. */
  8003. function tripal_chado_chado_schema_v1_2_nd_experiment_dbxref() {
  8004. $description = array(
  8005. 'description' => '',
  8006. 'fields' => array(
  8007. 'nd_experiment_dbxref_id' => array(
  8008. 'description' => '',
  8009. 'type' => 'serial',
  8010. 'not null' => TRUE,
  8011. ),
  8012. 'nd_experiment_id' => array(
  8013. 'description' => '',
  8014. 'type' => 'int',
  8015. 'not null' => TRUE,
  8016. ),
  8017. 'dbxref_id' => array(
  8018. 'description' => '',
  8019. 'type' => 'int',
  8020. 'not null' => TRUE,
  8021. ),
  8022. ),
  8023. 'primary key' => array(
  8024. 0 => 'nd_experiment_dbxref_id',
  8025. ),
  8026. 'unique keys' => array(),
  8027. 'foreign keys' => array(
  8028. 'dbxref' => array(
  8029. 'table' => 'dbxref',
  8030. 'columns' => array(
  8031. 'dbxref_id' => 'dbxref_id',
  8032. ),
  8033. ),
  8034. 'nd_experiment' => array(
  8035. 'table' => 'nd_experiment',
  8036. 'columns' => array(
  8037. 'nd_experiment_id' => 'nd_experiment_id',
  8038. ),
  8039. ),
  8040. ),
  8041. 'table' => 'nd_experiment_dbxref',
  8042. 'referring_tables' => NULL,
  8043. );
  8044. return $description;
  8045. }
  8046. /**
  8047. * Implements hook_chado_schema_v1_2_nd_experiment_genotype()
  8048. * Purpose: To describe the structure of 'nd_experiment_genotype' to tripal
  8049. * @see chado_insert_record()
  8050. * @see chado_update_record()
  8051. * @see chado_select_record()
  8052. *
  8053. * @return
  8054. * An array describing the 'nd_experiment_genotype' table
  8055. *
  8056. * @ingroup tripal_chado_v1.2_schema_api
  8057. *
  8058. */
  8059. function tripal_chado_chado_schema_v1_2_nd_experiment_genotype() {
  8060. $description = array(
  8061. 'description' => '',
  8062. 'fields' => array(
  8063. 'nd_experiment_genotype_id' => array(
  8064. 'description' => '',
  8065. 'type' => 'serial',
  8066. 'not null' => TRUE,
  8067. ),
  8068. 'nd_experiment_id' => array(
  8069. 'description' => '',
  8070. 'type' => 'int',
  8071. 'not null' => TRUE,
  8072. ),
  8073. 'genotype_id' => array(
  8074. 'description' => '',
  8075. 'type' => 'int',
  8076. 'not null' => TRUE,
  8077. ),
  8078. ),
  8079. 'primary key' => array(
  8080. 0 => 'nd_experiment_genotype_id',
  8081. ),
  8082. 'unique keys' => array(
  8083. 'nd_experiment_genotype_c1' => array(
  8084. 0 => 'nd_experiment_id',
  8085. 1 => 'genotype_id',
  8086. ),
  8087. ),
  8088. 'foreign keys' => array(
  8089. 'genotype' => array(
  8090. 'table' => 'genotype',
  8091. 'columns' => array(
  8092. 'genotype_id' => 'genotype_id',
  8093. ),
  8094. ),
  8095. 'nd_experiment' => array(
  8096. 'table' => 'nd_experiment',
  8097. 'columns' => array(
  8098. 'nd_experiment_id' => 'nd_experiment_id',
  8099. ),
  8100. ),
  8101. ),
  8102. 'table' => 'nd_experiment_genotype',
  8103. 'referring_tables' => NULL,
  8104. );
  8105. return $description;
  8106. }
  8107. /**
  8108. * Implements hook_chado_schema_v1_2_nd_experiment_phenotype()
  8109. * Purpose: To describe the structure of 'nd_experiment_phenotype' to tripal
  8110. * @see chado_insert_record()
  8111. * @see chado_update_record()
  8112. * @see chado_select_record()
  8113. *
  8114. * @return
  8115. * An array describing the 'nd_experiment_phenotype' table
  8116. *
  8117. * @ingroup tripal_chado_v1.2_schema_api
  8118. *
  8119. */
  8120. function tripal_chado_chado_schema_v1_2_nd_experiment_phenotype() {
  8121. $description = array(
  8122. 'description' => '',
  8123. 'fields' => array(
  8124. 'nd_experiment_phenotype_id' => array(
  8125. 'description' => '',
  8126. 'type' => 'serial',
  8127. 'not null' => TRUE,
  8128. ),
  8129. 'nd_experiment_id' => array(
  8130. 'description' => '',
  8131. 'type' => 'int',
  8132. 'not null' => TRUE,
  8133. ),
  8134. 'phenotype_id' => array(
  8135. 'description' => '',
  8136. 'type' => 'int',
  8137. 'not null' => TRUE,
  8138. ),
  8139. ),
  8140. 'primary key' => array(
  8141. 0 => 'nd_experiment_phenotype_id',
  8142. ),
  8143. 'unique keys' => array(
  8144. 'nd_experiment_phenotype_c1' => array(
  8145. 0 => 'nd_experiment_id',
  8146. 1 => 'phenotype_id',
  8147. ),
  8148. ),
  8149. 'foreign keys' => array(
  8150. 'phenotype' => array(
  8151. 'table' => 'phenotype',
  8152. 'columns' => array(
  8153. 'phenotype_id' => 'phenotype_id',
  8154. ),
  8155. ),
  8156. 'nd_experiment' => array(
  8157. 'table' => 'nd_experiment',
  8158. 'columns' => array(
  8159. 'nd_experiment_id' => 'nd_experiment_id',
  8160. ),
  8161. ),
  8162. ),
  8163. 'table' => 'nd_experiment_phenotype',
  8164. 'referring_tables' => NULL,
  8165. );
  8166. return $description;
  8167. }
  8168. /**
  8169. * Implements hook_chado_schema_v1_2_nd_experiment_project()
  8170. * Purpose: To describe the structure of 'nd_experiment_project' to tripal
  8171. * @see chado_insert_record()
  8172. * @see chado_update_record()
  8173. * @see chado_select_record()
  8174. *
  8175. * @return
  8176. * An array describing the 'nd_experiment_project' table
  8177. *
  8178. * @ingroup tripal_chado_v1.2_schema_api
  8179. *
  8180. */
  8181. function tripal_chado_chado_schema_v1_2_nd_experiment_project() {
  8182. $description = array(
  8183. 'description' => '',
  8184. 'fields' => array(
  8185. 'nd_experiment_project_id' => array(
  8186. 'description' => '',
  8187. 'type' => 'serial',
  8188. 'not null' => TRUE,
  8189. ),
  8190. 'project_id' => array(
  8191. 'description' => '',
  8192. 'type' => 'int',
  8193. 'not null' => TRUE,
  8194. ),
  8195. 'nd_experiment_id' => array(
  8196. 'description' => '',
  8197. 'type' => 'int',
  8198. 'not null' => TRUE,
  8199. ),
  8200. ),
  8201. 'primary key' => array(
  8202. 0 => 'nd_experiment_project_id',
  8203. ),
  8204. 'unique keys' => array(),
  8205. 'foreign keys' => array(
  8206. 'project' => array(
  8207. 'table' => 'project',
  8208. 'columns' => array(
  8209. 'project_id' => 'project_id',
  8210. ),
  8211. ),
  8212. 'nd_experiment' => array(
  8213. 'table' => 'nd_experiment',
  8214. 'columns' => array(
  8215. 'nd_experiment_id' => 'nd_experiment_id',
  8216. ),
  8217. ),
  8218. ),
  8219. 'table' => 'nd_experiment_project',
  8220. 'referring_tables' => NULL,
  8221. );
  8222. return $description;
  8223. }
  8224. /**
  8225. * Implements hook_chado_schema_v1_2_nd_experiment_protocol()
  8226. * Purpose: To describe the structure of 'nd_experiment_protocol' to tripal
  8227. * @see chado_insert_record()
  8228. * @see chado_update_record()
  8229. * @see chado_select_record()
  8230. *
  8231. * @return
  8232. * An array describing the 'nd_experiment_protocol' table
  8233. *
  8234. * @ingroup tripal_chado_v1.2_schema_api
  8235. *
  8236. */
  8237. function tripal_chado_chado_schema_v1_2_nd_experiment_protocol() {
  8238. $description = array(
  8239. 'description' => '',
  8240. 'fields' => array(
  8241. 'nd_experiment_protocol_id' => array(
  8242. 'description' => '',
  8243. 'type' => 'serial',
  8244. 'not null' => TRUE,
  8245. ),
  8246. 'nd_experiment_id' => array(
  8247. 'description' => '',
  8248. 'type' => 'int',
  8249. 'not null' => TRUE,
  8250. ),
  8251. 'nd_protocol_id' => array(
  8252. 'description' => '',
  8253. 'type' => 'int',
  8254. 'not null' => TRUE,
  8255. ),
  8256. ),
  8257. 'primary key' => array(
  8258. 0 => 'nd_experiment_protocol_id',
  8259. ),
  8260. 'unique keys' => array(),
  8261. 'foreign keys' => array(
  8262. 'nd_experiment' => array(
  8263. 'table' => 'nd_experiment',
  8264. 'columns' => array(
  8265. 'nd_experiment_id' => 'nd_experiment_id',
  8266. ),
  8267. ),
  8268. 'nd_protocol' => array(
  8269. 'table' => 'nd_protocol',
  8270. 'columns' => array(
  8271. 'nd_protocol_id' => 'nd_protocol_id',
  8272. ),
  8273. ),
  8274. ),
  8275. 'table' => 'nd_experiment_protocol',
  8276. 'referring_tables' => NULL,
  8277. );
  8278. return $description;
  8279. }
  8280. /**
  8281. * Implements hook_chado_schema_v1_2_nd_experiment_pub()
  8282. * Purpose: To describe the structure of 'nd_experiment_pub' to tripal
  8283. * @see chado_insert_record()
  8284. * @see chado_update_record()
  8285. * @see chado_select_record()
  8286. *
  8287. * @return
  8288. * An array describing the 'nd_experiment_pub' table
  8289. *
  8290. * @ingroup tripal_chado_v1.2_schema_api
  8291. *
  8292. */
  8293. function tripal_chado_chado_schema_v1_2_nd_experiment_pub() {
  8294. $description = array(
  8295. 'description' => '',
  8296. 'fields' => array(
  8297. 'nd_experiment_pub_id' => array(
  8298. 'description' => '',
  8299. 'type' => 'serial',
  8300. 'not null' => TRUE,
  8301. ),
  8302. 'nd_experiment_id' => array(
  8303. 'description' => '',
  8304. 'type' => 'int',
  8305. 'not null' => TRUE,
  8306. ),
  8307. 'pub_id' => array(
  8308. 'description' => '',
  8309. 'type' => 'int',
  8310. 'not null' => TRUE,
  8311. ),
  8312. ),
  8313. 'primary key' => array(
  8314. 0 => 'nd_experiment_pub_id',
  8315. ),
  8316. 'unique keys' => array(
  8317. 'nd_experiment_pub_c1' => array(
  8318. 0 => 'nd_experiment_id',
  8319. 1 => 'pub_id',
  8320. ),
  8321. ),
  8322. 'indexes' => array(
  8323. 'nd_experiment_pub_idx1' => array(
  8324. 0 => 'nd_experiment_id',
  8325. ),
  8326. 'nd_experiment_pub_idx2' => array(
  8327. 0 => 'pub_id',
  8328. ),
  8329. ),
  8330. 'foreign keys' => array(
  8331. 'pub' => array(
  8332. 'table' => 'pub',
  8333. 'columns' => array(
  8334. 'pub_id' => 'pub_id',
  8335. ),
  8336. ),
  8337. 'nd_experiment' => array(
  8338. 'table' => 'nd_experiment',
  8339. 'columns' => array(
  8340. 'nd_experiment_id' => 'nd_experiment_id',
  8341. ),
  8342. ),
  8343. ),
  8344. 'table' => 'nd_experiment_pub',
  8345. 'referring_tables' => NULL,
  8346. );
  8347. return $description;
  8348. }
  8349. /**
  8350. * Implements hook_chado_schema_v1_2_nd_experiment_stock()
  8351. * Purpose: To describe the structure of 'nd_experiment_stock' to tripal
  8352. * @see chado_insert_record()
  8353. * @see chado_update_record()
  8354. * @see chado_select_record()
  8355. *
  8356. * @return
  8357. * An array describing the 'nd_experiment_stock' table
  8358. *
  8359. * @ingroup tripal_chado_v1.2_schema_api
  8360. *
  8361. */
  8362. function tripal_chado_chado_schema_v1_2_nd_experiment_stock() {
  8363. $description = array(
  8364. 'description' => '',
  8365. 'fields' => array(
  8366. 'nd_experiment_stock_id' => array(
  8367. 'description' => '',
  8368. 'type' => 'serial',
  8369. 'not null' => TRUE,
  8370. ),
  8371. 'nd_experiment_id' => array(
  8372. 'description' => '',
  8373. 'type' => 'int',
  8374. 'not null' => TRUE,
  8375. ),
  8376. 'stock_id' => array(
  8377. 'description' => '',
  8378. 'type' => 'int',
  8379. 'not null' => TRUE,
  8380. ),
  8381. 'type_id' => array(
  8382. 'description' => '',
  8383. 'type' => 'int',
  8384. 'not null' => TRUE,
  8385. ),
  8386. ),
  8387. 'primary key' => array(
  8388. 0 => 'nd_experiment_stock_id',
  8389. ),
  8390. 'unique keys' => array(),
  8391. 'foreign keys' => array(
  8392. 'cvterm' => array(
  8393. 'table' => 'cvterm',
  8394. 'columns' => array(
  8395. 'type_id' => 'cvterm_id',
  8396. ),
  8397. ),
  8398. 'stock' => array(
  8399. 'table' => 'stock',
  8400. 'columns' => array(
  8401. 'stock_id' => 'stock_id',
  8402. ),
  8403. ),
  8404. 'nd_experiment' => array(
  8405. 'table' => 'nd_experiment',
  8406. 'columns' => array(
  8407. 'nd_experiment_id' => 'nd_experiment_id',
  8408. ),
  8409. ),
  8410. ),
  8411. 'table' => 'nd_experiment_stock',
  8412. 'referring_tables' => array(
  8413. 0 => 'nd_experiment_stock_dbxref',
  8414. 1 => 'nd_experiment_stockprop',
  8415. ),
  8416. );
  8417. return $description;
  8418. }
  8419. /**
  8420. * Implements hook_chado_schema_v1_2_nd_experiment_stock_dbxref()
  8421. * Purpose: To describe the structure of 'nd_experiment_stock_dbxref' to tripal
  8422. * @see chado_insert_record()
  8423. * @see chado_update_record()
  8424. * @see chado_select_record()
  8425. *
  8426. * @return
  8427. * An array describing the 'nd_experiment_stock_dbxref' table
  8428. *
  8429. * @ingroup tripal_chado_v1.2_schema_api
  8430. *
  8431. */
  8432. function tripal_chado_chado_schema_v1_2_nd_experiment_stock_dbxref() {
  8433. $description = array(
  8434. 'description' => '',
  8435. 'fields' => array(
  8436. 'nd_experiment_stock_dbxref_id' => array(
  8437. 'description' => '',
  8438. 'type' => 'serial',
  8439. 'not null' => TRUE,
  8440. ),
  8441. 'nd_experiment_stock_id' => array(
  8442. 'description' => '',
  8443. 'type' => 'int',
  8444. 'not null' => TRUE,
  8445. ),
  8446. 'dbxref_id' => array(
  8447. 'description' => '',
  8448. 'type' => 'int',
  8449. 'not null' => TRUE,
  8450. ),
  8451. ),
  8452. 'primary key' => array(
  8453. 0 => 'nd_experiment_stock_dbxref_id',
  8454. ),
  8455. 'unique keys' => array(),
  8456. 'foreign keys' => array(
  8457. 'dbxref' => array(
  8458. 'table' => 'dbxref',
  8459. 'columns' => array(
  8460. 'dbxref_id' => 'dbxref_id',
  8461. ),
  8462. ),
  8463. 'nd_experiment_stock' => array(
  8464. 'table' => 'nd_experiment_stock',
  8465. 'columns' => array(
  8466. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  8467. ),
  8468. ),
  8469. ),
  8470. 'table' => 'nd_experiment_stock_dbxref',
  8471. 'referring_tables' => NULL,
  8472. );
  8473. return $description;
  8474. }
  8475. /**
  8476. * Implements hook_chado_schema_v1_2_nd_experiment_stockprop()
  8477. * Purpose: To describe the structure of 'nd_experiment_stockprop' to tripal
  8478. * @see chado_insert_record()
  8479. * @see chado_update_record()
  8480. * @see chado_select_record()
  8481. *
  8482. * @return
  8483. * An array describing the 'nd_experiment_stockprop' table
  8484. *
  8485. * @ingroup tripal_chado_v1.2_schema_api
  8486. *
  8487. */
  8488. function tripal_chado_chado_schema_v1_2_nd_experiment_stockprop() {
  8489. $description = array(
  8490. 'description' => '',
  8491. 'fields' => array(
  8492. 'nd_experiment_stockprop_id' => array(
  8493. 'description' => '',
  8494. 'type' => 'serial',
  8495. 'not null' => TRUE,
  8496. ),
  8497. 'nd_experiment_stock_id' => array(
  8498. 'description' => '',
  8499. 'type' => 'int',
  8500. 'not null' => TRUE,
  8501. ),
  8502. 'type_id' => array(
  8503. 'description' => '',
  8504. 'type' => 'int',
  8505. 'not null' => TRUE,
  8506. ),
  8507. 'value' => array(
  8508. 'description' => '',
  8509. 'type' => 'text',
  8510. 'not null' => FALSE,
  8511. ),
  8512. 'rank' => array(
  8513. 'description' => '',
  8514. 'type' => 'int',
  8515. 'not null' => TRUE,
  8516. 'default' => 0,
  8517. ),
  8518. ),
  8519. 'primary key' => array(
  8520. 0 => 'nd_experiment_stockprop_id',
  8521. ),
  8522. 'unique keys' => array(
  8523. 'nd_experiment_stockprop_c1' => array(
  8524. 0 => 'nd_experiment_stock_id',
  8525. 1 => 'type_id',
  8526. 2 => 'rank',
  8527. ),
  8528. ),
  8529. 'foreign keys' => array(
  8530. 'cvterm' => array(
  8531. 'table' => 'cvterm',
  8532. 'columns' => array(
  8533. 'type_id' => 'cvterm_id',
  8534. ),
  8535. ),
  8536. 'nd_experiment_stock' => array(
  8537. 'table' => 'nd_experiment_stock',
  8538. 'columns' => array(
  8539. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  8540. ),
  8541. ),
  8542. ),
  8543. 'table' => 'nd_experiment_stockprop',
  8544. 'referring_tables' => NULL,
  8545. );
  8546. return $description;
  8547. }
  8548. /**
  8549. * Implements hook_chado_schema_v1_2_nd_experimentprop()
  8550. * Purpose: To describe the structure of 'nd_experimentprop' to tripal
  8551. * @see chado_insert_record()
  8552. * @see chado_update_record()
  8553. * @see chado_select_record()
  8554. *
  8555. * @return
  8556. * An array describing the 'nd_experimentprop' table
  8557. *
  8558. * @ingroup tripal_chado_v1.2_schema_api
  8559. *
  8560. */
  8561. function tripal_chado_chado_schema_v1_2_nd_experimentprop() {
  8562. $description = array(
  8563. 'description' => '',
  8564. 'fields' => array(
  8565. 'nd_experimentprop_id' => array(
  8566. 'description' => '',
  8567. 'type' => 'serial',
  8568. 'not null' => TRUE,
  8569. ),
  8570. 'nd_experiment_id' => array(
  8571. 'description' => '',
  8572. 'type' => 'int',
  8573. 'not null' => TRUE,
  8574. ),
  8575. 'type_id' => array(
  8576. 'description' => '',
  8577. 'type' => 'int',
  8578. 'not null' => TRUE,
  8579. ),
  8580. 'value' => array(
  8581. 'description' => '',
  8582. 'type' => 'text',
  8583. 'not null' => FALSE,
  8584. ),
  8585. 'rank' => array(
  8586. 'description' => '',
  8587. 'type' => 'int',
  8588. 'not null' => TRUE,
  8589. 'default' => 0,
  8590. ),
  8591. ),
  8592. 'primary key' => array(
  8593. 0 => 'nd_experimentprop_id',
  8594. ),
  8595. 'unique keys' => array(
  8596. 'nd_experimentprop_c1' => array(
  8597. 0 => 'nd_experiment_id',
  8598. 1 => 'type_id',
  8599. 2 => 'rank',
  8600. ),
  8601. ),
  8602. 'foreign keys' => array(
  8603. 'cvterm' => array(
  8604. 'table' => 'cvterm',
  8605. 'columns' => array(
  8606. 'type_id' => 'cvterm_id',
  8607. ),
  8608. ),
  8609. 'nd_experiment' => array(
  8610. 'table' => 'nd_experiment',
  8611. 'columns' => array(
  8612. 'nd_experiment_id' => 'nd_experiment_id',
  8613. ),
  8614. ),
  8615. ),
  8616. 'table' => 'nd_experimentprop',
  8617. 'referring_tables' => NULL,
  8618. );
  8619. return $description;
  8620. }
  8621. /**
  8622. * Implements hook_chado_schema_v1_2_nd_geolocation()
  8623. * Purpose: To describe the structure of 'nd_geolocation' to tripal
  8624. * @see chado_insert_record()
  8625. * @see chado_update_record()
  8626. * @see chado_select_record()
  8627. *
  8628. * @return
  8629. * An array describing the 'nd_geolocation' table
  8630. *
  8631. * @ingroup tripal_chado_v1.2_schema_api
  8632. *
  8633. */
  8634. function tripal_chado_chado_schema_v1_2_nd_geolocation() {
  8635. $description = array(
  8636. 'description' => '',
  8637. 'fields' => array(
  8638. 'nd_geolocation_id' => array(
  8639. 'description' => '',
  8640. 'type' => 'serial',
  8641. 'not null' => TRUE,
  8642. ),
  8643. 'description' => array(
  8644. 'description' => '',
  8645. 'type' => 'varchar',
  8646. 'length' => '255',
  8647. 'not null' => FALSE,
  8648. ),
  8649. 'latitude' => array(
  8650. 'description' => '',
  8651. 'type' => 'float',
  8652. 'not null' => FALSE,
  8653. ),
  8654. 'longitude' => array(
  8655. 'description' => '',
  8656. 'type' => 'float',
  8657. 'not null' => FALSE,
  8658. ),
  8659. 'geodetic_datum' => array(
  8660. 'description' => '',
  8661. 'type' => 'varchar',
  8662. 'length' => '32',
  8663. 'not null' => FALSE,
  8664. ),
  8665. 'altitude' => array(
  8666. 'description' => '',
  8667. 'type' => 'float',
  8668. 'not null' => FALSE,
  8669. ),
  8670. ),
  8671. 'primary key' => array(
  8672. 0 => 'nd_geolocation_id',
  8673. ),
  8674. 'unique keys' => array(),
  8675. 'foreign keys' => array(),
  8676. 'table' => 'nd_geolocation',
  8677. 'referring_tables' => array(
  8678. 0 => 'nd_experiment',
  8679. 1 => 'nd_geolocationprop',
  8680. ),
  8681. );
  8682. return $description;
  8683. }
  8684. /**
  8685. * Implements hook_chado_schema_v1_2_nd_geolocationprop()
  8686. * Purpose: To describe the structure of 'nd_geolocationprop' to tripal
  8687. * @see chado_insert_record()
  8688. * @see chado_update_record()
  8689. * @see chado_select_record()
  8690. *
  8691. * @return
  8692. * An array describing the 'nd_geolocationprop' table
  8693. *
  8694. * @ingroup tripal_chado_v1.2_schema_api
  8695. *
  8696. */
  8697. function tripal_chado_chado_schema_v1_2_nd_geolocationprop() {
  8698. $description = array(
  8699. 'description' => '',
  8700. 'fields' => array(
  8701. 'nd_geolocationprop_id' => array(
  8702. 'description' => '',
  8703. 'type' => 'serial',
  8704. 'not null' => TRUE,
  8705. ),
  8706. 'nd_geolocation_id' => array(
  8707. 'description' => '',
  8708. 'type' => 'int',
  8709. 'not null' => TRUE,
  8710. ),
  8711. 'type_id' => array(
  8712. 'description' => '',
  8713. 'type' => 'int',
  8714. 'not null' => TRUE,
  8715. ),
  8716. 'value' => array(
  8717. 'description' => '',
  8718. 'type' => 'text',
  8719. 'not null' => FALSE,
  8720. ),
  8721. 'rank' => array(
  8722. 'description' => '',
  8723. 'type' => 'int',
  8724. 'not null' => TRUE,
  8725. 'default' => 0,
  8726. ),
  8727. ),
  8728. 'primary key' => array(
  8729. 0 => 'nd_geolocationprop_id',
  8730. ),
  8731. 'unique keys' => array(
  8732. 'nd_geolocationprop_c1' => array(
  8733. 0 => 'nd_geolocation_id',
  8734. 1 => 'type_id',
  8735. 2 => 'rank',
  8736. ),
  8737. ),
  8738. 'foreign keys' => array(
  8739. 'cvterm' => array(
  8740. 'table' => 'cvterm',
  8741. 'columns' => array(
  8742. 'type_id' => 'cvterm_id',
  8743. ),
  8744. ),
  8745. 'nd_geolocation' => array(
  8746. 'table' => 'nd_geolocation',
  8747. 'columns' => array(
  8748. 'nd_geolocation_id' => 'nd_geolocation_id',
  8749. ),
  8750. ),
  8751. ),
  8752. 'table' => 'nd_geolocationprop',
  8753. 'referring_tables' => NULL,
  8754. );
  8755. return $description;
  8756. }
  8757. /**
  8758. * Implements hook_chado_schema_v1_2_nd_protocol()
  8759. * Purpose: To describe the structure of 'nd_protocol' to tripal
  8760. * @see chado_insert_record()
  8761. * @see chado_update_record()
  8762. * @see chado_select_record()
  8763. *
  8764. * @return
  8765. * An array describing the 'nd_protocol' table
  8766. *
  8767. * @ingroup tripal_chado_v1.2_schema_api
  8768. *
  8769. */
  8770. function tripal_chado_chado_schema_v1_2_nd_protocol() {
  8771. $description = array(
  8772. 'description' => '',
  8773. 'fields' => array(
  8774. 'nd_protocol_id' => array(
  8775. 'description' => '',
  8776. 'type' => 'serial',
  8777. 'not null' => TRUE,
  8778. ),
  8779. 'name' => array(
  8780. 'description' => '',
  8781. 'type' => 'varchar',
  8782. 'length' => '255',
  8783. 'not null' => TRUE,
  8784. ),
  8785. 'type_id' => array(
  8786. 'description' => '',
  8787. 'type' => 'int',
  8788. 'not null' => TRUE,
  8789. ),
  8790. ),
  8791. 'primary key' => array(
  8792. 0 => 'nd_protocol_id',
  8793. ),
  8794. 'unique keys' => array(
  8795. 'name' => array(
  8796. 0 => 'name',
  8797. ),
  8798. ),
  8799. 'foreign keys' => array(
  8800. 'cvterm' => array(
  8801. 'table' => 'cvterm',
  8802. 'columns' => array(
  8803. 'type_id' => 'cvterm_id',
  8804. ),
  8805. ),
  8806. ),
  8807. 'table' => 'nd_protocol',
  8808. 'referring_tables' => array(
  8809. 0 => 'nd_experiment_protocol',
  8810. 1 => 'nd_protocol_reagent',
  8811. 2 => 'nd_protocolprop',
  8812. ),
  8813. );
  8814. return $description;
  8815. }
  8816. /**
  8817. * Implements hook_chado_schema_v1_2_nd_protocol_reagent()
  8818. * Purpose: To describe the structure of 'nd_protocol_reagent' to tripal
  8819. * @see chado_insert_record()
  8820. * @see chado_update_record()
  8821. * @see chado_select_record()
  8822. *
  8823. * @return
  8824. * An array describing the 'nd_protocol_reagent' table
  8825. *
  8826. * @ingroup tripal_chado_v1.2_schema_api
  8827. *
  8828. */
  8829. function tripal_chado_chado_schema_v1_2_nd_protocol_reagent() {
  8830. $description = array(
  8831. 'description' => '',
  8832. 'fields' => array(
  8833. 'nd_protocol_reagent_id' => array(
  8834. 'description' => '',
  8835. 'type' => 'serial',
  8836. 'not null' => TRUE,
  8837. ),
  8838. 'nd_protocol_id' => array(
  8839. 'description' => '',
  8840. 'type' => 'int',
  8841. 'not null' => TRUE,
  8842. ),
  8843. 'reagent_id' => array(
  8844. 'description' => '',
  8845. 'type' => 'int',
  8846. 'not null' => TRUE,
  8847. ),
  8848. 'type_id' => array(
  8849. 'description' => '',
  8850. 'type' => 'int',
  8851. 'not null' => TRUE,
  8852. ),
  8853. ),
  8854. 'primary key' => array(
  8855. 0 => 'nd_protocol_reagent_id',
  8856. ),
  8857. 'unique keys' => array(),
  8858. 'foreign keys' => array(
  8859. 'cvterm' => array(
  8860. 'table' => 'cvterm',
  8861. 'columns' => array(
  8862. 'type_id' => 'cvterm_id',
  8863. ),
  8864. ),
  8865. 'nd_protocol' => array(
  8866. 'table' => 'nd_protocol',
  8867. 'columns' => array(
  8868. 'nd_protocol_id' => 'nd_protocol_id',
  8869. ),
  8870. ),
  8871. 'nd_reagent' => array(
  8872. 'table' => 'nd_reagent',
  8873. 'columns' => array(
  8874. 'reagent_id' => 'nd_reagent_id',
  8875. ),
  8876. ),
  8877. ),
  8878. 'table' => 'nd_protocol_reagent',
  8879. 'referring_tables' => NULL,
  8880. );
  8881. return $description;
  8882. }
  8883. /**
  8884. * Implements hook_chado_schema_v1_2_nd_protocolprop()
  8885. * Purpose: To describe the structure of 'nd_protocolprop' to tripal
  8886. * @see chado_insert_record()
  8887. * @see chado_update_record()
  8888. * @see chado_select_record()
  8889. *
  8890. * @return
  8891. * An array describing the 'nd_protocolprop' table
  8892. *
  8893. * @ingroup tripal_chado_v1.2_schema_api
  8894. *
  8895. */
  8896. function tripal_chado_chado_schema_v1_2_nd_protocolprop() {
  8897. $description = array(
  8898. 'description' => '',
  8899. 'fields' => array(
  8900. 'nd_protocolprop_id' => array(
  8901. 'description' => '',
  8902. 'type' => 'serial',
  8903. 'not null' => TRUE,
  8904. ),
  8905. 'nd_protocol_id' => array(
  8906. 'description' => '',
  8907. 'type' => 'int',
  8908. 'not null' => TRUE,
  8909. ),
  8910. 'type_id' => array(
  8911. 'description' => '',
  8912. 'type' => 'int',
  8913. 'not null' => TRUE,
  8914. ),
  8915. 'value' => array(
  8916. 'description' => '',
  8917. 'type' => 'text',
  8918. 'not null' => FALSE,
  8919. ),
  8920. 'rank' => array(
  8921. 'description' => '',
  8922. 'type' => 'int',
  8923. 'not null' => TRUE,
  8924. 'default' => 0,
  8925. ),
  8926. ),
  8927. 'primary key' => array(
  8928. 0 => 'nd_protocolprop_id',
  8929. ),
  8930. 'unique keys' => array(
  8931. 'nd_protocolprop_c1' => array(
  8932. 0 => 'nd_protocol_id',
  8933. 1 => 'type_id',
  8934. 2 => 'rank',
  8935. ),
  8936. ),
  8937. 'foreign keys' => array(
  8938. 'cvterm' => array(
  8939. 'table' => 'cvterm',
  8940. 'columns' => array(
  8941. 'type_id' => 'cvterm_id',
  8942. ),
  8943. ),
  8944. 'nd_protocol' => array(
  8945. 'table' => 'nd_protocol',
  8946. 'columns' => array(
  8947. 'nd_protocol_id' => 'nd_protocol_id',
  8948. ),
  8949. ),
  8950. ),
  8951. 'table' => 'nd_protocolprop',
  8952. 'referring_tables' => NULL,
  8953. );
  8954. return $description;
  8955. }
  8956. /**
  8957. * Implements hook_chado_schema_v1_2_nd_reagent()
  8958. * Purpose: To describe the structure of 'nd_reagent' to tripal
  8959. * @see chado_insert_record()
  8960. * @see chado_update_record()
  8961. * @see chado_select_record()
  8962. *
  8963. * @return
  8964. * An array describing the 'nd_reagent' table
  8965. *
  8966. * @ingroup tripal_chado_v1.2_schema_api
  8967. *
  8968. */
  8969. function tripal_chado_chado_schema_v1_2_nd_reagent() {
  8970. $description = array(
  8971. 'description' => '',
  8972. 'fields' => array(
  8973. 'nd_reagent_id' => array(
  8974. 'description' => '',
  8975. 'type' => 'serial',
  8976. 'not null' => TRUE,
  8977. ),
  8978. 'name' => array(
  8979. 'description' => '',
  8980. 'type' => 'varchar',
  8981. 'length' => '80',
  8982. 'not null' => TRUE,
  8983. ),
  8984. 'type_id' => array(
  8985. 'description' => '',
  8986. 'type' => 'int',
  8987. 'not null' => TRUE,
  8988. ),
  8989. 'feature_id' => array(
  8990. 'description' => '',
  8991. 'type' => 'int',
  8992. 'not null' => FALSE,
  8993. ),
  8994. ),
  8995. 'primary key' => array(
  8996. 0 => 'nd_reagent_id',
  8997. ),
  8998. 'unique keys' => array(),
  8999. 'foreign keys' => array(
  9000. 'cvterm' => array(
  9001. 'table' => 'cvterm',
  9002. 'columns' => array(
  9003. 'type_id' => 'cvterm_id',
  9004. ),
  9005. ),
  9006. ),
  9007. 'table' => 'nd_reagent',
  9008. 'referring_tables' => array(
  9009. 0 => 'nd_protocol_reagent',
  9010. 1 => 'nd_reagent_relationship',
  9011. 3 => 'nd_reagentprop',
  9012. ),
  9013. );
  9014. return $description;
  9015. }
  9016. /**
  9017. * Implements hook_chado_schema_v1_2_nd_reagent_relationship()
  9018. * Purpose: To describe the structure of 'nd_reagent_relationship' to tripal
  9019. * @see chado_insert_record()
  9020. * @see chado_update_record()
  9021. * @see chado_select_record()
  9022. *
  9023. * @return
  9024. * An array describing the 'nd_reagent_relationship' table
  9025. *
  9026. * @ingroup tripal_chado_v1.2_schema_api
  9027. *
  9028. */
  9029. function tripal_chado_chado_schema_v1_2_nd_reagent_relationship() {
  9030. $description = array(
  9031. 'description' => '',
  9032. 'fields' => array(
  9033. 'nd_reagent_relationship_id' => array(
  9034. 'description' => '',
  9035. 'type' => 'serial',
  9036. 'not null' => TRUE,
  9037. ),
  9038. 'subject_reagent_id' => array(
  9039. 'description' => '',
  9040. 'type' => 'int',
  9041. 'not null' => TRUE,
  9042. ),
  9043. 'object_reagent_id' => array(
  9044. 'description' => '',
  9045. 'type' => 'int',
  9046. 'not null' => TRUE,
  9047. ),
  9048. 'type_id' => array(
  9049. 'description' => '',
  9050. 'type' => 'int',
  9051. 'not null' => TRUE,
  9052. ),
  9053. ),
  9054. 'primary key' => array(
  9055. 0 => 'nd_reagent_relationship_id',
  9056. ),
  9057. 'unique keys' => array(),
  9058. 'foreign keys' => array(
  9059. 'cvterm' => array(
  9060. 'table' => 'cvterm',
  9061. 'columns' => array(
  9062. 'type_id' => 'cvterm_id',
  9063. ),
  9064. ),
  9065. 'nd_reagent' => array(
  9066. 'table' => 'nd_reagent',
  9067. 'columns' => array(
  9068. 'subject_reagent_id' => 'nd_reagent_id',
  9069. 'object_reagent_id' => 'nd_reagent_id',
  9070. ),
  9071. ),
  9072. ),
  9073. 'table' => 'nd_reagent_relationship',
  9074. 'referring_tables' => NULL,
  9075. );
  9076. return $description;
  9077. }
  9078. /**
  9079. * Implements hook_chado_schema_v1_2_nd_reagentprop()
  9080. * Purpose: To describe the structure of 'nd_reagentprop' to tripal
  9081. * @see chado_insert_record()
  9082. * @see chado_update_record()
  9083. * @see chado_select_record()
  9084. *
  9085. * @return
  9086. * An array describing the 'nd_reagentprop' table
  9087. *
  9088. * @ingroup tripal_chado_v1.2_schema_api
  9089. *
  9090. */
  9091. function tripal_chado_chado_schema_v1_2_nd_reagentprop() {
  9092. $description = array(
  9093. 'description' => '',
  9094. 'fields' => array(
  9095. 'nd_reagentprop_id' => array(
  9096. 'description' => '',
  9097. 'type' => 'serial',
  9098. 'not null' => TRUE,
  9099. ),
  9100. 'nd_reagent_id' => array(
  9101. 'description' => '',
  9102. 'type' => 'int',
  9103. 'not null' => TRUE,
  9104. ),
  9105. 'type_id' => array(
  9106. 'description' => '',
  9107. 'type' => 'int',
  9108. 'not null' => TRUE,
  9109. ),
  9110. 'value' => array(
  9111. 'description' => '',
  9112. 'type' => 'text',
  9113. 'not null' => FALSE,
  9114. ),
  9115. 'rank' => array(
  9116. 'description' => '',
  9117. 'type' => 'int',
  9118. 'not null' => TRUE,
  9119. 'default' => 0,
  9120. ),
  9121. ),
  9122. 'primary key' => array(
  9123. 0 => 'nd_reagentprop_id',
  9124. ),
  9125. 'unique keys' => array(
  9126. 'nd_reagentprop_c1' => array(
  9127. 0 => 'nd_reagent_id',
  9128. 1 => 'type_id',
  9129. 2 => 'rank',
  9130. ),
  9131. ),
  9132. 'foreign keys' => array(
  9133. 'cvterm' => array(
  9134. 'table' => 'cvterm',
  9135. 'columns' => array(
  9136. 'type_id' => 'cvterm_id',
  9137. ),
  9138. ),
  9139. 'nd_reagent' => array(
  9140. 'table' => 'nd_reagent',
  9141. 'columns' => array(
  9142. 'nd_reagent_id' => 'nd_reagent_id',
  9143. ),
  9144. ),
  9145. ),
  9146. 'table' => 'nd_reagentprop',
  9147. 'referring_tables' => NULL,
  9148. );
  9149. return $description;
  9150. }
  9151. /**
  9152. * Implements hook_chado_schema_v1_2_organism()
  9153. * Purpose: To describe the structure of 'organism' to tripal
  9154. * @see chado_insert_record()
  9155. * @see chado_update_record()
  9156. * @see chado_select_record()
  9157. *
  9158. * @return
  9159. * An array describing the 'organism' table
  9160. *
  9161. * @ingroup tripal_chado_v1.2_schema_api
  9162. *
  9163. */
  9164. function tripal_chado_chado_schema_v1_2_organism() {
  9165. $description = array(
  9166. 'description' => '',
  9167. 'fields' => array(
  9168. 'organism_id' => array(
  9169. 'description' => '',
  9170. 'type' => 'serial',
  9171. 'not null' => TRUE,
  9172. ),
  9173. 'abbreviation' => array(
  9174. 'description' => '',
  9175. 'type' => 'varchar',
  9176. 'length' => '255',
  9177. 'not null' => FALSE,
  9178. ),
  9179. 'genus' => array(
  9180. 'description' => '',
  9181. 'type' => 'varchar',
  9182. 'length' => '255',
  9183. 'not null' => TRUE,
  9184. ),
  9185. 'species' => array(
  9186. 'description' => '',
  9187. 'type' => 'varchar',
  9188. 'length' => '255',
  9189. 'not null' => TRUE,
  9190. ),
  9191. 'common_name' => array(
  9192. 'description' => '',
  9193. 'type' => 'varchar',
  9194. 'length' => '255',
  9195. 'not null' => FALSE,
  9196. ),
  9197. 'comment' => array(
  9198. 'description' => '',
  9199. 'type' => 'text',
  9200. 'not null' => FALSE,
  9201. ),
  9202. ),
  9203. 'primary key' => array(
  9204. 0 => 'organism_id',
  9205. ),
  9206. 'unique keys' => array(
  9207. 'organism_c1' => array(
  9208. 0 => 'genus',
  9209. 1 => 'species',
  9210. ),
  9211. ),
  9212. 'foreign keys' => array(
  9213. ),
  9214. 'referring_tables' => array(
  9215. 0 => 'biomaterial',
  9216. 1 => 'cell_line',
  9217. 2 => 'feature',
  9218. 3 => 'library',
  9219. 4 => 'organism_dbxref',
  9220. 5 => 'organismprop',
  9221. 6 => 'phenotype_comparison',
  9222. 7 => 'phylonode_organism',
  9223. 8 => 'stock',
  9224. ),
  9225. 'table' => 'organism',
  9226. );
  9227. return $description;
  9228. }
  9229. /**
  9230. * Implements hook_chado_schema_v1_2_organism_dbxref()
  9231. * Purpose: To describe the structure of 'organism_dbxref' to tripal
  9232. * @see chado_insert_record()
  9233. * @see chado_update_record()
  9234. * @see chado_select_record()
  9235. *
  9236. * @return
  9237. * An array describing the 'organism_dbxref' table
  9238. *
  9239. * @ingroup tripal_chado_v1.2_schema_api
  9240. *
  9241. */
  9242. function tripal_chado_chado_schema_v1_2_organism_dbxref() {
  9243. $description = array(
  9244. 'description' => '',
  9245. 'fields' => array(
  9246. 'organism_dbxref_id' => array(
  9247. 'description' => '',
  9248. 'type' => 'serial',
  9249. 'not null' => TRUE,
  9250. ),
  9251. 'organism_id' => array(
  9252. 'description' => '',
  9253. 'type' => 'int',
  9254. 'not null' => TRUE,
  9255. ),
  9256. 'dbxref_id' => array(
  9257. 'description' => '',
  9258. 'type' => 'int',
  9259. 'not null' => TRUE,
  9260. ),
  9261. ),
  9262. 'primary key' => array(
  9263. 0 => 'organism_dbxref_id',
  9264. ),
  9265. 'unique keys' => array(
  9266. 'organism_dbxref_c1' => array(
  9267. 0 => 'organism_id',
  9268. 1 => 'dbxref_id',
  9269. ),
  9270. ),
  9271. 'indexes' => array(
  9272. 'organism_dbxref_idx1' => array(
  9273. 0 => 'organism_id',
  9274. ),
  9275. 'organism_dbxref_idx2' => array(
  9276. 0 => 'dbxref_id',
  9277. ),
  9278. ),
  9279. 'foreign keys' => array(
  9280. 'organism' => array(
  9281. 'table' => 'organism',
  9282. 'columns' => array(
  9283. 'organism_id' => 'organism_id',
  9284. ),
  9285. ),
  9286. 'dbxref' => array(
  9287. 'table' => 'dbxref',
  9288. 'columns' => array(
  9289. 'dbxref_id' => 'dbxref_id',
  9290. ),
  9291. ),
  9292. ),
  9293. 'table' => 'organism_dbxref',
  9294. 'referring_tables' => NULL,
  9295. );
  9296. return $description;
  9297. }
  9298. /**
  9299. * Implements hook_chado_schema_v1_2_organismprop()
  9300. * Purpose: To describe the structure of 'organismprop' to tripal
  9301. * @see chado_insert_record()
  9302. * @see chado_update_record()
  9303. * @see chado_select_record()
  9304. *
  9305. * @return
  9306. * An array describing the 'organismprop' table
  9307. *
  9308. * @ingroup tripal_chado_v1.2_schema_api
  9309. *
  9310. */
  9311. function tripal_chado_chado_schema_v1_2_organismprop() {
  9312. $description = array(
  9313. 'description' => '',
  9314. 'fields' => array(
  9315. 'organismprop_id' => array(
  9316. 'description' => '',
  9317. 'type' => 'serial',
  9318. 'not null' => TRUE,
  9319. ),
  9320. 'organism_id' => array(
  9321. 'description' => '',
  9322. 'type' => 'int',
  9323. 'not null' => TRUE,
  9324. ),
  9325. 'type_id' => array(
  9326. 'description' => '',
  9327. 'type' => 'int',
  9328. 'not null' => TRUE,
  9329. ),
  9330. 'value' => array(
  9331. 'description' => '',
  9332. 'type' => 'text',
  9333. 'not null' => FALSE,
  9334. ),
  9335. 'rank' => array(
  9336. 'description' => '',
  9337. 'type' => 'int',
  9338. 'not null' => TRUE,
  9339. 'default' => 0,
  9340. ),
  9341. ),
  9342. 'primary key' => array(
  9343. 0 => 'organismprop_id',
  9344. ),
  9345. 'unique keys' => array(
  9346. 'organismprop_c1' => array(
  9347. 0 => 'organism_id',
  9348. 1 => 'type_id',
  9349. 2 => 'rank',
  9350. ),
  9351. ),
  9352. 'indexes' => array(
  9353. 'organismprop_idx1' => array(
  9354. 0 => 'organism_id',
  9355. ),
  9356. 'organismprop_idx2' => array(
  9357. 0 => 'type_id',
  9358. ),
  9359. ),
  9360. 'foreign keys' => array(
  9361. 'organism' => array(
  9362. 'table' => 'organism',
  9363. 'columns' => array(
  9364. 'organism_id' => 'organism_id',
  9365. ),
  9366. ),
  9367. 'cvterm' => array(
  9368. 'table' => 'cvterm',
  9369. 'columns' => array(
  9370. 'type_id' => 'cvterm_id',
  9371. ),
  9372. ),
  9373. ),
  9374. 'table' => 'organismprop',
  9375. 'referring_tables' => NULL,
  9376. );
  9377. return $description;
  9378. }
  9379. /**
  9380. * Implements hook_chado_schema_v1_2_phendesc()
  9381. * Purpose: To describe the structure of 'phendesc' to tripal
  9382. * @see chado_insert_record()
  9383. * @see chado_update_record()
  9384. * @see chado_select_record()
  9385. *
  9386. * @return
  9387. * An array describing the 'phendesc' table
  9388. *
  9389. * @ingroup tripal_chado_v1.2_schema_api
  9390. *
  9391. */
  9392. function tripal_chado_chado_schema_v1_2_phendesc() {
  9393. $description = array(
  9394. 'description' => '',
  9395. 'fields' => array(
  9396. 'phendesc_id' => array(
  9397. 'description' => '',
  9398. 'type' => 'serial',
  9399. 'not null' => TRUE,
  9400. ),
  9401. 'genotype_id' => array(
  9402. 'description' => '',
  9403. 'type' => 'int',
  9404. 'not null' => TRUE,
  9405. ),
  9406. 'environment_id' => array(
  9407. 'description' => '',
  9408. 'type' => 'int',
  9409. 'not null' => TRUE,
  9410. ),
  9411. 'description' => array(
  9412. 'description' => '',
  9413. 'type' => 'text',
  9414. 'not null' => TRUE,
  9415. ),
  9416. 'type_id' => array(
  9417. 'description' => '',
  9418. 'type' => 'int',
  9419. 'not null' => TRUE,
  9420. ),
  9421. 'pub_id' => array(
  9422. 'description' => '',
  9423. 'type' => 'int',
  9424. 'not null' => TRUE,
  9425. ),
  9426. ),
  9427. 'primary key' => array(
  9428. 0 => 'phendesc_id',
  9429. ),
  9430. 'unique keys' => array(
  9431. 'phendesc_c1' => array(
  9432. 0 => 'genotype_id',
  9433. 1 => 'environment_id',
  9434. 2 => 'type_id',
  9435. 3 => 'pub_id',
  9436. ),
  9437. ),
  9438. 'indexes' => array(
  9439. 'phendesc_idx1' => array(
  9440. 0 => 'genotype_id',
  9441. ),
  9442. 'phendesc_idx2' => array(
  9443. 0 => 'environment_id',
  9444. ),
  9445. 'phendesc_idx3' => array(
  9446. 0 => 'pub_id',
  9447. ),
  9448. ),
  9449. 'foreign keys' => array(
  9450. 'cvterm' => array(
  9451. 'table' => 'cvterm',
  9452. 'columns' => array(
  9453. 'type_id' => 'cvterm_id',
  9454. ),
  9455. ),
  9456. 'pub' => array(
  9457. 'table' => 'pub',
  9458. 'columns' => array(
  9459. 'pub_id' => 'pub_id',
  9460. ),
  9461. ),
  9462. 'genotype' => array(
  9463. 'table' => 'genotype',
  9464. 'columns' => array(
  9465. 'genotype_id' => 'genotype_id',
  9466. ),
  9467. ),
  9468. 'environment' => array(
  9469. 'table' => 'environment',
  9470. 'columns' => array(
  9471. 'environment_id' => 'environment_id',
  9472. ),
  9473. ),
  9474. ),
  9475. 'table' => 'phendesc',
  9476. 'referring_tables' => NULL,
  9477. );
  9478. return $description;
  9479. }
  9480. /**
  9481. * Implements hook_chado_schema_v1_2_phenotype()
  9482. * Purpose: To describe the structure of 'phenotype' to tripal
  9483. * @see chado_insert_record()
  9484. * @see chado_update_record()
  9485. * @see chado_select_record()
  9486. *
  9487. * @return
  9488. * An array describing the 'phenotype' table
  9489. *
  9490. * @ingroup tripal_chado_v1.2_schema_api
  9491. *
  9492. */
  9493. function tripal_chado_chado_schema_v1_2_phenotype() {
  9494. $description = array(
  9495. 'description' => '',
  9496. 'fields' => array(
  9497. 'phenotype_id' => array(
  9498. 'description' => '',
  9499. 'type' => 'serial',
  9500. 'not null' => TRUE,
  9501. ),
  9502. 'uniquename' => array(
  9503. 'description' => '',
  9504. 'type' => 'text',
  9505. 'not null' => TRUE,
  9506. ),
  9507. 'name' => array(
  9508. 'description' => '',
  9509. 'type' => 'text',
  9510. 'not null' => FALSE,
  9511. ),
  9512. 'observable_id' => array(
  9513. 'description' => '',
  9514. 'type' => 'int',
  9515. 'not null' => FALSE,
  9516. ),
  9517. 'attr_id' => array(
  9518. 'description' => '',
  9519. 'type' => 'int',
  9520. 'not null' => FALSE,
  9521. ),
  9522. 'value' => array(
  9523. 'description' => '',
  9524. 'type' => 'text',
  9525. 'not null' => FALSE,
  9526. ),
  9527. 'cvalue_id' => array(
  9528. 'description' => '',
  9529. 'type' => 'int',
  9530. 'not null' => FALSE,
  9531. ),
  9532. 'assay_id' => array(
  9533. 'description' => '',
  9534. 'type' => 'int',
  9535. 'not null' => FALSE,
  9536. ),
  9537. ),
  9538. 'primary key' => array(
  9539. 0 => 'phenotype_id',
  9540. ),
  9541. 'unique keys' => array(
  9542. 'phenotype_c1' => array(
  9543. 0 => 'uniquename',
  9544. ),
  9545. ),
  9546. 'indexes' => array(
  9547. 'phenotype_idx1' => array(
  9548. 0 => 'cvalue_id',
  9549. ),
  9550. 'phenotype_idx2' => array(
  9551. 0 => 'observable_id',
  9552. ),
  9553. 'phenotype_idx3' => array(
  9554. 0 => 'attr_id',
  9555. ),
  9556. ),
  9557. 'foreign keys' => array(
  9558. 'cvterm' => array(
  9559. 'table' => 'cvterm',
  9560. 'columns' => array(
  9561. 'observable_id' => 'cvterm_id',
  9562. 'attr_id' => 'cvterm_id',
  9563. 'cvalue_id' => 'cvterm_id',
  9564. 'assay_id' => 'cvterm_id',
  9565. ),
  9566. ),
  9567. ),
  9568. 'table' => 'phenotype',
  9569. 'referring_tables' => array(
  9570. 0 => 'feature_phenotype',
  9571. 1 => 'nd_experiment_phenotype',
  9572. 2 => 'phenotype_comparison',
  9573. 4 => 'phenotype_cvterm',
  9574. 5 => 'phenstatement',
  9575. ),
  9576. );
  9577. return $description;
  9578. }
  9579. /**
  9580. * Implements hook_chado_schema_v1_2_phenotype_comparison()
  9581. * Purpose: To describe the structure of 'phenotype_comparison' to tripal
  9582. * @see chado_insert_record()
  9583. * @see chado_update_record()
  9584. * @see chado_select_record()
  9585. *
  9586. * @return
  9587. * An array describing the 'phenotype_comparison' table
  9588. *
  9589. * @ingroup tripal_chado_v1.2_schema_api
  9590. *
  9591. */
  9592. function tripal_chado_chado_schema_v1_2_phenotype_comparison() {
  9593. $description = array(
  9594. 'description' => '',
  9595. 'fields' => array(
  9596. 'phenotype_comparison_id' => array(
  9597. 'description' => '',
  9598. 'type' => 'serial',
  9599. 'not null' => TRUE,
  9600. ),
  9601. 'genotype1_id' => array(
  9602. 'description' => '',
  9603. 'type' => 'int',
  9604. 'not null' => TRUE,
  9605. ),
  9606. 'environment1_id' => array(
  9607. 'description' => '',
  9608. 'type' => 'int',
  9609. 'not null' => TRUE,
  9610. ),
  9611. 'genotype2_id' => array(
  9612. 'description' => '',
  9613. 'type' => 'int',
  9614. 'not null' => TRUE,
  9615. ),
  9616. 'environment2_id' => array(
  9617. 'description' => '',
  9618. 'type' => 'int',
  9619. 'not null' => TRUE,
  9620. ),
  9621. 'phenotype1_id' => array(
  9622. 'description' => '',
  9623. 'type' => 'int',
  9624. 'not null' => TRUE,
  9625. ),
  9626. 'phenotype2_id' => array(
  9627. 'description' => '',
  9628. 'type' => 'int',
  9629. 'not null' => FALSE,
  9630. ),
  9631. 'pub_id' => array(
  9632. 'description' => '',
  9633. 'type' => 'int',
  9634. 'not null' => TRUE,
  9635. ),
  9636. 'organism_id' => array(
  9637. 'description' => '',
  9638. 'type' => 'int',
  9639. 'not null' => TRUE,
  9640. ),
  9641. ),
  9642. 'primary key' => array(
  9643. 0 => 'phenotype_comparison_id',
  9644. ),
  9645. 'unique keys' => array(
  9646. 'phenotype_comparison_c1' => array(
  9647. 0 => 'genotype1_id',
  9648. 1 => 'environment1_id',
  9649. 2 => 'genotype2_id',
  9650. 3 => 'environment2_id',
  9651. 4 => 'phenotype1_id',
  9652. 5 => 'pub_id',
  9653. ),
  9654. ),
  9655. 'indexes' => array(
  9656. 'phenotype_comparison_idx1' => array(
  9657. 0 => 'genotype1_id',
  9658. ),
  9659. 'phenotype_comparison_idx2' => array(
  9660. 0 => 'genotype2_id',
  9661. ),
  9662. 'phenotype_comparison_idx4' => array(
  9663. 0 => 'pub_id',
  9664. ),
  9665. ),
  9666. 'foreign keys' => array(
  9667. 'organism' => array(
  9668. 'table' => 'organism',
  9669. 'columns' => array(
  9670. 'organism_id' => 'organism_id',
  9671. ),
  9672. ),
  9673. 'pub' => array(
  9674. 'table' => 'pub',
  9675. 'columns' => array(
  9676. 'pub_id' => 'pub_id',
  9677. ),
  9678. ),
  9679. 'genotype' => array(
  9680. 'table' => 'genotype',
  9681. 'columns' => array(
  9682. 'genotype1_id' => 'genotype_id',
  9683. 'genotype2_id' => 'genotype_id',
  9684. ),
  9685. ),
  9686. 'environment' => array(
  9687. 'table' => 'environment',
  9688. 'columns' => array(
  9689. 'environment1_id' => 'environment_id',
  9690. 'environment2_id' => 'environment_id',
  9691. ),
  9692. ),
  9693. 'phenotype' => array(
  9694. 'table' => 'phenotype',
  9695. 'columns' => array(
  9696. 'phenotype1_id' => 'phenotype_id',
  9697. 'phenotype2_id' => 'phenotype_id',
  9698. ),
  9699. ),
  9700. ),
  9701. 'table' => 'phenotype_comparison',
  9702. 'referring_tables' => array(
  9703. 0 => 'phenotype_comparison_cvterm',
  9704. ),
  9705. );
  9706. return $description;
  9707. }
  9708. /**
  9709. * Implements hook_chado_schema_v1_2_phenotype_comparison_cvterm()
  9710. * Purpose: To describe the structure of 'phenotype_comparison_cvterm' to tripal
  9711. * @see chado_insert_record()
  9712. * @see chado_update_record()
  9713. * @see chado_select_record()
  9714. *
  9715. * @return
  9716. * An array describing the 'phenotype_comparison_cvterm' table
  9717. *
  9718. * @ingroup tripal_chado_v1.2_schema_api
  9719. *
  9720. */
  9721. function tripal_chado_chado_schema_v1_2_phenotype_comparison_cvterm() {
  9722. $description = array(
  9723. 'description' => '',
  9724. 'fields' => array(
  9725. 'phenotype_comparison_cvterm_id' => array(
  9726. 'description' => '',
  9727. 'type' => 'serial',
  9728. 'not null' => TRUE,
  9729. ),
  9730. 'phenotype_comparison_id' => array(
  9731. 'description' => '',
  9732. 'type' => 'int',
  9733. 'not null' => TRUE,
  9734. ),
  9735. 'cvterm_id' => array(
  9736. 'description' => '',
  9737. 'type' => 'int',
  9738. 'not null' => TRUE,
  9739. ),
  9740. 'pub_id' => array(
  9741. 'description' => '',
  9742. 'type' => 'int',
  9743. 'not null' => TRUE,
  9744. ),
  9745. 'rank' => array(
  9746. 'description' => '',
  9747. 'type' => 'int',
  9748. 'not null' => TRUE,
  9749. 'default' => 0,
  9750. ),
  9751. ),
  9752. 'primary key' => array(
  9753. 0 => 'phenotype_comparison_cvterm_id',
  9754. ),
  9755. 'unique keys' => array(
  9756. 'phenotype_comparison_cvterm_c1' => array(
  9757. 0 => 'phenotype_comparison_id',
  9758. 1 => 'cvterm_id',
  9759. ),
  9760. ),
  9761. 'indexes' => array(
  9762. 'phenotype_comparison_cvterm_idx1' => array(
  9763. 0 => 'phenotype_comparison_id',
  9764. ),
  9765. 'phenotype_comparison_cvterm_idx2' => array(
  9766. 0 => 'cvterm_id',
  9767. ),
  9768. ),
  9769. 'foreign keys' => array(
  9770. 'cvterm' => array(
  9771. 'table' => 'cvterm',
  9772. 'columns' => array(
  9773. 'cvterm_id' => 'cvterm_id',
  9774. ),
  9775. ),
  9776. 'pub' => array(
  9777. 'table' => 'pub',
  9778. 'columns' => array(
  9779. 'pub_id' => 'pub_id',
  9780. ),
  9781. ),
  9782. 'phenotype_comparison' => array(
  9783. 'table' => 'phenotype_comparison',
  9784. 'columns' => array(
  9785. 'phenotype_comparison_id' => 'phenotype_comparison_id',
  9786. ),
  9787. ),
  9788. ),
  9789. 'table' => 'phenotype_comparison_cvterm',
  9790. 'referring_tables' => NULL,
  9791. );
  9792. return $description;
  9793. }
  9794. /**
  9795. * Implements hook_chado_schema_v1_2_phenotype_cvterm()
  9796. * Purpose: To describe the structure of 'phenotype_cvterm' to tripal
  9797. * @see chado_insert_record()
  9798. * @see chado_update_record()
  9799. * @see chado_select_record()
  9800. *
  9801. * @return
  9802. * An array describing the 'phenotype_cvterm' table
  9803. *
  9804. * @ingroup tripal_chado_v1.2_schema_api
  9805. *
  9806. */
  9807. function tripal_chado_chado_schema_v1_2_phenotype_cvterm() {
  9808. $description = array(
  9809. 'description' => '',
  9810. 'fields' => array(
  9811. 'phenotype_cvterm_id' => array(
  9812. 'description' => '',
  9813. 'type' => 'serial',
  9814. 'not null' => TRUE,
  9815. ),
  9816. 'phenotype_id' => array(
  9817. 'description' => '',
  9818. 'type' => 'int',
  9819. 'not null' => TRUE,
  9820. ),
  9821. 'cvterm_id' => array(
  9822. 'description' => '',
  9823. 'type' => 'int',
  9824. 'not null' => TRUE,
  9825. ),
  9826. 'rank' => array(
  9827. 'description' => '',
  9828. 'type' => 'int',
  9829. 'not null' => TRUE,
  9830. 'default' => 0,
  9831. ),
  9832. ),
  9833. 'primary key' => array(
  9834. 0 => 'phenotype_cvterm_id',
  9835. ),
  9836. 'unique keys' => array(
  9837. 'phenotype_cvterm_c1' => array(
  9838. 0 => 'phenotype_id',
  9839. 1 => 'cvterm_id',
  9840. 2 => 'rank',
  9841. ),
  9842. ),
  9843. 'indexes' => array(
  9844. 'phenotype_cvterm_idx1' => array(
  9845. 0 => 'phenotype_id',
  9846. ),
  9847. 'phenotype_cvterm_idx2' => array(
  9848. 0 => 'cvterm_id',
  9849. ),
  9850. ),
  9851. 'foreign keys' => array(
  9852. 'cvterm' => array(
  9853. 'table' => 'cvterm',
  9854. 'columns' => array(
  9855. 'cvterm_id' => 'cvterm_id',
  9856. ),
  9857. ),
  9858. 'phenotype' => array(
  9859. 'table' => 'phenotype',
  9860. 'columns' => array(
  9861. 'phenotype_id' => 'phenotype_id',
  9862. ),
  9863. ),
  9864. ),
  9865. 'table' => 'phenotype_cvterm',
  9866. 'referring_tables' => NULL,
  9867. );
  9868. return $description;
  9869. }
  9870. /**
  9871. * Implements hook_chado_schema_v1_2_phenstatement()
  9872. * Purpose: To describe the structure of 'phenstatement' to tripal
  9873. * @see chado_insert_record()
  9874. * @see chado_update_record()
  9875. * @see chado_select_record()
  9876. *
  9877. * @return
  9878. * An array describing the 'phenstatement' table
  9879. *
  9880. * @ingroup tripal_chado_v1.2_schema_api
  9881. *
  9882. */
  9883. function tripal_chado_chado_schema_v1_2_phenstatement() {
  9884. $description = array(
  9885. 'description' => '',
  9886. 'fields' => array(
  9887. 'phenstatement_id' => array(
  9888. 'description' => '',
  9889. 'type' => 'serial',
  9890. 'not null' => TRUE,
  9891. ),
  9892. 'genotype_id' => array(
  9893. 'description' => '',
  9894. 'type' => 'int',
  9895. 'not null' => TRUE,
  9896. ),
  9897. 'environment_id' => array(
  9898. 'description' => '',
  9899. 'type' => 'int',
  9900. 'not null' => TRUE,
  9901. ),
  9902. 'phenotype_id' => array(
  9903. 'description' => '',
  9904. 'type' => 'int',
  9905. 'not null' => TRUE,
  9906. ),
  9907. 'type_id' => array(
  9908. 'description' => '',
  9909. 'type' => 'int',
  9910. 'not null' => TRUE,
  9911. ),
  9912. 'pub_id' => array(
  9913. 'description' => '',
  9914. 'type' => 'int',
  9915. 'not null' => TRUE,
  9916. ),
  9917. ),
  9918. 'primary key' => array(
  9919. 0 => 'phenstatement_id',
  9920. ),
  9921. 'unique keys' => array(
  9922. 'phenstatement_c1' => array(
  9923. 0 => 'genotype_id',
  9924. 1 => 'phenotype_id',
  9925. 2 => 'environment_id',
  9926. 3 => 'type_id',
  9927. 4 => 'pub_id',
  9928. ),
  9929. ),
  9930. 'indexes' => array(
  9931. 'phenstatement_idx1' => array(
  9932. 0 => 'genotype_id',
  9933. ),
  9934. 'phenstatement_idx2' => array(
  9935. 0 => 'phenotype_id',
  9936. ),
  9937. ),
  9938. 'foreign keys' => array(
  9939. 'cvterm' => array(
  9940. 'table' => 'cvterm',
  9941. 'columns' => array(
  9942. 'type_id' => 'cvterm_id',
  9943. ),
  9944. ),
  9945. 'pub' => array(
  9946. 'table' => 'pub',
  9947. 'columns' => array(
  9948. 'pub_id' => 'pub_id',
  9949. ),
  9950. ),
  9951. 'genotype' => array(
  9952. 'table' => 'genotype',
  9953. 'columns' => array(
  9954. 'genotype_id' => 'genotype_id',
  9955. ),
  9956. ),
  9957. 'environment' => array(
  9958. 'table' => 'environment',
  9959. 'columns' => array(
  9960. 'environment_id' => 'environment_id',
  9961. ),
  9962. ),
  9963. 'phenotype' => array(
  9964. 'table' => 'phenotype',
  9965. 'columns' => array(
  9966. 'phenotype_id' => 'phenotype_id',
  9967. ),
  9968. ),
  9969. ),
  9970. 'table' => 'phenstatement',
  9971. 'referring_tables' => NULL,
  9972. );
  9973. return $description;
  9974. }
  9975. /**
  9976. * Implements hook_chado_schema_v1_2_phylonode()
  9977. * Purpose: To describe the structure of 'phylonode' to tripal
  9978. * @see chado_insert_record()
  9979. * @see chado_update_record()
  9980. * @see chado_select_record()
  9981. *
  9982. * @return
  9983. * An array describing the 'phylonode' table
  9984. *
  9985. * @ingroup tripal_chado_v1.2_schema_api
  9986. *
  9987. */
  9988. function tripal_chado_chado_schema_v1_2_phylonode() {
  9989. $description = array(
  9990. 'description' => '',
  9991. 'fields' => array(
  9992. 'phylonode_id' => array(
  9993. 'description' => '',
  9994. 'type' => 'serial',
  9995. 'not null' => TRUE,
  9996. ),
  9997. 'phylotree_id' => array(
  9998. 'description' => '',
  9999. 'type' => 'int',
  10000. 'not null' => TRUE,
  10001. ),
  10002. 'parent_phylonode_id' => array(
  10003. 'description' => '',
  10004. 'type' => 'int',
  10005. 'not null' => FALSE,
  10006. ),
  10007. 'left_idx' => array(
  10008. 'description' => '',
  10009. 'type' => 'int',
  10010. 'not null' => TRUE,
  10011. ),
  10012. 'right_idx' => array(
  10013. 'description' => '',
  10014. 'type' => 'int',
  10015. 'not null' => TRUE,
  10016. ),
  10017. 'type_id' => array(
  10018. 'description' => '',
  10019. 'type' => 'int',
  10020. 'not null' => FALSE,
  10021. ),
  10022. 'feature_id' => array(
  10023. 'description' => '',
  10024. 'type' => 'int',
  10025. 'not null' => FALSE,
  10026. ),
  10027. 'label' => array(
  10028. 'description' => '',
  10029. 'type' => 'varchar',
  10030. 'length' => '255',
  10031. 'not null' => FALSE,
  10032. ),
  10033. 'distance' => array(
  10034. 'description' => '',
  10035. 'type' => 'float',
  10036. 'size' => 'big',
  10037. 'not null' => FALSE,
  10038. ),
  10039. ),
  10040. 'primary key' => array(
  10041. 0 => 'phylonode_id',
  10042. ),
  10043. 'unique keys' => array(
  10044. 'phylotree_id' => array(
  10045. 0 => 'phylotree_id',
  10046. 1 => 'left_idx',
  10047. ),
  10048. 'phylonode_phylotree_id_key1' => array(
  10049. 0 => 'phylotree_id',
  10050. 1 => 'right_idx',
  10051. ),
  10052. ),
  10053. 'foreign keys' => array(
  10054. 'cvterm' => array(
  10055. 'table' => 'cvterm',
  10056. 'columns' => array(
  10057. 'type_id' => 'cvterm_id',
  10058. ),
  10059. ),
  10060. 'feature' => array(
  10061. 'table' => 'feature',
  10062. 'columns' => array(
  10063. 'feature_id' => 'feature_id',
  10064. ),
  10065. ),
  10066. 'phylonode' => array(
  10067. 'table' => 'phylonode',
  10068. 'columns' => array(
  10069. 'parent_phylonode_id' => 'phylonode_id',
  10070. ),
  10071. ),
  10072. 'phylotree' => array(
  10073. 'table' => 'phylotree',
  10074. 'columns' => array(
  10075. 'phylotree_id' => 'phylotree_id',
  10076. ),
  10077. ),
  10078. ),
  10079. 'table' => 'phylonode',
  10080. 'referring_tables' => array(
  10081. 0 => 'phylonode',
  10082. 1 => 'phylonode_dbxref',
  10083. 2 => 'phylonode_organism',
  10084. 3 => 'phylonode_pub',
  10085. 4 => 'phylonode_relationship',
  10086. 6 => 'phylonodeprop',
  10087. ),
  10088. );
  10089. return $description;
  10090. }
  10091. /**
  10092. * Implements hook_chado_schema_v1_2_phylonode_dbxref()
  10093. * Purpose: To describe the structure of 'phylonode_dbxref' to tripal
  10094. * @see chado_insert_record()
  10095. * @see chado_update_record()
  10096. * @see chado_select_record()
  10097. *
  10098. * @return
  10099. * An array describing the 'phylonode_dbxref' table
  10100. *
  10101. * @ingroup tripal_chado_v1.2_schema_api
  10102. *
  10103. */
  10104. function tripal_chado_chado_schema_v1_2_phylonode_dbxref() {
  10105. $description = array(
  10106. 'description' => '',
  10107. 'fields' => array(
  10108. 'phylonode_dbxref_id' => array(
  10109. 'description' => '',
  10110. 'type' => 'serial',
  10111. 'not null' => TRUE,
  10112. ),
  10113. 'phylonode_id' => array(
  10114. 'description' => '',
  10115. 'type' => 'int',
  10116. 'not null' => TRUE,
  10117. ),
  10118. 'dbxref_id' => array(
  10119. 'description' => '',
  10120. 'type' => 'int',
  10121. 'not null' => TRUE,
  10122. ),
  10123. ),
  10124. 'primary key' => array(
  10125. 0 => 'phylonode_dbxref_id',
  10126. ),
  10127. 'unique keys' => array(
  10128. 'phylonode_id' => array(
  10129. 0 => 'phylonode_id',
  10130. 1 => 'dbxref_id',
  10131. ),
  10132. ),
  10133. 'indexes' => array(
  10134. 'phylonode_dbxref_idx1' => array(
  10135. 0 => 'phylonode_id',
  10136. ),
  10137. 'phylonode_dbxref_idx2' => array(
  10138. 0 => 'dbxref_id',
  10139. ),
  10140. ),
  10141. 'foreign keys' => array(
  10142. 'dbxref' => array(
  10143. 'table' => 'dbxref',
  10144. 'columns' => array(
  10145. 'dbxref_id' => 'dbxref_id',
  10146. ),
  10147. ),
  10148. 'phylonode' => array(
  10149. 'table' => 'phylonode',
  10150. 'columns' => array(
  10151. 'phylonode_id' => 'phylonode_id',
  10152. ),
  10153. ),
  10154. ),
  10155. 'table' => 'phylonode_dbxref',
  10156. 'referring_tables' => NULL,
  10157. );
  10158. return $description;
  10159. }
  10160. /**
  10161. * Implements hook_chado_schema_v1_2_phylonode_organism()
  10162. * Purpose: To describe the structure of 'phylonode_organism' to tripal
  10163. * @see chado_insert_record()
  10164. * @see chado_update_record()
  10165. * @see chado_select_record()
  10166. *
  10167. * @return
  10168. * An array describing the 'phylonode_organism' table
  10169. *
  10170. * @ingroup tripal_chado_v1.2_schema_api
  10171. *
  10172. */
  10173. function tripal_chado_chado_schema_v1_2_phylonode_organism() {
  10174. $description = array(
  10175. 'description' => '',
  10176. 'fields' => array(
  10177. 'phylonode_organism_id' => array(
  10178. 'description' => '',
  10179. 'type' => 'serial',
  10180. 'not null' => TRUE,
  10181. ),
  10182. 'phylonode_id' => array(
  10183. 'description' => '',
  10184. 'type' => 'int',
  10185. 'not null' => TRUE,
  10186. ),
  10187. 'organism_id' => array(
  10188. 'description' => '',
  10189. 'type' => 'int',
  10190. 'not null' => TRUE,
  10191. ),
  10192. ),
  10193. 'primary key' => array(
  10194. 0 => 'phylonode_organism_id',
  10195. ),
  10196. 'unique keys' => array(
  10197. 'phylonode_id' => array(
  10198. 0 => 'phylonode_id',
  10199. ),
  10200. ),
  10201. 'indexes' => array(
  10202. 'phylonode_organism_idx1' => array(
  10203. 0 => 'phylonode_id',
  10204. ),
  10205. 'phylonode_organism_idx2' => array(
  10206. 0 => 'organism_id',
  10207. ),
  10208. ),
  10209. 'foreign keys' => array(
  10210. 'organism' => array(
  10211. 'table' => 'organism',
  10212. 'columns' => array(
  10213. 'organism_id' => 'organism_id',
  10214. ),
  10215. ),
  10216. 'phylonode' => array(
  10217. 'table' => 'phylonode',
  10218. 'columns' => array(
  10219. 'phylonode_id' => 'phylonode_id',
  10220. ),
  10221. ),
  10222. ),
  10223. 'table' => 'phylonode_organism',
  10224. 'referring_tables' => NULL,
  10225. );
  10226. return $description;
  10227. }
  10228. /**
  10229. * Implements hook_chado_schema_v1_2_phylonode_pub()
  10230. * Purpose: To describe the structure of 'phylonode_pub' to tripal
  10231. * @see chado_insert_record()
  10232. * @see chado_update_record()
  10233. * @see chado_select_record()
  10234. *
  10235. * @return
  10236. * An array describing the 'phylonode_pub' table
  10237. *
  10238. * @ingroup tripal_chado_v1.2_schema_api
  10239. *
  10240. */
  10241. function tripal_chado_chado_schema_v1_2_phylonode_pub() {
  10242. $description = array(
  10243. 'description' => '',
  10244. 'fields' => array(
  10245. 'phylonode_pub_id' => array(
  10246. 'description' => '',
  10247. 'type' => 'serial',
  10248. 'not null' => TRUE,
  10249. ),
  10250. 'phylonode_id' => array(
  10251. 'description' => '',
  10252. 'type' => 'int',
  10253. 'not null' => TRUE,
  10254. ),
  10255. 'pub_id' => array(
  10256. 'description' => '',
  10257. 'type' => 'int',
  10258. 'not null' => TRUE,
  10259. ),
  10260. ),
  10261. 'primary key' => array(
  10262. 0 => 'phylonode_pub_id',
  10263. ),
  10264. 'unique keys' => array(
  10265. 'phylonode_id' => array(
  10266. 0 => 'phylonode_id',
  10267. 1 => 'pub_id',
  10268. ),
  10269. ),
  10270. 'indexes' => array(
  10271. 'phylonode_pub_idx1' => array(
  10272. 0 => 'phylonode_id',
  10273. ),
  10274. 'phylonode_pub_idx2' => array(
  10275. 0 => 'pub_id',
  10276. ),
  10277. ),
  10278. 'foreign keys' => array(
  10279. 'pub' => array(
  10280. 'table' => 'pub',
  10281. 'columns' => array(
  10282. 'pub_id' => 'pub_id',
  10283. ),
  10284. ),
  10285. 'phylonode' => array(
  10286. 'table' => 'phylonode',
  10287. 'columns' => array(
  10288. 'phylonode_id' => 'phylonode_id',
  10289. ),
  10290. ),
  10291. ),
  10292. 'table' => 'phylonode_pub',
  10293. 'referring_tables' => NULL,
  10294. );
  10295. return $description;
  10296. }
  10297. /**
  10298. * Implements hook_chado_schema_v1_2_phylonode_relationship()
  10299. * Purpose: To describe the structure of 'phylonode_relationship' to tripal
  10300. * @see chado_insert_record()
  10301. * @see chado_update_record()
  10302. * @see chado_select_record()
  10303. *
  10304. * @return
  10305. * An array describing the 'phylonode_relationship' table
  10306. *
  10307. * @ingroup tripal_chado_v1.2_schema_api
  10308. *
  10309. */
  10310. function tripal_chado_chado_schema_v1_2_phylonode_relationship() {
  10311. $description = array(
  10312. 'description' => '',
  10313. 'fields' => array(
  10314. 'phylonode_relationship_id' => array(
  10315. 'description' => '',
  10316. 'type' => 'serial',
  10317. 'not null' => TRUE,
  10318. ),
  10319. 'subject_id' => array(
  10320. 'description' => '',
  10321. 'type' => 'int',
  10322. 'not null' => TRUE,
  10323. ),
  10324. 'object_id' => array(
  10325. 'description' => '',
  10326. 'type' => 'int',
  10327. 'not null' => TRUE,
  10328. ),
  10329. 'type_id' => array(
  10330. 'description' => '',
  10331. 'type' => 'int',
  10332. 'not null' => TRUE,
  10333. ),
  10334. 'rank' => array(
  10335. 'description' => '',
  10336. 'type' => 'int',
  10337. 'not null' => FALSE,
  10338. ),
  10339. 'phylotree_id' => array(
  10340. 'description' => '',
  10341. 'type' => 'int',
  10342. 'not null' => TRUE,
  10343. ),
  10344. ),
  10345. 'primary key' => array(
  10346. 0 => 'phylonode_relationship_id',
  10347. ),
  10348. 'unique keys' => array(
  10349. 'subject_id' => array(
  10350. 0 => 'subject_id',
  10351. 1 => 'object_id',
  10352. 2 => 'type_id',
  10353. ),
  10354. ),
  10355. 'indexes' => array(
  10356. 'phylonode_relationship_idx1' => array(
  10357. 0 => 'subject_id',
  10358. ),
  10359. 'phylonode_relationship_idx2' => array(
  10360. 0 => 'object_id',
  10361. ),
  10362. 'phylonode_relationship_idx3' => array(
  10363. 0 => 'type_id',
  10364. ),
  10365. ),
  10366. 'foreign keys' => array(
  10367. 'cvterm' => array(
  10368. 'table' => 'cvterm',
  10369. 'columns' => array(
  10370. 'type_id' => 'cvterm_id',
  10371. ),
  10372. ),
  10373. 'phylonode' => array(
  10374. 'table' => 'phylonode',
  10375. 'columns' => array(
  10376. 'subject_id' => 'phylonode_id',
  10377. 'object_id' => 'phylonode_id',
  10378. ),
  10379. ),
  10380. 'phylotree' => array(
  10381. 'table' => 'phylotree',
  10382. 'columns' => array(
  10383. 'phylotree_id' => 'phylotree_id',
  10384. ),
  10385. ),
  10386. ),
  10387. 'table' => 'phylonode_relationship',
  10388. 'referring_tables' => NULL,
  10389. );
  10390. return $description;
  10391. }
  10392. /**
  10393. * Implements hook_chado_schema_v1_2_phylonodeprop()
  10394. * Purpose: To describe the structure of 'phylonodeprop' to tripal
  10395. * @see chado_insert_record()
  10396. * @see chado_update_record()
  10397. * @see chado_select_record()
  10398. *
  10399. * @return
  10400. * An array describing the 'phylonodeprop' table
  10401. *
  10402. * @ingroup tripal_chado_v1.2_schema_api
  10403. *
  10404. */
  10405. function tripal_chado_chado_schema_v1_2_phylonodeprop() {
  10406. $description = array(
  10407. 'description' => '',
  10408. 'fields' => array(
  10409. 'phylonodeprop_id' => array(
  10410. 'description' => '',
  10411. 'type' => 'serial',
  10412. 'not null' => TRUE,
  10413. ),
  10414. 'phylonode_id' => array(
  10415. 'description' => '',
  10416. 'type' => 'int',
  10417. 'not null' => TRUE,
  10418. ),
  10419. 'type_id' => array(
  10420. 'description' => '',
  10421. 'type' => 'int',
  10422. 'not null' => TRUE,
  10423. ),
  10424. 'value' => array(
  10425. 'description' => '',
  10426. 'type' => 'text',
  10427. 'not null' => TRUE,
  10428. 'default' => '',
  10429. ),
  10430. 'rank' => array(
  10431. 'description' => '',
  10432. 'type' => 'int',
  10433. 'not null' => TRUE,
  10434. 'default' => 0,
  10435. ),
  10436. ),
  10437. 'primary key' => array(
  10438. 0 => 'phylonodeprop_id',
  10439. ),
  10440. 'unique keys' => array(
  10441. 'phylonode_id' => array(
  10442. 0 => 'phylonode_id',
  10443. 1 => 'type_id',
  10444. 2 => 'value',
  10445. 3 => 'rank',
  10446. ),
  10447. ),
  10448. 'indexes' => array(
  10449. 'phylonodeprop_idx1' => array(
  10450. 0 => 'phylonode_id',
  10451. ),
  10452. 'phylonodeprop_idx2' => array(
  10453. 0 => 'type_id',
  10454. ),
  10455. ),
  10456. 'foreign keys' => array(
  10457. 'cvterm' => array(
  10458. 'table' => 'cvterm',
  10459. 'columns' => array(
  10460. 'type_id' => 'cvterm_id',
  10461. ),
  10462. ),
  10463. 'phylonode' => array(
  10464. 'table' => 'phylonode',
  10465. 'columns' => array(
  10466. 'phylonode_id' => 'phylonode_id',
  10467. ),
  10468. ),
  10469. ),
  10470. 'table' => 'phylonodeprop',
  10471. 'referring_tables' => NULL,
  10472. );
  10473. return $description;
  10474. }
  10475. /**
  10476. * Implements hook_chado_schema_v1_2_phylotree()
  10477. * Purpose: To describe the structure of 'phylotree' to tripal
  10478. * @see chado_insert_record()
  10479. * @see chado_update_record()
  10480. * @see chado_select_record()
  10481. *
  10482. * @return
  10483. * An array describing the 'phylotree' table
  10484. *
  10485. * @ingroup tripal_chado_v1.2_schema_api
  10486. *
  10487. */
  10488. function tripal_chado_chado_schema_v1_2_phylotree() {
  10489. $description = array(
  10490. 'description' => '',
  10491. 'fields' => array(
  10492. 'phylotree_id' => array(
  10493. 'description' => '',
  10494. 'type' => 'serial',
  10495. 'not null' => TRUE,
  10496. ),
  10497. 'dbxref_id' => array(
  10498. 'description' => '',
  10499. 'type' => 'int',
  10500. 'not null' => TRUE,
  10501. ),
  10502. 'name' => array(
  10503. 'description' => '',
  10504. 'type' => 'varchar',
  10505. 'length' => '255',
  10506. 'not null' => FALSE,
  10507. ),
  10508. 'type_id' => array(
  10509. 'description' => '',
  10510. 'type' => 'int',
  10511. 'not null' => FALSE,
  10512. ),
  10513. 'analysis_id' => array(
  10514. 'description' => '',
  10515. 'type' => 'int',
  10516. 'not null' => FALSE,
  10517. ),
  10518. 'comment' => array(
  10519. 'description' => '',
  10520. 'type' => 'text',
  10521. 'not null' => FALSE,
  10522. ),
  10523. ),
  10524. 'primary key' => array(
  10525. 0 => 'phylotree_id',
  10526. ),
  10527. 'unique keys' => array(),
  10528. 'indexes' => array(
  10529. 'phylotree_idx1' => array(
  10530. 0 => 'phylotree_id',
  10531. ),
  10532. ),
  10533. 'foreign keys' => array(
  10534. 'cvterm' => array(
  10535. 'table' => 'cvterm',
  10536. 'columns' => array(
  10537. 'type_id' => 'cvterm_id',
  10538. ),
  10539. ),
  10540. 'dbxref' => array(
  10541. 'table' => 'dbxref',
  10542. 'columns' => array(
  10543. 'dbxref_id' => 'dbxref_id',
  10544. ),
  10545. ),
  10546. 'analysis' => array(
  10547. 'table' => 'analysis',
  10548. 'columns' => array(
  10549. 'analysis_id' => 'analysis_id',
  10550. ),
  10551. ),
  10552. ),
  10553. 'table' => 'phylotree',
  10554. 'referring_tables' => array(
  10555. 0 => 'phylonode',
  10556. 1 => 'phylonode_relationship',
  10557. 2 => 'phylotree_pub',
  10558. ),
  10559. );
  10560. return $description;
  10561. }
  10562. /**
  10563. * Implements hook_chado_schema_v1_2_phylotree_pub()
  10564. * Purpose: To describe the structure of 'phylotree_pub' to tripal
  10565. * @see chado_insert_record()
  10566. * @see chado_update_record()
  10567. * @see chado_select_record()
  10568. *
  10569. * @return
  10570. * An array describing the 'phylotree_pub' table
  10571. *
  10572. * @ingroup tripal_chado_v1.2_schema_api
  10573. *
  10574. */
  10575. function tripal_chado_chado_schema_v1_2_phylotree_pub() {
  10576. $description = array(
  10577. 'description' => '',
  10578. 'fields' => array(
  10579. 'phylotree_pub_id' => array(
  10580. 'description' => '',
  10581. 'type' => 'serial',
  10582. 'not null' => TRUE,
  10583. ),
  10584. 'phylotree_id' => array(
  10585. 'description' => '',
  10586. 'type' => 'int',
  10587. 'not null' => TRUE,
  10588. ),
  10589. 'pub_id' => array(
  10590. 'description' => '',
  10591. 'type' => 'int',
  10592. 'not null' => TRUE,
  10593. ),
  10594. ),
  10595. 'primary key' => array(
  10596. 0 => 'phylotree_pub_id',
  10597. ),
  10598. 'unique keys' => array(
  10599. 'phylotree_id' => array(
  10600. 0 => 'phylotree_id',
  10601. 1 => 'pub_id',
  10602. ),
  10603. ),
  10604. 'indexes' => array(
  10605. 'phylotree_pub_idx1' => array(
  10606. 0 => 'phylotree_id',
  10607. ),
  10608. 'phylotree_pub_idx2' => array(
  10609. 0 => 'pub_id',
  10610. ),
  10611. ),
  10612. 'foreign keys' => array(
  10613. 'pub' => array(
  10614. 'table' => 'pub',
  10615. 'columns' => array(
  10616. 'pub_id' => 'pub_id',
  10617. ),
  10618. ),
  10619. 'phylotree' => array(
  10620. 'table' => 'phylotree',
  10621. 'columns' => array(
  10622. 'phylotree_id' => 'phylotree_id',
  10623. ),
  10624. ),
  10625. ),
  10626. 'table' => 'phylotree_pub',
  10627. 'referring_tables' => NULL,
  10628. );
  10629. return $description;
  10630. }
  10631. /**
  10632. * Implements hook_chado_schema_v1_2_project()
  10633. * Purpose: To describe the structure of 'project' to tripal
  10634. * @see chado_insert_record()
  10635. * @see chado_update_record()
  10636. * @see chado_select_record()
  10637. *
  10638. * @return
  10639. * An array describing the 'project' table
  10640. *
  10641. * @ingroup tripal_chado_v1.2_schema_api
  10642. *
  10643. */
  10644. function tripal_chado_chado_schema_v1_2_project() {
  10645. $description = array(
  10646. 'description' => '',
  10647. 'fields' => array(
  10648. 'project_id' => array(
  10649. 'description' => '',
  10650. 'type' => 'serial',
  10651. 'not null' => TRUE,
  10652. ),
  10653. 'name' => array(
  10654. 'description' => '',
  10655. 'type' => 'varchar',
  10656. 'length' => '255',
  10657. 'not null' => TRUE,
  10658. ),
  10659. 'description' => array(
  10660. 'description' => '',
  10661. 'type' => 'varchar',
  10662. 'length' => '255',
  10663. 'not null' => TRUE,
  10664. ),
  10665. ),
  10666. 'primary key' => array(
  10667. 0 => 'project_id',
  10668. ),
  10669. 'unique keys' => array(
  10670. 'project_c1' => array(
  10671. 0 => 'name',
  10672. ),
  10673. ),
  10674. 'foreign keys' => array(
  10675. ),
  10676. 'table' => 'project',
  10677. 'referring_tables' => array(
  10678. 0 => 'assay_project',
  10679. 1 => 'nd_experiment_project',
  10680. 2 => 'project_contact',
  10681. 10 => 'project_pub',
  10682. 18 => 'project_relationship',
  10683. 34 => 'projectprop',
  10684. ),
  10685. );
  10686. return $description;
  10687. }
  10688. /**
  10689. * Implements hook_chado_schema_v1_2_project_contact()
  10690. * Purpose: To describe the structure of 'project_contact' to tripal
  10691. * @see chado_insert_record()
  10692. * @see chado_update_record()
  10693. * @see chado_select_record()
  10694. *
  10695. * @return
  10696. * An array describing the 'project_contact' table
  10697. *
  10698. * @ingroup tripal_chado_v1.2_schema_api
  10699. *
  10700. */
  10701. function tripal_chado_chado_schema_v1_2_project_contact() {
  10702. $description = array(
  10703. 'description' => '',
  10704. 'fields' => array(
  10705. 'project_contact_id' => array(
  10706. 'description' => '',
  10707. 'type' => 'serial',
  10708. 'not null' => TRUE,
  10709. ),
  10710. 'project_id' => array(
  10711. 'description' => '',
  10712. 'type' => 'int',
  10713. 'not null' => TRUE,
  10714. ),
  10715. 'contact_id' => array(
  10716. 'description' => '',
  10717. 'type' => 'int',
  10718. 'not null' => TRUE,
  10719. ),
  10720. ),
  10721. 'primary key' => array(
  10722. 0 => 'project_contact_id',
  10723. ),
  10724. 'unique keys' => array(
  10725. 'project_contact_c1' => array(
  10726. 0 => 'project_id',
  10727. 1 => 'contact_id',
  10728. ),
  10729. ),
  10730. 'indexes' => array(
  10731. 'project_contact_idx1' => array(
  10732. 0 => 'project_id',
  10733. ),
  10734. 'project_contact_idx2' => array(
  10735. 0 => 'contact_id',
  10736. ),
  10737. ),
  10738. 'foreign keys' => array(
  10739. 'contact' => array(
  10740. 'table' => 'contact',
  10741. 'columns' => array(
  10742. 'contact_id' => 'contact_id',
  10743. ),
  10744. ),
  10745. 'project' => array(
  10746. 'table' => 'project',
  10747. 'columns' => array(
  10748. 'project_id' => 'project_id',
  10749. ),
  10750. ),
  10751. ),
  10752. 'table' => 'project_contact',
  10753. 'referring_tables' => NULL,
  10754. );
  10755. return $description;
  10756. }
  10757. /**
  10758. * Implements hook_chado_schema_v1_2_project_pub()
  10759. * Purpose: To describe the structure of 'project_pub' to tripal
  10760. * @see chado_insert_record()
  10761. * @see chado_update_record()
  10762. * @see chado_select_record()
  10763. *
  10764. * @return
  10765. * An array describing the 'project_pub' table
  10766. *
  10767. * @ingroup tripal_chado_v1.2_schema_api
  10768. *
  10769. */
  10770. function tripal_chado_chado_schema_v1_2_project_pub() {
  10771. $description = array(
  10772. 'description' => '',
  10773. 'fields' => array(
  10774. 'project_pub_id' => array(
  10775. 'description' => '',
  10776. 'type' => 'serial',
  10777. 'not null' => TRUE,
  10778. ),
  10779. 'project_id' => array(
  10780. 'description' => '',
  10781. 'type' => 'int',
  10782. 'not null' => TRUE,
  10783. ),
  10784. 'pub_id' => array(
  10785. 'description' => '',
  10786. 'type' => 'int',
  10787. 'not null' => TRUE,
  10788. ),
  10789. ),
  10790. 'primary key' => array(
  10791. 0 => 'project_pub_id',
  10792. ),
  10793. 'unique keys' => array(
  10794. 'project_pub_c1' => array(
  10795. 0 => 'project_id',
  10796. 1 => 'pub_id',
  10797. ),
  10798. ),
  10799. 'indexes' => array(
  10800. 'project_pub_idx1' => array(
  10801. 0 => 'project_id',
  10802. ),
  10803. 'project_pub_idx2' => array(
  10804. 0 => 'pub_id',
  10805. ),
  10806. ),
  10807. 'foreign keys' => array(
  10808. 'pub' => array(
  10809. 'table' => 'pub',
  10810. 'columns' => array(
  10811. 'pub_id' => 'pub_id',
  10812. ),
  10813. ),
  10814. 'project' => array(
  10815. 'table' => 'project',
  10816. 'columns' => array(
  10817. 'project_id' => 'project_id',
  10818. ),
  10819. ),
  10820. ),
  10821. 'table' => 'project_pub',
  10822. 'referring_tables' => NULL,
  10823. );
  10824. return $description;
  10825. }
  10826. /**
  10827. * Implements hook_chado_schema_v1_2_project_relationship()
  10828. * Purpose: To describe the structure of 'project_relationship' to tripal
  10829. * @see chado_insert_record()
  10830. * @see chado_update_record()
  10831. * @see chado_select_record()
  10832. *
  10833. * @return
  10834. * An array describing the 'project_relationship' table
  10835. *
  10836. * @ingroup tripal_chado_v1.2_schema_api
  10837. *
  10838. */
  10839. function tripal_chado_chado_schema_v1_2_project_relationship() {
  10840. $description = array(
  10841. 'description' => '',
  10842. 'fields' => array(
  10843. 'project_relationship_id' => array(
  10844. 'description' => '',
  10845. 'type' => 'serial',
  10846. 'not null' => TRUE,
  10847. ),
  10848. 'subject_project_id' => array(
  10849. 'description' => '',
  10850. 'type' => 'int',
  10851. 'not null' => TRUE,
  10852. ),
  10853. 'object_project_id' => array(
  10854. 'description' => '',
  10855. 'type' => 'int',
  10856. 'not null' => TRUE,
  10857. ),
  10858. 'type_id' => array(
  10859. 'description' => '',
  10860. 'type' => 'int',
  10861. 'not null' => TRUE,
  10862. ),
  10863. ),
  10864. 'primary key' => array(
  10865. 0 => 'project_relationship_id',
  10866. ),
  10867. 'unique keys' => array(
  10868. 'project_relationship_c1' => array(
  10869. 0 => 'subject_project_id',
  10870. 1 => 'object_project_id',
  10871. 2 => 'type_id',
  10872. ),
  10873. ),
  10874. 'foreign keys' => array(
  10875. 'cvterm' => array(
  10876. 'table' => 'cvterm',
  10877. 'columns' => array(
  10878. 'type_id' => 'cvterm_id',
  10879. ),
  10880. ),
  10881. 'project' => array(
  10882. 'table' => 'project',
  10883. 'columns' => array(
  10884. 'subject_project_id' => 'project_id',
  10885. 'object_project_id' => 'project_id',
  10886. ),
  10887. ),
  10888. ),
  10889. 'table' => 'project_relationship',
  10890. 'referring_tables' => NULL,
  10891. );
  10892. return $description;
  10893. }
  10894. /**
  10895. * Implements hook_chado_schema_v1_2_projectprop()
  10896. * Purpose: To describe the structure of 'projectprop' to tripal
  10897. * @see chado_insert_record()
  10898. * @see chado_update_record()
  10899. * @see chado_select_record()
  10900. *
  10901. * @return
  10902. * An array describing the 'projectprop' table
  10903. *
  10904. * @ingroup tripal_chado_v1.2_schema_api
  10905. *
  10906. */
  10907. function tripal_chado_chado_schema_v1_2_projectprop() {
  10908. $description = array(
  10909. 'description' => '',
  10910. 'fields' => array(
  10911. 'projectprop_id' => array(
  10912. 'description' => '',
  10913. 'type' => 'serial',
  10914. 'not null' => TRUE,
  10915. ),
  10916. 'project_id' => array(
  10917. 'description' => '',
  10918. 'type' => 'int',
  10919. 'not null' => TRUE,
  10920. ),
  10921. 'type_id' => array(
  10922. 'description' => '',
  10923. 'type' => 'int',
  10924. 'not null' => TRUE,
  10925. ),
  10926. 'value' => array(
  10927. 'description' => '',
  10928. 'type' => 'text',
  10929. 'not null' => FALSE,
  10930. ),
  10931. 'rank' => array(
  10932. 'description' => '',
  10933. 'type' => 'int',
  10934. 'not null' => TRUE,
  10935. 'default' => 0,
  10936. ),
  10937. ),
  10938. 'primary key' => array(
  10939. 0 => 'projectprop_id',
  10940. ),
  10941. 'unique keys' => array(
  10942. 'projectprop_c1' => array(
  10943. 0 => 'project_id',
  10944. 1 => 'type_id',
  10945. 2 => 'rank',
  10946. ),
  10947. ),
  10948. 'foreign keys' => array(
  10949. 'cvterm' => array(
  10950. 'table' => 'cvterm',
  10951. 'columns' => array(
  10952. 'type_id' => 'cvterm_id',
  10953. ),
  10954. ),
  10955. 'project' => array(
  10956. 'table' => 'project',
  10957. 'columns' => array(
  10958. 'project_id' => 'project_id',
  10959. ),
  10960. ),
  10961. ),
  10962. 'table' => 'projectprop',
  10963. 'referring_tables' => NULL,
  10964. );
  10965. return $description;
  10966. }
  10967. /**
  10968. * Implements hook_chado_schema_v1_2_protocol()
  10969. * Purpose: To describe the structure of 'protocol' to tripal
  10970. * @see chado_insert_record()
  10971. * @see chado_update_record()
  10972. * @see chado_select_record()
  10973. *
  10974. * @return
  10975. * An array describing the 'protocol' table
  10976. *
  10977. * @ingroup tripal_chado_v1.2_schema_api
  10978. *
  10979. */
  10980. function tripal_chado_chado_schema_v1_2_protocol() {
  10981. $description = array(
  10982. 'description' => '',
  10983. 'fields' => array(
  10984. 'protocol_id' => array(
  10985. 'description' => '',
  10986. 'type' => 'serial',
  10987. 'not null' => TRUE,
  10988. ),
  10989. 'type_id' => array(
  10990. 'description' => '',
  10991. 'type' => 'int',
  10992. 'not null' => TRUE,
  10993. ),
  10994. 'pub_id' => array(
  10995. 'description' => '',
  10996. 'type' => 'int',
  10997. 'not null' => FALSE,
  10998. ),
  10999. 'dbxref_id' => array(
  11000. 'description' => '',
  11001. 'type' => 'int',
  11002. 'not null' => FALSE,
  11003. ),
  11004. 'name' => array(
  11005. 'description' => '',
  11006. 'type' => 'text',
  11007. 'not null' => TRUE,
  11008. ),
  11009. 'uri' => array(
  11010. 'description' => '',
  11011. 'type' => 'text',
  11012. 'not null' => FALSE,
  11013. ),
  11014. 'protocoldescription' => array(
  11015. 'description' => '',
  11016. 'type' => 'text',
  11017. 'not null' => FALSE,
  11018. ),
  11019. 'hardwaredescription' => array(
  11020. 'description' => '',
  11021. 'type' => 'text',
  11022. 'not null' => FALSE,
  11023. ),
  11024. 'softwaredescription' => array(
  11025. 'description' => '',
  11026. 'type' => 'text',
  11027. 'not null' => FALSE,
  11028. ),
  11029. ),
  11030. 'primary key' => array(
  11031. 0 => 'protocol_id',
  11032. ),
  11033. 'unique keys' => array(
  11034. 'protocol_c1' => array(
  11035. 0 => 'name',
  11036. ),
  11037. ),
  11038. 'indexes' => array(
  11039. 'protocol_idx1' => array(
  11040. 0 => 'type_id',
  11041. ),
  11042. 'protocol_idx2' => array(
  11043. 0 => 'pub_id',
  11044. ),
  11045. 'protocol_idx3' => array(
  11046. 0 => 'dbxref_id',
  11047. ),
  11048. ),
  11049. 'foreign keys' => array(
  11050. 'cvterm' => array(
  11051. 'table' => 'cvterm',
  11052. 'columns' => array(
  11053. 'type_id' => 'cvterm_id',
  11054. ),
  11055. ),
  11056. 'dbxref' => array(
  11057. 'table' => 'dbxref',
  11058. 'columns' => array(
  11059. 'dbxref_id' => 'dbxref_id',
  11060. ),
  11061. ),
  11062. 'pub' => array(
  11063. 'table' => 'pub',
  11064. 'columns' => array(
  11065. 'pub_id' => 'pub_id',
  11066. ),
  11067. ),
  11068. ),
  11069. 'table' => 'protocol',
  11070. 'referring_tables' => array(
  11071. 0 => 'acquisition',
  11072. 1 => 'arraydesign',
  11073. 2 => 'assay',
  11074. 3 => 'protocolparam',
  11075. 4 => 'quantification',
  11076. 5 => 'treatment',
  11077. ),
  11078. );
  11079. return $description;
  11080. }
  11081. /**
  11082. * Implements hook_chado_schema_v1_2_protocolparam()
  11083. * Purpose: To describe the structure of 'protocolparam' to tripal
  11084. * @see chado_insert_record()
  11085. * @see chado_update_record()
  11086. * @see chado_select_record()
  11087. *
  11088. * @return
  11089. * An array describing the 'protocolparam' table
  11090. *
  11091. * @ingroup tripal_chado_v1.2_schema_api
  11092. *
  11093. */
  11094. function tripal_chado_chado_schema_v1_2_protocolparam() {
  11095. $description = array(
  11096. 'description' => '',
  11097. 'fields' => array(
  11098. 'protocolparam_id' => array(
  11099. 'description' => '',
  11100. 'type' => 'serial',
  11101. 'not null' => TRUE,
  11102. ),
  11103. 'protocol_id' => array(
  11104. 'description' => '',
  11105. 'type' => 'int',
  11106. 'not null' => TRUE,
  11107. ),
  11108. 'name' => array(
  11109. 'description' => '',
  11110. 'type' => 'text',
  11111. 'not null' => TRUE,
  11112. ),
  11113. 'datatype_id' => array(
  11114. 'description' => '',
  11115. 'type' => 'int',
  11116. 'not null' => FALSE,
  11117. ),
  11118. 'unittype_id' => array(
  11119. 'description' => '',
  11120. 'type' => 'int',
  11121. 'not null' => FALSE,
  11122. ),
  11123. 'value' => array(
  11124. 'description' => '',
  11125. 'type' => 'text',
  11126. 'not null' => FALSE,
  11127. ),
  11128. 'rank' => array(
  11129. 'description' => '',
  11130. 'type' => 'int',
  11131. 'not null' => TRUE,
  11132. 'default' => 0,
  11133. ),
  11134. ),
  11135. 'primary key' => array(
  11136. 0 => 'protocolparam_id',
  11137. ),
  11138. 'unique keys' => array(),
  11139. 'indexes' => array(
  11140. 'protocolparam_idx1' => array(
  11141. 0 => 'protocol_id',
  11142. ),
  11143. 'protocolparam_idx2' => array(
  11144. 0 => 'datatype_id',
  11145. ),
  11146. 'protocolparam_idx3' => array(
  11147. 0 => 'unittype_id',
  11148. ),
  11149. ),
  11150. 'foreign keys' => array(
  11151. 'cvterm' => array(
  11152. 'table' => 'cvterm',
  11153. 'columns' => array(
  11154. 'datatype_id' => 'cvterm_id',
  11155. 'unittype_id' => 'cvterm_id',
  11156. ),
  11157. ),
  11158. 'protocol' => array(
  11159. 'table' => 'protocol',
  11160. 'columns' => array(
  11161. 'protocol_id' => 'protocol_id',
  11162. ),
  11163. ),
  11164. ),
  11165. 'table' => 'protocolparam',
  11166. 'referring_tables' => NULL,
  11167. );
  11168. return $description;
  11169. }
  11170. /**
  11171. * Implements hook_chado_schema_v1_2_pub()
  11172. * Purpose: To describe the structure of 'pub' to tripal
  11173. * @see chado_insert_record()
  11174. * @see chado_update_record()
  11175. * @see chado_select_record()
  11176. *
  11177. * @return
  11178. * An array describing the 'pub' table
  11179. *
  11180. * @ingroup tripal_chado_v1.2_schema_api
  11181. *
  11182. */
  11183. function tripal_chado_chado_schema_v1_2_pub() {
  11184. $description = array(
  11185. 'description' => '',
  11186. 'fields' => array(
  11187. 'pub_id' => array(
  11188. 'description' => '',
  11189. 'type' => 'serial',
  11190. 'not null' => TRUE,
  11191. ),
  11192. 'title' => array(
  11193. 'description' => '',
  11194. 'type' => 'text',
  11195. 'not null' => FALSE,
  11196. ),
  11197. 'volumetitle' => array(
  11198. 'description' => '',
  11199. 'type' => 'text',
  11200. 'not null' => FALSE,
  11201. ),
  11202. 'volume' => array(
  11203. 'description' => '',
  11204. 'type' => 'varchar',
  11205. 'length' => '255',
  11206. 'not null' => FALSE,
  11207. ),
  11208. 'series_name' => array(
  11209. 'description' => '',
  11210. 'type' => 'varchar',
  11211. 'length' => '255',
  11212. 'not null' => FALSE,
  11213. ),
  11214. 'issue' => array(
  11215. 'description' => '',
  11216. 'type' => 'varchar',
  11217. 'length' => '255',
  11218. 'not null' => FALSE,
  11219. ),
  11220. 'pyear' => array(
  11221. 'description' => '',
  11222. 'type' => 'varchar',
  11223. 'length' => '255',
  11224. 'not null' => FALSE,
  11225. ),
  11226. 'pages' => array(
  11227. 'description' => '',
  11228. 'type' => 'varchar',
  11229. 'length' => '255',
  11230. 'not null' => FALSE,
  11231. ),
  11232. 'miniref' => array(
  11233. 'description' => '',
  11234. 'type' => 'varchar',
  11235. 'length' => '255',
  11236. 'not null' => FALSE,
  11237. ),
  11238. 'uniquename' => array(
  11239. 'description' => '',
  11240. 'type' => 'text',
  11241. 'not null' => TRUE,
  11242. ),
  11243. 'type_id' => array(
  11244. 'description' => '',
  11245. 'type' => 'int',
  11246. 'not null' => TRUE,
  11247. ),
  11248. 'is_obsolete' => array(
  11249. 'description' => '',
  11250. 'type' => 'boolean',
  11251. 'not null' => FALSE,
  11252. 'default' => 'false',
  11253. ),
  11254. 'publisher' => array(
  11255. 'description' => '',
  11256. 'type' => 'varchar',
  11257. 'length' => '255',
  11258. 'not null' => FALSE,
  11259. ),
  11260. 'pubplace' => array(
  11261. 'description' => '',
  11262. 'type' => 'varchar',
  11263. 'length' => '255',
  11264. 'not null' => FALSE,
  11265. ),
  11266. ),
  11267. 'primary key' => array(
  11268. 0 => 'pub_id',
  11269. ),
  11270. 'unique keys' => array(
  11271. 'pub_c1' => array(
  11272. 0 => 'uniquename',
  11273. ),
  11274. ),
  11275. 'indexes' => array(
  11276. 'pub_idx1' => array(
  11277. 0 => 'type_id',
  11278. ),
  11279. ),
  11280. 'foreign keys' => array(
  11281. 'cvterm' => array(
  11282. 'table' => 'cvterm',
  11283. 'columns' => array(
  11284. 'type_id' => 'cvterm_id',
  11285. ),
  11286. ),
  11287. ),
  11288. 'table' => 'pub',
  11289. 'referring_tables' => array(
  11290. 0 => 'cell_line_cvterm',
  11291. 1 => 'cell_line_feature',
  11292. 2 => 'cell_line_library',
  11293. 3 => 'cell_line_pub',
  11294. 4 => 'cell_line_synonym',
  11295. 5 => 'cell_lineprop_pub',
  11296. 6 => 'expression_pub',
  11297. 7 => 'feature_cvterm',
  11298. 8 => 'feature_cvterm_pub',
  11299. 9 => 'feature_expression',
  11300. 10 => 'feature_pub',
  11301. 11 => 'feature_relationship_pub',
  11302. 12 => 'feature_relationshipprop_pub',
  11303. 13 => 'feature_synonym',
  11304. 14 => 'featureloc_pub',
  11305. 15 => 'featuremap_pub',
  11306. 16 => 'featureprop_pub',
  11307. 17 => 'library_cvterm',
  11308. 18 => 'library_pub',
  11309. 19 => 'library_synonym',
  11310. 20 => 'libraryprop_pub',
  11311. 21 => 'nd_experiment_pub',
  11312. 22 => 'phendesc',
  11313. 23 => 'phenotype_comparison',
  11314. 24 => 'phenotype_comparison_cvterm',
  11315. 25 => 'phenstatement',
  11316. 26 => 'phylonode_pub',
  11317. 27 => 'phylotree_pub',
  11318. 28 => 'project_pub',
  11319. 36 => 'protocol',
  11320. 37 => 'pub_dbxref',
  11321. 38 => 'pub_relationship',
  11322. 40 => 'pubauthor',
  11323. 41 => 'pubprop',
  11324. 42 => 'stock_cvterm',
  11325. 43 => 'stock_pub',
  11326. 44 => 'stock_relationship_cvterm',
  11327. 52 => 'stock_relationship_pub',
  11328. 53 => 'stockprop_pub',
  11329. 54 => 'study',
  11330. ),
  11331. );
  11332. return $description;
  11333. }
  11334. /**
  11335. * Implements hook_chado_schema_v1_2_pub_dbxref()
  11336. * Purpose: To describe the structure of 'pub_dbxref' to tripal
  11337. * @see chado_insert_record()
  11338. * @see chado_update_record()
  11339. * @see chado_select_record()
  11340. *
  11341. * @return
  11342. * An array describing the 'pub_dbxref' table
  11343. *
  11344. * @ingroup tripal_chado_v1.2_schema_api
  11345. *
  11346. */
  11347. function tripal_chado_chado_schema_v1_2_pub_dbxref() {
  11348. $description = array(
  11349. 'description' => '',
  11350. 'fields' => array(
  11351. 'pub_dbxref_id' => array(
  11352. 'description' => '',
  11353. 'type' => 'serial',
  11354. 'not null' => TRUE,
  11355. ),
  11356. 'pub_id' => array(
  11357. 'description' => '',
  11358. 'type' => 'int',
  11359. 'not null' => TRUE,
  11360. ),
  11361. 'dbxref_id' => array(
  11362. 'description' => '',
  11363. 'type' => 'int',
  11364. 'not null' => TRUE,
  11365. ),
  11366. 'is_current' => array(
  11367. 'description' => '',
  11368. 'type' => 'boolean',
  11369. 'not null' => TRUE,
  11370. 'default' => 'true',
  11371. ),
  11372. ),
  11373. 'primary key' => array(
  11374. 0 => 'pub_dbxref_id',
  11375. ),
  11376. 'unique keys' => array(
  11377. 'pub_dbxref_c1' => array(
  11378. 0 => 'pub_id',
  11379. 1 => 'dbxref_id',
  11380. ),
  11381. ),
  11382. 'indexes' => array(
  11383. 'pub_dbxref_idx1' => array(
  11384. 0 => 'pub_id',
  11385. ),
  11386. 'pub_dbxref_idx2' => array(
  11387. 0 => 'dbxref_id',
  11388. ),
  11389. ),
  11390. 'foreign keys' => array(
  11391. 'dbxref' => array(
  11392. 'table' => 'dbxref',
  11393. 'columns' => array(
  11394. 'dbxref_id' => 'dbxref_id',
  11395. ),
  11396. ),
  11397. 'pub' => array(
  11398. 'table' => 'pub',
  11399. 'columns' => array(
  11400. 'pub_id' => 'pub_id',
  11401. ),
  11402. ),
  11403. ),
  11404. 'table' => 'pub_dbxref',
  11405. 'referring_tables' => NULL,
  11406. );
  11407. return $description;
  11408. }
  11409. /**
  11410. * Implements hook_chado_schema_v1_2_pub_relationship()
  11411. * Purpose: To describe the structure of 'pub_relationship' to tripal
  11412. * @see chado_insert_record()
  11413. * @see chado_update_record()
  11414. * @see chado_select_record()
  11415. *
  11416. * @return
  11417. * An array describing the 'pub_relationship' table
  11418. *
  11419. * @ingroup tripal_chado_v1.2_schema_api
  11420. *
  11421. */
  11422. function tripal_chado_chado_schema_v1_2_pub_relationship() {
  11423. $description = array(
  11424. 'description' => '',
  11425. 'fields' => array(
  11426. 'pub_relationship_id' => array(
  11427. 'description' => '',
  11428. 'type' => 'serial',
  11429. 'not null' => TRUE,
  11430. ),
  11431. 'subject_id' => array(
  11432. 'description' => '',
  11433. 'type' => 'int',
  11434. 'not null' => TRUE,
  11435. ),
  11436. 'object_id' => array(
  11437. 'description' => '',
  11438. 'type' => 'int',
  11439. 'not null' => TRUE,
  11440. ),
  11441. 'type_id' => array(
  11442. 'description' => '',
  11443. 'type' => 'int',
  11444. 'not null' => TRUE,
  11445. ),
  11446. ),
  11447. 'primary key' => array(
  11448. 0 => 'pub_relationship_id',
  11449. ),
  11450. 'unique keys' => array(
  11451. 'pub_relationship_c1' => array(
  11452. 0 => 'subject_id',
  11453. 1 => 'object_id',
  11454. 2 => 'type_id',
  11455. ),
  11456. ),
  11457. 'indexes' => array(
  11458. 'pub_relationship_idx1' => array(
  11459. 0 => 'subject_id',
  11460. ),
  11461. 'pub_relationship_idx2' => array(
  11462. 0 => 'object_id',
  11463. ),
  11464. 'pub_relationship_idx3' => array(
  11465. 0 => 'type_id',
  11466. ),
  11467. ),
  11468. 'foreign keys' => array(
  11469. 'cvterm' => array(
  11470. 'table' => 'cvterm',
  11471. 'columns' => array(
  11472. 'type_id' => 'cvterm_id',
  11473. ),
  11474. ),
  11475. 'pub' => array(
  11476. 'table' => 'pub',
  11477. 'columns' => array(
  11478. 'subject_id' => 'pub_id',
  11479. 'object_id' => 'pub_id',
  11480. ),
  11481. ),
  11482. ),
  11483. 'table' => 'pub_relationship',
  11484. 'referring_tables' => NULL,
  11485. );
  11486. return $description;
  11487. }
  11488. /**
  11489. * Implements hook_chado_schema_v1_2_pubauthor()
  11490. * Purpose: To describe the structure of 'pubauthor' to tripal
  11491. * @see chado_insert_record()
  11492. * @see chado_update_record()
  11493. * @see chado_select_record()
  11494. *
  11495. * @return
  11496. * An array describing the 'pubauthor' table
  11497. *
  11498. * @ingroup tripal_chado_v1.2_schema_api
  11499. *
  11500. */
  11501. function tripal_chado_chado_schema_v1_2_pubauthor() {
  11502. $description = array(
  11503. 'description' => '',
  11504. 'fields' => array(
  11505. 'pubauthor_id' => array(
  11506. 'description' => '',
  11507. 'type' => 'serial',
  11508. 'not null' => TRUE,
  11509. ),
  11510. 'pub_id' => array(
  11511. 'description' => '',
  11512. 'type' => 'int',
  11513. 'not null' => TRUE,
  11514. ),
  11515. 'rank' => array(
  11516. 'description' => '',
  11517. 'type' => 'int',
  11518. 'not null' => TRUE,
  11519. ),
  11520. 'editor' => array(
  11521. 'description' => '',
  11522. 'type' => 'boolean',
  11523. 'not null' => FALSE,
  11524. 'default' => 'false',
  11525. ),
  11526. 'surname' => array(
  11527. 'description' => '',
  11528. 'type' => 'varchar',
  11529. 'length' => '100',
  11530. 'not null' => TRUE,
  11531. ),
  11532. 'givennames' => array(
  11533. 'description' => '',
  11534. 'type' => 'varchar',
  11535. 'length' => '100',
  11536. 'not null' => FALSE,
  11537. ),
  11538. 'suffix' => array(
  11539. 'description' => '',
  11540. 'type' => 'varchar',
  11541. 'length' => '100',
  11542. 'not null' => FALSE,
  11543. ),
  11544. ),
  11545. 'primary key' => array(
  11546. 0 => 'pubauthor_id',
  11547. ),
  11548. 'unique keys' => array(
  11549. 'pubauthor_c1' => array(
  11550. 0 => 'pub_id',
  11551. 1 => 'rank',
  11552. ),
  11553. ),
  11554. 'indexes' => array(
  11555. 'pubauthor_idx2' => array(
  11556. 0 => 'pub_id',
  11557. ),
  11558. ),
  11559. 'foreign keys' => array(
  11560. 'pub' => array(
  11561. 'table' => 'pub',
  11562. 'columns' => array(
  11563. 'pub_id' => 'pub_id',
  11564. ),
  11565. ),
  11566. ),
  11567. 'table' => 'pubauthor',
  11568. 'referring_tables' => NULL,
  11569. );
  11570. return $description;
  11571. }
  11572. /**
  11573. * Implements hook_chado_schema_v1_2_pubprop()
  11574. * Purpose: To describe the structure of 'pubprop' to tripal
  11575. * @see chado_insert_record()
  11576. * @see chado_update_record()
  11577. * @see chado_select_record()
  11578. *
  11579. * @return
  11580. * An array describing the 'pubprop' table
  11581. *
  11582. * @ingroup tripal_chado_v1.2_schema_api
  11583. *
  11584. */
  11585. function tripal_chado_chado_schema_v1_2_pubprop() {
  11586. $description = array(
  11587. 'description' => '',
  11588. 'fields' => array(
  11589. 'pubprop_id' => array(
  11590. 'description' => '',
  11591. 'type' => 'serial',
  11592. 'not null' => TRUE,
  11593. ),
  11594. 'pub_id' => array(
  11595. 'description' => '',
  11596. 'type' => 'int',
  11597. 'not null' => TRUE,
  11598. ),
  11599. 'type_id' => array(
  11600. 'description' => '',
  11601. 'type' => 'int',
  11602. 'not null' => TRUE,
  11603. ),
  11604. 'value' => array(
  11605. 'description' => '',
  11606. 'type' => 'text',
  11607. 'not null' => TRUE,
  11608. ),
  11609. 'rank' => array(
  11610. 'description' => '',
  11611. 'type' => 'int',
  11612. 'not null' => FALSE,
  11613. ),
  11614. ),
  11615. 'primary key' => array(
  11616. 0 => 'pubprop_id',
  11617. ),
  11618. 'unique keys' => array(
  11619. 'pubprop_c1' => array(
  11620. 0 => 'pub_id',
  11621. 1 => 'type_id',
  11622. 2 => 'rank',
  11623. ),
  11624. ),
  11625. 'indexes' => array(
  11626. 'pubprop_idx1' => array(
  11627. 0 => 'pub_id',
  11628. ),
  11629. 'pubprop_idx2' => array(
  11630. 0 => 'type_id',
  11631. ),
  11632. ),
  11633. 'foreign keys' => array(
  11634. 'cvterm' => array(
  11635. 'table' => 'cvterm',
  11636. 'columns' => array(
  11637. 'type_id' => 'cvterm_id',
  11638. ),
  11639. ),
  11640. 'pub' => array(
  11641. 'table' => 'pub',
  11642. 'columns' => array(
  11643. 'pub_id' => 'pub_id',
  11644. ),
  11645. ),
  11646. ),
  11647. 'table' => 'pubprop',
  11648. 'referring_tables' => NULL,
  11649. );
  11650. return $description;
  11651. }
  11652. /**
  11653. * Implements hook_chado_schema_v1_2_quantification()
  11654. * Purpose: To describe the structure of 'quantification' to tripal
  11655. * @see chado_insert_record()
  11656. * @see chado_update_record()
  11657. * @see chado_select_record()
  11658. *
  11659. * @return
  11660. * An array describing the 'quantification' table
  11661. *
  11662. * @ingroup tripal_chado_v1.2_schema_api
  11663. *
  11664. */
  11665. function tripal_chado_chado_schema_v1_2_quantification() {
  11666. $description = array(
  11667. 'description' => '',
  11668. 'fields' => array(
  11669. 'quantification_id' => array(
  11670. 'description' => '',
  11671. 'type' => 'serial',
  11672. 'not null' => TRUE,
  11673. ),
  11674. 'acquisition_id' => array(
  11675. 'description' => '',
  11676. 'type' => 'int',
  11677. 'not null' => TRUE,
  11678. ),
  11679. 'operator_id' => array(
  11680. 'description' => '',
  11681. 'type' => 'int',
  11682. 'not null' => FALSE,
  11683. ),
  11684. 'protocol_id' => array(
  11685. 'description' => '',
  11686. 'type' => 'int',
  11687. 'not null' => FALSE,
  11688. ),
  11689. 'analysis_id' => array(
  11690. 'description' => '',
  11691. 'type' => 'int',
  11692. 'not null' => TRUE,
  11693. ),
  11694. 'quantificationdate' => array(
  11695. 'description' => '',
  11696. 'type' => 'datetime',
  11697. 'not null' => FALSE,
  11698. 'default' => 'now()',
  11699. ),
  11700. 'name' => array(
  11701. 'description' => '',
  11702. 'type' => 'text',
  11703. 'not null' => FALSE,
  11704. ),
  11705. 'uri' => array(
  11706. 'description' => '',
  11707. 'type' => 'text',
  11708. 'not null' => FALSE,
  11709. ),
  11710. ),
  11711. 'primary key' => array(
  11712. 0 => 'quantification_id',
  11713. ),
  11714. 'unique keys' => array(
  11715. 'quantification_c1' => array(
  11716. 0 => 'name',
  11717. 1 => 'analysis_id',
  11718. ),
  11719. ),
  11720. 'indexes' => array(
  11721. 'quantification_idx1' => array(
  11722. 0 => 'acquisition_id',
  11723. ),
  11724. 'quantification_idx2' => array(
  11725. 0 => 'operator_id',
  11726. ),
  11727. 'quantification_idx3' => array(
  11728. 0 => 'protocol_id',
  11729. ),
  11730. 'quantification_idx4' => array(
  11731. 0 => 'analysis_id',
  11732. ),
  11733. ),
  11734. 'foreign keys' => array(
  11735. 'analysis' => array(
  11736. 'table' => 'analysis',
  11737. 'columns' => array(
  11738. 'analysis_id' => 'analysis_id',
  11739. ),
  11740. ),
  11741. 'contact' => array(
  11742. 'table' => 'contact',
  11743. 'columns' => array(
  11744. 'operator_id' => 'contact_id',
  11745. ),
  11746. ),
  11747. 'protocol' => array(
  11748. 'table' => 'protocol',
  11749. 'columns' => array(
  11750. 'protocol_id' => 'protocol_id',
  11751. ),
  11752. ),
  11753. 'acquisition' => array(
  11754. 'table' => 'acquisition',
  11755. 'columns' => array(
  11756. 'acquisition_id' => 'acquisition_id',
  11757. ),
  11758. ),
  11759. ),
  11760. 'table' => 'quantification',
  11761. 'referring_tables' => array(
  11762. 0 => 'elementresult',
  11763. 1 => 'quantification_relationship',
  11764. 3 => 'quantificationprop',
  11765. ),
  11766. );
  11767. return $description;
  11768. }
  11769. /**
  11770. * Implements hook_chado_schema_v1_2_quantification_relationship()
  11771. * Purpose: To describe the structure of 'quantification_relationship' to tripal
  11772. * @see chado_insert_record()
  11773. * @see chado_update_record()
  11774. * @see chado_select_record()
  11775. *
  11776. * @return
  11777. * An array describing the 'quantification_relationship' table
  11778. *
  11779. * @ingroup tripal_chado_v1.2_schema_api
  11780. *
  11781. */
  11782. function tripal_chado_chado_schema_v1_2_quantification_relationship() {
  11783. $description = array(
  11784. 'description' => '',
  11785. 'fields' => array(
  11786. 'quantification_relationship_id' => array(
  11787. 'description' => '',
  11788. 'type' => 'serial',
  11789. 'not null' => TRUE,
  11790. ),
  11791. 'subject_id' => array(
  11792. 'description' => '',
  11793. 'type' => 'int',
  11794. 'not null' => TRUE,
  11795. ),
  11796. 'type_id' => array(
  11797. 'description' => '',
  11798. 'type' => 'int',
  11799. 'not null' => TRUE,
  11800. ),
  11801. 'object_id' => array(
  11802. 'description' => '',
  11803. 'type' => 'int',
  11804. 'not null' => TRUE,
  11805. ),
  11806. ),
  11807. 'primary key' => array(
  11808. 0 => 'quantification_relationship_id',
  11809. ),
  11810. 'unique keys' => array(
  11811. 'quantification_relationship_c1' => array(
  11812. 0 => 'subject_id',
  11813. 1 => 'object_id',
  11814. 2 => 'type_id',
  11815. ),
  11816. ),
  11817. 'indexes' => array(
  11818. 'quantification_relationship_idx1' => array(
  11819. 0 => 'subject_id',
  11820. ),
  11821. 'quantification_relationship_idx2' => array(
  11822. 0 => 'type_id',
  11823. ),
  11824. 'quantification_relationship_idx3' => array(
  11825. 0 => 'object_id',
  11826. ),
  11827. ),
  11828. 'foreign keys' => array(
  11829. 'cvterm' => array(
  11830. 'table' => 'cvterm',
  11831. 'columns' => array(
  11832. 'type_id' => 'cvterm_id',
  11833. ),
  11834. ),
  11835. 'quantification' => array(
  11836. 'table' => 'quantification',
  11837. 'columns' => array(
  11838. 'subject_id' => 'quantification_id',
  11839. 'object_id' => 'quantification_id',
  11840. ),
  11841. ),
  11842. ),
  11843. 'table' => 'quantification_relationship',
  11844. 'referring_tables' => NULL,
  11845. );
  11846. return $description;
  11847. }
  11848. /**
  11849. * Implements hook_chado_schema_v1_2_quantificationprop()
  11850. * Purpose: To describe the structure of 'quantificationprop' to tripal
  11851. * @see chado_insert_record()
  11852. * @see chado_update_record()
  11853. * @see chado_select_record()
  11854. *
  11855. * @return
  11856. * An array describing the 'quantificationprop' table
  11857. *
  11858. * @ingroup tripal_chado_v1.2_schema_api
  11859. *
  11860. */
  11861. function tripal_chado_chado_schema_v1_2_quantificationprop() {
  11862. $description = array(
  11863. 'description' => '',
  11864. 'fields' => array(
  11865. 'quantificationprop_id' => array(
  11866. 'description' => '',
  11867. 'type' => 'serial',
  11868. 'not null' => TRUE,
  11869. ),
  11870. 'quantification_id' => array(
  11871. 'description' => '',
  11872. 'type' => 'int',
  11873. 'not null' => TRUE,
  11874. ),
  11875. 'type_id' => array(
  11876. 'description' => '',
  11877. 'type' => 'int',
  11878. 'not null' => TRUE,
  11879. ),
  11880. 'value' => array(
  11881. 'description' => '',
  11882. 'type' => 'text',
  11883. 'not null' => FALSE,
  11884. ),
  11885. 'rank' => array(
  11886. 'description' => '',
  11887. 'type' => 'int',
  11888. 'not null' => TRUE,
  11889. 'default' => 0,
  11890. ),
  11891. ),
  11892. 'primary key' => array(
  11893. 0 => 'quantificationprop_id',
  11894. ),
  11895. 'unique keys' => array(
  11896. 'quantificationprop_c1' => array(
  11897. 0 => 'quantification_id',
  11898. 1 => 'type_id',
  11899. 2 => 'rank',
  11900. ),
  11901. ),
  11902. 'indexes' => array(
  11903. 'quantificationprop_idx1' => array(
  11904. 0 => 'quantification_id',
  11905. ),
  11906. 'quantificationprop_idx2' => array(
  11907. 0 => 'type_id',
  11908. ),
  11909. ),
  11910. 'foreign keys' => array(
  11911. 'cvterm' => array(
  11912. 'table' => 'cvterm',
  11913. 'columns' => array(
  11914. 'type_id' => 'cvterm_id',
  11915. ),
  11916. ),
  11917. 'quantification' => array(
  11918. 'table' => 'quantification',
  11919. 'columns' => array(
  11920. 'quantification_id' => 'quantification_id',
  11921. ),
  11922. ),
  11923. ),
  11924. 'table' => 'quantificationprop',
  11925. 'referring_tables' => NULL,
  11926. );
  11927. return $description;
  11928. }
  11929. /**
  11930. * Implements hook_chado_schema_v1_2_stock()
  11931. * Purpose: To describe the structure of 'stock' to tripal
  11932. * @see chado_insert_record()
  11933. * @see chado_update_record()
  11934. * @see chado_select_record()
  11935. *
  11936. * @return
  11937. * An array describing the 'stock' table
  11938. *
  11939. * @ingroup tripal_chado_v1.2_schema_api
  11940. *
  11941. */
  11942. function tripal_chado_chado_schema_v1_2_stock() {
  11943. $description = array(
  11944. 'description' => 'Any stock can be globally identified by the combination of organism, uniquename and stock type. A stock is the physical entities, either living or preserved, held by collections. Stocks belong to a collection; they have IDs, type, organism, description and may have a genotype.',
  11945. 'fields' => array(
  11946. 'stock_id' => array(
  11947. 'description' => '',
  11948. 'type' => 'serial',
  11949. 'not null' => TRUE,
  11950. ),
  11951. 'dbxref_id' => array(
  11952. 'description' => '',
  11953. 'type' => 'int',
  11954. 'not null' => FALSE,
  11955. ),
  11956. 'organism_id' => array(
  11957. 'description' => '',
  11958. 'type' => 'int',
  11959. 'not null' => FALSE,
  11960. ),
  11961. 'name' => array(
  11962. 'description' => '',
  11963. 'type' => 'varchar',
  11964. 'length' => '255',
  11965. 'not null' => FALSE,
  11966. ),
  11967. 'uniquename' => array(
  11968. 'description' => '',
  11969. 'type' => 'text',
  11970. 'not null' => TRUE,
  11971. ),
  11972. 'description' => array(
  11973. 'description' => '',
  11974. 'type' => 'text',
  11975. 'not null' => FALSE,
  11976. ),
  11977. 'type_id' => array(
  11978. 'description' => '',
  11979. 'type' => 'int',
  11980. 'not null' => TRUE,
  11981. ),
  11982. 'is_obsolete' => array(
  11983. 'description' => '',
  11984. 'type' => 'boolean',
  11985. 'not null' => TRUE,
  11986. 'default' => 'false',
  11987. ),
  11988. ),
  11989. 'primary key' => array(
  11990. 0 => 'stock_id',
  11991. ),
  11992. 'unique keys' => array(
  11993. 'stock_c1' => array(
  11994. 0 => 'organism_id',
  11995. 1 => 'uniquename',
  11996. 2 => 'type_id',
  11997. ),
  11998. ),
  11999. 'indexes' => array(
  12000. 'stock_idx1' => array(
  12001. 0 => 'dbxref_id',
  12002. ),
  12003. 'stock_idx2' => array(
  12004. 0 => 'organism_id',
  12005. ),
  12006. 'stock_idx3' => array(
  12007. 0 => 'type_id',
  12008. ),
  12009. 'stock_idx4' => array(
  12010. 0 => 'uniquename',
  12011. ),
  12012. 'stock_name_ind1' => array(
  12013. 0 => 'name',
  12014. ),
  12015. ),
  12016. 'foreign keys' => array(
  12017. 'organism' => array(
  12018. 'table' => 'organism',
  12019. 'columns' => array(
  12020. 'organism_id' => 'organism_id',
  12021. ),
  12022. ),
  12023. 'cvterm' => array(
  12024. 'table' => 'cvterm',
  12025. 'columns' => array(
  12026. 'type_id' => 'cvterm_id',
  12027. ),
  12028. ),
  12029. 'dbxref' => array(
  12030. 'table' => 'dbxref',
  12031. 'columns' => array(
  12032. 'dbxref_id' => 'dbxref_id',
  12033. ),
  12034. ),
  12035. ),
  12036. 'referring_tables' => array(
  12037. 0 => 'nd_experiment_stock',
  12038. 1 => 'stock_cvterm',
  12039. 2 => 'stock_dbxref',
  12040. 3 => 'stock_genotype',
  12041. 4 => 'stock_pub',
  12042. 5 => 'stock_relationship',
  12043. 7 => 'stockcollection_stock',
  12044. 8 => 'stockprop',
  12045. ),
  12046. 'table' => 'stock',
  12047. );
  12048. return $description;
  12049. }
  12050. /**
  12051. * Implements hook_chado_schema_v1_2_stock_cvterm()
  12052. * Purpose: To describe the structure of 'stock_cvterm' to tripal
  12053. * @see chado_insert_record()
  12054. * @see chado_update_record()
  12055. * @see chado_select_record()
  12056. *
  12057. * @return
  12058. * An array describing the 'stock_cvterm' table
  12059. *
  12060. * @ingroup tripal_chado_v1.2_schema_api
  12061. *
  12062. */
  12063. function tripal_chado_chado_schema_v1_2_stock_cvterm() {
  12064. $description = array(
  12065. 'description' => '',
  12066. 'fields' => array(
  12067. 'stock_cvterm_id' => array(
  12068. 'description' => '',
  12069. 'type' => 'serial',
  12070. 'not null' => TRUE,
  12071. ),
  12072. 'stock_id' => array(
  12073. 'description' => '',
  12074. 'type' => 'int',
  12075. 'not null' => TRUE,
  12076. ),
  12077. 'cvterm_id' => array(
  12078. 'description' => '',
  12079. 'type' => 'int',
  12080. 'not null' => TRUE,
  12081. ),
  12082. 'pub_id' => array(
  12083. 'description' => '',
  12084. 'type' => 'int',
  12085. 'not null' => TRUE,
  12086. ),
  12087. 'is_not' => array(
  12088. 'description' => '',
  12089. 'type' => 'boolean',
  12090. 'not null' => TRUE,
  12091. 'default' => 'false',
  12092. ),
  12093. 'rank' => array(
  12094. 'description' => '',
  12095. 'type' => 'int',
  12096. 'not null' => TRUE,
  12097. 'default' => 0,
  12098. ),
  12099. ),
  12100. 'primary key' => array(
  12101. 0 => 'stock_cvterm_id',
  12102. ),
  12103. 'unique keys' => array(
  12104. 'stock_cvterm_c1' => array(
  12105. 0 => 'stock_id',
  12106. 1 => 'cvterm_id',
  12107. 2 => 'pub_id',
  12108. 3 => 'rank',
  12109. ),
  12110. ),
  12111. 'indexes' => array(
  12112. 'stock_cvterm_idx1' => array(
  12113. 0 => 'stock_id',
  12114. ),
  12115. 'stock_cvterm_idx2' => array(
  12116. 0 => 'cvterm_id',
  12117. ),
  12118. 'stock_cvterm_idx3' => array(
  12119. 0 => 'pub_id',
  12120. ),
  12121. ),
  12122. 'foreign keys' => array(
  12123. 'cvterm' => array(
  12124. 'table' => 'cvterm',
  12125. 'columns' => array(
  12126. 'cvterm_id' => 'cvterm_id',
  12127. ),
  12128. ),
  12129. 'pub' => array(
  12130. 'table' => 'pub',
  12131. 'columns' => array(
  12132. 'pub_id' => 'pub_id',
  12133. ),
  12134. ),
  12135. 'stock' => array(
  12136. 'table' => 'stock',
  12137. 'columns' => array(
  12138. 'stock_id' => 'stock_id',
  12139. ),
  12140. ),
  12141. ),
  12142. 'table' => 'stock_cvterm',
  12143. 'referring_tables' => array(
  12144. 0 => 'stock_cvtermprop',
  12145. ),
  12146. );
  12147. return $description;
  12148. }
  12149. /**
  12150. * Implements hook_chado_schema_v1_2_stock_cvtermprop()
  12151. * Purpose: To describe the structure of 'stock_cvtermprop' to tripal
  12152. * @see chado_insert_record()
  12153. * @see chado_update_record()
  12154. * @see chado_select_record()
  12155. *
  12156. * @return
  12157. * An array describing the 'stock_cvtermprop' table
  12158. *
  12159. * @ingroup tripal_chado_v1.2_schema_api
  12160. *
  12161. */
  12162. function tripal_chado_chado_schema_v1_2_stock_cvtermprop() {
  12163. $description = array(
  12164. 'description' => '',
  12165. 'fields' => array(
  12166. 'stock_cvtermprop_id' => array(
  12167. 'description' => '',
  12168. 'type' => 'serial',
  12169. 'not null' => TRUE,
  12170. ),
  12171. 'stock_cvterm_id' => array(
  12172. 'description' => '',
  12173. 'type' => 'int',
  12174. 'not null' => TRUE,
  12175. ),
  12176. 'type_id' => array(
  12177. 'description' => '',
  12178. 'type' => 'int',
  12179. 'not null' => TRUE,
  12180. ),
  12181. 'value' => array(
  12182. 'description' => '',
  12183. 'type' => 'text',
  12184. 'not null' => FALSE,
  12185. ),
  12186. 'rank' => array(
  12187. 'description' => '',
  12188. 'type' => 'int',
  12189. 'not null' => TRUE,
  12190. 'default' => 0,
  12191. ),
  12192. ),
  12193. 'primary key' => array(
  12194. 0 => 'stock_cvtermprop_id',
  12195. ),
  12196. 'unique keys' => array(
  12197. 'stock_cvtermprop_c1' => array(
  12198. 0 => 'stock_cvterm_id',
  12199. 1 => 'type_id',
  12200. 2 => 'rank',
  12201. ),
  12202. ),
  12203. 'indexes' => array(
  12204. 'stock_cvtermprop_idx1' => array(
  12205. 0 => 'stock_cvterm_id',
  12206. ),
  12207. 'stock_cvtermprop_idx2' => array(
  12208. 0 => 'type_id',
  12209. ),
  12210. ),
  12211. 'foreign keys' => array(
  12212. 'cvterm' => array(
  12213. 'table' => 'cvterm',
  12214. 'columns' => array(
  12215. 'type_id' => 'cvterm_id',
  12216. ),
  12217. ),
  12218. 'stock_cvterm' => array(
  12219. 'table' => 'stock_cvterm',
  12220. 'columns' => array(
  12221. 'stock_cvterm_id' => 'stock_cvterm_id',
  12222. ),
  12223. ),
  12224. ),
  12225. 'table' => 'stock_cvtermprop',
  12226. 'referring_tables' => NULL,
  12227. );
  12228. return $description;
  12229. }
  12230. /**
  12231. * Implements hook_chado_schema_v1_2_stock_dbxref()
  12232. * Purpose: To describe the structure of 'stock_dbxref' to tripal
  12233. * @see chado_insert_record()
  12234. * @see chado_update_record()
  12235. * @see chado_select_record()
  12236. *
  12237. * @return
  12238. * An array describing the 'stock_dbxref' table
  12239. *
  12240. * @ingroup tripal_chado_v1.2_schema_api
  12241. *
  12242. */
  12243. function tripal_chado_chado_schema_v1_2_stock_dbxref() {
  12244. $description = array(
  12245. 'description' => '',
  12246. 'fields' => array(
  12247. 'stock_dbxref_id' => array(
  12248. 'description' => '',
  12249. 'type' => 'serial',
  12250. 'not null' => TRUE,
  12251. ),
  12252. 'stock_id' => array(
  12253. 'description' => '',
  12254. 'type' => 'int',
  12255. 'not null' => TRUE,
  12256. ),
  12257. 'dbxref_id' => array(
  12258. 'description' => '',
  12259. 'type' => 'int',
  12260. 'not null' => TRUE,
  12261. ),
  12262. 'is_current' => array(
  12263. 'description' => '',
  12264. 'type' => 'boolean',
  12265. 'not null' => TRUE,
  12266. 'default' => 'true',
  12267. ),
  12268. ),
  12269. 'primary key' => array(
  12270. 0 => 'stock_dbxref_id',
  12271. ),
  12272. 'unique keys' => array(
  12273. 'stock_dbxref_c1' => array(
  12274. 0 => 'stock_id',
  12275. 1 => 'dbxref_id',
  12276. ),
  12277. ),
  12278. 'indexes' => array(
  12279. 'stock_dbxref_idx1' => array(
  12280. 0 => 'stock_id',
  12281. ),
  12282. 'stock_dbxref_idx2' => array(
  12283. 0 => 'dbxref_id',
  12284. ),
  12285. ),
  12286. 'foreign keys' => array(
  12287. 'dbxref' => array(
  12288. 'table' => 'dbxref',
  12289. 'columns' => array(
  12290. 'dbxref_id' => 'dbxref_id',
  12291. ),
  12292. ),
  12293. 'stock' => array(
  12294. 'table' => 'stock',
  12295. 'columns' => array(
  12296. 'stock_id' => 'stock_id',
  12297. ),
  12298. ),
  12299. ),
  12300. 'table' => 'stock_dbxref',
  12301. 'referring_tables' => array(
  12302. 0 => 'stock_dbxrefprop',
  12303. ),
  12304. );
  12305. return $description;
  12306. }
  12307. /**
  12308. * Implements hook_chado_schema_v1_2_stock_dbxrefprop()
  12309. * Purpose: To describe the structure of 'stock_dbxrefprop' to tripal
  12310. * @see chado_insert_record()
  12311. * @see chado_update_record()
  12312. * @see chado_select_record()
  12313. *
  12314. * @return
  12315. * An array describing the 'stock_dbxrefprop' table
  12316. *
  12317. * @ingroup tripal_chado_v1.2_schema_api
  12318. *
  12319. */
  12320. function tripal_chado_chado_schema_v1_2_stock_dbxrefprop() {
  12321. $description = array(
  12322. 'description' => '',
  12323. 'fields' => array(
  12324. 'stock_dbxrefprop_id' => array(
  12325. 'description' => '',
  12326. 'type' => 'serial',
  12327. 'not null' => TRUE,
  12328. ),
  12329. 'stock_dbxref_id' => array(
  12330. 'description' => '',
  12331. 'type' => 'int',
  12332. 'not null' => TRUE,
  12333. ),
  12334. 'type_id' => array(
  12335. 'description' => '',
  12336. 'type' => 'int',
  12337. 'not null' => TRUE,
  12338. ),
  12339. 'value' => array(
  12340. 'description' => '',
  12341. 'type' => 'text',
  12342. 'not null' => FALSE,
  12343. ),
  12344. 'rank' => array(
  12345. 'description' => '',
  12346. 'type' => 'int',
  12347. 'not null' => TRUE,
  12348. 'default' => 0,
  12349. ),
  12350. ),
  12351. 'primary key' => array(
  12352. 0 => 'stock_dbxrefprop_id',
  12353. ),
  12354. 'unique keys' => array(
  12355. 'stock_dbxrefprop_c1' => array(
  12356. 0 => 'stock_dbxref_id',
  12357. 1 => 'type_id',
  12358. 2 => 'rank',
  12359. ),
  12360. ),
  12361. 'indexes' => array(
  12362. 'stock_dbxrefprop_idx1' => array(
  12363. 0 => 'stock_dbxref_id',
  12364. ),
  12365. 'stock_dbxrefprop_idx2' => array(
  12366. 0 => 'type_id',
  12367. ),
  12368. ),
  12369. 'foreign keys' => array(
  12370. 'cvterm' => array(
  12371. 'table' => 'cvterm',
  12372. 'columns' => array(
  12373. 'type_id' => 'cvterm_id',
  12374. ),
  12375. ),
  12376. 'stock_dbxref' => array(
  12377. 'table' => 'stock_dbxref',
  12378. 'columns' => array(
  12379. 'stock_dbxref_id' => 'stock_dbxref_id',
  12380. ),
  12381. ),
  12382. ),
  12383. 'table' => 'stock_dbxrefprop',
  12384. 'referring_tables' => NULL,
  12385. );
  12386. return $description;
  12387. }
  12388. /**
  12389. * Implements hook_chado_schema_v1_2_stock_genotype()
  12390. * Purpose: To describe the structure of 'stock_genotype' to tripal
  12391. * @see chado_insert_record()
  12392. * @see chado_update_record()
  12393. * @see chado_select_record()
  12394. *
  12395. * @return
  12396. * An array describing the 'stock_genotype' table
  12397. *
  12398. * @ingroup tripal_chado_v1.2_schema_api
  12399. *
  12400. */
  12401. function tripal_chado_chado_schema_v1_2_stock_genotype() {
  12402. $description = array(
  12403. 'description' => '',
  12404. 'fields' => array(
  12405. 'stock_genotype_id' => array(
  12406. 'description' => '',
  12407. 'type' => 'serial',
  12408. 'not null' => TRUE,
  12409. ),
  12410. 'stock_id' => array(
  12411. 'description' => '',
  12412. 'type' => 'int',
  12413. 'not null' => TRUE,
  12414. ),
  12415. 'genotype_id' => array(
  12416. 'description' => '',
  12417. 'type' => 'int',
  12418. 'not null' => TRUE,
  12419. ),
  12420. ),
  12421. 'primary key' => array(
  12422. 0 => 'stock_genotype_id',
  12423. ),
  12424. 'unique keys' => array(
  12425. 'stock_genotype_c1' => array(
  12426. 0 => 'stock_id',
  12427. 1 => 'genotype_id',
  12428. ),
  12429. ),
  12430. 'indexes' => array(
  12431. 'stock_genotype_idx1' => array(
  12432. 0 => 'stock_id',
  12433. ),
  12434. 'stock_genotype_idx2' => array(
  12435. 0 => 'genotype_id',
  12436. ),
  12437. ),
  12438. 'foreign keys' => array(
  12439. 'genotype' => array(
  12440. 'table' => 'genotype',
  12441. 'columns' => array(
  12442. 'genotype_id' => 'genotype_id',
  12443. ),
  12444. ),
  12445. 'stock' => array(
  12446. 'table' => 'stock',
  12447. 'columns' => array(
  12448. 'stock_id' => 'stock_id',
  12449. ),
  12450. ),
  12451. ),
  12452. 'table' => 'stock_genotype',
  12453. 'referring_tables' => NULL,
  12454. );
  12455. return $description;
  12456. }
  12457. /**
  12458. * Implements hook_chado_schema_v1_2_stock_pub()
  12459. * Purpose: To describe the structure of 'stock_pub' to tripal
  12460. * @see chado_insert_record()
  12461. * @see chado_update_record()
  12462. * @see chado_select_record()
  12463. *
  12464. * @return
  12465. * An array describing the 'stock_pub' table
  12466. *
  12467. * @ingroup tripal_chado_v1.2_schema_api
  12468. *
  12469. */
  12470. function tripal_chado_chado_schema_v1_2_stock_pub() {
  12471. $description = array(
  12472. 'description' => '',
  12473. 'fields' => array(
  12474. 'stock_pub_id' => array(
  12475. 'description' => '',
  12476. 'type' => 'serial',
  12477. 'not null' => TRUE,
  12478. ),
  12479. 'stock_id' => array(
  12480. 'description' => '',
  12481. 'type' => 'int',
  12482. 'not null' => TRUE,
  12483. ),
  12484. 'pub_id' => array(
  12485. 'description' => '',
  12486. 'type' => 'int',
  12487. 'not null' => TRUE,
  12488. ),
  12489. ),
  12490. 'primary key' => array(
  12491. 0 => 'stock_pub_id',
  12492. ),
  12493. 'unique keys' => array(
  12494. 'stock_pub_c1' => array(
  12495. 0 => 'stock_id',
  12496. 1 => 'pub_id',
  12497. ),
  12498. ),
  12499. 'indexes' => array(
  12500. 'stock_pub_idx1' => array(
  12501. 0 => 'stock_id',
  12502. ),
  12503. 'stock_pub_idx2' => array(
  12504. 0 => 'pub_id',
  12505. ),
  12506. ),
  12507. 'foreign keys' => array(
  12508. 'pub' => array(
  12509. 'table' => 'pub',
  12510. 'columns' => array(
  12511. 'pub_id' => 'pub_id',
  12512. ),
  12513. ),
  12514. 'stock' => array(
  12515. 'table' => 'stock',
  12516. 'columns' => array(
  12517. 'stock_id' => 'stock_id',
  12518. ),
  12519. ),
  12520. ),
  12521. 'table' => 'stock_pub',
  12522. 'referring_tables' => NULL,
  12523. );
  12524. return $description;
  12525. }
  12526. /**
  12527. * Implements hook_chado_schema_v1_2_stock_relationship()
  12528. * Purpose: To describe the structure of 'stock_relationship' to tripal
  12529. * @see chado_insert_record()
  12530. * @see chado_update_record()
  12531. * @see chado_select_record()
  12532. *
  12533. * @return
  12534. * An array describing the 'stock_relationship' table
  12535. *
  12536. * @ingroup tripal_chado_v1.2_schema_api
  12537. *
  12538. */
  12539. function tripal_chado_chado_schema_v1_2_stock_relationship() {
  12540. $description = array(
  12541. 'description' => '',
  12542. 'fields' => array(
  12543. 'stock_relationship_id' => array(
  12544. 'description' => '',
  12545. 'type' => 'serial',
  12546. 'not null' => TRUE,
  12547. ),
  12548. 'subject_id' => array(
  12549. 'description' => '',
  12550. 'type' => 'int',
  12551. 'not null' => TRUE,
  12552. ),
  12553. 'object_id' => array(
  12554. 'description' => '',
  12555. 'type' => 'int',
  12556. 'not null' => TRUE,
  12557. ),
  12558. 'type_id' => array(
  12559. 'description' => '',
  12560. 'type' => 'int',
  12561. 'not null' => TRUE,
  12562. ),
  12563. 'value' => array(
  12564. 'description' => '',
  12565. 'type' => 'text',
  12566. 'not null' => FALSE,
  12567. ),
  12568. 'rank' => array(
  12569. 'description' => '',
  12570. 'type' => 'int',
  12571. 'not null' => TRUE,
  12572. 'default' => 0,
  12573. ),
  12574. ),
  12575. 'primary key' => array(
  12576. 0 => 'stock_relationship_id',
  12577. ),
  12578. 'unique keys' => array(
  12579. 'stock_relationship_c1' => array(
  12580. 0 => 'subject_id',
  12581. 1 => 'object_id',
  12582. 2 => 'type_id',
  12583. 3 => 'rank',
  12584. ),
  12585. ),
  12586. 'indexes' => array(
  12587. 'stock_relationship_idx1' => array(
  12588. 0 => 'subject_id',
  12589. ),
  12590. 'stock_relationship_idx2' => array(
  12591. 0 => 'object_id',
  12592. ),
  12593. 'stock_relationship_idx3' => array(
  12594. 0 => 'type_id',
  12595. ),
  12596. ),
  12597. 'foreign keys' => array(
  12598. 'cvterm' => array(
  12599. 'table' => 'cvterm',
  12600. 'columns' => array(
  12601. 'type_id' => 'cvterm_id',
  12602. ),
  12603. ),
  12604. 'stock' => array(
  12605. 'table' => 'stock',
  12606. 'columns' => array(
  12607. 'subject_id' => 'stock_id',
  12608. 'object_id' => 'stock_id',
  12609. ),
  12610. ),
  12611. ),
  12612. 'table' => 'stock_relationship',
  12613. 'referring_tables' => array(
  12614. 0 => 'stock_relationship_cvterm',
  12615. 8 => 'stock_relationship_pub',
  12616. ),
  12617. );
  12618. return $description;
  12619. }
  12620. /**
  12621. * Implements hook_chado_schema_v1_2_stock_relationship_cvterm()
  12622. * Purpose: To describe the structure of 'stock_relationship_cvterm' to tripal
  12623. * @see chado_insert_record()
  12624. * @see chado_update_record()
  12625. * @see chado_select_record()
  12626. *
  12627. * @return
  12628. * An array describing the 'stock_relationship_cvterm' table
  12629. *
  12630. * @ingroup tripal_chado_v1.2_schema_api
  12631. *
  12632. */
  12633. function tripal_chado_chado_schema_v1_2_stock_relationship_cvterm() {
  12634. $description = array(
  12635. 'description' => '',
  12636. 'fields' => array(
  12637. 'stock_relationship_cvterm_id' => array(
  12638. 'description' => '',
  12639. 'type' => 'serial',
  12640. 'not null' => TRUE,
  12641. ),
  12642. 'stock_relationship_id' => array(
  12643. 'description' => '',
  12644. 'type' => 'int',
  12645. 'not null' => TRUE,
  12646. ),
  12647. 'cvterm_id' => array(
  12648. 'description' => '',
  12649. 'type' => 'int',
  12650. 'not null' => TRUE,
  12651. ),
  12652. 'pub_id' => array(
  12653. 'description' => '',
  12654. 'type' => 'int',
  12655. 'not null' => FALSE,
  12656. ),
  12657. ),
  12658. 'primary key' => array(
  12659. 0 => 'stock_relationship_cvterm_id',
  12660. ),
  12661. 'unique keys' => array(),
  12662. 'foreign keys' => array(
  12663. 'cvterm' => array(
  12664. 'table' => 'cvterm',
  12665. 'columns' => array(
  12666. 'cvterm_id' => 'cvterm_id',
  12667. ),
  12668. ),
  12669. 'pub' => array(
  12670. 'table' => 'pub',
  12671. 'columns' => array(
  12672. 'pub_id' => 'pub_id',
  12673. ),
  12674. ),
  12675. 'stock_relationship' => array(
  12676. 'table' => 'stock_relationship',
  12677. 'columns' => array(
  12678. 'stock_relationship_id' => 'stock_relationship_id',
  12679. ),
  12680. ),
  12681. ),
  12682. 'table' => 'stock_relationship_cvterm',
  12683. 'referring_tables' => NULL,
  12684. );
  12685. return $description;
  12686. }
  12687. /**
  12688. * Implements hook_chado_schema_v1_2_stock_relationship_pub()
  12689. * Purpose: To describe the structure of 'stock_relationship_pub' to tripal
  12690. * @see chado_insert_record()
  12691. * @see chado_update_record()
  12692. * @see chado_select_record()
  12693. *
  12694. * @return
  12695. * An array describing the 'stock_relationship_pub' table
  12696. *
  12697. * @ingroup tripal_chado_v1.2_schema_api
  12698. *
  12699. */
  12700. function tripal_chado_chado_schema_v1_2_stock_relationship_pub() {
  12701. $description = array(
  12702. 'description' => '',
  12703. 'fields' => array(
  12704. 'stock_relationship_pub_id' => array(
  12705. 'description' => '',
  12706. 'type' => 'serial',
  12707. 'not null' => TRUE,
  12708. ),
  12709. 'stock_relationship_id' => array(
  12710. 'description' => '',
  12711. 'type' => 'int',
  12712. 'not null' => TRUE,
  12713. ),
  12714. 'pub_id' => array(
  12715. 'description' => '',
  12716. 'type' => 'int',
  12717. 'not null' => TRUE,
  12718. ),
  12719. ),
  12720. 'primary key' => array(
  12721. 0 => 'stock_relationship_pub_id',
  12722. ),
  12723. 'unique keys' => array(
  12724. 'stock_relationship_pub_c1' => array(
  12725. 0 => 'stock_relationship_id',
  12726. 1 => 'pub_id',
  12727. ),
  12728. ),
  12729. 'indexes' => array(
  12730. 'stock_relationship_pub_idx1' => array(
  12731. 0 => 'stock_relationship_id',
  12732. ),
  12733. 'stock_relationship_pub_idx2' => array(
  12734. 0 => 'pub_id',
  12735. ),
  12736. ),
  12737. 'foreign keys' => array(
  12738. 'pub' => array(
  12739. 'table' => 'pub',
  12740. 'columns' => array(
  12741. 'pub_id' => 'pub_id',
  12742. ),
  12743. ),
  12744. 'stock_relationship' => array(
  12745. 'table' => 'stock_relationship',
  12746. 'columns' => array(
  12747. 'stock_relationship_id' => 'stock_relationship_id',
  12748. ),
  12749. ),
  12750. ),
  12751. 'table' => 'stock_relationship_pub',
  12752. 'referring_tables' => NULL,
  12753. );
  12754. return $description;
  12755. }
  12756. /**
  12757. * Implements hook_chado_schema_v1_2_stockcollection()
  12758. * Purpose: To describe the structure of 'stockcollection' to tripal
  12759. * @see chado_insert_record()
  12760. * @see chado_update_record()
  12761. * @see chado_select_record()
  12762. *
  12763. * @return
  12764. * An array describing the 'stockcollection' table
  12765. *
  12766. * @ingroup tripal_chado_v1.2_schema_api
  12767. *
  12768. */
  12769. function tripal_chado_chado_schema_v1_2_stockcollection() {
  12770. $description = array(
  12771. 'description' => '',
  12772. 'fields' => array(
  12773. 'stockcollection_id' => array(
  12774. 'description' => '',
  12775. 'type' => 'serial',
  12776. 'not null' => TRUE,
  12777. ),
  12778. 'type_id' => array(
  12779. 'description' => '',
  12780. 'type' => 'int',
  12781. 'not null' => TRUE,
  12782. ),
  12783. 'contact_id' => array(
  12784. 'description' => '',
  12785. 'type' => 'int',
  12786. 'not null' => FALSE,
  12787. ),
  12788. 'name' => array(
  12789. 'description' => '',
  12790. 'type' => 'varchar',
  12791. 'length' => '255',
  12792. 'not null' => FALSE,
  12793. ),
  12794. 'uniquename' => array(
  12795. 'description' => '',
  12796. 'type' => 'text',
  12797. 'not null' => TRUE,
  12798. ),
  12799. ),
  12800. 'primary key' => array(
  12801. 0 => 'stockcollection_id',
  12802. ),
  12803. 'unique keys' => array(
  12804. 'stockcollection_c1' => array(
  12805. 0 => 'uniquename',
  12806. 1 => 'type_id',
  12807. ),
  12808. ),
  12809. 'indexes' => array(
  12810. 'stockcollection_idx1' => array(
  12811. 0 => 'contact_id',
  12812. ),
  12813. 'stockcollection_idx2' => array(
  12814. 0 => 'type_id',
  12815. ),
  12816. 'stockcollection_idx3' => array(
  12817. 0 => 'uniquename',
  12818. ),
  12819. 'stockcollection_name_ind1' => array(
  12820. 0 => 'name',
  12821. ),
  12822. ),
  12823. 'foreign keys' => array(
  12824. 'cvterm' => array(
  12825. 'table' => 'cvterm',
  12826. 'columns' => array(
  12827. 'type_id' => 'cvterm_id',
  12828. ),
  12829. ),
  12830. 'contact' => array(
  12831. 'table' => 'contact',
  12832. 'columns' => array(
  12833. 'contact_id' => 'contact_id',
  12834. ),
  12835. ),
  12836. ),
  12837. 'table' => 'stockcollection',
  12838. 'referring_tables' => array(
  12839. 0 => 'stockcollection_stock',
  12840. 1 => 'stockcollectionprop',
  12841. ),
  12842. );
  12843. return $description;
  12844. }
  12845. /**
  12846. * Implements hook_chado_schema_v1_2_stockcollection_stock()
  12847. * Purpose: To describe the structure of 'stockcollection_stock' to tripal
  12848. * @see chado_insert_record()
  12849. * @see chado_update_record()
  12850. * @see chado_select_record()
  12851. *
  12852. * @return
  12853. * An array describing the 'stockcollection_stock' table
  12854. *
  12855. * @ingroup tripal_chado_v1.2_schema_api
  12856. *
  12857. */
  12858. function tripal_chado_chado_schema_v1_2_stockcollection_stock() {
  12859. $description = array(
  12860. 'description' => '',
  12861. 'fields' => array(
  12862. 'stockcollection_stock_id' => array(
  12863. 'description' => '',
  12864. 'type' => 'serial',
  12865. 'not null' => TRUE,
  12866. ),
  12867. 'stockcollection_id' => array(
  12868. 'description' => '',
  12869. 'type' => 'int',
  12870. 'not null' => TRUE,
  12871. ),
  12872. 'stock_id' => array(
  12873. 'description' => '',
  12874. 'type' => 'int',
  12875. 'not null' => TRUE,
  12876. ),
  12877. ),
  12878. 'primary key' => array(
  12879. 0 => 'stockcollection_stock_id',
  12880. ),
  12881. 'unique keys' => array(
  12882. 'stockcollection_stock_c1' => array(
  12883. 0 => 'stockcollection_id',
  12884. 1 => 'stock_id',
  12885. ),
  12886. ),
  12887. 'indexes' => array(
  12888. 'stockcollection_stock_idx1' => array(
  12889. 0 => 'stockcollection_id',
  12890. ),
  12891. 'stockcollection_stock_idx2' => array(
  12892. 0 => 'stock_id',
  12893. ),
  12894. ),
  12895. 'foreign keys' => array(
  12896. 'stock' => array(
  12897. 'table' => 'stock',
  12898. 'columns' => array(
  12899. 'stock_id' => 'stock_id',
  12900. ),
  12901. ),
  12902. 'stockcollection' => array(
  12903. 'table' => 'stockcollection',
  12904. 'columns' => array(
  12905. 'stockcollection_id' => 'stockcollection_id',
  12906. ),
  12907. ),
  12908. ),
  12909. 'table' => 'stockcollection_stock',
  12910. 'referring_tables' => NULL,
  12911. );
  12912. return $description;
  12913. }
  12914. /**
  12915. * Implements hook_chado_schema_v1_2_stockcollectionprop()
  12916. * Purpose: To describe the structure of 'stockcollectionprop' to tripal
  12917. * @see chado_insert_record()
  12918. * @see chado_update_record()
  12919. * @see chado_select_record()
  12920. *
  12921. * @return
  12922. * An array describing the 'stockcollectionprop' table
  12923. *
  12924. * @ingroup tripal_chado_v1.2_schema_api
  12925. *
  12926. */
  12927. function tripal_chado_chado_schema_v1_2_stockcollectionprop() {
  12928. $description = array(
  12929. 'description' => '',
  12930. 'fields' => array(
  12931. 'stockcollectionprop_id' => array(
  12932. 'description' => '',
  12933. 'type' => 'serial',
  12934. 'not null' => TRUE,
  12935. ),
  12936. 'stockcollection_id' => array(
  12937. 'description' => '',
  12938. 'type' => 'int',
  12939. 'not null' => TRUE,
  12940. ),
  12941. 'type_id' => array(
  12942. 'description' => '',
  12943. 'type' => 'int',
  12944. 'not null' => TRUE,
  12945. ),
  12946. 'value' => array(
  12947. 'description' => '',
  12948. 'type' => 'text',
  12949. 'not null' => FALSE,
  12950. ),
  12951. 'rank' => array(
  12952. 'description' => '',
  12953. 'type' => 'int',
  12954. 'not null' => TRUE,
  12955. 'default' => 0,
  12956. ),
  12957. ),
  12958. 'primary key' => array(
  12959. 0 => 'stockcollectionprop_id',
  12960. ),
  12961. 'unique keys' => array(
  12962. 'stockcollectionprop_c1' => array(
  12963. 0 => 'stockcollection_id',
  12964. 1 => 'type_id',
  12965. 2 => 'rank',
  12966. ),
  12967. ),
  12968. 'indexes' => array(
  12969. 'stockcollectionprop_idx1' => array(
  12970. 0 => 'stockcollection_id',
  12971. ),
  12972. 'stockcollectionprop_idx2' => array(
  12973. 0 => 'type_id',
  12974. ),
  12975. ),
  12976. 'foreign keys' => array(
  12977. 'cvterm' => array(
  12978. 'table' => 'cvterm',
  12979. 'columns' => array(
  12980. 'type_id' => 'cvterm_id',
  12981. ),
  12982. ),
  12983. 'stockcollection' => array(
  12984. 'table' => 'stockcollection',
  12985. 'columns' => array(
  12986. 'stockcollection_id' => 'stockcollection_id',
  12987. ),
  12988. ),
  12989. ),
  12990. 'table' => 'stockcollectionprop',
  12991. 'referring_tables' => NULL,
  12992. );
  12993. return $description;
  12994. }
  12995. /**
  12996. * Implements hook_chado_schema_v1_2_stockprop()
  12997. * Purpose: To describe the structure of 'stockprop' to tripal
  12998. * @see chado_insert_record()
  12999. * @see chado_update_record()
  13000. * @see chado_select_record()
  13001. *
  13002. * @return
  13003. * An array describing the 'stockprop' table
  13004. *
  13005. * @ingroup tripal_chado_v1.2_schema_api
  13006. *
  13007. */
  13008. function tripal_chado_chado_schema_v1_2_stockprop() {
  13009. $description = array(
  13010. 'description' => '',
  13011. 'fields' => array(
  13012. 'stockprop_id' => array(
  13013. 'description' => '',
  13014. 'type' => 'serial',
  13015. 'not null' => TRUE,
  13016. ),
  13017. 'stock_id' => array(
  13018. 'description' => '',
  13019. 'type' => 'int',
  13020. 'not null' => TRUE,
  13021. ),
  13022. 'type_id' => array(
  13023. 'description' => '',
  13024. 'type' => 'int',
  13025. 'not null' => TRUE,
  13026. ),
  13027. 'value' => array(
  13028. 'description' => '',
  13029. 'type' => 'text',
  13030. 'not null' => FALSE,
  13031. ),
  13032. 'rank' => array(
  13033. 'description' => '',
  13034. 'type' => 'int',
  13035. 'not null' => TRUE,
  13036. 'default' => 0,
  13037. ),
  13038. ),
  13039. 'primary key' => array(
  13040. 0 => 'stockprop_id',
  13041. ),
  13042. 'unique keys' => array(
  13043. 'stockprop_c1' => array(
  13044. 0 => 'stock_id',
  13045. 1 => 'type_id',
  13046. 2 => 'rank',
  13047. ),
  13048. ),
  13049. 'indexes' => array(
  13050. 'stockprop_idx1' => array(
  13051. 0 => 'stock_id',
  13052. ),
  13053. 'stockprop_idx2' => array(
  13054. 0 => 'type_id',
  13055. ),
  13056. ),
  13057. 'foreign keys' => array(
  13058. 'cvterm' => array(
  13059. 'table' => 'cvterm',
  13060. 'columns' => array(
  13061. 'type_id' => 'cvterm_id',
  13062. ),
  13063. ),
  13064. 'stock' => array(
  13065. 'table' => 'stock',
  13066. 'columns' => array(
  13067. 'stock_id' => 'stock_id',
  13068. ),
  13069. ),
  13070. ),
  13071. 'table' => 'stockprop',
  13072. 'referring_tables' => array(
  13073. 0 => 'stockprop_pub',
  13074. ),
  13075. );
  13076. return $description;
  13077. }
  13078. /**
  13079. * Implements hook_chado_schema_v1_2_stockprop_pub()
  13080. * Purpose: To describe the structure of 'stockprop_pub' to tripal
  13081. * @see chado_insert_record()
  13082. * @see chado_update_record()
  13083. * @see chado_select_record()
  13084. *
  13085. * @return
  13086. * An array describing the 'stockprop_pub' table
  13087. *
  13088. * @ingroup tripal_chado_v1.2_schema_api
  13089. *
  13090. */
  13091. function tripal_chado_chado_schema_v1_2_stockprop_pub() {
  13092. $description = array(
  13093. 'description' => '',
  13094. 'fields' => array(
  13095. 'stockprop_pub_id' => array(
  13096. 'description' => '',
  13097. 'type' => 'serial',
  13098. 'not null' => TRUE,
  13099. ),
  13100. 'stockprop_id' => array(
  13101. 'description' => '',
  13102. 'type' => 'int',
  13103. 'not null' => TRUE,
  13104. ),
  13105. 'pub_id' => array(
  13106. 'description' => '',
  13107. 'type' => 'int',
  13108. 'not null' => TRUE,
  13109. ),
  13110. ),
  13111. 'primary key' => array(
  13112. 0 => 'stockprop_pub_id',
  13113. ),
  13114. 'unique keys' => array(
  13115. 'stockprop_pub_c1' => array(
  13116. 0 => 'stockprop_id',
  13117. 1 => 'pub_id',
  13118. ),
  13119. ),
  13120. 'indexes' => array(
  13121. 'stockprop_pub_idx1' => array(
  13122. 0 => 'stockprop_id',
  13123. ),
  13124. 'stockprop_pub_idx2' => array(
  13125. 0 => 'pub_id',
  13126. ),
  13127. ),
  13128. 'foreign keys' => array(
  13129. 'pub' => array(
  13130. 'table' => 'pub',
  13131. 'columns' => array(
  13132. 'pub_id' => 'pub_id',
  13133. ),
  13134. ),
  13135. 'stockprop' => array(
  13136. 'table' => 'stockprop',
  13137. 'columns' => array(
  13138. 'stockprop_id' => 'stockprop_id',
  13139. ),
  13140. ),
  13141. ),
  13142. 'table' => 'stockprop_pub',
  13143. 'referring_tables' => NULL,
  13144. );
  13145. return $description;
  13146. }
  13147. /**
  13148. * Implements hook_chado_schema_v1_2_study()
  13149. * Purpose: To describe the structure of 'study' to tripal
  13150. * @see chado_insert_record()
  13151. * @see chado_update_record()
  13152. * @see chado_select_record()
  13153. *
  13154. * @return
  13155. * An array describing the 'study' table
  13156. *
  13157. * @ingroup tripal_chado_v1.2_schema_api
  13158. *
  13159. */
  13160. function tripal_chado_chado_schema_v1_2_study() {
  13161. $description = array(
  13162. 'description' => '',
  13163. 'fields' => array(
  13164. 'study_id' => array(
  13165. 'description' => '',
  13166. 'type' => 'serial',
  13167. 'not null' => TRUE,
  13168. ),
  13169. 'contact_id' => array(
  13170. 'description' => '',
  13171. 'type' => 'int',
  13172. 'not null' => TRUE,
  13173. ),
  13174. 'pub_id' => array(
  13175. 'description' => '',
  13176. 'type' => 'int',
  13177. 'not null' => FALSE,
  13178. ),
  13179. 'dbxref_id' => array(
  13180. 'description' => '',
  13181. 'type' => 'int',
  13182. 'not null' => FALSE,
  13183. ),
  13184. 'name' => array(
  13185. 'description' => '',
  13186. 'type' => 'text',
  13187. 'not null' => TRUE,
  13188. ),
  13189. 'description' => array(
  13190. 'description' => '',
  13191. 'type' => 'text',
  13192. 'not null' => FALSE,
  13193. ),
  13194. ),
  13195. 'primary key' => array(
  13196. 0 => 'study_id',
  13197. ),
  13198. 'unique keys' => array(
  13199. 'study_c1' => array(
  13200. 0 => 'name',
  13201. ),
  13202. ),
  13203. 'indexes' => array(
  13204. 'study_idx1' => array(
  13205. 0 => 'contact_id',
  13206. ),
  13207. 'study_idx2' => array(
  13208. 0 => 'pub_id',
  13209. ),
  13210. 'study_idx3' => array(
  13211. 0 => 'dbxref_id',
  13212. ),
  13213. ),
  13214. 'foreign keys' => array(
  13215. 'dbxref' => array(
  13216. 'table' => 'dbxref',
  13217. 'columns' => array(
  13218. 'dbxref_id' => 'dbxref_id',
  13219. ),
  13220. ),
  13221. 'pub' => array(
  13222. 'table' => 'pub',
  13223. 'columns' => array(
  13224. 'pub_id' => 'pub_id',
  13225. ),
  13226. ),
  13227. 'contact' => array(
  13228. 'table' => 'contact',
  13229. 'columns' => array(
  13230. 'contact_id' => 'contact_id',
  13231. ),
  13232. ),
  13233. ),
  13234. 'table' => 'study',
  13235. 'referring_tables' => array(
  13236. 0 => 'study_assay',
  13237. 1 => 'studydesign',
  13238. 2 => 'studyprop',
  13239. ),
  13240. );
  13241. return $description;
  13242. }
  13243. /**
  13244. * Implements hook_chado_schema_v1_2_study_assay()
  13245. * Purpose: To describe the structure of 'study_assay' to tripal
  13246. * @see chado_insert_record()
  13247. * @see chado_update_record()
  13248. * @see chado_select_record()
  13249. *
  13250. * @return
  13251. * An array describing the 'study_assay' table
  13252. *
  13253. * @ingroup tripal_chado_v1.2_schema_api
  13254. *
  13255. */
  13256. function tripal_chado_chado_schema_v1_2_study_assay() {
  13257. $description = array(
  13258. 'description' => '',
  13259. 'fields' => array(
  13260. 'study_assay_id' => array(
  13261. 'description' => '',
  13262. 'type' => 'serial',
  13263. 'not null' => TRUE,
  13264. ),
  13265. 'study_id' => array(
  13266. 'description' => '',
  13267. 'type' => 'int',
  13268. 'not null' => TRUE,
  13269. ),
  13270. 'assay_id' => array(
  13271. 'description' => '',
  13272. 'type' => 'int',
  13273. 'not null' => TRUE,
  13274. ),
  13275. ),
  13276. 'primary key' => array(
  13277. 0 => 'study_assay_id',
  13278. ),
  13279. 'unique keys' => array(
  13280. 'study_assay_c1' => array(
  13281. 0 => 'study_id',
  13282. 1 => 'assay_id',
  13283. ),
  13284. ),
  13285. 'indexes' => array(
  13286. 'study_assay_idx1' => array(
  13287. 0 => 'study_id',
  13288. ),
  13289. 'study_assay_idx2' => array(
  13290. 0 => 'assay_id',
  13291. ),
  13292. ),
  13293. 'foreign keys' => array(
  13294. 'assay' => array(
  13295. 'table' => 'assay',
  13296. 'columns' => array(
  13297. 'assay_id' => 'assay_id',
  13298. ),
  13299. ),
  13300. 'study' => array(
  13301. 'table' => 'study',
  13302. 'columns' => array(
  13303. 'study_id' => 'study_id',
  13304. ),
  13305. ),
  13306. ),
  13307. 'table' => 'study_assay',
  13308. 'referring_tables' => NULL,
  13309. );
  13310. return $description;
  13311. }
  13312. /**
  13313. * Implements hook_chado_schema_v1_2_studydesign()
  13314. * Purpose: To describe the structure of 'studydesign' to tripal
  13315. * @see chado_insert_record()
  13316. * @see chado_update_record()
  13317. * @see chado_select_record()
  13318. *
  13319. * @return
  13320. * An array describing the 'studydesign' table
  13321. *
  13322. * @ingroup tripal_chado_v1.2_schema_api
  13323. *
  13324. */
  13325. function tripal_chado_chado_schema_v1_2_studydesign() {
  13326. $description = array(
  13327. 'description' => '',
  13328. 'fields' => array(
  13329. 'studydesign_id' => array(
  13330. 'description' => '',
  13331. 'type' => 'serial',
  13332. 'not null' => TRUE,
  13333. ),
  13334. 'study_id' => array(
  13335. 'description' => '',
  13336. 'type' => 'int',
  13337. 'not null' => TRUE,
  13338. ),
  13339. 'description' => array(
  13340. 'description' => '',
  13341. 'type' => 'text',
  13342. 'not null' => FALSE,
  13343. ),
  13344. ),
  13345. 'primary key' => array(
  13346. 0 => 'studydesign_id',
  13347. ),
  13348. 'unique keys' => array(),
  13349. 'indexes' => array(
  13350. 'studydesign_idx1' => array(
  13351. 0 => 'study_id',
  13352. ),
  13353. ),
  13354. 'foreign keys' => array(
  13355. 'study' => array(
  13356. 'table' => 'study',
  13357. 'columns' => array(
  13358. 'study_id' => 'study_id',
  13359. ),
  13360. ),
  13361. ),
  13362. 'table' => 'studydesign',
  13363. 'referring_tables' => array(
  13364. 0 => 'studydesignprop',
  13365. 1 => 'studyfactor',
  13366. ),
  13367. );
  13368. return $description;
  13369. }
  13370. /**
  13371. * Implements hook_chado_schema_v1_2_studydesignprop()
  13372. * Purpose: To describe the structure of 'studydesignprop' to tripal
  13373. * @see chado_insert_record()
  13374. * @see chado_update_record()
  13375. * @see chado_select_record()
  13376. *
  13377. * @return
  13378. * An array describing the 'studydesignprop' table
  13379. *
  13380. * @ingroup tripal_chado_v1.2_schema_api
  13381. *
  13382. */
  13383. function tripal_chado_chado_schema_v1_2_studydesignprop() {
  13384. $description = array(
  13385. 'description' => '',
  13386. 'fields' => array(
  13387. 'studydesignprop_id' => array(
  13388. 'description' => '',
  13389. 'type' => 'serial',
  13390. 'not null' => TRUE,
  13391. ),
  13392. 'studydesign_id' => array(
  13393. 'description' => '',
  13394. 'type' => 'int',
  13395. 'not null' => TRUE,
  13396. ),
  13397. 'type_id' => array(
  13398. 'description' => '',
  13399. 'type' => 'int',
  13400. 'not null' => TRUE,
  13401. ),
  13402. 'value' => array(
  13403. 'description' => '',
  13404. 'type' => 'text',
  13405. 'not null' => FALSE,
  13406. ),
  13407. 'rank' => array(
  13408. 'description' => '',
  13409. 'type' => 'int',
  13410. 'not null' => TRUE,
  13411. 'default' => 0,
  13412. ),
  13413. ),
  13414. 'primary key' => array(
  13415. 0 => 'studydesignprop_id',
  13416. ),
  13417. 'unique keys' => array(
  13418. 'studydesignprop_c1' => array(
  13419. 0 => 'studydesign_id',
  13420. 1 => 'type_id',
  13421. 2 => 'rank',
  13422. ),
  13423. ),
  13424. 'indexes' => array(
  13425. 'studydesignprop_idx1' => array(
  13426. 0 => 'studydesign_id',
  13427. ),
  13428. 'studydesignprop_idx2' => array(
  13429. 0 => 'type_id',
  13430. ),
  13431. ),
  13432. 'foreign keys' => array(
  13433. 'cvterm' => array(
  13434. 'table' => 'cvterm',
  13435. 'columns' => array(
  13436. 'type_id' => 'cvterm_id',
  13437. ),
  13438. ),
  13439. 'studydesign' => array(
  13440. 'table' => 'studydesign',
  13441. 'columns' => array(
  13442. 'studydesign_id' => 'studydesign_id',
  13443. ),
  13444. ),
  13445. ),
  13446. 'table' => 'studydesignprop',
  13447. 'referring_tables' => NULL,
  13448. );
  13449. return $description;
  13450. }
  13451. /**
  13452. * Implements hook_chado_schema_v1_2_studyfactor()
  13453. * Purpose: To describe the structure of 'studyfactor' to tripal
  13454. * @see chado_insert_record()
  13455. * @see chado_update_record()
  13456. * @see chado_select_record()
  13457. *
  13458. * @return
  13459. * An array describing the 'studyfactor' table
  13460. *
  13461. * @ingroup tripal_chado_v1.2_schema_api
  13462. *
  13463. */
  13464. function tripal_chado_chado_schema_v1_2_studyfactor() {
  13465. $description = array(
  13466. 'description' => '',
  13467. 'fields' => array(
  13468. 'studyfactor_id' => array(
  13469. 'description' => '',
  13470. 'type' => 'serial',
  13471. 'not null' => TRUE,
  13472. ),
  13473. 'studydesign_id' => array(
  13474. 'description' => '',
  13475. 'type' => 'int',
  13476. 'not null' => TRUE,
  13477. ),
  13478. 'type_id' => array(
  13479. 'description' => '',
  13480. 'type' => 'int',
  13481. 'not null' => FALSE,
  13482. ),
  13483. 'name' => array(
  13484. 'description' => '',
  13485. 'type' => 'text',
  13486. 'not null' => TRUE,
  13487. ),
  13488. 'description' => array(
  13489. 'description' => '',
  13490. 'type' => 'text',
  13491. 'not null' => FALSE,
  13492. ),
  13493. ),
  13494. 'primary key' => array(
  13495. 0 => 'studyfactor_id',
  13496. ),
  13497. 'unique keys' => array(),
  13498. 'indexes' => array(
  13499. 'studyfactor_idx1' => array(
  13500. 0 => 'studydesign_id',
  13501. ),
  13502. 'studyfactor_idx2' => array(
  13503. 0 => 'type_id',
  13504. ),
  13505. ),
  13506. 'foreign keys' => array(
  13507. 'cvterm' => array(
  13508. 'table' => 'cvterm',
  13509. 'columns' => array(
  13510. 'type_id' => 'cvterm_id',
  13511. ),
  13512. ),
  13513. 'studydesign' => array(
  13514. 'table' => 'studydesign',
  13515. 'columns' => array(
  13516. 'studydesign_id' => 'studydesign_id',
  13517. ),
  13518. ),
  13519. ),
  13520. 'table' => 'studyfactor',
  13521. 'referring_tables' => array(
  13522. 0 => 'studyfactorvalue',
  13523. ),
  13524. );
  13525. return $description;
  13526. }
  13527. /**
  13528. * Implements hook_chado_schema_v1_2_studyfactorvalue()
  13529. * Purpose: To describe the structure of 'studyfactorvalue' to tripal
  13530. * @see chado_insert_record()
  13531. * @see chado_update_record()
  13532. * @see chado_select_record()
  13533. *
  13534. * @return
  13535. * An array describing the 'studyfactorvalue' table
  13536. *
  13537. * @ingroup tripal_chado_v1.2_schema_api
  13538. *
  13539. */
  13540. function tripal_chado_chado_schema_v1_2_studyfactorvalue() {
  13541. $description = array(
  13542. 'description' => '',
  13543. 'fields' => array(
  13544. 'studyfactorvalue_id' => array(
  13545. 'description' => '',
  13546. 'type' => 'serial',
  13547. 'not null' => TRUE,
  13548. ),
  13549. 'studyfactor_id' => array(
  13550. 'description' => '',
  13551. 'type' => 'int',
  13552. 'not null' => TRUE,
  13553. ),
  13554. 'assay_id' => array(
  13555. 'description' => '',
  13556. 'type' => 'int',
  13557. 'not null' => TRUE,
  13558. ),
  13559. 'factorvalue' => array(
  13560. 'description' => '',
  13561. 'type' => 'text',
  13562. 'not null' => FALSE,
  13563. ),
  13564. 'name' => array(
  13565. 'description' => '',
  13566. 'type' => 'text',
  13567. 'not null' => FALSE,
  13568. ),
  13569. 'rank' => array(
  13570. 'description' => '',
  13571. 'type' => 'int',
  13572. 'not null' => TRUE,
  13573. 'default' => 0,
  13574. ),
  13575. ),
  13576. 'primary key' => array(
  13577. 0 => 'studyfactorvalue_id',
  13578. ),
  13579. 'unique keys' => array(),
  13580. 'indexes' => array(
  13581. 'studyfactorvalue_idx1' => array(
  13582. 0 => 'studyfactor_id',
  13583. ),
  13584. 'studyfactorvalue_idx2' => array(
  13585. 0 => 'assay_id',
  13586. ),
  13587. ),
  13588. 'foreign keys' => array(
  13589. 'assay' => array(
  13590. 'table' => 'assay',
  13591. 'columns' => array(
  13592. 'assay_id' => 'assay_id',
  13593. ),
  13594. ),
  13595. 'studyfactor' => array(
  13596. 'table' => 'studyfactor',
  13597. 'columns' => array(
  13598. 'studyfactor_id' => 'studyfactor_id',
  13599. ),
  13600. ),
  13601. ),
  13602. 'table' => 'studyfactorvalue',
  13603. 'referring_tables' => NULL,
  13604. );
  13605. return $description;
  13606. }
  13607. /**
  13608. * Implements hook_chado_schema_v1_2_studyprop()
  13609. * Purpose: To describe the structure of 'studyprop' to tripal
  13610. * @see chado_insert_record()
  13611. * @see chado_update_record()
  13612. * @see chado_select_record()
  13613. *
  13614. * @return
  13615. * An array describing the 'studyprop' table
  13616. *
  13617. * @ingroup tripal_chado_v1.2_schema_api
  13618. *
  13619. */
  13620. function tripal_chado_chado_schema_v1_2_studyprop() {
  13621. $description = array(
  13622. 'description' => '',
  13623. 'fields' => array(
  13624. 'studyprop_id' => array(
  13625. 'description' => '',
  13626. 'type' => 'serial',
  13627. 'not null' => TRUE,
  13628. ),
  13629. 'study_id' => array(
  13630. 'description' => '',
  13631. 'type' => 'int',
  13632. 'not null' => TRUE,
  13633. ),
  13634. 'type_id' => array(
  13635. 'description' => '',
  13636. 'type' => 'int',
  13637. 'not null' => TRUE,
  13638. ),
  13639. 'value' => array(
  13640. 'description' => '',
  13641. 'type' => 'text',
  13642. 'not null' => FALSE,
  13643. ),
  13644. 'rank' => array(
  13645. 'description' => '',
  13646. 'type' => 'int',
  13647. 'not null' => TRUE,
  13648. 'default' => 0,
  13649. ),
  13650. ),
  13651. 'primary key' => array(
  13652. 0 => 'studyprop_id',
  13653. ),
  13654. 'unique keys' => array(
  13655. 'study_id' => array(
  13656. 0 => 'study_id',
  13657. 1 => 'type_id',
  13658. 2 => 'rank',
  13659. ),
  13660. ),
  13661. 'indexes' => array(
  13662. 'studyprop_idx1' => array(
  13663. 0 => 'study_id',
  13664. ),
  13665. 'studyprop_idx2' => array(
  13666. 0 => 'type_id',
  13667. ),
  13668. ),
  13669. 'foreign keys' => array(
  13670. 'cvterm' => array(
  13671. 'table' => 'cvterm',
  13672. 'columns' => array(
  13673. 'type_id' => 'cvterm_id',
  13674. ),
  13675. ),
  13676. 'study' => array(
  13677. 'table' => 'study',
  13678. 'columns' => array(
  13679. 'study_id' => 'study_id',
  13680. ),
  13681. ),
  13682. ),
  13683. 'table' => 'studyprop',
  13684. 'referring_tables' => array(
  13685. 0 => 'studyprop_feature',
  13686. ),
  13687. );
  13688. return $description;
  13689. }
  13690. /**
  13691. * Implements hook_chado_schema_v1_2_studyprop_feature()
  13692. * Purpose: To describe the structure of 'studyprop_feature' to tripal
  13693. * @see chado_insert_record()
  13694. * @see chado_update_record()
  13695. * @see chado_select_record()
  13696. *
  13697. * @return
  13698. * An array describing the 'studyprop_feature' table
  13699. *
  13700. * @ingroup tripal_chado_v1.2_schema_api
  13701. *
  13702. */
  13703. function tripal_chado_chado_schema_v1_2_studyprop_feature() {
  13704. $description = array(
  13705. 'description' => '',
  13706. 'fields' => array(
  13707. 'studyprop_feature_id' => array(
  13708. 'description' => '',
  13709. 'type' => 'serial',
  13710. 'not null' => TRUE,
  13711. ),
  13712. 'studyprop_id' => array(
  13713. 'description' => '',
  13714. 'type' => 'int',
  13715. 'not null' => TRUE,
  13716. ),
  13717. 'feature_id' => array(
  13718. 'description' => '',
  13719. 'type' => 'int',
  13720. 'not null' => TRUE,
  13721. ),
  13722. 'type_id' => array(
  13723. 'description' => '',
  13724. 'type' => 'int',
  13725. 'not null' => FALSE,
  13726. ),
  13727. ),
  13728. 'primary key' => array(
  13729. 0 => 'studyprop_feature_id',
  13730. ),
  13731. 'unique keys' => array(
  13732. 'studyprop_id' => array(
  13733. 0 => 'studyprop_id',
  13734. 1 => 'feature_id',
  13735. ),
  13736. ),
  13737. 'indexes' => array(
  13738. 'studyprop_feature_idx1' => array(
  13739. 0 => 'studyprop_id',
  13740. ),
  13741. 'studyprop_feature_idx2' => array(
  13742. 0 => 'feature_id',
  13743. ),
  13744. ),
  13745. 'foreign keys' => array(
  13746. 'cvterm' => array(
  13747. 'table' => 'cvterm',
  13748. 'columns' => array(
  13749. 'type_id' => 'cvterm_id',
  13750. ),
  13751. ),
  13752. 'feature' => array(
  13753. 'table' => 'feature',
  13754. 'columns' => array(
  13755. 'feature_id' => 'feature_id',
  13756. ),
  13757. ),
  13758. 'studyprop' => array(
  13759. 'table' => 'studyprop',
  13760. 'columns' => array(
  13761. 'studyprop_id' => 'studyprop_id',
  13762. ),
  13763. ),
  13764. ),
  13765. 'table' => 'studyprop_feature',
  13766. 'referring_tables' => NULL,
  13767. );
  13768. return $description;
  13769. }
  13770. /**
  13771. * Implements hook_chado_schema_v1_2_synonym()
  13772. * Purpose: To describe the structure of 'synonym' to tripal
  13773. * @see chado_insert_record()
  13774. * @see chado_update_record()
  13775. * @see chado_select_record()
  13776. *
  13777. * @return
  13778. * An array describing the 'synonym' table
  13779. *
  13780. * @ingroup tripal_chado_v1.2_schema_api
  13781. *
  13782. */
  13783. function tripal_chado_chado_schema_v1_2_synonym() {
  13784. $description = array(
  13785. 'description' => '',
  13786. 'fields' => array(
  13787. 'synonym_id' => array(
  13788. 'description' => '',
  13789. 'type' => 'serial',
  13790. 'not null' => TRUE,
  13791. ),
  13792. 'name' => array(
  13793. 'description' => '',
  13794. 'type' => 'varchar',
  13795. 'length' => '255',
  13796. 'not null' => TRUE,
  13797. ),
  13798. 'type_id' => array(
  13799. 'description' => '',
  13800. 'type' => 'int',
  13801. 'not null' => TRUE,
  13802. ),
  13803. 'synonym_sgml' => array(
  13804. 'description' => '',
  13805. 'type' => 'varchar',
  13806. 'length' => '255',
  13807. 'not null' => TRUE,
  13808. ),
  13809. ),
  13810. 'primary key' => array(
  13811. 0 => 'synonym_id',
  13812. ),
  13813. 'unique keys' => array(
  13814. 'synonym_c1' => array(
  13815. 0 => 'name',
  13816. 1 => 'type_id',
  13817. ),
  13818. ),
  13819. 'indexes' => array(
  13820. 'synonym_idx1' => array(
  13821. 0 => 'type_id',
  13822. ),
  13823. ),
  13824. 'foreign keys' => array(
  13825. 'cvterm' => array(
  13826. 'table' => 'cvterm',
  13827. 'columns' => array(
  13828. 'type_id' => 'cvterm_id',
  13829. ),
  13830. ),
  13831. ),
  13832. 'table' => 'synonym',
  13833. 'referring_tables' => array(
  13834. 0 => 'cell_line_synonym',
  13835. 1 => 'feature_synonym',
  13836. 2 => 'library_synonym',
  13837. ),
  13838. );
  13839. return $description;
  13840. }
  13841. /**
  13842. * Implements hook_chado_schema_v1_2_tableinfo()
  13843. * Purpose: To describe the structure of 'tableinfo' to tripal
  13844. * @see chado_insert_record()
  13845. * @see chado_update_record()
  13846. * @see chado_select_record()
  13847. *
  13848. * @return
  13849. * An array describing the 'tableinfo' table
  13850. *
  13851. * @ingroup tripal_chado_v1.2_schema_api
  13852. *
  13853. */
  13854. function tripal_chado_chado_schema_v1_2_tableinfo() {
  13855. $description = array(
  13856. 'description' => '',
  13857. 'fields' => array(
  13858. 'tableinfo_id' => array(
  13859. 'description' => '',
  13860. 'type' => 'serial',
  13861. 'not null' => TRUE,
  13862. ),
  13863. 'name' => array(
  13864. 'description' => '',
  13865. 'type' => 'varchar',
  13866. 'length' => '30',
  13867. 'not null' => TRUE,
  13868. ),
  13869. 'primary_key_column' => array(
  13870. 'description' => '',
  13871. 'type' => 'varchar',
  13872. 'length' => '30',
  13873. 'not null' => FALSE,
  13874. ),
  13875. 'is_view' => array(
  13876. 'description' => '',
  13877. 'type' => 'int',
  13878. 'not null' => TRUE,
  13879. 'default' => 0,
  13880. ),
  13881. 'view_on_table_id' => array(
  13882. 'description' => '',
  13883. 'type' => 'int',
  13884. 'not null' => FALSE,
  13885. ),
  13886. 'superclass_table_id' => array(
  13887. 'description' => '',
  13888. 'type' => 'int',
  13889. 'not null' => FALSE,
  13890. ),
  13891. 'is_updateable' => array(
  13892. 'description' => '',
  13893. 'type' => 'int',
  13894. 'not null' => TRUE,
  13895. 'default' => 1,
  13896. ),
  13897. 'modification_date' => array(
  13898. 'description' => '',
  13899. 'type' => 'date',
  13900. 'not null' => TRUE,
  13901. 'default' => 'now()',
  13902. ),
  13903. ),
  13904. 'primary key' => array(
  13905. 0 => 'tableinfo_id',
  13906. ),
  13907. 'unique keys' => array(
  13908. 'tableinfo_c1' => array(
  13909. 0 => 'name',
  13910. ),
  13911. ),
  13912. 'foreign keys' => array(
  13913. ),
  13914. 'table' => 'tableinfo',
  13915. 'referring_tables' => array(
  13916. 0 => 'control',
  13917. 1 => 'magedocumentation',
  13918. ),
  13919. );
  13920. return $description;
  13921. }
  13922. /**
  13923. * Implements hook_chado_schema_v1_2_treatment()
  13924. * Purpose: To describe the structure of 'treatment' to tripal
  13925. * @see chado_insert_record()
  13926. * @see chado_update_record()
  13927. * @see chado_select_record()
  13928. *
  13929. * @return
  13930. * An array describing the 'treatment' table
  13931. *
  13932. * @ingroup tripal_chado_v1.2_schema_api
  13933. *
  13934. */
  13935. function tripal_chado_chado_schema_v1_2_treatment() {
  13936. $description = array(
  13937. 'description' => '',
  13938. 'fields' => array(
  13939. 'treatment_id' => array(
  13940. 'description' => '',
  13941. 'type' => 'serial',
  13942. 'not null' => TRUE,
  13943. ),
  13944. 'rank' => array(
  13945. 'description' => '',
  13946. 'type' => 'int',
  13947. 'not null' => TRUE,
  13948. 'default' => 0,
  13949. ),
  13950. 'biomaterial_id' => array(
  13951. 'description' => '',
  13952. 'type' => 'int',
  13953. 'not null' => TRUE,
  13954. ),
  13955. 'type_id' => array(
  13956. 'description' => '',
  13957. 'type' => 'int',
  13958. 'not null' => TRUE,
  13959. ),
  13960. 'protocol_id' => array(
  13961. 'description' => '',
  13962. 'type' => 'int',
  13963. 'not null' => FALSE,
  13964. ),
  13965. 'name' => array(
  13966. 'description' => '',
  13967. 'type' => 'text',
  13968. 'not null' => FALSE,
  13969. ),
  13970. ),
  13971. 'primary key' => array(
  13972. 0 => 'treatment_id',
  13973. ),
  13974. 'unique keys' => array(),
  13975. 'indexes' => array(
  13976. 'treatment_idx1' => array(
  13977. 0 => 'biomaterial_id',
  13978. ),
  13979. 'treatment_idx2' => array(
  13980. 0 => 'type_id',
  13981. ),
  13982. 'treatment_idx3' => array(
  13983. 0 => 'protocol_id',
  13984. ),
  13985. ),
  13986. 'foreign keys' => array(
  13987. 'cvterm' => array(
  13988. 'table' => 'cvterm',
  13989. 'columns' => array(
  13990. 'type_id' => 'cvterm_id',
  13991. ),
  13992. ),
  13993. 'protocol' => array(
  13994. 'table' => 'protocol',
  13995. 'columns' => array(
  13996. 'protocol_id' => 'protocol_id',
  13997. ),
  13998. ),
  13999. 'biomaterial' => array(
  14000. 'table' => 'biomaterial',
  14001. 'columns' => array(
  14002. 'biomaterial_id' => 'biomaterial_id',
  14003. ),
  14004. ),
  14005. ),
  14006. 'table' => 'treatment',
  14007. 'referring_tables' => array(
  14008. 0 => 'biomaterial_treatment',
  14009. ),
  14010. );
  14011. return $description;
  14012. }
  14013. /**
  14014. * Lists the table names in the v1.2 chado schema
  14015. *
  14016. * @return
  14017. * An array containing all of the table names
  14018. *
  14019. * @ingroup tripal_chado_v1.2_schema_api
  14020. *
  14021. */
  14022. function tripal_chado_chado_get_v1_2_tables() {
  14023. $tables = array(
  14024. 'acquisition',
  14025. 'acquisition_relationship',
  14026. 'acquisitionprop',
  14027. 'analysis',
  14028. 'analysisfeature',
  14029. 'analysisfeatureprop',
  14030. 'analysisprop',
  14031. 'arraydesign',
  14032. 'arraydesignprop',
  14033. 'assay',
  14034. 'assay_biomaterial',
  14035. 'assay_project',
  14036. 'assayprop',
  14037. 'biomaterial',
  14038. 'biomaterial_dbxref',
  14039. 'biomaterial_relationship',
  14040. 'biomaterial_treatment',
  14041. 'biomaterialprop',
  14042. 'cell_line',
  14043. 'cell_line_cvterm',
  14044. 'cell_line_cvtermprop',
  14045. 'cell_line_dbxref',
  14046. 'cell_line_feature',
  14047. 'cell_line_library',
  14048. 'cell_line_pub',
  14049. 'cell_line_relationship',
  14050. 'cell_line_synonym',
  14051. 'cell_lineprop',
  14052. 'cell_lineprop_pub',
  14053. 'chadoprop',
  14054. 'channel',
  14055. 'contact',
  14056. 'contact_relationship',
  14057. 'control',
  14058. 'cv',
  14059. 'cvprop',
  14060. 'cvterm',
  14061. 'cvterm_dbxref',
  14062. 'cvterm_relationship',
  14063. 'cvtermpath',
  14064. 'cvtermprop',
  14065. 'cvtermsynonym',
  14066. 'db',
  14067. 'dbxref',
  14068. 'dbxrefprop',
  14069. 'eimage',
  14070. 'element',
  14071. 'element_relationship',
  14072. 'elementresult',
  14073. 'elementresult_relationship',
  14074. 'environment',
  14075. 'environment_cvterm',
  14076. 'expression',
  14077. 'expression_cvterm',
  14078. 'expression_cvtermprop',
  14079. 'expression_image',
  14080. 'expression_pub',
  14081. 'expressionprop',
  14082. 'feature',
  14083. 'feature_cvterm',
  14084. 'feature_cvterm_dbxref',
  14085. 'feature_cvterm_pub',
  14086. 'feature_cvtermprop',
  14087. 'feature_dbxref',
  14088. 'feature_expression',
  14089. 'feature_expressionprop',
  14090. 'feature_genotype',
  14091. 'feature_phenotype',
  14092. 'feature_pub',
  14093. 'feature_pubprop',
  14094. 'feature_relationship',
  14095. 'feature_relationship_pub',
  14096. 'feature_relationshipprop',
  14097. 'feature_relationshipprop_pub',
  14098. 'feature_synonym',
  14099. 'featureloc',
  14100. 'featureloc_pub',
  14101. 'featuremap',
  14102. 'featuremap_pub',
  14103. 'featurepos',
  14104. 'featureprop',
  14105. 'featureprop_pub',
  14106. 'featurerange',
  14107. 'genotype',
  14108. 'genotypeprop',
  14109. 'library',
  14110. 'library_cvterm',
  14111. 'library_dbxref',
  14112. 'library_feature',
  14113. 'library_pub',
  14114. 'library_synonym',
  14115. 'libraryprop',
  14116. 'libraryprop_pub',
  14117. 'magedocumentation',
  14118. 'mageml',
  14119. 'nd_experiment',
  14120. 'nd_experiment_contact',
  14121. 'nd_experiment_dbxref',
  14122. 'nd_experiment_genotype',
  14123. 'nd_experiment_phenotype',
  14124. 'nd_experiment_project',
  14125. 'nd_experiment_protocol',
  14126. 'nd_experiment_pub',
  14127. 'nd_experiment_stock',
  14128. 'nd_experiment_stock_dbxref',
  14129. 'nd_experiment_stockprop',
  14130. 'nd_experimentprop',
  14131. 'nd_geolocation',
  14132. 'nd_geolocationprop',
  14133. 'nd_protocol',
  14134. 'nd_protocol_reagent',
  14135. 'nd_protocolprop',
  14136. 'nd_reagent',
  14137. 'nd_reagent_relationship',
  14138. 'nd_reagentprop',
  14139. 'organism',
  14140. 'organism_dbxref',
  14141. 'organismprop',
  14142. 'phendesc',
  14143. 'phenotype',
  14144. 'phenotype_comparison',
  14145. 'phenotype_comparison_cvterm',
  14146. 'phenotype_cvterm',
  14147. 'phenstatement',
  14148. 'phylonode',
  14149. 'phylonode_dbxref',
  14150. 'phylonode_organism',
  14151. 'phylonode_pub',
  14152. 'phylonode_relationship',
  14153. 'phylonodeprop',
  14154. 'phylotree',
  14155. 'phylotree_pub',
  14156. 'project',
  14157. 'project_contact',
  14158. 'project_pub',
  14159. 'project_relationship',
  14160. 'projectprop',
  14161. 'protocol',
  14162. 'protocolparam',
  14163. 'pub',
  14164. 'pub_dbxref',
  14165. 'pub_relationship',
  14166. 'pubauthor',
  14167. 'pubprop',
  14168. 'quantification',
  14169. 'quantification_relationship',
  14170. 'quantificationprop',
  14171. 'stock',
  14172. 'stock_cvterm',
  14173. 'stock_cvtermprop',
  14174. 'stock_dbxref',
  14175. 'stock_dbxrefprop',
  14176. 'stock_genotype',
  14177. 'stock_pub',
  14178. 'stock_relationship',
  14179. 'stock_relationship_cvterm',
  14180. 'stock_relationship_pub',
  14181. 'stockcollection',
  14182. 'stockcollection_stock',
  14183. 'stockcollectionprop',
  14184. 'stockprop',
  14185. 'stockprop_pub',
  14186. 'study',
  14187. 'study_assay',
  14188. 'studydesign',
  14189. 'studydesignprop',
  14190. 'studyfactor',
  14191. 'studyfactorvalue',
  14192. 'studyprop',
  14193. 'studyprop_feature',
  14194. 'synonym',
  14195. 'tableinfo',
  14196. 'treatment'
  14197. );
  14198. return $tables;
  14199. }