tripal_chado.schema_v1.2.api.inc 334 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182
  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. 'indexes' => array(
  2821. 'control_idx1' => array(
  2822. 0 => 'type_id',
  2823. ),
  2824. 'control_idx2' => array(
  2825. 0 => 'assay_id',
  2826. ),
  2827. 'control_idx3' => array(
  2828. 0 => 'tableinfo_id',
  2829. ),
  2830. 'control_idx4' => array(
  2831. 0 => 'row_id',
  2832. ),
  2833. ),
  2834. 'foreign keys' => array(
  2835. 'cvterm' => array(
  2836. 'table' => 'cvterm',
  2837. 'columns' => array(
  2838. 'type_id' => 'cvterm_id',
  2839. ),
  2840. ),
  2841. 'tableinfo' => array(
  2842. 'table' => 'tableinfo',
  2843. 'columns' => array(
  2844. 'tableinfo_id' => 'tableinfo_id',
  2845. ),
  2846. ),
  2847. 'assay' => array(
  2848. 'table' => 'assay',
  2849. 'columns' => array(
  2850. 'assay_id' => 'assay_id',
  2851. ),
  2852. ),
  2853. ),
  2854. 'table' => 'control',
  2855. 'referring_tables' => NULL,
  2856. );
  2857. return $description;
  2858. }
  2859. /**
  2860. * Implements hook_chado_schema_v1_2_cv()
  2861. * Purpose: To describe the structure of 'cv' to tripal
  2862. * @see chado_insert_record()
  2863. * @see chado_update_record()
  2864. * @see chado_select_record()
  2865. *
  2866. * @return
  2867. * An array describing the 'cv' table
  2868. *
  2869. * @ingroup tripal_chado_v1.2_schema_api
  2870. *
  2871. */
  2872. function tripal_chado_chado_schema_v1_2_cv() {
  2873. $description = array(
  2874. 'description' => '',
  2875. 'fields' => array(
  2876. 'cv_id' => array(
  2877. 'description' => '',
  2878. 'type' => 'serial',
  2879. 'not null' => TRUE,
  2880. ),
  2881. 'name' => array(
  2882. 'description' => '',
  2883. 'type' => 'varchar',
  2884. 'length' => '255',
  2885. 'not null' => TRUE,
  2886. ),
  2887. 'definition' => array(
  2888. 'description' => '',
  2889. 'type' => 'text',
  2890. 'not null' => FALSE,
  2891. ),
  2892. ),
  2893. 'primary key' => array(
  2894. 0 => 'cv_id',
  2895. ),
  2896. 'unique keys' => array(
  2897. 'cv_c1' => array(
  2898. 0 => 'name',
  2899. ),
  2900. ),
  2901. 'foreign keys' => array(
  2902. ),
  2903. 'table' => 'cv',
  2904. 'referring_tables' => array(
  2905. 0 => 'cvprop',
  2906. 1 => 'cvterm',
  2907. 2 => 'cvtermpath',
  2908. ),
  2909. );
  2910. return $description;
  2911. }
  2912. /**
  2913. * Implements hook_chado_schema_v1_2_cvprop()
  2914. * Purpose: To describe the structure of 'cvprop' to tripal
  2915. * @see chado_insert_record()
  2916. * @see chado_update_record()
  2917. * @see chado_select_record()
  2918. *
  2919. * @return
  2920. * An array describing the 'cvprop' table
  2921. *
  2922. * @ingroup tripal_chado_v1.2_schema_api
  2923. *
  2924. */
  2925. function tripal_chado_chado_schema_v1_2_cvprop() {
  2926. $description = array(
  2927. 'description' => '',
  2928. 'fields' => array(
  2929. 'cvprop_id' => array(
  2930. 'description' => '',
  2931. 'type' => 'serial',
  2932. 'not null' => TRUE,
  2933. ),
  2934. 'cv_id' => array(
  2935. 'description' => '',
  2936. 'type' => 'int',
  2937. 'not null' => TRUE,
  2938. ),
  2939. 'type_id' => array(
  2940. 'description' => '',
  2941. 'type' => 'int',
  2942. 'not null' => TRUE,
  2943. ),
  2944. 'value' => array(
  2945. 'description' => '',
  2946. 'type' => 'text',
  2947. 'not null' => FALSE,
  2948. ),
  2949. 'rank' => array(
  2950. 'description' => '',
  2951. 'type' => 'int',
  2952. 'not null' => TRUE,
  2953. 'default' => 0,
  2954. ),
  2955. ),
  2956. 'primary key' => array(
  2957. 0 => 'cvprop_id',
  2958. ),
  2959. 'unique keys' => array(
  2960. 'cvprop_c1' => array(
  2961. 0 => 'cv_id',
  2962. 1 => 'type_id',
  2963. 2 => 'rank',
  2964. ),
  2965. ),
  2966. 'foreign keys' => array(
  2967. 'cvterm' => array(
  2968. 'table' => 'cvterm',
  2969. 'columns' => array(
  2970. 'type_id' => 'cvterm_id',
  2971. ),
  2972. ),
  2973. 'cv' => array(
  2974. 'table' => 'cv',
  2975. 'columns' => array(
  2976. 'cv_id' => 'cv_id',
  2977. ),
  2978. ),
  2979. ),
  2980. 'table' => 'cvprop',
  2981. 'referring_tables' => NULL,
  2982. );
  2983. return $description;
  2984. }
  2985. /**
  2986. * Implements hook_chado_schema_v1_2_cvterm()
  2987. * Purpose: To describe the structure of 'cvterm' to tripal
  2988. * @see chado_insert_record()
  2989. * @see chado_update_record()
  2990. * @see chado_select_record()
  2991. *
  2992. * @return
  2993. * An array describing the 'cvterm' table
  2994. *
  2995. * @ingroup tripal_chado_v1.2_schema_api
  2996. *
  2997. */
  2998. function tripal_chado_chado_schema_v1_2_cvterm() {
  2999. $description = array(
  3000. 'description' => '',
  3001. 'fields' => array(
  3002. 'cvterm_id' => array(
  3003. 'description' => '',
  3004. 'type' => 'serial',
  3005. 'not null' => TRUE,
  3006. ),
  3007. 'cv_id' => array(
  3008. 'description' => '',
  3009. 'type' => 'int',
  3010. 'not null' => TRUE,
  3011. ),
  3012. 'name' => array(
  3013. 'description' => '',
  3014. 'type' => 'varchar',
  3015. 'length' => '1024',
  3016. 'not null' => TRUE,
  3017. ),
  3018. 'definition' => array(
  3019. 'description' => '',
  3020. 'type' => 'text',
  3021. 'not null' => FALSE,
  3022. ),
  3023. 'dbxref_id' => array(
  3024. 'description' => '',
  3025. 'type' => 'int',
  3026. 'not null' => TRUE,
  3027. ),
  3028. 'is_obsolete' => array(
  3029. 'description' => '',
  3030. 'type' => 'int',
  3031. 'not null' => TRUE,
  3032. 'default' => 0,
  3033. ),
  3034. 'is_relationshiptype' => array(
  3035. 'description' => '',
  3036. 'type' => 'int',
  3037. 'not null' => TRUE,
  3038. 'default' => 0,
  3039. ),
  3040. ),
  3041. 'primary key' => array(
  3042. 0 => 'cvterm_id',
  3043. ),
  3044. 'unique keys' => array(
  3045. 'cvterm_c1' => array(
  3046. 0 => 'name',
  3047. 1 => 'cv_id',
  3048. 2 => 'is_obsolete',
  3049. ),
  3050. 'cvterm_c2' => array(
  3051. 0 => 'dbxref_id',
  3052. ),
  3053. ),
  3054. 'indexes' => array(
  3055. 'cvterm_idx1' => array(
  3056. 0 => 'cv_id',
  3057. ),
  3058. 'cvterm_idx2' => array(
  3059. 0 => 'name',
  3060. ),
  3061. 'cvterm_idx3' => array(
  3062. 0 => 'dbxref_id',
  3063. ),
  3064. ),
  3065. 'foreign keys' => array(
  3066. 'cv' => array(
  3067. 'table' => 'cv',
  3068. 'columns' => array(
  3069. 'cv_id' => 'cv_id',
  3070. ),
  3071. ),
  3072. 'dbxref' => array(
  3073. 'table' => 'dbxref',
  3074. 'columns' => array(
  3075. 'dbxref_id' => 'dbxref_id',
  3076. ),
  3077. ),
  3078. ),
  3079. 'table' => 'cvterm',
  3080. 'referring_tables' => array(
  3081. 0 => 'acquisition_relationship',
  3082. 1 => 'acquisitionprop',
  3083. 2 => 'analysisfeatureprop',
  3084. 3 => 'analysisprop',
  3085. 4 => 'arraydesign',
  3086. 6 => 'arraydesignprop',
  3087. 7 => 'assayprop',
  3088. 8 => 'biomaterial_relationship',
  3089. 9 => 'biomaterial_treatment',
  3090. 10 => 'biomaterialprop',
  3091. 11 => 'cell_line_cvterm',
  3092. 12 => 'cell_line_cvtermprop',
  3093. 13 => 'cell_line_relationship',
  3094. 14 => 'cell_lineprop',
  3095. 15 => 'chadoprop',
  3096. 23 => 'contact',
  3097. 24 => 'contact_relationship',
  3098. 25 => 'control',
  3099. 26 => 'cvprop',
  3100. 27 => 'cvterm_dbxref',
  3101. 28 => 'cvterm_relationship',
  3102. 31 => 'cvtermpath',
  3103. 34 => 'cvtermprop',
  3104. 36 => 'cvtermsynonym',
  3105. 38 => 'dbxrefprop',
  3106. 39 => 'element',
  3107. 40 => 'element_relationship',
  3108. 41 => 'elementresult_relationship',
  3109. 42 => 'environment_cvterm',
  3110. 43 => 'expression_cvterm',
  3111. 45 => 'expression_cvtermprop',
  3112. 46 => 'expressionprop',
  3113. 47 => 'feature',
  3114. 48 => 'feature_cvterm',
  3115. 49 => 'feature_cvtermprop',
  3116. 50 => 'feature_expressionprop',
  3117. 51 => 'feature_genotype',
  3118. 52 => 'feature_pubprop',
  3119. 53 => 'feature_relationship',
  3120. 54 => 'feature_relationshipprop',
  3121. 55 => 'featuremap',
  3122. 56 => 'featureprop',
  3123. 57 => 'genotype',
  3124. 58 => 'genotypeprop',
  3125. 66 => 'library',
  3126. 67 => 'library_cvterm',
  3127. 68 => 'libraryprop',
  3128. 69 => 'nd_experiment',
  3129. 70 => 'nd_experiment_stock',
  3130. 71 => 'nd_experiment_stockprop',
  3131. 72 => 'nd_experimentprop',
  3132. 73 => 'nd_geolocationprop',
  3133. 74 => 'nd_protocol',
  3134. 75 => 'nd_protocol_reagent',
  3135. 76 => 'nd_protocolprop',
  3136. 77 => 'nd_reagent',
  3137. 78 => 'nd_reagent_relationship',
  3138. 79 => 'nd_reagentprop',
  3139. 80 => 'organismprop',
  3140. 81 => 'phendesc',
  3141. 82 => 'phenotype',
  3142. 86 => 'phenotype_comparison_cvterm',
  3143. 87 => 'phenotype_cvterm',
  3144. 88 => 'phenstatement',
  3145. 89 => 'phylonode',
  3146. 90 => 'phylonode_relationship',
  3147. 91 => 'phylonodeprop',
  3148. 92 => 'phylotree',
  3149. 93 => 'project_relationship',
  3150. 101 => 'projectprop',
  3151. 109 => 'protocol',
  3152. 110 => 'protocolparam',
  3153. 112 => 'pub',
  3154. 113 => 'pub_relationship',
  3155. 114 => 'pubprop',
  3156. 115 => 'quantification_relationship',
  3157. 116 => 'quantificationprop',
  3158. 117 => 'stock',
  3159. 118 => 'stock_cvterm',
  3160. 119 => 'stock_cvtermprop',
  3161. 127 => 'stock_dbxrefprop',
  3162. 135 => 'stock_relationship',
  3163. 136 => 'stock_relationship_cvterm',
  3164. 144 => 'stockcollection',
  3165. 145 => 'stockcollectionprop',
  3166. 146 => 'stockprop',
  3167. 147 => 'studydesignprop',
  3168. 148 => 'studyfactor',
  3169. 149 => 'studyprop',
  3170. 150 => 'studyprop_feature',
  3171. 151 => 'synonym',
  3172. 152 => 'treatment',
  3173. ),
  3174. );
  3175. return $description;
  3176. }
  3177. /**
  3178. * Implements hook_chado_schema_v1_2_cvterm_dbxref()
  3179. * Purpose: To describe the structure of 'cvterm_dbxref' to tripal
  3180. * @see chado_insert_record()
  3181. * @see chado_update_record()
  3182. * @see chado_select_record()
  3183. *
  3184. * @return
  3185. * An array describing the 'cvterm_dbxref' table
  3186. *
  3187. * @ingroup tripal_chado_v1.2_schema_api
  3188. *
  3189. */
  3190. function tripal_chado_chado_schema_v1_2_cvterm_dbxref() {
  3191. $description = array(
  3192. 'description' => '',
  3193. 'fields' => array(
  3194. 'cvterm_dbxref_id' => array(
  3195. 'description' => '',
  3196. 'type' => 'serial',
  3197. 'not null' => TRUE,
  3198. ),
  3199. 'cvterm_id' => array(
  3200. 'description' => '',
  3201. 'type' => 'int',
  3202. 'not null' => TRUE,
  3203. ),
  3204. 'dbxref_id' => array(
  3205. 'description' => '',
  3206. 'type' => 'int',
  3207. 'not null' => TRUE,
  3208. ),
  3209. 'is_for_definition' => array(
  3210. 'description' => '',
  3211. 'type' => 'int',
  3212. 'not null' => TRUE,
  3213. 'default' => 0,
  3214. ),
  3215. ),
  3216. 'primary key' => array(
  3217. 0 => 'cvterm_dbxref_id',
  3218. ),
  3219. 'unique keys' => array(
  3220. 'cvterm_dbxref_c1' => array(
  3221. 0 => 'cvterm_id',
  3222. 1 => 'dbxref_id',
  3223. ),
  3224. ),
  3225. 'indexes' => array(
  3226. 'cvterm_dbxref_idx1' => array(
  3227. 0 => 'cvterm_id',
  3228. ),
  3229. 'cvterm_dbxref_idx2' => array(
  3230. 0 => 'dbxref_id',
  3231. ),
  3232. ),
  3233. 'foreign keys' => array(
  3234. 'cvterm' => array(
  3235. 'table' => 'cvterm',
  3236. 'columns' => array(
  3237. 'cvterm_id' => 'cvterm_id',
  3238. ),
  3239. ),
  3240. 'dbxref' => array(
  3241. 'table' => 'dbxref',
  3242. 'columns' => array(
  3243. 'dbxref_id' => 'dbxref_id',
  3244. ),
  3245. ),
  3246. ),
  3247. 'table' => 'cvterm_dbxref',
  3248. 'referring_tables' => NULL,
  3249. );
  3250. return $description;
  3251. }
  3252. /**
  3253. * Implements hook_chado_schema_v1_2_cvterm_relationship()
  3254. * Purpose: To describe the structure of 'cvterm_relationship' to tripal
  3255. * @see chado_insert_record()
  3256. * @see chado_update_record()
  3257. * @see chado_select_record()
  3258. *
  3259. * @return
  3260. * An array describing the 'cvterm_relationship' table
  3261. *
  3262. * @ingroup tripal_chado_v1.2_schema_api
  3263. *
  3264. */
  3265. function tripal_chado_chado_schema_v1_2_cvterm_relationship() {
  3266. $description = array(
  3267. 'description' => '',
  3268. 'fields' => array(
  3269. 'cvterm_relationship_id' => array(
  3270. 'description' => '',
  3271. 'type' => 'serial',
  3272. 'not null' => TRUE,
  3273. ),
  3274. 'type_id' => array(
  3275. 'description' => '',
  3276. 'type' => 'int',
  3277. 'not null' => TRUE,
  3278. ),
  3279. 'subject_id' => array(
  3280. 'description' => '',
  3281. 'type' => 'int',
  3282. 'not null' => TRUE,
  3283. ),
  3284. 'object_id' => array(
  3285. 'description' => '',
  3286. 'type' => 'int',
  3287. 'not null' => TRUE,
  3288. ),
  3289. ),
  3290. 'primary key' => array(
  3291. 0 => 'cvterm_relationship_id',
  3292. ),
  3293. 'unique keys' => array(
  3294. 'cvterm_relationship_c1' => array(
  3295. 0 => 'subject_id',
  3296. 1 => 'object_id',
  3297. 2 => 'type_id',
  3298. ),
  3299. ),
  3300. 'indexes' => array(
  3301. 'cvterm_relationship_idx1' => array(
  3302. 0 => 'type_id',
  3303. ),
  3304. 'cvterm_relationship_idx2' => array(
  3305. 0 => 'subject_id',
  3306. ),
  3307. 'cvterm_relationship_idx3' => array(
  3308. 0 => 'object_id',
  3309. ),
  3310. ),
  3311. 'foreign keys' => array(
  3312. 'cvterm' => array(
  3313. 'table' => 'cvterm',
  3314. 'columns' => array(
  3315. 'type_id' => 'cvterm_id',
  3316. 'subject_id' => 'cvterm_id',
  3317. 'object_id' => 'cvterm_id',
  3318. ),
  3319. ),
  3320. ),
  3321. 'table' => 'cvterm_relationship',
  3322. 'referring_tables' => NULL,
  3323. );
  3324. return $description;
  3325. }
  3326. /**
  3327. * Implements hook_chado_schema_v1_2_cvtermpath()
  3328. * Purpose: To describe the structure of 'cvtermpath' to tripal
  3329. * @see chado_insert_record()
  3330. * @see chado_update_record()
  3331. * @see chado_select_record()
  3332. *
  3333. * @return
  3334. * An array describing the 'cvtermpath' table
  3335. *
  3336. * @ingroup tripal_chado_v1.2_schema_api
  3337. *
  3338. */
  3339. function tripal_chado_chado_schema_v1_2_cvtermpath() {
  3340. $description = array(
  3341. 'description' => '',
  3342. 'fields' => array(
  3343. 'cvtermpath_id' => array(
  3344. 'description' => '',
  3345. 'type' => 'serial',
  3346. 'not null' => TRUE,
  3347. ),
  3348. 'type_id' => array(
  3349. 'description' => '',
  3350. 'type' => 'int',
  3351. 'not null' => FALSE,
  3352. ),
  3353. 'subject_id' => array(
  3354. 'description' => '',
  3355. 'type' => 'int',
  3356. 'not null' => TRUE,
  3357. ),
  3358. 'object_id' => array(
  3359. 'description' => '',
  3360. 'type' => 'int',
  3361. 'not null' => TRUE,
  3362. ),
  3363. 'cv_id' => array(
  3364. 'description' => '',
  3365. 'type' => 'int',
  3366. 'not null' => TRUE,
  3367. ),
  3368. 'pathdistance' => array(
  3369. 'description' => '',
  3370. 'type' => 'int',
  3371. 'not null' => FALSE,
  3372. ),
  3373. ),
  3374. 'primary key' => array(
  3375. 0 => 'cvtermpath_id',
  3376. ),
  3377. 'unique keys' => array(
  3378. 'cvtermpath_c1' => array(
  3379. 0 => 'subject_id',
  3380. 1 => 'object_id',
  3381. 2 => 'type_id',
  3382. 3 => 'pathdistance',
  3383. ),
  3384. ),
  3385. 'indexes' => array(
  3386. 'cvtermpath_idx1' => array(
  3387. 0 => 'type_id',
  3388. ),
  3389. 'cvtermpath_idx2' => array(
  3390. 0 => 'subject_id',
  3391. ),
  3392. 'cvtermpath_idx3' => array(
  3393. 0 => 'object_id',
  3394. ),
  3395. 'cvtermpath_idx4' => array(
  3396. 0 => 'cv_id',
  3397. ),
  3398. ),
  3399. 'foreign keys' => array(
  3400. 'cvterm' => array(
  3401. 'table' => 'cvterm',
  3402. 'columns' => array(
  3403. 'type_id' => 'cvterm_id',
  3404. 'subject_id' => 'cvterm_id',
  3405. 'object_id' => 'cvterm_id',
  3406. ),
  3407. ),
  3408. 'cv' => array(
  3409. 'table' => 'cv',
  3410. 'columns' => array(
  3411. 'cv_id' => 'cv_id',
  3412. ),
  3413. ),
  3414. ),
  3415. 'table' => 'cvtermpath',
  3416. 'referring_tables' => NULL,
  3417. );
  3418. return $description;
  3419. }
  3420. /**
  3421. * Implements hook_chado_schema_v1_2_cvtermprop()
  3422. * Purpose: To describe the structure of 'cvtermprop' to tripal
  3423. * @see chado_insert_record()
  3424. * @see chado_update_record()
  3425. * @see chado_select_record()
  3426. *
  3427. * @return
  3428. * An array describing the 'cvtermprop' table
  3429. *
  3430. * @ingroup tripal_chado_v1.2_schema_api
  3431. *
  3432. */
  3433. function tripal_chado_chado_schema_v1_2_cvtermprop() {
  3434. $description = array(
  3435. 'description' => '',
  3436. 'fields' => array(
  3437. 'cvtermprop_id' => array(
  3438. 'description' => '',
  3439. 'type' => 'serial',
  3440. 'not null' => TRUE,
  3441. ),
  3442. 'cvterm_id' => array(
  3443. 'description' => '',
  3444. 'type' => 'int',
  3445. 'not null' => TRUE,
  3446. ),
  3447. 'type_id' => array(
  3448. 'description' => '',
  3449. 'type' => 'int',
  3450. 'not null' => TRUE,
  3451. ),
  3452. 'value' => array(
  3453. 'description' => '',
  3454. 'type' => 'text',
  3455. 'not null' => TRUE,
  3456. 'default' => '',
  3457. ),
  3458. 'rank' => array(
  3459. 'description' => '',
  3460. 'type' => 'int',
  3461. 'not null' => TRUE,
  3462. 'default' => 0,
  3463. ),
  3464. ),
  3465. 'primary key' => array(
  3466. 0 => 'cvtermprop_id',
  3467. ),
  3468. 'unique keys' => array(
  3469. 'cvterm_id' => array(
  3470. 0 => 'cvterm_id',
  3471. 1 => 'type_id',
  3472. 2 => 'value',
  3473. 3 => 'rank',
  3474. ),
  3475. ),
  3476. 'indexes' => array(
  3477. 'cvtermprop_idx1' => array(
  3478. 0 => 'cvterm_id',
  3479. ),
  3480. 'cvtermprop_idx2' => array(
  3481. 0 => 'type_id',
  3482. ),
  3483. ),
  3484. 'foreign keys' => array(
  3485. 'cvterm' => array(
  3486. 'table' => 'cvterm',
  3487. 'columns' => array(
  3488. 'cvterm_id' => 'cvterm_id',
  3489. 'type_id' => 'cvterm_id',
  3490. ),
  3491. ),
  3492. ),
  3493. 'table' => 'cvtermprop',
  3494. 'referring_tables' => NULL,
  3495. );
  3496. return $description;
  3497. }
  3498. /**
  3499. * Implements hook_chado_schema_v1_2_cvtermsynonym()
  3500. * Purpose: To describe the structure of 'cvtermsynonym' to tripal
  3501. * @see chado_insert_record()
  3502. * @see chado_update_record()
  3503. * @see chado_select_record()
  3504. *
  3505. * @return
  3506. * An array describing the 'cvtermsynonym' table
  3507. *
  3508. * @ingroup tripal_chado_v1.2_schema_api
  3509. *
  3510. */
  3511. function tripal_chado_chado_schema_v1_2_cvtermsynonym() {
  3512. $description = array(
  3513. 'description' => '',
  3514. 'fields' => array(
  3515. 'cvtermsynonym_id' => array(
  3516. 'description' => '',
  3517. 'type' => 'serial',
  3518. 'not null' => TRUE,
  3519. ),
  3520. 'cvterm_id' => array(
  3521. 'description' => '',
  3522. 'type' => 'int',
  3523. 'not null' => TRUE,
  3524. ),
  3525. 'synonym' => array(
  3526. 'description' => '',
  3527. 'type' => 'varchar',
  3528. 'length' => '1024',
  3529. 'not null' => TRUE,
  3530. ),
  3531. 'type_id' => array(
  3532. 'description' => '',
  3533. 'type' => 'int',
  3534. 'not null' => FALSE,
  3535. ),
  3536. ),
  3537. 'primary key' => array(
  3538. 0 => 'cvtermsynonym_id',
  3539. ),
  3540. 'unique keys' => array(
  3541. 'cvtermsynonym_c1' => array(
  3542. 0 => 'cvterm_id',
  3543. 1 => 'synonym',
  3544. ),
  3545. ),
  3546. 'indexes' => array(
  3547. 'cvtermsynonym_idx1' => array(
  3548. 0 => 'cvterm_id',
  3549. ),
  3550. ),
  3551. 'foreign keys' => array(
  3552. 'cvterm' => array(
  3553. 'table' => 'cvterm',
  3554. 'columns' => array(
  3555. 'cvterm_id' => 'cvterm_id',
  3556. 'type_id' => 'cvterm_id',
  3557. ),
  3558. ),
  3559. ),
  3560. 'table' => 'cvtermsynonym',
  3561. 'referring_tables' => NULL,
  3562. );
  3563. return $description;
  3564. }
  3565. /**
  3566. * Implements hook_chado_schema_v1_2_db()
  3567. * Purpose: To describe the structure of 'db' to tripal
  3568. * @see chado_insert_record()
  3569. * @see chado_update_record()
  3570. * @see chado_select_record()
  3571. *
  3572. * @return
  3573. * An array describing the 'db' table
  3574. *
  3575. * @ingroup tripal_chado_v1.2_schema_api
  3576. *
  3577. */
  3578. function tripal_chado_chado_schema_v1_2_db() {
  3579. $description = array(
  3580. 'description' => '',
  3581. 'fields' => array(
  3582. 'db_id' => array(
  3583. 'description' => '',
  3584. 'type' => 'serial',
  3585. 'not null' => TRUE,
  3586. ),
  3587. 'name' => array(
  3588. 'description' => '',
  3589. 'type' => 'varchar',
  3590. 'length' => '255',
  3591. 'not null' => TRUE,
  3592. ),
  3593. 'description' => array(
  3594. 'description' => '',
  3595. 'type' => 'varchar',
  3596. 'length' => '255',
  3597. 'not null' => FALSE,
  3598. ),
  3599. 'urlprefix' => array(
  3600. 'description' => '',
  3601. 'type' => 'varchar',
  3602. 'length' => '255',
  3603. 'not null' => FALSE,
  3604. ),
  3605. 'url' => array(
  3606. 'description' => '',
  3607. 'type' => 'varchar',
  3608. 'length' => '255',
  3609. 'not null' => FALSE,
  3610. ),
  3611. ),
  3612. 'primary key' => array(
  3613. 0 => 'db_id',
  3614. ),
  3615. 'unique keys' => array(
  3616. 'db_c1' => array(
  3617. 0 => 'name',
  3618. ),
  3619. ),
  3620. 'foreign keys' => array(
  3621. ),
  3622. 'table' => 'db',
  3623. 'referring_tables' => array(
  3624. 0 => 'dbxref',
  3625. ),
  3626. );
  3627. return $description;
  3628. }
  3629. /**
  3630. * Implements hook_chado_schema_v1_2_dbxref()
  3631. * Purpose: To describe the structure of 'dbxref' to tripal
  3632. * @see chado_insert_record()
  3633. * @see chado_update_record()
  3634. * @see chado_select_record()
  3635. *
  3636. * @return
  3637. * An array describing the 'dbxref' table
  3638. *
  3639. * @ingroup tripal_chado_v1.2_schema_api
  3640. *
  3641. */
  3642. function tripal_chado_chado_schema_v1_2_dbxref() {
  3643. $description = array(
  3644. 'description' => '',
  3645. 'fields' => array(
  3646. 'dbxref_id' => array(
  3647. 'description' => '',
  3648. 'type' => 'serial',
  3649. 'not null' => TRUE,
  3650. ),
  3651. 'db_id' => array(
  3652. 'description' => '',
  3653. 'type' => 'int',
  3654. 'not null' => TRUE,
  3655. ),
  3656. 'accession' => array(
  3657. 'description' => '',
  3658. 'type' => 'varchar',
  3659. 'length' => '255',
  3660. 'not null' => TRUE,
  3661. ),
  3662. 'version' => array(
  3663. 'description' => '',
  3664. 'type' => 'varchar',
  3665. 'length' => '255',
  3666. 'not null' => TRUE,
  3667. 'default' => '',
  3668. ),
  3669. 'description' => array(
  3670. 'description' => '',
  3671. 'type' => 'text',
  3672. 'not null' => FALSE,
  3673. ),
  3674. ),
  3675. 'primary key' => array(
  3676. 0 => 'dbxref_id',
  3677. ),
  3678. 'unique keys' => array(
  3679. 'dbxref_c1' => array(
  3680. 0 => 'db_id',
  3681. 1 => 'accession',
  3682. 2 => 'version',
  3683. ),
  3684. ),
  3685. 'indexes' => array(
  3686. 'dbxref_idx1' => array(
  3687. 0 => 'db_id',
  3688. ),
  3689. 'dbxref_idx2' => array(
  3690. 0 => 'accession',
  3691. ),
  3692. 'dbxref_idx3' => array(
  3693. 0 => 'version',
  3694. ),
  3695. ),
  3696. 'foreign keys' => array(
  3697. 'db' => array(
  3698. 'table' => 'db',
  3699. 'columns' => array(
  3700. 'db_id' => 'db_id',
  3701. ),
  3702. ),
  3703. ),
  3704. 'table' => 'dbxref',
  3705. 'referring_tables' => array(
  3706. 0 => 'arraydesign',
  3707. 1 => 'assay',
  3708. 2 => 'biomaterial',
  3709. 3 => 'biomaterial_dbxref',
  3710. 4 => 'cell_line_dbxref',
  3711. 5 => 'cvterm',
  3712. 6 => 'cvterm_dbxref',
  3713. 7 => 'dbxrefprop',
  3714. 8 => 'element',
  3715. 9 => 'feature',
  3716. 10 => 'feature_cvterm_dbxref',
  3717. 11 => 'feature_dbxref',
  3718. 12 => 'library_dbxref',
  3719. 13 => 'nd_experiment_dbxref',
  3720. 14 => 'nd_experiment_stock_dbxref',
  3721. 15 => 'organism_dbxref',
  3722. 16 => 'phylonode_dbxref',
  3723. 17 => 'phylotree',
  3724. 18 => 'protocol',
  3725. 19 => 'pub_dbxref',
  3726. 20 => 'stock',
  3727. 21 => 'stock_dbxref',
  3728. 22 => 'study',
  3729. ),
  3730. );
  3731. return $description;
  3732. }
  3733. /**
  3734. * Implements hook_chado_schema_v1_2_dbxrefprop()
  3735. * Purpose: To describe the structure of 'dbxrefprop' to tripal
  3736. * @see chado_insert_record()
  3737. * @see chado_update_record()
  3738. * @see chado_select_record()
  3739. *
  3740. * @return
  3741. * An array describing the 'dbxrefprop' table
  3742. *
  3743. * @ingroup tripal_chado_v1.2_schema_api
  3744. *
  3745. */
  3746. function tripal_chado_chado_schema_v1_2_dbxrefprop() {
  3747. $description = array(
  3748. 'description' => '',
  3749. 'fields' => array(
  3750. 'dbxrefprop_id' => array(
  3751. 'description' => '',
  3752. 'type' => 'serial',
  3753. 'not null' => TRUE,
  3754. ),
  3755. 'dbxref_id' => array(
  3756. 'description' => '',
  3757. 'type' => 'int',
  3758. 'not null' => TRUE,
  3759. ),
  3760. 'type_id' => array(
  3761. 'description' => '',
  3762. 'type' => 'int',
  3763. 'not null' => TRUE,
  3764. ),
  3765. 'value' => array(
  3766. 'description' => '',
  3767. 'type' => 'text',
  3768. 'not null' => TRUE,
  3769. 'default' => '',
  3770. ),
  3771. 'rank' => array(
  3772. 'description' => '',
  3773. 'type' => 'int',
  3774. 'not null' => TRUE,
  3775. 'default' => 0,
  3776. ),
  3777. ),
  3778. 'primary key' => array(
  3779. 0 => 'dbxrefprop_id',
  3780. ),
  3781. 'unique keys' => array(
  3782. 'dbxrefprop_c1' => array(
  3783. 0 => 'dbxref_id',
  3784. 1 => 'type_id',
  3785. 2 => 'rank',
  3786. ),
  3787. ),
  3788. 'indexes' => array(
  3789. 'dbxrefprop_idx1' => array(
  3790. 0 => 'dbxref_id',
  3791. ),
  3792. 'dbxrefprop_idx2' => array(
  3793. 0 => 'type_id',
  3794. ),
  3795. ),
  3796. 'foreign keys' => array(
  3797. 'cvterm' => array(
  3798. 'table' => 'cvterm',
  3799. 'columns' => array(
  3800. 'type_id' => 'cvterm_id',
  3801. ),
  3802. ),
  3803. 'dbxref' => array(
  3804. 'table' => 'dbxref',
  3805. 'columns' => array(
  3806. 'dbxref_id' => 'dbxref_id',
  3807. ),
  3808. ),
  3809. ),
  3810. 'table' => 'dbxrefprop',
  3811. 'referring_tables' => NULL,
  3812. );
  3813. return $description;
  3814. }
  3815. /**
  3816. * Implements hook_chado_schema_v1_2_eimage()
  3817. * Purpose: To describe the structure of 'eimage' to tripal
  3818. * @see chado_insert_record()
  3819. * @see chado_update_record()
  3820. * @see chado_select_record()
  3821. *
  3822. * @return
  3823. * An array describing the 'eimage' table
  3824. *
  3825. * @ingroup tripal_chado_v1.2_schema_api
  3826. *
  3827. */
  3828. function tripal_chado_chado_schema_v1_2_eimage() {
  3829. $description = array(
  3830. 'description' => '',
  3831. 'fields' => array(
  3832. 'eimage_id' => array(
  3833. 'description' => '',
  3834. 'type' => 'serial',
  3835. 'not null' => TRUE,
  3836. ),
  3837. 'eimage_data' => array(
  3838. 'description' => '',
  3839. 'type' => 'text',
  3840. 'not null' => FALSE,
  3841. ),
  3842. 'eimage_type' => array(
  3843. 'description' => '',
  3844. 'type' => 'varchar',
  3845. 'length' => '255',
  3846. 'not null' => TRUE,
  3847. ),
  3848. 'image_uri' => array(
  3849. 'description' => '',
  3850. 'type' => 'varchar',
  3851. 'length' => '255',
  3852. 'not null' => FALSE,
  3853. ),
  3854. ),
  3855. 'primary key' => array(
  3856. 0 => 'eimage_id',
  3857. ),
  3858. 'foreign keys' => array(
  3859. ),
  3860. 'table' => 'eimage',
  3861. 'referring_tables' => array(
  3862. 0 => 'expression_image',
  3863. ),
  3864. );
  3865. return $description;
  3866. }
  3867. /**
  3868. * Implements hook_chado_schema_v1_2_element()
  3869. * Purpose: To describe the structure of 'element' to tripal
  3870. * @see chado_insert_record()
  3871. * @see chado_update_record()
  3872. * @see chado_select_record()
  3873. *
  3874. * @return
  3875. * An array describing the 'element' table
  3876. *
  3877. * @ingroup tripal_chado_v1.2_schema_api
  3878. *
  3879. */
  3880. function tripal_chado_chado_schema_v1_2_element() {
  3881. $description = array(
  3882. 'description' => '',
  3883. 'fields' => array(
  3884. 'element_id' => array(
  3885. 'description' => '',
  3886. 'type' => 'serial',
  3887. 'not null' => TRUE,
  3888. ),
  3889. 'feature_id' => array(
  3890. 'description' => '',
  3891. 'type' => 'int',
  3892. 'not null' => FALSE,
  3893. ),
  3894. 'arraydesign_id' => array(
  3895. 'description' => '',
  3896. 'type' => 'int',
  3897. 'not null' => TRUE,
  3898. ),
  3899. 'type_id' => array(
  3900. 'description' => '',
  3901. 'type' => 'int',
  3902. 'not null' => FALSE,
  3903. ),
  3904. 'dbxref_id' => array(
  3905. 'description' => '',
  3906. 'type' => 'int',
  3907. 'not null' => FALSE,
  3908. ),
  3909. ),
  3910. 'primary key' => array(
  3911. 0 => 'element_id',
  3912. ),
  3913. 'unique keys' => array(
  3914. 'element_c1' => array(
  3915. 0 => 'feature_id',
  3916. 1 => 'arraydesign_id',
  3917. ),
  3918. ),
  3919. 'indexes' => array(
  3920. 'element_idx1' => array(
  3921. 0 => 'feature_id',
  3922. ),
  3923. 'element_idx2' => array(
  3924. 0 => 'arraydesign_id',
  3925. ),
  3926. 'element_idx3' => array(
  3927. 0 => 'type_id',
  3928. ),
  3929. 'element_idx4' => array(
  3930. 0 => 'dbxref_id',
  3931. ),
  3932. ),
  3933. 'foreign keys' => array(
  3934. 'cvterm' => array(
  3935. 'table' => 'cvterm',
  3936. 'columns' => array(
  3937. 'type_id' => 'cvterm_id',
  3938. ),
  3939. ),
  3940. 'dbxref' => array(
  3941. 'table' => 'dbxref',
  3942. 'columns' => array(
  3943. 'dbxref_id' => 'dbxref_id',
  3944. ),
  3945. ),
  3946. 'feature' => array(
  3947. 'table' => 'feature',
  3948. 'columns' => array(
  3949. 'feature_id' => 'feature_id',
  3950. ),
  3951. ),
  3952. 'arraydesign' => array(
  3953. 'table' => 'arraydesign',
  3954. 'columns' => array(
  3955. 'arraydesign_id' => 'arraydesign_id',
  3956. ),
  3957. ),
  3958. ),
  3959. 'table' => 'element',
  3960. 'referring_tables' => array(
  3961. 0 => 'element_relationship',
  3962. 2 => 'elementresult',
  3963. ),
  3964. );
  3965. return $description;
  3966. }
  3967. /**
  3968. * Implements hook_chado_schema_v1_2_element_relationship()
  3969. * Purpose: To describe the structure of 'element_relationship' to tripal
  3970. * @see chado_insert_record()
  3971. * @see chado_update_record()
  3972. * @see chado_select_record()
  3973. *
  3974. * @return
  3975. * An array describing the 'element_relationship' table
  3976. *
  3977. * @ingroup tripal_chado_v1.2_schema_api
  3978. *
  3979. */
  3980. function tripal_chado_chado_schema_v1_2_element_relationship() {
  3981. $description = array(
  3982. 'description' => '',
  3983. 'fields' => array(
  3984. 'element_relationship_id' => array(
  3985. 'description' => '',
  3986. 'type' => 'serial',
  3987. 'not null' => TRUE,
  3988. ),
  3989. 'subject_id' => array(
  3990. 'description' => '',
  3991. 'type' => 'int',
  3992. 'not null' => TRUE,
  3993. ),
  3994. 'type_id' => array(
  3995. 'description' => '',
  3996. 'type' => 'int',
  3997. 'not null' => TRUE,
  3998. ),
  3999. 'object_id' => array(
  4000. 'description' => '',
  4001. 'type' => 'int',
  4002. 'not null' => TRUE,
  4003. ),
  4004. 'value' => array(
  4005. 'description' => '',
  4006. 'type' => 'text',
  4007. 'not null' => FALSE,
  4008. ),
  4009. 'rank' => array(
  4010. 'description' => '',
  4011. 'type' => 'int',
  4012. 'not null' => TRUE,
  4013. 'default' => 0,
  4014. ),
  4015. ),
  4016. 'primary key' => array(
  4017. 0 => 'element_relationship_id',
  4018. ),
  4019. 'unique keys' => array(
  4020. 'element_relationship_c1' => array(
  4021. 0 => 'subject_id',
  4022. 1 => 'object_id',
  4023. 2 => 'type_id',
  4024. 3 => 'rank',
  4025. ),
  4026. ),
  4027. 'indexes' => array(
  4028. 'element_relationship_idx1' => array(
  4029. 0 => 'subject_id',
  4030. ),
  4031. 'element_relationship_idx2' => array(
  4032. 0 => 'type_id',
  4033. ),
  4034. 'element_relationship_idx3' => array(
  4035. 0 => 'object_id',
  4036. ),
  4037. 'element_relationship_idx4' => array(
  4038. 0 => 'value',
  4039. ),
  4040. ),
  4041. 'foreign keys' => array(
  4042. 'cvterm' => array(
  4043. 'table' => 'cvterm',
  4044. 'columns' => array(
  4045. 'type_id' => 'cvterm_id',
  4046. ),
  4047. ),
  4048. 'element' => array(
  4049. 'table' => 'element',
  4050. 'columns' => array(
  4051. 'subject_id' => 'element_id',
  4052. 'object_id' => 'element_id',
  4053. ),
  4054. ),
  4055. ),
  4056. 'table' => 'element_relationship',
  4057. 'referring_tables' => NULL,
  4058. );
  4059. return $description;
  4060. }
  4061. /**
  4062. * Implements hook_chado_schema_v1_2_elementresult()
  4063. * Purpose: To describe the structure of 'elementresult' to tripal
  4064. * @see chado_insert_record()
  4065. * @see chado_update_record()
  4066. * @see chado_select_record()
  4067. *
  4068. * @return
  4069. * An array describing the 'elementresult' table
  4070. *
  4071. * @ingroup tripal_chado_v1.2_schema_api
  4072. *
  4073. */
  4074. function tripal_chado_chado_schema_v1_2_elementresult() {
  4075. $description = array(
  4076. 'description' => '',
  4077. 'fields' => array(
  4078. 'elementresult_id' => array(
  4079. 'description' => '',
  4080. 'type' => 'serial',
  4081. 'not null' => TRUE,
  4082. ),
  4083. 'element_id' => array(
  4084. 'description' => '',
  4085. 'type' => 'int',
  4086. 'not null' => TRUE,
  4087. ),
  4088. 'quantification_id' => array(
  4089. 'description' => '',
  4090. 'type' => 'int',
  4091. 'not null' => TRUE,
  4092. ),
  4093. 'signal' => array(
  4094. 'description' => '',
  4095. 'type' => 'float',
  4096. 'size' => 'big',
  4097. 'not null' => TRUE,
  4098. ),
  4099. ),
  4100. 'primary key' => array(
  4101. 0 => 'elementresult_id',
  4102. ),
  4103. 'unique keys' => array(
  4104. 'elementresult_c1' => array(
  4105. 0 => 'element_id',
  4106. 1 => 'quantification_id',
  4107. ),
  4108. ),
  4109. 'indexes' => array(
  4110. 'elementresult_idx1' => array(
  4111. 0 => 'element_id',
  4112. ),
  4113. 'elementresult_idx2' => array(
  4114. 0 => 'quantification_id',
  4115. ),
  4116. 'elementresult_idx3' => array(
  4117. 0 => 'signal',
  4118. ),
  4119. ),
  4120. 'foreign keys' => array(
  4121. 'quantification' => array(
  4122. 'table' => 'quantification',
  4123. 'columns' => array(
  4124. 'quantification_id' => 'quantification_id',
  4125. ),
  4126. ),
  4127. 'element' => array(
  4128. 'table' => 'element',
  4129. 'columns' => array(
  4130. 'element_id' => 'element_id',
  4131. ),
  4132. ),
  4133. ),
  4134. 'table' => 'elementresult',
  4135. 'referring_tables' => array(
  4136. 0 => 'elementresult_relationship',
  4137. ),
  4138. );
  4139. return $description;
  4140. }
  4141. /**
  4142. * Implements hook_chado_schema_v1_2_elementresult_relationship()
  4143. * Purpose: To describe the structure of 'elementresult_relationship' to tripal
  4144. * @see chado_insert_record()
  4145. * @see chado_update_record()
  4146. * @see chado_select_record()
  4147. *
  4148. * @return
  4149. * An array describing the 'elementresult_relationship' table
  4150. *
  4151. * @ingroup tripal_chado_v1.2_schema_api
  4152. *
  4153. */
  4154. function tripal_chado_chado_schema_v1_2_elementresult_relationship() {
  4155. $description = array(
  4156. 'description' => '',
  4157. 'fields' => array(
  4158. 'elementresult_relationship_id' => array(
  4159. 'description' => '',
  4160. 'type' => 'serial',
  4161. 'not null' => TRUE,
  4162. ),
  4163. 'subject_id' => array(
  4164. 'description' => '',
  4165. 'type' => 'int',
  4166. 'not null' => TRUE,
  4167. ),
  4168. 'type_id' => array(
  4169. 'description' => '',
  4170. 'type' => 'int',
  4171. 'not null' => TRUE,
  4172. ),
  4173. 'object_id' => array(
  4174. 'description' => '',
  4175. 'type' => 'int',
  4176. 'not null' => TRUE,
  4177. ),
  4178. 'value' => array(
  4179. 'description' => '',
  4180. 'type' => 'text',
  4181. 'not null' => FALSE,
  4182. ),
  4183. 'rank' => array(
  4184. 'description' => '',
  4185. 'type' => 'int',
  4186. 'not null' => TRUE,
  4187. 'default' => 0,
  4188. ),
  4189. ),
  4190. 'primary key' => array(
  4191. 0 => 'elementresult_relationship_id',
  4192. ),
  4193. 'unique keys' => array(
  4194. 'elementresult_relationship_c1' => array(
  4195. 0 => 'subject_id',
  4196. 1 => 'object_id',
  4197. 2 => 'type_id',
  4198. 3 => 'rank',
  4199. ),
  4200. ),
  4201. 'indexes' => array(
  4202. 'elementresult_relationship_idx1' => array(
  4203. 0 => 'subject_id',
  4204. ),
  4205. 'elementresult_relationship_idx2' => array(
  4206. 0 => 'type_id',
  4207. ),
  4208. 'elementresult_relationship_idx3' => array(
  4209. 0 => 'object_id',
  4210. ),
  4211. 'elementresult_relationship_idx4' => array(
  4212. 0 => 'value',
  4213. ),
  4214. ),
  4215. 'foreign keys' => array(
  4216. 'cvterm' => array(
  4217. 'table' => 'cvterm',
  4218. 'columns' => array(
  4219. 'type_id' => 'cvterm_id',
  4220. ),
  4221. ),
  4222. 'elementresult' => array(
  4223. 'table' => 'elementresult',
  4224. 'columns' => array(
  4225. 'subject_id' => 'elementresult_id',
  4226. 'object_id' => 'elementresult_id',
  4227. ),
  4228. ),
  4229. ),
  4230. 'table' => 'elementresult_relationship',
  4231. 'referring_tables' => NULL,
  4232. );
  4233. return $description;
  4234. }
  4235. /**
  4236. * Implements hook_chado_schema_v1_2_environment()
  4237. * Purpose: To describe the structure of 'environment' to tripal
  4238. * @see chado_insert_record()
  4239. * @see chado_update_record()
  4240. * @see chado_select_record()
  4241. *
  4242. * @return
  4243. * An array describing the 'environment' table
  4244. *
  4245. * @ingroup tripal_chado_v1.2_schema_api
  4246. *
  4247. */
  4248. function tripal_chado_chado_schema_v1_2_environment() {
  4249. $description = array(
  4250. 'description' => '',
  4251. 'fields' => array(
  4252. 'environment_id' => array(
  4253. 'description' => '',
  4254. 'type' => 'serial',
  4255. 'not null' => TRUE,
  4256. ),
  4257. 'uniquename' => array(
  4258. 'description' => '',
  4259. 'type' => 'text',
  4260. 'not null' => TRUE,
  4261. ),
  4262. 'description' => array(
  4263. 'description' => '',
  4264. 'type' => 'text',
  4265. 'not null' => FALSE,
  4266. ),
  4267. ),
  4268. 'primary key' => array(
  4269. 0 => 'environment_id',
  4270. ),
  4271. 'unique keys' => array(
  4272. 'environment_c1' => array(
  4273. 0 => 'uniquename',
  4274. ),
  4275. ),
  4276. 'indexes' => array(
  4277. 'environment_idx1' => array(
  4278. 0 => 'uniquename',
  4279. ),
  4280. ),
  4281. 'foreign keys' => array(
  4282. ),
  4283. 'table' => 'environment',
  4284. 'referring_tables' => array(
  4285. 0 => 'environment_cvterm',
  4286. 1 => 'phendesc',
  4287. 2 => 'phenotype_comparison',
  4288. 4 => 'phenstatement',
  4289. ),
  4290. );
  4291. return $description;
  4292. }
  4293. /**
  4294. * Implements hook_chado_schema_v1_2_environment_cvterm()
  4295. * Purpose: To describe the structure of 'environment_cvterm' to tripal
  4296. * @see chado_insert_record()
  4297. * @see chado_update_record()
  4298. * @see chado_select_record()
  4299. *
  4300. * @return
  4301. * An array describing the 'environment_cvterm' table
  4302. *
  4303. * @ingroup tripal_chado_v1.2_schema_api
  4304. *
  4305. */
  4306. function tripal_chado_chado_schema_v1_2_environment_cvterm() {
  4307. $description = array(
  4308. 'description' => '',
  4309. 'fields' => array(
  4310. 'environment_cvterm_id' => array(
  4311. 'description' => '',
  4312. 'type' => 'serial',
  4313. 'not null' => TRUE,
  4314. ),
  4315. 'environment_id' => array(
  4316. 'description' => '',
  4317. 'type' => 'int',
  4318. 'not null' => TRUE,
  4319. ),
  4320. 'cvterm_id' => array(
  4321. 'description' => '',
  4322. 'type' => 'int',
  4323. 'not null' => TRUE,
  4324. ),
  4325. ),
  4326. 'primary key' => array(
  4327. 0 => 'environment_cvterm_id',
  4328. ),
  4329. 'unique keys' => array(
  4330. 'environment_cvterm_c1' => array(
  4331. 0 => 'environment_id',
  4332. 1 => 'cvterm_id',
  4333. ),
  4334. ),
  4335. 'indexes' => array(
  4336. 'environment_cvterm_idx1' => array(
  4337. 0 => 'environment_id',
  4338. ),
  4339. 'environment_cvterm_idx2' => array(
  4340. 0 => 'cvterm_id',
  4341. ),
  4342. ),
  4343. 'foreign keys' => array(
  4344. 'cvterm' => array(
  4345. 'table' => 'cvterm',
  4346. 'columns' => array(
  4347. 'cvterm_id' => 'cvterm_id',
  4348. ),
  4349. ),
  4350. 'environment' => array(
  4351. 'table' => 'environment',
  4352. 'columns' => array(
  4353. 'environment_id' => 'environment_id',
  4354. ),
  4355. ),
  4356. ),
  4357. 'table' => 'environment_cvterm',
  4358. 'referring_tables' => NULL,
  4359. );
  4360. return $description;
  4361. }
  4362. /**
  4363. * Implements hook_chado_schema_v1_2_expression()
  4364. * Purpose: To describe the structure of 'expression' to tripal
  4365. * @see chado_insert_record()
  4366. * @see chado_update_record()
  4367. * @see chado_select_record()
  4368. *
  4369. * @return
  4370. * An array describing the 'expression' table
  4371. *
  4372. * @ingroup tripal_chado_v1.2_schema_api
  4373. *
  4374. */
  4375. function tripal_chado_chado_schema_v1_2_expression() {
  4376. $description = array(
  4377. 'description' => '',
  4378. 'fields' => array(
  4379. 'expression_id' => array(
  4380. 'description' => '',
  4381. 'type' => 'serial',
  4382. 'not null' => TRUE,
  4383. ),
  4384. 'uniquename' => array(
  4385. 'description' => '',
  4386. 'type' => 'text',
  4387. 'not null' => TRUE,
  4388. ),
  4389. 'md5checksum' => array(
  4390. 'description' => '',
  4391. 'type' => 'char',
  4392. 'length' => '32',
  4393. 'not null' => FALSE,
  4394. ),
  4395. 'description' => array(
  4396. 'description' => '',
  4397. 'type' => 'text',
  4398. 'not null' => FALSE,
  4399. ),
  4400. ),
  4401. 'primary key' => array(
  4402. 0 => 'expression_id',
  4403. ),
  4404. 'unique keys' => array(
  4405. 'expression_c1' => array(
  4406. 0 => 'uniquename',
  4407. ),
  4408. ),
  4409. 'foreign keys' => array(
  4410. ),
  4411. 'table' => 'expression',
  4412. 'referring_tables' => array(
  4413. 0 => 'expression_cvterm',
  4414. 1 => 'expression_image',
  4415. 2 => 'expression_pub',
  4416. 3 => 'expressionprop',
  4417. 4 => 'feature_expression',
  4418. ),
  4419. );
  4420. return $description;
  4421. }
  4422. /**
  4423. * Implements hook_chado_schema_v1_2_expression_cvterm()
  4424. * Purpose: To describe the structure of 'expression_cvterm' to tripal
  4425. * @see chado_insert_record()
  4426. * @see chado_update_record()
  4427. * @see chado_select_record()
  4428. *
  4429. * @return
  4430. * An array describing the 'expression_cvterm' table
  4431. *
  4432. * @ingroup tripal_chado_v1.2_schema_api
  4433. *
  4434. */
  4435. function tripal_chado_chado_schema_v1_2_expression_cvterm() {
  4436. $description = array(
  4437. 'description' => '',
  4438. 'fields' => array(
  4439. 'expression_cvterm_id' => array(
  4440. 'description' => '',
  4441. 'type' => 'serial',
  4442. 'not null' => TRUE,
  4443. ),
  4444. 'expression_id' => array(
  4445. 'description' => '',
  4446. 'type' => 'int',
  4447. 'not null' => TRUE,
  4448. ),
  4449. 'cvterm_id' => array(
  4450. 'description' => '',
  4451. 'type' => 'int',
  4452. 'not null' => TRUE,
  4453. ),
  4454. 'rank' => array(
  4455. 'description' => '',
  4456. 'type' => 'int',
  4457. 'not null' => TRUE,
  4458. 'default' => 0,
  4459. ),
  4460. 'cvterm_type_id' => array(
  4461. 'description' => '',
  4462. 'type' => 'int',
  4463. 'not null' => TRUE,
  4464. ),
  4465. ),
  4466. 'primary key' => array(
  4467. 0 => 'expression_cvterm_id',
  4468. ),
  4469. 'unique keys' => array(
  4470. 'expression_cvterm_c1' => array(
  4471. 0 => 'expression_id',
  4472. 1 => 'cvterm_id',
  4473. 2 => 'cvterm_type_id',
  4474. ),
  4475. ),
  4476. 'indexes' => array(
  4477. 'expression_cvterm_idx1' => array(
  4478. 0 => 'expression_id',
  4479. ),
  4480. 'expression_cvterm_idx2' => array(
  4481. 0 => 'cvterm_id',
  4482. ),
  4483. 'expression_cvterm_idx3' => array(
  4484. 0 => 'cvterm_type_id',
  4485. ),
  4486. ),
  4487. 'foreign keys' => array(
  4488. 'cvterm' => array(
  4489. 'table' => 'cvterm',
  4490. 'columns' => array(
  4491. 'cvterm_id' => 'cvterm_id',
  4492. 'cvterm_type_id' => 'cvterm_id',
  4493. ),
  4494. ),
  4495. 'expression' => array(
  4496. 'table' => 'expression',
  4497. 'columns' => array(
  4498. 'expression_id' => 'expression_id',
  4499. ),
  4500. ),
  4501. ),
  4502. 'table' => 'expression_cvterm',
  4503. 'referring_tables' => array(
  4504. 0 => 'expression_cvtermprop',
  4505. ),
  4506. );
  4507. return $description;
  4508. }
  4509. /**
  4510. * Implements hook_chado_schema_v1_2_expression_cvtermprop()
  4511. * Purpose: To describe the structure of 'expression_cvtermprop' to tripal
  4512. * @see chado_insert_record()
  4513. * @see chado_update_record()
  4514. * @see chado_select_record()
  4515. *
  4516. * @return
  4517. * An array describing the 'expression_cvtermprop' table
  4518. *
  4519. * @ingroup tripal_chado_v1.2_schema_api
  4520. *
  4521. */
  4522. function tripal_chado_chado_schema_v1_2_expression_cvtermprop() {
  4523. $description = array(
  4524. 'description' => '',
  4525. 'fields' => array(
  4526. 'expression_cvtermprop_id' => array(
  4527. 'description' => '',
  4528. 'type' => 'serial',
  4529. 'not null' => TRUE,
  4530. ),
  4531. 'expression_cvterm_id' => array(
  4532. 'description' => '',
  4533. 'type' => 'int',
  4534. 'not null' => TRUE,
  4535. ),
  4536. 'type_id' => array(
  4537. 'description' => '',
  4538. 'type' => 'int',
  4539. 'not null' => TRUE,
  4540. ),
  4541. 'value' => array(
  4542. 'description' => '',
  4543. 'type' => 'text',
  4544. 'not null' => FALSE,
  4545. ),
  4546. 'rank' => array(
  4547. 'description' => '',
  4548. 'type' => 'int',
  4549. 'not null' => TRUE,
  4550. 'default' => 0,
  4551. ),
  4552. ),
  4553. 'primary key' => array(
  4554. 0 => 'expression_cvtermprop_id',
  4555. ),
  4556. 'unique keys' => array(
  4557. 'expression_cvtermprop_c1' => array(
  4558. 0 => 'expression_cvterm_id',
  4559. 1 => 'type_id',
  4560. 2 => 'rank',
  4561. ),
  4562. ),
  4563. 'indexes' => array(
  4564. 'expression_cvtermprop_idx1' => array(
  4565. 0 => 'expression_cvterm_id',
  4566. ),
  4567. 'expression_cvtermprop_idx2' => array(
  4568. 0 => 'type_id',
  4569. ),
  4570. ),
  4571. 'foreign keys' => array(
  4572. 'cvterm' => array(
  4573. 'table' => 'cvterm',
  4574. 'columns' => array(
  4575. 'type_id' => 'cvterm_id',
  4576. ),
  4577. ),
  4578. 'expression_cvterm' => array(
  4579. 'table' => 'expression_cvterm',
  4580. 'columns' => array(
  4581. 'expression_cvterm_id' => 'expression_cvterm_id',
  4582. ),
  4583. ),
  4584. ),
  4585. 'table' => 'expression_cvtermprop',
  4586. 'referring_tables' => NULL,
  4587. );
  4588. return $description;
  4589. }
  4590. /**
  4591. * Implements hook_chado_schema_v1_2_expression_image()
  4592. * Purpose: To describe the structure of 'expression_image' to tripal
  4593. * @see chado_insert_record()
  4594. * @see chado_update_record()
  4595. * @see chado_select_record()
  4596. *
  4597. * @return
  4598. * An array describing the 'expression_image' table
  4599. *
  4600. * @ingroup tripal_chado_v1.2_schema_api
  4601. *
  4602. */
  4603. function tripal_chado_chado_schema_v1_2_expression_image() {
  4604. $description = array(
  4605. 'description' => '',
  4606. 'fields' => array(
  4607. 'expression_image_id' => array(
  4608. 'description' => '',
  4609. 'type' => 'serial',
  4610. 'not null' => TRUE,
  4611. ),
  4612. 'expression_id' => array(
  4613. 'description' => '',
  4614. 'type' => 'int',
  4615. 'not null' => TRUE,
  4616. ),
  4617. 'eimage_id' => array(
  4618. 'description' => '',
  4619. 'type' => 'int',
  4620. 'not null' => TRUE,
  4621. ),
  4622. ),
  4623. 'primary key' => array(
  4624. 0 => 'expression_image_id',
  4625. ),
  4626. 'unique keys' => array(
  4627. 'expression_image_c1' => array(
  4628. 0 => 'expression_id',
  4629. 1 => 'eimage_id',
  4630. ),
  4631. ),
  4632. 'indexes' => array(
  4633. 'expression_image_idx1' => array(
  4634. 0 => 'expression_id',
  4635. ),
  4636. 'expression_image_idx2' => array(
  4637. 0 => 'eimage_id',
  4638. ),
  4639. ),
  4640. 'foreign keys' => array(
  4641. 'expression' => array(
  4642. 'table' => 'expression',
  4643. 'columns' => array(
  4644. 'expression_id' => 'expression_id',
  4645. ),
  4646. ),
  4647. 'eimage' => array(
  4648. 'table' => 'eimage',
  4649. 'columns' => array(
  4650. 'eimage_id' => 'eimage_id',
  4651. ),
  4652. ),
  4653. ),
  4654. 'table' => 'expression_image',
  4655. 'referring_tables' => NULL,
  4656. );
  4657. return $description;
  4658. }
  4659. /**
  4660. * Implements hook_chado_schema_v1_2_expression_pub()
  4661. * Purpose: To describe the structure of 'expression_pub' to tripal
  4662. * @see chado_insert_record()
  4663. * @see chado_update_record()
  4664. * @see chado_select_record()
  4665. *
  4666. * @return
  4667. * An array describing the 'expression_pub' table
  4668. *
  4669. * @ingroup tripal_chado_v1.2_schema_api
  4670. *
  4671. */
  4672. function tripal_chado_chado_schema_v1_2_expression_pub() {
  4673. $description = array(
  4674. 'description' => '',
  4675. 'fields' => array(
  4676. 'expression_pub_id' => array(
  4677. 'description' => '',
  4678. 'type' => 'serial',
  4679. 'not null' => TRUE,
  4680. ),
  4681. 'expression_id' => array(
  4682. 'description' => '',
  4683. 'type' => 'int',
  4684. 'not null' => TRUE,
  4685. ),
  4686. 'pub_id' => array(
  4687. 'description' => '',
  4688. 'type' => 'int',
  4689. 'not null' => TRUE,
  4690. ),
  4691. ),
  4692. 'primary key' => array(
  4693. 0 => 'expression_pub_id',
  4694. ),
  4695. 'unique keys' => array(
  4696. 'expression_pub_c1' => array(
  4697. 0 => 'expression_id',
  4698. 1 => 'pub_id',
  4699. ),
  4700. ),
  4701. 'indexes' => array(
  4702. 'expression_pub_idx1' => array(
  4703. 0 => 'expression_id',
  4704. ),
  4705. 'expression_pub_idx2' => array(
  4706. 0 => 'pub_id',
  4707. ),
  4708. ),
  4709. 'foreign keys' => array(
  4710. 'pub' => array(
  4711. 'table' => 'pub',
  4712. 'columns' => array(
  4713. 'pub_id' => 'pub_id',
  4714. ),
  4715. ),
  4716. 'expression' => array(
  4717. 'table' => 'expression',
  4718. 'columns' => array(
  4719. 'expression_id' => 'expression_id',
  4720. ),
  4721. ),
  4722. ),
  4723. 'table' => 'expression_pub',
  4724. 'referring_tables' => NULL,
  4725. );
  4726. return $description;
  4727. }
  4728. /**
  4729. * Implements hook_chado_schema_v1_2_expressionprop()
  4730. * Purpose: To describe the structure of 'expressionprop' to tripal
  4731. * @see chado_insert_record()
  4732. * @see chado_update_record()
  4733. * @see chado_select_record()
  4734. *
  4735. * @return
  4736. * An array describing the 'expressionprop' table
  4737. *
  4738. * @ingroup tripal_chado_v1.2_schema_api
  4739. *
  4740. */
  4741. function tripal_chado_chado_schema_v1_2_expressionprop() {
  4742. $description = array(
  4743. 'description' => '',
  4744. 'fields' => array(
  4745. 'expressionprop_id' => array(
  4746. 'description' => '',
  4747. 'type' => 'serial',
  4748. 'not null' => TRUE,
  4749. ),
  4750. 'expression_id' => array(
  4751. 'description' => '',
  4752. 'type' => 'int',
  4753. 'not null' => TRUE,
  4754. ),
  4755. 'type_id' => array(
  4756. 'description' => '',
  4757. 'type' => 'int',
  4758. 'not null' => TRUE,
  4759. ),
  4760. 'value' => array(
  4761. 'description' => '',
  4762. 'type' => 'text',
  4763. 'not null' => FALSE,
  4764. ),
  4765. 'rank' => array(
  4766. 'description' => '',
  4767. 'type' => 'int',
  4768. 'not null' => TRUE,
  4769. 'default' => 0,
  4770. ),
  4771. ),
  4772. 'primary key' => array(
  4773. 0 => 'expressionprop_id',
  4774. ),
  4775. 'unique keys' => array(
  4776. 'expressionprop_c1' => array(
  4777. 0 => 'expression_id',
  4778. 1 => 'type_id',
  4779. 2 => 'rank',
  4780. ),
  4781. ),
  4782. 'indexes' => array(
  4783. 'expressionprop_idx1' => array(
  4784. 0 => 'expression_id',
  4785. ),
  4786. 'expressionprop_idx2' => array(
  4787. 0 => 'type_id',
  4788. ),
  4789. ),
  4790. 'foreign keys' => array(
  4791. 'cvterm' => array(
  4792. 'table' => 'cvterm',
  4793. 'columns' => array(
  4794. 'type_id' => 'cvterm_id',
  4795. ),
  4796. ),
  4797. 'expression' => array(
  4798. 'table' => 'expression',
  4799. 'columns' => array(
  4800. 'expression_id' => 'expression_id',
  4801. ),
  4802. ),
  4803. ),
  4804. 'table' => 'expressionprop',
  4805. 'referring_tables' => NULL,
  4806. );
  4807. return $description;
  4808. }
  4809. /**
  4810. * Implements hook_chado_schema_v1_2_feature()
  4811. * Purpose: To describe the structure of 'feature' to tripal
  4812. * @see chado_insert_record()
  4813. * @see chado_update_record()
  4814. * @see chado_select_record()
  4815. *
  4816. * @return
  4817. * An array describing the 'feature' table
  4818. *
  4819. * @ingroup tripal_chado_v1.2_schema_api
  4820. *
  4821. */
  4822. function tripal_chado_chado_schema_v1_2_feature() {
  4823. $description = array(
  4824. 'description' => '',
  4825. 'fields' => array(
  4826. 'feature_id' => array(
  4827. 'description' => '',
  4828. 'type' => 'serial',
  4829. 'not null' => TRUE,
  4830. ),
  4831. 'dbxref_id' => array(
  4832. 'description' => '',
  4833. 'type' => 'int',
  4834. 'not null' => FALSE,
  4835. ),
  4836. 'organism_id' => array(
  4837. 'description' => '',
  4838. 'type' => 'int',
  4839. 'not null' => TRUE,
  4840. ),
  4841. 'name' => array(
  4842. 'description' => '',
  4843. 'type' => 'varchar',
  4844. 'length' => '255',
  4845. 'not null' => FALSE,
  4846. ),
  4847. 'uniquename' => array(
  4848. 'description' => '',
  4849. 'type' => 'text',
  4850. 'not null' => TRUE,
  4851. ),
  4852. 'residues' => array(
  4853. 'description' => '',
  4854. 'type' => 'text',
  4855. 'not null' => FALSE,
  4856. ),
  4857. 'seqlen' => array(
  4858. 'description' => '',
  4859. 'type' => 'int',
  4860. 'not null' => FALSE,
  4861. ),
  4862. 'md5checksum' => array(
  4863. 'description' => '',
  4864. 'type' => 'char',
  4865. 'length' => '32',
  4866. 'not null' => FALSE,
  4867. ),
  4868. 'type_id' => array(
  4869. 'description' => '',
  4870. 'type' => 'int',
  4871. 'not null' => TRUE,
  4872. ),
  4873. 'is_analysis' => array(
  4874. 'description' => '',
  4875. 'type' => 'boolean',
  4876. 'not null' => TRUE,
  4877. 'default' => 'false',
  4878. ),
  4879. 'is_obsolete' => array(
  4880. 'description' => '',
  4881. 'type' => 'boolean',
  4882. 'not null' => TRUE,
  4883. 'default' => 'false',
  4884. ),
  4885. 'timeaccessioned' => array(
  4886. 'description' => '',
  4887. 'type' => 'datetime',
  4888. 'not null' => TRUE,
  4889. 'default' => 'now()',
  4890. ),
  4891. 'timelastmodified' => array(
  4892. 'description' => '',
  4893. 'type' => 'datetime',
  4894. 'not null' => TRUE,
  4895. 'default' => 'now()',
  4896. ),
  4897. ),
  4898. 'primary key' => array(
  4899. 0 => 'feature_id',
  4900. ),
  4901. 'unique keys' => array(
  4902. 'feature_c1' => array(
  4903. 0 => 'organism_id',
  4904. 1 => 'uniquename',
  4905. 2 => 'type_id',
  4906. ),
  4907. ),
  4908. 'indexes' => array(
  4909. 'feature_idx1' => array(
  4910. 0 => 'dbxref_id',
  4911. ),
  4912. 'feature_idx2' => array(
  4913. 0 => 'organism_id',
  4914. ),
  4915. 'feature_idx3' => array(
  4916. 0 => 'type_id',
  4917. ),
  4918. 'feature_idx4' => array(
  4919. 0 => 'uniquename',
  4920. ),
  4921. 'feature_name_ind1' => array(
  4922. 0 => 'name',
  4923. ),
  4924. ),
  4925. 'foreign keys' => array(
  4926. 'organism' => array(
  4927. 'table' => 'organism',
  4928. 'columns' => array(
  4929. 'organism_id' => 'organism_id',
  4930. ),
  4931. ),
  4932. 'cvterm' => array(
  4933. 'table' => 'cvterm',
  4934. 'columns' => array(
  4935. 'type_id' => 'cvterm_id',
  4936. ),
  4937. ),
  4938. 'dbxref' => array(
  4939. 'table' => 'dbxref',
  4940. 'columns' => array(
  4941. 'dbxref_id' => 'dbxref_id',
  4942. ),
  4943. ),
  4944. ),
  4945. 'table' => 'feature',
  4946. 'referring_tables' => array(
  4947. 0 => 'analysisfeature',
  4948. 1 => 'cell_line_feature',
  4949. 2 => 'element',
  4950. 3 => 'feature_cvterm',
  4951. 4 => 'feature_dbxref',
  4952. 5 => 'feature_expression',
  4953. 6 => 'feature_genotype',
  4954. 8 => 'feature_phenotype',
  4955. 9 => 'feature_pub',
  4956. 10 => 'feature_relationship',
  4957. 12 => 'feature_synonym',
  4958. 13 => 'featureloc',
  4959. 15 => 'featurepos',
  4960. 17 => 'featureprop',
  4961. 18 => 'featurerange',
  4962. 23 => 'library_feature',
  4963. 24 => 'phylonode',
  4964. 25 => 'studyprop_feature',
  4965. ),
  4966. );
  4967. return $description;
  4968. }
  4969. /**
  4970. * Implements hook_chado_schema_v1_2_feature_cvterm()
  4971. * Purpose: To describe the structure of 'feature_cvterm' to tripal
  4972. * @see chado_insert_record()
  4973. * @see chado_update_record()
  4974. * @see chado_select_record()
  4975. *
  4976. * @return
  4977. * An array describing the 'feature_cvterm' table
  4978. *
  4979. * @ingroup tripal_chado_v1.2_schema_api
  4980. *
  4981. */
  4982. function tripal_chado_chado_schema_v1_2_feature_cvterm() {
  4983. $description = array(
  4984. 'description' => '',
  4985. 'fields' => array(
  4986. 'feature_cvterm_id' => array(
  4987. 'description' => '',
  4988. 'type' => 'serial',
  4989. 'not null' => TRUE,
  4990. ),
  4991. 'feature_id' => array(
  4992. 'description' => '',
  4993. 'type' => 'int',
  4994. 'not null' => TRUE,
  4995. ),
  4996. 'cvterm_id' => array(
  4997. 'description' => '',
  4998. 'type' => 'int',
  4999. 'not null' => TRUE,
  5000. ),
  5001. 'pub_id' => array(
  5002. 'description' => '',
  5003. 'type' => 'int',
  5004. 'not null' => TRUE,
  5005. ),
  5006. 'is_not' => array(
  5007. 'description' => '',
  5008. 'type' => 'boolean',
  5009. 'not null' => TRUE,
  5010. 'default' => 'false',
  5011. ),
  5012. 'rank' => array(
  5013. 'description' => '',
  5014. 'type' => 'int',
  5015. 'not null' => TRUE,
  5016. 'default' => 0,
  5017. ),
  5018. ),
  5019. 'primary key' => array(
  5020. 0 => 'feature_cvterm_id',
  5021. ),
  5022. 'unique keys' => array(
  5023. 'feature_cvterm_c1' => array(
  5024. 0 => 'feature_id',
  5025. 1 => 'cvterm_id',
  5026. 2 => 'pub_id',
  5027. 3 => 'rank',
  5028. ),
  5029. ),
  5030. 'indexes' => array(
  5031. 'feature_cvterm_idx1' => array(
  5032. 0 => 'feature_id',
  5033. ),
  5034. 'feature_cvterm_idx2' => array(
  5035. 0 => 'cvterm_id',
  5036. ),
  5037. 'feature_cvterm_idx3' => array(
  5038. 0 => 'pub_id',
  5039. ),
  5040. ),
  5041. 'foreign keys' => array(
  5042. 'cvterm' => array(
  5043. 'table' => 'cvterm',
  5044. 'columns' => array(
  5045. 'cvterm_id' => 'cvterm_id',
  5046. ),
  5047. ),
  5048. 'pub' => array(
  5049. 'table' => 'pub',
  5050. 'columns' => array(
  5051. 'pub_id' => 'pub_id',
  5052. ),
  5053. ),
  5054. 'feature' => array(
  5055. 'table' => 'feature',
  5056. 'columns' => array(
  5057. 'feature_id' => 'feature_id',
  5058. ),
  5059. ),
  5060. ),
  5061. 'table' => 'feature_cvterm',
  5062. 'referring_tables' => array(
  5063. 0 => 'feature_cvterm_dbxref',
  5064. 1 => 'feature_cvterm_pub',
  5065. 2 => 'feature_cvtermprop',
  5066. ),
  5067. );
  5068. return $description;
  5069. }
  5070. /**
  5071. * Implements hook_chado_schema_v1_2_feature_cvterm_dbxref()
  5072. * Purpose: To describe the structure of 'feature_cvterm_dbxref' to tripal
  5073. * @see chado_insert_record()
  5074. * @see chado_update_record()
  5075. * @see chado_select_record()
  5076. *
  5077. * @return
  5078. * An array describing the 'feature_cvterm_dbxref' table
  5079. *
  5080. * @ingroup tripal_chado_v1.2_schema_api
  5081. *
  5082. */
  5083. function tripal_chado_chado_schema_v1_2_feature_cvterm_dbxref() {
  5084. $description = array(
  5085. 'description' => '',
  5086. 'fields' => array(
  5087. 'feature_cvterm_dbxref_id' => array(
  5088. 'description' => '',
  5089. 'type' => 'serial',
  5090. 'not null' => TRUE,
  5091. ),
  5092. 'feature_cvterm_id' => array(
  5093. 'description' => '',
  5094. 'type' => 'int',
  5095. 'not null' => TRUE,
  5096. ),
  5097. 'dbxref_id' => array(
  5098. 'description' => '',
  5099. 'type' => 'int',
  5100. 'not null' => TRUE,
  5101. ),
  5102. ),
  5103. 'primary key' => array(
  5104. 0 => 'feature_cvterm_dbxref_id',
  5105. ),
  5106. 'unique keys' => array(
  5107. 'feature_cvterm_dbxref_c1' => array(
  5108. 0 => 'feature_cvterm_id',
  5109. 1 => 'dbxref_id',
  5110. ),
  5111. ),
  5112. 'indexes' => array(
  5113. 'feature_cvterm_dbxref_idx1' => array(
  5114. 0 => 'feature_cvterm_id',
  5115. ),
  5116. 'feature_cvterm_dbxref_idx2' => array(
  5117. 0 => 'dbxref_id',
  5118. ),
  5119. ),
  5120. 'foreign keys' => array(
  5121. 'feature_cvterm' => array(
  5122. 'table' => 'feature_cvterm',
  5123. 'columns' => array(
  5124. 'feature_cvterm_id' => 'feature_cvterm_id',
  5125. ),
  5126. ),
  5127. 'dbxref' => array(
  5128. 'table' => 'dbxref',
  5129. 'columns' => array(
  5130. 'dbxref_id' => 'dbxref_id',
  5131. ),
  5132. ),
  5133. ),
  5134. 'table' => 'feature_cvterm_dbxref',
  5135. 'referring_tables' => NULL,
  5136. );
  5137. return $description;
  5138. }
  5139. /**
  5140. * Implements hook_chado_schema_v1_2_feature_cvterm_pub()
  5141. * Purpose: To describe the structure of 'feature_cvterm_pub' to tripal
  5142. * @see chado_insert_record()
  5143. * @see chado_update_record()
  5144. * @see chado_select_record()
  5145. *
  5146. * @return
  5147. * An array describing the 'feature_cvterm_pub' table
  5148. *
  5149. * @ingroup tripal_chado_v1.2_schema_api
  5150. *
  5151. */
  5152. function tripal_chado_chado_schema_v1_2_feature_cvterm_pub() {
  5153. $description = array(
  5154. 'description' => '',
  5155. 'fields' => array(
  5156. 'feature_cvterm_pub_id' => array(
  5157. 'description' => '',
  5158. 'type' => 'serial',
  5159. 'not null' => TRUE,
  5160. ),
  5161. 'feature_cvterm_id' => array(
  5162. 'description' => '',
  5163. 'type' => 'int',
  5164. 'not null' => TRUE,
  5165. ),
  5166. 'pub_id' => array(
  5167. 'description' => '',
  5168. 'type' => 'int',
  5169. 'not null' => TRUE,
  5170. ),
  5171. ),
  5172. 'primary key' => array(
  5173. 0 => 'feature_cvterm_pub_id',
  5174. ),
  5175. 'unique keys' => array(
  5176. 'feature_cvterm_pub_c1' => array(
  5177. 0 => 'feature_cvterm_id',
  5178. 1 => 'pub_id',
  5179. ),
  5180. ),
  5181. 'indexes' => array(
  5182. 'feature_cvterm_pub_idx1' => array(
  5183. 0 => 'feature_cvterm_id',
  5184. ),
  5185. 'feature_cvterm_pub_idx2' => array(
  5186. 0 => 'pub_id',
  5187. ),
  5188. ),
  5189. 'foreign keys' => array(
  5190. 'feature_cvterm' => array(
  5191. 'table' => 'feature_cvterm',
  5192. 'columns' => array(
  5193. 'feature_cvterm_id' => 'feature_cvterm_id',
  5194. ),
  5195. ),
  5196. 'pub' => array(
  5197. 'table' => 'pub',
  5198. 'columns' => array(
  5199. 'pub_id' => 'pub_id',
  5200. ),
  5201. ),
  5202. ),
  5203. 'table' => 'feature_cvterm_pub',
  5204. 'referring_tables' => NULL,
  5205. );
  5206. return $description;
  5207. }
  5208. /**
  5209. * Implements hook_chado_schema_v1_2_feature_cvtermprop()
  5210. * Purpose: To describe the structure of 'feature_cvtermprop' to tripal
  5211. * @see chado_insert_record()
  5212. * @see chado_update_record()
  5213. * @see chado_select_record()
  5214. *
  5215. * @return
  5216. * An array describing the 'feature_cvtermprop' table
  5217. *
  5218. * @ingroup tripal_chado_v1.2_schema_api
  5219. *
  5220. */
  5221. function tripal_chado_chado_schema_v1_2_feature_cvtermprop() {
  5222. $description = array(
  5223. 'description' => '',
  5224. 'fields' => array(
  5225. 'feature_cvtermprop_id' => array(
  5226. 'description' => '',
  5227. 'type' => 'serial',
  5228. 'not null' => TRUE,
  5229. ),
  5230. 'feature_cvterm_id' => array(
  5231. 'description' => '',
  5232. 'type' => 'int',
  5233. 'not null' => TRUE,
  5234. ),
  5235. 'type_id' => array(
  5236. 'description' => '',
  5237. 'type' => 'int',
  5238. 'not null' => TRUE,
  5239. ),
  5240. 'value' => array(
  5241. 'description' => '',
  5242. 'type' => 'text',
  5243. 'not null' => FALSE,
  5244. ),
  5245. 'rank' => array(
  5246. 'description' => '',
  5247. 'type' => 'int',
  5248. 'not null' => TRUE,
  5249. 'default' => 0,
  5250. ),
  5251. ),
  5252. 'primary key' => array(
  5253. 0 => 'feature_cvtermprop_id',
  5254. ),
  5255. 'unique keys' => array(
  5256. 'feature_cvtermprop_c1' => array(
  5257. 0 => 'feature_cvterm_id',
  5258. 1 => 'type_id',
  5259. 2 => 'rank',
  5260. ),
  5261. ),
  5262. 'indexes' => array(
  5263. 'feature_cvtermprop_idx1' => array(
  5264. 0 => 'feature_cvterm_id',
  5265. ),
  5266. 'feature_cvtermprop_idx2' => array(
  5267. 0 => 'type_id',
  5268. ),
  5269. ),
  5270. 'foreign keys' => array(
  5271. 'cvterm' => array(
  5272. 'table' => 'cvterm',
  5273. 'columns' => array(
  5274. 'type_id' => 'cvterm_id',
  5275. ),
  5276. ),
  5277. 'feature_cvterm' => array(
  5278. 'table' => 'feature_cvterm',
  5279. 'columns' => array(
  5280. 'feature_cvterm_id' => 'feature_cvterm_id',
  5281. ),
  5282. ),
  5283. ),
  5284. 'table' => 'feature_cvtermprop',
  5285. 'referring_tables' => NULL,
  5286. );
  5287. return $description;
  5288. }
  5289. /**
  5290. * Implements hook_chado_schema_v1_2_feature_dbxref()
  5291. * Purpose: To describe the structure of 'feature_dbxref' to tripal
  5292. * @see chado_insert_record()
  5293. * @see chado_update_record()
  5294. * @see chado_select_record()
  5295. *
  5296. * @return
  5297. * An array describing the 'feature_dbxref' table
  5298. *
  5299. * @ingroup tripal_chado_v1.2_schema_api
  5300. *
  5301. */
  5302. function tripal_chado_chado_schema_v1_2_feature_dbxref() {
  5303. $description = array(
  5304. 'description' => '',
  5305. 'fields' => array(
  5306. 'feature_dbxref_id' => array(
  5307. 'description' => '',
  5308. 'type' => 'serial',
  5309. 'not null' => TRUE,
  5310. ),
  5311. 'feature_id' => array(
  5312. 'description' => '',
  5313. 'type' => 'int',
  5314. 'not null' => TRUE,
  5315. ),
  5316. 'dbxref_id' => array(
  5317. 'description' => '',
  5318. 'type' => 'int',
  5319. 'not null' => TRUE,
  5320. ),
  5321. 'is_current' => array(
  5322. 'description' => '',
  5323. 'type' => 'boolean',
  5324. 'not null' => TRUE,
  5325. 'default' => 'true',
  5326. ),
  5327. ),
  5328. 'primary key' => array(
  5329. 0 => 'feature_dbxref_id',
  5330. ),
  5331. 'unique keys' => array(
  5332. 'feature_dbxref_c1' => array(
  5333. 0 => 'feature_id',
  5334. 1 => 'dbxref_id',
  5335. ),
  5336. ),
  5337. 'indexes' => array(
  5338. 'feature_dbxref_idx1' => array(
  5339. 0 => 'feature_id',
  5340. ),
  5341. 'feature_dbxref_idx2' => array(
  5342. 0 => 'dbxref_id',
  5343. ),
  5344. ),
  5345. 'foreign keys' => array(
  5346. 'dbxref' => array(
  5347. 'table' => 'dbxref',
  5348. 'columns' => array(
  5349. 'dbxref_id' => 'dbxref_id',
  5350. ),
  5351. ),
  5352. 'feature' => array(
  5353. 'table' => 'feature',
  5354. 'columns' => array(
  5355. 'feature_id' => 'feature_id',
  5356. ),
  5357. ),
  5358. ),
  5359. 'table' => 'feature_dbxref',
  5360. 'referring_tables' => NULL,
  5361. );
  5362. return $description;
  5363. }
  5364. /**
  5365. * Implements hook_chado_schema_v1_2_feature_expression()
  5366. * Purpose: To describe the structure of 'feature_expression' to tripal
  5367. * @see chado_insert_record()
  5368. * @see chado_update_record()
  5369. * @see chado_select_record()
  5370. *
  5371. * @return
  5372. * An array describing the 'feature_expression' table
  5373. *
  5374. * @ingroup tripal_chado_v1.2_schema_api
  5375. *
  5376. */
  5377. function tripal_chado_chado_schema_v1_2_feature_expression() {
  5378. $description = array(
  5379. 'description' => '',
  5380. 'fields' => array(
  5381. 'feature_expression_id' => array(
  5382. 'description' => '',
  5383. 'type' => 'serial',
  5384. 'not null' => TRUE,
  5385. ),
  5386. 'expression_id' => array(
  5387. 'description' => '',
  5388. 'type' => 'int',
  5389. 'not null' => TRUE,
  5390. ),
  5391. 'feature_id' => array(
  5392. 'description' => '',
  5393. 'type' => 'int',
  5394. 'not null' => TRUE,
  5395. ),
  5396. 'pub_id' => array(
  5397. 'description' => '',
  5398. 'type' => 'int',
  5399. 'not null' => TRUE,
  5400. ),
  5401. ),
  5402. 'primary key' => array(
  5403. 0 => 'feature_expression_id',
  5404. ),
  5405. 'unique keys' => array(
  5406. 'feature_expression_c1' => array(
  5407. 0 => 'expression_id',
  5408. 1 => 'feature_id',
  5409. 2 => 'pub_id',
  5410. ),
  5411. ),
  5412. 'indexes' => array(
  5413. 'feature_expression_idx1' => array(
  5414. 0 => 'expression_id',
  5415. ),
  5416. 'feature_expression_idx2' => array(
  5417. 0 => 'feature_id',
  5418. ),
  5419. 'feature_expression_idx3' => array(
  5420. 0 => 'pub_id',
  5421. ),
  5422. ),
  5423. 'foreign keys' => array(
  5424. 'pub' => array(
  5425. 'table' => 'pub',
  5426. 'columns' => array(
  5427. 'pub_id' => 'pub_id',
  5428. ),
  5429. ),
  5430. 'feature' => array(
  5431. 'table' => 'feature',
  5432. 'columns' => array(
  5433. 'feature_id' => 'feature_id',
  5434. ),
  5435. ),
  5436. 'expression' => array(
  5437. 'table' => 'expression',
  5438. 'columns' => array(
  5439. 'expression_id' => 'expression_id',
  5440. ),
  5441. ),
  5442. ),
  5443. 'table' => 'feature_expression',
  5444. 'referring_tables' => array(
  5445. 0 => 'feature_expressionprop',
  5446. ),
  5447. );
  5448. return $description;
  5449. }
  5450. /**
  5451. * Implements hook_chado_schema_v1_2_feature_expressionprop()
  5452. * Purpose: To describe the structure of 'feature_expressionprop' to tripal
  5453. * @see chado_insert_record()
  5454. * @see chado_update_record()
  5455. * @see chado_select_record()
  5456. *
  5457. * @return
  5458. * An array describing the 'feature_expressionprop' table
  5459. *
  5460. * @ingroup tripal_chado_v1.2_schema_api
  5461. *
  5462. */
  5463. function tripal_chado_chado_schema_v1_2_feature_expressionprop() {
  5464. $description = array(
  5465. 'description' => '',
  5466. 'fields' => array(
  5467. 'feature_expressionprop_id' => array(
  5468. 'description' => '',
  5469. 'type' => 'serial',
  5470. 'not null' => TRUE,
  5471. ),
  5472. 'feature_expression_id' => array(
  5473. 'description' => '',
  5474. 'type' => 'int',
  5475. 'not null' => TRUE,
  5476. ),
  5477. 'type_id' => array(
  5478. 'description' => '',
  5479. 'type' => 'int',
  5480. 'not null' => TRUE,
  5481. ),
  5482. 'value' => array(
  5483. 'description' => '',
  5484. 'type' => 'text',
  5485. 'not null' => FALSE,
  5486. ),
  5487. 'rank' => array(
  5488. 'description' => '',
  5489. 'type' => 'int',
  5490. 'not null' => TRUE,
  5491. 'default' => 0,
  5492. ),
  5493. ),
  5494. 'primary key' => array(
  5495. 0 => 'feature_expressionprop_id',
  5496. ),
  5497. 'unique keys' => array(
  5498. 'feature_expressionprop_c1' => array(
  5499. 0 => 'feature_expression_id',
  5500. 1 => 'type_id',
  5501. 2 => 'rank',
  5502. ),
  5503. ),
  5504. 'indexes' => array(
  5505. 'feature_expressionprop_idx1' => array(
  5506. 0 => 'feature_expression_id',
  5507. ),
  5508. 'feature_expressionprop_idx2' => array(
  5509. 0 => 'type_id',
  5510. ),
  5511. ),
  5512. 'foreign keys' => array(
  5513. 'cvterm' => array(
  5514. 'table' => 'cvterm',
  5515. 'columns' => array(
  5516. 'type_id' => 'cvterm_id',
  5517. ),
  5518. ),
  5519. 'feature_expression' => array(
  5520. 'table' => 'feature_expression',
  5521. 'columns' => array(
  5522. 'feature_expression_id' => 'feature_expression_id',
  5523. ),
  5524. ),
  5525. ),
  5526. 'table' => 'feature_expressionprop',
  5527. 'referring_tables' => NULL,
  5528. );
  5529. return $description;
  5530. }
  5531. /**
  5532. * Implements hook_chado_schema_v1_2_feature_genotype()
  5533. * Purpose: To describe the structure of 'feature_genotype' to tripal
  5534. * @see chado_insert_record()
  5535. * @see chado_update_record()
  5536. * @see chado_select_record()
  5537. *
  5538. * @return
  5539. * An array describing the 'feature_genotype' table
  5540. *
  5541. * @ingroup tripal_chado_v1.2_schema_api
  5542. *
  5543. */
  5544. function tripal_chado_chado_schema_v1_2_feature_genotype() {
  5545. $description = array(
  5546. 'description' => '',
  5547. 'fields' => array(
  5548. 'feature_genotype_id' => array(
  5549. 'description' => '',
  5550. 'type' => 'serial',
  5551. 'not null' => TRUE,
  5552. ),
  5553. 'feature_id' => array(
  5554. 'description' => '',
  5555. 'type' => 'int',
  5556. 'not null' => TRUE,
  5557. ),
  5558. 'genotype_id' => array(
  5559. 'description' => '',
  5560. 'type' => 'int',
  5561. 'not null' => TRUE,
  5562. ),
  5563. 'chromosome_id' => array(
  5564. 'description' => '',
  5565. 'type' => 'int',
  5566. 'not null' => FALSE,
  5567. ),
  5568. 'rank' => array(
  5569. 'description' => '',
  5570. 'type' => 'int',
  5571. 'not null' => TRUE,
  5572. ),
  5573. 'cgroup' => array(
  5574. 'description' => '',
  5575. 'type' => 'int',
  5576. 'not null' => TRUE,
  5577. ),
  5578. 'cvterm_id' => array(
  5579. 'description' => '',
  5580. 'type' => 'int',
  5581. 'not null' => TRUE,
  5582. ),
  5583. ),
  5584. 'primary key' => array(
  5585. 0 => 'feature_genotype_id',
  5586. ),
  5587. 'unique keys' => array(
  5588. 'feature_genotype_c1' => array(
  5589. 0 => 'feature_id',
  5590. 1 => 'genotype_id',
  5591. 2 => 'cvterm_id',
  5592. 3 => 'chromosome_id',
  5593. 4 => 'rank',
  5594. 5 => 'cgroup',
  5595. ),
  5596. ),
  5597. 'indexes' => array(
  5598. 'feature_genotype_idx1' => array(
  5599. 0 => 'feature_id',
  5600. ),
  5601. 'feature_genotype_idx2' => array(
  5602. 0 => 'genotype_id',
  5603. ),
  5604. ),
  5605. 'foreign keys' => array(
  5606. 'cvterm' => array(
  5607. 'table' => 'cvterm',
  5608. 'columns' => array(
  5609. 'cvterm_id' => 'cvterm_id',
  5610. ),
  5611. ),
  5612. 'feature' => array(
  5613. 'table' => 'feature',
  5614. 'columns' => array(
  5615. 'feature_id' => 'feature_id',
  5616. 'chromosome_id' => 'feature_id',
  5617. ),
  5618. ),
  5619. 'genotype' => array(
  5620. 'table' => 'genotype',
  5621. 'columns' => array(
  5622. 'genotype_id' => 'genotype_id',
  5623. ),
  5624. ),
  5625. ),
  5626. 'table' => 'feature_genotype',
  5627. 'referring_tables' => NULL,
  5628. );
  5629. return $description;
  5630. }
  5631. /**
  5632. * Implements hook_chado_schema_v1_2_feature_phenotype()
  5633. * Purpose: To describe the structure of 'feature_phenotype' to tripal
  5634. * @see chado_insert_record()
  5635. * @see chado_update_record()
  5636. * @see chado_select_record()
  5637. *
  5638. * @return
  5639. * An array describing the 'feature_phenotype' table
  5640. *
  5641. * @ingroup tripal_chado_v1.2_schema_api
  5642. *
  5643. */
  5644. function tripal_chado_chado_schema_v1_2_feature_phenotype() {
  5645. $description = array(
  5646. 'description' => '',
  5647. 'fields' => array(
  5648. 'feature_phenotype_id' => array(
  5649. 'description' => '',
  5650. 'type' => 'serial',
  5651. 'not null' => TRUE,
  5652. ),
  5653. 'feature_id' => array(
  5654. 'description' => '',
  5655. 'type' => 'int',
  5656. 'not null' => TRUE,
  5657. ),
  5658. 'phenotype_id' => array(
  5659. 'description' => '',
  5660. 'type' => 'int',
  5661. 'not null' => TRUE,
  5662. ),
  5663. ),
  5664. 'primary key' => array(
  5665. 0 => 'feature_phenotype_id',
  5666. ),
  5667. 'unique keys' => array(
  5668. 'feature_phenotype_c1' => array(
  5669. 0 => 'feature_id',
  5670. 1 => 'phenotype_id',
  5671. ),
  5672. ),
  5673. 'indexes' => array(
  5674. 'feature_phenotype_idx1' => array(
  5675. 0 => 'feature_id',
  5676. ),
  5677. 'feature_phenotype_idx2' => array(
  5678. 0 => 'phenotype_id',
  5679. ),
  5680. ),
  5681. 'foreign keys' => array(
  5682. 'feature' => array(
  5683. 'table' => 'feature',
  5684. 'columns' => array(
  5685. 'feature_id' => 'feature_id',
  5686. ),
  5687. ),
  5688. 'phenotype' => array(
  5689. 'table' => 'phenotype',
  5690. 'columns' => array(
  5691. 'phenotype_id' => 'phenotype_id',
  5692. ),
  5693. ),
  5694. ),
  5695. 'table' => 'feature_phenotype',
  5696. 'referring_tables' => NULL,
  5697. );
  5698. return $description;
  5699. }
  5700. /**
  5701. * Implements hook_chado_schema_v1_2_feature_pub()
  5702. * Purpose: To describe the structure of 'feature_pub' to tripal
  5703. * @see chado_insert_record()
  5704. * @see chado_update_record()
  5705. * @see chado_select_record()
  5706. *
  5707. * @return
  5708. * An array describing the 'feature_pub' table
  5709. *
  5710. * @ingroup tripal_chado_v1.2_schema_api
  5711. *
  5712. */
  5713. function tripal_chado_chado_schema_v1_2_feature_pub() {
  5714. $description = array(
  5715. 'description' => '',
  5716. 'fields' => array(
  5717. 'feature_pub_id' => array(
  5718. 'description' => '',
  5719. 'type' => 'serial',
  5720. 'not null' => TRUE,
  5721. ),
  5722. 'feature_id' => array(
  5723. 'description' => '',
  5724. 'type' => 'int',
  5725. 'not null' => TRUE,
  5726. ),
  5727. 'pub_id' => array(
  5728. 'description' => '',
  5729. 'type' => 'int',
  5730. 'not null' => TRUE,
  5731. ),
  5732. ),
  5733. 'primary key' => array(
  5734. 0 => 'feature_pub_id',
  5735. ),
  5736. 'unique keys' => array(
  5737. 'feature_pub_c1' => array(
  5738. 0 => 'feature_id',
  5739. 1 => 'pub_id',
  5740. ),
  5741. ),
  5742. 'indexes' => array(
  5743. 'feature_pub_idx1' => array(
  5744. 0 => 'feature_id',
  5745. ),
  5746. 'feature_pub_idx2' => array(
  5747. 0 => 'pub_id',
  5748. ),
  5749. ),
  5750. 'foreign keys' => array(
  5751. 'pub' => array(
  5752. 'table' => 'pub',
  5753. 'columns' => array(
  5754. 'pub_id' => 'pub_id',
  5755. ),
  5756. ),
  5757. 'feature' => array(
  5758. 'table' => 'feature',
  5759. 'columns' => array(
  5760. 'feature_id' => 'feature_id',
  5761. ),
  5762. ),
  5763. ),
  5764. 'table' => 'feature_pub',
  5765. 'referring_tables' => array(
  5766. 0 => 'feature_pubprop',
  5767. ),
  5768. );
  5769. return $description;
  5770. }
  5771. /**
  5772. * Implements hook_chado_schema_v1_2_feature_pubprop()
  5773. * Purpose: To describe the structure of 'feature_pubprop' to tripal
  5774. * @see chado_insert_record()
  5775. * @see chado_update_record()
  5776. * @see chado_select_record()
  5777. *
  5778. * @return
  5779. * An array describing the 'feature_pubprop' table
  5780. *
  5781. * @ingroup tripal_chado_v1.2_schema_api
  5782. *
  5783. */
  5784. function tripal_chado_chado_schema_v1_2_feature_pubprop() {
  5785. $description = array(
  5786. 'description' => '',
  5787. 'fields' => array(
  5788. 'feature_pubprop_id' => array(
  5789. 'description' => '',
  5790. 'type' => 'serial',
  5791. 'not null' => TRUE,
  5792. ),
  5793. 'feature_pub_id' => array(
  5794. 'description' => '',
  5795. 'type' => 'int',
  5796. 'not null' => TRUE,
  5797. ),
  5798. 'type_id' => array(
  5799. 'description' => '',
  5800. 'type' => 'int',
  5801. 'not null' => TRUE,
  5802. ),
  5803. 'value' => array(
  5804. 'description' => '',
  5805. 'type' => 'text',
  5806. 'not null' => FALSE,
  5807. ),
  5808. 'rank' => array(
  5809. 'description' => '',
  5810. 'type' => 'int',
  5811. 'not null' => TRUE,
  5812. 'default' => 0,
  5813. ),
  5814. ),
  5815. 'primary key' => array(
  5816. 0 => 'feature_pubprop_id',
  5817. ),
  5818. 'unique keys' => array(
  5819. 'feature_pubprop_c1' => array(
  5820. 0 => 'feature_pub_id',
  5821. 1 => 'type_id',
  5822. 2 => 'rank',
  5823. ),
  5824. ),
  5825. 'indexes' => array(
  5826. 'feature_pubprop_idx1' => array(
  5827. 0 => 'feature_pub_id',
  5828. ),
  5829. ),
  5830. 'foreign keys' => array(
  5831. 'cvterm' => array(
  5832. 'table' => 'cvterm',
  5833. 'columns' => array(
  5834. 'type_id' => 'cvterm_id',
  5835. ),
  5836. ),
  5837. 'feature_pub' => array(
  5838. 'table' => 'feature_pub',
  5839. 'columns' => array(
  5840. 'feature_pub_id' => 'feature_pub_id',
  5841. ),
  5842. ),
  5843. ),
  5844. 'table' => 'feature_pubprop',
  5845. 'referring_tables' => NULL,
  5846. );
  5847. return $description;
  5848. }
  5849. /**
  5850. * Implements hook_chado_schema_v1_2_feature_relationship()
  5851. * Purpose: To describe the structure of 'feature_relationship' to tripal
  5852. * @see chado_insert_record()
  5853. * @see chado_update_record()
  5854. * @see chado_select_record()
  5855. *
  5856. * @return
  5857. * An array describing the 'feature_relationship' table
  5858. *
  5859. * @ingroup tripal_chado_v1.2_schema_api
  5860. *
  5861. */
  5862. function tripal_chado_chado_schema_v1_2_feature_relationship() {
  5863. $description = array(
  5864. 'description' => '',
  5865. 'fields' => array(
  5866. 'feature_relationship_id' => array(
  5867. 'description' => '',
  5868. 'type' => 'serial',
  5869. 'not null' => TRUE,
  5870. ),
  5871. 'subject_id' => array(
  5872. 'description' => '',
  5873. 'type' => 'int',
  5874. 'not null' => TRUE,
  5875. ),
  5876. 'object_id' => array(
  5877. 'description' => '',
  5878. 'type' => 'int',
  5879. 'not null' => TRUE,
  5880. ),
  5881. 'type_id' => array(
  5882. 'description' => '',
  5883. 'type' => 'int',
  5884. 'not null' => TRUE,
  5885. ),
  5886. 'value' => array(
  5887. 'description' => '',
  5888. 'type' => 'text',
  5889. 'not null' => FALSE,
  5890. ),
  5891. 'rank' => array(
  5892. 'description' => '',
  5893. 'type' => 'int',
  5894. 'not null' => TRUE,
  5895. 'default' => 0,
  5896. ),
  5897. ),
  5898. 'primary key' => array(
  5899. 0 => 'feature_relationship_id',
  5900. ),
  5901. 'unique keys' => array(
  5902. 'feature_relationship_c1' => array(
  5903. 0 => 'subject_id',
  5904. 1 => 'object_id',
  5905. 2 => 'type_id',
  5906. 3 => 'rank',
  5907. ),
  5908. ),
  5909. 'indexes' => array(
  5910. 'feature_relationship_idx1' => array(
  5911. 0 => 'subject_id',
  5912. ),
  5913. 'feature_relationship_idx2' => array(
  5914. 0 => 'object_id',
  5915. ),
  5916. 'feature_relationship_idx3' => array(
  5917. 0 => 'type_id',
  5918. ),
  5919. ),
  5920. 'foreign keys' => array(
  5921. 'cvterm' => array(
  5922. 'table' => 'cvterm',
  5923. 'columns' => array(
  5924. 'type_id' => 'cvterm_id',
  5925. ),
  5926. ),
  5927. 'feature' => array(
  5928. 'table' => 'feature',
  5929. 'columns' => array(
  5930. 'subject_id' => 'feature_id',
  5931. 'object_id' => 'feature_id',
  5932. ),
  5933. ),
  5934. ),
  5935. 'table' => 'feature_relationship',
  5936. 'referring_tables' => array(
  5937. 0 => 'feature_relationship_pub',
  5938. 1 => 'feature_relationshipprop',
  5939. ),
  5940. );
  5941. return $description;
  5942. }
  5943. /**
  5944. * Implements hook_chado_schema_v1_2_feature_relationship_pub()
  5945. * Purpose: To describe the structure of 'feature_relationship_pub' to tripal
  5946. * @see chado_insert_record()
  5947. * @see chado_update_record()
  5948. * @see chado_select_record()
  5949. *
  5950. * @return
  5951. * An array describing the 'feature_relationship_pub' table
  5952. *
  5953. * @ingroup tripal_chado_v1.2_schema_api
  5954. *
  5955. */
  5956. function tripal_chado_chado_schema_v1_2_feature_relationship_pub() {
  5957. $description = array(
  5958. 'description' => '',
  5959. 'fields' => array(
  5960. 'feature_relationship_pub_id' => array(
  5961. 'description' => '',
  5962. 'type' => 'serial',
  5963. 'not null' => TRUE,
  5964. ),
  5965. 'feature_relationship_id' => array(
  5966. 'description' => '',
  5967. 'type' => 'int',
  5968. 'not null' => TRUE,
  5969. ),
  5970. 'pub_id' => array(
  5971. 'description' => '',
  5972. 'type' => 'int',
  5973. 'not null' => TRUE,
  5974. ),
  5975. ),
  5976. 'primary key' => array(
  5977. 0 => 'feature_relationship_pub_id',
  5978. ),
  5979. 'unique keys' => array(
  5980. 'feature_relationship_pub_c1' => array(
  5981. 0 => 'feature_relationship_id',
  5982. 1 => 'pub_id',
  5983. ),
  5984. ),
  5985. 'indexes' => array(
  5986. 'feature_relationship_pub_idx1' => array(
  5987. 0 => 'feature_relationship_id',
  5988. ),
  5989. 'feature_relationship_pub_idx2' => array(
  5990. 0 => 'pub_id',
  5991. ),
  5992. ),
  5993. 'foreign keys' => array(
  5994. 'feature_relationship' => array(
  5995. 'table' => 'feature_relationship',
  5996. 'columns' => array(
  5997. 'feature_relationship_id' => 'feature_relationship_id',
  5998. ),
  5999. ),
  6000. 'pub' => array(
  6001. 'table' => 'pub',
  6002. 'columns' => array(
  6003. 'pub_id' => 'pub_id',
  6004. ),
  6005. ),
  6006. ),
  6007. 'table' => 'feature_relationship_pub',
  6008. 'referring_tables' => NULL,
  6009. );
  6010. return $description;
  6011. }
  6012. /**
  6013. * Implements hook_chado_schema_v1_2_feature_relationshipprop()
  6014. * Purpose: To describe the structure of 'feature_relationshipprop' to tripal
  6015. * @see chado_insert_record()
  6016. * @see chado_update_record()
  6017. * @see chado_select_record()
  6018. *
  6019. * @return
  6020. * An array describing the 'feature_relationshipprop' table
  6021. *
  6022. * @ingroup tripal_chado_v1.2_schema_api
  6023. *
  6024. */
  6025. function tripal_chado_chado_schema_v1_2_feature_relationshipprop() {
  6026. $description = array(
  6027. 'description' => '',
  6028. 'fields' => array(
  6029. 'feature_relationshipprop_id' => array(
  6030. 'description' => '',
  6031. 'type' => 'serial',
  6032. 'not null' => TRUE,
  6033. ),
  6034. 'feature_relationship_id' => array(
  6035. 'description' => '',
  6036. 'type' => 'int',
  6037. 'not null' => TRUE,
  6038. ),
  6039. 'type_id' => array(
  6040. 'description' => '',
  6041. 'type' => 'int',
  6042. 'not null' => TRUE,
  6043. ),
  6044. 'value' => array(
  6045. 'description' => '',
  6046. 'type' => 'text',
  6047. 'not null' => FALSE,
  6048. ),
  6049. 'rank' => array(
  6050. 'description' => '',
  6051. 'type' => 'int',
  6052. 'not null' => TRUE,
  6053. 'default' => 0,
  6054. ),
  6055. ),
  6056. 'primary key' => array(
  6057. 0 => 'feature_relationshipprop_id',
  6058. ),
  6059. 'unique keys' => array(
  6060. 'feature_relationshipprop_c1' => array(
  6061. 0 => 'feature_relationship_id',
  6062. 1 => 'type_id',
  6063. 2 => 'rank',
  6064. ),
  6065. ),
  6066. 'indexes' => array(
  6067. 'feature_relationshipprop_idx1' => array(
  6068. 0 => 'feature_relationship_id',
  6069. ),
  6070. 'feature_relationshipprop_idx2' => array(
  6071. 0 => 'type_id',
  6072. ),
  6073. ),
  6074. 'foreign keys' => array(
  6075. 'cvterm' => array(
  6076. 'table' => 'cvterm',
  6077. 'columns' => array(
  6078. 'type_id' => 'cvterm_id',
  6079. ),
  6080. ),
  6081. 'feature_relationship' => array(
  6082. 'table' => 'feature_relationship',
  6083. 'columns' => array(
  6084. 'feature_relationship_id' => 'feature_relationship_id',
  6085. ),
  6086. ),
  6087. ),
  6088. 'table' => 'feature_relationshipprop',
  6089. 'referring_tables' => array(
  6090. 0 => 'feature_relationshipprop_pub',
  6091. ),
  6092. );
  6093. return $description;
  6094. }
  6095. /**
  6096. * Implements hook_chado_schema_v1_2_feature_relationshipprop_pub()
  6097. * Purpose: To describe the structure of 'feature_relationshipprop_pub' to tripal
  6098. * @see chado_insert_record()
  6099. * @see chado_update_record()
  6100. * @see chado_select_record()
  6101. *
  6102. * @return
  6103. * An array describing the 'feature_relationshipprop_pub' table
  6104. *
  6105. * @ingroup tripal_chado_v1.2_schema_api
  6106. *
  6107. */
  6108. function tripal_chado_chado_schema_v1_2_feature_relationshipprop_pub() {
  6109. $description = array(
  6110. 'description' => '',
  6111. 'fields' => array(
  6112. 'feature_relationshipprop_pub_id' => array(
  6113. 'description' => '',
  6114. 'type' => 'serial',
  6115. 'not null' => TRUE,
  6116. ),
  6117. 'feature_relationshipprop_id' => array(
  6118. 'description' => '',
  6119. 'type' => 'int',
  6120. 'not null' => TRUE,
  6121. ),
  6122. 'pub_id' => array(
  6123. 'description' => '',
  6124. 'type' => 'int',
  6125. 'not null' => TRUE,
  6126. ),
  6127. ),
  6128. 'primary key' => array(
  6129. 0 => 'feature_relationshipprop_pub_id',
  6130. ),
  6131. 'unique keys' => array(
  6132. 'feature_relationshipprop_pub_c1' => array(
  6133. 0 => 'feature_relationshipprop_id',
  6134. 1 => 'pub_id',
  6135. ),
  6136. ),
  6137. 'indexes' => array(
  6138. 'feature_relationshipprop_pub_idx1' => array(
  6139. 0 => 'feature_relationshipprop_id',
  6140. ),
  6141. 'feature_relationshipprop_pub_idx2' => array(
  6142. 0 => 'pub_id',
  6143. ),
  6144. ),
  6145. 'foreign keys' => array(
  6146. 'feature_relationshipprop' => array(
  6147. 'table' => 'feature_relationshipprop',
  6148. 'columns' => array(
  6149. 'feature_relationshipprop_id' => 'feature_relationshipprop_id',
  6150. ),
  6151. ),
  6152. 'pub' => array(
  6153. 'table' => 'pub',
  6154. 'columns' => array(
  6155. 'pub_id' => 'pub_id',
  6156. ),
  6157. ),
  6158. ),
  6159. 'table' => 'feature_relationshipprop_pub',
  6160. 'referring_tables' => NULL,
  6161. );
  6162. return $description;
  6163. }
  6164. /**
  6165. * Implements hook_chado_schema_v1_2_feature_synonym()
  6166. * Purpose: To describe the structure of 'feature_synonym' to tripal
  6167. * @see chado_insert_record()
  6168. * @see chado_update_record()
  6169. * @see chado_select_record()
  6170. *
  6171. * @return
  6172. * An array describing the 'feature_synonym' table
  6173. *
  6174. * @ingroup tripal_chado_v1.2_schema_api
  6175. *
  6176. */
  6177. function tripal_chado_chado_schema_v1_2_feature_synonym() {
  6178. $description = array(
  6179. 'description' => '',
  6180. 'fields' => array(
  6181. 'feature_synonym_id' => array(
  6182. 'description' => '',
  6183. 'type' => 'serial',
  6184. 'not null' => TRUE,
  6185. ),
  6186. 'synonym_id' => array(
  6187. 'description' => '',
  6188. 'type' => 'int',
  6189. 'not null' => TRUE,
  6190. ),
  6191. 'feature_id' => array(
  6192. 'description' => '',
  6193. 'type' => 'int',
  6194. 'not null' => TRUE,
  6195. ),
  6196. 'pub_id' => array(
  6197. 'description' => '',
  6198. 'type' => 'int',
  6199. 'not null' => TRUE,
  6200. ),
  6201. 'is_current' => array(
  6202. 'description' => '',
  6203. 'type' => 'boolean',
  6204. 'not null' => TRUE,
  6205. 'default' => 'false',
  6206. ),
  6207. 'is_internal' => array(
  6208. 'description' => '',
  6209. 'type' => 'boolean',
  6210. 'not null' => TRUE,
  6211. 'default' => 'false',
  6212. ),
  6213. ),
  6214. 'primary key' => array(
  6215. 0 => 'feature_synonym_id',
  6216. ),
  6217. 'unique keys' => array(
  6218. 'feature_synonym_c1' => array(
  6219. 0 => 'synonym_id',
  6220. 1 => 'feature_id',
  6221. 2 => 'pub_id',
  6222. ),
  6223. ),
  6224. 'indexes' => array(
  6225. 'feature_synonym_idx1' => array(
  6226. 0 => 'synonym_id',
  6227. ),
  6228. 'feature_synonym_idx2' => array(
  6229. 0 => 'feature_id',
  6230. ),
  6231. 'feature_synonym_idx3' => array(
  6232. 0 => 'pub_id',
  6233. ),
  6234. ),
  6235. 'foreign keys' => array(
  6236. 'pub' => array(
  6237. 'table' => 'pub',
  6238. 'columns' => array(
  6239. 'pub_id' => 'pub_id',
  6240. ),
  6241. ),
  6242. 'feature' => array(
  6243. 'table' => 'feature',
  6244. 'columns' => array(
  6245. 'feature_id' => 'feature_id',
  6246. ),
  6247. ),
  6248. 'synonym' => array(
  6249. 'table' => 'synonym',
  6250. 'columns' => array(
  6251. 'synonym_id' => 'synonym_id',
  6252. ),
  6253. ),
  6254. ),
  6255. 'table' => 'feature_synonym',
  6256. 'referring_tables' => NULL,
  6257. );
  6258. return $description;
  6259. }
  6260. /**
  6261. * Implements hook_chado_schema_v1_2_featureloc()
  6262. * Purpose: To describe the structure of 'featureloc' to tripal
  6263. * @see chado_insert_record()
  6264. * @see chado_update_record()
  6265. * @see chado_select_record()
  6266. *
  6267. * @return
  6268. * An array describing the 'featureloc' table
  6269. *
  6270. * @ingroup tripal_chado_v1.2_schema_api
  6271. *
  6272. */
  6273. function tripal_chado_chado_schema_v1_2_featureloc() {
  6274. $description = array(
  6275. 'description' => '',
  6276. 'fields' => array(
  6277. 'featureloc_id' => array(
  6278. 'description' => '',
  6279. 'type' => 'serial',
  6280. 'not null' => TRUE,
  6281. ),
  6282. 'feature_id' => array(
  6283. 'description' => '',
  6284. 'type' => 'int',
  6285. 'not null' => TRUE,
  6286. ),
  6287. 'srcfeature_id' => array(
  6288. 'description' => '',
  6289. 'type' => 'int',
  6290. 'not null' => FALSE,
  6291. ),
  6292. 'fmin' => array(
  6293. 'description' => '',
  6294. 'type' => 'int',
  6295. 'not null' => FALSE,
  6296. ),
  6297. 'is_fmin_partial' => array(
  6298. 'description' => '',
  6299. 'type' => 'boolean',
  6300. 'not null' => TRUE,
  6301. 'default' => 'false',
  6302. ),
  6303. 'fmax' => array(
  6304. 'description' => '',
  6305. 'type' => 'int',
  6306. 'not null' => FALSE,
  6307. ),
  6308. 'is_fmax_partial' => array(
  6309. 'description' => '',
  6310. 'type' => 'boolean',
  6311. 'not null' => TRUE,
  6312. 'default' => 'false',
  6313. ),
  6314. 'strand' => array(
  6315. 'description' => '',
  6316. 'type' => 'int',
  6317. 'size' => 'small',
  6318. 'not null' => FALSE,
  6319. ),
  6320. 'phase' => array(
  6321. 'description' => '',
  6322. 'type' => 'int',
  6323. 'not null' => FALSE,
  6324. ),
  6325. 'residue_info' => array(
  6326. 'description' => '',
  6327. 'type' => 'text',
  6328. 'not null' => FALSE,
  6329. ),
  6330. 'locgroup' => array(
  6331. 'description' => '',
  6332. 'type' => 'int',
  6333. 'not null' => TRUE,
  6334. 'default' => 0,
  6335. ),
  6336. 'rank' => array(
  6337. 'description' => '',
  6338. 'type' => 'int',
  6339. 'not null' => TRUE,
  6340. 'default' => 0,
  6341. ),
  6342. ),
  6343. 'primary key' => array(
  6344. 0 => 'featureloc_id',
  6345. ),
  6346. 'unique keys' => array(
  6347. 'featureloc_c1' => array(
  6348. 0 => 'feature_id',
  6349. 1 => 'locgroup',
  6350. 2 => 'rank',
  6351. ),
  6352. ),
  6353. 'indexes' => array(
  6354. 'binloc_boxrange' => array(
  6355. 0 => 'fmin',
  6356. ),
  6357. 'binloc_boxrange_src' => array(
  6358. 0 => 'srcfeature_id',
  6359. 1 => 'fmin',
  6360. ),
  6361. 'featureloc_idx1' => array(
  6362. 0 => 'feature_id',
  6363. ),
  6364. 'featureloc_idx2' => array(
  6365. 0 => 'srcfeature_id',
  6366. ),
  6367. 'featureloc_idx3' => array(
  6368. 0 => 'srcfeature_id',
  6369. 1 => 'fmin',
  6370. 2 => 'fmax',
  6371. ),
  6372. ),
  6373. 'foreign keys' => array(
  6374. 'feature' => array(
  6375. 'table' => 'feature',
  6376. 'columns' => array(
  6377. 'feature_id' => 'feature_id',
  6378. 'srcfeature_id' => 'feature_id',
  6379. ),
  6380. ),
  6381. ),
  6382. 'referring_tables' => array(
  6383. 0 => 'featureloc_pub',
  6384. ),
  6385. 'table' => 'featureloc',
  6386. );
  6387. return $description;
  6388. }
  6389. /**
  6390. * Implements hook_chado_schema_v1_2_featureloc_pub()
  6391. * Purpose: To describe the structure of 'featureloc_pub' to tripal
  6392. * @see chado_insert_record()
  6393. * @see chado_update_record()
  6394. * @see chado_select_record()
  6395. *
  6396. * @return
  6397. * An array describing the 'featureloc_pub' table
  6398. *
  6399. * @ingroup tripal_chado_v1.2_schema_api
  6400. *
  6401. */
  6402. function tripal_chado_chado_schema_v1_2_featureloc_pub() {
  6403. $description = array(
  6404. 'description' => '',
  6405. 'fields' => array(
  6406. 'featureloc_pub_id' => array(
  6407. 'description' => '',
  6408. 'type' => 'serial',
  6409. 'not null' => TRUE,
  6410. ),
  6411. 'featureloc_id' => array(
  6412. 'description' => '',
  6413. 'type' => 'int',
  6414. 'not null' => TRUE,
  6415. ),
  6416. 'pub_id' => array(
  6417. 'description' => '',
  6418. 'type' => 'int',
  6419. 'not null' => TRUE,
  6420. ),
  6421. ),
  6422. 'primary key' => array(
  6423. 0 => 'featureloc_pub_id',
  6424. ),
  6425. 'unique keys' => array(
  6426. 'featureloc_pub_c1' => array(
  6427. 0 => 'featureloc_id',
  6428. 1 => 'pub_id',
  6429. ),
  6430. ),
  6431. 'indexes' => array(
  6432. 'featureloc_pub_idx1' => array(
  6433. 0 => 'featureloc_id',
  6434. ),
  6435. 'featureloc_pub_idx2' => array(
  6436. 0 => 'pub_id',
  6437. ),
  6438. ),
  6439. 'foreign keys' => array(
  6440. 'featureloc' => array(
  6441. 'table' => 'featureloc',
  6442. 'columns' => array(
  6443. 'featureloc_id' => 'featureloc_id',
  6444. ),
  6445. ),
  6446. 'pub' => array(
  6447. 'table' => 'pub',
  6448. 'columns' => array(
  6449. 'pub_id' => 'pub_id',
  6450. ),
  6451. ),
  6452. ),
  6453. 'table' => 'featureloc_pub',
  6454. 'referring_tables' => NULL,
  6455. );
  6456. return $description;
  6457. }
  6458. /**
  6459. * Implements hook_chado_schema_v1_2_featuremap()
  6460. * Purpose: To describe the structure of 'featuremap' to tripal
  6461. * @see chado_insert_record()
  6462. * @see chado_update_record()
  6463. * @see chado_select_record()
  6464. *
  6465. * @return
  6466. * An array describing the 'featuremap' table
  6467. *
  6468. * @ingroup tripal_chado_v1.2_schema_api
  6469. *
  6470. */
  6471. function tripal_chado_chado_schema_v1_2_featuremap() {
  6472. $description = array(
  6473. 'description' => '',
  6474. 'fields' => array(
  6475. 'featuremap_id' => array(
  6476. 'description' => '',
  6477. 'type' => 'serial',
  6478. 'not null' => TRUE,
  6479. ),
  6480. 'name' => array(
  6481. 'description' => '',
  6482. 'type' => 'varchar',
  6483. 'length' => '255',
  6484. 'not null' => FALSE,
  6485. ),
  6486. 'description' => array(
  6487. 'description' => '',
  6488. 'type' => 'text',
  6489. 'not null' => FALSE,
  6490. ),
  6491. 'unittype_id' => array(
  6492. 'description' => '',
  6493. 'type' => 'int',
  6494. 'not null' => FALSE,
  6495. ),
  6496. ),
  6497. 'primary key' => array(
  6498. 0 => 'featuremap_id',
  6499. ),
  6500. 'unique keys' => array(
  6501. 'featuremap_c1' => array(
  6502. 0 => 'name',
  6503. ),
  6504. ),
  6505. 'foreign keys' => array(
  6506. 'cvterm' => array(
  6507. 'table' => 'cvterm',
  6508. 'columns' => array(
  6509. 'unittype_id' => 'cvterm_id',
  6510. ),
  6511. ),
  6512. ),
  6513. 'table' => 'featuremap',
  6514. 'referring_tables' => array(
  6515. 0 => 'featuremap_pub',
  6516. 1 => 'featurepos',
  6517. 2 => 'featurerange',
  6518. ),
  6519. );
  6520. return $description;
  6521. }
  6522. /**
  6523. * Implements hook_chado_schema_v1_2_featuremap_pub()
  6524. * Purpose: To describe the structure of 'featuremap_pub' to tripal
  6525. * @see chado_insert_record()
  6526. * @see chado_update_record()
  6527. * @see chado_select_record()
  6528. *
  6529. * @return
  6530. * An array describing the 'featuremap_pub' table
  6531. *
  6532. * @ingroup tripal_chado_v1.2_schema_api
  6533. *
  6534. */
  6535. function tripal_chado_chado_schema_v1_2_featuremap_pub() {
  6536. $description = array(
  6537. 'description' => '',
  6538. 'fields' => array(
  6539. 'featuremap_pub_id' => array(
  6540. 'description' => '',
  6541. 'type' => 'serial',
  6542. 'not null' => TRUE,
  6543. ),
  6544. 'featuremap_id' => array(
  6545. 'description' => '',
  6546. 'type' => 'int',
  6547. 'not null' => TRUE,
  6548. ),
  6549. 'pub_id' => array(
  6550. 'description' => '',
  6551. 'type' => 'int',
  6552. 'not null' => TRUE,
  6553. ),
  6554. ),
  6555. 'primary key' => array(
  6556. 0 => 'featuremap_pub_id',
  6557. ),
  6558. 'indexes' => array(
  6559. 'featuremap_pub_idx1' => array(
  6560. 0 => 'featuremap_id',
  6561. ),
  6562. 'featuremap_pub_idx2' => array(
  6563. 0 => 'pub_id',
  6564. ),
  6565. ),
  6566. 'foreign keys' => array(
  6567. 'pub' => array(
  6568. 'table' => 'pub',
  6569. 'columns' => array(
  6570. 'pub_id' => 'pub_id',
  6571. ),
  6572. ),
  6573. 'featuremap' => array(
  6574. 'table' => 'featuremap',
  6575. 'columns' => array(
  6576. 'featuremap_id' => 'featuremap_id',
  6577. ),
  6578. ),
  6579. ),
  6580. 'table' => 'featuremap_pub',
  6581. 'referring_tables' => NULL,
  6582. );
  6583. return $description;
  6584. }
  6585. /**
  6586. * Implements hook_chado_schema_v1_2_featurepos()
  6587. * Purpose: To describe the structure of 'featurepos' to tripal
  6588. * @see chado_insert_record()
  6589. * @see chado_update_record()
  6590. * @see chado_select_record()
  6591. *
  6592. * @return
  6593. * An array describing the 'featurepos' table
  6594. *
  6595. * @ingroup tripal_chado_v1.2_schema_api
  6596. *
  6597. */
  6598. function tripal_chado_chado_schema_v1_2_featurepos() {
  6599. $description = array(
  6600. 'description' => '',
  6601. 'fields' => array(
  6602. 'featurepos_id' => array(
  6603. 'description' => '',
  6604. 'type' => 'serial',
  6605. 'not null' => TRUE,
  6606. ),
  6607. 'featuremap_id' => array(
  6608. 'description' => '',
  6609. 'type' => 'serial',
  6610. 'not null' => TRUE,
  6611. ),
  6612. 'feature_id' => array(
  6613. 'description' => '',
  6614. 'type' => 'int',
  6615. 'not null' => TRUE,
  6616. ),
  6617. 'map_feature_id' => array(
  6618. 'description' => '',
  6619. 'type' => 'int',
  6620. 'not null' => TRUE,
  6621. ),
  6622. 'mappos' => array(
  6623. 'description' => '',
  6624. 'type' => 'float',
  6625. 'size' => 'big',
  6626. 'not null' => TRUE,
  6627. ),
  6628. ),
  6629. 'primary key' => array(
  6630. 0 => 'featurepos_id',
  6631. ),
  6632. 'indexes' => array(
  6633. 'featurepos_idx1' => array(
  6634. 0 => 'featuremap_id',
  6635. ),
  6636. 'featurepos_idx2' => array(
  6637. 0 => 'feature_id',
  6638. ),
  6639. 'featurepos_idx3' => array(
  6640. 0 => 'map_feature_id',
  6641. ),
  6642. ),
  6643. 'foreign keys' => array(
  6644. 'feature' => array(
  6645. 'table' => 'feature',
  6646. 'columns' => array(
  6647. 'feature_id' => 'feature_id',
  6648. 'map_feature_id' => 'feature_id',
  6649. ),
  6650. ),
  6651. 'featuremap' => array(
  6652. 'table' => 'featuremap',
  6653. 'columns' => array(
  6654. 'featuremap_id' => 'featuremap_id',
  6655. ),
  6656. ),
  6657. ),
  6658. 'table' => 'featurepos',
  6659. 'referring_tables' => NULL,
  6660. );
  6661. return $description;
  6662. }
  6663. /**
  6664. * Implements hook_chado_schema_v1_2_featureprop()
  6665. * Purpose: To describe the structure of 'featureprop' to tripal
  6666. * @see chado_insert_record()
  6667. * @see chado_update_record()
  6668. * @see chado_select_record()
  6669. *
  6670. * @return
  6671. * An array describing the 'featureprop' table
  6672. *
  6673. * @ingroup tripal_chado_v1.2_schema_api
  6674. *
  6675. */
  6676. function tripal_chado_chado_schema_v1_2_featureprop() {
  6677. $description = array(
  6678. 'description' => '',
  6679. 'fields' => array(
  6680. 'featureprop_id' => array(
  6681. 'description' => '',
  6682. 'type' => 'serial',
  6683. 'not null' => TRUE,
  6684. ),
  6685. 'feature_id' => array(
  6686. 'description' => '',
  6687. 'type' => 'int',
  6688. 'not null' => TRUE,
  6689. ),
  6690. 'type_id' => array(
  6691. 'description' => '',
  6692. 'type' => 'int',
  6693. 'not null' => TRUE,
  6694. ),
  6695. 'value' => array(
  6696. 'description' => '',
  6697. 'type' => 'text',
  6698. 'not null' => FALSE,
  6699. ),
  6700. 'rank' => array(
  6701. 'description' => '',
  6702. 'type' => 'int',
  6703. 'not null' => TRUE,
  6704. 'default' => 0,
  6705. ),
  6706. ),
  6707. 'primary key' => array(
  6708. 0 => 'featureprop_id',
  6709. ),
  6710. 'unique keys' => array(
  6711. 'featureprop_c1' => array(
  6712. 0 => 'feature_id',
  6713. 1 => 'type_id',
  6714. 2 => 'rank',
  6715. ),
  6716. ),
  6717. 'indexes' => array(
  6718. 'featureprop_idx1' => array(
  6719. 0 => 'feature_id',
  6720. ),
  6721. 'featureprop_idx2' => array(
  6722. 0 => 'type_id',
  6723. ),
  6724. ),
  6725. 'foreign keys' => array(
  6726. 'cvterm' => array(
  6727. 'table' => 'cvterm',
  6728. 'columns' => array(
  6729. 'type_id' => 'cvterm_id',
  6730. ),
  6731. ),
  6732. 'feature' => array(
  6733. 'table' => 'feature',
  6734. 'columns' => array(
  6735. 'feature_id' => 'feature_id',
  6736. ),
  6737. ),
  6738. ),
  6739. 'table' => 'featureprop',
  6740. 'referring_tables' => array(
  6741. 0 => 'featureprop_pub',
  6742. ),
  6743. );
  6744. return $description;
  6745. }
  6746. /**
  6747. * Implements hook_chado_schema_v1_2_featureprop_pub()
  6748. * Purpose: To describe the structure of 'featureprop_pub' to tripal
  6749. * @see chado_insert_record()
  6750. * @see chado_update_record()
  6751. * @see chado_select_record()
  6752. *
  6753. * @return
  6754. * An array describing the 'featureprop_pub' table
  6755. *
  6756. * @ingroup tripal_chado_v1.2_schema_api
  6757. *
  6758. */
  6759. function tripal_chado_chado_schema_v1_2_featureprop_pub() {
  6760. $description = array(
  6761. 'description' => '',
  6762. 'fields' => array(
  6763. 'featureprop_pub_id' => array(
  6764. 'description' => '',
  6765. 'type' => 'serial',
  6766. 'not null' => TRUE,
  6767. ),
  6768. 'featureprop_id' => array(
  6769. 'description' => '',
  6770. 'type' => 'int',
  6771. 'not null' => TRUE,
  6772. ),
  6773. 'pub_id' => array(
  6774. 'description' => '',
  6775. 'type' => 'int',
  6776. 'not null' => TRUE,
  6777. ),
  6778. ),
  6779. 'primary key' => array(
  6780. 0 => 'featureprop_pub_id',
  6781. ),
  6782. 'unique keys' => array(
  6783. 'featureprop_pub_c1' => array(
  6784. 0 => 'featureprop_id',
  6785. 1 => 'pub_id',
  6786. ),
  6787. ),
  6788. 'indexes' => array(
  6789. 'featureprop_pub_idx1' => array(
  6790. 0 => 'featureprop_id',
  6791. ),
  6792. 'featureprop_pub_idx2' => array(
  6793. 0 => 'pub_id',
  6794. ),
  6795. ),
  6796. 'foreign keys' => array(
  6797. 'featureprop' => array(
  6798. 'table' => 'featureprop',
  6799. 'columns' => array(
  6800. 'featureprop_id' => 'featureprop_id',
  6801. ),
  6802. ),
  6803. 'pub' => array(
  6804. 'table' => 'pub',
  6805. 'columns' => array(
  6806. 'pub_id' => 'pub_id',
  6807. ),
  6808. ),
  6809. ),
  6810. 'table' => 'featureprop_pub',
  6811. 'referring_tables' => NULL,
  6812. );
  6813. return $description;
  6814. }
  6815. /**
  6816. * Implements hook_chado_schema_v1_2_featurerange()
  6817. * Purpose: To describe the structure of 'featurerange' to tripal
  6818. * @see chado_insert_record()
  6819. * @see chado_update_record()
  6820. * @see chado_select_record()
  6821. *
  6822. * @return
  6823. * An array describing the 'featurerange' table
  6824. *
  6825. * @ingroup tripal_chado_v1.2_schema_api
  6826. *
  6827. */
  6828. function tripal_chado_chado_schema_v1_2_featurerange() {
  6829. $description = array(
  6830. 'description' => '',
  6831. 'fields' => array(
  6832. 'featurerange_id' => array(
  6833. 'description' => '',
  6834. 'type' => 'serial',
  6835. 'not null' => TRUE,
  6836. ),
  6837. 'featuremap_id' => array(
  6838. 'description' => '',
  6839. 'type' => 'int',
  6840. 'not null' => TRUE,
  6841. ),
  6842. 'feature_id' => array(
  6843. 'description' => '',
  6844. 'type' => 'int',
  6845. 'not null' => TRUE,
  6846. ),
  6847. 'leftstartf_id' => array(
  6848. 'description' => '',
  6849. 'type' => 'int',
  6850. 'not null' => TRUE,
  6851. ),
  6852. 'leftendf_id' => array(
  6853. 'description' => '',
  6854. 'type' => 'int',
  6855. 'not null' => FALSE,
  6856. ),
  6857. 'rightstartf_id' => array(
  6858. 'description' => '',
  6859. 'type' => 'int',
  6860. 'not null' => FALSE,
  6861. ),
  6862. 'rightendf_id' => array(
  6863. 'description' => '',
  6864. 'type' => 'int',
  6865. 'not null' => TRUE,
  6866. ),
  6867. 'rangestr' => array(
  6868. 'description' => '',
  6869. 'type' => 'varchar',
  6870. 'length' => '255',
  6871. 'not null' => FALSE,
  6872. ),
  6873. ),
  6874. 'primary key' => array(
  6875. 0 => 'featurerange_id',
  6876. ),
  6877. 'indexes' => array(
  6878. 'featurerange_idx1' => array(
  6879. 0 => 'featuremap_id',
  6880. ),
  6881. 'featurerange_idx2' => array(
  6882. 0 => 'feature_id',
  6883. ),
  6884. 'featurerange_idx3' => array(
  6885. 0 => 'leftstartf_id',
  6886. ),
  6887. 'featurerange_idx4' => array(
  6888. 0 => 'leftendf_id',
  6889. ),
  6890. 'featurerange_idx5' => array(
  6891. 0 => 'rightstartf_id',
  6892. ),
  6893. 'featurerange_idx6' => array(
  6894. 0 => 'rightendf_id',
  6895. ),
  6896. ),
  6897. 'foreign keys' => array(
  6898. 'feature' => array(
  6899. 'table' => 'feature',
  6900. 'columns' => array(
  6901. 'feature_id' => 'feature_id',
  6902. 'leftstartf_id' => 'feature_id',
  6903. 'leftendf_id' => 'feature_id',
  6904. 'rightstartf_id' => 'feature_id',
  6905. 'rightendf_id' => 'feature_id',
  6906. ),
  6907. ),
  6908. 'featuremap' => array(
  6909. 'table' => 'featuremap',
  6910. 'columns' => array(
  6911. 'featuremap_id' => 'featuremap_id',
  6912. ),
  6913. ),
  6914. ),
  6915. 'table' => 'featurerange',
  6916. 'referring_tables' => NULL,
  6917. );
  6918. return $description;
  6919. }
  6920. /**
  6921. * Implements hook_chado_schema_v1_2_genotype()
  6922. * Purpose: To describe the structure of 'genotype' to tripal
  6923. * @see chado_insert_record()
  6924. * @see chado_update_record()
  6925. * @see chado_select_record()
  6926. *
  6927. * @return
  6928. * An array describing the 'genotype' table
  6929. *
  6930. * @ingroup tripal_chado_v1.2_schema_api
  6931. *
  6932. */
  6933. function tripal_chado_chado_schema_v1_2_genotype() {
  6934. $description = array(
  6935. 'description' => '',
  6936. 'fields' => array(
  6937. 'genotype_id' => array(
  6938. 'description' => '',
  6939. 'type' => 'serial',
  6940. 'not null' => TRUE,
  6941. ),
  6942. 'name' => array(
  6943. 'description' => '',
  6944. 'type' => 'text',
  6945. 'not null' => FALSE,
  6946. ),
  6947. 'uniquename' => array(
  6948. 'description' => '',
  6949. 'type' => 'text',
  6950. 'not null' => TRUE,
  6951. ),
  6952. 'description' => array(
  6953. 'description' => '',
  6954. 'type' => 'varchar',
  6955. 'length' => '255',
  6956. 'not null' => FALSE,
  6957. ),
  6958. 'type_id' => array(
  6959. 'description' => '',
  6960. 'type' => 'int',
  6961. 'not null' => TRUE,
  6962. ),
  6963. ),
  6964. 'primary key' => array(
  6965. 0 => 'genotype_id',
  6966. ),
  6967. 'unique keys' => array(
  6968. 'genotype_c1' => array(
  6969. 0 => 'uniquename',
  6970. ),
  6971. ),
  6972. 'indexes' => array(
  6973. 'genotype_idx1' => array(
  6974. 0 => 'uniquename',
  6975. ),
  6976. 'genotype_idx2' => array(
  6977. 0 => 'name',
  6978. ),
  6979. ),
  6980. 'foreign keys' => array(
  6981. 'cvterm' => array(
  6982. 'table' => 'cvterm',
  6983. 'columns' => array(
  6984. 'type_id' => 'cvterm_id',
  6985. ),
  6986. ),
  6987. ),
  6988. 'table' => 'genotype',
  6989. 'referring_tables' => array(
  6990. 0 => 'feature_genotype',
  6991. 1 => 'genotypeprop',
  6992. 9 => 'nd_experiment_genotype',
  6993. 10 => 'phendesc',
  6994. 11 => 'phenotype_comparison',
  6995. 13 => 'phenstatement',
  6996. 14 => 'stock_genotype',
  6997. ),
  6998. );
  6999. return $description;
  7000. }
  7001. /**
  7002. * Implements hook_chado_schema_v1_2_genotypeprop()
  7003. * Purpose: To describe the structure of 'genotypeprop' to tripal
  7004. * @see chado_insert_record()
  7005. * @see chado_update_record()
  7006. * @see chado_select_record()
  7007. *
  7008. * @return
  7009. * An array describing the 'genotypeprop' table
  7010. *
  7011. * @ingroup tripal_chado_v1.2_schema_api
  7012. *
  7013. */
  7014. function tripal_chado_chado_schema_v1_2_genotypeprop() {
  7015. $description = array(
  7016. 'description' => '',
  7017. 'fields' => array(
  7018. 'genotypeprop_id' => array(
  7019. 'description' => '',
  7020. 'type' => 'serial',
  7021. 'not null' => TRUE,
  7022. ),
  7023. 'genotype_id' => array(
  7024. 'description' => '',
  7025. 'type' => 'int',
  7026. 'not null' => TRUE,
  7027. ),
  7028. 'type_id' => array(
  7029. 'description' => '',
  7030. 'type' => 'int',
  7031. 'not null' => TRUE,
  7032. ),
  7033. 'value' => array(
  7034. 'description' => '',
  7035. 'type' => 'text',
  7036. 'not null' => FALSE,
  7037. ),
  7038. 'rank' => array(
  7039. 'description' => '',
  7040. 'type' => 'int',
  7041. 'not null' => TRUE,
  7042. 'default' => 0,
  7043. ),
  7044. ),
  7045. 'primary key' => array(
  7046. 0 => 'genotypeprop_id',
  7047. ),
  7048. 'unique keys' => array(
  7049. 'genotypeprop_c1' => array(
  7050. 0 => 'genotype_id',
  7051. 1 => 'type_id',
  7052. 2 => 'rank',
  7053. ),
  7054. ),
  7055. 'indexes' => array(
  7056. 'genotypeprop_idx1' => array(
  7057. 0 => 'genotype_id',
  7058. ),
  7059. 'genotypeprop_idx2' => array(
  7060. 0 => 'type_id',
  7061. ),
  7062. ),
  7063. 'foreign keys' => array(
  7064. 'cvterm' => array(
  7065. 'table' => 'cvterm',
  7066. 'columns' => array(
  7067. 'type_id' => 'cvterm_id',
  7068. ),
  7069. ),
  7070. 'genotype' => array(
  7071. 'table' => 'genotype',
  7072. 'columns' => array(
  7073. 'genotype_id' => 'genotype_id',
  7074. ),
  7075. ),
  7076. ),
  7077. 'table' => 'genotypeprop',
  7078. 'referring_tables' => NULL,
  7079. );
  7080. return $description;
  7081. }
  7082. /**
  7083. * Implements hook_chado_schema_v1_2_library()
  7084. * Purpose: To describe the structure of 'library' to tripal
  7085. * @see chado_insert_record()
  7086. * @see chado_update_record()
  7087. * @see chado_select_record()
  7088. *
  7089. * @return
  7090. * An array describing the 'library' table
  7091. *
  7092. * @ingroup tripal_chado_v1.2_schema_api
  7093. *
  7094. */
  7095. function tripal_chado_chado_schema_v1_2_library() {
  7096. $description = array(
  7097. 'description' => '',
  7098. 'fields' => array(
  7099. 'library_id' => array(
  7100. 'description' => '',
  7101. 'type' => 'serial',
  7102. 'not null' => TRUE,
  7103. ),
  7104. 'organism_id' => array(
  7105. 'description' => '',
  7106. 'type' => 'int',
  7107. 'not null' => TRUE,
  7108. ),
  7109. 'name' => array(
  7110. 'description' => '',
  7111. 'type' => 'varchar',
  7112. 'length' => '255',
  7113. 'not null' => FALSE,
  7114. ),
  7115. 'uniquename' => array(
  7116. 'description' => '',
  7117. 'type' => 'text',
  7118. 'not null' => TRUE,
  7119. ),
  7120. 'type_id' => array(
  7121. 'description' => '',
  7122. 'type' => 'int',
  7123. 'not null' => TRUE,
  7124. ),
  7125. 'is_obsolete' => array(
  7126. 'description' => '',
  7127. 'type' => 'int',
  7128. 'not null' => TRUE,
  7129. 'default' => 0,
  7130. ),
  7131. 'timeaccessioned' => array(
  7132. 'description' => '',
  7133. 'type' => 'datetime',
  7134. 'not null' => TRUE,
  7135. 'default' => 'now()',
  7136. ),
  7137. 'timelastmodified' => array(
  7138. 'description' => '',
  7139. 'type' => 'datetime',
  7140. 'not null' => TRUE,
  7141. 'default' => 'now()',
  7142. ),
  7143. ),
  7144. 'primary key' => array(
  7145. 0 => 'library_id',
  7146. ),
  7147. 'unique keys' => array(
  7148. 'library_c1' => array(
  7149. 0 => 'organism_id',
  7150. 1 => 'uniquename',
  7151. 2 => 'type_id',
  7152. ),
  7153. ),
  7154. 'indexes' => array(
  7155. 'library_idx1' => array(
  7156. 0 => 'organism_id',
  7157. ),
  7158. 'library_idx2' => array(
  7159. 0 => 'type_id',
  7160. ),
  7161. 'library_idx3' => array(
  7162. 0 => 'uniquename',
  7163. ),
  7164. 'library_name_ind1' => array(
  7165. 0 => 'name',
  7166. ),
  7167. ),
  7168. 'foreign keys' => array(
  7169. 'organism' => array(
  7170. 'table' => 'organism',
  7171. 'columns' => array(
  7172. 'organism_id' => 'organism_id',
  7173. ),
  7174. ),
  7175. 'cvterm' => array(
  7176. 'table' => 'cvterm',
  7177. 'columns' => array(
  7178. 'type_id' => 'cvterm_id',
  7179. ),
  7180. ),
  7181. ),
  7182. 'referring_tables' => array(
  7183. 0 => 'cell_line_library',
  7184. 1 => 'library_cvterm',
  7185. 2 => 'library_dbxref',
  7186. 3 => 'library_feature',
  7187. 4 => 'library_pub',
  7188. 5 => 'library_synonym',
  7189. 6 => 'libraryprop',
  7190. ),
  7191. 'table' => 'library',
  7192. );
  7193. return $description;
  7194. }
  7195. /**
  7196. * Implements hook_chado_schema_v1_2_library_cvterm()
  7197. * Purpose: To describe the structure of 'library_cvterm' to tripal
  7198. * @see chado_insert_record()
  7199. * @see chado_update_record()
  7200. * @see chado_select_record()
  7201. *
  7202. * @return
  7203. * An array describing the 'library_cvterm' table
  7204. *
  7205. * @ingroup tripal_chado_v1.2_schema_api
  7206. *
  7207. */
  7208. function tripal_chado_chado_schema_v1_2_library_cvterm() {
  7209. $description = array(
  7210. 'description' => '',
  7211. 'fields' => array(
  7212. 'library_cvterm_id' => array(
  7213. 'description' => '',
  7214. 'type' => 'serial',
  7215. 'not null' => TRUE,
  7216. ),
  7217. 'library_id' => array(
  7218. 'description' => '',
  7219. 'type' => 'int',
  7220. 'not null' => TRUE,
  7221. ),
  7222. 'cvterm_id' => array(
  7223. 'description' => '',
  7224. 'type' => 'int',
  7225. 'not null' => TRUE,
  7226. ),
  7227. 'pub_id' => array(
  7228. 'description' => '',
  7229. 'type' => 'int',
  7230. 'not null' => TRUE,
  7231. ),
  7232. ),
  7233. 'primary key' => array(
  7234. 0 => 'library_cvterm_id',
  7235. ),
  7236. 'unique keys' => array(
  7237. 'library_cvterm_c1' => array(
  7238. 0 => 'library_id',
  7239. 1 => 'cvterm_id',
  7240. 2 => 'pub_id',
  7241. ),
  7242. ),
  7243. 'indexes' => array(
  7244. 'library_cvterm_idx1' => array(
  7245. 0 => 'library_id',
  7246. ),
  7247. 'library_cvterm_idx2' => array(
  7248. 0 => 'cvterm_id',
  7249. ),
  7250. 'library_cvterm_idx3' => array(
  7251. 0 => 'pub_id',
  7252. ),
  7253. ),
  7254. 'foreign keys' => array(
  7255. 'cvterm' => array(
  7256. 'table' => 'cvterm',
  7257. 'columns' => array(
  7258. 'cvterm_id' => 'cvterm_id',
  7259. ),
  7260. ),
  7261. 'pub' => array(
  7262. 'table' => 'pub',
  7263. 'columns' => array(
  7264. 'pub_id' => 'pub_id',
  7265. ),
  7266. ),
  7267. 'library' => array(
  7268. 'table' => 'library',
  7269. 'columns' => array(
  7270. 'library_id' => 'library_id',
  7271. ),
  7272. ),
  7273. ),
  7274. 'table' => 'library_cvterm',
  7275. 'referring_tables' => NULL,
  7276. );
  7277. return $description;
  7278. }
  7279. /**
  7280. * Implements hook_chado_schema_v1_2_library_dbxref()
  7281. * Purpose: To describe the structure of 'library_dbxref' to tripal
  7282. * @see chado_insert_record()
  7283. * @see chado_update_record()
  7284. * @see chado_select_record()
  7285. *
  7286. * @return
  7287. * An array describing the 'library_dbxref' table
  7288. *
  7289. * @ingroup tripal_chado_v1.2_schema_api
  7290. *
  7291. */
  7292. function tripal_chado_chado_schema_v1_2_library_dbxref() {
  7293. $description = array(
  7294. 'description' => '',
  7295. 'fields' => array(
  7296. 'library_dbxref_id' => array(
  7297. 'description' => '',
  7298. 'type' => 'serial',
  7299. 'not null' => TRUE,
  7300. ),
  7301. 'library_id' => array(
  7302. 'description' => '',
  7303. 'type' => 'int',
  7304. 'not null' => TRUE,
  7305. ),
  7306. 'dbxref_id' => array(
  7307. 'description' => '',
  7308. 'type' => 'int',
  7309. 'not null' => TRUE,
  7310. ),
  7311. 'is_current' => array(
  7312. 'description' => '',
  7313. 'type' => 'boolean',
  7314. 'not null' => TRUE,
  7315. 'default' => 'true',
  7316. ),
  7317. ),
  7318. 'primary key' => array(
  7319. 0 => 'library_dbxref_id',
  7320. ),
  7321. 'unique keys' => array(
  7322. 'library_dbxref_c1' => array(
  7323. 0 => 'library_id',
  7324. 1 => 'dbxref_id',
  7325. ),
  7326. ),
  7327. 'indexes' => array(
  7328. 'library_dbxref_idx1' => array(
  7329. 0 => 'library_id',
  7330. ),
  7331. 'library_dbxref_idx2' => array(
  7332. 0 => 'dbxref_id',
  7333. ),
  7334. ),
  7335. 'foreign keys' => array(
  7336. 'dbxref' => array(
  7337. 'table' => 'dbxref',
  7338. 'columns' => array(
  7339. 'dbxref_id' => 'dbxref_id',
  7340. ),
  7341. ),
  7342. 'library' => array(
  7343. 'table' => 'library',
  7344. 'columns' => array(
  7345. 'library_id' => 'library_id',
  7346. ),
  7347. ),
  7348. ),
  7349. 'table' => 'library_dbxref',
  7350. 'referring_tables' => NULL,
  7351. );
  7352. return $description;
  7353. }
  7354. /**
  7355. * Implements hook_chado_schema_v1_2_library_feature()
  7356. * Purpose: To describe the structure of 'library_feature' to tripal
  7357. * @see chado_insert_record()
  7358. * @see chado_update_record()
  7359. * @see chado_select_record()
  7360. *
  7361. * @return
  7362. * An array describing the 'library_feature' table
  7363. *
  7364. * @ingroup tripal_chado_v1.2_schema_api
  7365. *
  7366. */
  7367. function tripal_chado_chado_schema_v1_2_library_feature() {
  7368. $description = array(
  7369. 'description' => '',
  7370. 'fields' => array(
  7371. 'library_feature_id' => array(
  7372. 'description' => '',
  7373. 'type' => 'serial',
  7374. 'not null' => TRUE,
  7375. ),
  7376. 'library_id' => array(
  7377. 'description' => '',
  7378. 'type' => 'int',
  7379. 'not null' => TRUE,
  7380. ),
  7381. 'feature_id' => array(
  7382. 'description' => '',
  7383. 'type' => 'int',
  7384. 'not null' => TRUE,
  7385. ),
  7386. ),
  7387. 'primary key' => array(
  7388. 0 => 'library_feature_id',
  7389. ),
  7390. 'unique keys' => array(
  7391. 'library_feature_c1' => array(
  7392. 0 => 'library_id',
  7393. 1 => 'feature_id',
  7394. ),
  7395. ),
  7396. 'indexes' => array(
  7397. 'library_feature_idx1' => array(
  7398. 0 => 'library_id',
  7399. ),
  7400. 'library_feature_idx2' => array(
  7401. 0 => 'feature_id',
  7402. ),
  7403. ),
  7404. 'foreign keys' => array(
  7405. 'feature' => array(
  7406. 'table' => 'feature',
  7407. 'columns' => array(
  7408. 'feature_id' => 'feature_id',
  7409. ),
  7410. ),
  7411. 'library' => array(
  7412. 'table' => 'library',
  7413. 'columns' => array(
  7414. 'library_id' => 'library_id',
  7415. ),
  7416. ),
  7417. ),
  7418. 'table' => 'library_feature',
  7419. 'referring_tables' => NULL,
  7420. );
  7421. return $description;
  7422. }
  7423. /**
  7424. * Implements hook_chado_schema_v1_2_library_pub()
  7425. * Purpose: To describe the structure of 'library_pub' to tripal
  7426. * @see chado_insert_record()
  7427. * @see chado_update_record()
  7428. * @see chado_select_record()
  7429. *
  7430. * @return
  7431. * An array describing the 'library_pub' table
  7432. *
  7433. * @ingroup tripal_chado_v1.2_schema_api
  7434. *
  7435. */
  7436. function tripal_chado_chado_schema_v1_2_library_pub() {
  7437. $description = array(
  7438. 'description' => '',
  7439. 'fields' => array(
  7440. 'library_pub_id' => array(
  7441. 'description' => '',
  7442. 'type' => 'serial',
  7443. 'not null' => TRUE,
  7444. ),
  7445. 'library_id' => array(
  7446. 'description' => '',
  7447. 'type' => 'int',
  7448. 'not null' => TRUE,
  7449. ),
  7450. 'pub_id' => array(
  7451. 'description' => '',
  7452. 'type' => 'int',
  7453. 'not null' => TRUE,
  7454. ),
  7455. ),
  7456. 'primary key' => array(
  7457. 0 => 'library_pub_id',
  7458. ),
  7459. 'unique keys' => array(
  7460. 'library_pub_c1' => array(
  7461. 0 => 'library_id',
  7462. 1 => 'pub_id',
  7463. ),
  7464. ),
  7465. 'indexes' => array(
  7466. 'library_pub_idx1' => array(
  7467. 0 => 'library_id',
  7468. ),
  7469. 'library_pub_idx2' => array(
  7470. 0 => 'pub_id',
  7471. ),
  7472. ),
  7473. 'foreign keys' => array(
  7474. 'pub' => array(
  7475. 'table' => 'pub',
  7476. 'columns' => array(
  7477. 'pub_id' => 'pub_id',
  7478. ),
  7479. ),
  7480. 'library' => array(
  7481. 'table' => 'library',
  7482. 'columns' => array(
  7483. 'library_id' => 'library_id',
  7484. ),
  7485. ),
  7486. ),
  7487. 'table' => 'library_pub',
  7488. 'referring_tables' => NULL,
  7489. );
  7490. return $description;
  7491. }
  7492. /**
  7493. * Implements hook_chado_schema_v1_2_library_synonym()
  7494. * Purpose: To describe the structure of 'library_synonym' to tripal
  7495. * @see chado_insert_record()
  7496. * @see chado_update_record()
  7497. * @see chado_select_record()
  7498. *
  7499. * @return
  7500. * An array describing the 'library_synonym' table
  7501. *
  7502. * @ingroup tripal_chado_v1.2_schema_api
  7503. *
  7504. */
  7505. function tripal_chado_chado_schema_v1_2_library_synonym() {
  7506. $description = array(
  7507. 'description' => '',
  7508. 'fields' => array(
  7509. 'library_synonym_id' => array(
  7510. 'description' => '',
  7511. 'type' => 'serial',
  7512. 'not null' => TRUE,
  7513. ),
  7514. 'synonym_id' => array(
  7515. 'description' => '',
  7516. 'type' => 'int',
  7517. 'not null' => TRUE,
  7518. ),
  7519. 'library_id' => array(
  7520. 'description' => '',
  7521. 'type' => 'int',
  7522. 'not null' => TRUE,
  7523. ),
  7524. 'pub_id' => array(
  7525. 'description' => '',
  7526. 'type' => 'int',
  7527. 'not null' => TRUE,
  7528. ),
  7529. 'is_current' => array(
  7530. 'description' => '',
  7531. 'type' => 'boolean',
  7532. 'not null' => TRUE,
  7533. 'default' => 'true',
  7534. ),
  7535. 'is_internal' => array(
  7536. 'description' => '',
  7537. 'type' => 'boolean',
  7538. 'not null' => TRUE,
  7539. 'default' => 'false',
  7540. ),
  7541. ),
  7542. 'primary key' => array(
  7543. 0 => 'library_synonym_id',
  7544. ),
  7545. 'unique keys' => array(
  7546. 'library_synonym_c1' => array(
  7547. 0 => 'synonym_id',
  7548. 1 => 'library_id',
  7549. 2 => 'pub_id',
  7550. ),
  7551. ),
  7552. 'indexes' => array(
  7553. 'library_synonym_idx1' => array(
  7554. 0 => 'synonym_id',
  7555. ),
  7556. 'library_synonym_idx2' => array(
  7557. 0 => 'library_id',
  7558. ),
  7559. 'library_synonym_idx3' => array(
  7560. 0 => 'pub_id',
  7561. ),
  7562. ),
  7563. 'foreign keys' => array(
  7564. 'pub' => array(
  7565. 'table' => 'pub',
  7566. 'columns' => array(
  7567. 'pub_id' => 'pub_id',
  7568. ),
  7569. ),
  7570. 'synonym' => array(
  7571. 'table' => 'synonym',
  7572. 'columns' => array(
  7573. 'synonym_id' => 'synonym_id',
  7574. ),
  7575. ),
  7576. 'library' => array(
  7577. 'table' => 'library',
  7578. 'columns' => array(
  7579. 'library_id' => 'library_id',
  7580. ),
  7581. ),
  7582. ),
  7583. 'table' => 'library_synonym',
  7584. 'referring_tables' => NULL,
  7585. );
  7586. return $description;
  7587. }
  7588. /**
  7589. * Implements hook_chado_schema_v1_2_libraryprop()
  7590. * Purpose: To describe the structure of 'libraryprop' to tripal
  7591. * @see chado_insert_record()
  7592. * @see chado_update_record()
  7593. * @see chado_select_record()
  7594. *
  7595. * @return
  7596. * An array describing the 'libraryprop' table
  7597. *
  7598. * @ingroup tripal_chado_v1.2_schema_api
  7599. *
  7600. */
  7601. function tripal_chado_chado_schema_v1_2_libraryprop() {
  7602. $description = array(
  7603. 'description' => '',
  7604. 'fields' => array(
  7605. 'libraryprop_id' => array(
  7606. 'description' => '',
  7607. 'type' => 'serial',
  7608. 'not null' => TRUE,
  7609. ),
  7610. 'library_id' => array(
  7611. 'description' => '',
  7612. 'type' => 'int',
  7613. 'not null' => TRUE,
  7614. ),
  7615. 'type_id' => array(
  7616. 'description' => '',
  7617. 'type' => 'int',
  7618. 'not null' => TRUE,
  7619. ),
  7620. 'value' => array(
  7621. 'description' => '',
  7622. 'type' => 'text',
  7623. 'not null' => FALSE,
  7624. ),
  7625. 'rank' => array(
  7626. 'description' => '',
  7627. 'type' => 'int',
  7628. 'not null' => TRUE,
  7629. 'default' => 0,
  7630. ),
  7631. ),
  7632. 'primary key' => array(
  7633. 0 => 'libraryprop_id',
  7634. ),
  7635. 'unique keys' => array(
  7636. 'libraryprop_c1' => array(
  7637. 0 => 'library_id',
  7638. 1 => 'type_id',
  7639. 2 => 'rank',
  7640. ),
  7641. ),
  7642. 'indexes' => array(
  7643. 'libraryprop_idx1' => array(
  7644. 0 => 'library_id',
  7645. ),
  7646. 'libraryprop_idx2' => array(
  7647. 0 => 'type_id',
  7648. ),
  7649. ),
  7650. 'foreign keys' => array(
  7651. 'cvterm' => array(
  7652. 'table' => 'cvterm',
  7653. 'columns' => array(
  7654. 'type_id' => 'cvterm_id',
  7655. ),
  7656. ),
  7657. 'library' => array(
  7658. 'table' => 'library',
  7659. 'columns' => array(
  7660. 'library_id' => 'library_id',
  7661. ),
  7662. ),
  7663. ),
  7664. 'table' => 'libraryprop',
  7665. 'referring_tables' => array(
  7666. 0 => 'libraryprop_pub',
  7667. ),
  7668. );
  7669. return $description;
  7670. }
  7671. /**
  7672. * Implements hook_chado_schema_v1_2_libraryprop_pub()
  7673. * Purpose: To describe the structure of 'libraryprop_pub' to tripal
  7674. * @see chado_insert_record()
  7675. * @see chado_update_record()
  7676. * @see chado_select_record()
  7677. *
  7678. * @return
  7679. * An array describing the 'libraryprop_pub' table
  7680. *
  7681. * @ingroup tripal_chado_v1.2_schema_api
  7682. *
  7683. */
  7684. function tripal_chado_chado_schema_v1_2_libraryprop_pub() {
  7685. $description = array(
  7686. 'description' => '',
  7687. 'fields' => array(
  7688. 'libraryprop_pub_id' => array(
  7689. 'description' => '',
  7690. 'type' => 'serial',
  7691. 'not null' => TRUE,
  7692. ),
  7693. 'libraryprop_id' => array(
  7694. 'description' => '',
  7695. 'type' => 'int',
  7696. 'not null' => TRUE,
  7697. ),
  7698. 'pub_id' => array(
  7699. 'description' => '',
  7700. 'type' => 'int',
  7701. 'not null' => TRUE,
  7702. ),
  7703. ),
  7704. 'primary key' => array(
  7705. 0 => 'libraryprop_pub_id',
  7706. ),
  7707. 'unique keys' => array(
  7708. 'libraryprop_pub_c1' => array(
  7709. 0 => 'libraryprop_id',
  7710. 1 => 'pub_id',
  7711. ),
  7712. ),
  7713. 'indexes' => array(
  7714. 'libraryprop_pub_idx1' => array(
  7715. 0 => 'libraryprop_id',
  7716. ),
  7717. 'libraryprop_pub_idx2' => array(
  7718. 0 => 'pub_id',
  7719. ),
  7720. ),
  7721. 'foreign keys' => array(
  7722. 'pub' => array(
  7723. 'table' => 'pub',
  7724. 'columns' => array(
  7725. 'pub_id' => 'pub_id',
  7726. ),
  7727. ),
  7728. 'libraryprop' => array(
  7729. 'table' => 'libraryprop',
  7730. 'columns' => array(
  7731. 'libraryprop_id' => 'libraryprop_id',
  7732. ),
  7733. ),
  7734. ),
  7735. 'table' => 'libraryprop_pub',
  7736. 'referring_tables' => NULL,
  7737. );
  7738. return $description;
  7739. }
  7740. /**
  7741. * Implements hook_chado_schema_v1_2_magedocumentation()
  7742. * Purpose: To describe the structure of 'magedocumentation' to tripal
  7743. * @see chado_insert_record()
  7744. * @see chado_update_record()
  7745. * @see chado_select_record()
  7746. *
  7747. * @return
  7748. * An array describing the 'magedocumentation' table
  7749. *
  7750. * @ingroup tripal_chado_v1.2_schema_api
  7751. *
  7752. */
  7753. function tripal_chado_chado_schema_v1_2_magedocumentation() {
  7754. $description = array(
  7755. 'description' => '',
  7756. 'fields' => array(
  7757. 'magedocumentation_id' => array(
  7758. 'description' => '',
  7759. 'type' => 'serial',
  7760. 'not null' => TRUE,
  7761. ),
  7762. 'mageml_id' => array(
  7763. 'description' => '',
  7764. 'type' => 'int',
  7765. 'not null' => TRUE,
  7766. ),
  7767. 'tableinfo_id' => array(
  7768. 'description' => '',
  7769. 'type' => 'int',
  7770. 'not null' => TRUE,
  7771. ),
  7772. 'row_id' => array(
  7773. 'description' => '',
  7774. 'type' => 'int',
  7775. 'not null' => TRUE,
  7776. ),
  7777. 'mageidentifier' => array(
  7778. 'description' => '',
  7779. 'type' => 'text',
  7780. 'not null' => TRUE,
  7781. ),
  7782. ),
  7783. 'primary key' => array(
  7784. 0 => 'magedocumentation_id',
  7785. ),
  7786. 'indexes' => array(
  7787. 'magedocumentation_idx1' => array(
  7788. 0 => 'mageml_id',
  7789. ),
  7790. 'magedocumentation_idx2' => array(
  7791. 0 => 'tableinfo_id',
  7792. ),
  7793. 'magedocumentation_idx3' => array(
  7794. 0 => 'row_id',
  7795. ),
  7796. ),
  7797. 'foreign keys' => array(
  7798. 'tableinfo' => array(
  7799. 'table' => 'tableinfo',
  7800. 'columns' => array(
  7801. 'tableinfo_id' => 'tableinfo_id',
  7802. ),
  7803. ),
  7804. 'mageml' => array(
  7805. 'table' => 'mageml',
  7806. 'columns' => array(
  7807. 'mageml_id' => 'mageml_id',
  7808. ),
  7809. ),
  7810. ),
  7811. 'table' => 'magedocumentation',
  7812. 'referring_tables' => NULL,
  7813. );
  7814. return $description;
  7815. }
  7816. /**
  7817. * Implements hook_chado_schema_v1_2_mageml()
  7818. * Purpose: To describe the structure of 'mageml' to tripal
  7819. * @see chado_insert_record()
  7820. * @see chado_update_record()
  7821. * @see chado_select_record()
  7822. *
  7823. * @return
  7824. * An array describing the 'mageml' table
  7825. *
  7826. * @ingroup tripal_chado_v1.2_schema_api
  7827. *
  7828. */
  7829. function tripal_chado_chado_schema_v1_2_mageml() {
  7830. $description = array(
  7831. 'description' => '',
  7832. 'fields' => array(
  7833. 'mageml_id' => array(
  7834. 'description' => '',
  7835. 'type' => 'serial',
  7836. 'not null' => TRUE,
  7837. ),
  7838. 'mage_package' => array(
  7839. 'description' => '',
  7840. 'type' => 'text',
  7841. 'not null' => TRUE,
  7842. ),
  7843. 'mage_ml' => array(
  7844. 'description' => '',
  7845. 'type' => 'text',
  7846. 'not null' => TRUE,
  7847. ),
  7848. ),
  7849. 'primary key' => array(
  7850. 0 => 'mageml_id',
  7851. ),
  7852. 'foreign keys' => array(
  7853. ),
  7854. 'table' => 'mageml',
  7855. 'referring_tables' => array(
  7856. 0 => 'magedocumentation',
  7857. ),
  7858. );
  7859. return $description;
  7860. }
  7861. /**
  7862. * Implements hook_chado_schema_v1_2_nd_experiment()
  7863. * Purpose: To describe the structure of 'nd_experiment' to tripal
  7864. * @see chado_insert_record()
  7865. * @see chado_update_record()
  7866. * @see chado_select_record()
  7867. *
  7868. * @return
  7869. * An array describing the 'nd_experiment' table
  7870. *
  7871. * @ingroup tripal_chado_v1.2_schema_api
  7872. *
  7873. */
  7874. function tripal_chado_chado_schema_v1_2_nd_experiment() {
  7875. $description = array(
  7876. 'description' => '',
  7877. 'fields' => array(
  7878. 'nd_experiment_id' => array(
  7879. 'description' => '',
  7880. 'type' => 'serial',
  7881. 'not null' => TRUE,
  7882. ),
  7883. 'nd_geolocation_id' => array(
  7884. 'description' => '',
  7885. 'type' => 'int',
  7886. 'not null' => TRUE,
  7887. ),
  7888. 'type_id' => array(
  7889. 'description' => '',
  7890. 'type' => 'int',
  7891. 'not null' => TRUE,
  7892. ),
  7893. ),
  7894. 'primary key' => array(
  7895. 0 => 'nd_experiment_id',
  7896. ),
  7897. 'foreign keys' => array(
  7898. 'cvterm' => array(
  7899. 'table' => 'cvterm',
  7900. 'columns' => array(
  7901. 'type_id' => 'cvterm_id',
  7902. ),
  7903. ),
  7904. 'nd_geolocation' => array(
  7905. 'table' => 'nd_geolocation',
  7906. 'columns' => array(
  7907. 'nd_geolocation_id' => 'nd_geolocation_id',
  7908. ),
  7909. ),
  7910. ),
  7911. 'table' => 'nd_experiment',
  7912. 'referring_tables' => array(
  7913. 0 => 'nd_experiment_contact',
  7914. 1 => 'nd_experiment_dbxref',
  7915. 2 => 'nd_experiment_genotype',
  7916. 3 => 'nd_experiment_phenotype',
  7917. 4 => 'nd_experiment_project',
  7918. 5 => 'nd_experiment_protocol',
  7919. 6 => 'nd_experiment_pub',
  7920. 7 => 'nd_experiment_stock',
  7921. 8 => 'nd_experimentprop',
  7922. ),
  7923. );
  7924. return $description;
  7925. }
  7926. /**
  7927. * Implements hook_chado_schema_v1_2_nd_experiment_contact()
  7928. * Purpose: To describe the structure of 'nd_experiment_contact' to tripal
  7929. * @see chado_insert_record()
  7930. * @see chado_update_record()
  7931. * @see chado_select_record()
  7932. *
  7933. * @return
  7934. * An array describing the 'nd_experiment_contact' table
  7935. *
  7936. * @ingroup tripal_chado_v1.2_schema_api
  7937. *
  7938. */
  7939. function tripal_chado_chado_schema_v1_2_nd_experiment_contact() {
  7940. $description = array(
  7941. 'description' => '',
  7942. 'fields' => array(
  7943. 'nd_experiment_contact_id' => array(
  7944. 'description' => '',
  7945. 'type' => 'serial',
  7946. 'not null' => TRUE,
  7947. ),
  7948. 'nd_experiment_id' => array(
  7949. 'description' => '',
  7950. 'type' => 'int',
  7951. 'not null' => TRUE,
  7952. ),
  7953. 'contact_id' => array(
  7954. 'description' => '',
  7955. 'type' => 'int',
  7956. 'not null' => TRUE,
  7957. ),
  7958. ),
  7959. 'primary key' => array(
  7960. 0 => 'nd_experiment_contact_id',
  7961. ),
  7962. 'foreign keys' => array(
  7963. 'contact' => array(
  7964. 'table' => 'contact',
  7965. 'columns' => array(
  7966. 'contact_id' => 'contact_id',
  7967. ),
  7968. ),
  7969. 'nd_experiment' => array(
  7970. 'table' => 'nd_experiment',
  7971. 'columns' => array(
  7972. 'nd_experiment_id' => 'nd_experiment_id',
  7973. ),
  7974. ),
  7975. ),
  7976. 'table' => 'nd_experiment_contact',
  7977. 'referring_tables' => NULL,
  7978. );
  7979. return $description;
  7980. }
  7981. /**
  7982. * Implements hook_chado_schema_v1_2_nd_experiment_dbxref()
  7983. * Purpose: To describe the structure of 'nd_experiment_dbxref' to tripal
  7984. * @see chado_insert_record()
  7985. * @see chado_update_record()
  7986. * @see chado_select_record()
  7987. *
  7988. * @return
  7989. * An array describing the 'nd_experiment_dbxref' table
  7990. *
  7991. * @ingroup tripal_chado_v1.2_schema_api
  7992. *
  7993. */
  7994. function tripal_chado_chado_schema_v1_2_nd_experiment_dbxref() {
  7995. $description = array(
  7996. 'description' => '',
  7997. 'fields' => array(
  7998. 'nd_experiment_dbxref_id' => array(
  7999. 'description' => '',
  8000. 'type' => 'serial',
  8001. 'not null' => TRUE,
  8002. ),
  8003. 'nd_experiment_id' => array(
  8004. 'description' => '',
  8005. 'type' => 'int',
  8006. 'not null' => TRUE,
  8007. ),
  8008. 'dbxref_id' => array(
  8009. 'description' => '',
  8010. 'type' => 'int',
  8011. 'not null' => TRUE,
  8012. ),
  8013. ),
  8014. 'primary key' => array(
  8015. 0 => 'nd_experiment_dbxref_id',
  8016. ),
  8017. 'foreign keys' => array(
  8018. 'dbxref' => array(
  8019. 'table' => 'dbxref',
  8020. 'columns' => array(
  8021. 'dbxref_id' => 'dbxref_id',
  8022. ),
  8023. ),
  8024. 'nd_experiment' => array(
  8025. 'table' => 'nd_experiment',
  8026. 'columns' => array(
  8027. 'nd_experiment_id' => 'nd_experiment_id',
  8028. ),
  8029. ),
  8030. ),
  8031. 'table' => 'nd_experiment_dbxref',
  8032. 'referring_tables' => NULL,
  8033. );
  8034. return $description;
  8035. }
  8036. /**
  8037. * Implements hook_chado_schema_v1_2_nd_experiment_genotype()
  8038. * Purpose: To describe the structure of 'nd_experiment_genotype' to tripal
  8039. * @see chado_insert_record()
  8040. * @see chado_update_record()
  8041. * @see chado_select_record()
  8042. *
  8043. * @return
  8044. * An array describing the 'nd_experiment_genotype' table
  8045. *
  8046. * @ingroup tripal_chado_v1.2_schema_api
  8047. *
  8048. */
  8049. function tripal_chado_chado_schema_v1_2_nd_experiment_genotype() {
  8050. $description = array(
  8051. 'description' => '',
  8052. 'fields' => array(
  8053. 'nd_experiment_genotype_id' => array(
  8054. 'description' => '',
  8055. 'type' => 'serial',
  8056. 'not null' => TRUE,
  8057. ),
  8058. 'nd_experiment_id' => array(
  8059. 'description' => '',
  8060. 'type' => 'int',
  8061. 'not null' => TRUE,
  8062. ),
  8063. 'genotype_id' => array(
  8064. 'description' => '',
  8065. 'type' => 'int',
  8066. 'not null' => TRUE,
  8067. ),
  8068. ),
  8069. 'primary key' => array(
  8070. 0 => 'nd_experiment_genotype_id',
  8071. ),
  8072. 'unique keys' => array(
  8073. 'nd_experiment_genotype_c1' => array(
  8074. 0 => 'nd_experiment_id',
  8075. 1 => 'genotype_id',
  8076. ),
  8077. ),
  8078. 'foreign keys' => array(
  8079. 'genotype' => array(
  8080. 'table' => 'genotype',
  8081. 'columns' => array(
  8082. 'genotype_id' => 'genotype_id',
  8083. ),
  8084. ),
  8085. 'nd_experiment' => array(
  8086. 'table' => 'nd_experiment',
  8087. 'columns' => array(
  8088. 'nd_experiment_id' => 'nd_experiment_id',
  8089. ),
  8090. ),
  8091. ),
  8092. 'table' => 'nd_experiment_genotype',
  8093. 'referring_tables' => NULL,
  8094. );
  8095. return $description;
  8096. }
  8097. /**
  8098. * Implements hook_chado_schema_v1_2_nd_experiment_phenotype()
  8099. * Purpose: To describe the structure of 'nd_experiment_phenotype' to tripal
  8100. * @see chado_insert_record()
  8101. * @see chado_update_record()
  8102. * @see chado_select_record()
  8103. *
  8104. * @return
  8105. * An array describing the 'nd_experiment_phenotype' table
  8106. *
  8107. * @ingroup tripal_chado_v1.2_schema_api
  8108. *
  8109. */
  8110. function tripal_chado_chado_schema_v1_2_nd_experiment_phenotype() {
  8111. $description = array(
  8112. 'description' => '',
  8113. 'fields' => array(
  8114. 'nd_experiment_phenotype_id' => array(
  8115. 'description' => '',
  8116. 'type' => 'serial',
  8117. 'not null' => TRUE,
  8118. ),
  8119. 'nd_experiment_id' => array(
  8120. 'description' => '',
  8121. 'type' => 'int',
  8122. 'not null' => TRUE,
  8123. ),
  8124. 'phenotype_id' => array(
  8125. 'description' => '',
  8126. 'type' => 'int',
  8127. 'not null' => TRUE,
  8128. ),
  8129. ),
  8130. 'primary key' => array(
  8131. 0 => 'nd_experiment_phenotype_id',
  8132. ),
  8133. 'unique keys' => array(
  8134. 'nd_experiment_phenotype_c1' => array(
  8135. 0 => 'nd_experiment_id',
  8136. 1 => 'phenotype_id',
  8137. ),
  8138. ),
  8139. 'foreign keys' => array(
  8140. 'phenotype' => array(
  8141. 'table' => 'phenotype',
  8142. 'columns' => array(
  8143. 'phenotype_id' => 'phenotype_id',
  8144. ),
  8145. ),
  8146. 'nd_experiment' => array(
  8147. 'table' => 'nd_experiment',
  8148. 'columns' => array(
  8149. 'nd_experiment_id' => 'nd_experiment_id',
  8150. ),
  8151. ),
  8152. ),
  8153. 'table' => 'nd_experiment_phenotype',
  8154. 'referring_tables' => NULL,
  8155. );
  8156. return $description;
  8157. }
  8158. /**
  8159. * Implements hook_chado_schema_v1_2_nd_experiment_project()
  8160. * Purpose: To describe the structure of 'nd_experiment_project' to tripal
  8161. * @see chado_insert_record()
  8162. * @see chado_update_record()
  8163. * @see chado_select_record()
  8164. *
  8165. * @return
  8166. * An array describing the 'nd_experiment_project' table
  8167. *
  8168. * @ingroup tripal_chado_v1.2_schema_api
  8169. *
  8170. */
  8171. function tripal_chado_chado_schema_v1_2_nd_experiment_project() {
  8172. $description = array(
  8173. 'description' => '',
  8174. 'fields' => array(
  8175. 'nd_experiment_project_id' => array(
  8176. 'description' => '',
  8177. 'type' => 'serial',
  8178. 'not null' => TRUE,
  8179. ),
  8180. 'project_id' => array(
  8181. 'description' => '',
  8182. 'type' => 'int',
  8183. 'not null' => TRUE,
  8184. ),
  8185. 'nd_experiment_id' => array(
  8186. 'description' => '',
  8187. 'type' => 'int',
  8188. 'not null' => TRUE,
  8189. ),
  8190. ),
  8191. 'primary key' => array(
  8192. 0 => 'nd_experiment_project_id',
  8193. ),
  8194. 'foreign keys' => array(
  8195. 'project' => array(
  8196. 'table' => 'project',
  8197. 'columns' => array(
  8198. 'project_id' => 'project_id',
  8199. ),
  8200. ),
  8201. 'nd_experiment' => array(
  8202. 'table' => 'nd_experiment',
  8203. 'columns' => array(
  8204. 'nd_experiment_id' => 'nd_experiment_id',
  8205. ),
  8206. ),
  8207. ),
  8208. 'table' => 'nd_experiment_project',
  8209. 'referring_tables' => NULL,
  8210. );
  8211. return $description;
  8212. }
  8213. /**
  8214. * Implements hook_chado_schema_v1_2_nd_experiment_protocol()
  8215. * Purpose: To describe the structure of 'nd_experiment_protocol' to tripal
  8216. * @see chado_insert_record()
  8217. * @see chado_update_record()
  8218. * @see chado_select_record()
  8219. *
  8220. * @return
  8221. * An array describing the 'nd_experiment_protocol' table
  8222. *
  8223. * @ingroup tripal_chado_v1.2_schema_api
  8224. *
  8225. */
  8226. function tripal_chado_chado_schema_v1_2_nd_experiment_protocol() {
  8227. $description = array(
  8228. 'description' => '',
  8229. 'fields' => array(
  8230. 'nd_experiment_protocol_id' => array(
  8231. 'description' => '',
  8232. 'type' => 'serial',
  8233. 'not null' => TRUE,
  8234. ),
  8235. 'nd_experiment_id' => array(
  8236. 'description' => '',
  8237. 'type' => 'int',
  8238. 'not null' => TRUE,
  8239. ),
  8240. 'nd_protocol_id' => array(
  8241. 'description' => '',
  8242. 'type' => 'int',
  8243. 'not null' => TRUE,
  8244. ),
  8245. ),
  8246. 'primary key' => array(
  8247. 0 => 'nd_experiment_protocol_id',
  8248. ),
  8249. 'foreign keys' => array(
  8250. 'nd_experiment' => array(
  8251. 'table' => 'nd_experiment',
  8252. 'columns' => array(
  8253. 'nd_experiment_id' => 'nd_experiment_id',
  8254. ),
  8255. ),
  8256. 'nd_protocol' => array(
  8257. 'table' => 'nd_protocol',
  8258. 'columns' => array(
  8259. 'nd_protocol_id' => 'nd_protocol_id',
  8260. ),
  8261. ),
  8262. ),
  8263. 'table' => 'nd_experiment_protocol',
  8264. 'referring_tables' => NULL,
  8265. );
  8266. return $description;
  8267. }
  8268. /**
  8269. * Implements hook_chado_schema_v1_2_nd_experiment_pub()
  8270. * Purpose: To describe the structure of 'nd_experiment_pub' to tripal
  8271. * @see chado_insert_record()
  8272. * @see chado_update_record()
  8273. * @see chado_select_record()
  8274. *
  8275. * @return
  8276. * An array describing the 'nd_experiment_pub' table
  8277. *
  8278. * @ingroup tripal_chado_v1.2_schema_api
  8279. *
  8280. */
  8281. function tripal_chado_chado_schema_v1_2_nd_experiment_pub() {
  8282. $description = array(
  8283. 'description' => '',
  8284. 'fields' => array(
  8285. 'nd_experiment_pub_id' => array(
  8286. 'description' => '',
  8287. 'type' => 'serial',
  8288. 'not null' => TRUE,
  8289. ),
  8290. 'nd_experiment_id' => array(
  8291. 'description' => '',
  8292. 'type' => 'int',
  8293. 'not null' => TRUE,
  8294. ),
  8295. 'pub_id' => array(
  8296. 'description' => '',
  8297. 'type' => 'int',
  8298. 'not null' => TRUE,
  8299. ),
  8300. ),
  8301. 'primary key' => array(
  8302. 0 => 'nd_experiment_pub_id',
  8303. ),
  8304. 'unique keys' => array(
  8305. 'nd_experiment_pub_c1' => array(
  8306. 0 => 'nd_experiment_id',
  8307. 1 => 'pub_id',
  8308. ),
  8309. ),
  8310. 'indexes' => array(
  8311. 'nd_experiment_pub_idx1' => array(
  8312. 0 => 'nd_experiment_id',
  8313. ),
  8314. 'nd_experiment_pub_idx2' => array(
  8315. 0 => 'pub_id',
  8316. ),
  8317. ),
  8318. 'foreign keys' => array(
  8319. 'pub' => array(
  8320. 'table' => 'pub',
  8321. 'columns' => array(
  8322. 'pub_id' => 'pub_id',
  8323. ),
  8324. ),
  8325. 'nd_experiment' => array(
  8326. 'table' => 'nd_experiment',
  8327. 'columns' => array(
  8328. 'nd_experiment_id' => 'nd_experiment_id',
  8329. ),
  8330. ),
  8331. ),
  8332. 'table' => 'nd_experiment_pub',
  8333. 'referring_tables' => NULL,
  8334. );
  8335. return $description;
  8336. }
  8337. /**
  8338. * Implements hook_chado_schema_v1_2_nd_experiment_stock()
  8339. * Purpose: To describe the structure of 'nd_experiment_stock' to tripal
  8340. * @see chado_insert_record()
  8341. * @see chado_update_record()
  8342. * @see chado_select_record()
  8343. *
  8344. * @return
  8345. * An array describing the 'nd_experiment_stock' table
  8346. *
  8347. * @ingroup tripal_chado_v1.2_schema_api
  8348. *
  8349. */
  8350. function tripal_chado_chado_schema_v1_2_nd_experiment_stock() {
  8351. $description = array(
  8352. 'description' => '',
  8353. 'fields' => array(
  8354. 'nd_experiment_stock_id' => array(
  8355. 'description' => '',
  8356. 'type' => 'serial',
  8357. 'not null' => TRUE,
  8358. ),
  8359. 'nd_experiment_id' => array(
  8360. 'description' => '',
  8361. 'type' => 'int',
  8362. 'not null' => TRUE,
  8363. ),
  8364. 'stock_id' => array(
  8365. 'description' => '',
  8366. 'type' => 'int',
  8367. 'not null' => TRUE,
  8368. ),
  8369. 'type_id' => array(
  8370. 'description' => '',
  8371. 'type' => 'int',
  8372. 'not null' => TRUE,
  8373. ),
  8374. ),
  8375. 'primary key' => array(
  8376. 0 => 'nd_experiment_stock_id',
  8377. ),
  8378. 'foreign keys' => array(
  8379. 'cvterm' => array(
  8380. 'table' => 'cvterm',
  8381. 'columns' => array(
  8382. 'type_id' => 'cvterm_id',
  8383. ),
  8384. ),
  8385. 'stock' => array(
  8386. 'table' => 'stock',
  8387. 'columns' => array(
  8388. 'stock_id' => 'stock_id',
  8389. ),
  8390. ),
  8391. 'nd_experiment' => array(
  8392. 'table' => 'nd_experiment',
  8393. 'columns' => array(
  8394. 'nd_experiment_id' => 'nd_experiment_id',
  8395. ),
  8396. ),
  8397. ),
  8398. 'table' => 'nd_experiment_stock',
  8399. 'referring_tables' => array(
  8400. 0 => 'nd_experiment_stock_dbxref',
  8401. 1 => 'nd_experiment_stockprop',
  8402. ),
  8403. );
  8404. return $description;
  8405. }
  8406. /**
  8407. * Implements hook_chado_schema_v1_2_nd_experiment_stock_dbxref()
  8408. * Purpose: To describe the structure of 'nd_experiment_stock_dbxref' to tripal
  8409. * @see chado_insert_record()
  8410. * @see chado_update_record()
  8411. * @see chado_select_record()
  8412. *
  8413. * @return
  8414. * An array describing the 'nd_experiment_stock_dbxref' table
  8415. *
  8416. * @ingroup tripal_chado_v1.2_schema_api
  8417. *
  8418. */
  8419. function tripal_chado_chado_schema_v1_2_nd_experiment_stock_dbxref() {
  8420. $description = array(
  8421. 'description' => '',
  8422. 'fields' => array(
  8423. 'nd_experiment_stock_dbxref_id' => array(
  8424. 'description' => '',
  8425. 'type' => 'serial',
  8426. 'not null' => TRUE,
  8427. ),
  8428. 'nd_experiment_stock_id' => array(
  8429. 'description' => '',
  8430. 'type' => 'int',
  8431. 'not null' => TRUE,
  8432. ),
  8433. 'dbxref_id' => array(
  8434. 'description' => '',
  8435. 'type' => 'int',
  8436. 'not null' => TRUE,
  8437. ),
  8438. ),
  8439. 'primary key' => array(
  8440. 0 => 'nd_experiment_stock_dbxref_id',
  8441. ),
  8442. 'foreign keys' => array(
  8443. 'dbxref' => array(
  8444. 'table' => 'dbxref',
  8445. 'columns' => array(
  8446. 'dbxref_id' => 'dbxref_id',
  8447. ),
  8448. ),
  8449. 'nd_experiment_stock' => array(
  8450. 'table' => 'nd_experiment_stock',
  8451. 'columns' => array(
  8452. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  8453. ),
  8454. ),
  8455. ),
  8456. 'table' => 'nd_experiment_stock_dbxref',
  8457. 'referring_tables' => NULL,
  8458. );
  8459. return $description;
  8460. }
  8461. /**
  8462. * Implements hook_chado_schema_v1_2_nd_experiment_stockprop()
  8463. * Purpose: To describe the structure of 'nd_experiment_stockprop' to tripal
  8464. * @see chado_insert_record()
  8465. * @see chado_update_record()
  8466. * @see chado_select_record()
  8467. *
  8468. * @return
  8469. * An array describing the 'nd_experiment_stockprop' table
  8470. *
  8471. * @ingroup tripal_chado_v1.2_schema_api
  8472. *
  8473. */
  8474. function tripal_chado_chado_schema_v1_2_nd_experiment_stockprop() {
  8475. $description = array(
  8476. 'description' => '',
  8477. 'fields' => array(
  8478. 'nd_experiment_stockprop_id' => array(
  8479. 'description' => '',
  8480. 'type' => 'serial',
  8481. 'not null' => TRUE,
  8482. ),
  8483. 'nd_experiment_stock_id' => array(
  8484. 'description' => '',
  8485. 'type' => 'int',
  8486. 'not null' => TRUE,
  8487. ),
  8488. 'type_id' => array(
  8489. 'description' => '',
  8490. 'type' => 'int',
  8491. 'not null' => TRUE,
  8492. ),
  8493. 'value' => array(
  8494. 'description' => '',
  8495. 'type' => 'text',
  8496. 'not null' => FALSE,
  8497. ),
  8498. 'rank' => array(
  8499. 'description' => '',
  8500. 'type' => 'int',
  8501. 'not null' => TRUE,
  8502. 'default' => 0,
  8503. ),
  8504. ),
  8505. 'primary key' => array(
  8506. 0 => 'nd_experiment_stockprop_id',
  8507. ),
  8508. 'unique keys' => array(
  8509. 'nd_experiment_stockprop_c1' => array(
  8510. 0 => 'nd_experiment_stock_id',
  8511. 1 => 'type_id',
  8512. 2 => 'rank',
  8513. ),
  8514. ),
  8515. 'foreign keys' => array(
  8516. 'cvterm' => array(
  8517. 'table' => 'cvterm',
  8518. 'columns' => array(
  8519. 'type_id' => 'cvterm_id',
  8520. ),
  8521. ),
  8522. 'nd_experiment_stock' => array(
  8523. 'table' => 'nd_experiment_stock',
  8524. 'columns' => array(
  8525. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  8526. ),
  8527. ),
  8528. ),
  8529. 'table' => 'nd_experiment_stockprop',
  8530. 'referring_tables' => NULL,
  8531. );
  8532. return $description;
  8533. }
  8534. /**
  8535. * Implements hook_chado_schema_v1_2_nd_experimentprop()
  8536. * Purpose: To describe the structure of 'nd_experimentprop' to tripal
  8537. * @see chado_insert_record()
  8538. * @see chado_update_record()
  8539. * @see chado_select_record()
  8540. *
  8541. * @return
  8542. * An array describing the 'nd_experimentprop' table
  8543. *
  8544. * @ingroup tripal_chado_v1.2_schema_api
  8545. *
  8546. */
  8547. function tripal_chado_chado_schema_v1_2_nd_experimentprop() {
  8548. $description = array(
  8549. 'description' => '',
  8550. 'fields' => array(
  8551. 'nd_experimentprop_id' => array(
  8552. 'description' => '',
  8553. 'type' => 'serial',
  8554. 'not null' => TRUE,
  8555. ),
  8556. 'nd_experiment_id' => array(
  8557. 'description' => '',
  8558. 'type' => 'int',
  8559. 'not null' => TRUE,
  8560. ),
  8561. 'type_id' => array(
  8562. 'description' => '',
  8563. 'type' => 'int',
  8564. 'not null' => TRUE,
  8565. ),
  8566. 'value' => array(
  8567. 'description' => '',
  8568. 'type' => 'text',
  8569. 'not null' => FALSE,
  8570. ),
  8571. 'rank' => array(
  8572. 'description' => '',
  8573. 'type' => 'int',
  8574. 'not null' => TRUE,
  8575. 'default' => 0,
  8576. ),
  8577. ),
  8578. 'primary key' => array(
  8579. 0 => 'nd_experimentprop_id',
  8580. ),
  8581. 'unique keys' => array(
  8582. 'nd_experimentprop_c1' => array(
  8583. 0 => 'nd_experiment_id',
  8584. 1 => 'type_id',
  8585. 2 => 'rank',
  8586. ),
  8587. ),
  8588. 'foreign keys' => array(
  8589. 'cvterm' => array(
  8590. 'table' => 'cvterm',
  8591. 'columns' => array(
  8592. 'type_id' => 'cvterm_id',
  8593. ),
  8594. ),
  8595. 'nd_experiment' => array(
  8596. 'table' => 'nd_experiment',
  8597. 'columns' => array(
  8598. 'nd_experiment_id' => 'nd_experiment_id',
  8599. ),
  8600. ),
  8601. ),
  8602. 'table' => 'nd_experimentprop',
  8603. 'referring_tables' => NULL,
  8604. );
  8605. return $description;
  8606. }
  8607. /**
  8608. * Implements hook_chado_schema_v1_2_nd_geolocation()
  8609. * Purpose: To describe the structure of 'nd_geolocation' to tripal
  8610. * @see chado_insert_record()
  8611. * @see chado_update_record()
  8612. * @see chado_select_record()
  8613. *
  8614. * @return
  8615. * An array describing the 'nd_geolocation' table
  8616. *
  8617. * @ingroup tripal_chado_v1.2_schema_api
  8618. *
  8619. */
  8620. function tripal_chado_chado_schema_v1_2_nd_geolocation() {
  8621. $description = array(
  8622. 'description' => '',
  8623. 'fields' => array(
  8624. 'nd_geolocation_id' => array(
  8625. 'description' => '',
  8626. 'type' => 'serial',
  8627. 'not null' => TRUE,
  8628. ),
  8629. 'description' => array(
  8630. 'description' => '',
  8631. 'type' => 'varchar',
  8632. 'length' => '255',
  8633. 'not null' => FALSE,
  8634. ),
  8635. 'latitude' => array(
  8636. 'description' => '',
  8637. 'type' => 'float',
  8638. 'not null' => FALSE,
  8639. ),
  8640. 'longitude' => array(
  8641. 'description' => '',
  8642. 'type' => 'float',
  8643. 'not null' => FALSE,
  8644. ),
  8645. 'geodetic_datum' => array(
  8646. 'description' => '',
  8647. 'type' => 'varchar',
  8648. 'length' => '32',
  8649. 'not null' => FALSE,
  8650. ),
  8651. 'altitude' => array(
  8652. 'description' => '',
  8653. 'type' => 'float',
  8654. 'not null' => FALSE,
  8655. ),
  8656. ),
  8657. 'primary key' => array(
  8658. 0 => 'nd_geolocation_id',
  8659. ),
  8660. 'foreign keys' => array(
  8661. ),
  8662. 'table' => 'nd_geolocation',
  8663. 'referring_tables' => array(
  8664. 0 => 'nd_experiment',
  8665. 1 => 'nd_geolocationprop',
  8666. ),
  8667. );
  8668. return $description;
  8669. }
  8670. /**
  8671. * Implements hook_chado_schema_v1_2_nd_geolocationprop()
  8672. * Purpose: To describe the structure of 'nd_geolocationprop' to tripal
  8673. * @see chado_insert_record()
  8674. * @see chado_update_record()
  8675. * @see chado_select_record()
  8676. *
  8677. * @return
  8678. * An array describing the 'nd_geolocationprop' table
  8679. *
  8680. * @ingroup tripal_chado_v1.2_schema_api
  8681. *
  8682. */
  8683. function tripal_chado_chado_schema_v1_2_nd_geolocationprop() {
  8684. $description = array(
  8685. 'description' => '',
  8686. 'fields' => array(
  8687. 'nd_geolocationprop_id' => array(
  8688. 'description' => '',
  8689. 'type' => 'serial',
  8690. 'not null' => TRUE,
  8691. ),
  8692. 'nd_geolocation_id' => array(
  8693. 'description' => '',
  8694. 'type' => 'int',
  8695. 'not null' => TRUE,
  8696. ),
  8697. 'type_id' => array(
  8698. 'description' => '',
  8699. 'type' => 'int',
  8700. 'not null' => TRUE,
  8701. ),
  8702. 'value' => array(
  8703. 'description' => '',
  8704. 'type' => 'text',
  8705. 'not null' => FALSE,
  8706. ),
  8707. 'rank' => array(
  8708. 'description' => '',
  8709. 'type' => 'int',
  8710. 'not null' => TRUE,
  8711. 'default' => 0,
  8712. ),
  8713. ),
  8714. 'primary key' => array(
  8715. 0 => 'nd_geolocationprop_id',
  8716. ),
  8717. 'unique keys' => array(
  8718. 'nd_geolocationprop_c1' => array(
  8719. 0 => 'nd_geolocation_id',
  8720. 1 => 'type_id',
  8721. 2 => 'rank',
  8722. ),
  8723. ),
  8724. 'foreign keys' => array(
  8725. 'cvterm' => array(
  8726. 'table' => 'cvterm',
  8727. 'columns' => array(
  8728. 'type_id' => 'cvterm_id',
  8729. ),
  8730. ),
  8731. 'nd_geolocation' => array(
  8732. 'table' => 'nd_geolocation',
  8733. 'columns' => array(
  8734. 'nd_geolocation_id' => 'nd_geolocation_id',
  8735. ),
  8736. ),
  8737. ),
  8738. 'table' => 'nd_geolocationprop',
  8739. 'referring_tables' => NULL,
  8740. );
  8741. return $description;
  8742. }
  8743. /**
  8744. * Implements hook_chado_schema_v1_2_nd_protocol()
  8745. * Purpose: To describe the structure of 'nd_protocol' to tripal
  8746. * @see chado_insert_record()
  8747. * @see chado_update_record()
  8748. * @see chado_select_record()
  8749. *
  8750. * @return
  8751. * An array describing the 'nd_protocol' table
  8752. *
  8753. * @ingroup tripal_chado_v1.2_schema_api
  8754. *
  8755. */
  8756. function tripal_chado_chado_schema_v1_2_nd_protocol() {
  8757. $description = array(
  8758. 'description' => '',
  8759. 'fields' => array(
  8760. 'nd_protocol_id' => array(
  8761. 'description' => '',
  8762. 'type' => 'serial',
  8763. 'not null' => TRUE,
  8764. ),
  8765. 'name' => array(
  8766. 'description' => '',
  8767. 'type' => 'varchar',
  8768. 'length' => '255',
  8769. 'not null' => TRUE,
  8770. ),
  8771. 'type_id' => array(
  8772. 'description' => '',
  8773. 'type' => 'int',
  8774. 'not null' => TRUE,
  8775. ),
  8776. ),
  8777. 'primary key' => array(
  8778. 0 => 'nd_protocol_id',
  8779. ),
  8780. 'unique keys' => array(
  8781. 'name' => array(
  8782. 0 => 'name',
  8783. ),
  8784. ),
  8785. 'foreign keys' => array(
  8786. 'cvterm' => array(
  8787. 'table' => 'cvterm',
  8788. 'columns' => array(
  8789. 'type_id' => 'cvterm_id',
  8790. ),
  8791. ),
  8792. ),
  8793. 'table' => 'nd_protocol',
  8794. 'referring_tables' => array(
  8795. 0 => 'nd_experiment_protocol',
  8796. 1 => 'nd_protocol_reagent',
  8797. 2 => 'nd_protocolprop',
  8798. ),
  8799. );
  8800. return $description;
  8801. }
  8802. /**
  8803. * Implements hook_chado_schema_v1_2_nd_protocol_reagent()
  8804. * Purpose: To describe the structure of 'nd_protocol_reagent' to tripal
  8805. * @see chado_insert_record()
  8806. * @see chado_update_record()
  8807. * @see chado_select_record()
  8808. *
  8809. * @return
  8810. * An array describing the 'nd_protocol_reagent' table
  8811. *
  8812. * @ingroup tripal_chado_v1.2_schema_api
  8813. *
  8814. */
  8815. function tripal_chado_chado_schema_v1_2_nd_protocol_reagent() {
  8816. $description = array(
  8817. 'description' => '',
  8818. 'fields' => array(
  8819. 'nd_protocol_reagent_id' => array(
  8820. 'description' => '',
  8821. 'type' => 'serial',
  8822. 'not null' => TRUE,
  8823. ),
  8824. 'nd_protocol_id' => array(
  8825. 'description' => '',
  8826. 'type' => 'int',
  8827. 'not null' => TRUE,
  8828. ),
  8829. 'reagent_id' => array(
  8830. 'description' => '',
  8831. 'type' => 'int',
  8832. 'not null' => TRUE,
  8833. ),
  8834. 'type_id' => array(
  8835. 'description' => '',
  8836. 'type' => 'int',
  8837. 'not null' => TRUE,
  8838. ),
  8839. ),
  8840. 'primary key' => array(
  8841. 0 => 'nd_protocol_reagent_id',
  8842. ),
  8843. 'foreign keys' => array(
  8844. 'cvterm' => array(
  8845. 'table' => 'cvterm',
  8846. 'columns' => array(
  8847. 'type_id' => 'cvterm_id',
  8848. ),
  8849. ),
  8850. 'nd_protocol' => array(
  8851. 'table' => 'nd_protocol',
  8852. 'columns' => array(
  8853. 'nd_protocol_id' => 'nd_protocol_id',
  8854. ),
  8855. ),
  8856. 'nd_reagent' => array(
  8857. 'table' => 'nd_reagent',
  8858. 'columns' => array(
  8859. 'reagent_id' => 'nd_reagent_id',
  8860. ),
  8861. ),
  8862. ),
  8863. 'table' => 'nd_protocol_reagent',
  8864. 'referring_tables' => NULL,
  8865. );
  8866. return $description;
  8867. }
  8868. /**
  8869. * Implements hook_chado_schema_v1_2_nd_protocolprop()
  8870. * Purpose: To describe the structure of 'nd_protocolprop' to tripal
  8871. * @see chado_insert_record()
  8872. * @see chado_update_record()
  8873. * @see chado_select_record()
  8874. *
  8875. * @return
  8876. * An array describing the 'nd_protocolprop' table
  8877. *
  8878. * @ingroup tripal_chado_v1.2_schema_api
  8879. *
  8880. */
  8881. function tripal_chado_chado_schema_v1_2_nd_protocolprop() {
  8882. $description = array(
  8883. 'description' => '',
  8884. 'fields' => array(
  8885. 'nd_protocolprop_id' => array(
  8886. 'description' => '',
  8887. 'type' => 'serial',
  8888. 'not null' => TRUE,
  8889. ),
  8890. 'nd_protocol_id' => array(
  8891. 'description' => '',
  8892. 'type' => 'int',
  8893. 'not null' => TRUE,
  8894. ),
  8895. 'type_id' => array(
  8896. 'description' => '',
  8897. 'type' => 'int',
  8898. 'not null' => TRUE,
  8899. ),
  8900. 'value' => array(
  8901. 'description' => '',
  8902. 'type' => 'text',
  8903. 'not null' => FALSE,
  8904. ),
  8905. 'rank' => array(
  8906. 'description' => '',
  8907. 'type' => 'int',
  8908. 'not null' => TRUE,
  8909. 'default' => 0,
  8910. ),
  8911. ),
  8912. 'primary key' => array(
  8913. 0 => 'nd_protocolprop_id',
  8914. ),
  8915. 'unique keys' => array(
  8916. 'nd_protocolprop_c1' => array(
  8917. 0 => 'nd_protocol_id',
  8918. 1 => 'type_id',
  8919. 2 => 'rank',
  8920. ),
  8921. ),
  8922. 'foreign keys' => array(
  8923. 'cvterm' => array(
  8924. 'table' => 'cvterm',
  8925. 'columns' => array(
  8926. 'type_id' => 'cvterm_id',
  8927. ),
  8928. ),
  8929. 'nd_protocol' => array(
  8930. 'table' => 'nd_protocol',
  8931. 'columns' => array(
  8932. 'nd_protocol_id' => 'nd_protocol_id',
  8933. ),
  8934. ),
  8935. ),
  8936. 'table' => 'nd_protocolprop',
  8937. 'referring_tables' => NULL,
  8938. );
  8939. return $description;
  8940. }
  8941. /**
  8942. * Implements hook_chado_schema_v1_2_nd_reagent()
  8943. * Purpose: To describe the structure of 'nd_reagent' to tripal
  8944. * @see chado_insert_record()
  8945. * @see chado_update_record()
  8946. * @see chado_select_record()
  8947. *
  8948. * @return
  8949. * An array describing the 'nd_reagent' table
  8950. *
  8951. * @ingroup tripal_chado_v1.2_schema_api
  8952. *
  8953. */
  8954. function tripal_chado_chado_schema_v1_2_nd_reagent() {
  8955. $description = array(
  8956. 'description' => '',
  8957. 'fields' => array(
  8958. 'nd_reagent_id' => array(
  8959. 'description' => '',
  8960. 'type' => 'serial',
  8961. 'not null' => TRUE,
  8962. ),
  8963. 'name' => array(
  8964. 'description' => '',
  8965. 'type' => 'varchar',
  8966. 'length' => '80',
  8967. 'not null' => TRUE,
  8968. ),
  8969. 'type_id' => array(
  8970. 'description' => '',
  8971. 'type' => 'int',
  8972. 'not null' => TRUE,
  8973. ),
  8974. 'feature_id' => array(
  8975. 'description' => '',
  8976. 'type' => 'int',
  8977. 'not null' => FALSE,
  8978. ),
  8979. ),
  8980. 'primary key' => array(
  8981. 0 => 'nd_reagent_id',
  8982. ),
  8983. 'foreign keys' => array(
  8984. 'cvterm' => array(
  8985. 'table' => 'cvterm',
  8986. 'columns' => array(
  8987. 'type_id' => 'cvterm_id',
  8988. ),
  8989. ),
  8990. ),
  8991. 'table' => 'nd_reagent',
  8992. 'referring_tables' => array(
  8993. 0 => 'nd_protocol_reagent',
  8994. 1 => 'nd_reagent_relationship',
  8995. 3 => 'nd_reagentprop',
  8996. ),
  8997. );
  8998. return $description;
  8999. }
  9000. /**
  9001. * Implements hook_chado_schema_v1_2_nd_reagent_relationship()
  9002. * Purpose: To describe the structure of 'nd_reagent_relationship' to tripal
  9003. * @see chado_insert_record()
  9004. * @see chado_update_record()
  9005. * @see chado_select_record()
  9006. *
  9007. * @return
  9008. * An array describing the 'nd_reagent_relationship' table
  9009. *
  9010. * @ingroup tripal_chado_v1.2_schema_api
  9011. *
  9012. */
  9013. function tripal_chado_chado_schema_v1_2_nd_reagent_relationship() {
  9014. $description = array(
  9015. 'description' => '',
  9016. 'fields' => array(
  9017. 'nd_reagent_relationship_id' => array(
  9018. 'description' => '',
  9019. 'type' => 'serial',
  9020. 'not null' => TRUE,
  9021. ),
  9022. 'subject_reagent_id' => array(
  9023. 'description' => '',
  9024. 'type' => 'int',
  9025. 'not null' => TRUE,
  9026. ),
  9027. 'object_reagent_id' => array(
  9028. 'description' => '',
  9029. 'type' => 'int',
  9030. 'not null' => TRUE,
  9031. ),
  9032. 'type_id' => array(
  9033. 'description' => '',
  9034. 'type' => 'int',
  9035. 'not null' => TRUE,
  9036. ),
  9037. ),
  9038. 'primary key' => array(
  9039. 0 => 'nd_reagent_relationship_id',
  9040. ),
  9041. 'foreign keys' => array(
  9042. 'cvterm' => array(
  9043. 'table' => 'cvterm',
  9044. 'columns' => array(
  9045. 'type_id' => 'cvterm_id',
  9046. ),
  9047. ),
  9048. 'nd_reagent' => array(
  9049. 'table' => 'nd_reagent',
  9050. 'columns' => array(
  9051. 'subject_reagent_id' => 'nd_reagent_id',
  9052. 'object_reagent_id' => 'nd_reagent_id',
  9053. ),
  9054. ),
  9055. ),
  9056. 'table' => 'nd_reagent_relationship',
  9057. 'referring_tables' => NULL,
  9058. );
  9059. return $description;
  9060. }
  9061. /**
  9062. * Implements hook_chado_schema_v1_2_nd_reagentprop()
  9063. * Purpose: To describe the structure of 'nd_reagentprop' to tripal
  9064. * @see chado_insert_record()
  9065. * @see chado_update_record()
  9066. * @see chado_select_record()
  9067. *
  9068. * @return
  9069. * An array describing the 'nd_reagentprop' table
  9070. *
  9071. * @ingroup tripal_chado_v1.2_schema_api
  9072. *
  9073. */
  9074. function tripal_chado_chado_schema_v1_2_nd_reagentprop() {
  9075. $description = array(
  9076. 'description' => '',
  9077. 'fields' => array(
  9078. 'nd_reagentprop_id' => array(
  9079. 'description' => '',
  9080. 'type' => 'serial',
  9081. 'not null' => TRUE,
  9082. ),
  9083. 'nd_reagent_id' => array(
  9084. 'description' => '',
  9085. 'type' => 'int',
  9086. 'not null' => TRUE,
  9087. ),
  9088. 'type_id' => array(
  9089. 'description' => '',
  9090. 'type' => 'int',
  9091. 'not null' => TRUE,
  9092. ),
  9093. 'value' => array(
  9094. 'description' => '',
  9095. 'type' => 'text',
  9096. 'not null' => FALSE,
  9097. ),
  9098. 'rank' => array(
  9099. 'description' => '',
  9100. 'type' => 'int',
  9101. 'not null' => TRUE,
  9102. 'default' => 0,
  9103. ),
  9104. ),
  9105. 'primary key' => array(
  9106. 0 => 'nd_reagentprop_id',
  9107. ),
  9108. 'unique keys' => array(
  9109. 'nd_reagentprop_c1' => array(
  9110. 0 => 'nd_reagent_id',
  9111. 1 => 'type_id',
  9112. 2 => 'rank',
  9113. ),
  9114. ),
  9115. 'foreign keys' => array(
  9116. 'cvterm' => array(
  9117. 'table' => 'cvterm',
  9118. 'columns' => array(
  9119. 'type_id' => 'cvterm_id',
  9120. ),
  9121. ),
  9122. 'nd_reagent' => array(
  9123. 'table' => 'nd_reagent',
  9124. 'columns' => array(
  9125. 'nd_reagent_id' => 'nd_reagent_id',
  9126. ),
  9127. ),
  9128. ),
  9129. 'table' => 'nd_reagentprop',
  9130. 'referring_tables' => NULL,
  9131. );
  9132. return $description;
  9133. }
  9134. /**
  9135. * Implements hook_chado_schema_v1_2_organism()
  9136. * Purpose: To describe the structure of 'organism' to tripal
  9137. * @see chado_insert_record()
  9138. * @see chado_update_record()
  9139. * @see chado_select_record()
  9140. *
  9141. * @return
  9142. * An array describing the 'organism' table
  9143. *
  9144. * @ingroup tripal_chado_v1.2_schema_api
  9145. *
  9146. */
  9147. function tripal_chado_chado_schema_v1_2_organism() {
  9148. $description = array(
  9149. 'description' => '',
  9150. 'fields' => array(
  9151. 'organism_id' => array(
  9152. 'description' => '',
  9153. 'type' => 'serial',
  9154. 'not null' => TRUE,
  9155. ),
  9156. 'abbreviation' => array(
  9157. 'description' => '',
  9158. 'type' => 'varchar',
  9159. 'length' => '255',
  9160. 'not null' => FALSE,
  9161. ),
  9162. 'genus' => array(
  9163. 'description' => '',
  9164. 'type' => 'varchar',
  9165. 'length' => '255',
  9166. 'not null' => TRUE,
  9167. ),
  9168. 'species' => array(
  9169. 'description' => '',
  9170. 'type' => 'varchar',
  9171. 'length' => '255',
  9172. 'not null' => TRUE,
  9173. ),
  9174. 'common_name' => array(
  9175. 'description' => '',
  9176. 'type' => 'varchar',
  9177. 'length' => '255',
  9178. 'not null' => FALSE,
  9179. ),
  9180. 'comment' => array(
  9181. 'description' => '',
  9182. 'type' => 'text',
  9183. 'not null' => FALSE,
  9184. ),
  9185. ),
  9186. 'primary key' => array(
  9187. 0 => 'organism_id',
  9188. ),
  9189. 'unique keys' => array(
  9190. 'organism_c1' => array(
  9191. 0 => 'genus',
  9192. 1 => 'species',
  9193. ),
  9194. ),
  9195. 'foreign keys' => array(
  9196. ),
  9197. 'referring_tables' => array(
  9198. 0 => 'biomaterial',
  9199. 1 => 'cell_line',
  9200. 2 => 'feature',
  9201. 3 => 'library',
  9202. 4 => 'organism_dbxref',
  9203. 5 => 'organismprop',
  9204. 6 => 'phenotype_comparison',
  9205. 7 => 'phylonode_organism',
  9206. 8 => 'stock',
  9207. ),
  9208. 'table' => 'organism',
  9209. );
  9210. return $description;
  9211. }
  9212. /**
  9213. * Implements hook_chado_schema_v1_2_organism_dbxref()
  9214. * Purpose: To describe the structure of 'organism_dbxref' to tripal
  9215. * @see chado_insert_record()
  9216. * @see chado_update_record()
  9217. * @see chado_select_record()
  9218. *
  9219. * @return
  9220. * An array describing the 'organism_dbxref' table
  9221. *
  9222. * @ingroup tripal_chado_v1.2_schema_api
  9223. *
  9224. */
  9225. function tripal_chado_chado_schema_v1_2_organism_dbxref() {
  9226. $description = array(
  9227. 'description' => '',
  9228. 'fields' => array(
  9229. 'organism_dbxref_id' => array(
  9230. 'description' => '',
  9231. 'type' => 'serial',
  9232. 'not null' => TRUE,
  9233. ),
  9234. 'organism_id' => array(
  9235. 'description' => '',
  9236. 'type' => 'int',
  9237. 'not null' => TRUE,
  9238. ),
  9239. 'dbxref_id' => array(
  9240. 'description' => '',
  9241. 'type' => 'int',
  9242. 'not null' => TRUE,
  9243. ),
  9244. ),
  9245. 'primary key' => array(
  9246. 0 => 'organism_dbxref_id',
  9247. ),
  9248. 'unique keys' => array(
  9249. 'organism_dbxref_c1' => array(
  9250. 0 => 'organism_id',
  9251. 1 => 'dbxref_id',
  9252. ),
  9253. ),
  9254. 'indexes' => array(
  9255. 'organism_dbxref_idx1' => array(
  9256. 0 => 'organism_id',
  9257. ),
  9258. 'organism_dbxref_idx2' => array(
  9259. 0 => 'dbxref_id',
  9260. ),
  9261. ),
  9262. 'foreign keys' => array(
  9263. 'organism' => array(
  9264. 'table' => 'organism',
  9265. 'columns' => array(
  9266. 'organism_id' => 'organism_id',
  9267. ),
  9268. ),
  9269. 'dbxref' => array(
  9270. 'table' => 'dbxref',
  9271. 'columns' => array(
  9272. 'dbxref_id' => 'dbxref_id',
  9273. ),
  9274. ),
  9275. ),
  9276. 'table' => 'organism_dbxref',
  9277. 'referring_tables' => NULL,
  9278. );
  9279. return $description;
  9280. }
  9281. /**
  9282. * Implements hook_chado_schema_v1_2_organismprop()
  9283. * Purpose: To describe the structure of 'organismprop' to tripal
  9284. * @see chado_insert_record()
  9285. * @see chado_update_record()
  9286. * @see chado_select_record()
  9287. *
  9288. * @return
  9289. * An array describing the 'organismprop' table
  9290. *
  9291. * @ingroup tripal_chado_v1.2_schema_api
  9292. *
  9293. */
  9294. function tripal_chado_chado_schema_v1_2_organismprop() {
  9295. $description = array(
  9296. 'description' => '',
  9297. 'fields' => array(
  9298. 'organismprop_id' => array(
  9299. 'description' => '',
  9300. 'type' => 'serial',
  9301. 'not null' => TRUE,
  9302. ),
  9303. 'organism_id' => array(
  9304. 'description' => '',
  9305. 'type' => 'int',
  9306. 'not null' => TRUE,
  9307. ),
  9308. 'type_id' => array(
  9309. 'description' => '',
  9310. 'type' => 'int',
  9311. 'not null' => TRUE,
  9312. ),
  9313. 'value' => array(
  9314. 'description' => '',
  9315. 'type' => 'text',
  9316. 'not null' => FALSE,
  9317. ),
  9318. 'rank' => array(
  9319. 'description' => '',
  9320. 'type' => 'int',
  9321. 'not null' => TRUE,
  9322. 'default' => 0,
  9323. ),
  9324. ),
  9325. 'primary key' => array(
  9326. 0 => 'organismprop_id',
  9327. ),
  9328. 'unique keys' => array(
  9329. 'organismprop_c1' => array(
  9330. 0 => 'organism_id',
  9331. 1 => 'type_id',
  9332. 2 => 'rank',
  9333. ),
  9334. ),
  9335. 'indexes' => array(
  9336. 'organismprop_idx1' => array(
  9337. 0 => 'organism_id',
  9338. ),
  9339. 'organismprop_idx2' => array(
  9340. 0 => 'type_id',
  9341. ),
  9342. ),
  9343. 'foreign keys' => array(
  9344. 'organism' => array(
  9345. 'table' => 'organism',
  9346. 'columns' => array(
  9347. 'organism_id' => 'organism_id',
  9348. ),
  9349. ),
  9350. 'cvterm' => array(
  9351. 'table' => 'cvterm',
  9352. 'columns' => array(
  9353. 'type_id' => 'cvterm_id',
  9354. ),
  9355. ),
  9356. ),
  9357. 'table' => 'organismprop',
  9358. 'referring_tables' => NULL,
  9359. );
  9360. return $description;
  9361. }
  9362. /**
  9363. * Implements hook_chado_schema_v1_2_phendesc()
  9364. * Purpose: To describe the structure of 'phendesc' to tripal
  9365. * @see chado_insert_record()
  9366. * @see chado_update_record()
  9367. * @see chado_select_record()
  9368. *
  9369. * @return
  9370. * An array describing the 'phendesc' table
  9371. *
  9372. * @ingroup tripal_chado_v1.2_schema_api
  9373. *
  9374. */
  9375. function tripal_chado_chado_schema_v1_2_phendesc() {
  9376. $description = array(
  9377. 'description' => '',
  9378. 'fields' => array(
  9379. 'phendesc_id' => array(
  9380. 'description' => '',
  9381. 'type' => 'serial',
  9382. 'not null' => TRUE,
  9383. ),
  9384. 'genotype_id' => array(
  9385. 'description' => '',
  9386. 'type' => 'int',
  9387. 'not null' => TRUE,
  9388. ),
  9389. 'environment_id' => array(
  9390. 'description' => '',
  9391. 'type' => 'int',
  9392. 'not null' => TRUE,
  9393. ),
  9394. 'description' => array(
  9395. 'description' => '',
  9396. 'type' => 'text',
  9397. 'not null' => TRUE,
  9398. ),
  9399. 'type_id' => array(
  9400. 'description' => '',
  9401. 'type' => 'int',
  9402. 'not null' => TRUE,
  9403. ),
  9404. 'pub_id' => array(
  9405. 'description' => '',
  9406. 'type' => 'int',
  9407. 'not null' => TRUE,
  9408. ),
  9409. ),
  9410. 'primary key' => array(
  9411. 0 => 'phendesc_id',
  9412. ),
  9413. 'unique keys' => array(
  9414. 'phendesc_c1' => array(
  9415. 0 => 'genotype_id',
  9416. 1 => 'environment_id',
  9417. 2 => 'type_id',
  9418. 3 => 'pub_id',
  9419. ),
  9420. ),
  9421. 'indexes' => array(
  9422. 'phendesc_idx1' => array(
  9423. 0 => 'genotype_id',
  9424. ),
  9425. 'phendesc_idx2' => array(
  9426. 0 => 'environment_id',
  9427. ),
  9428. 'phendesc_idx3' => array(
  9429. 0 => 'pub_id',
  9430. ),
  9431. ),
  9432. 'foreign keys' => array(
  9433. 'cvterm' => array(
  9434. 'table' => 'cvterm',
  9435. 'columns' => array(
  9436. 'type_id' => 'cvterm_id',
  9437. ),
  9438. ),
  9439. 'pub' => array(
  9440. 'table' => 'pub',
  9441. 'columns' => array(
  9442. 'pub_id' => 'pub_id',
  9443. ),
  9444. ),
  9445. 'genotype' => array(
  9446. 'table' => 'genotype',
  9447. 'columns' => array(
  9448. 'genotype_id' => 'genotype_id',
  9449. ),
  9450. ),
  9451. 'environment' => array(
  9452. 'table' => 'environment',
  9453. 'columns' => array(
  9454. 'environment_id' => 'environment_id',
  9455. ),
  9456. ),
  9457. ),
  9458. 'table' => 'phendesc',
  9459. 'referring_tables' => NULL,
  9460. );
  9461. return $description;
  9462. }
  9463. /**
  9464. * Implements hook_chado_schema_v1_2_phenotype()
  9465. * Purpose: To describe the structure of 'phenotype' to tripal
  9466. * @see chado_insert_record()
  9467. * @see chado_update_record()
  9468. * @see chado_select_record()
  9469. *
  9470. * @return
  9471. * An array describing the 'phenotype' table
  9472. *
  9473. * @ingroup tripal_chado_v1.2_schema_api
  9474. *
  9475. */
  9476. function tripal_chado_chado_schema_v1_2_phenotype() {
  9477. $description = array(
  9478. 'description' => '',
  9479. 'fields' => array(
  9480. 'phenotype_id' => array(
  9481. 'description' => '',
  9482. 'type' => 'serial',
  9483. 'not null' => TRUE,
  9484. ),
  9485. 'uniquename' => array(
  9486. 'description' => '',
  9487. 'type' => 'text',
  9488. 'not null' => TRUE,
  9489. ),
  9490. 'name' => array(
  9491. 'description' => '',
  9492. 'type' => 'text',
  9493. 'not null' => FALSE,
  9494. ),
  9495. 'observable_id' => array(
  9496. 'description' => '',
  9497. 'type' => 'int',
  9498. 'not null' => FALSE,
  9499. ),
  9500. 'attr_id' => array(
  9501. 'description' => '',
  9502. 'type' => 'int',
  9503. 'not null' => FALSE,
  9504. ),
  9505. 'value' => array(
  9506. 'description' => '',
  9507. 'type' => 'text',
  9508. 'not null' => FALSE,
  9509. ),
  9510. 'cvalue_id' => array(
  9511. 'description' => '',
  9512. 'type' => 'int',
  9513. 'not null' => FALSE,
  9514. ),
  9515. 'assay_id' => array(
  9516. 'description' => '',
  9517. 'type' => 'int',
  9518. 'not null' => FALSE,
  9519. ),
  9520. ),
  9521. 'primary key' => array(
  9522. 0 => 'phenotype_id',
  9523. ),
  9524. 'unique keys' => array(
  9525. 'phenotype_c1' => array(
  9526. 0 => 'uniquename',
  9527. ),
  9528. ),
  9529. 'indexes' => array(
  9530. 'phenotype_idx1' => array(
  9531. 0 => 'cvalue_id',
  9532. ),
  9533. 'phenotype_idx2' => array(
  9534. 0 => 'observable_id',
  9535. ),
  9536. 'phenotype_idx3' => array(
  9537. 0 => 'attr_id',
  9538. ),
  9539. ),
  9540. 'foreign keys' => array(
  9541. 'cvterm' => array(
  9542. 'table' => 'cvterm',
  9543. 'columns' => array(
  9544. 'observable_id' => 'cvterm_id',
  9545. 'attr_id' => 'cvterm_id',
  9546. 'cvalue_id' => 'cvterm_id',
  9547. 'assay_id' => 'cvterm_id',
  9548. ),
  9549. ),
  9550. ),
  9551. 'table' => 'phenotype',
  9552. 'referring_tables' => array(
  9553. 0 => 'feature_phenotype',
  9554. 1 => 'nd_experiment_phenotype',
  9555. 2 => 'phenotype_comparison',
  9556. 4 => 'phenotype_cvterm',
  9557. 5 => 'phenstatement',
  9558. ),
  9559. );
  9560. return $description;
  9561. }
  9562. /**
  9563. * Implements hook_chado_schema_v1_2_phenotype_comparison()
  9564. * Purpose: To describe the structure of 'phenotype_comparison' to tripal
  9565. * @see chado_insert_record()
  9566. * @see chado_update_record()
  9567. * @see chado_select_record()
  9568. *
  9569. * @return
  9570. * An array describing the 'phenotype_comparison' table
  9571. *
  9572. * @ingroup tripal_chado_v1.2_schema_api
  9573. *
  9574. */
  9575. function tripal_chado_chado_schema_v1_2_phenotype_comparison() {
  9576. $description = array(
  9577. 'description' => '',
  9578. 'fields' => array(
  9579. 'phenotype_comparison_id' => array(
  9580. 'description' => '',
  9581. 'type' => 'serial',
  9582. 'not null' => TRUE,
  9583. ),
  9584. 'genotype1_id' => array(
  9585. 'description' => '',
  9586. 'type' => 'int',
  9587. 'not null' => TRUE,
  9588. ),
  9589. 'environment1_id' => array(
  9590. 'description' => '',
  9591. 'type' => 'int',
  9592. 'not null' => TRUE,
  9593. ),
  9594. 'genotype2_id' => array(
  9595. 'description' => '',
  9596. 'type' => 'int',
  9597. 'not null' => TRUE,
  9598. ),
  9599. 'environment2_id' => array(
  9600. 'description' => '',
  9601. 'type' => 'int',
  9602. 'not null' => TRUE,
  9603. ),
  9604. 'phenotype1_id' => array(
  9605. 'description' => '',
  9606. 'type' => 'int',
  9607. 'not null' => TRUE,
  9608. ),
  9609. 'phenotype2_id' => array(
  9610. 'description' => '',
  9611. 'type' => 'int',
  9612. 'not null' => FALSE,
  9613. ),
  9614. 'pub_id' => array(
  9615. 'description' => '',
  9616. 'type' => 'int',
  9617. 'not null' => TRUE,
  9618. ),
  9619. 'organism_id' => array(
  9620. 'description' => '',
  9621. 'type' => 'int',
  9622. 'not null' => TRUE,
  9623. ),
  9624. ),
  9625. 'primary key' => array(
  9626. 0 => 'phenotype_comparison_id',
  9627. ),
  9628. 'unique keys' => array(
  9629. 'phenotype_comparison_c1' => array(
  9630. 0 => 'genotype1_id',
  9631. 1 => 'environment1_id',
  9632. 2 => 'genotype2_id',
  9633. 3 => 'environment2_id',
  9634. 4 => 'phenotype1_id',
  9635. 5 => 'pub_id',
  9636. ),
  9637. ),
  9638. 'indexes' => array(
  9639. 'phenotype_comparison_idx1' => array(
  9640. 0 => 'genotype1_id',
  9641. ),
  9642. 'phenotype_comparison_idx2' => array(
  9643. 0 => 'genotype2_id',
  9644. ),
  9645. 'phenotype_comparison_idx4' => array(
  9646. 0 => 'pub_id',
  9647. ),
  9648. ),
  9649. 'foreign keys' => array(
  9650. 'organism' => array(
  9651. 'table' => 'organism',
  9652. 'columns' => array(
  9653. 'organism_id' => 'organism_id',
  9654. ),
  9655. ),
  9656. 'pub' => array(
  9657. 'table' => 'pub',
  9658. 'columns' => array(
  9659. 'pub_id' => 'pub_id',
  9660. ),
  9661. ),
  9662. 'genotype' => array(
  9663. 'table' => 'genotype',
  9664. 'columns' => array(
  9665. 'genotype1_id' => 'genotype_id',
  9666. 'genotype2_id' => 'genotype_id',
  9667. ),
  9668. ),
  9669. 'environment' => array(
  9670. 'table' => 'environment',
  9671. 'columns' => array(
  9672. 'environment1_id' => 'environment_id',
  9673. 'environment2_id' => 'environment_id',
  9674. ),
  9675. ),
  9676. 'phenotype' => array(
  9677. 'table' => 'phenotype',
  9678. 'columns' => array(
  9679. 'phenotype1_id' => 'phenotype_id',
  9680. 'phenotype2_id' => 'phenotype_id',
  9681. ),
  9682. ),
  9683. ),
  9684. 'table' => 'phenotype_comparison',
  9685. 'referring_tables' => array(
  9686. 0 => 'phenotype_comparison_cvterm',
  9687. ),
  9688. );
  9689. return $description;
  9690. }
  9691. /**
  9692. * Implements hook_chado_schema_v1_2_phenotype_comparison_cvterm()
  9693. * Purpose: To describe the structure of 'phenotype_comparison_cvterm' to tripal
  9694. * @see chado_insert_record()
  9695. * @see chado_update_record()
  9696. * @see chado_select_record()
  9697. *
  9698. * @return
  9699. * An array describing the 'phenotype_comparison_cvterm' table
  9700. *
  9701. * @ingroup tripal_chado_v1.2_schema_api
  9702. *
  9703. */
  9704. function tripal_chado_chado_schema_v1_2_phenotype_comparison_cvterm() {
  9705. $description = array(
  9706. 'description' => '',
  9707. 'fields' => array(
  9708. 'phenotype_comparison_cvterm_id' => array(
  9709. 'description' => '',
  9710. 'type' => 'serial',
  9711. 'not null' => TRUE,
  9712. ),
  9713. 'phenotype_comparison_id' => array(
  9714. 'description' => '',
  9715. 'type' => 'int',
  9716. 'not null' => TRUE,
  9717. ),
  9718. 'cvterm_id' => array(
  9719. 'description' => '',
  9720. 'type' => 'int',
  9721. 'not null' => TRUE,
  9722. ),
  9723. 'pub_id' => array(
  9724. 'description' => '',
  9725. 'type' => 'int',
  9726. 'not null' => TRUE,
  9727. ),
  9728. 'rank' => array(
  9729. 'description' => '',
  9730. 'type' => 'int',
  9731. 'not null' => TRUE,
  9732. 'default' => 0,
  9733. ),
  9734. ),
  9735. 'primary key' => array(
  9736. 0 => 'phenotype_comparison_cvterm_id',
  9737. ),
  9738. 'unique keys' => array(
  9739. 'phenotype_comparison_cvterm_c1' => array(
  9740. 0 => 'phenotype_comparison_id',
  9741. 1 => 'cvterm_id',
  9742. ),
  9743. ),
  9744. 'indexes' => array(
  9745. 'phenotype_comparison_cvterm_idx1' => array(
  9746. 0 => 'phenotype_comparison_id',
  9747. ),
  9748. 'phenotype_comparison_cvterm_idx2' => array(
  9749. 0 => 'cvterm_id',
  9750. ),
  9751. ),
  9752. 'foreign keys' => array(
  9753. 'cvterm' => array(
  9754. 'table' => 'cvterm',
  9755. 'columns' => array(
  9756. 'cvterm_id' => 'cvterm_id',
  9757. ),
  9758. ),
  9759. 'pub' => array(
  9760. 'table' => 'pub',
  9761. 'columns' => array(
  9762. 'pub_id' => 'pub_id',
  9763. ),
  9764. ),
  9765. 'phenotype_comparison' => array(
  9766. 'table' => 'phenotype_comparison',
  9767. 'columns' => array(
  9768. 'phenotype_comparison_id' => 'phenotype_comparison_id',
  9769. ),
  9770. ),
  9771. ),
  9772. 'table' => 'phenotype_comparison_cvterm',
  9773. 'referring_tables' => NULL,
  9774. );
  9775. return $description;
  9776. }
  9777. /**
  9778. * Implements hook_chado_schema_v1_2_phenotype_cvterm()
  9779. * Purpose: To describe the structure of 'phenotype_cvterm' to tripal
  9780. * @see chado_insert_record()
  9781. * @see chado_update_record()
  9782. * @see chado_select_record()
  9783. *
  9784. * @return
  9785. * An array describing the 'phenotype_cvterm' table
  9786. *
  9787. * @ingroup tripal_chado_v1.2_schema_api
  9788. *
  9789. */
  9790. function tripal_chado_chado_schema_v1_2_phenotype_cvterm() {
  9791. $description = array(
  9792. 'description' => '',
  9793. 'fields' => array(
  9794. 'phenotype_cvterm_id' => array(
  9795. 'description' => '',
  9796. 'type' => 'serial',
  9797. 'not null' => TRUE,
  9798. ),
  9799. 'phenotype_id' => array(
  9800. 'description' => '',
  9801. 'type' => 'int',
  9802. 'not null' => TRUE,
  9803. ),
  9804. 'cvterm_id' => array(
  9805. 'description' => '',
  9806. 'type' => 'int',
  9807. 'not null' => TRUE,
  9808. ),
  9809. 'rank' => array(
  9810. 'description' => '',
  9811. 'type' => 'int',
  9812. 'not null' => TRUE,
  9813. 'default' => 0,
  9814. ),
  9815. ),
  9816. 'primary key' => array(
  9817. 0 => 'phenotype_cvterm_id',
  9818. ),
  9819. 'unique keys' => array(
  9820. 'phenotype_cvterm_c1' => array(
  9821. 0 => 'phenotype_id',
  9822. 1 => 'cvterm_id',
  9823. 2 => 'rank',
  9824. ),
  9825. ),
  9826. 'indexes' => array(
  9827. 'phenotype_cvterm_idx1' => array(
  9828. 0 => 'phenotype_id',
  9829. ),
  9830. 'phenotype_cvterm_idx2' => array(
  9831. 0 => 'cvterm_id',
  9832. ),
  9833. ),
  9834. 'foreign keys' => array(
  9835. 'cvterm' => array(
  9836. 'table' => 'cvterm',
  9837. 'columns' => array(
  9838. 'cvterm_id' => 'cvterm_id',
  9839. ),
  9840. ),
  9841. 'phenotype' => array(
  9842. 'table' => 'phenotype',
  9843. 'columns' => array(
  9844. 'phenotype_id' => 'phenotype_id',
  9845. ),
  9846. ),
  9847. ),
  9848. 'table' => 'phenotype_cvterm',
  9849. 'referring_tables' => NULL,
  9850. );
  9851. return $description;
  9852. }
  9853. /**
  9854. * Implements hook_chado_schema_v1_2_phenstatement()
  9855. * Purpose: To describe the structure of 'phenstatement' to tripal
  9856. * @see chado_insert_record()
  9857. * @see chado_update_record()
  9858. * @see chado_select_record()
  9859. *
  9860. * @return
  9861. * An array describing the 'phenstatement' table
  9862. *
  9863. * @ingroup tripal_chado_v1.2_schema_api
  9864. *
  9865. */
  9866. function tripal_chado_chado_schema_v1_2_phenstatement() {
  9867. $description = array(
  9868. 'description' => '',
  9869. 'fields' => array(
  9870. 'phenstatement_id' => array(
  9871. 'description' => '',
  9872. 'type' => 'serial',
  9873. 'not null' => TRUE,
  9874. ),
  9875. 'genotype_id' => array(
  9876. 'description' => '',
  9877. 'type' => 'int',
  9878. 'not null' => TRUE,
  9879. ),
  9880. 'environment_id' => array(
  9881. 'description' => '',
  9882. 'type' => 'int',
  9883. 'not null' => TRUE,
  9884. ),
  9885. 'phenotype_id' => array(
  9886. 'description' => '',
  9887. 'type' => 'int',
  9888. 'not null' => TRUE,
  9889. ),
  9890. 'type_id' => array(
  9891. 'description' => '',
  9892. 'type' => 'int',
  9893. 'not null' => TRUE,
  9894. ),
  9895. 'pub_id' => array(
  9896. 'description' => '',
  9897. 'type' => 'int',
  9898. 'not null' => TRUE,
  9899. ),
  9900. ),
  9901. 'primary key' => array(
  9902. 0 => 'phenstatement_id',
  9903. ),
  9904. 'unique keys' => array(
  9905. 'phenstatement_c1' => array(
  9906. 0 => 'genotype_id',
  9907. 1 => 'phenotype_id',
  9908. 2 => 'environment_id',
  9909. 3 => 'type_id',
  9910. 4 => 'pub_id',
  9911. ),
  9912. ),
  9913. 'indexes' => array(
  9914. 'phenstatement_idx1' => array(
  9915. 0 => 'genotype_id',
  9916. ),
  9917. 'phenstatement_idx2' => array(
  9918. 0 => 'phenotype_id',
  9919. ),
  9920. ),
  9921. 'foreign keys' => array(
  9922. 'cvterm' => array(
  9923. 'table' => 'cvterm',
  9924. 'columns' => array(
  9925. 'type_id' => 'cvterm_id',
  9926. ),
  9927. ),
  9928. 'pub' => array(
  9929. 'table' => 'pub',
  9930. 'columns' => array(
  9931. 'pub_id' => 'pub_id',
  9932. ),
  9933. ),
  9934. 'genotype' => array(
  9935. 'table' => 'genotype',
  9936. 'columns' => array(
  9937. 'genotype_id' => 'genotype_id',
  9938. ),
  9939. ),
  9940. 'environment' => array(
  9941. 'table' => 'environment',
  9942. 'columns' => array(
  9943. 'environment_id' => 'environment_id',
  9944. ),
  9945. ),
  9946. 'phenotype' => array(
  9947. 'table' => 'phenotype',
  9948. 'columns' => array(
  9949. 'phenotype_id' => 'phenotype_id',
  9950. ),
  9951. ),
  9952. ),
  9953. 'table' => 'phenstatement',
  9954. 'referring_tables' => NULL,
  9955. );
  9956. return $description;
  9957. }
  9958. /**
  9959. * Implements hook_chado_schema_v1_2_phylonode()
  9960. * Purpose: To describe the structure of 'phylonode' to tripal
  9961. * @see chado_insert_record()
  9962. * @see chado_update_record()
  9963. * @see chado_select_record()
  9964. *
  9965. * @return
  9966. * An array describing the 'phylonode' table
  9967. *
  9968. * @ingroup tripal_chado_v1.2_schema_api
  9969. *
  9970. */
  9971. function tripal_chado_chado_schema_v1_2_phylonode() {
  9972. $description = array(
  9973. 'description' => '',
  9974. 'fields' => array(
  9975. 'phylonode_id' => array(
  9976. 'description' => '',
  9977. 'type' => 'serial',
  9978. 'not null' => TRUE,
  9979. ),
  9980. 'phylotree_id' => array(
  9981. 'description' => '',
  9982. 'type' => 'int',
  9983. 'not null' => TRUE,
  9984. ),
  9985. 'parent_phylonode_id' => array(
  9986. 'description' => '',
  9987. 'type' => 'int',
  9988. 'not null' => FALSE,
  9989. ),
  9990. 'left_idx' => array(
  9991. 'description' => '',
  9992. 'type' => 'int',
  9993. 'not null' => TRUE,
  9994. ),
  9995. 'right_idx' => array(
  9996. 'description' => '',
  9997. 'type' => 'int',
  9998. 'not null' => TRUE,
  9999. ),
  10000. 'type_id' => array(
  10001. 'description' => '',
  10002. 'type' => 'int',
  10003. 'not null' => FALSE,
  10004. ),
  10005. 'feature_id' => array(
  10006. 'description' => '',
  10007. 'type' => 'int',
  10008. 'not null' => FALSE,
  10009. ),
  10010. 'label' => array(
  10011. 'description' => '',
  10012. 'type' => 'varchar',
  10013. 'length' => '255',
  10014. 'not null' => FALSE,
  10015. ),
  10016. 'distance' => array(
  10017. 'description' => '',
  10018. 'type' => 'float',
  10019. 'size' => 'big',
  10020. 'not null' => FALSE,
  10021. ),
  10022. ),
  10023. 'primary key' => array(
  10024. 0 => 'phylonode_id',
  10025. ),
  10026. 'unique keys' => array(
  10027. 'phylotree_id' => array(
  10028. 0 => 'phylotree_id',
  10029. 1 => 'left_idx',
  10030. ),
  10031. 'phylonode_phylotree_id_key1' => array(
  10032. 0 => 'phylotree_id',
  10033. 1 => 'right_idx',
  10034. ),
  10035. ),
  10036. 'foreign keys' => array(
  10037. 'cvterm' => array(
  10038. 'table' => 'cvterm',
  10039. 'columns' => array(
  10040. 'type_id' => 'cvterm_id',
  10041. ),
  10042. ),
  10043. 'feature' => array(
  10044. 'table' => 'feature',
  10045. 'columns' => array(
  10046. 'feature_id' => 'feature_id',
  10047. ),
  10048. ),
  10049. 'phylonode' => array(
  10050. 'table' => 'phylonode',
  10051. 'columns' => array(
  10052. 'parent_phylonode_id' => 'phylonode_id',
  10053. ),
  10054. ),
  10055. 'phylotree' => array(
  10056. 'table' => 'phylotree',
  10057. 'columns' => array(
  10058. 'phylotree_id' => 'phylotree_id',
  10059. ),
  10060. ),
  10061. ),
  10062. 'table' => 'phylonode',
  10063. 'referring_tables' => array(
  10064. 0 => 'phylonode',
  10065. 1 => 'phylonode_dbxref',
  10066. 2 => 'phylonode_organism',
  10067. 3 => 'phylonode_pub',
  10068. 4 => 'phylonode_relationship',
  10069. 6 => 'phylonodeprop',
  10070. ),
  10071. );
  10072. return $description;
  10073. }
  10074. /**
  10075. * Implements hook_chado_schema_v1_2_phylonode_dbxref()
  10076. * Purpose: To describe the structure of 'phylonode_dbxref' to tripal
  10077. * @see chado_insert_record()
  10078. * @see chado_update_record()
  10079. * @see chado_select_record()
  10080. *
  10081. * @return
  10082. * An array describing the 'phylonode_dbxref' table
  10083. *
  10084. * @ingroup tripal_chado_v1.2_schema_api
  10085. *
  10086. */
  10087. function tripal_chado_chado_schema_v1_2_phylonode_dbxref() {
  10088. $description = array(
  10089. 'description' => '',
  10090. 'fields' => array(
  10091. 'phylonode_dbxref_id' => array(
  10092. 'description' => '',
  10093. 'type' => 'serial',
  10094. 'not null' => TRUE,
  10095. ),
  10096. 'phylonode_id' => array(
  10097. 'description' => '',
  10098. 'type' => 'int',
  10099. 'not null' => TRUE,
  10100. ),
  10101. 'dbxref_id' => array(
  10102. 'description' => '',
  10103. 'type' => 'int',
  10104. 'not null' => TRUE,
  10105. ),
  10106. ),
  10107. 'primary key' => array(
  10108. 0 => 'phylonode_dbxref_id',
  10109. ),
  10110. 'unique keys' => array(
  10111. 'phylonode_id' => array(
  10112. 0 => 'phylonode_id',
  10113. 1 => 'dbxref_id',
  10114. ),
  10115. ),
  10116. 'indexes' => array(
  10117. 'phylonode_dbxref_idx1' => array(
  10118. 0 => 'phylonode_id',
  10119. ),
  10120. 'phylonode_dbxref_idx2' => array(
  10121. 0 => 'dbxref_id',
  10122. ),
  10123. ),
  10124. 'foreign keys' => array(
  10125. 'dbxref' => array(
  10126. 'table' => 'dbxref',
  10127. 'columns' => array(
  10128. 'dbxref_id' => 'dbxref_id',
  10129. ),
  10130. ),
  10131. 'phylonode' => array(
  10132. 'table' => 'phylonode',
  10133. 'columns' => array(
  10134. 'phylonode_id' => 'phylonode_id',
  10135. ),
  10136. ),
  10137. ),
  10138. 'table' => 'phylonode_dbxref',
  10139. 'referring_tables' => NULL,
  10140. );
  10141. return $description;
  10142. }
  10143. /**
  10144. * Implements hook_chado_schema_v1_2_phylonode_organism()
  10145. * Purpose: To describe the structure of 'phylonode_organism' to tripal
  10146. * @see chado_insert_record()
  10147. * @see chado_update_record()
  10148. * @see chado_select_record()
  10149. *
  10150. * @return
  10151. * An array describing the 'phylonode_organism' table
  10152. *
  10153. * @ingroup tripal_chado_v1.2_schema_api
  10154. *
  10155. */
  10156. function tripal_chado_chado_schema_v1_2_phylonode_organism() {
  10157. $description = array(
  10158. 'description' => '',
  10159. 'fields' => array(
  10160. 'phylonode_organism_id' => array(
  10161. 'description' => '',
  10162. 'type' => 'serial',
  10163. 'not null' => TRUE,
  10164. ),
  10165. 'phylonode_id' => array(
  10166. 'description' => '',
  10167. 'type' => 'int',
  10168. 'not null' => TRUE,
  10169. ),
  10170. 'organism_id' => array(
  10171. 'description' => '',
  10172. 'type' => 'int',
  10173. 'not null' => TRUE,
  10174. ),
  10175. ),
  10176. 'primary key' => array(
  10177. 0 => 'phylonode_organism_id',
  10178. ),
  10179. 'unique keys' => array(
  10180. 'phylonode_id' => array(
  10181. 0 => 'phylonode_id',
  10182. ),
  10183. ),
  10184. 'indexes' => array(
  10185. 'phylonode_organism_idx1' => array(
  10186. 0 => 'phylonode_id',
  10187. ),
  10188. 'phylonode_organism_idx2' => array(
  10189. 0 => 'organism_id',
  10190. ),
  10191. ),
  10192. 'foreign keys' => array(
  10193. 'organism' => array(
  10194. 'table' => 'organism',
  10195. 'columns' => array(
  10196. 'organism_id' => 'organism_id',
  10197. ),
  10198. ),
  10199. 'phylonode' => array(
  10200. 'table' => 'phylonode',
  10201. 'columns' => array(
  10202. 'phylonode_id' => 'phylonode_id',
  10203. ),
  10204. ),
  10205. ),
  10206. 'table' => 'phylonode_organism',
  10207. 'referring_tables' => NULL,
  10208. );
  10209. return $description;
  10210. }
  10211. /**
  10212. * Implements hook_chado_schema_v1_2_phylonode_pub()
  10213. * Purpose: To describe the structure of 'phylonode_pub' to tripal
  10214. * @see chado_insert_record()
  10215. * @see chado_update_record()
  10216. * @see chado_select_record()
  10217. *
  10218. * @return
  10219. * An array describing the 'phylonode_pub' table
  10220. *
  10221. * @ingroup tripal_chado_v1.2_schema_api
  10222. *
  10223. */
  10224. function tripal_chado_chado_schema_v1_2_phylonode_pub() {
  10225. $description = array(
  10226. 'description' => '',
  10227. 'fields' => array(
  10228. 'phylonode_pub_id' => array(
  10229. 'description' => '',
  10230. 'type' => 'serial',
  10231. 'not null' => TRUE,
  10232. ),
  10233. 'phylonode_id' => array(
  10234. 'description' => '',
  10235. 'type' => 'int',
  10236. 'not null' => TRUE,
  10237. ),
  10238. 'pub_id' => array(
  10239. 'description' => '',
  10240. 'type' => 'int',
  10241. 'not null' => TRUE,
  10242. ),
  10243. ),
  10244. 'primary key' => array(
  10245. 0 => 'phylonode_pub_id',
  10246. ),
  10247. 'unique keys' => array(
  10248. 'phylonode_id' => array(
  10249. 0 => 'phylonode_id',
  10250. 1 => 'pub_id',
  10251. ),
  10252. ),
  10253. 'indexes' => array(
  10254. 'phylonode_pub_idx1' => array(
  10255. 0 => 'phylonode_id',
  10256. ),
  10257. 'phylonode_pub_idx2' => array(
  10258. 0 => 'pub_id',
  10259. ),
  10260. ),
  10261. 'foreign keys' => array(
  10262. 'pub' => array(
  10263. 'table' => 'pub',
  10264. 'columns' => array(
  10265. 'pub_id' => 'pub_id',
  10266. ),
  10267. ),
  10268. 'phylonode' => array(
  10269. 'table' => 'phylonode',
  10270. 'columns' => array(
  10271. 'phylonode_id' => 'phylonode_id',
  10272. ),
  10273. ),
  10274. ),
  10275. 'table' => 'phylonode_pub',
  10276. 'referring_tables' => NULL,
  10277. );
  10278. return $description;
  10279. }
  10280. /**
  10281. * Implements hook_chado_schema_v1_2_phylonode_relationship()
  10282. * Purpose: To describe the structure of 'phylonode_relationship' to tripal
  10283. * @see chado_insert_record()
  10284. * @see chado_update_record()
  10285. * @see chado_select_record()
  10286. *
  10287. * @return
  10288. * An array describing the 'phylonode_relationship' table
  10289. *
  10290. * @ingroup tripal_chado_v1.2_schema_api
  10291. *
  10292. */
  10293. function tripal_chado_chado_schema_v1_2_phylonode_relationship() {
  10294. $description = array(
  10295. 'description' => '',
  10296. 'fields' => array(
  10297. 'phylonode_relationship_id' => array(
  10298. 'description' => '',
  10299. 'type' => 'serial',
  10300. 'not null' => TRUE,
  10301. ),
  10302. 'subject_id' => array(
  10303. 'description' => '',
  10304. 'type' => 'int',
  10305. 'not null' => TRUE,
  10306. ),
  10307. 'object_id' => array(
  10308. 'description' => '',
  10309. 'type' => 'int',
  10310. 'not null' => TRUE,
  10311. ),
  10312. 'type_id' => array(
  10313. 'description' => '',
  10314. 'type' => 'int',
  10315. 'not null' => TRUE,
  10316. ),
  10317. 'rank' => array(
  10318. 'description' => '',
  10319. 'type' => 'int',
  10320. 'not null' => FALSE,
  10321. ),
  10322. 'phylotree_id' => array(
  10323. 'description' => '',
  10324. 'type' => 'int',
  10325. 'not null' => TRUE,
  10326. ),
  10327. ),
  10328. 'primary key' => array(
  10329. 0 => 'phylonode_relationship_id',
  10330. ),
  10331. 'unique keys' => array(
  10332. 'subject_id' => array(
  10333. 0 => 'subject_id',
  10334. 1 => 'object_id',
  10335. 2 => 'type_id',
  10336. ),
  10337. ),
  10338. 'indexes' => array(
  10339. 'phylonode_relationship_idx1' => array(
  10340. 0 => 'subject_id',
  10341. ),
  10342. 'phylonode_relationship_idx2' => array(
  10343. 0 => 'object_id',
  10344. ),
  10345. 'phylonode_relationship_idx3' => array(
  10346. 0 => 'type_id',
  10347. ),
  10348. ),
  10349. 'foreign keys' => array(
  10350. 'cvterm' => array(
  10351. 'table' => 'cvterm',
  10352. 'columns' => array(
  10353. 'type_id' => 'cvterm_id',
  10354. ),
  10355. ),
  10356. 'phylonode' => array(
  10357. 'table' => 'phylonode',
  10358. 'columns' => array(
  10359. 'subject_id' => 'phylonode_id',
  10360. 'object_id' => 'phylonode_id',
  10361. ),
  10362. ),
  10363. 'phylotree' => array(
  10364. 'table' => 'phylotree',
  10365. 'columns' => array(
  10366. 'phylotree_id' => 'phylotree_id',
  10367. ),
  10368. ),
  10369. ),
  10370. 'table' => 'phylonode_relationship',
  10371. 'referring_tables' => NULL,
  10372. );
  10373. return $description;
  10374. }
  10375. /**
  10376. * Implements hook_chado_schema_v1_2_phylonodeprop()
  10377. * Purpose: To describe the structure of 'phylonodeprop' to tripal
  10378. * @see chado_insert_record()
  10379. * @see chado_update_record()
  10380. * @see chado_select_record()
  10381. *
  10382. * @return
  10383. * An array describing the 'phylonodeprop' table
  10384. *
  10385. * @ingroup tripal_chado_v1.2_schema_api
  10386. *
  10387. */
  10388. function tripal_chado_chado_schema_v1_2_phylonodeprop() {
  10389. $description = array(
  10390. 'description' => '',
  10391. 'fields' => array(
  10392. 'phylonodeprop_id' => array(
  10393. 'description' => '',
  10394. 'type' => 'serial',
  10395. 'not null' => TRUE,
  10396. ),
  10397. 'phylonode_id' => array(
  10398. 'description' => '',
  10399. 'type' => 'int',
  10400. 'not null' => TRUE,
  10401. ),
  10402. 'type_id' => array(
  10403. 'description' => '',
  10404. 'type' => 'int',
  10405. 'not null' => TRUE,
  10406. ),
  10407. 'value' => array(
  10408. 'description' => '',
  10409. 'type' => 'text',
  10410. 'not null' => TRUE,
  10411. 'default' => '',
  10412. ),
  10413. 'rank' => array(
  10414. 'description' => '',
  10415. 'type' => 'int',
  10416. 'not null' => TRUE,
  10417. 'default' => 0,
  10418. ),
  10419. ),
  10420. 'primary key' => array(
  10421. 0 => 'phylonodeprop_id',
  10422. ),
  10423. 'unique keys' => array(
  10424. 'phylonode_id' => array(
  10425. 0 => 'phylonode_id',
  10426. 1 => 'type_id',
  10427. 2 => 'value',
  10428. 3 => 'rank',
  10429. ),
  10430. ),
  10431. 'indexes' => array(
  10432. 'phylonodeprop_idx1' => array(
  10433. 0 => 'phylonode_id',
  10434. ),
  10435. 'phylonodeprop_idx2' => array(
  10436. 0 => 'type_id',
  10437. ),
  10438. ),
  10439. 'foreign keys' => array(
  10440. 'cvterm' => array(
  10441. 'table' => 'cvterm',
  10442. 'columns' => array(
  10443. 'type_id' => 'cvterm_id',
  10444. ),
  10445. ),
  10446. 'phylonode' => array(
  10447. 'table' => 'phylonode',
  10448. 'columns' => array(
  10449. 'phylonode_id' => 'phylonode_id',
  10450. ),
  10451. ),
  10452. ),
  10453. 'table' => 'phylonodeprop',
  10454. 'referring_tables' => NULL,
  10455. );
  10456. return $description;
  10457. }
  10458. /**
  10459. * Implements hook_chado_schema_v1_2_phylotree()
  10460. * Purpose: To describe the structure of 'phylotree' to tripal
  10461. * @see chado_insert_record()
  10462. * @see chado_update_record()
  10463. * @see chado_select_record()
  10464. *
  10465. * @return
  10466. * An array describing the 'phylotree' table
  10467. *
  10468. * @ingroup tripal_chado_v1.2_schema_api
  10469. *
  10470. */
  10471. function tripal_chado_chado_schema_v1_2_phylotree() {
  10472. $description = array(
  10473. 'description' => '',
  10474. 'fields' => array(
  10475. 'phylotree_id' => array(
  10476. 'description' => '',
  10477. 'type' => 'serial',
  10478. 'not null' => TRUE,
  10479. ),
  10480. 'dbxref_id' => array(
  10481. 'description' => '',
  10482. 'type' => 'int',
  10483. 'not null' => TRUE,
  10484. ),
  10485. 'name' => array(
  10486. 'description' => '',
  10487. 'type' => 'varchar',
  10488. 'length' => '255',
  10489. 'not null' => FALSE,
  10490. ),
  10491. 'type_id' => array(
  10492. 'description' => '',
  10493. 'type' => 'int',
  10494. 'not null' => FALSE,
  10495. ),
  10496. 'analysis_id' => array(
  10497. 'description' => '',
  10498. 'type' => 'int',
  10499. 'not null' => FALSE,
  10500. ),
  10501. 'comment' => array(
  10502. 'description' => '',
  10503. 'type' => 'text',
  10504. 'not null' => FALSE,
  10505. ),
  10506. ),
  10507. 'primary key' => array(
  10508. 0 => 'phylotree_id',
  10509. ),
  10510. 'indexes' => array(
  10511. 'phylotree_idx1' => array(
  10512. 0 => 'phylotree_id',
  10513. ),
  10514. ),
  10515. 'foreign keys' => array(
  10516. 'cvterm' => array(
  10517. 'table' => 'cvterm',
  10518. 'columns' => array(
  10519. 'type_id' => 'cvterm_id',
  10520. ),
  10521. ),
  10522. 'dbxref' => array(
  10523. 'table' => 'dbxref',
  10524. 'columns' => array(
  10525. 'dbxref_id' => 'dbxref_id',
  10526. ),
  10527. ),
  10528. 'analysis' => array(
  10529. 'table' => 'analysis',
  10530. 'columns' => array(
  10531. 'analysis_id' => 'analysis_id',
  10532. ),
  10533. ),
  10534. ),
  10535. 'table' => 'phylotree',
  10536. 'referring_tables' => array(
  10537. 0 => 'phylonode',
  10538. 1 => 'phylonode_relationship',
  10539. 2 => 'phylotree_pub',
  10540. ),
  10541. );
  10542. return $description;
  10543. }
  10544. /**
  10545. * Implements hook_chado_schema_v1_2_phylotree_pub()
  10546. * Purpose: To describe the structure of 'phylotree_pub' to tripal
  10547. * @see chado_insert_record()
  10548. * @see chado_update_record()
  10549. * @see chado_select_record()
  10550. *
  10551. * @return
  10552. * An array describing the 'phylotree_pub' table
  10553. *
  10554. * @ingroup tripal_chado_v1.2_schema_api
  10555. *
  10556. */
  10557. function tripal_chado_chado_schema_v1_2_phylotree_pub() {
  10558. $description = array(
  10559. 'description' => '',
  10560. 'fields' => array(
  10561. 'phylotree_pub_id' => array(
  10562. 'description' => '',
  10563. 'type' => 'serial',
  10564. 'not null' => TRUE,
  10565. ),
  10566. 'phylotree_id' => array(
  10567. 'description' => '',
  10568. 'type' => 'int',
  10569. 'not null' => TRUE,
  10570. ),
  10571. 'pub_id' => array(
  10572. 'description' => '',
  10573. 'type' => 'int',
  10574. 'not null' => TRUE,
  10575. ),
  10576. ),
  10577. 'primary key' => array(
  10578. 0 => 'phylotree_pub_id',
  10579. ),
  10580. 'unique keys' => array(
  10581. 'phylotree_id' => array(
  10582. 0 => 'phylotree_id',
  10583. 1 => 'pub_id',
  10584. ),
  10585. ),
  10586. 'indexes' => array(
  10587. 'phylotree_pub_idx1' => array(
  10588. 0 => 'phylotree_id',
  10589. ),
  10590. 'phylotree_pub_idx2' => array(
  10591. 0 => 'pub_id',
  10592. ),
  10593. ),
  10594. 'foreign keys' => array(
  10595. 'pub' => array(
  10596. 'table' => 'pub',
  10597. 'columns' => array(
  10598. 'pub_id' => 'pub_id',
  10599. ),
  10600. ),
  10601. 'phylotree' => array(
  10602. 'table' => 'phylotree',
  10603. 'columns' => array(
  10604. 'phylotree_id' => 'phylotree_id',
  10605. ),
  10606. ),
  10607. ),
  10608. 'table' => 'phylotree_pub',
  10609. 'referring_tables' => NULL,
  10610. );
  10611. return $description;
  10612. }
  10613. /**
  10614. * Implements hook_chado_schema_v1_2_project()
  10615. * Purpose: To describe the structure of 'project' to tripal
  10616. * @see chado_insert_record()
  10617. * @see chado_update_record()
  10618. * @see chado_select_record()
  10619. *
  10620. * @return
  10621. * An array describing the 'project' table
  10622. *
  10623. * @ingroup tripal_chado_v1.2_schema_api
  10624. *
  10625. */
  10626. function tripal_chado_chado_schema_v1_2_project() {
  10627. $description = array(
  10628. 'description' => '',
  10629. 'fields' => array(
  10630. 'project_id' => array(
  10631. 'description' => '',
  10632. 'type' => 'serial',
  10633. 'not null' => TRUE,
  10634. ),
  10635. 'name' => array(
  10636. 'description' => '',
  10637. 'type' => 'varchar',
  10638. 'length' => '255',
  10639. 'not null' => TRUE,
  10640. ),
  10641. 'description' => array(
  10642. 'description' => '',
  10643. 'type' => 'varchar',
  10644. 'length' => '255',
  10645. 'not null' => TRUE,
  10646. ),
  10647. ),
  10648. 'primary key' => array(
  10649. 0 => 'project_id',
  10650. ),
  10651. 'unique keys' => array(
  10652. 'project_c1' => array(
  10653. 0 => 'name',
  10654. ),
  10655. ),
  10656. 'foreign keys' => array(
  10657. ),
  10658. 'table' => 'project',
  10659. 'referring_tables' => array(
  10660. 0 => 'assay_project',
  10661. 1 => 'nd_experiment_project',
  10662. 2 => 'project_contact',
  10663. 10 => 'project_pub',
  10664. 18 => 'project_relationship',
  10665. 34 => 'projectprop',
  10666. ),
  10667. );
  10668. return $description;
  10669. }
  10670. /**
  10671. * Implements hook_chado_schema_v1_2_project_contact()
  10672. * Purpose: To describe the structure of 'project_contact' to tripal
  10673. * @see chado_insert_record()
  10674. * @see chado_update_record()
  10675. * @see chado_select_record()
  10676. *
  10677. * @return
  10678. * An array describing the 'project_contact' table
  10679. *
  10680. * @ingroup tripal_chado_v1.2_schema_api
  10681. *
  10682. */
  10683. function tripal_chado_chado_schema_v1_2_project_contact() {
  10684. $description = array(
  10685. 'description' => '',
  10686. 'fields' => array(
  10687. 'project_contact_id' => array(
  10688. 'description' => '',
  10689. 'type' => 'serial',
  10690. 'not null' => TRUE,
  10691. ),
  10692. 'project_id' => array(
  10693. 'description' => '',
  10694. 'type' => 'int',
  10695. 'not null' => TRUE,
  10696. ),
  10697. 'contact_id' => array(
  10698. 'description' => '',
  10699. 'type' => 'int',
  10700. 'not null' => TRUE,
  10701. ),
  10702. ),
  10703. 'primary key' => array(
  10704. 0 => 'project_contact_id',
  10705. ),
  10706. 'unique keys' => array(
  10707. 'project_contact_c1' => array(
  10708. 0 => 'project_id',
  10709. 1 => 'contact_id',
  10710. ),
  10711. ),
  10712. 'indexes' => array(
  10713. 'project_contact_idx1' => array(
  10714. 0 => 'project_id',
  10715. ),
  10716. 'project_contact_idx2' => array(
  10717. 0 => 'contact_id',
  10718. ),
  10719. ),
  10720. 'foreign keys' => array(
  10721. 'contact' => array(
  10722. 'table' => 'contact',
  10723. 'columns' => array(
  10724. 'contact_id' => 'contact_id',
  10725. ),
  10726. ),
  10727. 'project' => array(
  10728. 'table' => 'project',
  10729. 'columns' => array(
  10730. 'project_id' => 'project_id',
  10731. ),
  10732. ),
  10733. ),
  10734. 'table' => 'project_contact',
  10735. 'referring_tables' => NULL,
  10736. );
  10737. return $description;
  10738. }
  10739. /**
  10740. * Implements hook_chado_schema_v1_2_project_pub()
  10741. * Purpose: To describe the structure of 'project_pub' to tripal
  10742. * @see chado_insert_record()
  10743. * @see chado_update_record()
  10744. * @see chado_select_record()
  10745. *
  10746. * @return
  10747. * An array describing the 'project_pub' table
  10748. *
  10749. * @ingroup tripal_chado_v1.2_schema_api
  10750. *
  10751. */
  10752. function tripal_chado_chado_schema_v1_2_project_pub() {
  10753. $description = array(
  10754. 'description' => '',
  10755. 'fields' => array(
  10756. 'project_pub_id' => array(
  10757. 'description' => '',
  10758. 'type' => 'serial',
  10759. 'not null' => TRUE,
  10760. ),
  10761. 'project_id' => array(
  10762. 'description' => '',
  10763. 'type' => 'int',
  10764. 'not null' => TRUE,
  10765. ),
  10766. 'pub_id' => array(
  10767. 'description' => '',
  10768. 'type' => 'int',
  10769. 'not null' => TRUE,
  10770. ),
  10771. ),
  10772. 'primary key' => array(
  10773. 0 => 'project_pub_id',
  10774. ),
  10775. 'unique keys' => array(
  10776. 'project_pub_c1' => array(
  10777. 0 => 'project_id',
  10778. 1 => 'pub_id',
  10779. ),
  10780. ),
  10781. 'indexes' => array(
  10782. 'project_pub_idx1' => array(
  10783. 0 => 'project_id',
  10784. ),
  10785. 'project_pub_idx2' => array(
  10786. 0 => 'pub_id',
  10787. ),
  10788. ),
  10789. 'foreign keys' => array(
  10790. 'pub' => array(
  10791. 'table' => 'pub',
  10792. 'columns' => array(
  10793. 'pub_id' => 'pub_id',
  10794. ),
  10795. ),
  10796. 'project' => array(
  10797. 'table' => 'project',
  10798. 'columns' => array(
  10799. 'project_id' => 'project_id',
  10800. ),
  10801. ),
  10802. ),
  10803. 'table' => 'project_pub',
  10804. 'referring_tables' => NULL,
  10805. );
  10806. return $description;
  10807. }
  10808. /**
  10809. * Implements hook_chado_schema_v1_2_project_relationship()
  10810. * Purpose: To describe the structure of 'project_relationship' to tripal
  10811. * @see chado_insert_record()
  10812. * @see chado_update_record()
  10813. * @see chado_select_record()
  10814. *
  10815. * @return
  10816. * An array describing the 'project_relationship' table
  10817. *
  10818. * @ingroup tripal_chado_v1.2_schema_api
  10819. *
  10820. */
  10821. function tripal_chado_chado_schema_v1_2_project_relationship() {
  10822. $description = array(
  10823. 'description' => '',
  10824. 'fields' => array(
  10825. 'project_relationship_id' => array(
  10826. 'description' => '',
  10827. 'type' => 'serial',
  10828. 'not null' => TRUE,
  10829. ),
  10830. 'subject_project_id' => array(
  10831. 'description' => '',
  10832. 'type' => 'int',
  10833. 'not null' => TRUE,
  10834. ),
  10835. 'object_project_id' => array(
  10836. 'description' => '',
  10837. 'type' => 'int',
  10838. 'not null' => TRUE,
  10839. ),
  10840. 'type_id' => array(
  10841. 'description' => '',
  10842. 'type' => 'int',
  10843. 'not null' => TRUE,
  10844. ),
  10845. ),
  10846. 'primary key' => array(
  10847. 0 => 'project_relationship_id',
  10848. ),
  10849. 'unique keys' => array(
  10850. 'project_relationship_c1' => array(
  10851. 0 => 'subject_project_id',
  10852. 1 => 'object_project_id',
  10853. 2 => 'type_id',
  10854. ),
  10855. ),
  10856. 'foreign keys' => array(
  10857. 'cvterm' => array(
  10858. 'table' => 'cvterm',
  10859. 'columns' => array(
  10860. 'type_id' => 'cvterm_id',
  10861. ),
  10862. ),
  10863. 'project' => array(
  10864. 'table' => 'project',
  10865. 'columns' => array(
  10866. 'subject_project_id' => 'project_id',
  10867. 'object_project_id' => 'project_id',
  10868. ),
  10869. ),
  10870. ),
  10871. 'table' => 'project_relationship',
  10872. 'referring_tables' => NULL,
  10873. );
  10874. return $description;
  10875. }
  10876. /**
  10877. * Implements hook_chado_schema_v1_2_projectprop()
  10878. * Purpose: To describe the structure of 'projectprop' to tripal
  10879. * @see chado_insert_record()
  10880. * @see chado_update_record()
  10881. * @see chado_select_record()
  10882. *
  10883. * @return
  10884. * An array describing the 'projectprop' table
  10885. *
  10886. * @ingroup tripal_chado_v1.2_schema_api
  10887. *
  10888. */
  10889. function tripal_chado_chado_schema_v1_2_projectprop() {
  10890. $description = array(
  10891. 'description' => '',
  10892. 'fields' => array(
  10893. 'projectprop_id' => array(
  10894. 'description' => '',
  10895. 'type' => 'serial',
  10896. 'not null' => TRUE,
  10897. ),
  10898. 'project_id' => array(
  10899. 'description' => '',
  10900. 'type' => 'int',
  10901. 'not null' => TRUE,
  10902. ),
  10903. 'type_id' => array(
  10904. 'description' => '',
  10905. 'type' => 'int',
  10906. 'not null' => TRUE,
  10907. ),
  10908. 'value' => array(
  10909. 'description' => '',
  10910. 'type' => 'text',
  10911. 'not null' => FALSE,
  10912. ),
  10913. 'rank' => array(
  10914. 'description' => '',
  10915. 'type' => 'int',
  10916. 'not null' => TRUE,
  10917. 'default' => 0,
  10918. ),
  10919. ),
  10920. 'primary key' => array(
  10921. 0 => 'projectprop_id',
  10922. ),
  10923. 'unique keys' => array(
  10924. 'projectprop_c1' => array(
  10925. 0 => 'project_id',
  10926. 1 => 'type_id',
  10927. 2 => 'rank',
  10928. ),
  10929. ),
  10930. 'foreign keys' => array(
  10931. 'cvterm' => array(
  10932. 'table' => 'cvterm',
  10933. 'columns' => array(
  10934. 'type_id' => 'cvterm_id',
  10935. ),
  10936. ),
  10937. 'project' => array(
  10938. 'table' => 'project',
  10939. 'columns' => array(
  10940. 'project_id' => 'project_id',
  10941. ),
  10942. ),
  10943. ),
  10944. 'table' => 'projectprop',
  10945. 'referring_tables' => NULL,
  10946. );
  10947. return $description;
  10948. }
  10949. /**
  10950. * Implements hook_chado_schema_v1_2_protocol()
  10951. * Purpose: To describe the structure of 'protocol' to tripal
  10952. * @see chado_insert_record()
  10953. * @see chado_update_record()
  10954. * @see chado_select_record()
  10955. *
  10956. * @return
  10957. * An array describing the 'protocol' table
  10958. *
  10959. * @ingroup tripal_chado_v1.2_schema_api
  10960. *
  10961. */
  10962. function tripal_chado_chado_schema_v1_2_protocol() {
  10963. $description = array(
  10964. 'description' => '',
  10965. 'fields' => array(
  10966. 'protocol_id' => array(
  10967. 'description' => '',
  10968. 'type' => 'serial',
  10969. 'not null' => TRUE,
  10970. ),
  10971. 'type_id' => array(
  10972. 'description' => '',
  10973. 'type' => 'int',
  10974. 'not null' => TRUE,
  10975. ),
  10976. 'pub_id' => array(
  10977. 'description' => '',
  10978. 'type' => 'int',
  10979. 'not null' => FALSE,
  10980. ),
  10981. 'dbxref_id' => array(
  10982. 'description' => '',
  10983. 'type' => 'int',
  10984. 'not null' => FALSE,
  10985. ),
  10986. 'name' => array(
  10987. 'description' => '',
  10988. 'type' => 'text',
  10989. 'not null' => TRUE,
  10990. ),
  10991. 'uri' => array(
  10992. 'description' => '',
  10993. 'type' => 'text',
  10994. 'not null' => FALSE,
  10995. ),
  10996. 'protocoldescription' => array(
  10997. 'description' => '',
  10998. 'type' => 'text',
  10999. 'not null' => FALSE,
  11000. ),
  11001. 'hardwaredescription' => array(
  11002. 'description' => '',
  11003. 'type' => 'text',
  11004. 'not null' => FALSE,
  11005. ),
  11006. 'softwaredescription' => array(
  11007. 'description' => '',
  11008. 'type' => 'text',
  11009. 'not null' => FALSE,
  11010. ),
  11011. ),
  11012. 'primary key' => array(
  11013. 0 => 'protocol_id',
  11014. ),
  11015. 'unique keys' => array(
  11016. 'protocol_c1' => array(
  11017. 0 => 'name',
  11018. ),
  11019. ),
  11020. 'indexes' => array(
  11021. 'protocol_idx1' => array(
  11022. 0 => 'type_id',
  11023. ),
  11024. 'protocol_idx2' => array(
  11025. 0 => 'pub_id',
  11026. ),
  11027. 'protocol_idx3' => array(
  11028. 0 => 'dbxref_id',
  11029. ),
  11030. ),
  11031. 'foreign keys' => array(
  11032. 'cvterm' => array(
  11033. 'table' => 'cvterm',
  11034. 'columns' => array(
  11035. 'type_id' => 'cvterm_id',
  11036. ),
  11037. ),
  11038. 'dbxref' => array(
  11039. 'table' => 'dbxref',
  11040. 'columns' => array(
  11041. 'dbxref_id' => 'dbxref_id',
  11042. ),
  11043. ),
  11044. 'pub' => array(
  11045. 'table' => 'pub',
  11046. 'columns' => array(
  11047. 'pub_id' => 'pub_id',
  11048. ),
  11049. ),
  11050. ),
  11051. 'table' => 'protocol',
  11052. 'referring_tables' => array(
  11053. 0 => 'acquisition',
  11054. 1 => 'arraydesign',
  11055. 2 => 'assay',
  11056. 3 => 'protocolparam',
  11057. 4 => 'quantification',
  11058. 5 => 'treatment',
  11059. ),
  11060. );
  11061. return $description;
  11062. }
  11063. /**
  11064. * Implements hook_chado_schema_v1_2_protocolparam()
  11065. * Purpose: To describe the structure of 'protocolparam' to tripal
  11066. * @see chado_insert_record()
  11067. * @see chado_update_record()
  11068. * @see chado_select_record()
  11069. *
  11070. * @return
  11071. * An array describing the 'protocolparam' table
  11072. *
  11073. * @ingroup tripal_chado_v1.2_schema_api
  11074. *
  11075. */
  11076. function tripal_chado_chado_schema_v1_2_protocolparam() {
  11077. $description = array(
  11078. 'description' => '',
  11079. 'fields' => array(
  11080. 'protocolparam_id' => array(
  11081. 'description' => '',
  11082. 'type' => 'serial',
  11083. 'not null' => TRUE,
  11084. ),
  11085. 'protocol_id' => array(
  11086. 'description' => '',
  11087. 'type' => 'int',
  11088. 'not null' => TRUE,
  11089. ),
  11090. 'name' => array(
  11091. 'description' => '',
  11092. 'type' => 'text',
  11093. 'not null' => TRUE,
  11094. ),
  11095. 'datatype_id' => array(
  11096. 'description' => '',
  11097. 'type' => 'int',
  11098. 'not null' => FALSE,
  11099. ),
  11100. 'unittype_id' => array(
  11101. 'description' => '',
  11102. 'type' => 'int',
  11103. 'not null' => FALSE,
  11104. ),
  11105. 'value' => array(
  11106. 'description' => '',
  11107. 'type' => 'text',
  11108. 'not null' => FALSE,
  11109. ),
  11110. 'rank' => array(
  11111. 'description' => '',
  11112. 'type' => 'int',
  11113. 'not null' => TRUE,
  11114. 'default' => 0,
  11115. ),
  11116. ),
  11117. 'primary key' => array(
  11118. 0 => 'protocolparam_id',
  11119. ),
  11120. 'indexes' => array(
  11121. 'protocolparam_idx1' => array(
  11122. 0 => 'protocol_id',
  11123. ),
  11124. 'protocolparam_idx2' => array(
  11125. 0 => 'datatype_id',
  11126. ),
  11127. 'protocolparam_idx3' => array(
  11128. 0 => 'unittype_id',
  11129. ),
  11130. ),
  11131. 'foreign keys' => array(
  11132. 'cvterm' => array(
  11133. 'table' => 'cvterm',
  11134. 'columns' => array(
  11135. 'datatype_id' => 'cvterm_id',
  11136. 'unittype_id' => 'cvterm_id',
  11137. ),
  11138. ),
  11139. 'protocol' => array(
  11140. 'table' => 'protocol',
  11141. 'columns' => array(
  11142. 'protocol_id' => 'protocol_id',
  11143. ),
  11144. ),
  11145. ),
  11146. 'table' => 'protocolparam',
  11147. 'referring_tables' => NULL,
  11148. );
  11149. return $description;
  11150. }
  11151. /**
  11152. * Implements hook_chado_schema_v1_2_pub()
  11153. * Purpose: To describe the structure of 'pub' to tripal
  11154. * @see chado_insert_record()
  11155. * @see chado_update_record()
  11156. * @see chado_select_record()
  11157. *
  11158. * @return
  11159. * An array describing the 'pub' table
  11160. *
  11161. * @ingroup tripal_chado_v1.2_schema_api
  11162. *
  11163. */
  11164. function tripal_chado_chado_schema_v1_2_pub() {
  11165. $description = array(
  11166. 'description' => '',
  11167. 'fields' => array(
  11168. 'pub_id' => array(
  11169. 'description' => '',
  11170. 'type' => 'serial',
  11171. 'not null' => TRUE,
  11172. ),
  11173. 'title' => array(
  11174. 'description' => '',
  11175. 'type' => 'text',
  11176. 'not null' => FALSE,
  11177. ),
  11178. 'volumetitle' => array(
  11179. 'description' => '',
  11180. 'type' => 'text',
  11181. 'not null' => FALSE,
  11182. ),
  11183. 'volume' => array(
  11184. 'description' => '',
  11185. 'type' => 'varchar',
  11186. 'length' => '255',
  11187. 'not null' => FALSE,
  11188. ),
  11189. 'series_name' => array(
  11190. 'description' => '',
  11191. 'type' => 'varchar',
  11192. 'length' => '255',
  11193. 'not null' => FALSE,
  11194. ),
  11195. 'issue' => array(
  11196. 'description' => '',
  11197. 'type' => 'varchar',
  11198. 'length' => '255',
  11199. 'not null' => FALSE,
  11200. ),
  11201. 'pyear' => array(
  11202. 'description' => '',
  11203. 'type' => 'varchar',
  11204. 'length' => '255',
  11205. 'not null' => FALSE,
  11206. ),
  11207. 'pages' => array(
  11208. 'description' => '',
  11209. 'type' => 'varchar',
  11210. 'length' => '255',
  11211. 'not null' => FALSE,
  11212. ),
  11213. 'miniref' => array(
  11214. 'description' => '',
  11215. 'type' => 'varchar',
  11216. 'length' => '255',
  11217. 'not null' => FALSE,
  11218. ),
  11219. 'uniquename' => array(
  11220. 'description' => '',
  11221. 'type' => 'text',
  11222. 'not null' => TRUE,
  11223. ),
  11224. 'type_id' => array(
  11225. 'description' => '',
  11226. 'type' => 'int',
  11227. 'not null' => TRUE,
  11228. ),
  11229. 'is_obsolete' => array(
  11230. 'description' => '',
  11231. 'type' => 'boolean',
  11232. 'not null' => FALSE,
  11233. 'default' => 'false',
  11234. ),
  11235. 'publisher' => array(
  11236. 'description' => '',
  11237. 'type' => 'varchar',
  11238. 'length' => '255',
  11239. 'not null' => FALSE,
  11240. ),
  11241. 'pubplace' => array(
  11242. 'description' => '',
  11243. 'type' => 'varchar',
  11244. 'length' => '255',
  11245. 'not null' => FALSE,
  11246. ),
  11247. ),
  11248. 'primary key' => array(
  11249. 0 => 'pub_id',
  11250. ),
  11251. 'unique keys' => array(
  11252. 'pub_c1' => array(
  11253. 0 => 'uniquename',
  11254. ),
  11255. ),
  11256. 'indexes' => array(
  11257. 'pub_idx1' => array(
  11258. 0 => 'type_id',
  11259. ),
  11260. ),
  11261. 'foreign keys' => array(
  11262. 'cvterm' => array(
  11263. 'table' => 'cvterm',
  11264. 'columns' => array(
  11265. 'type_id' => 'cvterm_id',
  11266. ),
  11267. ),
  11268. ),
  11269. 'table' => 'pub',
  11270. 'referring_tables' => array(
  11271. 0 => 'cell_line_cvterm',
  11272. 1 => 'cell_line_feature',
  11273. 2 => 'cell_line_library',
  11274. 3 => 'cell_line_pub',
  11275. 4 => 'cell_line_synonym',
  11276. 5 => 'cell_lineprop_pub',
  11277. 6 => 'expression_pub',
  11278. 7 => 'feature_cvterm',
  11279. 8 => 'feature_cvterm_pub',
  11280. 9 => 'feature_expression',
  11281. 10 => 'feature_pub',
  11282. 11 => 'feature_relationship_pub',
  11283. 12 => 'feature_relationshipprop_pub',
  11284. 13 => 'feature_synonym',
  11285. 14 => 'featureloc_pub',
  11286. 15 => 'featuremap_pub',
  11287. 16 => 'featureprop_pub',
  11288. 17 => 'library_cvterm',
  11289. 18 => 'library_pub',
  11290. 19 => 'library_synonym',
  11291. 20 => 'libraryprop_pub',
  11292. 21 => 'nd_experiment_pub',
  11293. 22 => 'phendesc',
  11294. 23 => 'phenotype_comparison',
  11295. 24 => 'phenotype_comparison_cvterm',
  11296. 25 => 'phenstatement',
  11297. 26 => 'phylonode_pub',
  11298. 27 => 'phylotree_pub',
  11299. 28 => 'project_pub',
  11300. 36 => 'protocol',
  11301. 37 => 'pub_dbxref',
  11302. 38 => 'pub_relationship',
  11303. 40 => 'pubauthor',
  11304. 41 => 'pubprop',
  11305. 42 => 'stock_cvterm',
  11306. 43 => 'stock_pub',
  11307. 44 => 'stock_relationship_cvterm',
  11308. 52 => 'stock_relationship_pub',
  11309. 53 => 'stockprop_pub',
  11310. 54 => 'study',
  11311. ),
  11312. );
  11313. return $description;
  11314. }
  11315. /**
  11316. * Implements hook_chado_schema_v1_2_pub_dbxref()
  11317. * Purpose: To describe the structure of 'pub_dbxref' to tripal
  11318. * @see chado_insert_record()
  11319. * @see chado_update_record()
  11320. * @see chado_select_record()
  11321. *
  11322. * @return
  11323. * An array describing the 'pub_dbxref' table
  11324. *
  11325. * @ingroup tripal_chado_v1.2_schema_api
  11326. *
  11327. */
  11328. function tripal_chado_chado_schema_v1_2_pub_dbxref() {
  11329. $description = array(
  11330. 'description' => '',
  11331. 'fields' => array(
  11332. 'pub_dbxref_id' => array(
  11333. 'description' => '',
  11334. 'type' => 'serial',
  11335. 'not null' => TRUE,
  11336. ),
  11337. 'pub_id' => array(
  11338. 'description' => '',
  11339. 'type' => 'int',
  11340. 'not null' => TRUE,
  11341. ),
  11342. 'dbxref_id' => array(
  11343. 'description' => '',
  11344. 'type' => 'int',
  11345. 'not null' => TRUE,
  11346. ),
  11347. 'is_current' => array(
  11348. 'description' => '',
  11349. 'type' => 'boolean',
  11350. 'not null' => TRUE,
  11351. 'default' => 'true',
  11352. ),
  11353. ),
  11354. 'primary key' => array(
  11355. 0 => 'pub_dbxref_id',
  11356. ),
  11357. 'unique keys' => array(
  11358. 'pub_dbxref_c1' => array(
  11359. 0 => 'pub_id',
  11360. 1 => 'dbxref_id',
  11361. ),
  11362. ),
  11363. 'indexes' => array(
  11364. 'pub_dbxref_idx1' => array(
  11365. 0 => 'pub_id',
  11366. ),
  11367. 'pub_dbxref_idx2' => array(
  11368. 0 => 'dbxref_id',
  11369. ),
  11370. ),
  11371. 'foreign keys' => array(
  11372. 'dbxref' => array(
  11373. 'table' => 'dbxref',
  11374. 'columns' => array(
  11375. 'dbxref_id' => 'dbxref_id',
  11376. ),
  11377. ),
  11378. 'pub' => array(
  11379. 'table' => 'pub',
  11380. 'columns' => array(
  11381. 'pub_id' => 'pub_id',
  11382. ),
  11383. ),
  11384. ),
  11385. 'table' => 'pub_dbxref',
  11386. 'referring_tables' => NULL,
  11387. );
  11388. return $description;
  11389. }
  11390. /**
  11391. * Implements hook_chado_schema_v1_2_pub_relationship()
  11392. * Purpose: To describe the structure of 'pub_relationship' to tripal
  11393. * @see chado_insert_record()
  11394. * @see chado_update_record()
  11395. * @see chado_select_record()
  11396. *
  11397. * @return
  11398. * An array describing the 'pub_relationship' table
  11399. *
  11400. * @ingroup tripal_chado_v1.2_schema_api
  11401. *
  11402. */
  11403. function tripal_chado_chado_schema_v1_2_pub_relationship() {
  11404. $description = array(
  11405. 'description' => '',
  11406. 'fields' => array(
  11407. 'pub_relationship_id' => array(
  11408. 'description' => '',
  11409. 'type' => 'serial',
  11410. 'not null' => TRUE,
  11411. ),
  11412. 'subject_id' => array(
  11413. 'description' => '',
  11414. 'type' => 'int',
  11415. 'not null' => TRUE,
  11416. ),
  11417. 'object_id' => array(
  11418. 'description' => '',
  11419. 'type' => 'int',
  11420. 'not null' => TRUE,
  11421. ),
  11422. 'type_id' => array(
  11423. 'description' => '',
  11424. 'type' => 'int',
  11425. 'not null' => TRUE,
  11426. ),
  11427. ),
  11428. 'primary key' => array(
  11429. 0 => 'pub_relationship_id',
  11430. ),
  11431. 'unique keys' => array(
  11432. 'pub_relationship_c1' => array(
  11433. 0 => 'subject_id',
  11434. 1 => 'object_id',
  11435. 2 => 'type_id',
  11436. ),
  11437. ),
  11438. 'indexes' => array(
  11439. 'pub_relationship_idx1' => array(
  11440. 0 => 'subject_id',
  11441. ),
  11442. 'pub_relationship_idx2' => array(
  11443. 0 => 'object_id',
  11444. ),
  11445. 'pub_relationship_idx3' => array(
  11446. 0 => 'type_id',
  11447. ),
  11448. ),
  11449. 'foreign keys' => array(
  11450. 'cvterm' => array(
  11451. 'table' => 'cvterm',
  11452. 'columns' => array(
  11453. 'type_id' => 'cvterm_id',
  11454. ),
  11455. ),
  11456. 'pub' => array(
  11457. 'table' => 'pub',
  11458. 'columns' => array(
  11459. 'subject_id' => 'pub_id',
  11460. 'object_id' => 'pub_id',
  11461. ),
  11462. ),
  11463. ),
  11464. 'table' => 'pub_relationship',
  11465. 'referring_tables' => NULL,
  11466. );
  11467. return $description;
  11468. }
  11469. /**
  11470. * Implements hook_chado_schema_v1_2_pubauthor()
  11471. * Purpose: To describe the structure of 'pubauthor' to tripal
  11472. * @see chado_insert_record()
  11473. * @see chado_update_record()
  11474. * @see chado_select_record()
  11475. *
  11476. * @return
  11477. * An array describing the 'pubauthor' table
  11478. *
  11479. * @ingroup tripal_chado_v1.2_schema_api
  11480. *
  11481. */
  11482. function tripal_chado_chado_schema_v1_2_pubauthor() {
  11483. $description = array(
  11484. 'description' => '',
  11485. 'fields' => array(
  11486. 'pubauthor_id' => array(
  11487. 'description' => '',
  11488. 'type' => 'serial',
  11489. 'not null' => TRUE,
  11490. ),
  11491. 'pub_id' => array(
  11492. 'description' => '',
  11493. 'type' => 'int',
  11494. 'not null' => TRUE,
  11495. ),
  11496. 'rank' => array(
  11497. 'description' => '',
  11498. 'type' => 'int',
  11499. 'not null' => TRUE,
  11500. ),
  11501. 'editor' => array(
  11502. 'description' => '',
  11503. 'type' => 'boolean',
  11504. 'not null' => FALSE,
  11505. 'default' => 'false',
  11506. ),
  11507. 'surname' => array(
  11508. 'description' => '',
  11509. 'type' => 'varchar',
  11510. 'length' => '100',
  11511. 'not null' => TRUE,
  11512. ),
  11513. 'givennames' => array(
  11514. 'description' => '',
  11515. 'type' => 'varchar',
  11516. 'length' => '100',
  11517. 'not null' => FALSE,
  11518. ),
  11519. 'suffix' => array(
  11520. 'description' => '',
  11521. 'type' => 'varchar',
  11522. 'length' => '100',
  11523. 'not null' => FALSE,
  11524. ),
  11525. ),
  11526. 'primary key' => array(
  11527. 0 => 'pubauthor_id',
  11528. ),
  11529. 'unique keys' => array(
  11530. 'pubauthor_c1' => array(
  11531. 0 => 'pub_id',
  11532. 1 => 'rank',
  11533. ),
  11534. ),
  11535. 'indexes' => array(
  11536. 'pubauthor_idx2' => array(
  11537. 0 => 'pub_id',
  11538. ),
  11539. ),
  11540. 'foreign keys' => array(
  11541. 'pub' => array(
  11542. 'table' => 'pub',
  11543. 'columns' => array(
  11544. 'pub_id' => 'pub_id',
  11545. ),
  11546. ),
  11547. ),
  11548. 'table' => 'pubauthor',
  11549. 'referring_tables' => NULL,
  11550. );
  11551. return $description;
  11552. }
  11553. /**
  11554. * Implements hook_chado_schema_v1_2_pubprop()
  11555. * Purpose: To describe the structure of 'pubprop' to tripal
  11556. * @see chado_insert_record()
  11557. * @see chado_update_record()
  11558. * @see chado_select_record()
  11559. *
  11560. * @return
  11561. * An array describing the 'pubprop' table
  11562. *
  11563. * @ingroup tripal_chado_v1.2_schema_api
  11564. *
  11565. */
  11566. function tripal_chado_chado_schema_v1_2_pubprop() {
  11567. $description = array(
  11568. 'description' => '',
  11569. 'fields' => array(
  11570. 'pubprop_id' => array(
  11571. 'description' => '',
  11572. 'type' => 'serial',
  11573. 'not null' => TRUE,
  11574. ),
  11575. 'pub_id' => array(
  11576. 'description' => '',
  11577. 'type' => 'int',
  11578. 'not null' => TRUE,
  11579. ),
  11580. 'type_id' => array(
  11581. 'description' => '',
  11582. 'type' => 'int',
  11583. 'not null' => TRUE,
  11584. ),
  11585. 'value' => array(
  11586. 'description' => '',
  11587. 'type' => 'text',
  11588. 'not null' => TRUE,
  11589. ),
  11590. 'rank' => array(
  11591. 'description' => '',
  11592. 'type' => 'int',
  11593. 'not null' => FALSE,
  11594. ),
  11595. ),
  11596. 'primary key' => array(
  11597. 0 => 'pubprop_id',
  11598. ),
  11599. 'unique keys' => array(
  11600. 'pubprop_c1' => array(
  11601. 0 => 'pub_id',
  11602. 1 => 'type_id',
  11603. 2 => 'rank',
  11604. ),
  11605. ),
  11606. 'indexes' => array(
  11607. 'pubprop_idx1' => array(
  11608. 0 => 'pub_id',
  11609. ),
  11610. 'pubprop_idx2' => array(
  11611. 0 => 'type_id',
  11612. ),
  11613. ),
  11614. 'foreign keys' => array(
  11615. 'cvterm' => array(
  11616. 'table' => 'cvterm',
  11617. 'columns' => array(
  11618. 'type_id' => 'cvterm_id',
  11619. ),
  11620. ),
  11621. 'pub' => array(
  11622. 'table' => 'pub',
  11623. 'columns' => array(
  11624. 'pub_id' => 'pub_id',
  11625. ),
  11626. ),
  11627. ),
  11628. 'table' => 'pubprop',
  11629. 'referring_tables' => NULL,
  11630. );
  11631. return $description;
  11632. }
  11633. /**
  11634. * Implements hook_chado_schema_v1_2_quantification()
  11635. * Purpose: To describe the structure of 'quantification' to tripal
  11636. * @see chado_insert_record()
  11637. * @see chado_update_record()
  11638. * @see chado_select_record()
  11639. *
  11640. * @return
  11641. * An array describing the 'quantification' table
  11642. *
  11643. * @ingroup tripal_chado_v1.2_schema_api
  11644. *
  11645. */
  11646. function tripal_chado_chado_schema_v1_2_quantification() {
  11647. $description = array(
  11648. 'description' => '',
  11649. 'fields' => array(
  11650. 'quantification_id' => array(
  11651. 'description' => '',
  11652. 'type' => 'serial',
  11653. 'not null' => TRUE,
  11654. ),
  11655. 'acquisition_id' => array(
  11656. 'description' => '',
  11657. 'type' => 'int',
  11658. 'not null' => TRUE,
  11659. ),
  11660. 'operator_id' => array(
  11661. 'description' => '',
  11662. 'type' => 'int',
  11663. 'not null' => FALSE,
  11664. ),
  11665. 'protocol_id' => array(
  11666. 'description' => '',
  11667. 'type' => 'int',
  11668. 'not null' => FALSE,
  11669. ),
  11670. 'analysis_id' => array(
  11671. 'description' => '',
  11672. 'type' => 'int',
  11673. 'not null' => TRUE,
  11674. ),
  11675. 'quantificationdate' => array(
  11676. 'description' => '',
  11677. 'type' => 'datetime',
  11678. 'not null' => FALSE,
  11679. 'default' => 'now()',
  11680. ),
  11681. 'name' => array(
  11682. 'description' => '',
  11683. 'type' => 'text',
  11684. 'not null' => FALSE,
  11685. ),
  11686. 'uri' => array(
  11687. 'description' => '',
  11688. 'type' => 'text',
  11689. 'not null' => FALSE,
  11690. ),
  11691. ),
  11692. 'primary key' => array(
  11693. 0 => 'quantification_id',
  11694. ),
  11695. 'unique keys' => array(
  11696. 'quantification_c1' => array(
  11697. 0 => 'name',
  11698. 1 => 'analysis_id',
  11699. ),
  11700. ),
  11701. 'indexes' => array(
  11702. 'quantification_idx1' => array(
  11703. 0 => 'acquisition_id',
  11704. ),
  11705. 'quantification_idx2' => array(
  11706. 0 => 'operator_id',
  11707. ),
  11708. 'quantification_idx3' => array(
  11709. 0 => 'protocol_id',
  11710. ),
  11711. 'quantification_idx4' => array(
  11712. 0 => 'analysis_id',
  11713. ),
  11714. ),
  11715. 'foreign keys' => array(
  11716. 'analysis' => array(
  11717. 'table' => 'analysis',
  11718. 'columns' => array(
  11719. 'analysis_id' => 'analysis_id',
  11720. ),
  11721. ),
  11722. 'contact' => array(
  11723. 'table' => 'contact',
  11724. 'columns' => array(
  11725. 'operator_id' => 'contact_id',
  11726. ),
  11727. ),
  11728. 'protocol' => array(
  11729. 'table' => 'protocol',
  11730. 'columns' => array(
  11731. 'protocol_id' => 'protocol_id',
  11732. ),
  11733. ),
  11734. 'acquisition' => array(
  11735. 'table' => 'acquisition',
  11736. 'columns' => array(
  11737. 'acquisition_id' => 'acquisition_id',
  11738. ),
  11739. ),
  11740. ),
  11741. 'table' => 'quantification',
  11742. 'referring_tables' => array(
  11743. 0 => 'elementresult',
  11744. 1 => 'quantification_relationship',
  11745. 3 => 'quantificationprop',
  11746. ),
  11747. );
  11748. return $description;
  11749. }
  11750. /**
  11751. * Implements hook_chado_schema_v1_2_quantification_relationship()
  11752. * Purpose: To describe the structure of 'quantification_relationship' to tripal
  11753. * @see chado_insert_record()
  11754. * @see chado_update_record()
  11755. * @see chado_select_record()
  11756. *
  11757. * @return
  11758. * An array describing the 'quantification_relationship' table
  11759. *
  11760. * @ingroup tripal_chado_v1.2_schema_api
  11761. *
  11762. */
  11763. function tripal_chado_chado_schema_v1_2_quantification_relationship() {
  11764. $description = array(
  11765. 'description' => '',
  11766. 'fields' => array(
  11767. 'quantification_relationship_id' => array(
  11768. 'description' => '',
  11769. 'type' => 'serial',
  11770. 'not null' => TRUE,
  11771. ),
  11772. 'subject_id' => array(
  11773. 'description' => '',
  11774. 'type' => 'int',
  11775. 'not null' => TRUE,
  11776. ),
  11777. 'type_id' => array(
  11778. 'description' => '',
  11779. 'type' => 'int',
  11780. 'not null' => TRUE,
  11781. ),
  11782. 'object_id' => array(
  11783. 'description' => '',
  11784. 'type' => 'int',
  11785. 'not null' => TRUE,
  11786. ),
  11787. ),
  11788. 'primary key' => array(
  11789. 0 => 'quantification_relationship_id',
  11790. ),
  11791. 'unique keys' => array(
  11792. 'quantification_relationship_c1' => array(
  11793. 0 => 'subject_id',
  11794. 1 => 'object_id',
  11795. 2 => 'type_id',
  11796. ),
  11797. ),
  11798. 'indexes' => array(
  11799. 'quantification_relationship_idx1' => array(
  11800. 0 => 'subject_id',
  11801. ),
  11802. 'quantification_relationship_idx2' => array(
  11803. 0 => 'type_id',
  11804. ),
  11805. 'quantification_relationship_idx3' => array(
  11806. 0 => 'object_id',
  11807. ),
  11808. ),
  11809. 'foreign keys' => array(
  11810. 'cvterm' => array(
  11811. 'table' => 'cvterm',
  11812. 'columns' => array(
  11813. 'type_id' => 'cvterm_id',
  11814. ),
  11815. ),
  11816. 'quantification' => array(
  11817. 'table' => 'quantification',
  11818. 'columns' => array(
  11819. 'subject_id' => 'quantification_id',
  11820. 'object_id' => 'quantification_id',
  11821. ),
  11822. ),
  11823. ),
  11824. 'table' => 'quantification_relationship',
  11825. 'referring_tables' => NULL,
  11826. );
  11827. return $description;
  11828. }
  11829. /**
  11830. * Implements hook_chado_schema_v1_2_quantificationprop()
  11831. * Purpose: To describe the structure of 'quantificationprop' to tripal
  11832. * @see chado_insert_record()
  11833. * @see chado_update_record()
  11834. * @see chado_select_record()
  11835. *
  11836. * @return
  11837. * An array describing the 'quantificationprop' table
  11838. *
  11839. * @ingroup tripal_chado_v1.2_schema_api
  11840. *
  11841. */
  11842. function tripal_chado_chado_schema_v1_2_quantificationprop() {
  11843. $description = array(
  11844. 'description' => '',
  11845. 'fields' => array(
  11846. 'quantificationprop_id' => array(
  11847. 'description' => '',
  11848. 'type' => 'serial',
  11849. 'not null' => TRUE,
  11850. ),
  11851. 'quantification_id' => array(
  11852. 'description' => '',
  11853. 'type' => 'int',
  11854. 'not null' => TRUE,
  11855. ),
  11856. 'type_id' => array(
  11857. 'description' => '',
  11858. 'type' => 'int',
  11859. 'not null' => TRUE,
  11860. ),
  11861. 'value' => array(
  11862. 'description' => '',
  11863. 'type' => 'text',
  11864. 'not null' => FALSE,
  11865. ),
  11866. 'rank' => array(
  11867. 'description' => '',
  11868. 'type' => 'int',
  11869. 'not null' => TRUE,
  11870. 'default' => 0,
  11871. ),
  11872. ),
  11873. 'primary key' => array(
  11874. 0 => 'quantificationprop_id',
  11875. ),
  11876. 'unique keys' => array(
  11877. 'quantificationprop_c1' => array(
  11878. 0 => 'quantification_id',
  11879. 1 => 'type_id',
  11880. 2 => 'rank',
  11881. ),
  11882. ),
  11883. 'indexes' => array(
  11884. 'quantificationprop_idx1' => array(
  11885. 0 => 'quantification_id',
  11886. ),
  11887. 'quantificationprop_idx2' => array(
  11888. 0 => 'type_id',
  11889. ),
  11890. ),
  11891. 'foreign keys' => array(
  11892. 'cvterm' => array(
  11893. 'table' => 'cvterm',
  11894. 'columns' => array(
  11895. 'type_id' => 'cvterm_id',
  11896. ),
  11897. ),
  11898. 'quantification' => array(
  11899. 'table' => 'quantification',
  11900. 'columns' => array(
  11901. 'quantification_id' => 'quantification_id',
  11902. ),
  11903. ),
  11904. ),
  11905. 'table' => 'quantificationprop',
  11906. 'referring_tables' => NULL,
  11907. );
  11908. return $description;
  11909. }
  11910. /**
  11911. * Implements hook_chado_schema_v1_2_stock()
  11912. * Purpose: To describe the structure of 'stock' to tripal
  11913. * @see chado_insert_record()
  11914. * @see chado_update_record()
  11915. * @see chado_select_record()
  11916. *
  11917. * @return
  11918. * An array describing the 'stock' table
  11919. *
  11920. * @ingroup tripal_chado_v1.2_schema_api
  11921. *
  11922. */
  11923. function tripal_chado_chado_schema_v1_2_stock() {
  11924. $description = array(
  11925. '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.',
  11926. 'fields' => array(
  11927. 'stock_id' => array(
  11928. 'description' => '',
  11929. 'type' => 'serial',
  11930. 'not null' => TRUE,
  11931. ),
  11932. 'dbxref_id' => array(
  11933. 'description' => '',
  11934. 'type' => 'int',
  11935. 'not null' => FALSE,
  11936. ),
  11937. 'organism_id' => array(
  11938. 'description' => '',
  11939. 'type' => 'int',
  11940. 'not null' => FALSE,
  11941. ),
  11942. 'name' => array(
  11943. 'description' => '',
  11944. 'type' => 'varchar',
  11945. 'length' => '255',
  11946. 'not null' => FALSE,
  11947. ),
  11948. 'uniquename' => array(
  11949. 'description' => '',
  11950. 'type' => 'text',
  11951. 'not null' => TRUE,
  11952. ),
  11953. 'description' => array(
  11954. 'description' => '',
  11955. 'type' => 'text',
  11956. 'not null' => FALSE,
  11957. ),
  11958. 'type_id' => array(
  11959. 'description' => '',
  11960. 'type' => 'int',
  11961. 'not null' => TRUE,
  11962. ),
  11963. 'is_obsolete' => array(
  11964. 'description' => '',
  11965. 'type' => 'boolean',
  11966. 'not null' => TRUE,
  11967. 'default' => 'false',
  11968. ),
  11969. ),
  11970. 'primary key' => array(
  11971. 0 => 'stock_id',
  11972. ),
  11973. 'unique keys' => array(
  11974. 'stock_c1' => array(
  11975. 0 => 'organism_id',
  11976. 1 => 'uniquename',
  11977. 2 => 'type_id',
  11978. ),
  11979. ),
  11980. 'indexes' => array(
  11981. 'stock_idx1' => array(
  11982. 0 => 'dbxref_id',
  11983. ),
  11984. 'stock_idx2' => array(
  11985. 0 => 'organism_id',
  11986. ),
  11987. 'stock_idx3' => array(
  11988. 0 => 'type_id',
  11989. ),
  11990. 'stock_idx4' => array(
  11991. 0 => 'uniquename',
  11992. ),
  11993. 'stock_name_ind1' => array(
  11994. 0 => 'name',
  11995. ),
  11996. ),
  11997. 'foreign keys' => array(
  11998. 'organism' => array(
  11999. 'table' => 'organism',
  12000. 'columns' => array(
  12001. 'organism_id' => 'organism_id',
  12002. ),
  12003. ),
  12004. 'cvterm' => array(
  12005. 'table' => 'cvterm',
  12006. 'columns' => array(
  12007. 'type_id' => 'cvterm_id',
  12008. ),
  12009. ),
  12010. 'dbxref' => array(
  12011. 'table' => 'dbxref',
  12012. 'columns' => array(
  12013. 'dbxref_id' => 'dbxref_id',
  12014. ),
  12015. ),
  12016. ),
  12017. 'referring_tables' => array(
  12018. 0 => 'nd_experiment_stock',
  12019. 1 => 'stock_cvterm',
  12020. 2 => 'stock_dbxref',
  12021. 3 => 'stock_genotype',
  12022. 4 => 'stock_pub',
  12023. 5 => 'stock_relationship',
  12024. 7 => 'stockcollection_stock',
  12025. 8 => 'stockprop',
  12026. ),
  12027. 'table' => 'stock',
  12028. );
  12029. return $description;
  12030. }
  12031. /**
  12032. * Implements hook_chado_schema_v1_2_stock_cvterm()
  12033. * Purpose: To describe the structure of 'stock_cvterm' to tripal
  12034. * @see chado_insert_record()
  12035. * @see chado_update_record()
  12036. * @see chado_select_record()
  12037. *
  12038. * @return
  12039. * An array describing the 'stock_cvterm' table
  12040. *
  12041. * @ingroup tripal_chado_v1.2_schema_api
  12042. *
  12043. */
  12044. function tripal_chado_chado_schema_v1_2_stock_cvterm() {
  12045. $description = array(
  12046. 'description' => '',
  12047. 'fields' => array(
  12048. 'stock_cvterm_id' => array(
  12049. 'description' => '',
  12050. 'type' => 'serial',
  12051. 'not null' => TRUE,
  12052. ),
  12053. 'stock_id' => array(
  12054. 'description' => '',
  12055. 'type' => 'int',
  12056. 'not null' => TRUE,
  12057. ),
  12058. 'cvterm_id' => array(
  12059. 'description' => '',
  12060. 'type' => 'int',
  12061. 'not null' => TRUE,
  12062. ),
  12063. 'pub_id' => array(
  12064. 'description' => '',
  12065. 'type' => 'int',
  12066. 'not null' => TRUE,
  12067. ),
  12068. 'is_not' => array(
  12069. 'description' => '',
  12070. 'type' => 'boolean',
  12071. 'not null' => TRUE,
  12072. 'default' => 'false',
  12073. ),
  12074. 'rank' => array(
  12075. 'description' => '',
  12076. 'type' => 'int',
  12077. 'not null' => TRUE,
  12078. 'default' => 0,
  12079. ),
  12080. ),
  12081. 'primary key' => array(
  12082. 0 => 'stock_cvterm_id',
  12083. ),
  12084. 'unique keys' => array(
  12085. 'stock_cvterm_c1' => array(
  12086. 0 => 'stock_id',
  12087. 1 => 'cvterm_id',
  12088. 2 => 'pub_id',
  12089. 3 => 'rank',
  12090. ),
  12091. ),
  12092. 'indexes' => array(
  12093. 'stock_cvterm_idx1' => array(
  12094. 0 => 'stock_id',
  12095. ),
  12096. 'stock_cvterm_idx2' => array(
  12097. 0 => 'cvterm_id',
  12098. ),
  12099. 'stock_cvterm_idx3' => array(
  12100. 0 => 'pub_id',
  12101. ),
  12102. ),
  12103. 'foreign keys' => array(
  12104. 'cvterm' => array(
  12105. 'table' => 'cvterm',
  12106. 'columns' => array(
  12107. 'cvterm_id' => 'cvterm_id',
  12108. ),
  12109. ),
  12110. 'pub' => array(
  12111. 'table' => 'pub',
  12112. 'columns' => array(
  12113. 'pub_id' => 'pub_id',
  12114. ),
  12115. ),
  12116. 'stock' => array(
  12117. 'table' => 'stock',
  12118. 'columns' => array(
  12119. 'stock_id' => 'stock_id',
  12120. ),
  12121. ),
  12122. ),
  12123. 'table' => 'stock_cvterm',
  12124. 'referring_tables' => array(
  12125. 0 => 'stock_cvtermprop',
  12126. ),
  12127. );
  12128. return $description;
  12129. }
  12130. /**
  12131. * Implements hook_chado_schema_v1_2_stock_cvtermprop()
  12132. * Purpose: To describe the structure of 'stock_cvtermprop' to tripal
  12133. * @see chado_insert_record()
  12134. * @see chado_update_record()
  12135. * @see chado_select_record()
  12136. *
  12137. * @return
  12138. * An array describing the 'stock_cvtermprop' table
  12139. *
  12140. * @ingroup tripal_chado_v1.2_schema_api
  12141. *
  12142. */
  12143. function tripal_chado_chado_schema_v1_2_stock_cvtermprop() {
  12144. $description = array(
  12145. 'description' => '',
  12146. 'fields' => array(
  12147. 'stock_cvtermprop_id' => array(
  12148. 'description' => '',
  12149. 'type' => 'serial',
  12150. 'not null' => TRUE,
  12151. ),
  12152. 'stock_cvterm_id' => array(
  12153. 'description' => '',
  12154. 'type' => 'int',
  12155. 'not null' => TRUE,
  12156. ),
  12157. 'type_id' => array(
  12158. 'description' => '',
  12159. 'type' => 'int',
  12160. 'not null' => TRUE,
  12161. ),
  12162. 'value' => array(
  12163. 'description' => '',
  12164. 'type' => 'text',
  12165. 'not null' => FALSE,
  12166. ),
  12167. 'rank' => array(
  12168. 'description' => '',
  12169. 'type' => 'int',
  12170. 'not null' => TRUE,
  12171. 'default' => 0,
  12172. ),
  12173. ),
  12174. 'primary key' => array(
  12175. 0 => 'stock_cvtermprop_id',
  12176. ),
  12177. 'unique keys' => array(
  12178. 'stock_cvtermprop_c1' => array(
  12179. 0 => 'stock_cvterm_id',
  12180. 1 => 'type_id',
  12181. 2 => 'rank',
  12182. ),
  12183. ),
  12184. 'indexes' => array(
  12185. 'stock_cvtermprop_idx1' => array(
  12186. 0 => 'stock_cvterm_id',
  12187. ),
  12188. 'stock_cvtermprop_idx2' => array(
  12189. 0 => 'type_id',
  12190. ),
  12191. ),
  12192. 'foreign keys' => array(
  12193. 'cvterm' => array(
  12194. 'table' => 'cvterm',
  12195. 'columns' => array(
  12196. 'type_id' => 'cvterm_id',
  12197. ),
  12198. ),
  12199. 'stock_cvterm' => array(
  12200. 'table' => 'stock_cvterm',
  12201. 'columns' => array(
  12202. 'stock_cvterm_id' => 'stock_cvterm_id',
  12203. ),
  12204. ),
  12205. ),
  12206. 'table' => 'stock_cvtermprop',
  12207. 'referring_tables' => NULL,
  12208. );
  12209. return $description;
  12210. }
  12211. /**
  12212. * Implements hook_chado_schema_v1_2_stock_dbxref()
  12213. * Purpose: To describe the structure of 'stock_dbxref' to tripal
  12214. * @see chado_insert_record()
  12215. * @see chado_update_record()
  12216. * @see chado_select_record()
  12217. *
  12218. * @return
  12219. * An array describing the 'stock_dbxref' table
  12220. *
  12221. * @ingroup tripal_chado_v1.2_schema_api
  12222. *
  12223. */
  12224. function tripal_chado_chado_schema_v1_2_stock_dbxref() {
  12225. $description = array(
  12226. 'description' => '',
  12227. 'fields' => array(
  12228. 'stock_dbxref_id' => array(
  12229. 'description' => '',
  12230. 'type' => 'serial',
  12231. 'not null' => TRUE,
  12232. ),
  12233. 'stock_id' => array(
  12234. 'description' => '',
  12235. 'type' => 'int',
  12236. 'not null' => TRUE,
  12237. ),
  12238. 'dbxref_id' => array(
  12239. 'description' => '',
  12240. 'type' => 'int',
  12241. 'not null' => TRUE,
  12242. ),
  12243. 'is_current' => array(
  12244. 'description' => '',
  12245. 'type' => 'boolean',
  12246. 'not null' => TRUE,
  12247. 'default' => 'true',
  12248. ),
  12249. ),
  12250. 'primary key' => array(
  12251. 0 => 'stock_dbxref_id',
  12252. ),
  12253. 'unique keys' => array(
  12254. 'stock_dbxref_c1' => array(
  12255. 0 => 'stock_id',
  12256. 1 => 'dbxref_id',
  12257. ),
  12258. ),
  12259. 'indexes' => array(
  12260. 'stock_dbxref_idx1' => array(
  12261. 0 => 'stock_id',
  12262. ),
  12263. 'stock_dbxref_idx2' => array(
  12264. 0 => 'dbxref_id',
  12265. ),
  12266. ),
  12267. 'foreign keys' => array(
  12268. 'dbxref' => array(
  12269. 'table' => 'dbxref',
  12270. 'columns' => array(
  12271. 'dbxref_id' => 'dbxref_id',
  12272. ),
  12273. ),
  12274. 'stock' => array(
  12275. 'table' => 'stock',
  12276. 'columns' => array(
  12277. 'stock_id' => 'stock_id',
  12278. ),
  12279. ),
  12280. ),
  12281. 'table' => 'stock_dbxref',
  12282. 'referring_tables' => array(
  12283. 0 => 'stock_dbxrefprop',
  12284. ),
  12285. );
  12286. return $description;
  12287. }
  12288. /**
  12289. * Implements hook_chado_schema_v1_2_stock_dbxrefprop()
  12290. * Purpose: To describe the structure of 'stock_dbxrefprop' to tripal
  12291. * @see chado_insert_record()
  12292. * @see chado_update_record()
  12293. * @see chado_select_record()
  12294. *
  12295. * @return
  12296. * An array describing the 'stock_dbxrefprop' table
  12297. *
  12298. * @ingroup tripal_chado_v1.2_schema_api
  12299. *
  12300. */
  12301. function tripal_chado_chado_schema_v1_2_stock_dbxrefprop() {
  12302. $description = array(
  12303. 'description' => '',
  12304. 'fields' => array(
  12305. 'stock_dbxrefprop_id' => array(
  12306. 'description' => '',
  12307. 'type' => 'serial',
  12308. 'not null' => TRUE,
  12309. ),
  12310. 'stock_dbxref_id' => array(
  12311. 'description' => '',
  12312. 'type' => 'int',
  12313. 'not null' => TRUE,
  12314. ),
  12315. 'type_id' => array(
  12316. 'description' => '',
  12317. 'type' => 'int',
  12318. 'not null' => TRUE,
  12319. ),
  12320. 'value' => array(
  12321. 'description' => '',
  12322. 'type' => 'text',
  12323. 'not null' => FALSE,
  12324. ),
  12325. 'rank' => array(
  12326. 'description' => '',
  12327. 'type' => 'int',
  12328. 'not null' => TRUE,
  12329. 'default' => 0,
  12330. ),
  12331. ),
  12332. 'primary key' => array(
  12333. 0 => 'stock_dbxrefprop_id',
  12334. ),
  12335. 'unique keys' => array(
  12336. 'stock_dbxrefprop_c1' => array(
  12337. 0 => 'stock_dbxref_id',
  12338. 1 => 'type_id',
  12339. 2 => 'rank',
  12340. ),
  12341. ),
  12342. 'indexes' => array(
  12343. 'stock_dbxrefprop_idx1' => array(
  12344. 0 => 'stock_dbxref_id',
  12345. ),
  12346. 'stock_dbxrefprop_idx2' => array(
  12347. 0 => 'type_id',
  12348. ),
  12349. ),
  12350. 'foreign keys' => array(
  12351. 'cvterm' => array(
  12352. 'table' => 'cvterm',
  12353. 'columns' => array(
  12354. 'type_id' => 'cvterm_id',
  12355. ),
  12356. ),
  12357. 'stock_dbxref' => array(
  12358. 'table' => 'stock_dbxref',
  12359. 'columns' => array(
  12360. 'stock_dbxref_id' => 'stock_dbxref_id',
  12361. ),
  12362. ),
  12363. ),
  12364. 'table' => 'stock_dbxrefprop',
  12365. 'referring_tables' => NULL,
  12366. );
  12367. return $description;
  12368. }
  12369. /**
  12370. * Implements hook_chado_schema_v1_2_stock_genotype()
  12371. * Purpose: To describe the structure of 'stock_genotype' to tripal
  12372. * @see chado_insert_record()
  12373. * @see chado_update_record()
  12374. * @see chado_select_record()
  12375. *
  12376. * @return
  12377. * An array describing the 'stock_genotype' table
  12378. *
  12379. * @ingroup tripal_chado_v1.2_schema_api
  12380. *
  12381. */
  12382. function tripal_chado_chado_schema_v1_2_stock_genotype() {
  12383. $description = array(
  12384. 'description' => '',
  12385. 'fields' => array(
  12386. 'stock_genotype_id' => array(
  12387. 'description' => '',
  12388. 'type' => 'serial',
  12389. 'not null' => TRUE,
  12390. ),
  12391. 'stock_id' => array(
  12392. 'description' => '',
  12393. 'type' => 'int',
  12394. 'not null' => TRUE,
  12395. ),
  12396. 'genotype_id' => array(
  12397. 'description' => '',
  12398. 'type' => 'int',
  12399. 'not null' => TRUE,
  12400. ),
  12401. ),
  12402. 'primary key' => array(
  12403. 0 => 'stock_genotype_id',
  12404. ),
  12405. 'unique keys' => array(
  12406. 'stock_genotype_c1' => array(
  12407. 0 => 'stock_id',
  12408. 1 => 'genotype_id',
  12409. ),
  12410. ),
  12411. 'indexes' => array(
  12412. 'stock_genotype_idx1' => array(
  12413. 0 => 'stock_id',
  12414. ),
  12415. 'stock_genotype_idx2' => array(
  12416. 0 => 'genotype_id',
  12417. ),
  12418. ),
  12419. 'foreign keys' => array(
  12420. 'genotype' => array(
  12421. 'table' => 'genotype',
  12422. 'columns' => array(
  12423. 'genotype_id' => 'genotype_id',
  12424. ),
  12425. ),
  12426. 'stock' => array(
  12427. 'table' => 'stock',
  12428. 'columns' => array(
  12429. 'stock_id' => 'stock_id',
  12430. ),
  12431. ),
  12432. ),
  12433. 'table' => 'stock_genotype',
  12434. 'referring_tables' => NULL,
  12435. );
  12436. return $description;
  12437. }
  12438. /**
  12439. * Implements hook_chado_schema_v1_2_stock_pub()
  12440. * Purpose: To describe the structure of 'stock_pub' to tripal
  12441. * @see chado_insert_record()
  12442. * @see chado_update_record()
  12443. * @see chado_select_record()
  12444. *
  12445. * @return
  12446. * An array describing the 'stock_pub' table
  12447. *
  12448. * @ingroup tripal_chado_v1.2_schema_api
  12449. *
  12450. */
  12451. function tripal_chado_chado_schema_v1_2_stock_pub() {
  12452. $description = array(
  12453. 'description' => '',
  12454. 'fields' => array(
  12455. 'stock_pub_id' => array(
  12456. 'description' => '',
  12457. 'type' => 'serial',
  12458. 'not null' => TRUE,
  12459. ),
  12460. 'stock_id' => array(
  12461. 'description' => '',
  12462. 'type' => 'int',
  12463. 'not null' => TRUE,
  12464. ),
  12465. 'pub_id' => array(
  12466. 'description' => '',
  12467. 'type' => 'int',
  12468. 'not null' => TRUE,
  12469. ),
  12470. ),
  12471. 'primary key' => array(
  12472. 0 => 'stock_pub_id',
  12473. ),
  12474. 'unique keys' => array(
  12475. 'stock_pub_c1' => array(
  12476. 0 => 'stock_id',
  12477. 1 => 'pub_id',
  12478. ),
  12479. ),
  12480. 'indexes' => array(
  12481. 'stock_pub_idx1' => array(
  12482. 0 => 'stock_id',
  12483. ),
  12484. 'stock_pub_idx2' => array(
  12485. 0 => 'pub_id',
  12486. ),
  12487. ),
  12488. 'foreign keys' => array(
  12489. 'pub' => array(
  12490. 'table' => 'pub',
  12491. 'columns' => array(
  12492. 'pub_id' => 'pub_id',
  12493. ),
  12494. ),
  12495. 'stock' => array(
  12496. 'table' => 'stock',
  12497. 'columns' => array(
  12498. 'stock_id' => 'stock_id',
  12499. ),
  12500. ),
  12501. ),
  12502. 'table' => 'stock_pub',
  12503. 'referring_tables' => NULL,
  12504. );
  12505. return $description;
  12506. }
  12507. /**
  12508. * Implements hook_chado_schema_v1_2_stock_relationship()
  12509. * Purpose: To describe the structure of 'stock_relationship' to tripal
  12510. * @see chado_insert_record()
  12511. * @see chado_update_record()
  12512. * @see chado_select_record()
  12513. *
  12514. * @return
  12515. * An array describing the 'stock_relationship' table
  12516. *
  12517. * @ingroup tripal_chado_v1.2_schema_api
  12518. *
  12519. */
  12520. function tripal_chado_chado_schema_v1_2_stock_relationship() {
  12521. $description = array(
  12522. 'description' => '',
  12523. 'fields' => array(
  12524. 'stock_relationship_id' => array(
  12525. 'description' => '',
  12526. 'type' => 'serial',
  12527. 'not null' => TRUE,
  12528. ),
  12529. 'subject_id' => array(
  12530. 'description' => '',
  12531. 'type' => 'int',
  12532. 'not null' => TRUE,
  12533. ),
  12534. 'object_id' => array(
  12535. 'description' => '',
  12536. 'type' => 'int',
  12537. 'not null' => TRUE,
  12538. ),
  12539. 'type_id' => array(
  12540. 'description' => '',
  12541. 'type' => 'int',
  12542. 'not null' => TRUE,
  12543. ),
  12544. 'value' => array(
  12545. 'description' => '',
  12546. 'type' => 'text',
  12547. 'not null' => FALSE,
  12548. ),
  12549. 'rank' => array(
  12550. 'description' => '',
  12551. 'type' => 'int',
  12552. 'not null' => TRUE,
  12553. 'default' => 0,
  12554. ),
  12555. ),
  12556. 'primary key' => array(
  12557. 0 => 'stock_relationship_id',
  12558. ),
  12559. 'unique keys' => array(
  12560. 'stock_relationship_c1' => array(
  12561. 0 => 'subject_id',
  12562. 1 => 'object_id',
  12563. 2 => 'type_id',
  12564. 3 => 'rank',
  12565. ),
  12566. ),
  12567. 'indexes' => array(
  12568. 'stock_relationship_idx1' => array(
  12569. 0 => 'subject_id',
  12570. ),
  12571. 'stock_relationship_idx2' => array(
  12572. 0 => 'object_id',
  12573. ),
  12574. 'stock_relationship_idx3' => array(
  12575. 0 => 'type_id',
  12576. ),
  12577. ),
  12578. 'foreign keys' => array(
  12579. 'cvterm' => array(
  12580. 'table' => 'cvterm',
  12581. 'columns' => array(
  12582. 'type_id' => 'cvterm_id',
  12583. ),
  12584. ),
  12585. 'stock' => array(
  12586. 'table' => 'stock',
  12587. 'columns' => array(
  12588. 'subject_id' => 'stock_id',
  12589. 'object_id' => 'stock_id',
  12590. ),
  12591. ),
  12592. ),
  12593. 'table' => 'stock_relationship',
  12594. 'referring_tables' => array(
  12595. 0 => 'stock_relationship_cvterm',
  12596. 8 => 'stock_relationship_pub',
  12597. ),
  12598. );
  12599. return $description;
  12600. }
  12601. /**
  12602. * Implements hook_chado_schema_v1_2_stock_relationship_cvterm()
  12603. * Purpose: To describe the structure of 'stock_relationship_cvterm' to tripal
  12604. * @see chado_insert_record()
  12605. * @see chado_update_record()
  12606. * @see chado_select_record()
  12607. *
  12608. * @return
  12609. * An array describing the 'stock_relationship_cvterm' table
  12610. *
  12611. * @ingroup tripal_chado_v1.2_schema_api
  12612. *
  12613. */
  12614. function tripal_chado_chado_schema_v1_2_stock_relationship_cvterm() {
  12615. $description = array(
  12616. 'description' => '',
  12617. 'fields' => array(
  12618. 'stock_relationship_cvterm_id' => array(
  12619. 'description' => '',
  12620. 'type' => 'serial',
  12621. 'not null' => TRUE,
  12622. ),
  12623. 'stock_relationship_id' => array(
  12624. 'description' => '',
  12625. 'type' => 'int',
  12626. 'not null' => TRUE,
  12627. ),
  12628. 'cvterm_id' => array(
  12629. 'description' => '',
  12630. 'type' => 'int',
  12631. 'not null' => TRUE,
  12632. ),
  12633. 'pub_id' => array(
  12634. 'description' => '',
  12635. 'type' => 'int',
  12636. 'not null' => FALSE,
  12637. ),
  12638. ),
  12639. 'primary key' => array(
  12640. 0 => 'stock_relationship_cvterm_id',
  12641. ),
  12642. 'foreign keys' => array(
  12643. 'cvterm' => array(
  12644. 'table' => 'cvterm',
  12645. 'columns' => array(
  12646. 'cvterm_id' => 'cvterm_id',
  12647. ),
  12648. ),
  12649. 'pub' => array(
  12650. 'table' => 'pub',
  12651. 'columns' => array(
  12652. 'pub_id' => 'pub_id',
  12653. ),
  12654. ),
  12655. 'stock_relationship' => array(
  12656. 'table' => 'stock_relationship',
  12657. 'columns' => array(
  12658. 'stock_relationship_id' => 'stock_relationship_id',
  12659. ),
  12660. ),
  12661. ),
  12662. 'table' => 'stock_relationship_cvterm',
  12663. 'referring_tables' => NULL,
  12664. );
  12665. return $description;
  12666. }
  12667. /**
  12668. * Implements hook_chado_schema_v1_2_stock_relationship_pub()
  12669. * Purpose: To describe the structure of 'stock_relationship_pub' to tripal
  12670. * @see chado_insert_record()
  12671. * @see chado_update_record()
  12672. * @see chado_select_record()
  12673. *
  12674. * @return
  12675. * An array describing the 'stock_relationship_pub' table
  12676. *
  12677. * @ingroup tripal_chado_v1.2_schema_api
  12678. *
  12679. */
  12680. function tripal_chado_chado_schema_v1_2_stock_relationship_pub() {
  12681. $description = array(
  12682. 'description' => '',
  12683. 'fields' => array(
  12684. 'stock_relationship_pub_id' => array(
  12685. 'description' => '',
  12686. 'type' => 'serial',
  12687. 'not null' => TRUE,
  12688. ),
  12689. 'stock_relationship_id' => array(
  12690. 'description' => '',
  12691. 'type' => 'int',
  12692. 'not null' => TRUE,
  12693. ),
  12694. 'pub_id' => array(
  12695. 'description' => '',
  12696. 'type' => 'int',
  12697. 'not null' => TRUE,
  12698. ),
  12699. ),
  12700. 'primary key' => array(
  12701. 0 => 'stock_relationship_pub_id',
  12702. ),
  12703. 'unique keys' => array(
  12704. 'stock_relationship_pub_c1' => array(
  12705. 0 => 'stock_relationship_id',
  12706. 1 => 'pub_id',
  12707. ),
  12708. ),
  12709. 'indexes' => array(
  12710. 'stock_relationship_pub_idx1' => array(
  12711. 0 => 'stock_relationship_id',
  12712. ),
  12713. 'stock_relationship_pub_idx2' => array(
  12714. 0 => 'pub_id',
  12715. ),
  12716. ),
  12717. 'foreign keys' => array(
  12718. 'pub' => array(
  12719. 'table' => 'pub',
  12720. 'columns' => array(
  12721. 'pub_id' => 'pub_id',
  12722. ),
  12723. ),
  12724. 'stock_relationship' => array(
  12725. 'table' => 'stock_relationship',
  12726. 'columns' => array(
  12727. 'stock_relationship_id' => 'stock_relationship_id',
  12728. ),
  12729. ),
  12730. ),
  12731. 'table' => 'stock_relationship_pub',
  12732. 'referring_tables' => NULL,
  12733. );
  12734. return $description;
  12735. }
  12736. /**
  12737. * Implements hook_chado_schema_v1_2_stockcollection()
  12738. * Purpose: To describe the structure of 'stockcollection' to tripal
  12739. * @see chado_insert_record()
  12740. * @see chado_update_record()
  12741. * @see chado_select_record()
  12742. *
  12743. * @return
  12744. * An array describing the 'stockcollection' table
  12745. *
  12746. * @ingroup tripal_chado_v1.2_schema_api
  12747. *
  12748. */
  12749. function tripal_chado_chado_schema_v1_2_stockcollection() {
  12750. $description = array(
  12751. 'description' => '',
  12752. 'fields' => array(
  12753. 'stockcollection_id' => array(
  12754. 'description' => '',
  12755. 'type' => 'serial',
  12756. 'not null' => TRUE,
  12757. ),
  12758. 'type_id' => array(
  12759. 'description' => '',
  12760. 'type' => 'int',
  12761. 'not null' => TRUE,
  12762. ),
  12763. 'contact_id' => array(
  12764. 'description' => '',
  12765. 'type' => 'int',
  12766. 'not null' => FALSE,
  12767. ),
  12768. 'name' => array(
  12769. 'description' => '',
  12770. 'type' => 'varchar',
  12771. 'length' => '255',
  12772. 'not null' => FALSE,
  12773. ),
  12774. 'uniquename' => array(
  12775. 'description' => '',
  12776. 'type' => 'text',
  12777. 'not null' => TRUE,
  12778. ),
  12779. ),
  12780. 'primary key' => array(
  12781. 0 => 'stockcollection_id',
  12782. ),
  12783. 'unique keys' => array(
  12784. 'stockcollection_c1' => array(
  12785. 0 => 'uniquename',
  12786. 1 => 'type_id',
  12787. ),
  12788. ),
  12789. 'indexes' => array(
  12790. 'stockcollection_idx1' => array(
  12791. 0 => 'contact_id',
  12792. ),
  12793. 'stockcollection_idx2' => array(
  12794. 0 => 'type_id',
  12795. ),
  12796. 'stockcollection_idx3' => array(
  12797. 0 => 'uniquename',
  12798. ),
  12799. 'stockcollection_name_ind1' => array(
  12800. 0 => 'name',
  12801. ),
  12802. ),
  12803. 'foreign keys' => array(
  12804. 'cvterm' => array(
  12805. 'table' => 'cvterm',
  12806. 'columns' => array(
  12807. 'type_id' => 'cvterm_id',
  12808. ),
  12809. ),
  12810. 'contact' => array(
  12811. 'table' => 'contact',
  12812. 'columns' => array(
  12813. 'contact_id' => 'contact_id',
  12814. ),
  12815. ),
  12816. ),
  12817. 'table' => 'stockcollection',
  12818. 'referring_tables' => array(
  12819. 0 => 'stockcollection_stock',
  12820. 1 => 'stockcollectionprop',
  12821. ),
  12822. );
  12823. return $description;
  12824. }
  12825. /**
  12826. * Implements hook_chado_schema_v1_2_stockcollection_stock()
  12827. * Purpose: To describe the structure of 'stockcollection_stock' to tripal
  12828. * @see chado_insert_record()
  12829. * @see chado_update_record()
  12830. * @see chado_select_record()
  12831. *
  12832. * @return
  12833. * An array describing the 'stockcollection_stock' table
  12834. *
  12835. * @ingroup tripal_chado_v1.2_schema_api
  12836. *
  12837. */
  12838. function tripal_chado_chado_schema_v1_2_stockcollection_stock() {
  12839. $description = array(
  12840. 'description' => '',
  12841. 'fields' => array(
  12842. 'stockcollection_stock_id' => array(
  12843. 'description' => '',
  12844. 'type' => 'serial',
  12845. 'not null' => TRUE,
  12846. ),
  12847. 'stockcollection_id' => array(
  12848. 'description' => '',
  12849. 'type' => 'int',
  12850. 'not null' => TRUE,
  12851. ),
  12852. 'stock_id' => array(
  12853. 'description' => '',
  12854. 'type' => 'int',
  12855. 'not null' => TRUE,
  12856. ),
  12857. ),
  12858. 'primary key' => array(
  12859. 0 => 'stockcollection_stock_id',
  12860. ),
  12861. 'unique keys' => array(
  12862. 'stockcollection_stock_c1' => array(
  12863. 0 => 'stockcollection_id',
  12864. 1 => 'stock_id',
  12865. ),
  12866. ),
  12867. 'indexes' => array(
  12868. 'stockcollection_stock_idx1' => array(
  12869. 0 => 'stockcollection_id',
  12870. ),
  12871. 'stockcollection_stock_idx2' => array(
  12872. 0 => 'stock_id',
  12873. ),
  12874. ),
  12875. 'foreign keys' => array(
  12876. 'stock' => array(
  12877. 'table' => 'stock',
  12878. 'columns' => array(
  12879. 'stock_id' => 'stock_id',
  12880. ),
  12881. ),
  12882. 'stockcollection' => array(
  12883. 'table' => 'stockcollection',
  12884. 'columns' => array(
  12885. 'stockcollection_id' => 'stockcollection_id',
  12886. ),
  12887. ),
  12888. ),
  12889. 'table' => 'stockcollection_stock',
  12890. 'referring_tables' => NULL,
  12891. );
  12892. return $description;
  12893. }
  12894. /**
  12895. * Implements hook_chado_schema_v1_2_stockcollectionprop()
  12896. * Purpose: To describe the structure of 'stockcollectionprop' to tripal
  12897. * @see chado_insert_record()
  12898. * @see chado_update_record()
  12899. * @see chado_select_record()
  12900. *
  12901. * @return
  12902. * An array describing the 'stockcollectionprop' table
  12903. *
  12904. * @ingroup tripal_chado_v1.2_schema_api
  12905. *
  12906. */
  12907. function tripal_chado_chado_schema_v1_2_stockcollectionprop() {
  12908. $description = array(
  12909. 'description' => '',
  12910. 'fields' => array(
  12911. 'stockcollectionprop_id' => array(
  12912. 'description' => '',
  12913. 'type' => 'serial',
  12914. 'not null' => TRUE,
  12915. ),
  12916. 'stockcollection_id' => array(
  12917. 'description' => '',
  12918. 'type' => 'int',
  12919. 'not null' => TRUE,
  12920. ),
  12921. 'type_id' => array(
  12922. 'description' => '',
  12923. 'type' => 'int',
  12924. 'not null' => TRUE,
  12925. ),
  12926. 'value' => array(
  12927. 'description' => '',
  12928. 'type' => 'text',
  12929. 'not null' => FALSE,
  12930. ),
  12931. 'rank' => array(
  12932. 'description' => '',
  12933. 'type' => 'int',
  12934. 'not null' => TRUE,
  12935. 'default' => 0,
  12936. ),
  12937. ),
  12938. 'primary key' => array(
  12939. 0 => 'stockcollectionprop_id',
  12940. ),
  12941. 'unique keys' => array(
  12942. 'stockcollectionprop_c1' => array(
  12943. 0 => 'stockcollection_id',
  12944. 1 => 'type_id',
  12945. 2 => 'rank',
  12946. ),
  12947. ),
  12948. 'indexes' => array(
  12949. 'stockcollectionprop_idx1' => array(
  12950. 0 => 'stockcollection_id',
  12951. ),
  12952. 'stockcollectionprop_idx2' => array(
  12953. 0 => 'type_id',
  12954. ),
  12955. ),
  12956. 'foreign keys' => array(
  12957. 'cvterm' => array(
  12958. 'table' => 'cvterm',
  12959. 'columns' => array(
  12960. 'type_id' => 'cvterm_id',
  12961. ),
  12962. ),
  12963. 'stockcollection' => array(
  12964. 'table' => 'stockcollection',
  12965. 'columns' => array(
  12966. 'stockcollection_id' => 'stockcollection_id',
  12967. ),
  12968. ),
  12969. ),
  12970. 'table' => 'stockcollectionprop',
  12971. 'referring_tables' => NULL,
  12972. );
  12973. return $description;
  12974. }
  12975. /**
  12976. * Implements hook_chado_schema_v1_2_stockprop()
  12977. * Purpose: To describe the structure of 'stockprop' to tripal
  12978. * @see chado_insert_record()
  12979. * @see chado_update_record()
  12980. * @see chado_select_record()
  12981. *
  12982. * @return
  12983. * An array describing the 'stockprop' table
  12984. *
  12985. * @ingroup tripal_chado_v1.2_schema_api
  12986. *
  12987. */
  12988. function tripal_chado_chado_schema_v1_2_stockprop() {
  12989. $description = array(
  12990. 'description' => '',
  12991. 'fields' => array(
  12992. 'stockprop_id' => array(
  12993. 'description' => '',
  12994. 'type' => 'serial',
  12995. 'not null' => TRUE,
  12996. ),
  12997. 'stock_id' => array(
  12998. 'description' => '',
  12999. 'type' => 'int',
  13000. 'not null' => TRUE,
  13001. ),
  13002. 'type_id' => array(
  13003. 'description' => '',
  13004. 'type' => 'int',
  13005. 'not null' => TRUE,
  13006. ),
  13007. 'value' => array(
  13008. 'description' => '',
  13009. 'type' => 'text',
  13010. 'not null' => FALSE,
  13011. ),
  13012. 'rank' => array(
  13013. 'description' => '',
  13014. 'type' => 'int',
  13015. 'not null' => TRUE,
  13016. 'default' => 0,
  13017. ),
  13018. ),
  13019. 'primary key' => array(
  13020. 0 => 'stockprop_id',
  13021. ),
  13022. 'unique keys' => array(
  13023. 'stockprop_c1' => array(
  13024. 0 => 'stock_id',
  13025. 1 => 'type_id',
  13026. 2 => 'rank',
  13027. ),
  13028. ),
  13029. 'indexes' => array(
  13030. 'stockprop_idx1' => array(
  13031. 0 => 'stock_id',
  13032. ),
  13033. 'stockprop_idx2' => array(
  13034. 0 => 'type_id',
  13035. ),
  13036. ),
  13037. 'foreign keys' => array(
  13038. 'cvterm' => array(
  13039. 'table' => 'cvterm',
  13040. 'columns' => array(
  13041. 'type_id' => 'cvterm_id',
  13042. ),
  13043. ),
  13044. 'stock' => array(
  13045. 'table' => 'stock',
  13046. 'columns' => array(
  13047. 'stock_id' => 'stock_id',
  13048. ),
  13049. ),
  13050. ),
  13051. 'table' => 'stockprop',
  13052. 'referring_tables' => array(
  13053. 0 => 'stockprop_pub',
  13054. ),
  13055. );
  13056. return $description;
  13057. }
  13058. /**
  13059. * Implements hook_chado_schema_v1_2_stockprop_pub()
  13060. * Purpose: To describe the structure of 'stockprop_pub' to tripal
  13061. * @see chado_insert_record()
  13062. * @see chado_update_record()
  13063. * @see chado_select_record()
  13064. *
  13065. * @return
  13066. * An array describing the 'stockprop_pub' table
  13067. *
  13068. * @ingroup tripal_chado_v1.2_schema_api
  13069. *
  13070. */
  13071. function tripal_chado_chado_schema_v1_2_stockprop_pub() {
  13072. $description = array(
  13073. 'description' => '',
  13074. 'fields' => array(
  13075. 'stockprop_pub_id' => array(
  13076. 'description' => '',
  13077. 'type' => 'serial',
  13078. 'not null' => TRUE,
  13079. ),
  13080. 'stockprop_id' => array(
  13081. 'description' => '',
  13082. 'type' => 'int',
  13083. 'not null' => TRUE,
  13084. ),
  13085. 'pub_id' => array(
  13086. 'description' => '',
  13087. 'type' => 'int',
  13088. 'not null' => TRUE,
  13089. ),
  13090. ),
  13091. 'primary key' => array(
  13092. 0 => 'stockprop_pub_id',
  13093. ),
  13094. 'unique keys' => array(
  13095. 'stockprop_pub_c1' => array(
  13096. 0 => 'stockprop_id',
  13097. 1 => 'pub_id',
  13098. ),
  13099. ),
  13100. 'indexes' => array(
  13101. 'stockprop_pub_idx1' => array(
  13102. 0 => 'stockprop_id',
  13103. ),
  13104. 'stockprop_pub_idx2' => array(
  13105. 0 => 'pub_id',
  13106. ),
  13107. ),
  13108. 'foreign keys' => array(
  13109. 'pub' => array(
  13110. 'table' => 'pub',
  13111. 'columns' => array(
  13112. 'pub_id' => 'pub_id',
  13113. ),
  13114. ),
  13115. 'stockprop' => array(
  13116. 'table' => 'stockprop',
  13117. 'columns' => array(
  13118. 'stockprop_id' => 'stockprop_id',
  13119. ),
  13120. ),
  13121. ),
  13122. 'table' => 'stockprop_pub',
  13123. 'referring_tables' => NULL,
  13124. );
  13125. return $description;
  13126. }
  13127. /**
  13128. * Implements hook_chado_schema_v1_2_study()
  13129. * Purpose: To describe the structure of 'study' to tripal
  13130. * @see chado_insert_record()
  13131. * @see chado_update_record()
  13132. * @see chado_select_record()
  13133. *
  13134. * @return
  13135. * An array describing the 'study' table
  13136. *
  13137. * @ingroup tripal_chado_v1.2_schema_api
  13138. *
  13139. */
  13140. function tripal_chado_chado_schema_v1_2_study() {
  13141. $description = array(
  13142. 'description' => '',
  13143. 'fields' => array(
  13144. 'study_id' => array(
  13145. 'description' => '',
  13146. 'type' => 'serial',
  13147. 'not null' => TRUE,
  13148. ),
  13149. 'contact_id' => array(
  13150. 'description' => '',
  13151. 'type' => 'int',
  13152. 'not null' => TRUE,
  13153. ),
  13154. 'pub_id' => array(
  13155. 'description' => '',
  13156. 'type' => 'int',
  13157. 'not null' => FALSE,
  13158. ),
  13159. 'dbxref_id' => array(
  13160. 'description' => '',
  13161. 'type' => 'int',
  13162. 'not null' => FALSE,
  13163. ),
  13164. 'name' => array(
  13165. 'description' => '',
  13166. 'type' => 'text',
  13167. 'not null' => TRUE,
  13168. ),
  13169. 'description' => array(
  13170. 'description' => '',
  13171. 'type' => 'text',
  13172. 'not null' => FALSE,
  13173. ),
  13174. ),
  13175. 'primary key' => array(
  13176. 0 => 'study_id',
  13177. ),
  13178. 'unique keys' => array(
  13179. 'study_c1' => array(
  13180. 0 => 'name',
  13181. ),
  13182. ),
  13183. 'indexes' => array(
  13184. 'study_idx1' => array(
  13185. 0 => 'contact_id',
  13186. ),
  13187. 'study_idx2' => array(
  13188. 0 => 'pub_id',
  13189. ),
  13190. 'study_idx3' => array(
  13191. 0 => 'dbxref_id',
  13192. ),
  13193. ),
  13194. 'foreign keys' => array(
  13195. 'dbxref' => array(
  13196. 'table' => 'dbxref',
  13197. 'columns' => array(
  13198. 'dbxref_id' => 'dbxref_id',
  13199. ),
  13200. ),
  13201. 'pub' => array(
  13202. 'table' => 'pub',
  13203. 'columns' => array(
  13204. 'pub_id' => 'pub_id',
  13205. ),
  13206. ),
  13207. 'contact' => array(
  13208. 'table' => 'contact',
  13209. 'columns' => array(
  13210. 'contact_id' => 'contact_id',
  13211. ),
  13212. ),
  13213. ),
  13214. 'table' => 'study',
  13215. 'referring_tables' => array(
  13216. 0 => 'study_assay',
  13217. 1 => 'studydesign',
  13218. 2 => 'studyprop',
  13219. ),
  13220. );
  13221. return $description;
  13222. }
  13223. /**
  13224. * Implements hook_chado_schema_v1_2_study_assay()
  13225. * Purpose: To describe the structure of 'study_assay' to tripal
  13226. * @see chado_insert_record()
  13227. * @see chado_update_record()
  13228. * @see chado_select_record()
  13229. *
  13230. * @return
  13231. * An array describing the 'study_assay' table
  13232. *
  13233. * @ingroup tripal_chado_v1.2_schema_api
  13234. *
  13235. */
  13236. function tripal_chado_chado_schema_v1_2_study_assay() {
  13237. $description = array(
  13238. 'description' => '',
  13239. 'fields' => array(
  13240. 'study_assay_id' => array(
  13241. 'description' => '',
  13242. 'type' => 'serial',
  13243. 'not null' => TRUE,
  13244. ),
  13245. 'study_id' => array(
  13246. 'description' => '',
  13247. 'type' => 'int',
  13248. 'not null' => TRUE,
  13249. ),
  13250. 'assay_id' => array(
  13251. 'description' => '',
  13252. 'type' => 'int',
  13253. 'not null' => TRUE,
  13254. ),
  13255. ),
  13256. 'primary key' => array(
  13257. 0 => 'study_assay_id',
  13258. ),
  13259. 'unique keys' => array(
  13260. 'study_assay_c1' => array(
  13261. 0 => 'study_id',
  13262. 1 => 'assay_id',
  13263. ),
  13264. ),
  13265. 'indexes' => array(
  13266. 'study_assay_idx1' => array(
  13267. 0 => 'study_id',
  13268. ),
  13269. 'study_assay_idx2' => array(
  13270. 0 => 'assay_id',
  13271. ),
  13272. ),
  13273. 'foreign keys' => array(
  13274. 'assay' => array(
  13275. 'table' => 'assay',
  13276. 'columns' => array(
  13277. 'assay_id' => 'assay_id',
  13278. ),
  13279. ),
  13280. 'study' => array(
  13281. 'table' => 'study',
  13282. 'columns' => array(
  13283. 'study_id' => 'study_id',
  13284. ),
  13285. ),
  13286. ),
  13287. 'table' => 'study_assay',
  13288. 'referring_tables' => NULL,
  13289. );
  13290. return $description;
  13291. }
  13292. /**
  13293. * Implements hook_chado_schema_v1_2_studydesign()
  13294. * Purpose: To describe the structure of 'studydesign' to tripal
  13295. * @see chado_insert_record()
  13296. * @see chado_update_record()
  13297. * @see chado_select_record()
  13298. *
  13299. * @return
  13300. * An array describing the 'studydesign' table
  13301. *
  13302. * @ingroup tripal_chado_v1.2_schema_api
  13303. *
  13304. */
  13305. function tripal_chado_chado_schema_v1_2_studydesign() {
  13306. $description = array(
  13307. 'description' => '',
  13308. 'fields' => array(
  13309. 'studydesign_id' => array(
  13310. 'description' => '',
  13311. 'type' => 'serial',
  13312. 'not null' => TRUE,
  13313. ),
  13314. 'study_id' => array(
  13315. 'description' => '',
  13316. 'type' => 'int',
  13317. 'not null' => TRUE,
  13318. ),
  13319. 'description' => array(
  13320. 'description' => '',
  13321. 'type' => 'text',
  13322. 'not null' => FALSE,
  13323. ),
  13324. ),
  13325. 'primary key' => array(
  13326. 0 => 'studydesign_id',
  13327. ),
  13328. 'indexes' => array(
  13329. 'studydesign_idx1' => array(
  13330. 0 => 'study_id',
  13331. ),
  13332. ),
  13333. 'foreign keys' => array(
  13334. 'study' => array(
  13335. 'table' => 'study',
  13336. 'columns' => array(
  13337. 'study_id' => 'study_id',
  13338. ),
  13339. ),
  13340. ),
  13341. 'table' => 'studydesign',
  13342. 'referring_tables' => array(
  13343. 0 => 'studydesignprop',
  13344. 1 => 'studyfactor',
  13345. ),
  13346. );
  13347. return $description;
  13348. }
  13349. /**
  13350. * Implements hook_chado_schema_v1_2_studydesignprop()
  13351. * Purpose: To describe the structure of 'studydesignprop' to tripal
  13352. * @see chado_insert_record()
  13353. * @see chado_update_record()
  13354. * @see chado_select_record()
  13355. *
  13356. * @return
  13357. * An array describing the 'studydesignprop' table
  13358. *
  13359. * @ingroup tripal_chado_v1.2_schema_api
  13360. *
  13361. */
  13362. function tripal_chado_chado_schema_v1_2_studydesignprop() {
  13363. $description = array(
  13364. 'description' => '',
  13365. 'fields' => array(
  13366. 'studydesignprop_id' => array(
  13367. 'description' => '',
  13368. 'type' => 'serial',
  13369. 'not null' => TRUE,
  13370. ),
  13371. 'studydesign_id' => array(
  13372. 'description' => '',
  13373. 'type' => 'int',
  13374. 'not null' => TRUE,
  13375. ),
  13376. 'type_id' => array(
  13377. 'description' => '',
  13378. 'type' => 'int',
  13379. 'not null' => TRUE,
  13380. ),
  13381. 'value' => array(
  13382. 'description' => '',
  13383. 'type' => 'text',
  13384. 'not null' => FALSE,
  13385. ),
  13386. 'rank' => array(
  13387. 'description' => '',
  13388. 'type' => 'int',
  13389. 'not null' => TRUE,
  13390. 'default' => 0,
  13391. ),
  13392. ),
  13393. 'primary key' => array(
  13394. 0 => 'studydesignprop_id',
  13395. ),
  13396. 'unique keys' => array(
  13397. 'studydesignprop_c1' => array(
  13398. 0 => 'studydesign_id',
  13399. 1 => 'type_id',
  13400. 2 => 'rank',
  13401. ),
  13402. ),
  13403. 'indexes' => array(
  13404. 'studydesignprop_idx1' => array(
  13405. 0 => 'studydesign_id',
  13406. ),
  13407. 'studydesignprop_idx2' => array(
  13408. 0 => 'type_id',
  13409. ),
  13410. ),
  13411. 'foreign keys' => array(
  13412. 'cvterm' => array(
  13413. 'table' => 'cvterm',
  13414. 'columns' => array(
  13415. 'type_id' => 'cvterm_id',
  13416. ),
  13417. ),
  13418. 'studydesign' => array(
  13419. 'table' => 'studydesign',
  13420. 'columns' => array(
  13421. 'studydesign_id' => 'studydesign_id',
  13422. ),
  13423. ),
  13424. ),
  13425. 'table' => 'studydesignprop',
  13426. 'referring_tables' => NULL,
  13427. );
  13428. return $description;
  13429. }
  13430. /**
  13431. * Implements hook_chado_schema_v1_2_studyfactor()
  13432. * Purpose: To describe the structure of 'studyfactor' to tripal
  13433. * @see chado_insert_record()
  13434. * @see chado_update_record()
  13435. * @see chado_select_record()
  13436. *
  13437. * @return
  13438. * An array describing the 'studyfactor' table
  13439. *
  13440. * @ingroup tripal_chado_v1.2_schema_api
  13441. *
  13442. */
  13443. function tripal_chado_chado_schema_v1_2_studyfactor() {
  13444. $description = array(
  13445. 'description' => '',
  13446. 'fields' => array(
  13447. 'studyfactor_id' => array(
  13448. 'description' => '',
  13449. 'type' => 'serial',
  13450. 'not null' => TRUE,
  13451. ),
  13452. 'studydesign_id' => array(
  13453. 'description' => '',
  13454. 'type' => 'int',
  13455. 'not null' => TRUE,
  13456. ),
  13457. 'type_id' => array(
  13458. 'description' => '',
  13459. 'type' => 'int',
  13460. 'not null' => FALSE,
  13461. ),
  13462. 'name' => array(
  13463. 'description' => '',
  13464. 'type' => 'text',
  13465. 'not null' => TRUE,
  13466. ),
  13467. 'description' => array(
  13468. 'description' => '',
  13469. 'type' => 'text',
  13470. 'not null' => FALSE,
  13471. ),
  13472. ),
  13473. 'primary key' => array(
  13474. 0 => 'studyfactor_id',
  13475. ),
  13476. 'indexes' => array(
  13477. 'studyfactor_idx1' => array(
  13478. 0 => 'studydesign_id',
  13479. ),
  13480. 'studyfactor_idx2' => array(
  13481. 0 => 'type_id',
  13482. ),
  13483. ),
  13484. 'foreign keys' => array(
  13485. 'cvterm' => array(
  13486. 'table' => 'cvterm',
  13487. 'columns' => array(
  13488. 'type_id' => 'cvterm_id',
  13489. ),
  13490. ),
  13491. 'studydesign' => array(
  13492. 'table' => 'studydesign',
  13493. 'columns' => array(
  13494. 'studydesign_id' => 'studydesign_id',
  13495. ),
  13496. ),
  13497. ),
  13498. 'table' => 'studyfactor',
  13499. 'referring_tables' => array(
  13500. 0 => 'studyfactorvalue',
  13501. ),
  13502. );
  13503. return $description;
  13504. }
  13505. /**
  13506. * Implements hook_chado_schema_v1_2_studyfactorvalue()
  13507. * Purpose: To describe the structure of 'studyfactorvalue' to tripal
  13508. * @see chado_insert_record()
  13509. * @see chado_update_record()
  13510. * @see chado_select_record()
  13511. *
  13512. * @return
  13513. * An array describing the 'studyfactorvalue' table
  13514. *
  13515. * @ingroup tripal_chado_v1.2_schema_api
  13516. *
  13517. */
  13518. function tripal_chado_chado_schema_v1_2_studyfactorvalue() {
  13519. $description = array(
  13520. 'description' => '',
  13521. 'fields' => array(
  13522. 'studyfactorvalue_id' => array(
  13523. 'description' => '',
  13524. 'type' => 'serial',
  13525. 'not null' => TRUE,
  13526. ),
  13527. 'studyfactor_id' => array(
  13528. 'description' => '',
  13529. 'type' => 'int',
  13530. 'not null' => TRUE,
  13531. ),
  13532. 'assay_id' => array(
  13533. 'description' => '',
  13534. 'type' => 'int',
  13535. 'not null' => TRUE,
  13536. ),
  13537. 'factorvalue' => array(
  13538. 'description' => '',
  13539. 'type' => 'text',
  13540. 'not null' => FALSE,
  13541. ),
  13542. 'name' => array(
  13543. 'description' => '',
  13544. 'type' => 'text',
  13545. 'not null' => FALSE,
  13546. ),
  13547. 'rank' => array(
  13548. 'description' => '',
  13549. 'type' => 'int',
  13550. 'not null' => TRUE,
  13551. 'default' => 0,
  13552. ),
  13553. ),
  13554. 'primary key' => array(
  13555. 0 => 'studyfactorvalue_id',
  13556. ),
  13557. 'indexes' => array(
  13558. 'studyfactorvalue_idx1' => array(
  13559. 0 => 'studyfactor_id',
  13560. ),
  13561. 'studyfactorvalue_idx2' => array(
  13562. 0 => 'assay_id',
  13563. ),
  13564. ),
  13565. 'foreign keys' => array(
  13566. 'assay' => array(
  13567. 'table' => 'assay',
  13568. 'columns' => array(
  13569. 'assay_id' => 'assay_id',
  13570. ),
  13571. ),
  13572. 'studyfactor' => array(
  13573. 'table' => 'studyfactor',
  13574. 'columns' => array(
  13575. 'studyfactor_id' => 'studyfactor_id',
  13576. ),
  13577. ),
  13578. ),
  13579. 'table' => 'studyfactorvalue',
  13580. 'referring_tables' => NULL,
  13581. );
  13582. return $description;
  13583. }
  13584. /**
  13585. * Implements hook_chado_schema_v1_2_studyprop()
  13586. * Purpose: To describe the structure of 'studyprop' to tripal
  13587. * @see chado_insert_record()
  13588. * @see chado_update_record()
  13589. * @see chado_select_record()
  13590. *
  13591. * @return
  13592. * An array describing the 'studyprop' table
  13593. *
  13594. * @ingroup tripal_chado_v1.2_schema_api
  13595. *
  13596. */
  13597. function tripal_chado_chado_schema_v1_2_studyprop() {
  13598. $description = array(
  13599. 'description' => '',
  13600. 'fields' => array(
  13601. 'studyprop_id' => array(
  13602. 'description' => '',
  13603. 'type' => 'serial',
  13604. 'not null' => TRUE,
  13605. ),
  13606. 'study_id' => array(
  13607. 'description' => '',
  13608. 'type' => 'int',
  13609. 'not null' => TRUE,
  13610. ),
  13611. 'type_id' => array(
  13612. 'description' => '',
  13613. 'type' => 'int',
  13614. 'not null' => TRUE,
  13615. ),
  13616. 'value' => array(
  13617. 'description' => '',
  13618. 'type' => 'text',
  13619. 'not null' => FALSE,
  13620. ),
  13621. 'rank' => array(
  13622. 'description' => '',
  13623. 'type' => 'int',
  13624. 'not null' => TRUE,
  13625. 'default' => 0,
  13626. ),
  13627. ),
  13628. 'primary key' => array(
  13629. 0 => 'studyprop_id',
  13630. ),
  13631. 'unique keys' => array(
  13632. 'study_id' => array(
  13633. 0 => 'study_id',
  13634. 1 => 'type_id',
  13635. 2 => 'rank',
  13636. ),
  13637. ),
  13638. 'indexes' => array(
  13639. 'studyprop_idx1' => array(
  13640. 0 => 'study_id',
  13641. ),
  13642. 'studyprop_idx2' => array(
  13643. 0 => 'type_id',
  13644. ),
  13645. ),
  13646. 'foreign keys' => array(
  13647. 'cvterm' => array(
  13648. 'table' => 'cvterm',
  13649. 'columns' => array(
  13650. 'type_id' => 'cvterm_id',
  13651. ),
  13652. ),
  13653. 'study' => array(
  13654. 'table' => 'study',
  13655. 'columns' => array(
  13656. 'study_id' => 'study_id',
  13657. ),
  13658. ),
  13659. ),
  13660. 'table' => 'studyprop',
  13661. 'referring_tables' => array(
  13662. 0 => 'studyprop_feature',
  13663. ),
  13664. );
  13665. return $description;
  13666. }
  13667. /**
  13668. * Implements hook_chado_schema_v1_2_studyprop_feature()
  13669. * Purpose: To describe the structure of 'studyprop_feature' to tripal
  13670. * @see chado_insert_record()
  13671. * @see chado_update_record()
  13672. * @see chado_select_record()
  13673. *
  13674. * @return
  13675. * An array describing the 'studyprop_feature' table
  13676. *
  13677. * @ingroup tripal_chado_v1.2_schema_api
  13678. *
  13679. */
  13680. function tripal_chado_chado_schema_v1_2_studyprop_feature() {
  13681. $description = array(
  13682. 'description' => '',
  13683. 'fields' => array(
  13684. 'studyprop_feature_id' => array(
  13685. 'description' => '',
  13686. 'type' => 'serial',
  13687. 'not null' => TRUE,
  13688. ),
  13689. 'studyprop_id' => array(
  13690. 'description' => '',
  13691. 'type' => 'int',
  13692. 'not null' => TRUE,
  13693. ),
  13694. 'feature_id' => array(
  13695. 'description' => '',
  13696. 'type' => 'int',
  13697. 'not null' => TRUE,
  13698. ),
  13699. 'type_id' => array(
  13700. 'description' => '',
  13701. 'type' => 'int',
  13702. 'not null' => FALSE,
  13703. ),
  13704. ),
  13705. 'primary key' => array(
  13706. 0 => 'studyprop_feature_id',
  13707. ),
  13708. 'unique keys' => array(
  13709. 'studyprop_id' => array(
  13710. 0 => 'studyprop_id',
  13711. 1 => 'feature_id',
  13712. ),
  13713. ),
  13714. 'indexes' => array(
  13715. 'studyprop_feature_idx1' => array(
  13716. 0 => 'studyprop_id',
  13717. ),
  13718. 'studyprop_feature_idx2' => array(
  13719. 0 => 'feature_id',
  13720. ),
  13721. ),
  13722. 'foreign keys' => array(
  13723. 'cvterm' => array(
  13724. 'table' => 'cvterm',
  13725. 'columns' => array(
  13726. 'type_id' => 'cvterm_id',
  13727. ),
  13728. ),
  13729. 'feature' => array(
  13730. 'table' => 'feature',
  13731. 'columns' => array(
  13732. 'feature_id' => 'feature_id',
  13733. ),
  13734. ),
  13735. 'studyprop' => array(
  13736. 'table' => 'studyprop',
  13737. 'columns' => array(
  13738. 'studyprop_id' => 'studyprop_id',
  13739. ),
  13740. ),
  13741. ),
  13742. 'table' => 'studyprop_feature',
  13743. 'referring_tables' => NULL,
  13744. );
  13745. return $description;
  13746. }
  13747. /**
  13748. * Implements hook_chado_schema_v1_2_synonym()
  13749. * Purpose: To describe the structure of 'synonym' to tripal
  13750. * @see chado_insert_record()
  13751. * @see chado_update_record()
  13752. * @see chado_select_record()
  13753. *
  13754. * @return
  13755. * An array describing the 'synonym' table
  13756. *
  13757. * @ingroup tripal_chado_v1.2_schema_api
  13758. *
  13759. */
  13760. function tripal_chado_chado_schema_v1_2_synonym() {
  13761. $description = array(
  13762. 'description' => '',
  13763. 'fields' => array(
  13764. 'synonym_id' => array(
  13765. 'description' => '',
  13766. 'type' => 'serial',
  13767. 'not null' => TRUE,
  13768. ),
  13769. 'name' => array(
  13770. 'description' => '',
  13771. 'type' => 'varchar',
  13772. 'length' => '255',
  13773. 'not null' => TRUE,
  13774. ),
  13775. 'type_id' => array(
  13776. 'description' => '',
  13777. 'type' => 'int',
  13778. 'not null' => TRUE,
  13779. ),
  13780. 'synonym_sgml' => array(
  13781. 'description' => '',
  13782. 'type' => 'varchar',
  13783. 'length' => '255',
  13784. 'not null' => TRUE,
  13785. ),
  13786. ),
  13787. 'primary key' => array(
  13788. 0 => 'synonym_id',
  13789. ),
  13790. 'unique keys' => array(
  13791. 'synonym_c1' => array(
  13792. 0 => 'name',
  13793. 1 => 'type_id',
  13794. ),
  13795. ),
  13796. 'indexes' => array(
  13797. 'synonym_idx1' => array(
  13798. 0 => 'type_id',
  13799. ),
  13800. ),
  13801. 'foreign keys' => array(
  13802. 'cvterm' => array(
  13803. 'table' => 'cvterm',
  13804. 'columns' => array(
  13805. 'type_id' => 'cvterm_id',
  13806. ),
  13807. ),
  13808. ),
  13809. 'table' => 'synonym',
  13810. 'referring_tables' => array(
  13811. 0 => 'cell_line_synonym',
  13812. 1 => 'feature_synonym',
  13813. 2 => 'library_synonym',
  13814. ),
  13815. );
  13816. return $description;
  13817. }
  13818. /**
  13819. * Implements hook_chado_schema_v1_2_tableinfo()
  13820. * Purpose: To describe the structure of 'tableinfo' to tripal
  13821. * @see chado_insert_record()
  13822. * @see chado_update_record()
  13823. * @see chado_select_record()
  13824. *
  13825. * @return
  13826. * An array describing the 'tableinfo' table
  13827. *
  13828. * @ingroup tripal_chado_v1.2_schema_api
  13829. *
  13830. */
  13831. function tripal_chado_chado_schema_v1_2_tableinfo() {
  13832. $description = array(
  13833. 'description' => '',
  13834. 'fields' => array(
  13835. 'tableinfo_id' => array(
  13836. 'description' => '',
  13837. 'type' => 'serial',
  13838. 'not null' => TRUE,
  13839. ),
  13840. 'name' => array(
  13841. 'description' => '',
  13842. 'type' => 'varchar',
  13843. 'length' => '30',
  13844. 'not null' => TRUE,
  13845. ),
  13846. 'primary_key_column' => array(
  13847. 'description' => '',
  13848. 'type' => 'varchar',
  13849. 'length' => '30',
  13850. 'not null' => FALSE,
  13851. ),
  13852. 'is_view' => array(
  13853. 'description' => '',
  13854. 'type' => 'int',
  13855. 'not null' => TRUE,
  13856. 'default' => 0,
  13857. ),
  13858. 'view_on_table_id' => array(
  13859. 'description' => '',
  13860. 'type' => 'int',
  13861. 'not null' => FALSE,
  13862. ),
  13863. 'superclass_table_id' => array(
  13864. 'description' => '',
  13865. 'type' => 'int',
  13866. 'not null' => FALSE,
  13867. ),
  13868. 'is_updateable' => array(
  13869. 'description' => '',
  13870. 'type' => 'int',
  13871. 'not null' => TRUE,
  13872. 'default' => 1,
  13873. ),
  13874. 'modification_date' => array(
  13875. 'description' => '',
  13876. 'type' => 'date',
  13877. 'not null' => TRUE,
  13878. 'default' => 'now()',
  13879. ),
  13880. ),
  13881. 'primary key' => array(
  13882. 0 => 'tableinfo_id',
  13883. ),
  13884. 'unique keys' => array(
  13885. 'tableinfo_c1' => array(
  13886. 0 => 'name',
  13887. ),
  13888. ),
  13889. 'foreign keys' => array(
  13890. ),
  13891. 'table' => 'tableinfo',
  13892. 'referring_tables' => array(
  13893. 0 => 'control',
  13894. 1 => 'magedocumentation',
  13895. ),
  13896. );
  13897. return $description;
  13898. }
  13899. /**
  13900. * Implements hook_chado_schema_v1_2_treatment()
  13901. * Purpose: To describe the structure of 'treatment' to tripal
  13902. * @see chado_insert_record()
  13903. * @see chado_update_record()
  13904. * @see chado_select_record()
  13905. *
  13906. * @return
  13907. * An array describing the 'treatment' table
  13908. *
  13909. * @ingroup tripal_chado_v1.2_schema_api
  13910. *
  13911. */
  13912. function tripal_chado_chado_schema_v1_2_treatment() {
  13913. $description = array(
  13914. 'description' => '',
  13915. 'fields' => array(
  13916. 'treatment_id' => array(
  13917. 'description' => '',
  13918. 'type' => 'serial',
  13919. 'not null' => TRUE,
  13920. ),
  13921. 'rank' => array(
  13922. 'description' => '',
  13923. 'type' => 'int',
  13924. 'not null' => TRUE,
  13925. 'default' => 0,
  13926. ),
  13927. 'biomaterial_id' => array(
  13928. 'description' => '',
  13929. 'type' => 'int',
  13930. 'not null' => TRUE,
  13931. ),
  13932. 'type_id' => array(
  13933. 'description' => '',
  13934. 'type' => 'int',
  13935. 'not null' => TRUE,
  13936. ),
  13937. 'protocol_id' => array(
  13938. 'description' => '',
  13939. 'type' => 'int',
  13940. 'not null' => FALSE,
  13941. ),
  13942. 'name' => array(
  13943. 'description' => '',
  13944. 'type' => 'text',
  13945. 'not null' => FALSE,
  13946. ),
  13947. ),
  13948. 'primary key' => array(
  13949. 0 => 'treatment_id',
  13950. ),
  13951. 'indexes' => array(
  13952. 'treatment_idx1' => array(
  13953. 0 => 'biomaterial_id',
  13954. ),
  13955. 'treatment_idx2' => array(
  13956. 0 => 'type_id',
  13957. ),
  13958. 'treatment_idx3' => array(
  13959. 0 => 'protocol_id',
  13960. ),
  13961. ),
  13962. 'foreign keys' => array(
  13963. 'cvterm' => array(
  13964. 'table' => 'cvterm',
  13965. 'columns' => array(
  13966. 'type_id' => 'cvterm_id',
  13967. ),
  13968. ),
  13969. 'protocol' => array(
  13970. 'table' => 'protocol',
  13971. 'columns' => array(
  13972. 'protocol_id' => 'protocol_id',
  13973. ),
  13974. ),
  13975. 'biomaterial' => array(
  13976. 'table' => 'biomaterial',
  13977. 'columns' => array(
  13978. 'biomaterial_id' => 'biomaterial_id',
  13979. ),
  13980. ),
  13981. ),
  13982. 'table' => 'treatment',
  13983. 'referring_tables' => array(
  13984. 0 => 'biomaterial_treatment',
  13985. ),
  13986. );
  13987. return $description;
  13988. }
  13989. /**
  13990. * Lists the table names in the v1.2 chado schema
  13991. *
  13992. * @return
  13993. * An array containing all of the table names
  13994. *
  13995. * @ingroup tripal_chado_v1.2_schema_api
  13996. *
  13997. */
  13998. function tripal_chado_chado_get_v1_2_tables() {
  13999. $tables = array(
  14000. 'acquisition',
  14001. 'acquisition_relationship',
  14002. 'acquisitionprop',
  14003. 'analysis',
  14004. 'analysisfeature',
  14005. 'analysisfeatureprop',
  14006. 'analysisprop',
  14007. 'arraydesign',
  14008. 'arraydesignprop',
  14009. 'assay',
  14010. 'assay_biomaterial',
  14011. 'assay_project',
  14012. 'assayprop',
  14013. 'biomaterial',
  14014. 'biomaterial_dbxref',
  14015. 'biomaterial_relationship',
  14016. 'biomaterial_treatment',
  14017. 'biomaterialprop',
  14018. 'cell_line',
  14019. 'cell_line_cvterm',
  14020. 'cell_line_cvtermprop',
  14021. 'cell_line_dbxref',
  14022. 'cell_line_feature',
  14023. 'cell_line_library',
  14024. 'cell_line_pub',
  14025. 'cell_line_relationship',
  14026. 'cell_line_synonym',
  14027. 'cell_lineprop',
  14028. 'cell_lineprop_pub',
  14029. 'chadoprop',
  14030. 'channel',
  14031. 'contact',
  14032. 'contact_relationship',
  14033. 'control',
  14034. 'cv',
  14035. 'cvprop',
  14036. 'cvterm',
  14037. 'cvterm_dbxref',
  14038. 'cvterm_relationship',
  14039. 'cvtermpath',
  14040. 'cvtermprop',
  14041. 'cvtermsynonym',
  14042. 'db',
  14043. 'dbxref',
  14044. 'dbxrefprop',
  14045. 'eimage',
  14046. 'element',
  14047. 'element_relationship',
  14048. 'elementresult',
  14049. 'elementresult_relationship',
  14050. 'environment',
  14051. 'environment_cvterm',
  14052. 'expression',
  14053. 'expression_cvterm',
  14054. 'expression_cvtermprop',
  14055. 'expression_image',
  14056. 'expression_pub',
  14057. 'expressionprop',
  14058. 'feature',
  14059. 'feature_cvterm',
  14060. 'feature_cvterm_dbxref',
  14061. 'feature_cvterm_pub',
  14062. 'feature_cvtermprop',
  14063. 'feature_dbxref',
  14064. 'feature_expression',
  14065. 'feature_expressionprop',
  14066. 'feature_genotype',
  14067. 'feature_phenotype',
  14068. 'feature_pub',
  14069. 'feature_pubprop',
  14070. 'feature_relationship',
  14071. 'feature_relationship_pub',
  14072. 'feature_relationshipprop',
  14073. 'feature_relationshipprop_pub',
  14074. 'feature_synonym',
  14075. 'featureloc',
  14076. 'featureloc_pub',
  14077. 'featuremap',
  14078. 'featuremap_pub',
  14079. 'featurepos',
  14080. 'featureprop',
  14081. 'featureprop_pub',
  14082. 'featurerange',
  14083. 'genotype',
  14084. 'genotypeprop',
  14085. 'library',
  14086. 'library_cvterm',
  14087. 'library_dbxref',
  14088. 'library_feature',
  14089. 'library_pub',
  14090. 'library_synonym',
  14091. 'libraryprop',
  14092. 'libraryprop_pub',
  14093. 'magedocumentation',
  14094. 'mageml',
  14095. 'nd_experiment',
  14096. 'nd_experiment_contact',
  14097. 'nd_experiment_dbxref',
  14098. 'nd_experiment_genotype',
  14099. 'nd_experiment_phenotype',
  14100. 'nd_experiment_project',
  14101. 'nd_experiment_protocol',
  14102. 'nd_experiment_pub',
  14103. 'nd_experiment_stock',
  14104. 'nd_experiment_stock_dbxref',
  14105. 'nd_experiment_stockprop',
  14106. 'nd_experimentprop',
  14107. 'nd_geolocation',
  14108. 'nd_geolocationprop',
  14109. 'nd_protocol',
  14110. 'nd_protocol_reagent',
  14111. 'nd_protocolprop',
  14112. 'nd_reagent',
  14113. 'nd_reagent_relationship',
  14114. 'nd_reagentprop',
  14115. 'organism',
  14116. 'organism_dbxref',
  14117. 'organismprop',
  14118. 'phendesc',
  14119. 'phenotype',
  14120. 'phenotype_comparison',
  14121. 'phenotype_comparison_cvterm',
  14122. 'phenotype_cvterm',
  14123. 'phenstatement',
  14124. 'phylonode',
  14125. 'phylonode_dbxref',
  14126. 'phylonode_organism',
  14127. 'phylonode_pub',
  14128. 'phylonode_relationship',
  14129. 'phylonodeprop',
  14130. 'phylotree',
  14131. 'phylotree_pub',
  14132. 'project',
  14133. 'project_contact',
  14134. 'project_pub',
  14135. 'project_relationship',
  14136. 'projectprop',
  14137. 'protocol',
  14138. 'protocolparam',
  14139. 'pub',
  14140. 'pub_dbxref',
  14141. 'pub_relationship',
  14142. 'pubauthor',
  14143. 'pubprop',
  14144. 'quantification',
  14145. 'quantification_relationship',
  14146. 'quantificationprop',
  14147. 'stock',
  14148. 'stock_cvterm',
  14149. 'stock_cvtermprop',
  14150. 'stock_dbxref',
  14151. 'stock_dbxrefprop',
  14152. 'stock_genotype',
  14153. 'stock_pub',
  14154. 'stock_relationship',
  14155. 'stock_relationship_cvterm',
  14156. 'stock_relationship_pub',
  14157. 'stockcollection',
  14158. 'stockcollection_stock',
  14159. 'stockcollectionprop',
  14160. 'stockprop',
  14161. 'stockprop_pub',
  14162. 'study',
  14163. 'study_assay',
  14164. 'studydesign',
  14165. 'studydesignprop',
  14166. 'studyfactor',
  14167. 'studyfactorvalue',
  14168. 'studyprop',
  14169. 'studyprop_feature',
  14170. 'synonym',
  14171. 'tableinfo',
  14172. 'treatment'
  14173. );
  14174. return $tables;
  14175. }