tripal_chado.schema_v1.3.api.inc 422 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265
  1. <?php
  2. /**
  3. * @file
  4. * Describes the chado tables in version 1.3
  5. */
  6. /**
  7. * @defgroup tripal_schema_v1_3_api Chado v1.3 Schema
  8. * @ingroup tripal_chado_schema_api
  9. * @{
  10. * Provides an application programming interface (API) for describing Chado
  11. * tables. This API consists of a set of functions, one for each table in Chado.
  12. * Each function simply returns a Drupal style array that defines the table.
  13. *
  14. * Because Drupal does not handle foreign key (FK) relationships, which are
  15. * needed to for Tripal Views, they have been added to the schema defintitions
  16. * below.
  17. *
  18. * The functions provided in this documentation should not be called as is,
  19. * but if you need the Drupal-style array definition for any table, use the
  20. * following function call:
  21. *
  22. * $table_desc = chado_get_schema($table)
  23. *
  24. * where the variable $table contains the name of the table you want to
  25. * retireve. The chado_get_schema function determines the appropriate version
  26. * of Chado and uses the Drupal hook infrastructure to call the appropriate
  27. * hook function to retrieve the table schema.
  28. *
  29. * If you need to augment these schema definitions within your own module,
  30. * you need to implement the hook_chado_schema_v1_3_[table name]() hook where
  31. * [table name] is the name of the chado table whose schema definition you
  32. * want to augment.
  33. * @}
  34. */
  35. /**
  36. * Implements hook_chado_schema_v1_3_acquisition()
  37. *
  38. * Purpose: To describe the structure of 'acquisition' to tripal
  39. * @see chado_insert_record()
  40. * @see chado_update_record()
  41. * @see chado_select_record()
  42. * @see chado_generate_var()
  43. * @see chado_expan_var()
  44. *
  45. * @return
  46. * An array describing the 'acquisition' table
  47. *
  48. * @ingroup tripal_chado_v1.3_schema_api
  49. *
  50. */
  51. function tripal_chado_chado_schema_v1_3_acquisition() {
  52. $description = array(
  53. 'description' => '',
  54. 'table' => 'acquisition',
  55. 'fields' => array(
  56. 'acquisition_id' => array(
  57. 'size' => 'big',
  58. 'type' => 'serial',
  59. 'not null' => TRUE,
  60. ),
  61. 'assay_id' => array(
  62. 'size' => 'big',
  63. 'type' => 'int',
  64. 'not null' => TRUE,
  65. ),
  66. 'protocol_id' => array(
  67. 'size' => 'big',
  68. 'type' => 'int',
  69. 'not null' => FALSE,
  70. ),
  71. 'channel_id' => array(
  72. 'size' => 'big',
  73. 'type' => 'int',
  74. 'not null' => FALSE,
  75. ),
  76. 'acquisitiondate' => array(
  77. 'size' => 'normal',
  78. 'type' => 'datetime',
  79. 'not null' => FALSE,
  80. 'default' => 'now()',
  81. ),
  82. 'name' => array(
  83. 'size' => 'normal',
  84. 'type' => 'text',
  85. 'not null' => FALSE,
  86. ),
  87. 'uri' => array(
  88. 'size' => 'normal',
  89. 'type' => 'text',
  90. 'not null' => FALSE,
  91. ),
  92. ),
  93. 'unique keys' => array(
  94. 'acquisition_c1' => array(
  95. 0 => 'name',
  96. ),
  97. ),
  98. 'indexes' => array(
  99. 'acquisition_idx1' => array(
  100. 0 => 'assay_id',
  101. ),
  102. 'acquisition_idx2' => array(
  103. 0 => 'protocol_id',
  104. ),
  105. 'acquisition_idx3' => array(
  106. 0 => 'channel_id',
  107. ),
  108. ),
  109. 'primary key' => array(
  110. 0 => 'acquisition_id',
  111. ),
  112. 'foreign keys' => array(
  113. 'assay' => array(
  114. 'table' => 'assay',
  115. 'columns' => array(
  116. 'assay_id' => 'assay_id',
  117. ),
  118. ),
  119. 'protocol' => array(
  120. 'table' => 'protocol',
  121. 'columns' => array(
  122. 'protocol_id' => 'protocol_id',
  123. ),
  124. ),
  125. 'channel' => array(
  126. 'table' => 'channel',
  127. 'columns' => array(
  128. 'channel_id' => 'channel_id',
  129. ),
  130. ),
  131. ),
  132. 'referring_tables' => array(
  133. 0 => 'acquisitionprop',
  134. 1 => 'acquisition_relationship',
  135. 3 => 'quantification',
  136. ),
  137. );
  138. return $description;
  139. }
  140. /**
  141. * Implements hook_chado_schema_v1_3_acquisitionprop()
  142. *
  143. * Purpose: To describe the structure of 'acquisitionprop' to tripal
  144. * @see chado_insert_record()
  145. * @see chado_update_record()
  146. * @see chado_select_record()
  147. * @see chado_generate_var()
  148. * @see chado_expan_var()
  149. *
  150. * @return
  151. * An array describing the 'acquisitionprop' table
  152. *
  153. * @ingroup tripal_chado_v1.3_schema_api
  154. *
  155. */
  156. function tripal_chado_chado_schema_v1_3_acquisitionprop() {
  157. $description = array(
  158. 'description' => '',
  159. 'table' => 'acquisitionprop',
  160. 'fields' => array(
  161. 'acquisitionprop_id' => array(
  162. 'size' => 'big',
  163. 'type' => 'serial',
  164. 'not null' => TRUE,
  165. ),
  166. 'acquisition_id' => array(
  167. 'size' => 'big',
  168. 'type' => 'int',
  169. 'not null' => TRUE,
  170. ),
  171. 'type_id' => array(
  172. 'size' => 'big',
  173. 'type' => 'int',
  174. 'not null' => TRUE,
  175. ),
  176. 'value' => array(
  177. 'size' => 'normal',
  178. 'type' => 'text',
  179. 'not null' => FALSE,
  180. ),
  181. 'rank' => array(
  182. 'size' => 'normal',
  183. 'type' => 'int',
  184. 'not null' => TRUE,
  185. 'default' => 0,
  186. ),
  187. ),
  188. 'unique keys' => array(
  189. 'acquisitionprop_c1' => array(
  190. 0 => 'acquisition_id',
  191. 1 => 'type_id',
  192. 2 => 'rank',
  193. ),
  194. ),
  195. 'indexes' => array(
  196. 'acquisitionprop_idx1' => array(
  197. 0 => 'acquisition_id',
  198. ),
  199. 'acquisitionprop_idx2' => array(
  200. 0 => 'type_id',
  201. ),
  202. ),
  203. 'primary key' => array(
  204. 0 => 'acquisitionprop_id',
  205. ),
  206. 'foreign keys' => array(
  207. 'acquisition' => array(
  208. 'table' => 'acquisition',
  209. 'columns' => array(
  210. 'acquisition_id' => 'acquisition_id',
  211. ),
  212. ),
  213. 'cvterm' => array(
  214. 'table' => 'cvterm',
  215. 'columns' => array(
  216. 'type_id' => 'cvterm_id',
  217. ),
  218. ),
  219. ),
  220. 'referring_tables' => array(
  221. ),
  222. );
  223. return $description;
  224. }
  225. /**
  226. * Implements hook_chado_schema_v1_3_acquisition_relationship()
  227. *
  228. * Purpose: To describe the structure of 'acquisition_relationship' to tripal
  229. * @see chado_insert_record()
  230. * @see chado_update_record()
  231. * @see chado_select_record()
  232. * @see chado_generate_var()
  233. * @see chado_expan_var()
  234. *
  235. * @return
  236. * An array describing the 'acquisition_relationship' table
  237. *
  238. * @ingroup tripal_chado_v1.3_schema_api
  239. *
  240. */
  241. function tripal_chado_chado_schema_v1_3_acquisition_relationship() {
  242. $description = array(
  243. 'description' => '',
  244. 'table' => 'acquisition_relationship',
  245. 'fields' => array(
  246. 'acquisition_relationship_id' => array(
  247. 'size' => 'big',
  248. 'type' => 'serial',
  249. 'not null' => TRUE,
  250. ),
  251. 'subject_id' => array(
  252. 'size' => 'big',
  253. 'type' => 'int',
  254. 'not null' => TRUE,
  255. ),
  256. 'type_id' => array(
  257. 'size' => 'big',
  258. 'type' => 'int',
  259. 'not null' => TRUE,
  260. ),
  261. 'object_id' => array(
  262. 'size' => 'big',
  263. 'type' => 'int',
  264. 'not null' => TRUE,
  265. ),
  266. 'value' => array(
  267. 'size' => 'normal',
  268. 'type' => 'text',
  269. 'not null' => FALSE,
  270. ),
  271. 'rank' => array(
  272. 'size' => 'normal',
  273. 'type' => 'int',
  274. 'not null' => TRUE,
  275. 'default' => 0,
  276. ),
  277. ),
  278. 'unique keys' => array(
  279. 'acquisition_relationship_c1' => array(
  280. 0 => 'subject_id',
  281. 1 => 'object_id',
  282. 2 => 'type_id',
  283. 3 => 'rank',
  284. ),
  285. ),
  286. 'indexes' => array(
  287. 'acquisition_relationship_idx1' => array(
  288. 0 => 'subject_id',
  289. ),
  290. 'acquisition_relationship_idx2' => array(
  291. 0 => 'type_id',
  292. ),
  293. 'acquisition_relationship_idx3' => array(
  294. 0 => 'object_id',
  295. ),
  296. ),
  297. 'primary key' => array(
  298. 0 => 'acquisition_relationship_id',
  299. ),
  300. 'foreign keys' => array(
  301. 'acquisition' => array(
  302. 'table' => 'acquisition',
  303. 'columns' => array(
  304. 'subject_id' => 'acquisition_id',
  305. 'object_id' => 'acquisition_id',
  306. ),
  307. ),
  308. 'cvterm' => array(
  309. 'table' => 'cvterm',
  310. 'columns' => array(
  311. 'type_id' => 'cvterm_id',
  312. ),
  313. ),
  314. ),
  315. 'referring_tables' => array(
  316. ),
  317. );
  318. return $description;
  319. }
  320. /**
  321. * Implements hook_chado_schema_v1_3_analysis()
  322. *
  323. * Purpose: To describe the structure of 'analysis' to tripal
  324. * @see chado_insert_record()
  325. * @see chado_update_record()
  326. * @see chado_select_record()
  327. * @see chado_generate_var()
  328. * @see chado_expan_var()
  329. *
  330. * @return
  331. * An array describing the 'analysis' table
  332. *
  333. * @ingroup tripal_chado_v1.3_schema_api
  334. *
  335. */
  336. function tripal_chado_chado_schema_v1_3_analysis() {
  337. $description = array(
  338. 'description' => '',
  339. 'table' => 'analysis',
  340. 'fields' => array(
  341. 'analysis_id' => array(
  342. 'size' => 'big',
  343. 'type' => 'serial',
  344. 'not null' => TRUE,
  345. ),
  346. 'name' => array(
  347. 'size' => 'normal',
  348. 'type' => 'varchar',
  349. 'length' => '255',
  350. 'not null' => FALSE,
  351. ),
  352. 'description' => array(
  353. 'size' => 'normal',
  354. 'type' => 'text',
  355. 'not null' => FALSE,
  356. ),
  357. 'program' => array(
  358. 'size' => 'normal',
  359. 'type' => 'varchar',
  360. 'length' => '255',
  361. 'not null' => TRUE,
  362. ),
  363. 'programversion' => array(
  364. 'size' => 'normal',
  365. 'type' => 'varchar',
  366. 'length' => '255',
  367. 'not null' => TRUE,
  368. ),
  369. 'algorithm' => array(
  370. 'size' => 'normal',
  371. 'type' => 'varchar',
  372. 'length' => '255',
  373. 'not null' => FALSE,
  374. ),
  375. 'sourcename' => array(
  376. 'size' => 'normal',
  377. 'type' => 'varchar',
  378. 'length' => '255',
  379. 'not null' => FALSE,
  380. ),
  381. 'sourceversion' => array(
  382. 'size' => 'normal',
  383. 'type' => 'varchar',
  384. 'length' => '255',
  385. 'not null' => FALSE,
  386. ),
  387. 'sourceuri' => array(
  388. 'size' => 'normal',
  389. 'type' => 'text',
  390. 'not null' => FALSE,
  391. ),
  392. 'timeexecuted' => array(
  393. 'size' => 'normal',
  394. 'type' => 'datetime',
  395. 'not null' => TRUE,
  396. 'default' => 'now()',
  397. ),
  398. ),
  399. 'unique keys' => array(
  400. 'analysis_c1' => array(
  401. 0 => 'program',
  402. 1 => 'programversion',
  403. 2 => 'sourcename',
  404. ),
  405. ),
  406. 'primary key' => array(
  407. 0 => 'analysis_id',
  408. ),
  409. 'foreign keys' => array(
  410. ),
  411. 'referring_tables' => array(
  412. 0 => 'analysis_cvterm',
  413. 1 => 'analysis_dbxref',
  414. 2 => 'analysisfeature',
  415. 3 => 'analysis_organism',
  416. 4 => 'analysisprop',
  417. 5 => 'analysis_pub',
  418. 6 => 'analysis_relationship',
  419. 8 => 'nd_experiment_analysis',
  420. 9 => 'phylotree',
  421. 10 => 'project_analysis',
  422. 11 => 'quantification',
  423. ),
  424. );
  425. return $description;
  426. }
  427. /**
  428. * Implements hook_chado_schema_v1_3_analysis_cvterm()
  429. *
  430. * Purpose: To describe the structure of 'analysis_cvterm' to tripal
  431. * @see chado_insert_record()
  432. * @see chado_update_record()
  433. * @see chado_select_record()
  434. * @see chado_generate_var()
  435. * @see chado_expan_var()
  436. *
  437. * @return
  438. * An array describing the 'analysis_cvterm' table
  439. *
  440. * @ingroup tripal_chado_v1.3_schema_api
  441. *
  442. */
  443. function tripal_chado_chado_schema_v1_3_analysis_cvterm() {
  444. $description = array(
  445. 'description' => '',
  446. 'table' => 'analysis_cvterm',
  447. 'fields' => array(
  448. 'analysis_cvterm_id' => array(
  449. 'size' => 'big',
  450. 'type' => 'serial',
  451. 'not null' => TRUE,
  452. ),
  453. 'analysis_id' => array(
  454. 'size' => 'big',
  455. 'type' => 'int',
  456. 'not null' => TRUE,
  457. ),
  458. 'cvterm_id' => array(
  459. 'size' => 'big',
  460. 'type' => 'int',
  461. 'not null' => TRUE,
  462. ),
  463. 'is_not' => array(
  464. 'size' => 'normal',
  465. 'type' => 'boolean',
  466. 'not null' => TRUE,
  467. 'default' => FALSE,
  468. ),
  469. 'rank' => array(
  470. 'size' => 'normal',
  471. 'type' => 'int',
  472. 'not null' => TRUE,
  473. 'default' => 0,
  474. ),
  475. ),
  476. 'unique keys' => array(
  477. 'analysis_cvterm_c1' => array(
  478. 0 => 'analysis_id',
  479. 1 => 'cvterm_id',
  480. 2 => 'rank',
  481. ),
  482. ),
  483. 'indexes' => array(
  484. 'analysis_cvterm_idx1' => array(
  485. 0 => 'analysis_id',
  486. ),
  487. 'analysis_cvterm_idx2' => array(
  488. 0 => 'cvterm_id',
  489. ),
  490. ),
  491. 'primary key' => array(
  492. 0 => 'analysis_cvterm_id',
  493. ),
  494. 'foreign keys' => array(
  495. 'analysis' => array(
  496. 'table' => 'analysis',
  497. 'columns' => array(
  498. 'analysis_id' => 'analysis_id',
  499. ),
  500. ),
  501. 'cvterm' => array(
  502. 'table' => 'cvterm',
  503. 'columns' => array(
  504. 'cvterm_id' => 'cvterm_id',
  505. ),
  506. ),
  507. ),
  508. 'referring_tables' => array(
  509. ),
  510. );
  511. return $description;
  512. }
  513. /**
  514. * Implements hook_chado_schema_v1_3_analysis_dbxref()
  515. *
  516. * Purpose: To describe the structure of 'analysis_dbxref' to tripal
  517. * @see chado_insert_record()
  518. * @see chado_update_record()
  519. * @see chado_select_record()
  520. * @see chado_generate_var()
  521. * @see chado_expan_var()
  522. *
  523. * @return
  524. * An array describing the 'analysis_dbxref' table
  525. *
  526. * @ingroup tripal_chado_v1.3_schema_api
  527. *
  528. */
  529. function tripal_chado_chado_schema_v1_3_analysis_dbxref() {
  530. $description = array(
  531. 'description' => '',
  532. 'table' => 'analysis_dbxref',
  533. 'fields' => array(
  534. 'analysis_dbxref_id' => array(
  535. 'size' => 'big',
  536. 'type' => 'serial',
  537. 'not null' => TRUE,
  538. ),
  539. 'analysis_id' => array(
  540. 'size' => 'big',
  541. 'type' => 'int',
  542. 'not null' => TRUE,
  543. ),
  544. 'dbxref_id' => array(
  545. 'size' => 'big',
  546. 'type' => 'int',
  547. 'not null' => TRUE,
  548. ),
  549. 'is_current' => array(
  550. 'size' => 'normal',
  551. 'type' => 'boolean',
  552. 'not null' => TRUE,
  553. 'default' => 'true',
  554. ),
  555. ),
  556. 'unique keys' => array(
  557. 'analysis_dbxref_c1' => array(
  558. 0 => 'analysis_id',
  559. 1 => 'dbxref_id',
  560. ),
  561. ),
  562. 'indexes' => array(
  563. 'analysis_dbxref_idx1' => array(
  564. 0 => 'analysis_id',
  565. ),
  566. 'analysis_dbxref_idx2' => array(
  567. 0 => 'dbxref_id',
  568. ),
  569. ),
  570. 'primary key' => array(
  571. 0 => 'analysis_dbxref_id',
  572. ),
  573. 'foreign keys' => array(
  574. 'analysis' => array(
  575. 'table' => 'analysis',
  576. 'columns' => array(
  577. 'analysis_id' => 'analysis_id',
  578. ),
  579. ),
  580. 'dbxref' => array(
  581. 'table' => 'dbxref',
  582. 'columns' => array(
  583. 'dbxref_id' => 'dbxref_id',
  584. ),
  585. ),
  586. ),
  587. 'referring_tables' => array(
  588. ),
  589. );
  590. return $description;
  591. }
  592. /**
  593. * Implements hook_chado_schema_v1_3_analysisfeature()
  594. *
  595. * Purpose: To describe the structure of 'analysisfeature' to tripal
  596. * @see chado_insert_record()
  597. * @see chado_update_record()
  598. * @see chado_select_record()
  599. * @see chado_generate_var()
  600. * @see chado_expan_var()
  601. *
  602. * @return
  603. * An array describing the 'analysisfeature' table
  604. *
  605. * @ingroup tripal_chado_v1.3_schema_api
  606. *
  607. */
  608. function tripal_chado_chado_schema_v1_3_analysisfeature() {
  609. $description = array(
  610. 'description' => '',
  611. 'table' => 'analysisfeature',
  612. 'fields' => array(
  613. 'analysisfeature_id' => array(
  614. 'size' => 'big',
  615. 'type' => 'serial',
  616. 'not null' => TRUE,
  617. ),
  618. 'feature_id' => array(
  619. 'size' => 'big',
  620. 'type' => 'int',
  621. 'not null' => TRUE,
  622. ),
  623. 'analysis_id' => array(
  624. 'size' => 'big',
  625. 'type' => 'int',
  626. 'not null' => TRUE,
  627. ),
  628. 'rawscore' => array(
  629. 'size' => 'big',
  630. 'type' => 'float',
  631. 'not null' => FALSE,
  632. ),
  633. 'normscore' => array(
  634. 'size' => 'big',
  635. 'type' => 'float',
  636. 'not null' => FALSE,
  637. ),
  638. 'significance' => array(
  639. 'size' => 'big',
  640. 'type' => 'float',
  641. 'not null' => FALSE,
  642. ),
  643. 'identity' => array(
  644. 'size' => 'big',
  645. 'type' => 'float',
  646. 'not null' => FALSE,
  647. ),
  648. ),
  649. 'unique keys' => array(
  650. 'analysisfeature_c1' => array(
  651. 0 => 'feature_id',
  652. 1 => 'analysis_id',
  653. ),
  654. ),
  655. 'indexes' => array(
  656. 'analysisfeature_idx1' => array(
  657. 0 => 'feature_id',
  658. ),
  659. 'analysisfeature_idx2' => array(
  660. 0 => 'analysis_id',
  661. ),
  662. ),
  663. 'primary key' => array(
  664. 0 => 'analysisfeature_id',
  665. ),
  666. 'foreign keys' => array(
  667. 'feature' => array(
  668. 'table' => 'feature',
  669. 'columns' => array(
  670. 'feature_id' => 'feature_id',
  671. ),
  672. ),
  673. 'analysis' => array(
  674. 'table' => 'analysis',
  675. 'columns' => array(
  676. 'analysis_id' => 'analysis_id',
  677. ),
  678. ),
  679. ),
  680. 'referring_tables' => array(
  681. 0 => 'analysisfeatureprop',
  682. ),
  683. );
  684. return $description;
  685. }
  686. /**
  687. * Implements hook_chado_schema_v1_3_analysisfeatureprop()
  688. *
  689. * Purpose: To describe the structure of 'analysisfeatureprop' to tripal
  690. * @see chado_insert_record()
  691. * @see chado_update_record()
  692. * @see chado_select_record()
  693. * @see chado_generate_var()
  694. * @see chado_expan_var()
  695. *
  696. * @return
  697. * An array describing the 'analysisfeatureprop' table
  698. *
  699. * @ingroup tripal_chado_v1.3_schema_api
  700. *
  701. */
  702. function tripal_chado_chado_schema_v1_3_analysisfeatureprop() {
  703. $description = array(
  704. 'description' => '',
  705. 'table' => 'analysisfeatureprop',
  706. 'fields' => array(
  707. 'analysisfeatureprop_id' => array(
  708. 'size' => 'big',
  709. 'type' => 'serial',
  710. 'not null' => TRUE,
  711. ),
  712. 'analysisfeature_id' => array(
  713. 'size' => 'big',
  714. 'type' => 'int',
  715. 'not null' => TRUE,
  716. ),
  717. 'type_id' => array(
  718. 'size' => 'big',
  719. 'type' => 'int',
  720. 'not null' => TRUE,
  721. ),
  722. 'value' => array(
  723. 'size' => 'normal',
  724. 'type' => 'text',
  725. 'not null' => FALSE,
  726. ),
  727. 'rank' => array(
  728. 'size' => 'normal',
  729. 'type' => 'int',
  730. 'not null' => TRUE,
  731. ),
  732. ),
  733. 'unique keys' => array(
  734. 'analysisfeature_id_type_id_rank' => array(
  735. 0 => 'analysisfeature_id',
  736. 1 => 'type_id',
  737. 2 => 'rank',
  738. ),
  739. ),
  740. 'indexes' => array(
  741. 'analysisfeatureprop_idx1' => array(
  742. 0 => 'analysisfeature_id',
  743. ),
  744. 'analysisfeatureprop_idx2' => array(
  745. 0 => 'type_id',
  746. ),
  747. ),
  748. 'primary key' => array(
  749. 0 => 'analysisfeatureprop_id',
  750. ),
  751. 'foreign keys' => array(
  752. 'analysisfeature' => array(
  753. 'table' => 'analysisfeature',
  754. 'columns' => array(
  755. 'analysisfeature_id' => 'analysisfeature_id',
  756. ),
  757. ),
  758. 'cvterm' => array(
  759. 'table' => 'cvterm',
  760. 'columns' => array(
  761. 'type_id' => 'cvterm_id',
  762. ),
  763. ),
  764. ),
  765. 'referring_tables' => array(
  766. ),
  767. );
  768. return $description;
  769. }
  770. /**
  771. * Implements hook_chado_schema_v1_3_analysis_organism()
  772. *
  773. * Purpose: To describe the structure of 'analysis_organism' to tripal
  774. * @see chado_insert_record()
  775. * @see chado_update_record()
  776. * @see chado_select_record()
  777. * @see chado_generate_var()
  778. * @see chado_expan_var()
  779. *
  780. * @return
  781. * An array describing the 'analysis_organism' table
  782. *
  783. * @ingroup tripal_chado_v1.3_schema_api
  784. *
  785. */
  786. function tripal_chado_chado_schema_v1_3_analysis_organism() {
  787. $description = array(
  788. 'description' => '',
  789. 'table' => 'analysis_organism',
  790. 'fields' => array(
  791. 'analysis_id' => array(
  792. 'size' => 'normal',
  793. 'type' => 'int',
  794. 'not null' => TRUE,
  795. ),
  796. 'organism_id' => array(
  797. 'size' => 'normal',
  798. 'type' => 'int',
  799. 'not null' => TRUE,
  800. ),
  801. ),
  802. 'indexes' => array(
  803. 'networkmod_qtl_indx0' => array(
  804. 0 => 'analysis_id',
  805. ),
  806. 'networkmod_qtl_indx1' => array(
  807. 0 => 'organism_id',
  808. ),
  809. ),
  810. 'foreign keys' => array(
  811. 'analysis' => array(
  812. 'table' => 'analysis',
  813. 'columns' => array(
  814. 'analysis_id' => 'analysis_id',
  815. ),
  816. ),
  817. 'organism' => array(
  818. 'table' => 'organism',
  819. 'columns' => array(
  820. 'organism_id' => 'organism_id',
  821. ),
  822. ),
  823. ),
  824. 'referring_tables' => array(
  825. ),
  826. );
  827. return $description;
  828. }
  829. /**
  830. * Implements hook_chado_schema_v1_3_analysisprop()
  831. *
  832. * Purpose: To describe the structure of 'analysisprop' to tripal
  833. * @see chado_insert_record()
  834. * @see chado_update_record()
  835. * @see chado_select_record()
  836. * @see chado_generate_var()
  837. * @see chado_expan_var()
  838. *
  839. * @return
  840. * An array describing the 'analysisprop' table
  841. *
  842. * @ingroup tripal_chado_v1.3_schema_api
  843. *
  844. */
  845. function tripal_chado_chado_schema_v1_3_analysisprop() {
  846. $description = array(
  847. 'description' => '',
  848. 'table' => 'analysisprop',
  849. 'fields' => array(
  850. 'analysisprop_id' => array(
  851. 'size' => 'big',
  852. 'type' => 'serial',
  853. 'not null' => TRUE,
  854. ),
  855. 'analysis_id' => array(
  856. 'size' => 'big',
  857. 'type' => 'int',
  858. 'not null' => TRUE,
  859. ),
  860. 'type_id' => array(
  861. 'size' => 'big',
  862. 'type' => 'int',
  863. 'not null' => TRUE,
  864. ),
  865. 'value' => array(
  866. 'size' => 'normal',
  867. 'type' => 'text',
  868. 'not null' => FALSE,
  869. ),
  870. 'rank' => array(
  871. 'size' => 'normal',
  872. 'type' => 'int',
  873. 'not null' => TRUE,
  874. 'default' => 0,
  875. ),
  876. ),
  877. 'unique keys' => array(
  878. 'analysisprop_c1' => array(
  879. 0 => 'analysis_id',
  880. 1 => 'type_id',
  881. 2 => 'rank',
  882. ),
  883. ),
  884. 'indexes' => array(
  885. 'analysisprop_idx1' => array(
  886. 0 => 'analysis_id',
  887. ),
  888. 'analysisprop_idx2' => array(
  889. 0 => 'type_id',
  890. ),
  891. ),
  892. 'primary key' => array(
  893. 0 => 'analysisprop_id',
  894. ),
  895. 'foreign keys' => array(
  896. 'analysis' => array(
  897. 'table' => 'analysis',
  898. 'columns' => array(
  899. 'analysis_id' => 'analysis_id',
  900. ),
  901. ),
  902. 'cvterm' => array(
  903. 'table' => 'cvterm',
  904. 'columns' => array(
  905. 'type_id' => 'cvterm_id',
  906. ),
  907. ),
  908. ),
  909. 'referring_tables' => array(
  910. ),
  911. );
  912. return $description;
  913. }
  914. /**
  915. * Implements hook_chado_schema_v1_3_analysis_pub()
  916. *
  917. * Purpose: To describe the structure of 'analysis_pub' to tripal
  918. * @see chado_insert_record()
  919. * @see chado_update_record()
  920. * @see chado_select_record()
  921. * @see chado_generate_var()
  922. * @see chado_expan_var()
  923. *
  924. * @return
  925. * An array describing the 'analysis_pub' table
  926. *
  927. * @ingroup tripal_chado_v1.3_schema_api
  928. *
  929. */
  930. function tripal_chado_chado_schema_v1_3_analysis_pub() {
  931. $description = array(
  932. 'description' => '',
  933. 'table' => 'analysis_pub',
  934. 'fields' => array(
  935. 'analysis_pub_id' => array(
  936. 'size' => 'big',
  937. 'type' => 'serial',
  938. 'not null' => TRUE,
  939. ),
  940. 'analysis_id' => array(
  941. 'size' => 'big',
  942. 'type' => 'int',
  943. 'not null' => TRUE,
  944. ),
  945. 'pub_id' => array(
  946. 'size' => 'big',
  947. 'type' => 'int',
  948. 'not null' => TRUE,
  949. ),
  950. ),
  951. 'unique keys' => array(
  952. 'analysis_pub_c1' => array(
  953. 0 => 'analysis_id',
  954. 1 => 'pub_id',
  955. ),
  956. ),
  957. 'indexes' => array(
  958. 'analysis_pub_idx1' => array(
  959. 0 => 'analysis_id',
  960. ),
  961. 'analysis_pub_idx2' => array(
  962. 0 => 'pub_id',
  963. ),
  964. ),
  965. 'primary key' => array(
  966. 0 => 'analysis_pub_id',
  967. ),
  968. 'foreign keys' => array(
  969. 'analysis' => array(
  970. 'table' => 'analysis',
  971. 'columns' => array(
  972. 'analysis_id' => 'analysis_id',
  973. ),
  974. ),
  975. 'pub' => array(
  976. 'table' => 'pub',
  977. 'columns' => array(
  978. 'pub_id' => 'pub_id',
  979. ),
  980. ),
  981. ),
  982. 'referring_tables' => array(
  983. ),
  984. );
  985. return $description;
  986. }
  987. /**
  988. * Implements hook_chado_schema_v1_3_analysis_relationship()
  989. *
  990. * Purpose: To describe the structure of 'analysis_relationship' to tripal
  991. * @see chado_insert_record()
  992. * @see chado_update_record()
  993. * @see chado_select_record()
  994. * @see chado_generate_var()
  995. * @see chado_expan_var()
  996. *
  997. * @return
  998. * An array describing the 'analysis_relationship' table
  999. *
  1000. * @ingroup tripal_chado_v1.3_schema_api
  1001. *
  1002. */
  1003. function tripal_chado_chado_schema_v1_3_analysis_relationship() {
  1004. $description = array(
  1005. 'description' => '',
  1006. 'table' => 'analysis_relationship',
  1007. 'fields' => array(
  1008. 'analysis_relationship_id' => array(
  1009. 'size' => 'big',
  1010. 'type' => 'serial',
  1011. 'not null' => TRUE,
  1012. ),
  1013. 'subject_id' => array(
  1014. 'size' => 'big',
  1015. 'type' => 'int',
  1016. 'not null' => TRUE,
  1017. ),
  1018. 'object_id' => array(
  1019. 'size' => 'big',
  1020. 'type' => 'int',
  1021. 'not null' => TRUE,
  1022. ),
  1023. 'type_id' => array(
  1024. 'size' => 'big',
  1025. 'type' => 'int',
  1026. 'not null' => TRUE,
  1027. ),
  1028. 'value' => array(
  1029. 'size' => 'normal',
  1030. 'type' => 'text',
  1031. 'not null' => FALSE,
  1032. ),
  1033. 'rank' => array(
  1034. 'size' => 'normal',
  1035. 'type' => 'int',
  1036. 'not null' => TRUE,
  1037. 'default' => 0,
  1038. ),
  1039. ),
  1040. 'unique keys' => array(
  1041. 'analysis_relationship_c1' => array(
  1042. 0 => 'subject_id',
  1043. 1 => 'object_id',
  1044. 2 => 'type_id',
  1045. 3 => 'rank',
  1046. ),
  1047. ),
  1048. 'indexes' => array(
  1049. 'analysis_relationship_idx1' => array(
  1050. 0 => 'subject_id',
  1051. ),
  1052. 'analysis_relationship_idx2' => array(
  1053. 0 => 'object_id',
  1054. ),
  1055. 'analysis_relationship_idx3' => array(
  1056. 0 => 'type_id',
  1057. ),
  1058. ),
  1059. 'primary key' => array(
  1060. 0 => 'analysis_relationship_id',
  1061. ),
  1062. 'foreign keys' => array(
  1063. 'analysis' => array(
  1064. 'table' => 'analysis',
  1065. 'columns' => array(
  1066. 'subject_id' => 'analysis_id',
  1067. 'object_id' => 'analysis_id',
  1068. ),
  1069. ),
  1070. 'cvterm' => array(
  1071. 'table' => 'cvterm',
  1072. 'columns' => array(
  1073. 'type_id' => 'cvterm_id',
  1074. ),
  1075. ),
  1076. ),
  1077. 'referring_tables' => array(
  1078. ),
  1079. );
  1080. return $description;
  1081. }
  1082. /**
  1083. * Implements hook_chado_schema_v1_3_arraydesign()
  1084. *
  1085. * Purpose: To describe the structure of 'arraydesign' to tripal
  1086. * @see chado_insert_record()
  1087. * @see chado_update_record()
  1088. * @see chado_select_record()
  1089. * @see chado_generate_var()
  1090. * @see chado_expan_var()
  1091. *
  1092. * @return
  1093. * An array describing the 'arraydesign' table
  1094. *
  1095. * @ingroup tripal_chado_v1.3_schema_api
  1096. *
  1097. */
  1098. function tripal_chado_chado_schema_v1_3_arraydesign() {
  1099. $description = array(
  1100. 'description' => '',
  1101. 'table' => 'arraydesign',
  1102. 'fields' => array(
  1103. 'arraydesign_id' => array(
  1104. 'size' => 'big',
  1105. 'type' => 'serial',
  1106. 'not null' => TRUE,
  1107. ),
  1108. 'manufacturer_id' => array(
  1109. 'size' => 'big',
  1110. 'type' => 'int',
  1111. 'not null' => TRUE,
  1112. ),
  1113. 'platformtype_id' => array(
  1114. 'size' => 'big',
  1115. 'type' => 'int',
  1116. 'not null' => TRUE,
  1117. ),
  1118. 'substratetype_id' => array(
  1119. 'size' => 'big',
  1120. 'type' => 'int',
  1121. 'not null' => FALSE,
  1122. ),
  1123. 'protocol_id' => array(
  1124. 'size' => 'big',
  1125. 'type' => 'int',
  1126. 'not null' => FALSE,
  1127. ),
  1128. 'dbxref_id' => array(
  1129. 'size' => 'big',
  1130. 'type' => 'int',
  1131. 'not null' => FALSE,
  1132. ),
  1133. 'name' => array(
  1134. 'size' => 'normal',
  1135. 'type' => 'text',
  1136. 'not null' => TRUE,
  1137. ),
  1138. 'version' => array(
  1139. 'size' => 'normal',
  1140. 'type' => 'text',
  1141. 'not null' => FALSE,
  1142. ),
  1143. 'description' => array(
  1144. 'size' => 'normal',
  1145. 'type' => 'text',
  1146. 'not null' => FALSE,
  1147. ),
  1148. 'array_dimensions' => array(
  1149. 'size' => 'normal',
  1150. 'type' => 'text',
  1151. 'not null' => FALSE,
  1152. ),
  1153. 'element_dimensions' => array(
  1154. 'size' => 'normal',
  1155. 'type' => 'text',
  1156. 'not null' => FALSE,
  1157. ),
  1158. 'num_of_elements' => array(
  1159. 'size' => 'normal',
  1160. 'type' => 'int',
  1161. 'not null' => FALSE,
  1162. ),
  1163. 'num_array_columns' => array(
  1164. 'size' => 'normal',
  1165. 'type' => 'int',
  1166. 'not null' => FALSE,
  1167. ),
  1168. 'num_array_rows' => array(
  1169. 'size' => 'normal',
  1170. 'type' => 'int',
  1171. 'not null' => FALSE,
  1172. ),
  1173. 'num_grid_columns' => array(
  1174. 'size' => 'normal',
  1175. 'type' => 'int',
  1176. 'not null' => FALSE,
  1177. ),
  1178. 'num_grid_rows' => array(
  1179. 'size' => 'normal',
  1180. 'type' => 'int',
  1181. 'not null' => FALSE,
  1182. ),
  1183. 'num_sub_columns' => array(
  1184. 'size' => 'normal',
  1185. 'type' => 'int',
  1186. 'not null' => FALSE,
  1187. ),
  1188. 'num_sub_rows' => array(
  1189. 'size' => 'normal',
  1190. 'type' => 'int',
  1191. 'not null' => FALSE,
  1192. ),
  1193. ),
  1194. 'unique keys' => array(
  1195. 'arraydesign_c1' => array(
  1196. 0 => 'name',
  1197. ),
  1198. ),
  1199. 'indexes' => array(
  1200. 'arraydesign_idx1' => array(
  1201. 0 => 'manufacturer_id',
  1202. ),
  1203. 'arraydesign_idx2' => array(
  1204. 0 => 'platformtype_id',
  1205. ),
  1206. 'arraydesign_idx3' => array(
  1207. 0 => 'substratetype_id',
  1208. ),
  1209. 'arraydesign_idx4' => array(
  1210. 0 => 'protocol_id',
  1211. ),
  1212. 'arraydesign_idx5' => array(
  1213. 0 => 'dbxref_id',
  1214. ),
  1215. ),
  1216. 'primary key' => array(
  1217. 0 => 'arraydesign_id',
  1218. ),
  1219. 'foreign keys' => array(
  1220. 'contact' => array(
  1221. 'table' => 'contact',
  1222. 'columns' => array(
  1223. 'manufacturer_id' => 'contact_id',
  1224. ),
  1225. ),
  1226. 'cvterm' => array(
  1227. 'table' => 'cvterm',
  1228. 'columns' => array(
  1229. 'platformtype_id' => 'cvterm_id',
  1230. 'substratetype_id' => 'cvterm_id',
  1231. ),
  1232. ),
  1233. 'protocol' => array(
  1234. 'table' => 'protocol',
  1235. 'columns' => array(
  1236. 'protocol_id' => 'protocol_id',
  1237. ),
  1238. ),
  1239. 'dbxref' => array(
  1240. 'table' => 'dbxref',
  1241. 'columns' => array(
  1242. 'dbxref_id' => 'dbxref_id',
  1243. ),
  1244. ),
  1245. ),
  1246. 'referring_tables' => array(
  1247. 0 => 'arraydesignprop',
  1248. 1 => 'assay',
  1249. 2 => 'element',
  1250. ),
  1251. );
  1252. return $description;
  1253. }
  1254. /**
  1255. * Implements hook_chado_schema_v1_3_arraydesignprop()
  1256. *
  1257. * Purpose: To describe the structure of 'arraydesignprop' to tripal
  1258. * @see chado_insert_record()
  1259. * @see chado_update_record()
  1260. * @see chado_select_record()
  1261. * @see chado_generate_var()
  1262. * @see chado_expan_var()
  1263. *
  1264. * @return
  1265. * An array describing the 'arraydesignprop' table
  1266. *
  1267. * @ingroup tripal_chado_v1.3_schema_api
  1268. *
  1269. */
  1270. function tripal_chado_chado_schema_v1_3_arraydesignprop() {
  1271. $description = array(
  1272. 'description' => '',
  1273. 'table' => 'arraydesignprop',
  1274. 'fields' => array(
  1275. 'arraydesignprop_id' => array(
  1276. 'size' => 'big',
  1277. 'type' => 'serial',
  1278. 'not null' => TRUE,
  1279. ),
  1280. 'arraydesign_id' => array(
  1281. 'size' => 'big',
  1282. 'type' => 'int',
  1283. 'not null' => TRUE,
  1284. ),
  1285. 'type_id' => array(
  1286. 'size' => 'big',
  1287. 'type' => 'int',
  1288. 'not null' => TRUE,
  1289. ),
  1290. 'value' => array(
  1291. 'size' => 'normal',
  1292. 'type' => 'text',
  1293. 'not null' => FALSE,
  1294. ),
  1295. 'rank' => array(
  1296. 'size' => 'normal',
  1297. 'type' => 'int',
  1298. 'not null' => TRUE,
  1299. 'default' => 0,
  1300. ),
  1301. ),
  1302. 'unique keys' => array(
  1303. 'arraydesignprop_c1' => array(
  1304. 0 => 'arraydesign_id',
  1305. 1 => 'type_id',
  1306. 2 => 'rank',
  1307. ),
  1308. ),
  1309. 'indexes' => array(
  1310. 'arraydesignprop_idx1' => array(
  1311. 0 => 'arraydesign_id',
  1312. ),
  1313. 'arraydesignprop_idx2' => array(
  1314. 0 => 'type_id',
  1315. ),
  1316. ),
  1317. 'primary key' => array(
  1318. 0 => 'arraydesignprop_id',
  1319. ),
  1320. 'foreign keys' => array(
  1321. 'arraydesign' => array(
  1322. 'table' => 'arraydesign',
  1323. 'columns' => array(
  1324. 'arraydesign_id' => 'arraydesign_id',
  1325. ),
  1326. ),
  1327. 'cvterm' => array(
  1328. 'table' => 'cvterm',
  1329. 'columns' => array(
  1330. 'type_id' => 'cvterm_id',
  1331. ),
  1332. ),
  1333. ),
  1334. 'referring_tables' => array(
  1335. ),
  1336. );
  1337. return $description;
  1338. }
  1339. /**
  1340. * Implements hook_chado_schema_v1_3_assay()
  1341. *
  1342. * Purpose: To describe the structure of 'assay' to tripal
  1343. * @see chado_insert_record()
  1344. * @see chado_update_record()
  1345. * @see chado_select_record()
  1346. * @see chado_generate_var()
  1347. * @see chado_expan_var()
  1348. *
  1349. * @return
  1350. * An array describing the 'assay' table
  1351. *
  1352. * @ingroup tripal_chado_v1.3_schema_api
  1353. *
  1354. */
  1355. function tripal_chado_chado_schema_v1_3_assay() {
  1356. $description = array(
  1357. 'description' => '',
  1358. 'table' => 'assay',
  1359. 'fields' => array(
  1360. 'assay_id' => array(
  1361. 'size' => 'big',
  1362. 'type' => 'serial',
  1363. 'not null' => TRUE,
  1364. ),
  1365. 'arraydesign_id' => array(
  1366. 'size' => 'big',
  1367. 'type' => 'int',
  1368. 'not null' => TRUE,
  1369. ),
  1370. 'protocol_id' => array(
  1371. 'size' => 'big',
  1372. 'type' => 'int',
  1373. 'not null' => FALSE,
  1374. ),
  1375. 'assaydate' => array(
  1376. 'size' => 'normal',
  1377. 'type' => 'datetime',
  1378. 'not null' => FALSE,
  1379. 'default' => 'now()',
  1380. ),
  1381. 'arrayidentifier' => array(
  1382. 'size' => 'normal',
  1383. 'type' => 'text',
  1384. 'not null' => FALSE,
  1385. ),
  1386. 'arraybatchidentifier' => array(
  1387. 'size' => 'normal',
  1388. 'type' => 'text',
  1389. 'not null' => FALSE,
  1390. ),
  1391. 'operator_id' => array(
  1392. 'size' => 'big',
  1393. 'type' => 'int',
  1394. 'not null' => TRUE,
  1395. ),
  1396. 'dbxref_id' => array(
  1397. 'size' => 'big',
  1398. 'type' => 'int',
  1399. 'not null' => FALSE,
  1400. ),
  1401. 'name' => array(
  1402. 'size' => 'normal',
  1403. 'type' => 'text',
  1404. 'not null' => FALSE,
  1405. ),
  1406. 'description' => array(
  1407. 'size' => 'normal',
  1408. 'type' => 'text',
  1409. 'not null' => FALSE,
  1410. ),
  1411. ),
  1412. 'unique keys' => array(
  1413. 'assay_c1' => array(
  1414. 0 => 'name',
  1415. ),
  1416. ),
  1417. 'indexes' => array(
  1418. 'assay_idx1' => array(
  1419. 0 => 'arraydesign_id',
  1420. ),
  1421. 'assay_idx2' => array(
  1422. 0 => 'protocol_id',
  1423. ),
  1424. 'assay_idx3' => array(
  1425. 0 => 'operator_id',
  1426. ),
  1427. 'assay_idx4' => array(
  1428. 0 => 'dbxref_id',
  1429. ),
  1430. ),
  1431. 'primary key' => array(
  1432. 0 => 'assay_id',
  1433. ),
  1434. 'foreign keys' => array(
  1435. 'arraydesign' => array(
  1436. 'table' => 'arraydesign',
  1437. 'columns' => array(
  1438. 'arraydesign_id' => 'arraydesign_id',
  1439. ),
  1440. ),
  1441. 'protocol' => array(
  1442. 'table' => 'protocol',
  1443. 'columns' => array(
  1444. 'protocol_id' => 'protocol_id',
  1445. ),
  1446. ),
  1447. 'contact' => array(
  1448. 'table' => 'contact',
  1449. 'columns' => array(
  1450. 'operator_id' => 'contact_id',
  1451. ),
  1452. ),
  1453. 'dbxref' => array(
  1454. 'table' => 'dbxref',
  1455. 'columns' => array(
  1456. 'dbxref_id' => 'dbxref_id',
  1457. ),
  1458. ),
  1459. ),
  1460. 'referring_tables' => array(
  1461. 0 => 'acquisition',
  1462. 1 => 'assay_biomaterial',
  1463. 2 => 'assay_project',
  1464. 3 => 'assayprop',
  1465. 4 => 'control',
  1466. 5 => 'study_assay',
  1467. 6 => 'studyfactorvalue',
  1468. ),
  1469. );
  1470. return $description;
  1471. }
  1472. /**
  1473. * Implements hook_chado_schema_v1_3_assay_biomaterial()
  1474. *
  1475. * Purpose: To describe the structure of 'assay_biomaterial' to tripal
  1476. * @see chado_insert_record()
  1477. * @see chado_update_record()
  1478. * @see chado_select_record()
  1479. * @see chado_generate_var()
  1480. * @see chado_expan_var()
  1481. *
  1482. * @return
  1483. * An array describing the 'assay_biomaterial' table
  1484. *
  1485. * @ingroup tripal_chado_v1.3_schema_api
  1486. *
  1487. */
  1488. function tripal_chado_chado_schema_v1_3_assay_biomaterial() {
  1489. $description = array(
  1490. 'description' => '',
  1491. 'table' => 'assay_biomaterial',
  1492. 'fields' => array(
  1493. 'assay_biomaterial_id' => array(
  1494. 'size' => 'big',
  1495. 'type' => 'serial',
  1496. 'not null' => TRUE,
  1497. ),
  1498. 'assay_id' => array(
  1499. 'size' => 'big',
  1500. 'type' => 'int',
  1501. 'not null' => TRUE,
  1502. ),
  1503. 'biomaterial_id' => array(
  1504. 'size' => 'big',
  1505. 'type' => 'int',
  1506. 'not null' => TRUE,
  1507. ),
  1508. 'channel_id' => array(
  1509. 'size' => 'big',
  1510. 'type' => 'int',
  1511. 'not null' => FALSE,
  1512. ),
  1513. 'rank' => array(
  1514. 'size' => 'normal',
  1515. 'type' => 'int',
  1516. 'not null' => TRUE,
  1517. 'default' => 0,
  1518. ),
  1519. ),
  1520. 'unique keys' => array(
  1521. 'assay_biomaterial_c1' => array(
  1522. 0 => 'assay_id',
  1523. 1 => 'biomaterial_id',
  1524. 2 => 'channel_id',
  1525. 3 => 'rank',
  1526. ),
  1527. ),
  1528. 'indexes' => array(
  1529. 'assay_biomaterial_idx1' => array(
  1530. 0 => 'assay_id',
  1531. ),
  1532. 'assay_biomaterial_idx2' => array(
  1533. 0 => 'biomaterial_id',
  1534. ),
  1535. 'assay_biomaterial_idx3' => array(
  1536. 0 => 'channel_id',
  1537. ),
  1538. ),
  1539. 'primary key' => array(
  1540. 0 => 'assay_biomaterial_id',
  1541. ),
  1542. 'foreign keys' => array(
  1543. 'assay' => array(
  1544. 'table' => 'assay',
  1545. 'columns' => array(
  1546. 'assay_id' => 'assay_id',
  1547. ),
  1548. ),
  1549. 'biomaterial' => array(
  1550. 'table' => 'biomaterial',
  1551. 'columns' => array(
  1552. 'biomaterial_id' => 'biomaterial_id',
  1553. ),
  1554. ),
  1555. 'channel' => array(
  1556. 'table' => 'channel',
  1557. 'columns' => array(
  1558. 'channel_id' => 'channel_id',
  1559. ),
  1560. ),
  1561. ),
  1562. 'referring_tables' => array(
  1563. ),
  1564. );
  1565. return $description;
  1566. }
  1567. /**
  1568. * Implements hook_chado_schema_v1_3_assay_project()
  1569. *
  1570. * Purpose: To describe the structure of 'assay_project' to tripal
  1571. * @see chado_insert_record()
  1572. * @see chado_update_record()
  1573. * @see chado_select_record()
  1574. * @see chado_generate_var()
  1575. * @see chado_expan_var()
  1576. *
  1577. * @return
  1578. * An array describing the 'assay_project' table
  1579. *
  1580. * @ingroup tripal_chado_v1.3_schema_api
  1581. *
  1582. */
  1583. function tripal_chado_chado_schema_v1_3_assay_project() {
  1584. $description = array(
  1585. 'description' => '',
  1586. 'table' => 'assay_project',
  1587. 'fields' => array(
  1588. 'assay_project_id' => array(
  1589. 'size' => 'big',
  1590. 'type' => 'serial',
  1591. 'not null' => TRUE,
  1592. ),
  1593. 'assay_id' => array(
  1594. 'size' => 'big',
  1595. 'type' => 'int',
  1596. 'not null' => TRUE,
  1597. ),
  1598. 'project_id' => array(
  1599. 'size' => 'big',
  1600. 'type' => 'int',
  1601. 'not null' => TRUE,
  1602. ),
  1603. ),
  1604. 'unique keys' => array(
  1605. 'assay_project_c1' => array(
  1606. 0 => 'assay_id',
  1607. 1 => 'project_id',
  1608. ),
  1609. ),
  1610. 'indexes' => array(
  1611. 'assay_project_idx1' => array(
  1612. 0 => 'assay_id',
  1613. ),
  1614. 'assay_project_idx2' => array(
  1615. 0 => 'project_id',
  1616. ),
  1617. ),
  1618. 'primary key' => array(
  1619. 0 => 'assay_project_id',
  1620. ),
  1621. 'foreign keys' => array(
  1622. 'assay' => array(
  1623. 'table' => 'assay',
  1624. 'columns' => array(
  1625. 'assay_id' => 'assay_id',
  1626. ),
  1627. ),
  1628. 'project' => array(
  1629. 'table' => 'project',
  1630. 'columns' => array(
  1631. 'project_id' => 'project_id',
  1632. ),
  1633. ),
  1634. ),
  1635. 'referring_tables' => array(
  1636. ),
  1637. );
  1638. return $description;
  1639. }
  1640. /**
  1641. * Implements hook_chado_schema_v1_3_assayprop()
  1642. *
  1643. * Purpose: To describe the structure of 'assayprop' to tripal
  1644. * @see chado_insert_record()
  1645. * @see chado_update_record()
  1646. * @see chado_select_record()
  1647. * @see chado_generate_var()
  1648. * @see chado_expan_var()
  1649. *
  1650. * @return
  1651. * An array describing the 'assayprop' table
  1652. *
  1653. * @ingroup tripal_chado_v1.3_schema_api
  1654. *
  1655. */
  1656. function tripal_chado_chado_schema_v1_3_assayprop() {
  1657. $description = array(
  1658. 'description' => '',
  1659. 'table' => 'assayprop',
  1660. 'fields' => array(
  1661. 'assayprop_id' => array(
  1662. 'size' => 'big',
  1663. 'type' => 'serial',
  1664. 'not null' => TRUE,
  1665. ),
  1666. 'assay_id' => array(
  1667. 'size' => 'big',
  1668. 'type' => 'int',
  1669. 'not null' => TRUE,
  1670. ),
  1671. 'type_id' => array(
  1672. 'size' => 'big',
  1673. 'type' => 'int',
  1674. 'not null' => TRUE,
  1675. ),
  1676. 'value' => array(
  1677. 'size' => 'normal',
  1678. 'type' => 'text',
  1679. 'not null' => FALSE,
  1680. ),
  1681. 'rank' => array(
  1682. 'size' => 'normal',
  1683. 'type' => 'int',
  1684. 'not null' => TRUE,
  1685. 'default' => 0,
  1686. ),
  1687. ),
  1688. 'unique keys' => array(
  1689. 'assayprop_c1' => array(
  1690. 0 => 'assay_id',
  1691. 1 => 'type_id',
  1692. 2 => 'rank',
  1693. ),
  1694. ),
  1695. 'indexes' => array(
  1696. 'assayprop_idx1' => array(
  1697. 0 => 'assay_id',
  1698. ),
  1699. 'assayprop_idx2' => array(
  1700. 0 => 'type_id',
  1701. ),
  1702. ),
  1703. 'primary key' => array(
  1704. 0 => 'assayprop_id',
  1705. ),
  1706. 'foreign keys' => array(
  1707. 'assay' => array(
  1708. 'table' => 'assay',
  1709. 'columns' => array(
  1710. 'assay_id' => 'assay_id',
  1711. ),
  1712. ),
  1713. 'cvterm' => array(
  1714. 'table' => 'cvterm',
  1715. 'columns' => array(
  1716. 'type_id' => 'cvterm_id',
  1717. ),
  1718. ),
  1719. ),
  1720. 'referring_tables' => array(
  1721. ),
  1722. );
  1723. return $description;
  1724. }
  1725. /**
  1726. * Implements hook_chado_schema_v1_3_biomaterial()
  1727. *
  1728. * Purpose: To describe the structure of 'biomaterial' to tripal
  1729. * @see chado_insert_record()
  1730. * @see chado_update_record()
  1731. * @see chado_select_record()
  1732. * @see chado_generate_var()
  1733. * @see chado_expan_var()
  1734. *
  1735. * @return
  1736. * An array describing the 'biomaterial' table
  1737. *
  1738. * @ingroup tripal_chado_v1.3_schema_api
  1739. *
  1740. */
  1741. function tripal_chado_chado_schema_v1_3_biomaterial() {
  1742. $description = array(
  1743. 'description' => '',
  1744. 'table' => 'biomaterial',
  1745. 'fields' => array(
  1746. 'biomaterial_id' => array(
  1747. 'size' => 'big',
  1748. 'type' => 'serial',
  1749. 'not null' => TRUE,
  1750. ),
  1751. 'taxon_id' => array(
  1752. 'size' => 'big',
  1753. 'type' => 'int',
  1754. 'not null' => FALSE,
  1755. ),
  1756. 'biosourceprovider_id' => array(
  1757. 'size' => 'big',
  1758. 'type' => 'int',
  1759. 'not null' => FALSE,
  1760. ),
  1761. 'dbxref_id' => array(
  1762. 'size' => 'big',
  1763. 'type' => 'int',
  1764. 'not null' => FALSE,
  1765. ),
  1766. 'name' => array(
  1767. 'size' => 'normal',
  1768. 'type' => 'text',
  1769. 'not null' => FALSE,
  1770. ),
  1771. 'description' => array(
  1772. 'size' => 'normal',
  1773. 'type' => 'text',
  1774. 'not null' => FALSE,
  1775. ),
  1776. ),
  1777. 'unique keys' => array(
  1778. 'biomaterial_c1' => array(
  1779. 0 => 'name',
  1780. ),
  1781. ),
  1782. 'indexes' => array(
  1783. 'biomaterial_idx1' => array(
  1784. 0 => 'taxon_id',
  1785. ),
  1786. 'biomaterial_idx2' => array(
  1787. 0 => 'biosourceprovider_id',
  1788. ),
  1789. 'biomaterial_idx3' => array(
  1790. 0 => 'dbxref_id',
  1791. ),
  1792. ),
  1793. 'primary key' => array(
  1794. 0 => 'biomaterial_id',
  1795. ),
  1796. 'foreign keys' => array(
  1797. 'organism' => array(
  1798. 'table' => 'organism',
  1799. 'columns' => array(
  1800. 'taxon_id' => 'organism_id',
  1801. ),
  1802. ),
  1803. 'contact' => array(
  1804. 'table' => 'contact',
  1805. 'columns' => array(
  1806. 'biosourceprovider_id' => 'contact_id',
  1807. ),
  1808. ),
  1809. 'dbxref' => array(
  1810. 'table' => 'dbxref',
  1811. 'columns' => array(
  1812. 'dbxref_id' => 'dbxref_id',
  1813. ),
  1814. ),
  1815. ),
  1816. 'referring_tables' => array(
  1817. 0 => 'assay_biomaterial',
  1818. 1 => 'biomaterial_dbxref',
  1819. 2 => 'biomaterialprop',
  1820. 3 => 'biomaterial_relationship',
  1821. 5 => 'biomaterial_treatment',
  1822. 6 => 'treatment',
  1823. ),
  1824. );
  1825. return $description;
  1826. }
  1827. /**
  1828. * Implements hook_chado_schema_v1_3_biomaterial_dbxref()
  1829. *
  1830. * Purpose: To describe the structure of 'biomaterial_dbxref' to tripal
  1831. * @see chado_insert_record()
  1832. * @see chado_update_record()
  1833. * @see chado_select_record()
  1834. * @see chado_generate_var()
  1835. * @see chado_expan_var()
  1836. *
  1837. * @return
  1838. * An array describing the 'biomaterial_dbxref' table
  1839. *
  1840. * @ingroup tripal_chado_v1.3_schema_api
  1841. *
  1842. */
  1843. function tripal_chado_chado_schema_v1_3_biomaterial_dbxref() {
  1844. $description = array(
  1845. 'description' => '',
  1846. 'table' => 'biomaterial_dbxref',
  1847. 'fields' => array(
  1848. 'biomaterial_dbxref_id' => array(
  1849. 'size' => 'big',
  1850. 'type' => 'serial',
  1851. 'not null' => TRUE,
  1852. ),
  1853. 'biomaterial_id' => array(
  1854. 'size' => 'big',
  1855. 'type' => 'int',
  1856. 'not null' => TRUE,
  1857. ),
  1858. 'dbxref_id' => array(
  1859. 'size' => 'big',
  1860. 'type' => 'int',
  1861. 'not null' => TRUE,
  1862. ),
  1863. ),
  1864. 'unique keys' => array(
  1865. 'biomaterial_dbxref_c1' => array(
  1866. 0 => 'biomaterial_id',
  1867. 1 => 'dbxref_id',
  1868. ),
  1869. ),
  1870. 'indexes' => array(
  1871. 'biomaterial_dbxref_idx1' => array(
  1872. 0 => 'biomaterial_id',
  1873. ),
  1874. 'biomaterial_dbxref_idx2' => array(
  1875. 0 => 'dbxref_id',
  1876. ),
  1877. ),
  1878. 'primary key' => array(
  1879. 0 => 'biomaterial_dbxref_id',
  1880. ),
  1881. 'foreign keys' => array(
  1882. 'biomaterial' => array(
  1883. 'table' => 'biomaterial',
  1884. 'columns' => array(
  1885. 'biomaterial_id' => 'biomaterial_id',
  1886. ),
  1887. ),
  1888. 'dbxref' => array(
  1889. 'table' => 'dbxref',
  1890. 'columns' => array(
  1891. 'dbxref_id' => 'dbxref_id',
  1892. ),
  1893. ),
  1894. ),
  1895. 'referring_tables' => array(
  1896. ),
  1897. );
  1898. return $description;
  1899. }
  1900. /**
  1901. * Implements hook_chado_schema_v1_3_biomaterialprop()
  1902. *
  1903. * Purpose: To describe the structure of 'biomaterialprop' to tripal
  1904. * @see chado_insert_record()
  1905. * @see chado_update_record()
  1906. * @see chado_select_record()
  1907. * @see chado_generate_var()
  1908. * @see chado_expan_var()
  1909. *
  1910. * @return
  1911. * An array describing the 'biomaterialprop' table
  1912. *
  1913. * @ingroup tripal_chado_v1.3_schema_api
  1914. *
  1915. */
  1916. function tripal_chado_chado_schema_v1_3_biomaterialprop() {
  1917. $description = array(
  1918. 'description' => '',
  1919. 'table' => 'biomaterialprop',
  1920. 'fields' => array(
  1921. 'biomaterialprop_id' => array(
  1922. 'size' => 'big',
  1923. 'type' => 'serial',
  1924. 'not null' => TRUE,
  1925. ),
  1926. 'biomaterial_id' => array(
  1927. 'size' => 'big',
  1928. 'type' => 'int',
  1929. 'not null' => TRUE,
  1930. ),
  1931. 'type_id' => array(
  1932. 'size' => 'big',
  1933. 'type' => 'int',
  1934. 'not null' => TRUE,
  1935. ),
  1936. 'value' => array(
  1937. 'size' => 'normal',
  1938. 'type' => 'text',
  1939. 'not null' => FALSE,
  1940. ),
  1941. 'rank' => array(
  1942. 'size' => 'normal',
  1943. 'type' => 'int',
  1944. 'not null' => TRUE,
  1945. 'default' => 0,
  1946. ),
  1947. ),
  1948. 'unique keys' => array(
  1949. 'biomaterialprop_c1' => array(
  1950. 0 => 'biomaterial_id',
  1951. 1 => 'type_id',
  1952. 2 => 'rank',
  1953. ),
  1954. ),
  1955. 'indexes' => array(
  1956. 'biomaterialprop_idx1' => array(
  1957. 0 => 'biomaterial_id',
  1958. ),
  1959. 'biomaterialprop_idx2' => array(
  1960. 0 => 'type_id',
  1961. ),
  1962. ),
  1963. 'primary key' => array(
  1964. 0 => 'biomaterialprop_id',
  1965. ),
  1966. 'foreign keys' => array(
  1967. 'biomaterial' => array(
  1968. 'table' => 'biomaterial',
  1969. 'columns' => array(
  1970. 'biomaterial_id' => 'biomaterial_id',
  1971. ),
  1972. ),
  1973. 'cvterm' => array(
  1974. 'table' => 'cvterm',
  1975. 'columns' => array(
  1976. 'type_id' => 'cvterm_id',
  1977. ),
  1978. ),
  1979. ),
  1980. 'referring_tables' => array(
  1981. ),
  1982. );
  1983. return $description;
  1984. }
  1985. /**
  1986. * Implements hook_chado_schema_v1_3_biomaterial_relationship()
  1987. *
  1988. * Purpose: To describe the structure of 'biomaterial_relationship' to tripal
  1989. * @see chado_insert_record()
  1990. * @see chado_update_record()
  1991. * @see chado_select_record()
  1992. * @see chado_generate_var()
  1993. * @see chado_expan_var()
  1994. *
  1995. * @return
  1996. * An array describing the 'biomaterial_relationship' table
  1997. *
  1998. * @ingroup tripal_chado_v1.3_schema_api
  1999. *
  2000. */
  2001. function tripal_chado_chado_schema_v1_3_biomaterial_relationship() {
  2002. $description = array(
  2003. 'description' => '',
  2004. 'table' => 'biomaterial_relationship',
  2005. 'fields' => array(
  2006. 'biomaterial_relationship_id' => array(
  2007. 'size' => 'big',
  2008. 'type' => 'serial',
  2009. 'not null' => TRUE,
  2010. ),
  2011. 'subject_id' => array(
  2012. 'size' => 'big',
  2013. 'type' => 'int',
  2014. 'not null' => TRUE,
  2015. ),
  2016. 'type_id' => array(
  2017. 'size' => 'big',
  2018. 'type' => 'int',
  2019. 'not null' => TRUE,
  2020. ),
  2021. 'object_id' => array(
  2022. 'size' => 'big',
  2023. 'type' => 'int',
  2024. 'not null' => TRUE,
  2025. ),
  2026. ),
  2027. 'unique keys' => array(
  2028. 'biomaterial_relationship_c1' => array(
  2029. 0 => 'subject_id',
  2030. 1 => 'object_id',
  2031. 2 => 'type_id',
  2032. ),
  2033. ),
  2034. 'indexes' => array(
  2035. 'biomaterial_relationship_idx1' => array(
  2036. 0 => 'subject_id',
  2037. ),
  2038. 'biomaterial_relationship_idx2' => array(
  2039. 0 => 'object_id',
  2040. ),
  2041. 'biomaterial_relationship_idx3' => array(
  2042. 0 => 'type_id',
  2043. ),
  2044. ),
  2045. 'primary key' => array(
  2046. 0 => 'biomaterial_relationship_id',
  2047. ),
  2048. 'foreign keys' => array(
  2049. 'biomaterial' => array(
  2050. 'table' => 'biomaterial',
  2051. 'columns' => array(
  2052. 'subject_id' => 'biomaterial_id',
  2053. 'object_id' => 'biomaterial_id',
  2054. ),
  2055. ),
  2056. 'cvterm' => array(
  2057. 'table' => 'cvterm',
  2058. 'columns' => array(
  2059. 'type_id' => 'cvterm_id',
  2060. ),
  2061. ),
  2062. ),
  2063. 'referring_tables' => array(
  2064. ),
  2065. );
  2066. return $description;
  2067. }
  2068. /**
  2069. * Implements hook_chado_schema_v1_3_biomaterial_treatment()
  2070. *
  2071. * Purpose: To describe the structure of 'biomaterial_treatment' to tripal
  2072. * @see chado_insert_record()
  2073. * @see chado_update_record()
  2074. * @see chado_select_record()
  2075. * @see chado_generate_var()
  2076. * @see chado_expan_var()
  2077. *
  2078. * @return
  2079. * An array describing the 'biomaterial_treatment' table
  2080. *
  2081. * @ingroup tripal_chado_v1.3_schema_api
  2082. *
  2083. */
  2084. function tripal_chado_chado_schema_v1_3_biomaterial_treatment() {
  2085. $description = array(
  2086. 'description' => '',
  2087. 'table' => 'biomaterial_treatment',
  2088. 'fields' => array(
  2089. 'biomaterial_treatment_id' => array(
  2090. 'size' => 'big',
  2091. 'type' => 'serial',
  2092. 'not null' => TRUE,
  2093. ),
  2094. 'biomaterial_id' => array(
  2095. 'size' => 'big',
  2096. 'type' => 'int',
  2097. 'not null' => TRUE,
  2098. ),
  2099. 'treatment_id' => array(
  2100. 'size' => 'big',
  2101. 'type' => 'int',
  2102. 'not null' => TRUE,
  2103. ),
  2104. 'unittype_id' => array(
  2105. 'size' => 'big',
  2106. 'type' => 'int',
  2107. 'not null' => FALSE,
  2108. ),
  2109. 'value' => array(
  2110. 'size' => 'normal',
  2111. 'type' => 'float',
  2112. 'not null' => FALSE,
  2113. ),
  2114. 'rank' => array(
  2115. 'size' => 'normal',
  2116. 'type' => 'int',
  2117. 'not null' => TRUE,
  2118. 'default' => 0,
  2119. ),
  2120. ),
  2121. 'unique keys' => array(
  2122. 'biomaterial_treatment_c1' => array(
  2123. 0 => 'biomaterial_id',
  2124. 1 => 'treatment_id',
  2125. ),
  2126. ),
  2127. 'indexes' => array(
  2128. 'biomaterial_treatment_idx1' => array(
  2129. 0 => 'biomaterial_id',
  2130. ),
  2131. 'biomaterial_treatment_idx2' => array(
  2132. 0 => 'treatment_id',
  2133. ),
  2134. 'biomaterial_treatment_idx3' => array(
  2135. 0 => 'unittype_id',
  2136. ),
  2137. ),
  2138. 'primary key' => array(
  2139. 0 => 'biomaterial_treatment_id',
  2140. ),
  2141. 'foreign keys' => array(
  2142. 'biomaterial' => array(
  2143. 'table' => 'biomaterial',
  2144. 'columns' => array(
  2145. 'biomaterial_id' => 'biomaterial_id',
  2146. ),
  2147. ),
  2148. 'treatment' => array(
  2149. 'table' => 'treatment',
  2150. 'columns' => array(
  2151. 'treatment_id' => 'treatment_id',
  2152. ),
  2153. ),
  2154. 'cvterm' => array(
  2155. 'table' => 'cvterm',
  2156. 'columns' => array(
  2157. 'unittype_id' => 'cvterm_id',
  2158. ),
  2159. ),
  2160. ),
  2161. 'referring_tables' => array(
  2162. ),
  2163. );
  2164. return $description;
  2165. }
  2166. /**
  2167. * Implements hook_chado_schema_v1_3_cell_line()
  2168. *
  2169. * Purpose: To describe the structure of 'cell_line' to tripal
  2170. * @see chado_insert_record()
  2171. * @see chado_update_record()
  2172. * @see chado_select_record()
  2173. * @see chado_generate_var()
  2174. * @see chado_expan_var()
  2175. *
  2176. * @return
  2177. * An array describing the 'cell_line' table
  2178. *
  2179. * @ingroup tripal_chado_v1.3_schema_api
  2180. *
  2181. */
  2182. function tripal_chado_chado_schema_v1_3_cell_line() {
  2183. $description = array(
  2184. 'description' => '',
  2185. 'table' => 'cell_line',
  2186. 'fields' => array(
  2187. 'cell_line_id' => array(
  2188. 'size' => 'big',
  2189. 'type' => 'serial',
  2190. 'not null' => TRUE,
  2191. ),
  2192. 'name' => array(
  2193. 'size' => 'normal',
  2194. 'type' => 'varchar',
  2195. 'length' => '255',
  2196. 'not null' => FALSE,
  2197. ),
  2198. 'uniquename' => array(
  2199. 'size' => 'normal',
  2200. 'type' => 'varchar',
  2201. 'length' => '255',
  2202. 'not null' => TRUE,
  2203. ),
  2204. 'organism_id' => array(
  2205. 'size' => 'big',
  2206. 'type' => 'int',
  2207. 'not null' => TRUE,
  2208. ),
  2209. 'timeaccessioned' => array(
  2210. 'size' => 'normal',
  2211. 'type' => 'datetime',
  2212. 'not null' => TRUE,
  2213. 'default' => 'now()',
  2214. ),
  2215. 'timelastmodified' => array(
  2216. 'size' => 'normal',
  2217. 'type' => 'datetime',
  2218. 'not null' => TRUE,
  2219. 'default' => 'now()',
  2220. ),
  2221. ),
  2222. 'unique keys' => array(
  2223. 'cell_line_c1' => array(
  2224. 0 => 'uniquename',
  2225. 1 => 'organism_id',
  2226. ),
  2227. ),
  2228. 'primary key' => array(
  2229. 0 => 'cell_line_id',
  2230. ),
  2231. 'foreign keys' => array(
  2232. 'organism' => array(
  2233. 'table' => 'organism',
  2234. 'columns' => array(
  2235. 'organism_id' => 'organism_id',
  2236. ),
  2237. ),
  2238. ),
  2239. 'referring_tables' => array(
  2240. 0 => 'cell_line_cvterm',
  2241. 1 => 'cell_line_dbxref',
  2242. 2 => 'cell_line_feature',
  2243. 3 => 'cell_line_library',
  2244. 4 => 'cell_lineprop',
  2245. 5 => 'cell_line_pub',
  2246. 6 => 'cell_line_relationship',
  2247. 8 => 'cell_line_synonym',
  2248. ),
  2249. );
  2250. return $description;
  2251. }
  2252. /**
  2253. * Implements hook_chado_schema_v1_3_cell_line_cvterm()
  2254. *
  2255. * Purpose: To describe the structure of 'cell_line_cvterm' to tripal
  2256. * @see chado_insert_record()
  2257. * @see chado_update_record()
  2258. * @see chado_select_record()
  2259. * @see chado_generate_var()
  2260. * @see chado_expan_var()
  2261. *
  2262. * @return
  2263. * An array describing the 'cell_line_cvterm' table
  2264. *
  2265. * @ingroup tripal_chado_v1.3_schema_api
  2266. *
  2267. */
  2268. function tripal_chado_chado_schema_v1_3_cell_line_cvterm() {
  2269. $description = array(
  2270. 'description' => '',
  2271. 'table' => 'cell_line_cvterm',
  2272. 'fields' => array(
  2273. 'cell_line_cvterm_id' => array(
  2274. 'size' => 'big',
  2275. 'type' => 'serial',
  2276. 'not null' => TRUE,
  2277. ),
  2278. 'cell_line_id' => array(
  2279. 'size' => 'big',
  2280. 'type' => 'int',
  2281. 'not null' => TRUE,
  2282. ),
  2283. 'cvterm_id' => array(
  2284. 'size' => 'big',
  2285. 'type' => 'int',
  2286. 'not null' => TRUE,
  2287. ),
  2288. 'pub_id' => array(
  2289. 'size' => 'big',
  2290. 'type' => 'int',
  2291. 'not null' => TRUE,
  2292. ),
  2293. 'rank' => array(
  2294. 'size' => 'normal',
  2295. 'type' => 'int',
  2296. 'not null' => TRUE,
  2297. 'default' => 0,
  2298. ),
  2299. ),
  2300. 'unique keys' => array(
  2301. 'cell_line_cvterm_c1' => array(
  2302. 0 => 'cell_line_id',
  2303. 1 => 'cvterm_id',
  2304. 2 => 'pub_id',
  2305. 3 => 'rank',
  2306. ),
  2307. ),
  2308. 'primary key' => array(
  2309. 0 => 'cell_line_cvterm_id',
  2310. ),
  2311. 'foreign keys' => array(
  2312. 'cell_line' => array(
  2313. 'table' => 'cell_line',
  2314. 'columns' => array(
  2315. 'cell_line_id' => 'cell_line_id',
  2316. ),
  2317. ),
  2318. 'cvterm' => array(
  2319. 'table' => 'cvterm',
  2320. 'columns' => array(
  2321. 'cvterm_id' => 'cvterm_id',
  2322. ),
  2323. ),
  2324. 'pub' => array(
  2325. 'table' => 'pub',
  2326. 'columns' => array(
  2327. 'pub_id' => 'pub_id',
  2328. ),
  2329. ),
  2330. ),
  2331. 'referring_tables' => array(
  2332. 0 => 'cell_line_cvtermprop',
  2333. ),
  2334. );
  2335. return $description;
  2336. }
  2337. /**
  2338. * Implements hook_chado_schema_v1_3_cell_line_cvtermprop()
  2339. *
  2340. * Purpose: To describe the structure of 'cell_line_cvtermprop' to tripal
  2341. * @see chado_insert_record()
  2342. * @see chado_update_record()
  2343. * @see chado_select_record()
  2344. * @see chado_generate_var()
  2345. * @see chado_expan_var()
  2346. *
  2347. * @return
  2348. * An array describing the 'cell_line_cvtermprop' table
  2349. *
  2350. * @ingroup tripal_chado_v1.3_schema_api
  2351. *
  2352. */
  2353. function tripal_chado_chado_schema_v1_3_cell_line_cvtermprop() {
  2354. $description = array(
  2355. 'description' => '',
  2356. 'table' => 'cell_line_cvtermprop',
  2357. 'fields' => array(
  2358. 'cell_line_cvtermprop_id' => array(
  2359. 'size' => 'big',
  2360. 'type' => 'serial',
  2361. 'not null' => TRUE,
  2362. ),
  2363. 'cell_line_cvterm_id' => array(
  2364. 'size' => 'big',
  2365. 'type' => 'int',
  2366. 'not null' => TRUE,
  2367. ),
  2368. 'type_id' => array(
  2369. 'size' => 'big',
  2370. 'type' => 'int',
  2371. 'not null' => TRUE,
  2372. ),
  2373. 'value' => array(
  2374. 'size' => 'normal',
  2375. 'type' => 'text',
  2376. 'not null' => FALSE,
  2377. ),
  2378. 'rank' => array(
  2379. 'size' => 'normal',
  2380. 'type' => 'int',
  2381. 'not null' => TRUE,
  2382. 'default' => 0,
  2383. ),
  2384. ),
  2385. 'unique keys' => array(
  2386. 'cell_line_cvtermprop_c1' => array(
  2387. 0 => 'cell_line_cvterm_id',
  2388. 1 => 'type_id',
  2389. 2 => 'rank',
  2390. ),
  2391. ),
  2392. 'primary key' => array(
  2393. 0 => 'cell_line_cvtermprop_id',
  2394. ),
  2395. 'foreign keys' => array(
  2396. 'cell_line_cvterm' => array(
  2397. 'table' => 'cell_line_cvterm',
  2398. 'columns' => array(
  2399. 'cell_line_cvterm_id' => 'cell_line_cvterm_id',
  2400. ),
  2401. ),
  2402. 'cvterm' => array(
  2403. 'table' => 'cvterm',
  2404. 'columns' => array(
  2405. 'type_id' => 'cvterm_id',
  2406. ),
  2407. ),
  2408. ),
  2409. 'referring_tables' => array(
  2410. ),
  2411. );
  2412. return $description;
  2413. }
  2414. /**
  2415. * Implements hook_chado_schema_v1_3_cell_line_dbxref()
  2416. *
  2417. * Purpose: To describe the structure of 'cell_line_dbxref' to tripal
  2418. * @see chado_insert_record()
  2419. * @see chado_update_record()
  2420. * @see chado_select_record()
  2421. * @see chado_generate_var()
  2422. * @see chado_expan_var()
  2423. *
  2424. * @return
  2425. * An array describing the 'cell_line_dbxref' table
  2426. *
  2427. * @ingroup tripal_chado_v1.3_schema_api
  2428. *
  2429. */
  2430. function tripal_chado_chado_schema_v1_3_cell_line_dbxref() {
  2431. $description = array(
  2432. 'description' => '',
  2433. 'table' => 'cell_line_dbxref',
  2434. 'fields' => array(
  2435. 'cell_line_dbxref_id' => array(
  2436. 'size' => 'big',
  2437. 'type' => 'serial',
  2438. 'not null' => TRUE,
  2439. ),
  2440. 'cell_line_id' => array(
  2441. 'size' => 'big',
  2442. 'type' => 'int',
  2443. 'not null' => TRUE,
  2444. ),
  2445. 'dbxref_id' => array(
  2446. 'size' => 'big',
  2447. 'type' => 'int',
  2448. 'not null' => TRUE,
  2449. ),
  2450. 'is_current' => array(
  2451. 'size' => 'normal',
  2452. 'type' => 'boolean',
  2453. 'not null' => TRUE,
  2454. 'default' => 'true',
  2455. ),
  2456. ),
  2457. 'unique keys' => array(
  2458. 'cell_line_dbxref_c1' => array(
  2459. 0 => 'cell_line_id',
  2460. 1 => 'dbxref_id',
  2461. ),
  2462. ),
  2463. 'primary key' => array(
  2464. 0 => 'cell_line_dbxref_id',
  2465. ),
  2466. 'foreign keys' => array(
  2467. 'cell_line' => array(
  2468. 'table' => 'cell_line',
  2469. 'columns' => array(
  2470. 'cell_line_id' => 'cell_line_id',
  2471. ),
  2472. ),
  2473. 'dbxref' => array(
  2474. 'table' => 'dbxref',
  2475. 'columns' => array(
  2476. 'dbxref_id' => 'dbxref_id',
  2477. ),
  2478. ),
  2479. ),
  2480. 'referring_tables' => array(
  2481. ),
  2482. );
  2483. return $description;
  2484. }
  2485. /**
  2486. * Implements hook_chado_schema_v1_3_cell_line_feature()
  2487. *
  2488. * Purpose: To describe the structure of 'cell_line_feature' to tripal
  2489. * @see chado_insert_record()
  2490. * @see chado_update_record()
  2491. * @see chado_select_record()
  2492. * @see chado_generate_var()
  2493. * @see chado_expan_var()
  2494. *
  2495. * @return
  2496. * An array describing the 'cell_line_feature' table
  2497. *
  2498. * @ingroup tripal_chado_v1.3_schema_api
  2499. *
  2500. */
  2501. function tripal_chado_chado_schema_v1_3_cell_line_feature() {
  2502. $description = array(
  2503. 'description' => '',
  2504. 'table' => 'cell_line_feature',
  2505. 'fields' => array(
  2506. 'cell_line_feature_id' => array(
  2507. 'size' => 'big',
  2508. 'type' => 'serial',
  2509. 'not null' => TRUE,
  2510. ),
  2511. 'cell_line_id' => array(
  2512. 'size' => 'big',
  2513. 'type' => 'int',
  2514. 'not null' => TRUE,
  2515. ),
  2516. 'feature_id' => array(
  2517. 'size' => 'big',
  2518. 'type' => 'int',
  2519. 'not null' => TRUE,
  2520. ),
  2521. 'pub_id' => array(
  2522. 'size' => 'big',
  2523. 'type' => 'int',
  2524. 'not null' => TRUE,
  2525. ),
  2526. ),
  2527. 'unique keys' => array(
  2528. 'cell_line_feature_c1' => array(
  2529. 0 => 'cell_line_id',
  2530. 1 => 'feature_id',
  2531. 2 => 'pub_id',
  2532. ),
  2533. ),
  2534. 'primary key' => array(
  2535. 0 => 'cell_line_feature_id',
  2536. ),
  2537. 'foreign keys' => array(
  2538. 'cell_line' => array(
  2539. 'table' => 'cell_line',
  2540. 'columns' => array(
  2541. 'cell_line_id' => 'cell_line_id',
  2542. ),
  2543. ),
  2544. 'feature' => array(
  2545. 'table' => 'feature',
  2546. 'columns' => array(
  2547. 'feature_id' => 'feature_id',
  2548. ),
  2549. ),
  2550. 'pub' => array(
  2551. 'table' => 'pub',
  2552. 'columns' => array(
  2553. 'pub_id' => 'pub_id',
  2554. ),
  2555. ),
  2556. ),
  2557. 'referring_tables' => array(
  2558. ),
  2559. );
  2560. return $description;
  2561. }
  2562. /**
  2563. * Implements hook_chado_schema_v1_3_cell_line_library()
  2564. *
  2565. * Purpose: To describe the structure of 'cell_line_library' to tripal
  2566. * @see chado_insert_record()
  2567. * @see chado_update_record()
  2568. * @see chado_select_record()
  2569. * @see chado_generate_var()
  2570. * @see chado_expan_var()
  2571. *
  2572. * @return
  2573. * An array describing the 'cell_line_library' table
  2574. *
  2575. * @ingroup tripal_chado_v1.3_schema_api
  2576. *
  2577. */
  2578. function tripal_chado_chado_schema_v1_3_cell_line_library() {
  2579. $description = array(
  2580. 'description' => '',
  2581. 'table' => 'cell_line_library',
  2582. 'fields' => array(
  2583. 'cell_line_library_id' => array(
  2584. 'size' => 'big',
  2585. 'type' => 'serial',
  2586. 'not null' => TRUE,
  2587. ),
  2588. 'cell_line_id' => array(
  2589. 'size' => 'big',
  2590. 'type' => 'int',
  2591. 'not null' => TRUE,
  2592. ),
  2593. 'library_id' => array(
  2594. 'size' => 'big',
  2595. 'type' => 'int',
  2596. 'not null' => TRUE,
  2597. ),
  2598. 'pub_id' => array(
  2599. 'size' => 'big',
  2600. 'type' => 'int',
  2601. 'not null' => TRUE,
  2602. ),
  2603. ),
  2604. 'unique keys' => array(
  2605. 'cell_line_library_c1' => array(
  2606. 0 => 'cell_line_id',
  2607. 1 => 'library_id',
  2608. 2 => 'pub_id',
  2609. ),
  2610. ),
  2611. 'primary key' => array(
  2612. 0 => 'cell_line_library_id',
  2613. ),
  2614. 'foreign keys' => array(
  2615. 'cell_line' => array(
  2616. 'table' => 'cell_line',
  2617. 'columns' => array(
  2618. 'cell_line_id' => 'cell_line_id',
  2619. ),
  2620. ),
  2621. 'library' => array(
  2622. 'table' => 'library',
  2623. 'columns' => array(
  2624. 'library_id' => 'library_id',
  2625. ),
  2626. ),
  2627. 'pub' => array(
  2628. 'table' => 'pub',
  2629. 'columns' => array(
  2630. 'pub_id' => 'pub_id',
  2631. ),
  2632. ),
  2633. ),
  2634. 'referring_tables' => array(
  2635. ),
  2636. );
  2637. return $description;
  2638. }
  2639. /**
  2640. * Implements hook_chado_schema_v1_3_cell_lineprop()
  2641. *
  2642. * Purpose: To describe the structure of 'cell_lineprop' to tripal
  2643. * @see chado_insert_record()
  2644. * @see chado_update_record()
  2645. * @see chado_select_record()
  2646. * @see chado_generate_var()
  2647. * @see chado_expan_var()
  2648. *
  2649. * @return
  2650. * An array describing the 'cell_lineprop' table
  2651. *
  2652. * @ingroup tripal_chado_v1.3_schema_api
  2653. *
  2654. */
  2655. function tripal_chado_chado_schema_v1_3_cell_lineprop() {
  2656. $description = array(
  2657. 'description' => '',
  2658. 'table' => 'cell_lineprop',
  2659. 'fields' => array(
  2660. 'cell_lineprop_id' => array(
  2661. 'size' => 'big',
  2662. 'type' => 'serial',
  2663. 'not null' => TRUE,
  2664. ),
  2665. 'cell_line_id' => array(
  2666. 'size' => 'big',
  2667. 'type' => 'int',
  2668. 'not null' => TRUE,
  2669. ),
  2670. 'type_id' => array(
  2671. 'size' => 'big',
  2672. 'type' => 'int',
  2673. 'not null' => TRUE,
  2674. ),
  2675. 'value' => array(
  2676. 'size' => 'normal',
  2677. 'type' => 'text',
  2678. 'not null' => FALSE,
  2679. ),
  2680. 'rank' => array(
  2681. 'size' => 'normal',
  2682. 'type' => 'int',
  2683. 'not null' => TRUE,
  2684. 'default' => 0,
  2685. ),
  2686. ),
  2687. 'unique keys' => array(
  2688. 'cell_lineprop_c1' => array(
  2689. 0 => 'cell_line_id',
  2690. 1 => 'type_id',
  2691. 2 => 'rank',
  2692. ),
  2693. ),
  2694. 'primary key' => array(
  2695. 0 => 'cell_lineprop_id',
  2696. ),
  2697. 'foreign keys' => array(
  2698. 'cell_line' => array(
  2699. 'table' => 'cell_line',
  2700. 'columns' => array(
  2701. 'cell_line_id' => 'cell_line_id',
  2702. ),
  2703. ),
  2704. 'cvterm' => array(
  2705. 'table' => 'cvterm',
  2706. 'columns' => array(
  2707. 'type_id' => 'cvterm_id',
  2708. ),
  2709. ),
  2710. ),
  2711. 'referring_tables' => array(
  2712. 0 => 'cell_lineprop_pub',
  2713. ),
  2714. );
  2715. return $description;
  2716. }
  2717. /**
  2718. * Implements hook_chado_schema_v1_3_cell_lineprop_pub()
  2719. *
  2720. * Purpose: To describe the structure of 'cell_lineprop_pub' to tripal
  2721. * @see chado_insert_record()
  2722. * @see chado_update_record()
  2723. * @see chado_select_record()
  2724. * @see chado_generate_var()
  2725. * @see chado_expan_var()
  2726. *
  2727. * @return
  2728. * An array describing the 'cell_lineprop_pub' table
  2729. *
  2730. * @ingroup tripal_chado_v1.3_schema_api
  2731. *
  2732. */
  2733. function tripal_chado_chado_schema_v1_3_cell_lineprop_pub() {
  2734. $description = array(
  2735. 'description' => '',
  2736. 'table' => 'cell_lineprop_pub',
  2737. 'fields' => array(
  2738. 'cell_lineprop_pub_id' => array(
  2739. 'size' => 'big',
  2740. 'type' => 'serial',
  2741. 'not null' => TRUE,
  2742. ),
  2743. 'cell_lineprop_id' => array(
  2744. 'size' => 'big',
  2745. 'type' => 'int',
  2746. 'not null' => TRUE,
  2747. ),
  2748. 'pub_id' => array(
  2749. 'size' => 'big',
  2750. 'type' => 'int',
  2751. 'not null' => TRUE,
  2752. ),
  2753. ),
  2754. 'unique keys' => array(
  2755. 'cell_lineprop_pub_c1' => array(
  2756. 0 => 'cell_lineprop_id',
  2757. 1 => 'pub_id',
  2758. ),
  2759. ),
  2760. 'primary key' => array(
  2761. 0 => 'cell_lineprop_pub_id',
  2762. ),
  2763. 'foreign keys' => array(
  2764. 'cell_lineprop' => array(
  2765. 'table' => 'cell_lineprop',
  2766. 'columns' => array(
  2767. 'cell_lineprop_id' => 'cell_lineprop_id',
  2768. ),
  2769. ),
  2770. 'pub' => array(
  2771. 'table' => 'pub',
  2772. 'columns' => array(
  2773. 'pub_id' => 'pub_id',
  2774. ),
  2775. ),
  2776. ),
  2777. 'referring_tables' => array(
  2778. ),
  2779. );
  2780. return $description;
  2781. }
  2782. /**
  2783. * Implements hook_chado_schema_v1_3_cell_line_pub()
  2784. *
  2785. * Purpose: To describe the structure of 'cell_line_pub' to tripal
  2786. * @see chado_insert_record()
  2787. * @see chado_update_record()
  2788. * @see chado_select_record()
  2789. * @see chado_generate_var()
  2790. * @see chado_expan_var()
  2791. *
  2792. * @return
  2793. * An array describing the 'cell_line_pub' table
  2794. *
  2795. * @ingroup tripal_chado_v1.3_schema_api
  2796. *
  2797. */
  2798. function tripal_chado_chado_schema_v1_3_cell_line_pub() {
  2799. $description = array(
  2800. 'description' => '',
  2801. 'table' => 'cell_line_pub',
  2802. 'fields' => array(
  2803. 'cell_line_pub_id' => array(
  2804. 'size' => 'big',
  2805. 'type' => 'serial',
  2806. 'not null' => TRUE,
  2807. ),
  2808. 'cell_line_id' => array(
  2809. 'size' => 'big',
  2810. 'type' => 'int',
  2811. 'not null' => TRUE,
  2812. ),
  2813. 'pub_id' => array(
  2814. 'size' => 'big',
  2815. 'type' => 'int',
  2816. 'not null' => TRUE,
  2817. ),
  2818. ),
  2819. 'unique keys' => array(
  2820. 'cell_line_pub_c1' => array(
  2821. 0 => 'cell_line_id',
  2822. 1 => 'pub_id',
  2823. ),
  2824. ),
  2825. 'primary key' => array(
  2826. 0 => 'cell_line_pub_id',
  2827. ),
  2828. 'foreign keys' => array(
  2829. 'cell_line' => array(
  2830. 'table' => 'cell_line',
  2831. 'columns' => array(
  2832. 'cell_line_id' => 'cell_line_id',
  2833. ),
  2834. ),
  2835. 'pub' => array(
  2836. 'table' => 'pub',
  2837. 'columns' => array(
  2838. 'pub_id' => 'pub_id',
  2839. ),
  2840. ),
  2841. ),
  2842. 'referring_tables' => array(
  2843. ),
  2844. );
  2845. return $description;
  2846. }
  2847. /**
  2848. * Implements hook_chado_schema_v1_3_cell_line_relationship()
  2849. *
  2850. * Purpose: To describe the structure of 'cell_line_relationship' to tripal
  2851. * @see chado_insert_record()
  2852. * @see chado_update_record()
  2853. * @see chado_select_record()
  2854. * @see chado_generate_var()
  2855. * @see chado_expan_var()
  2856. *
  2857. * @return
  2858. * An array describing the 'cell_line_relationship' table
  2859. *
  2860. * @ingroup tripal_chado_v1.3_schema_api
  2861. *
  2862. */
  2863. function tripal_chado_chado_schema_v1_3_cell_line_relationship() {
  2864. $description = array(
  2865. 'description' => '',
  2866. 'table' => 'cell_line_relationship',
  2867. 'fields' => array(
  2868. 'cell_line_relationship_id' => array(
  2869. 'size' => 'big',
  2870. 'type' => 'serial',
  2871. 'not null' => TRUE,
  2872. ),
  2873. 'subject_id' => array(
  2874. 'size' => 'big',
  2875. 'type' => 'int',
  2876. 'not null' => TRUE,
  2877. ),
  2878. 'object_id' => array(
  2879. 'size' => 'big',
  2880. 'type' => 'int',
  2881. 'not null' => TRUE,
  2882. ),
  2883. 'type_id' => array(
  2884. 'size' => 'big',
  2885. 'type' => 'int',
  2886. 'not null' => TRUE,
  2887. ),
  2888. ),
  2889. 'unique keys' => array(
  2890. 'cell_line_relationship_c1' => array(
  2891. 0 => 'subject_id',
  2892. 1 => 'object_id',
  2893. 2 => 'type_id',
  2894. ),
  2895. ),
  2896. 'primary key' => array(
  2897. 0 => 'cell_line_relationship_id',
  2898. ),
  2899. 'foreign keys' => array(
  2900. 'cell_line' => array(
  2901. 'table' => 'cell_line',
  2902. 'columns' => array(
  2903. 'subject_id' => 'cell_line_id',
  2904. 'object_id' => 'cell_line_id',
  2905. ),
  2906. ),
  2907. 'cvterm' => array(
  2908. 'table' => 'cvterm',
  2909. 'columns' => array(
  2910. 'type_id' => 'cvterm_id',
  2911. ),
  2912. ),
  2913. ),
  2914. 'referring_tables' => array(
  2915. ),
  2916. );
  2917. return $description;
  2918. }
  2919. /**
  2920. * Implements hook_chado_schema_v1_3_cell_line_synonym()
  2921. *
  2922. * Purpose: To describe the structure of 'cell_line_synonym' to tripal
  2923. * @see chado_insert_record()
  2924. * @see chado_update_record()
  2925. * @see chado_select_record()
  2926. * @see chado_generate_var()
  2927. * @see chado_expan_var()
  2928. *
  2929. * @return
  2930. * An array describing the 'cell_line_synonym' table
  2931. *
  2932. * @ingroup tripal_chado_v1.3_schema_api
  2933. *
  2934. */
  2935. function tripal_chado_chado_schema_v1_3_cell_line_synonym() {
  2936. $description = array(
  2937. 'description' => '',
  2938. 'table' => 'cell_line_synonym',
  2939. 'fields' => array(
  2940. 'cell_line_synonym_id' => array(
  2941. 'size' => 'big',
  2942. 'type' => 'serial',
  2943. 'not null' => TRUE,
  2944. ),
  2945. 'cell_line_id' => array(
  2946. 'size' => 'big',
  2947. 'type' => 'int',
  2948. 'not null' => TRUE,
  2949. ),
  2950. 'synonym_id' => array(
  2951. 'size' => 'big',
  2952. 'type' => 'int',
  2953. 'not null' => TRUE,
  2954. ),
  2955. 'pub_id' => array(
  2956. 'size' => 'big',
  2957. 'type' => 'int',
  2958. 'not null' => TRUE,
  2959. ),
  2960. 'is_current' => array(
  2961. 'size' => 'normal',
  2962. 'type' => 'boolean',
  2963. 'not null' => TRUE,
  2964. 'default' => FALSE,
  2965. ),
  2966. 'is_internal' => array(
  2967. 'size' => 'normal',
  2968. 'type' => 'boolean',
  2969. 'not null' => TRUE,
  2970. 'default' => FALSE,
  2971. ),
  2972. ),
  2973. 'unique keys' => array(
  2974. 'cell_line_synonym_c1' => array(
  2975. 0 => 'synonym_id',
  2976. 1 => 'cell_line_id',
  2977. 2 => 'pub_id',
  2978. ),
  2979. ),
  2980. 'primary key' => array(
  2981. 0 => 'cell_line_synonym_id',
  2982. ),
  2983. 'foreign keys' => array(
  2984. 'cell_line' => array(
  2985. 'table' => 'cell_line',
  2986. 'columns' => array(
  2987. 'cell_line_id' => 'cell_line_id',
  2988. ),
  2989. ),
  2990. 'synonym' => array(
  2991. 'table' => 'synonym',
  2992. 'columns' => array(
  2993. 'synonym_id' => 'synonym_id',
  2994. ),
  2995. ),
  2996. 'pub' => array(
  2997. 'table' => 'pub',
  2998. 'columns' => array(
  2999. 'pub_id' => 'pub_id',
  3000. ),
  3001. ),
  3002. ),
  3003. 'referring_tables' => array(
  3004. ),
  3005. );
  3006. return $description;
  3007. }
  3008. /**
  3009. * Implements hook_chado_schema_v1_3_chadoprop()
  3010. *
  3011. * Purpose: To describe the structure of 'chadoprop' to tripal
  3012. * @see chado_insert_record()
  3013. * @see chado_update_record()
  3014. * @see chado_select_record()
  3015. * @see chado_generate_var()
  3016. * @see chado_expan_var()
  3017. *
  3018. * @return
  3019. * An array describing the 'chadoprop' table
  3020. *
  3021. * @ingroup tripal_chado_v1.3_schema_api
  3022. *
  3023. */
  3024. function tripal_chado_chado_schema_v1_3_chadoprop() {
  3025. $description = array(
  3026. 'description' => '',
  3027. 'table' => 'chadoprop',
  3028. 'fields' => array(
  3029. 'chadoprop_id' => array(
  3030. 'size' => 'big',
  3031. 'type' => 'serial',
  3032. 'not null' => TRUE,
  3033. ),
  3034. 'type_id' => array(
  3035. 'size' => 'big',
  3036. 'type' => 'int',
  3037. 'not null' => TRUE,
  3038. ),
  3039. 'value' => array(
  3040. 'size' => 'normal',
  3041. 'type' => 'text',
  3042. 'not null' => FALSE,
  3043. ),
  3044. 'rank' => array(
  3045. 'size' => 'normal',
  3046. 'type' => 'int',
  3047. 'not null' => TRUE,
  3048. 'default' => 0,
  3049. ),
  3050. ),
  3051. 'unique keys' => array(
  3052. 'chadoprop_c1' => array(
  3053. 0 => 'type_id',
  3054. 1 => 'rank',
  3055. ),
  3056. ),
  3057. 'primary key' => array(
  3058. 0 => 'chadoprop_id',
  3059. ),
  3060. 'foreign keys' => array(
  3061. 'cvterm' => array(
  3062. 'table' => 'cvterm',
  3063. 'columns' => array(
  3064. 'type_id' => 'cvterm_id',
  3065. ),
  3066. ),
  3067. ),
  3068. 'referring_tables' => array(
  3069. ),
  3070. );
  3071. return $description;
  3072. }
  3073. /**
  3074. * Implements hook_chado_schema_v1_3_channel()
  3075. *
  3076. * Purpose: To describe the structure of 'channel' to tripal
  3077. * @see chado_insert_record()
  3078. * @see chado_update_record()
  3079. * @see chado_select_record()
  3080. * @see chado_generate_var()
  3081. * @see chado_expan_var()
  3082. *
  3083. * @return
  3084. * An array describing the 'channel' table
  3085. *
  3086. * @ingroup tripal_chado_v1.3_schema_api
  3087. *
  3088. */
  3089. function tripal_chado_chado_schema_v1_3_channel() {
  3090. $description = array(
  3091. 'description' => '',
  3092. 'table' => 'channel',
  3093. 'fields' => array(
  3094. 'channel_id' => array(
  3095. 'size' => 'big',
  3096. 'type' => 'serial',
  3097. 'not null' => TRUE,
  3098. ),
  3099. 'name' => array(
  3100. 'size' => 'normal',
  3101. 'type' => 'text',
  3102. 'not null' => TRUE,
  3103. ),
  3104. 'definition' => array(
  3105. 'size' => 'normal',
  3106. 'type' => 'text',
  3107. 'not null' => TRUE,
  3108. ),
  3109. ),
  3110. 'unique keys' => array(
  3111. 'channel_c1' => array(
  3112. 0 => 'name',
  3113. ),
  3114. ),
  3115. 'primary key' => array(
  3116. 0 => 'channel_id',
  3117. ),
  3118. 'foreign keys' => array(
  3119. ),
  3120. 'referring_tables' => array(
  3121. 0 => 'acquisition',
  3122. 1 => 'assay_biomaterial',
  3123. ),
  3124. );
  3125. return $description;
  3126. }
  3127. /**
  3128. * Implements hook_chado_schema_v1_3_contact()
  3129. *
  3130. * Purpose: To describe the structure of 'contact' to tripal
  3131. * @see chado_insert_record()
  3132. * @see chado_update_record()
  3133. * @see chado_select_record()
  3134. * @see chado_generate_var()
  3135. * @see chado_expan_var()
  3136. *
  3137. * @return
  3138. * An array describing the 'contact' table
  3139. *
  3140. * @ingroup tripal_chado_v1.3_schema_api
  3141. *
  3142. */
  3143. function tripal_chado_chado_schema_v1_3_contact() {
  3144. $description = array(
  3145. 'description' => '',
  3146. 'table' => 'contact',
  3147. 'fields' => array(
  3148. 'contact_id' => array(
  3149. 'size' => 'big',
  3150. 'type' => 'serial',
  3151. 'not null' => TRUE,
  3152. ),
  3153. 'type_id' => array(
  3154. 'size' => 'big',
  3155. 'type' => 'int',
  3156. 'not null' => FALSE,
  3157. ),
  3158. 'name' => array(
  3159. 'size' => 'normal',
  3160. 'type' => 'varchar',
  3161. 'length' => '255',
  3162. 'not null' => TRUE,
  3163. ),
  3164. 'description' => array(
  3165. 'size' => 'normal',
  3166. 'type' => 'varchar',
  3167. 'length' => '255',
  3168. 'not null' => FALSE,
  3169. ),
  3170. ),
  3171. 'unique keys' => array(
  3172. 'contact_c1' => array(
  3173. 0 => 'name',
  3174. ),
  3175. ),
  3176. 'primary key' => array(
  3177. 0 => 'contact_id',
  3178. ),
  3179. 'indexes' => array(
  3180. 'library_contact_idx2' => array(
  3181. 0 => 'contact_id',
  3182. ),
  3183. 'pubauthor_contact_idx2' => array(
  3184. 0 => 'contact_id',
  3185. ),
  3186. ),
  3187. 'foreign keys' => array(
  3188. 'cvterm' => array(
  3189. 'table' => 'cvterm',
  3190. 'columns' => array(
  3191. 'type_id' => 'cvterm_id',
  3192. ),
  3193. ),
  3194. ),
  3195. 'referring_tables' => array(
  3196. 0 => 'arraydesign',
  3197. 1 => 'assay',
  3198. 2 => 'biomaterial',
  3199. 3 => 'contactprop',
  3200. 4 => 'contact_relationship',
  3201. 6 => 'feature_contact',
  3202. 7 => 'featuremap_contact',
  3203. 8 => 'library_contact',
  3204. 9 => 'nd_experiment_contact',
  3205. 10 => 'project_contact',
  3206. 11 => 'pubauthor_contact',
  3207. 12 => 'quantification',
  3208. 13 => 'stockcollection',
  3209. 14 => 'study',
  3210. ),
  3211. );
  3212. return $description;
  3213. }
  3214. /**
  3215. * Implements hook_chado_schema_v1_3_contactprop()
  3216. *
  3217. * Purpose: To describe the structure of 'contactprop' to tripal
  3218. * @see chado_insert_record()
  3219. * @see chado_update_record()
  3220. * @see chado_select_record()
  3221. * @see chado_generate_var()
  3222. * @see chado_expan_var()
  3223. *
  3224. * @return
  3225. * An array describing the 'contactprop' table
  3226. *
  3227. * @ingroup tripal_chado_v1.3_schema_api
  3228. *
  3229. */
  3230. function tripal_chado_chado_schema_v1_3_contactprop() {
  3231. $description = array(
  3232. 'description' => '',
  3233. 'table' => 'contactprop',
  3234. 'fields' => array(
  3235. 'contactprop_id' => array(
  3236. 'size' => 'big',
  3237. 'type' => 'serial',
  3238. 'not null' => TRUE,
  3239. ),
  3240. 'contact_id' => array(
  3241. 'size' => 'big',
  3242. 'type' => 'int',
  3243. 'not null' => TRUE,
  3244. ),
  3245. 'type_id' => array(
  3246. 'size' => 'big',
  3247. 'type' => 'int',
  3248. 'not null' => TRUE,
  3249. ),
  3250. 'value' => array(
  3251. 'size' => 'normal',
  3252. 'type' => 'text',
  3253. 'not null' => FALSE,
  3254. ),
  3255. 'rank' => array(
  3256. 'size' => 'normal',
  3257. 'type' => 'int',
  3258. 'not null' => TRUE,
  3259. 'default' => 0,
  3260. ),
  3261. ),
  3262. 'unique keys' => array(
  3263. 'contactprop_c1' => array(
  3264. 0 => 'contact_id',
  3265. 1 => 'type_id',
  3266. 2 => 'rank',
  3267. ),
  3268. ),
  3269. 'indexes' => array(
  3270. 'contactprop_idx1' => array(
  3271. 0 => 'contact_id',
  3272. ),
  3273. 'contactprop_idx2' => array(
  3274. 0 => 'type_id',
  3275. ),
  3276. ),
  3277. 'primary key' => array(
  3278. 0 => 'contactprop_id',
  3279. ),
  3280. 'foreign keys' => array(
  3281. 'contact' => array(
  3282. 'table' => 'contact',
  3283. 'columns' => array(
  3284. 'contact_id' => 'contact_id',
  3285. ),
  3286. ),
  3287. 'cvterm' => array(
  3288. 'table' => 'cvterm',
  3289. 'columns' => array(
  3290. 'type_id' => 'cvterm_id',
  3291. ),
  3292. ),
  3293. ),
  3294. 'referring_tables' => array(
  3295. ),
  3296. );
  3297. return $description;
  3298. }
  3299. /**
  3300. * Implements hook_chado_schema_v1_3_contact_relationship()
  3301. *
  3302. * Purpose: To describe the structure of 'contact_relationship' to tripal
  3303. * @see chado_insert_record()
  3304. * @see chado_update_record()
  3305. * @see chado_select_record()
  3306. * @see chado_generate_var()
  3307. * @see chado_expan_var()
  3308. *
  3309. * @return
  3310. * An array describing the 'contact_relationship' table
  3311. *
  3312. * @ingroup tripal_chado_v1.3_schema_api
  3313. *
  3314. */
  3315. function tripal_chado_chado_schema_v1_3_contact_relationship() {
  3316. $description = array(
  3317. 'description' => '',
  3318. 'table' => 'contact_relationship',
  3319. 'fields' => array(
  3320. 'contact_relationship_id' => array(
  3321. 'size' => 'big',
  3322. 'type' => 'serial',
  3323. 'not null' => TRUE,
  3324. ),
  3325. 'type_id' => array(
  3326. 'size' => 'big',
  3327. 'type' => 'int',
  3328. 'not null' => TRUE,
  3329. ),
  3330. 'subject_id' => array(
  3331. 'size' => 'big',
  3332. 'type' => 'int',
  3333. 'not null' => TRUE,
  3334. ),
  3335. 'object_id' => array(
  3336. 'size' => 'big',
  3337. 'type' => 'int',
  3338. 'not null' => TRUE,
  3339. ),
  3340. ),
  3341. 'unique keys' => array(
  3342. 'contact_relationship_c1' => array(
  3343. 0 => 'subject_id',
  3344. 1 => 'object_id',
  3345. 2 => 'type_id',
  3346. ),
  3347. ),
  3348. 'indexes' => array(
  3349. 'contact_relationship_idx1' => array(
  3350. 0 => 'type_id',
  3351. ),
  3352. 'contact_relationship_idx2' => array(
  3353. 0 => 'subject_id',
  3354. ),
  3355. 'contact_relationship_idx3' => array(
  3356. 0 => 'object_id',
  3357. ),
  3358. ),
  3359. 'primary key' => array(
  3360. 0 => 'contact_relationship_id',
  3361. ),
  3362. 'foreign keys' => array(
  3363. 'cvterm' => array(
  3364. 'table' => 'cvterm',
  3365. 'columns' => array(
  3366. 'type_id' => 'cvterm_id',
  3367. ),
  3368. ),
  3369. 'contact' => array(
  3370. 'table' => 'contact',
  3371. 'columns' => array(
  3372. 'subject_id' => 'contact_id',
  3373. 'object_id' => 'contact_id',
  3374. ),
  3375. ),
  3376. ),
  3377. 'referring_tables' => array(
  3378. ),
  3379. );
  3380. return $description;
  3381. }
  3382. /**
  3383. * Implements hook_chado_schema_v1_3_control()
  3384. *
  3385. * Purpose: To describe the structure of 'control' to tripal
  3386. * @see chado_insert_record()
  3387. * @see chado_update_record()
  3388. * @see chado_select_record()
  3389. * @see chado_generate_var()
  3390. * @see chado_expan_var()
  3391. *
  3392. * @return
  3393. * An array describing the 'control' table
  3394. *
  3395. * @ingroup tripal_chado_v1.3_schema_api
  3396. *
  3397. */
  3398. function tripal_chado_chado_schema_v1_3_control() {
  3399. $description = array(
  3400. 'description' => '',
  3401. 'table' => 'control',
  3402. 'fields' => array(
  3403. 'control_id' => array(
  3404. 'size' => 'big',
  3405. 'type' => 'serial',
  3406. 'not null' => TRUE,
  3407. ),
  3408. 'type_id' => array(
  3409. 'size' => 'big',
  3410. 'type' => 'int',
  3411. 'not null' => TRUE,
  3412. ),
  3413. 'assay_id' => array(
  3414. 'size' => 'big',
  3415. 'type' => 'int',
  3416. 'not null' => TRUE,
  3417. ),
  3418. 'tableinfo_id' => array(
  3419. 'size' => 'big',
  3420. 'type' => 'int',
  3421. 'not null' => TRUE,
  3422. ),
  3423. 'row_id' => array(
  3424. 'size' => 'normal',
  3425. 'type' => 'int',
  3426. 'not null' => TRUE,
  3427. ),
  3428. 'name' => array(
  3429. 'size' => 'normal',
  3430. 'type' => 'text',
  3431. 'not null' => FALSE,
  3432. ),
  3433. 'value' => array(
  3434. 'size' => 'normal',
  3435. 'type' => 'text',
  3436. 'not null' => FALSE,
  3437. ),
  3438. 'rank' => array(
  3439. 'size' => 'normal',
  3440. 'type' => 'int',
  3441. 'not null' => TRUE,
  3442. 'default' => 0,
  3443. ),
  3444. ),
  3445. 'indexes' => array(
  3446. 'control_idx1' => array(
  3447. 0 => 'type_id',
  3448. ),
  3449. 'control_idx2' => array(
  3450. 0 => 'assay_id',
  3451. ),
  3452. 'control_idx3' => array(
  3453. 0 => 'tableinfo_id',
  3454. ),
  3455. 'control_idx4' => array(
  3456. 0 => 'row_id',
  3457. ),
  3458. ),
  3459. 'primary key' => array(
  3460. 0 => 'control_id',
  3461. ),
  3462. 'foreign keys' => array(
  3463. 'cvterm' => array(
  3464. 'table' => 'cvterm',
  3465. 'columns' => array(
  3466. 'type_id' => 'cvterm_id',
  3467. ),
  3468. ),
  3469. 'assay' => array(
  3470. 'table' => 'assay',
  3471. 'columns' => array(
  3472. 'assay_id' => 'assay_id',
  3473. ),
  3474. ),
  3475. 'tableinfo' => array(
  3476. 'table' => 'tableinfo',
  3477. 'columns' => array(
  3478. 'tableinfo_id' => 'tableinfo_id',
  3479. ),
  3480. ),
  3481. ),
  3482. 'referring_tables' => array(
  3483. ),
  3484. );
  3485. return $description;
  3486. }
  3487. /**
  3488. * Implements hook_chado_schema_v1_3_cv()
  3489. *
  3490. * Purpose: To describe the structure of 'cv' to tripal
  3491. * @see chado_insert_record()
  3492. * @see chado_update_record()
  3493. * @see chado_select_record()
  3494. * @see chado_generate_var()
  3495. * @see chado_expan_var()
  3496. *
  3497. * @return
  3498. * An array describing the 'cv' table
  3499. *
  3500. * @ingroup tripal_chado_v1.3_schema_api
  3501. *
  3502. */
  3503. function tripal_chado_chado_schema_v1_3_cv() {
  3504. $description = array(
  3505. 'description' => '',
  3506. 'table' => 'cv',
  3507. 'fields' => array(
  3508. 'cv_id' => array(
  3509. 'size' => 'big',
  3510. 'type' => 'serial',
  3511. 'not null' => TRUE,
  3512. ),
  3513. 'name' => array(
  3514. 'size' => 'normal',
  3515. 'type' => 'varchar',
  3516. 'length' => '255',
  3517. 'not null' => TRUE,
  3518. ),
  3519. 'definition' => array(
  3520. 'size' => 'normal',
  3521. 'type' => 'text',
  3522. 'not null' => FALSE,
  3523. ),
  3524. ),
  3525. 'unique keys' => array(
  3526. 'cv_c1' => array(
  3527. 0 => 'name',
  3528. ),
  3529. ),
  3530. 'primary key' => array(
  3531. 0 => 'cv_id',
  3532. ),
  3533. 'foreign keys' => array(
  3534. ),
  3535. 'referring_tables' => array(
  3536. 0 => 'cvprop',
  3537. 1 => 'cvterm',
  3538. 2 => 'cvtermpath',
  3539. ),
  3540. );
  3541. return $description;
  3542. }
  3543. /**
  3544. * Implements hook_chado_schema_v1_3_cvprop()
  3545. *
  3546. * Purpose: To describe the structure of 'cvprop' to tripal
  3547. * @see chado_insert_record()
  3548. * @see chado_update_record()
  3549. * @see chado_select_record()
  3550. * @see chado_generate_var()
  3551. * @see chado_expan_var()
  3552. *
  3553. * @return
  3554. * An array describing the 'cvprop' table
  3555. *
  3556. * @ingroup tripal_chado_v1.3_schema_api
  3557. *
  3558. */
  3559. function tripal_chado_chado_schema_v1_3_cvprop() {
  3560. $description = array(
  3561. 'description' => '',
  3562. 'table' => 'cvprop',
  3563. 'fields' => array(
  3564. 'cvprop_id' => array(
  3565. 'size' => 'big',
  3566. 'type' => 'serial',
  3567. 'not null' => TRUE,
  3568. ),
  3569. 'cv_id' => array(
  3570. 'size' => 'big',
  3571. 'type' => 'int',
  3572. 'not null' => TRUE,
  3573. ),
  3574. 'type_id' => array(
  3575. 'size' => 'big',
  3576. 'type' => 'int',
  3577. 'not null' => TRUE,
  3578. ),
  3579. 'value' => array(
  3580. 'size' => 'normal',
  3581. 'type' => 'text',
  3582. 'not null' => FALSE,
  3583. ),
  3584. 'rank' => array(
  3585. 'size' => 'normal',
  3586. 'type' => 'int',
  3587. 'not null' => TRUE,
  3588. 'default' => 0,
  3589. ),
  3590. ),
  3591. 'unique keys' => array(
  3592. 'cvprop_c1' => array(
  3593. 0 => 'cv_id',
  3594. 1 => 'type_id',
  3595. 2 => 'rank',
  3596. ),
  3597. ),
  3598. 'primary key' => array(
  3599. 0 => 'cvprop_id',
  3600. ),
  3601. 'foreign keys' => array(
  3602. 'cv' => array(
  3603. 'table' => 'cv',
  3604. 'columns' => array(
  3605. 'cv_id' => 'cv_id',
  3606. ),
  3607. ),
  3608. 'cvterm' => array(
  3609. 'table' => 'cvterm',
  3610. 'columns' => array(
  3611. 'type_id' => 'cvterm_id',
  3612. ),
  3613. ),
  3614. ),
  3615. 'referring_tables' => array(
  3616. ),
  3617. );
  3618. return $description;
  3619. }
  3620. /**
  3621. * Implements hook_chado_schema_v1_3_cv_root_mview()
  3622. *
  3623. * Purpose: To describe the structure of 'cv_root_mview' to tripal
  3624. * @see chado_insert_record()
  3625. * @see chado_update_record()
  3626. * @see chado_select_record()
  3627. * @see chado_generate_var()
  3628. * @see chado_expan_var()
  3629. *
  3630. * @return
  3631. * An array describing the 'cv_root_mview' table
  3632. *
  3633. * @ingroup tripal_chado_v1.3_schema_api
  3634. *
  3635. */
  3636. function tripal_chado_chado_schema_v1_3_cv_root_mview() {
  3637. $description = array(
  3638. 'description' => '',
  3639. 'table' => 'cv_root_mview',
  3640. 'fields' => array(
  3641. 'name' => array(
  3642. 'size' => 'normal',
  3643. 'type' => 'varchar',
  3644. 'length' => '255',
  3645. 'not null' => TRUE,
  3646. ),
  3647. 'cvterm_id' => array(
  3648. 'size' => 'normal',
  3649. 'type' => 'int',
  3650. 'not null' => TRUE,
  3651. ),
  3652. 'cv_id' => array(
  3653. 'size' => 'normal',
  3654. 'type' => 'int',
  3655. 'not null' => TRUE,
  3656. ),
  3657. 'cv_name' => array(
  3658. 'size' => 'normal',
  3659. 'type' => 'varchar',
  3660. 'length' => '255',
  3661. 'not null' => TRUE,
  3662. ),
  3663. ),
  3664. 'indexes' => array(
  3665. 'cv_root_mview_indx1' => array(
  3666. 0 => 'cvterm_id',
  3667. ),
  3668. 'cv_root_mview_indx2' => array(
  3669. 0 => 'cv_id',
  3670. ),
  3671. ),
  3672. 'foreign keys' => array(
  3673. ),
  3674. 'referring_tables' => array(
  3675. ),
  3676. );
  3677. return $description;
  3678. }
  3679. /**
  3680. * Implements hook_chado_schema_v1_3_cvterm()
  3681. *
  3682. * Purpose: To describe the structure of 'cvterm' to tripal
  3683. * @see chado_insert_record()
  3684. * @see chado_update_record()
  3685. * @see chado_select_record()
  3686. * @see chado_generate_var()
  3687. * @see chado_expan_var()
  3688. *
  3689. * @return
  3690. * An array describing the 'cvterm' table
  3691. *
  3692. * @ingroup tripal_chado_v1.3_schema_api
  3693. *
  3694. */
  3695. function tripal_chado_chado_schema_v1_3_cvterm() {
  3696. $description = array(
  3697. 'description' => '',
  3698. 'table' => 'cvterm',
  3699. 'fields' => array(
  3700. 'cvterm_id' => array(
  3701. 'size' => 'big',
  3702. 'type' => 'serial',
  3703. 'not null' => TRUE,
  3704. ),
  3705. 'cv_id' => array(
  3706. 'size' => 'big',
  3707. 'type' => 'int',
  3708. 'not null' => TRUE,
  3709. ),
  3710. 'name' => array(
  3711. 'size' => 'normal',
  3712. 'type' => 'varchar',
  3713. 'length' => '1024',
  3714. 'not null' => TRUE,
  3715. ),
  3716. 'definition' => array(
  3717. 'size' => 'normal',
  3718. 'type' => 'text',
  3719. 'not null' => FALSE,
  3720. ),
  3721. 'dbxref_id' => array(
  3722. 'size' => 'big',
  3723. 'type' => 'int',
  3724. 'not null' => TRUE,
  3725. ),
  3726. 'is_obsolete' => array(
  3727. 'size' => 'normal',
  3728. 'type' => 'int',
  3729. 'not null' => TRUE,
  3730. 'default' => 0,
  3731. ),
  3732. 'is_relationshiptype' => array(
  3733. 'size' => 'normal',
  3734. 'type' => 'int',
  3735. 'not null' => TRUE,
  3736. 'default' => 0,
  3737. ),
  3738. ),
  3739. 'unique keys' => array(
  3740. 'cvterm_c1' => array(
  3741. 0 => 'name',
  3742. 1 => 'cv_id',
  3743. 2 => 'is_obsolete',
  3744. ),
  3745. 'cvterm_c2' => array(
  3746. 0 => 'dbxref_id',
  3747. ),
  3748. ),
  3749. 'indexes' => array(
  3750. 'cvterm_idx1' => array(
  3751. 0 => 'cv_id',
  3752. ),
  3753. 'cvterm_idx2' => array(
  3754. 0 => 'name',
  3755. ),
  3756. 'cvterm_idx3' => array(
  3757. 0 => 'dbxref_id',
  3758. ),
  3759. ),
  3760. 'primary key' => array(
  3761. 0 => 'cvterm_id',
  3762. ),
  3763. 'foreign keys' => array(
  3764. 'cv' => array(
  3765. 'table' => 'cv',
  3766. 'columns' => array(
  3767. 'cv_id' => 'cv_id',
  3768. ),
  3769. ),
  3770. 'dbxref' => array(
  3771. 'table' => 'dbxref',
  3772. 'columns' => array(
  3773. 'dbxref_id' => 'dbxref_id',
  3774. ),
  3775. ),
  3776. ),
  3777. 'referring_tables' => array(
  3778. 0 => 'acquisitionprop',
  3779. 1 => 'acquisition_relationship',
  3780. 2 => 'analysis_cvterm',
  3781. 3 => 'analysisfeatureprop',
  3782. 4 => 'analysisprop',
  3783. 5 => 'analysis_relationship',
  3784. 6 => 'arraydesign',
  3785. 8 => 'arraydesignprop',
  3786. 9 => 'assayprop',
  3787. 10 => 'biomaterialprop',
  3788. 11 => 'biomaterial_relationship',
  3789. 12 => 'biomaterial_treatment',
  3790. 13 => 'cell_line_cvterm',
  3791. 14 => 'cell_line_cvtermprop',
  3792. 15 => 'cell_lineprop',
  3793. 16 => 'cell_line_relationship',
  3794. 17 => 'chadoprop',
  3795. 18 => 'contact',
  3796. 19 => 'contactprop',
  3797. 20 => 'contact_relationship',
  3798. 21 => 'control',
  3799. 22 => 'cvprop',
  3800. 23 => 'cvterm_dbxref',
  3801. 24 => 'cvtermpath',
  3802. 27 => 'cvtermprop',
  3803. 29 => 'cvterm_relationship',
  3804. 32 => 'cvtermsynonym',
  3805. 34 => 'dbprop',
  3806. 35 => 'dbxrefprop',
  3807. 36 => 'element',
  3808. 37 => 'element_relationship',
  3809. 38 => 'elementresult_relationship',
  3810. 39 => 'environment_cvterm',
  3811. 40 => 'expression_cvterm',
  3812. 42 => 'expression_cvtermprop',
  3813. 43 => 'expressionprop',
  3814. 44 => 'feature',
  3815. 45 => 'feature_cvterm',
  3816. 46 => 'feature_cvtermprop',
  3817. 47 => 'feature_expressionprop',
  3818. 48 => 'feature_genotype',
  3819. 49 => 'featuremap',
  3820. 50 => 'featuremapprop',
  3821. 51 => 'featureposprop',
  3822. 52 => 'featureprop',
  3823. 53 => 'feature_pubprop',
  3824. 54 => 'feature_relationship',
  3825. 55 => 'feature_relationshipprop',
  3826. 56 => 'genotype',
  3827. 57 => 'genotypeprop',
  3828. 58 => 'library',
  3829. 59 => 'library_cvterm',
  3830. 60 => 'library_expressionprop',
  3831. 61 => 'library_featureprop',
  3832. 62 => 'libraryprop',
  3833. 63 => 'library_relationship',
  3834. 64 => 'nd_experiment',
  3835. 65 => 'nd_experiment_analysis',
  3836. 66 => 'nd_experimentprop',
  3837. 67 => 'nd_experiment_stock',
  3838. 68 => 'nd_experiment_stockprop',
  3839. 69 => 'nd_geolocationprop',
  3840. 70 => 'nd_protocol',
  3841. 71 => 'nd_protocolprop',
  3842. 72 => 'nd_protocol_reagent',
  3843. 73 => 'nd_reagent',
  3844. 74 => 'nd_reagentprop',
  3845. 75 => 'nd_reagent_relationship',
  3846. 76 => 'organism',
  3847. 77 => 'organism_cvterm',
  3848. 78 => 'organism_cvtermprop',
  3849. 79 => 'organismprop',
  3850. 80 => 'organism_relationship',
  3851. 81 => 'phendesc',
  3852. 82 => 'phenotype',
  3853. 86 => 'phenotype_comparison_cvterm',
  3854. 87 => 'phenotype_cvterm',
  3855. 88 => 'phenotypeprop',
  3856. 89 => 'phenstatement',
  3857. 90 => 'phylonode',
  3858. 91 => 'phylonodeprop',
  3859. 92 => 'phylonode_relationship',
  3860. 93 => 'phylotree',
  3861. 94 => 'phylotreeprop',
  3862. 95 => 'projectprop',
  3863. 96 => 'project_relationship',
  3864. 97 => 'protocol',
  3865. 98 => 'protocolparam',
  3866. 100 => 'pub',
  3867. 101 => 'pubprop',
  3868. 102 => 'pub_relationship',
  3869. 103 => 'quantificationprop',
  3870. 104 => 'quantification_relationship',
  3871. 105 => 'stock',
  3872. 106 => 'stockcollection',
  3873. 107 => 'stockcollectionprop',
  3874. 108 => 'stock_cvterm',
  3875. 109 => 'stock_cvtermprop',
  3876. 110 => 'stock_dbxrefprop',
  3877. 111 => 'stock_feature',
  3878. 112 => 'stock_featuremap',
  3879. 113 => 'stockprop',
  3880. 114 => 'stock_relationship',
  3881. 115 => 'stock_relationship_cvterm',
  3882. 116 => 'studydesignprop',
  3883. 117 => 'studyfactor',
  3884. 118 => 'studyprop',
  3885. 119 => 'studyprop_feature',
  3886. 120 => 'synonym',
  3887. 121 => 'treatment',
  3888. ),
  3889. );
  3890. return $description;
  3891. }
  3892. /**
  3893. * Implements hook_chado_schema_v1_3_cvterm_dbxref()
  3894. *
  3895. * Purpose: To describe the structure of 'cvterm_dbxref' to tripal
  3896. * @see chado_insert_record()
  3897. * @see chado_update_record()
  3898. * @see chado_select_record()
  3899. * @see chado_generate_var()
  3900. * @see chado_expan_var()
  3901. *
  3902. * @return
  3903. * An array describing the 'cvterm_dbxref' table
  3904. *
  3905. * @ingroup tripal_chado_v1.3_schema_api
  3906. *
  3907. */
  3908. function tripal_chado_chado_schema_v1_3_cvterm_dbxref() {
  3909. $description = array(
  3910. 'description' => '',
  3911. 'table' => 'cvterm_dbxref',
  3912. 'fields' => array(
  3913. 'cvterm_dbxref_id' => array(
  3914. 'size' => 'big',
  3915. 'type' => 'serial',
  3916. 'not null' => TRUE,
  3917. ),
  3918. 'cvterm_id' => array(
  3919. 'size' => 'big',
  3920. 'type' => 'int',
  3921. 'not null' => TRUE,
  3922. ),
  3923. 'dbxref_id' => array(
  3924. 'size' => 'big',
  3925. 'type' => 'int',
  3926. 'not null' => TRUE,
  3927. ),
  3928. 'is_for_definition' => array(
  3929. 'size' => 'normal',
  3930. 'type' => 'int',
  3931. 'not null' => TRUE,
  3932. 'default' => 0,
  3933. ),
  3934. ),
  3935. 'unique keys' => array(
  3936. 'cvterm_dbxref_c1' => array(
  3937. 0 => 'cvterm_id',
  3938. 1 => 'dbxref_id',
  3939. ),
  3940. ),
  3941. 'indexes' => array(
  3942. 'cvterm_dbxref_idx1' => array(
  3943. 0 => 'cvterm_id',
  3944. ),
  3945. 'cvterm_dbxref_idx2' => array(
  3946. 0 => 'dbxref_id',
  3947. ),
  3948. ),
  3949. 'primary key' => array(
  3950. 0 => 'cvterm_dbxref_id',
  3951. ),
  3952. 'foreign keys' => array(
  3953. 'cvterm' => array(
  3954. 'table' => 'cvterm',
  3955. 'columns' => array(
  3956. 'cvterm_id' => 'cvterm_id',
  3957. ),
  3958. ),
  3959. 'dbxref' => array(
  3960. 'table' => 'dbxref',
  3961. 'columns' => array(
  3962. 'dbxref_id' => 'dbxref_id',
  3963. ),
  3964. ),
  3965. ),
  3966. 'referring_tables' => array(
  3967. ),
  3968. );
  3969. return $description;
  3970. }
  3971. /**
  3972. * Implements hook_chado_schema_v1_3_cvtermpath()
  3973. *
  3974. * Purpose: To describe the structure of 'cvtermpath' to tripal
  3975. * @see chado_insert_record()
  3976. * @see chado_update_record()
  3977. * @see chado_select_record()
  3978. * @see chado_generate_var()
  3979. * @see chado_expan_var()
  3980. *
  3981. * @return
  3982. * An array describing the 'cvtermpath' table
  3983. *
  3984. * @ingroup tripal_chado_v1.3_schema_api
  3985. *
  3986. */
  3987. function tripal_chado_chado_schema_v1_3_cvtermpath() {
  3988. $description = array(
  3989. 'description' => '',
  3990. 'table' => 'cvtermpath',
  3991. 'fields' => array(
  3992. 'cvtermpath_id' => array(
  3993. 'size' => 'big',
  3994. 'type' => 'serial',
  3995. 'not null' => TRUE,
  3996. ),
  3997. 'type_id' => array(
  3998. 'size' => 'big',
  3999. 'type' => 'int',
  4000. 'not null' => FALSE,
  4001. ),
  4002. 'subject_id' => array(
  4003. 'size' => 'big',
  4004. 'type' => 'int',
  4005. 'not null' => TRUE,
  4006. ),
  4007. 'object_id' => array(
  4008. 'size' => 'big',
  4009. 'type' => 'int',
  4010. 'not null' => TRUE,
  4011. ),
  4012. 'cv_id' => array(
  4013. 'size' => 'big',
  4014. 'type' => 'int',
  4015. 'not null' => TRUE,
  4016. ),
  4017. 'pathdistance' => array(
  4018. 'size' => 'normal',
  4019. 'type' => 'int',
  4020. 'not null' => FALSE,
  4021. ),
  4022. ),
  4023. 'unique keys' => array(
  4024. 'cvtermpath_c1' => array(
  4025. 0 => 'subject_id',
  4026. 1 => 'object_id',
  4027. 2 => 'type_id',
  4028. 3 => 'pathdistance',
  4029. ),
  4030. ),
  4031. 'indexes' => array(
  4032. 'cvtermpath_idx1' => array(
  4033. 0 => 'type_id',
  4034. ),
  4035. 'cvtermpath_idx2' => array(
  4036. 0 => 'subject_id',
  4037. ),
  4038. 'cvtermpath_idx3' => array(
  4039. 0 => 'object_id',
  4040. ),
  4041. 'cvtermpath_idx4' => array(
  4042. 0 => 'cv_id',
  4043. ),
  4044. ),
  4045. 'primary key' => array(
  4046. 0 => 'cvtermpath_id',
  4047. ),
  4048. 'foreign keys' => array(
  4049. 'cvterm' => array(
  4050. 'table' => 'cvterm',
  4051. 'columns' => array(
  4052. 'type_id' => 'cvterm_id',
  4053. 'subject_id' => 'cvterm_id',
  4054. 'object_id' => 'cvterm_id',
  4055. ),
  4056. ),
  4057. 'cv' => array(
  4058. 'table' => 'cv',
  4059. 'columns' => array(
  4060. 'cv_id' => 'cv_id',
  4061. ),
  4062. ),
  4063. ),
  4064. 'referring_tables' => array(
  4065. ),
  4066. );
  4067. return $description;
  4068. }
  4069. /**
  4070. * Implements hook_chado_schema_v1_3_cvtermprop()
  4071. *
  4072. * Purpose: To describe the structure of 'cvtermprop' to tripal
  4073. * @see chado_insert_record()
  4074. * @see chado_update_record()
  4075. * @see chado_select_record()
  4076. * @see chado_generate_var()
  4077. * @see chado_expan_var()
  4078. *
  4079. * @return
  4080. * An array describing the 'cvtermprop' table
  4081. *
  4082. * @ingroup tripal_chado_v1.3_schema_api
  4083. *
  4084. */
  4085. function tripal_chado_chado_schema_v1_3_cvtermprop() {
  4086. $description = array(
  4087. 'description' => '',
  4088. 'table' => 'cvtermprop',
  4089. 'fields' => array(
  4090. 'cvtermprop_id' => array(
  4091. 'size' => 'big',
  4092. 'type' => 'serial',
  4093. 'not null' => TRUE,
  4094. ),
  4095. 'cvterm_id' => array(
  4096. 'size' => 'big',
  4097. 'type' => 'int',
  4098. 'not null' => TRUE,
  4099. ),
  4100. 'type_id' => array(
  4101. 'size' => 'big',
  4102. 'type' => 'int',
  4103. 'not null' => TRUE,
  4104. ),
  4105. 'value' => array(
  4106. 'size' => 'normal',
  4107. 'type' => 'text',
  4108. 'not null' => TRUE,
  4109. 'default' => '',
  4110. ),
  4111. 'rank' => array(
  4112. 'size' => 'normal',
  4113. 'type' => 'int',
  4114. 'not null' => TRUE,
  4115. 'default' => 0,
  4116. ),
  4117. ),
  4118. 'unique keys' => array(
  4119. 'cvterm_id_type_id_value_rank' => array(
  4120. 0 => 'cvterm_id',
  4121. 1 => 'type_id',
  4122. 2 => 'value',
  4123. 3 => 'rank',
  4124. ),
  4125. ),
  4126. 'indexes' => array(
  4127. 'cvtermprop_idx1' => array(
  4128. 0 => 'cvterm_id',
  4129. ),
  4130. 'cvtermprop_idx2' => array(
  4131. 0 => 'type_id',
  4132. ),
  4133. ),
  4134. 'primary key' => array(
  4135. 0 => 'cvtermprop_id',
  4136. ),
  4137. 'foreign keys' => array(
  4138. 'cvterm' => array(
  4139. 'table' => 'cvterm',
  4140. 'columns' => array(
  4141. 'cvterm_id' => 'cvterm_id',
  4142. 'type_id' => 'cvterm_id',
  4143. ),
  4144. ),
  4145. ),
  4146. 'referring_tables' => array(
  4147. ),
  4148. );
  4149. return $description;
  4150. }
  4151. /**
  4152. * Implements hook_chado_schema_v1_3_cvterm_relationship()
  4153. *
  4154. * Purpose: To describe the structure of 'cvterm_relationship' to tripal
  4155. * @see chado_insert_record()
  4156. * @see chado_update_record()
  4157. * @see chado_select_record()
  4158. * @see chado_generate_var()
  4159. * @see chado_expan_var()
  4160. *
  4161. * @return
  4162. * An array describing the 'cvterm_relationship' table
  4163. *
  4164. * @ingroup tripal_chado_v1.3_schema_api
  4165. *
  4166. */
  4167. function tripal_chado_chado_schema_v1_3_cvterm_relationship() {
  4168. $description = array(
  4169. 'description' => '',
  4170. 'table' => 'cvterm_relationship',
  4171. 'fields' => array(
  4172. 'cvterm_relationship_id' => array(
  4173. 'size' => 'big',
  4174. 'type' => 'serial',
  4175. 'not null' => TRUE,
  4176. ),
  4177. 'type_id' => array(
  4178. 'size' => 'big',
  4179. 'type' => 'int',
  4180. 'not null' => TRUE,
  4181. ),
  4182. 'subject_id' => array(
  4183. 'size' => 'big',
  4184. 'type' => 'int',
  4185. 'not null' => TRUE,
  4186. ),
  4187. 'object_id' => array(
  4188. 'size' => 'big',
  4189. 'type' => 'int',
  4190. 'not null' => TRUE,
  4191. ),
  4192. ),
  4193. 'unique keys' => array(
  4194. 'cvterm_relationship_c1' => array(
  4195. 0 => 'subject_id',
  4196. 1 => 'object_id',
  4197. 2 => 'type_id',
  4198. ),
  4199. ),
  4200. 'indexes' => array(
  4201. 'cvterm_relationship_idx1' => array(
  4202. 0 => 'type_id',
  4203. ),
  4204. 'cvterm_relationship_idx2' => array(
  4205. 0 => 'subject_id',
  4206. ),
  4207. 'cvterm_relationship_idx3' => array(
  4208. 0 => 'object_id',
  4209. ),
  4210. ),
  4211. 'primary key' => array(
  4212. 0 => 'cvterm_relationship_id',
  4213. ),
  4214. 'foreign keys' => array(
  4215. 'cvterm' => array(
  4216. 'table' => 'cvterm',
  4217. 'columns' => array(
  4218. 'type_id' => 'cvterm_id',
  4219. 'subject_id' => 'cvterm_id',
  4220. 'object_id' => 'cvterm_id',
  4221. ),
  4222. ),
  4223. ),
  4224. 'referring_tables' => array(
  4225. ),
  4226. );
  4227. return $description;
  4228. }
  4229. /**
  4230. * Implements hook_chado_schema_v1_3_cvtermsynonym()
  4231. *
  4232. * Purpose: To describe the structure of 'cvtermsynonym' to tripal
  4233. * @see chado_insert_record()
  4234. * @see chado_update_record()
  4235. * @see chado_select_record()
  4236. * @see chado_generate_var()
  4237. * @see chado_expan_var()
  4238. *
  4239. * @return
  4240. * An array describing the 'cvtermsynonym' table
  4241. *
  4242. * @ingroup tripal_chado_v1.3_schema_api
  4243. *
  4244. */
  4245. function tripal_chado_chado_schema_v1_3_cvtermsynonym() {
  4246. $description = array(
  4247. 'description' => '',
  4248. 'table' => 'cvtermsynonym',
  4249. 'fields' => array(
  4250. 'cvtermsynonym_id' => array(
  4251. 'size' => 'big',
  4252. 'type' => 'serial',
  4253. 'not null' => TRUE,
  4254. ),
  4255. 'cvterm_id' => array(
  4256. 'size' => 'big',
  4257. 'type' => 'int',
  4258. 'not null' => TRUE,
  4259. ),
  4260. 'synonym' => array(
  4261. 'size' => 'normal',
  4262. 'type' => 'varchar',
  4263. 'length' => '1024',
  4264. 'not null' => TRUE,
  4265. ),
  4266. 'type_id' => array(
  4267. 'size' => 'big',
  4268. 'type' => 'int',
  4269. 'not null' => FALSE,
  4270. ),
  4271. ),
  4272. 'unique keys' => array(
  4273. 'cvtermsynonym_c1' => array(
  4274. 0 => 'cvterm_id',
  4275. 1 => 'synonym',
  4276. ),
  4277. ),
  4278. 'indexes' => array(
  4279. 'cvtermsynonym_idx1' => array(
  4280. 0 => 'cvterm_id',
  4281. ),
  4282. ),
  4283. 'primary key' => array(
  4284. 0 => 'cvtermsynonym_id',
  4285. ),
  4286. 'foreign keys' => array(
  4287. 'cvterm' => array(
  4288. 'table' => 'cvterm',
  4289. 'columns' => array(
  4290. 'cvterm_id' => 'cvterm_id',
  4291. 'type_id' => 'cvterm_id',
  4292. ),
  4293. ),
  4294. ),
  4295. 'referring_tables' => array(
  4296. ),
  4297. );
  4298. return $description;
  4299. }
  4300. /**
  4301. * Implements hook_chado_schema_v1_3_db()
  4302. *
  4303. * Purpose: To describe the structure of 'db' to tripal
  4304. * @see chado_insert_record()
  4305. * @see chado_update_record()
  4306. * @see chado_select_record()
  4307. * @see chado_generate_var()
  4308. * @see chado_expan_var()
  4309. *
  4310. * @return
  4311. * An array describing the 'db' table
  4312. *
  4313. * @ingroup tripal_chado_v1.3_schema_api
  4314. *
  4315. */
  4316. function tripal_chado_chado_schema_v1_3_db() {
  4317. $description = array(
  4318. 'description' => '',
  4319. 'table' => 'db',
  4320. 'fields' => array(
  4321. 'db_id' => array(
  4322. 'size' => 'big',
  4323. 'type' => 'serial',
  4324. 'not null' => TRUE,
  4325. ),
  4326. 'name' => array(
  4327. 'size' => 'normal',
  4328. 'type' => 'varchar',
  4329. 'length' => '255',
  4330. 'not null' => TRUE,
  4331. ),
  4332. 'description' => array(
  4333. 'size' => 'normal',
  4334. 'type' => 'varchar',
  4335. 'length' => '255',
  4336. 'not null' => FALSE,
  4337. ),
  4338. 'urlprefix' => array(
  4339. 'size' => 'normal',
  4340. 'type' => 'varchar',
  4341. 'length' => '255',
  4342. 'not null' => FALSE,
  4343. ),
  4344. 'url' => array(
  4345. 'size' => 'normal',
  4346. 'type' => 'varchar',
  4347. 'length' => '255',
  4348. 'not null' => FALSE,
  4349. ),
  4350. ),
  4351. 'unique keys' => array(
  4352. 'db_c1' => array(
  4353. 0 => 'name',
  4354. ),
  4355. ),
  4356. 'primary key' => array(
  4357. 0 => 'db_id',
  4358. ),
  4359. 'foreign keys' => array(
  4360. ),
  4361. 'referring_tables' => array(
  4362. 0 => 'dbprop',
  4363. 1 => 'dbxref',
  4364. 2 => 'stockcollection_db',
  4365. ),
  4366. );
  4367. return $description;
  4368. }
  4369. /**
  4370. * Implements hook_chado_schema_v1_3_dbprop()
  4371. *
  4372. * Purpose: To describe the structure of 'dbprop' to tripal
  4373. * @see chado_insert_record()
  4374. * @see chado_update_record()
  4375. * @see chado_select_record()
  4376. * @see chado_generate_var()
  4377. * @see chado_expan_var()
  4378. *
  4379. * @return
  4380. * An array describing the 'dbprop' table
  4381. *
  4382. * @ingroup tripal_chado_v1.3_schema_api
  4383. *
  4384. */
  4385. function tripal_chado_chado_schema_v1_3_dbprop() {
  4386. $description = array(
  4387. 'description' => '',
  4388. 'table' => 'dbprop',
  4389. 'fields' => array(
  4390. 'dbprop_id' => array(
  4391. 'size' => 'big',
  4392. 'type' => 'serial',
  4393. 'not null' => TRUE,
  4394. ),
  4395. 'db_id' => array(
  4396. 'size' => 'big',
  4397. 'type' => 'int',
  4398. 'not null' => TRUE,
  4399. ),
  4400. 'type_id' => array(
  4401. 'size' => 'big',
  4402. 'type' => 'int',
  4403. 'not null' => TRUE,
  4404. ),
  4405. 'value' => array(
  4406. 'size' => 'normal',
  4407. 'type' => 'text',
  4408. 'not null' => FALSE,
  4409. ),
  4410. 'rank' => array(
  4411. 'size' => 'normal',
  4412. 'type' => 'int',
  4413. 'not null' => TRUE,
  4414. 'default' => 0,
  4415. ),
  4416. ),
  4417. 'unique keys' => array(
  4418. 'dbprop_c1' => array(
  4419. 0 => 'db_id',
  4420. 1 => 'type_id',
  4421. 2 => 'rank',
  4422. ),
  4423. ),
  4424. 'indexes' => array(
  4425. 'dbprop_idx1' => array(
  4426. 0 => 'db_id',
  4427. ),
  4428. 'dbprop_idx2' => array(
  4429. 0 => 'type_id',
  4430. ),
  4431. ),
  4432. 'primary key' => array(
  4433. 0 => 'dbprop_id',
  4434. ),
  4435. 'foreign keys' => array(
  4436. 'cvterm' => array(
  4437. 'table' => 'cvterm',
  4438. 'columns' => array(
  4439. 'type_id' => 'cvterm_id',
  4440. ),
  4441. ),
  4442. 'db' => array(
  4443. 'table' => 'db',
  4444. 'columns' => array(
  4445. 'db_id' => 'db_id',
  4446. ),
  4447. ),
  4448. ),
  4449. 'referring_tables' => array(
  4450. ),
  4451. );
  4452. return $description;
  4453. }
  4454. /**
  4455. * Implements hook_chado_schema_v1_3_dbxref()
  4456. *
  4457. * Purpose: To describe the structure of 'dbxref' to tripal
  4458. * @see chado_insert_record()
  4459. * @see chado_update_record()
  4460. * @see chado_select_record()
  4461. * @see chado_generate_var()
  4462. * @see chado_expan_var()
  4463. *
  4464. * @return
  4465. * An array describing the 'dbxref' table
  4466. *
  4467. * @ingroup tripal_chado_v1.3_schema_api
  4468. *
  4469. */
  4470. function tripal_chado_chado_schema_v1_3_dbxref() {
  4471. $description = array(
  4472. 'description' => '',
  4473. 'table' => 'dbxref',
  4474. 'fields' => array(
  4475. 'dbxref_id' => array(
  4476. 'size' => 'big',
  4477. 'type' => 'serial',
  4478. 'not null' => TRUE,
  4479. ),
  4480. 'db_id' => array(
  4481. 'size' => 'big',
  4482. 'type' => 'int',
  4483. 'not null' => TRUE,
  4484. ),
  4485. 'accession' => array(
  4486. 'size' => 'normal',
  4487. 'type' => 'varchar',
  4488. 'length' => '1024',
  4489. 'not null' => TRUE,
  4490. ),
  4491. 'version' => array(
  4492. 'size' => 'normal',
  4493. 'type' => 'varchar',
  4494. 'length' => '255',
  4495. 'not null' => TRUE,
  4496. 'default' => '',
  4497. ),
  4498. 'description' => array(
  4499. 'size' => 'normal',
  4500. 'type' => 'text',
  4501. 'not null' => FALSE,
  4502. ),
  4503. ),
  4504. 'unique keys' => array(
  4505. 'dbxref_c1' => array(
  4506. 0 => 'db_id',
  4507. 1 => 'accession',
  4508. 2 => 'version',
  4509. ),
  4510. ),
  4511. 'indexes' => array(
  4512. 'dbxref_idx1' => array(
  4513. 0 => 'db_id',
  4514. ),
  4515. 'dbxref_idx2' => array(
  4516. 0 => 'accession',
  4517. ),
  4518. 'dbxref_idx3' => array(
  4519. 0 => 'version',
  4520. ),
  4521. ),
  4522. 'primary key' => array(
  4523. 0 => 'dbxref_id',
  4524. ),
  4525. 'foreign keys' => array(
  4526. 'db' => array(
  4527. 'table' => 'db',
  4528. 'columns' => array(
  4529. 'db_id' => 'db_id',
  4530. ),
  4531. ),
  4532. ),
  4533. 'referring_tables' => array(
  4534. 0 => 'analysis_dbxref',
  4535. 1 => 'arraydesign',
  4536. 2 => 'assay',
  4537. 3 => 'biomaterial',
  4538. 4 => 'biomaterial_dbxref',
  4539. 5 => 'cell_line_dbxref',
  4540. 6 => 'cvterm',
  4541. 7 => 'cvterm_dbxref',
  4542. 8 => 'dbxrefprop',
  4543. 9 => 'element',
  4544. 10 => 'feature',
  4545. 11 => 'feature_cvterm_dbxref',
  4546. 12 => 'feature_dbxref',
  4547. 13 => 'featuremap_dbxref',
  4548. 14 => 'library_dbxref',
  4549. 15 => 'nd_experiment_dbxref',
  4550. 16 => 'nd_experiment_stock_dbxref',
  4551. 17 => 'organism_dbxref',
  4552. 18 => 'phylonode_dbxref',
  4553. 19 => 'phylotree',
  4554. 20 => 'project_dbxref',
  4555. 21 => 'protocol',
  4556. 22 => 'pub_dbxref',
  4557. 23 => 'stock',
  4558. 24 => 'stock_dbxref',
  4559. 25 => 'study',
  4560. ),
  4561. );
  4562. return $description;
  4563. }
  4564. /**
  4565. * Implements hook_chado_schema_v1_3_dbxrefprop()
  4566. *
  4567. * Purpose: To describe the structure of 'dbxrefprop' to tripal
  4568. * @see chado_insert_record()
  4569. * @see chado_update_record()
  4570. * @see chado_select_record()
  4571. * @see chado_generate_var()
  4572. * @see chado_expan_var()
  4573. *
  4574. * @return
  4575. * An array describing the 'dbxrefprop' table
  4576. *
  4577. * @ingroup tripal_chado_v1.3_schema_api
  4578. *
  4579. */
  4580. function tripal_chado_chado_schema_v1_3_dbxrefprop() {
  4581. $description = array(
  4582. 'description' => '',
  4583. 'table' => 'dbxrefprop',
  4584. 'fields' => array(
  4585. 'dbxrefprop_id' => array(
  4586. 'size' => 'big',
  4587. 'type' => 'serial',
  4588. 'not null' => TRUE,
  4589. ),
  4590. 'dbxref_id' => array(
  4591. 'size' => 'big',
  4592. 'type' => 'int',
  4593. 'not null' => TRUE,
  4594. ),
  4595. 'type_id' => array(
  4596. 'size' => 'big',
  4597. 'type' => 'int',
  4598. 'not null' => TRUE,
  4599. ),
  4600. 'value' => array(
  4601. 'size' => 'normal',
  4602. 'type' => 'text',
  4603. 'not null' => TRUE,
  4604. 'default' => '',
  4605. ),
  4606. 'rank' => array(
  4607. 'size' => 'normal',
  4608. 'type' => 'int',
  4609. 'not null' => TRUE,
  4610. 'default' => 0,
  4611. ),
  4612. ),
  4613. 'unique keys' => array(
  4614. 'dbxrefprop_c1' => array(
  4615. 0 => 'dbxref_id',
  4616. 1 => 'type_id',
  4617. 2 => 'rank',
  4618. ),
  4619. ),
  4620. 'indexes' => array(
  4621. 'dbxrefprop_idx1' => array(
  4622. 0 => 'dbxref_id',
  4623. ),
  4624. 'dbxrefprop_idx2' => array(
  4625. 0 => 'type_id',
  4626. ),
  4627. ),
  4628. 'primary key' => array(
  4629. 0 => 'dbxrefprop_id',
  4630. ),
  4631. 'foreign keys' => array(
  4632. 'dbxref' => array(
  4633. 'table' => 'dbxref',
  4634. 'columns' => array(
  4635. 'dbxref_id' => 'dbxref_id',
  4636. ),
  4637. ),
  4638. 'cvterm' => array(
  4639. 'table' => 'cvterm',
  4640. 'columns' => array(
  4641. 'type_id' => 'cvterm_id',
  4642. ),
  4643. ),
  4644. ),
  4645. 'referring_tables' => array(
  4646. ),
  4647. );
  4648. return $description;
  4649. }
  4650. /**
  4651. * Implements hook_chado_schema_v1_3_eimage()
  4652. *
  4653. * Purpose: To describe the structure of 'eimage' to tripal
  4654. * @see chado_insert_record()
  4655. * @see chado_update_record()
  4656. * @see chado_select_record()
  4657. * @see chado_generate_var()
  4658. * @see chado_expan_var()
  4659. *
  4660. * @return
  4661. * An array describing the 'eimage' table
  4662. *
  4663. * @ingroup tripal_chado_v1.3_schema_api
  4664. *
  4665. */
  4666. function tripal_chado_chado_schema_v1_3_eimage() {
  4667. $description = array(
  4668. 'description' => '',
  4669. 'table' => 'eimage',
  4670. 'fields' => array(
  4671. 'eimage_id' => array(
  4672. 'size' => 'big',
  4673. 'type' => 'serial',
  4674. 'not null' => TRUE,
  4675. ),
  4676. 'eimage_data' => array(
  4677. 'size' => 'normal',
  4678. 'type' => 'text',
  4679. 'not null' => FALSE,
  4680. ),
  4681. 'eimage_type' => array(
  4682. 'size' => 'normal',
  4683. 'type' => 'varchar',
  4684. 'length' => '255',
  4685. 'not null' => TRUE,
  4686. ),
  4687. 'image_uri' => array(
  4688. 'size' => 'normal',
  4689. 'type' => 'varchar',
  4690. 'length' => '255',
  4691. 'not null' => FALSE,
  4692. ),
  4693. ),
  4694. 'primary key' => array(
  4695. 0 => 'eimage_id',
  4696. ),
  4697. 'foreign keys' => array(
  4698. ),
  4699. 'referring_tables' => array(
  4700. 0 => 'expression_image',
  4701. ),
  4702. );
  4703. return $description;
  4704. }
  4705. /**
  4706. * Implements hook_chado_schema_v1_3_element()
  4707. *
  4708. * Purpose: To describe the structure of 'element' to tripal
  4709. * @see chado_insert_record()
  4710. * @see chado_update_record()
  4711. * @see chado_select_record()
  4712. * @see chado_generate_var()
  4713. * @see chado_expan_var()
  4714. *
  4715. * @return
  4716. * An array describing the 'element' table
  4717. *
  4718. * @ingroup tripal_chado_v1.3_schema_api
  4719. *
  4720. */
  4721. function tripal_chado_chado_schema_v1_3_element() {
  4722. $description = array(
  4723. 'description' => '',
  4724. 'table' => 'element',
  4725. 'fields' => array(
  4726. 'element_id' => array(
  4727. 'size' => 'big',
  4728. 'type' => 'serial',
  4729. 'not null' => TRUE,
  4730. ),
  4731. 'feature_id' => array(
  4732. 'size' => 'big',
  4733. 'type' => 'int',
  4734. 'not null' => FALSE,
  4735. ),
  4736. 'arraydesign_id' => array(
  4737. 'size' => 'big',
  4738. 'type' => 'int',
  4739. 'not null' => TRUE,
  4740. ),
  4741. 'type_id' => array(
  4742. 'size' => 'big',
  4743. 'type' => 'int',
  4744. 'not null' => FALSE,
  4745. ),
  4746. 'dbxref_id' => array(
  4747. 'size' => 'big',
  4748. 'type' => 'int',
  4749. 'not null' => FALSE,
  4750. ),
  4751. ),
  4752. 'unique keys' => array(
  4753. 'element_c1' => array(
  4754. 0 => 'feature_id',
  4755. 1 => 'arraydesign_id',
  4756. ),
  4757. ),
  4758. 'indexes' => array(
  4759. 'element_idx1' => array(
  4760. 0 => 'feature_id',
  4761. ),
  4762. 'element_idx2' => array(
  4763. 0 => 'arraydesign_id',
  4764. ),
  4765. 'element_idx3' => array(
  4766. 0 => 'type_id',
  4767. ),
  4768. 'element_idx4' => array(
  4769. 0 => 'dbxref_id',
  4770. ),
  4771. ),
  4772. 'primary key' => array(
  4773. 0 => 'element_id',
  4774. ),
  4775. 'foreign keys' => array(
  4776. 'feature' => array(
  4777. 'table' => 'feature',
  4778. 'columns' => array(
  4779. 'feature_id' => 'feature_id',
  4780. ),
  4781. ),
  4782. 'arraydesign' => array(
  4783. 'table' => 'arraydesign',
  4784. 'columns' => array(
  4785. 'arraydesign_id' => 'arraydesign_id',
  4786. ),
  4787. ),
  4788. 'cvterm' => array(
  4789. 'table' => 'cvterm',
  4790. 'columns' => array(
  4791. 'type_id' => 'cvterm_id',
  4792. ),
  4793. ),
  4794. 'dbxref' => array(
  4795. 'table' => 'dbxref',
  4796. 'columns' => array(
  4797. 'dbxref_id' => 'dbxref_id',
  4798. ),
  4799. ),
  4800. ),
  4801. 'referring_tables' => array(
  4802. 0 => 'element_relationship',
  4803. 2 => 'elementresult',
  4804. ),
  4805. );
  4806. return $description;
  4807. }
  4808. /**
  4809. * Implements hook_chado_schema_v1_3_element_relationship()
  4810. *
  4811. * Purpose: To describe the structure of 'element_relationship' to tripal
  4812. * @see chado_insert_record()
  4813. * @see chado_update_record()
  4814. * @see chado_select_record()
  4815. * @see chado_generate_var()
  4816. * @see chado_expan_var()
  4817. *
  4818. * @return
  4819. * An array describing the 'element_relationship' table
  4820. *
  4821. * @ingroup tripal_chado_v1.3_schema_api
  4822. *
  4823. */
  4824. function tripal_chado_chado_schema_v1_3_element_relationship() {
  4825. $description = array(
  4826. 'description' => '',
  4827. 'table' => 'element_relationship',
  4828. 'fields' => array(
  4829. 'element_relationship_id' => array(
  4830. 'size' => 'big',
  4831. 'type' => 'serial',
  4832. 'not null' => TRUE,
  4833. ),
  4834. 'subject_id' => array(
  4835. 'size' => 'big',
  4836. 'type' => 'int',
  4837. 'not null' => TRUE,
  4838. ),
  4839. 'type_id' => array(
  4840. 'size' => 'big',
  4841. 'type' => 'int',
  4842. 'not null' => TRUE,
  4843. ),
  4844. 'object_id' => array(
  4845. 'size' => 'big',
  4846. 'type' => 'int',
  4847. 'not null' => TRUE,
  4848. ),
  4849. 'value' => array(
  4850. 'size' => 'normal',
  4851. 'type' => 'text',
  4852. 'not null' => FALSE,
  4853. ),
  4854. 'rank' => array(
  4855. 'size' => 'normal',
  4856. 'type' => 'int',
  4857. 'not null' => TRUE,
  4858. 'default' => 0,
  4859. ),
  4860. ),
  4861. 'unique keys' => array(
  4862. 'element_relationship_c1' => array(
  4863. 0 => 'subject_id',
  4864. 1 => 'object_id',
  4865. 2 => 'type_id',
  4866. 3 => 'rank',
  4867. ),
  4868. ),
  4869. 'indexes' => array(
  4870. 'element_relationship_idx1' => array(
  4871. 0 => 'subject_id',
  4872. ),
  4873. 'element_relationship_idx2' => array(
  4874. 0 => 'type_id',
  4875. ),
  4876. 'element_relationship_idx3' => array(
  4877. 0 => 'object_id',
  4878. ),
  4879. 'element_relationship_idx4' => array(
  4880. 0 => 'value',
  4881. ),
  4882. ),
  4883. 'primary key' => array(
  4884. 0 => 'element_relationship_id',
  4885. ),
  4886. 'foreign keys' => array(
  4887. 'element' => array(
  4888. 'table' => 'element',
  4889. 'columns' => array(
  4890. 'subject_id' => 'element_id',
  4891. 'object_id' => 'element_id',
  4892. ),
  4893. ),
  4894. 'cvterm' => array(
  4895. 'table' => 'cvterm',
  4896. 'columns' => array(
  4897. 'type_id' => 'cvterm_id',
  4898. ),
  4899. ),
  4900. ),
  4901. 'referring_tables' => array(
  4902. ),
  4903. );
  4904. return $description;
  4905. }
  4906. /**
  4907. * Implements hook_chado_schema_v1_3_elementresult()
  4908. *
  4909. * Purpose: To describe the structure of 'elementresult' to tripal
  4910. * @see chado_insert_record()
  4911. * @see chado_update_record()
  4912. * @see chado_select_record()
  4913. * @see chado_generate_var()
  4914. * @see chado_expan_var()
  4915. *
  4916. * @return
  4917. * An array describing the 'elementresult' table
  4918. *
  4919. * @ingroup tripal_chado_v1.3_schema_api
  4920. *
  4921. */
  4922. function tripal_chado_chado_schema_v1_3_elementresult() {
  4923. $description = array(
  4924. 'description' => '',
  4925. 'table' => 'elementresult',
  4926. 'fields' => array(
  4927. 'elementresult_id' => array(
  4928. 'size' => 'big',
  4929. 'type' => 'serial',
  4930. 'not null' => TRUE,
  4931. ),
  4932. 'element_id' => array(
  4933. 'size' => 'big',
  4934. 'type' => 'int',
  4935. 'not null' => TRUE,
  4936. ),
  4937. 'quantification_id' => array(
  4938. 'size' => 'big',
  4939. 'type' => 'int',
  4940. 'not null' => TRUE,
  4941. ),
  4942. 'signal' => array(
  4943. 'size' => 'big',
  4944. 'type' => 'float',
  4945. 'not null' => TRUE,
  4946. ),
  4947. ),
  4948. 'unique keys' => array(
  4949. 'elementresult_c1' => array(
  4950. 0 => 'element_id',
  4951. 1 => 'quantification_id',
  4952. ),
  4953. ),
  4954. 'indexes' => array(
  4955. 'elementresult_idx1' => array(
  4956. 0 => 'element_id',
  4957. ),
  4958. 'elementresult_idx2' => array(
  4959. 0 => 'quantification_id',
  4960. ),
  4961. 'elementresult_idx3' => array(
  4962. 0 => 'signal',
  4963. ),
  4964. ),
  4965. 'primary key' => array(
  4966. 0 => 'elementresult_id',
  4967. ),
  4968. 'foreign keys' => array(
  4969. 'element' => array(
  4970. 'table' => 'element',
  4971. 'columns' => array(
  4972. 'element_id' => 'element_id',
  4973. ),
  4974. ),
  4975. 'quantification' => array(
  4976. 'table' => 'quantification',
  4977. 'columns' => array(
  4978. 'quantification_id' => 'quantification_id',
  4979. ),
  4980. ),
  4981. ),
  4982. 'referring_tables' => array(
  4983. 0 => 'elementresult_relationship',
  4984. ),
  4985. );
  4986. return $description;
  4987. }
  4988. /**
  4989. * Implements hook_chado_schema_v1_3_elementresult_relationship()
  4990. *
  4991. * Purpose: To describe the structure of 'elementresult_relationship' to tripal
  4992. * @see chado_insert_record()
  4993. * @see chado_update_record()
  4994. * @see chado_select_record()
  4995. * @see chado_generate_var()
  4996. * @see chado_expan_var()
  4997. *
  4998. * @return
  4999. * An array describing the 'elementresult_relationship' table
  5000. *
  5001. * @ingroup tripal_chado_v1.3_schema_api
  5002. *
  5003. */
  5004. function tripal_chado_chado_schema_v1_3_elementresult_relationship() {
  5005. $description = array(
  5006. 'description' => '',
  5007. 'table' => 'elementresult_relationship',
  5008. 'fields' => array(
  5009. 'elementresult_relationship_id' => array(
  5010. 'size' => 'big',
  5011. 'type' => 'serial',
  5012. 'not null' => TRUE,
  5013. ),
  5014. 'subject_id' => array(
  5015. 'size' => 'big',
  5016. 'type' => 'int',
  5017. 'not null' => TRUE,
  5018. ),
  5019. 'type_id' => array(
  5020. 'size' => 'big',
  5021. 'type' => 'int',
  5022. 'not null' => TRUE,
  5023. ),
  5024. 'object_id' => array(
  5025. 'size' => 'big',
  5026. 'type' => 'int',
  5027. 'not null' => TRUE,
  5028. ),
  5029. 'value' => array(
  5030. 'size' => 'normal',
  5031. 'type' => 'text',
  5032. 'not null' => FALSE,
  5033. ),
  5034. 'rank' => array(
  5035. 'size' => 'normal',
  5036. 'type' => 'int',
  5037. 'not null' => TRUE,
  5038. 'default' => 0,
  5039. ),
  5040. ),
  5041. 'unique keys' => array(
  5042. 'elementresult_relationship_c1' => array(
  5043. 0 => 'subject_id',
  5044. 1 => 'object_id',
  5045. 2 => 'type_id',
  5046. 3 => 'rank',
  5047. ),
  5048. ),
  5049. 'indexes' => array(
  5050. 'elementresult_relationship_idx1' => array(
  5051. 0 => 'subject_id',
  5052. ),
  5053. 'elementresult_relationship_idx2' => array(
  5054. 0 => 'type_id',
  5055. ),
  5056. 'elementresult_relationship_idx3' => array(
  5057. 0 => 'object_id',
  5058. ),
  5059. 'elementresult_relationship_idx4' => array(
  5060. 0 => 'value',
  5061. ),
  5062. ),
  5063. 'primary key' => array(
  5064. 0 => 'elementresult_relationship_id',
  5065. ),
  5066. 'foreign keys' => array(
  5067. 'elementresult' => array(
  5068. 'table' => 'elementresult',
  5069. 'columns' => array(
  5070. 'subject_id' => 'elementresult_id',
  5071. 'object_id' => 'elementresult_id',
  5072. ),
  5073. ),
  5074. 'cvterm' => array(
  5075. 'table' => 'cvterm',
  5076. 'columns' => array(
  5077. 'type_id' => 'cvterm_id',
  5078. ),
  5079. ),
  5080. ),
  5081. 'referring_tables' => array(
  5082. ),
  5083. );
  5084. return $description;
  5085. }
  5086. /**
  5087. * Implements hook_chado_schema_v1_3_environment()
  5088. *
  5089. * Purpose: To describe the structure of 'environment' to tripal
  5090. * @see chado_insert_record()
  5091. * @see chado_update_record()
  5092. * @see chado_select_record()
  5093. * @see chado_generate_var()
  5094. * @see chado_expan_var()
  5095. *
  5096. * @return
  5097. * An array describing the 'environment' table
  5098. *
  5099. * @ingroup tripal_chado_v1.3_schema_api
  5100. *
  5101. */
  5102. function tripal_chado_chado_schema_v1_3_environment() {
  5103. $description = array(
  5104. 'description' => '',
  5105. 'table' => 'environment',
  5106. 'fields' => array(
  5107. 'environment_id' => array(
  5108. 'size' => 'big',
  5109. 'type' => 'serial',
  5110. 'not null' => TRUE,
  5111. ),
  5112. 'uniquename' => array(
  5113. 'size' => 'normal',
  5114. 'type' => 'text',
  5115. 'not null' => TRUE,
  5116. ),
  5117. 'description' => array(
  5118. 'size' => 'normal',
  5119. 'type' => 'text',
  5120. 'not null' => FALSE,
  5121. ),
  5122. ),
  5123. 'unique keys' => array(
  5124. 'environment_c1' => array(
  5125. 0 => 'uniquename',
  5126. ),
  5127. ),
  5128. 'indexes' => array(
  5129. 'environment_idx1' => array(
  5130. 0 => 'uniquename',
  5131. ),
  5132. ),
  5133. 'primary key' => array(
  5134. 0 => 'environment_id',
  5135. ),
  5136. 'foreign keys' => array(
  5137. ),
  5138. 'referring_tables' => array(
  5139. 0 => 'environment_cvterm',
  5140. 1 => 'phendesc',
  5141. 2 => 'phenotype_comparison',
  5142. 4 => 'phenstatement',
  5143. ),
  5144. );
  5145. return $description;
  5146. }
  5147. /**
  5148. * Implements hook_chado_schema_v1_3_environment_cvterm()
  5149. *
  5150. * Purpose: To describe the structure of 'environment_cvterm' to tripal
  5151. * @see chado_insert_record()
  5152. * @see chado_update_record()
  5153. * @see chado_select_record()
  5154. * @see chado_generate_var()
  5155. * @see chado_expan_var()
  5156. *
  5157. * @return
  5158. * An array describing the 'environment_cvterm' table
  5159. *
  5160. * @ingroup tripal_chado_v1.3_schema_api
  5161. *
  5162. */
  5163. function tripal_chado_chado_schema_v1_3_environment_cvterm() {
  5164. $description = array(
  5165. 'description' => '',
  5166. 'table' => 'environment_cvterm',
  5167. 'fields' => array(
  5168. 'environment_cvterm_id' => array(
  5169. 'size' => 'big',
  5170. 'type' => 'serial',
  5171. 'not null' => TRUE,
  5172. ),
  5173. 'environment_id' => array(
  5174. 'size' => 'big',
  5175. 'type' => 'int',
  5176. 'not null' => TRUE,
  5177. ),
  5178. 'cvterm_id' => array(
  5179. 'size' => 'big',
  5180. 'type' => 'int',
  5181. 'not null' => TRUE,
  5182. ),
  5183. ),
  5184. 'unique keys' => array(
  5185. 'environment_cvterm_c1' => array(
  5186. 0 => 'environment_id',
  5187. 1 => 'cvterm_id',
  5188. ),
  5189. ),
  5190. 'indexes' => array(
  5191. 'environment_cvterm_idx1' => array(
  5192. 0 => 'environment_id',
  5193. ),
  5194. 'environment_cvterm_idx2' => array(
  5195. 0 => 'cvterm_id',
  5196. ),
  5197. ),
  5198. 'primary key' => array(
  5199. 0 => 'environment_cvterm_id',
  5200. ),
  5201. 'foreign keys' => array(
  5202. 'environment' => array(
  5203. 'table' => 'environment',
  5204. 'columns' => array(
  5205. 'environment_id' => 'environment_id',
  5206. ),
  5207. ),
  5208. 'cvterm' => array(
  5209. 'table' => 'cvterm',
  5210. 'columns' => array(
  5211. 'cvterm_id' => 'cvterm_id',
  5212. ),
  5213. ),
  5214. ),
  5215. 'referring_tables' => array(
  5216. ),
  5217. );
  5218. return $description;
  5219. }
  5220. /**
  5221. * Implements hook_chado_schema_v1_3_expression()
  5222. *
  5223. * Purpose: To describe the structure of 'expression' to tripal
  5224. * @see chado_insert_record()
  5225. * @see chado_update_record()
  5226. * @see chado_select_record()
  5227. * @see chado_generate_var()
  5228. * @see chado_expan_var()
  5229. *
  5230. * @return
  5231. * An array describing the 'expression' table
  5232. *
  5233. * @ingroup tripal_chado_v1.3_schema_api
  5234. *
  5235. */
  5236. function tripal_chado_chado_schema_v1_3_expression() {
  5237. $description = array(
  5238. 'description' => '',
  5239. 'table' => 'expression',
  5240. 'fields' => array(
  5241. 'expression_id' => array(
  5242. 'size' => 'big',
  5243. 'type' => 'serial',
  5244. 'not null' => TRUE,
  5245. ),
  5246. 'uniquename' => array(
  5247. 'size' => 'normal',
  5248. 'type' => 'text',
  5249. 'not null' => TRUE,
  5250. ),
  5251. 'md5checksum' => array(
  5252. 'size' => 'normal',
  5253. 'type' => 'char',
  5254. 'length' => '32',
  5255. 'not null' => FALSE,
  5256. ),
  5257. 'description' => array(
  5258. 'size' => 'normal',
  5259. 'type' => 'text',
  5260. 'not null' => FALSE,
  5261. ),
  5262. ),
  5263. 'unique keys' => array(
  5264. 'expression_c1' => array(
  5265. 0 => 'uniquename',
  5266. ),
  5267. ),
  5268. 'primary key' => array(
  5269. 0 => 'expression_id',
  5270. ),
  5271. 'foreign keys' => array(
  5272. ),
  5273. 'referring_tables' => array(
  5274. 0 => 'expression_cvterm',
  5275. 1 => 'expression_image',
  5276. 2 => 'expressionprop',
  5277. 3 => 'expression_pub',
  5278. 4 => 'feature_expression',
  5279. 5 => 'library_expression',
  5280. ),
  5281. );
  5282. return $description;
  5283. }
  5284. /**
  5285. * Implements hook_chado_schema_v1_3_expression_cvterm()
  5286. *
  5287. * Purpose: To describe the structure of 'expression_cvterm' to tripal
  5288. * @see chado_insert_record()
  5289. * @see chado_update_record()
  5290. * @see chado_select_record()
  5291. * @see chado_generate_var()
  5292. * @see chado_expan_var()
  5293. *
  5294. * @return
  5295. * An array describing the 'expression_cvterm' table
  5296. *
  5297. * @ingroup tripal_chado_v1.3_schema_api
  5298. *
  5299. */
  5300. function tripal_chado_chado_schema_v1_3_expression_cvterm() {
  5301. $description = array(
  5302. 'description' => '',
  5303. 'table' => 'expression_cvterm',
  5304. 'fields' => array(
  5305. 'expression_cvterm_id' => array(
  5306. 'size' => 'big',
  5307. 'type' => 'serial',
  5308. 'not null' => TRUE,
  5309. ),
  5310. 'expression_id' => array(
  5311. 'size' => 'big',
  5312. 'type' => 'int',
  5313. 'not null' => TRUE,
  5314. ),
  5315. 'cvterm_id' => array(
  5316. 'size' => 'big',
  5317. 'type' => 'int',
  5318. 'not null' => TRUE,
  5319. ),
  5320. 'rank' => array(
  5321. 'size' => 'normal',
  5322. 'type' => 'int',
  5323. 'not null' => TRUE,
  5324. 'default' => 0,
  5325. ),
  5326. 'cvterm_type_id' => array(
  5327. 'size' => 'big',
  5328. 'type' => 'int',
  5329. 'not null' => TRUE,
  5330. ),
  5331. ),
  5332. 'unique keys' => array(
  5333. 'expression_cvterm_c1' => array(
  5334. 0 => 'expression_id',
  5335. 1 => 'cvterm_id',
  5336. 2 => 'rank',
  5337. 3 => 'cvterm_type_id',
  5338. ),
  5339. ),
  5340. 'indexes' => array(
  5341. 'expression_cvterm_idx1' => array(
  5342. 0 => 'expression_id',
  5343. ),
  5344. 'expression_cvterm_idx2' => array(
  5345. 0 => 'cvterm_id',
  5346. ),
  5347. 'expression_cvterm_idx3' => array(
  5348. 0 => 'cvterm_type_id',
  5349. ),
  5350. ),
  5351. 'primary key' => array(
  5352. 0 => 'expression_cvterm_id',
  5353. ),
  5354. 'foreign keys' => array(
  5355. 'expression' => array(
  5356. 'table' => 'expression',
  5357. 'columns' => array(
  5358. 'expression_id' => 'expression_id',
  5359. ),
  5360. ),
  5361. 'cvterm' => array(
  5362. 'table' => 'cvterm',
  5363. 'columns' => array(
  5364. 'cvterm_id' => 'cvterm_id',
  5365. 'cvterm_type_id' => 'cvterm_id',
  5366. ),
  5367. ),
  5368. ),
  5369. 'referring_tables' => array(
  5370. 0 => 'expression_cvtermprop',
  5371. ),
  5372. );
  5373. return $description;
  5374. }
  5375. /**
  5376. * Implements hook_chado_schema_v1_3_expression_cvtermprop()
  5377. *
  5378. * Purpose: To describe the structure of 'expression_cvtermprop' to tripal
  5379. * @see chado_insert_record()
  5380. * @see chado_update_record()
  5381. * @see chado_select_record()
  5382. * @see chado_generate_var()
  5383. * @see chado_expan_var()
  5384. *
  5385. * @return
  5386. * An array describing the 'expression_cvtermprop' table
  5387. *
  5388. * @ingroup tripal_chado_v1.3_schema_api
  5389. *
  5390. */
  5391. function tripal_chado_chado_schema_v1_3_expression_cvtermprop() {
  5392. $description = array(
  5393. 'description' => '',
  5394. 'table' => 'expression_cvtermprop',
  5395. 'fields' => array(
  5396. 'expression_cvtermprop_id' => array(
  5397. 'size' => 'big',
  5398. 'type' => 'serial',
  5399. 'not null' => TRUE,
  5400. ),
  5401. 'expression_cvterm_id' => array(
  5402. 'size' => 'big',
  5403. 'type' => 'int',
  5404. 'not null' => TRUE,
  5405. ),
  5406. 'type_id' => array(
  5407. 'size' => 'big',
  5408. 'type' => 'int',
  5409. 'not null' => TRUE,
  5410. ),
  5411. 'value' => array(
  5412. 'size' => 'normal',
  5413. 'type' => 'text',
  5414. 'not null' => FALSE,
  5415. ),
  5416. 'rank' => array(
  5417. 'size' => 'normal',
  5418. 'type' => 'int',
  5419. 'not null' => TRUE,
  5420. 'default' => 0,
  5421. ),
  5422. ),
  5423. 'unique keys' => array(
  5424. 'expression_cvtermprop_c1' => array(
  5425. 0 => 'expression_cvterm_id',
  5426. 1 => 'type_id',
  5427. 2 => 'rank',
  5428. ),
  5429. ),
  5430. 'indexes' => array(
  5431. 'expression_cvtermprop_idx1' => array(
  5432. 0 => 'expression_cvterm_id',
  5433. ),
  5434. 'expression_cvtermprop_idx2' => array(
  5435. 0 => 'type_id',
  5436. ),
  5437. ),
  5438. 'primary key' => array(
  5439. 0 => 'expression_cvtermprop_id',
  5440. ),
  5441. 'foreign keys' => array(
  5442. 'expression_cvterm' => array(
  5443. 'table' => 'expression_cvterm',
  5444. 'columns' => array(
  5445. 'expression_cvterm_id' => 'expression_cvterm_id',
  5446. ),
  5447. ),
  5448. 'cvterm' => array(
  5449. 'table' => 'cvterm',
  5450. 'columns' => array(
  5451. 'type_id' => 'cvterm_id',
  5452. ),
  5453. ),
  5454. ),
  5455. 'referring_tables' => array(
  5456. ),
  5457. );
  5458. return $description;
  5459. }
  5460. /**
  5461. * Implements hook_chado_schema_v1_3_expression_image()
  5462. *
  5463. * Purpose: To describe the structure of 'expression_image' to tripal
  5464. * @see chado_insert_record()
  5465. * @see chado_update_record()
  5466. * @see chado_select_record()
  5467. * @see chado_generate_var()
  5468. * @see chado_expan_var()
  5469. *
  5470. * @return
  5471. * An array describing the 'expression_image' table
  5472. *
  5473. * @ingroup tripal_chado_v1.3_schema_api
  5474. *
  5475. */
  5476. function tripal_chado_chado_schema_v1_3_expression_image() {
  5477. $description = array(
  5478. 'description' => '',
  5479. 'table' => 'expression_image',
  5480. 'fields' => array(
  5481. 'expression_image_id' => array(
  5482. 'size' => 'big',
  5483. 'type' => 'serial',
  5484. 'not null' => TRUE,
  5485. ),
  5486. 'expression_id' => array(
  5487. 'size' => 'big',
  5488. 'type' => 'int',
  5489. 'not null' => TRUE,
  5490. ),
  5491. 'eimage_id' => array(
  5492. 'size' => 'big',
  5493. 'type' => 'int',
  5494. 'not null' => TRUE,
  5495. ),
  5496. ),
  5497. 'unique keys' => array(
  5498. 'expression_image_c1' => array(
  5499. 0 => 'expression_id',
  5500. 1 => 'eimage_id',
  5501. ),
  5502. ),
  5503. 'indexes' => array(
  5504. 'expression_image_idx1' => array(
  5505. 0 => 'expression_id',
  5506. ),
  5507. 'expression_image_idx2' => array(
  5508. 0 => 'eimage_id',
  5509. ),
  5510. ),
  5511. 'primary key' => array(
  5512. 0 => 'expression_image_id',
  5513. ),
  5514. 'foreign keys' => array(
  5515. 'expression' => array(
  5516. 'table' => 'expression',
  5517. 'columns' => array(
  5518. 'expression_id' => 'expression_id',
  5519. ),
  5520. ),
  5521. 'eimage' => array(
  5522. 'table' => 'eimage',
  5523. 'columns' => array(
  5524. 'eimage_id' => 'eimage_id',
  5525. ),
  5526. ),
  5527. ),
  5528. 'referring_tables' => array(
  5529. ),
  5530. );
  5531. return $description;
  5532. }
  5533. /**
  5534. * Implements hook_chado_schema_v1_3_expressionprop()
  5535. *
  5536. * Purpose: To describe the structure of 'expressionprop' to tripal
  5537. * @see chado_insert_record()
  5538. * @see chado_update_record()
  5539. * @see chado_select_record()
  5540. * @see chado_generate_var()
  5541. * @see chado_expan_var()
  5542. *
  5543. * @return
  5544. * An array describing the 'expressionprop' table
  5545. *
  5546. * @ingroup tripal_chado_v1.3_schema_api
  5547. *
  5548. */
  5549. function tripal_chado_chado_schema_v1_3_expressionprop() {
  5550. $description = array(
  5551. 'description' => '',
  5552. 'table' => 'expressionprop',
  5553. 'fields' => array(
  5554. 'expressionprop_id' => array(
  5555. 'size' => 'big',
  5556. 'type' => 'serial',
  5557. 'not null' => TRUE,
  5558. ),
  5559. 'expression_id' => array(
  5560. 'size' => 'big',
  5561. 'type' => 'int',
  5562. 'not null' => TRUE,
  5563. ),
  5564. 'type_id' => array(
  5565. 'size' => 'big',
  5566. 'type' => 'int',
  5567. 'not null' => TRUE,
  5568. ),
  5569. 'value' => array(
  5570. 'size' => 'normal',
  5571. 'type' => 'text',
  5572. 'not null' => FALSE,
  5573. ),
  5574. 'rank' => array(
  5575. 'size' => 'normal',
  5576. 'type' => 'int',
  5577. 'not null' => TRUE,
  5578. 'default' => 0,
  5579. ),
  5580. ),
  5581. 'unique keys' => array(
  5582. 'expressionprop_c1' => array(
  5583. 0 => 'expression_id',
  5584. 1 => 'type_id',
  5585. 2 => 'rank',
  5586. ),
  5587. ),
  5588. 'indexes' => array(
  5589. 'expressionprop_idx1' => array(
  5590. 0 => 'expression_id',
  5591. ),
  5592. 'expressionprop_idx2' => array(
  5593. 0 => 'type_id',
  5594. ),
  5595. ),
  5596. 'primary key' => array(
  5597. 0 => 'expressionprop_id',
  5598. ),
  5599. 'foreign keys' => array(
  5600. 'expression' => array(
  5601. 'table' => 'expression',
  5602. 'columns' => array(
  5603. 'expression_id' => 'expression_id',
  5604. ),
  5605. ),
  5606. 'cvterm' => array(
  5607. 'table' => 'cvterm',
  5608. 'columns' => array(
  5609. 'type_id' => 'cvterm_id',
  5610. ),
  5611. ),
  5612. ),
  5613. 'referring_tables' => array(
  5614. ),
  5615. );
  5616. return $description;
  5617. }
  5618. /**
  5619. * Implements hook_chado_schema_v1_3_expression_pub()
  5620. *
  5621. * Purpose: To describe the structure of 'expression_pub' to tripal
  5622. * @see chado_insert_record()
  5623. * @see chado_update_record()
  5624. * @see chado_select_record()
  5625. * @see chado_generate_var()
  5626. * @see chado_expan_var()
  5627. *
  5628. * @return
  5629. * An array describing the 'expression_pub' table
  5630. *
  5631. * @ingroup tripal_chado_v1.3_schema_api
  5632. *
  5633. */
  5634. function tripal_chado_chado_schema_v1_3_expression_pub() {
  5635. $description = array(
  5636. 'description' => '',
  5637. 'table' => 'expression_pub',
  5638. 'fields' => array(
  5639. 'expression_pub_id' => array(
  5640. 'size' => 'big',
  5641. 'type' => 'serial',
  5642. 'not null' => TRUE,
  5643. ),
  5644. 'expression_id' => array(
  5645. 'size' => 'big',
  5646. 'type' => 'int',
  5647. 'not null' => TRUE,
  5648. ),
  5649. 'pub_id' => array(
  5650. 'size' => 'big',
  5651. 'type' => 'int',
  5652. 'not null' => TRUE,
  5653. ),
  5654. ),
  5655. 'unique keys' => array(
  5656. 'expression_pub_c1' => array(
  5657. 0 => 'expression_id',
  5658. 1 => 'pub_id',
  5659. ),
  5660. ),
  5661. 'indexes' => array(
  5662. 'expression_pub_idx1' => array(
  5663. 0 => 'expression_id',
  5664. ),
  5665. 'expression_pub_idx2' => array(
  5666. 0 => 'pub_id',
  5667. ),
  5668. ),
  5669. 'primary key' => array(
  5670. 0 => 'expression_pub_id',
  5671. ),
  5672. 'foreign keys' => array(
  5673. 'expression' => array(
  5674. 'table' => 'expression',
  5675. 'columns' => array(
  5676. 'expression_id' => 'expression_id',
  5677. ),
  5678. ),
  5679. 'pub' => array(
  5680. 'table' => 'pub',
  5681. 'columns' => array(
  5682. 'pub_id' => 'pub_id',
  5683. ),
  5684. ),
  5685. ),
  5686. 'referring_tables' => array(
  5687. ),
  5688. );
  5689. return $description;
  5690. }
  5691. /**
  5692. * Implements hook_chado_schema_v1_3_feature()
  5693. *
  5694. * Purpose: To describe the structure of 'feature' to tripal
  5695. * @see chado_insert_record()
  5696. * @see chado_update_record()
  5697. * @see chado_select_record()
  5698. * @see chado_generate_var()
  5699. * @see chado_expan_var()
  5700. *
  5701. * @return
  5702. * An array describing the 'feature' table
  5703. *
  5704. * @ingroup tripal_chado_v1.3_schema_api
  5705. *
  5706. */
  5707. function tripal_chado_chado_schema_v1_3_feature() {
  5708. $description = array(
  5709. 'description' => '',
  5710. 'table' => 'feature',
  5711. 'fields' => array(
  5712. 'feature_id' => array(
  5713. 'size' => 'big',
  5714. 'type' => 'serial',
  5715. 'not null' => TRUE,
  5716. ),
  5717. 'dbxref_id' => array(
  5718. 'size' => 'big',
  5719. 'type' => 'int',
  5720. 'not null' => FALSE,
  5721. ),
  5722. 'organism_id' => array(
  5723. 'size' => 'big',
  5724. 'type' => 'int',
  5725. 'not null' => TRUE,
  5726. ),
  5727. 'name' => array(
  5728. 'size' => 'normal',
  5729. 'type' => 'varchar',
  5730. 'length' => '255',
  5731. 'not null' => FALSE,
  5732. ),
  5733. 'uniquename' => array(
  5734. 'size' => 'normal',
  5735. 'type' => 'text',
  5736. 'not null' => TRUE,
  5737. ),
  5738. 'residues' => array(
  5739. 'size' => 'normal',
  5740. 'type' => 'text',
  5741. 'not null' => FALSE,
  5742. ),
  5743. 'seqlen' => array(
  5744. 'size' => 'big',
  5745. 'type' => 'int',
  5746. 'not null' => FALSE,
  5747. ),
  5748. 'md5checksum' => array(
  5749. 'size' => 'normal',
  5750. 'type' => 'char',
  5751. 'length' => '32',
  5752. 'not null' => FALSE,
  5753. ),
  5754. 'type_id' => array(
  5755. 'size' => 'big',
  5756. 'type' => 'int',
  5757. 'not null' => TRUE,
  5758. ),
  5759. 'is_analysis' => array(
  5760. 'size' => 'normal',
  5761. 'type' => 'boolean',
  5762. 'not null' => TRUE,
  5763. 'default' => FALSE,
  5764. ),
  5765. 'is_obsolete' => array(
  5766. 'size' => 'normal',
  5767. 'type' => 'boolean',
  5768. 'not null' => TRUE,
  5769. 'default' => FALSE,
  5770. ),
  5771. 'timeaccessioned' => array(
  5772. 'size' => 'normal',
  5773. 'type' => 'datetime',
  5774. 'not null' => TRUE,
  5775. 'default' => 'now()',
  5776. ),
  5777. 'timelastmodified' => array(
  5778. 'size' => 'normal',
  5779. 'type' => 'datetime',
  5780. 'not null' => TRUE,
  5781. 'default' => 'now()',
  5782. ),
  5783. ),
  5784. 'unique keys' => array(
  5785. 'feature_c1' => array(
  5786. 0 => 'organism_id',
  5787. 1 => 'uniquename',
  5788. 2 => 'type_id',
  5789. ),
  5790. ),
  5791. 'indexes' => array(
  5792. 'feature_idx1' => array(
  5793. 0 => 'dbxref_id',
  5794. ),
  5795. 'feature_idx2' => array(
  5796. 0 => 'organism_id',
  5797. ),
  5798. 'feature_idx3' => array(
  5799. 0 => 'type_id',
  5800. ),
  5801. 'feature_idx4' => array(
  5802. 0 => 'uniquename',
  5803. ),
  5804. 'feature_name_ind1' => array(
  5805. 0 => 'name',
  5806. ),
  5807. ),
  5808. 'primary key' => array(
  5809. 0 => 'feature_id',
  5810. ),
  5811. 'foreign keys' => array(
  5812. 'dbxref' => array(
  5813. 'table' => 'dbxref',
  5814. 'columns' => array(
  5815. 'dbxref_id' => 'dbxref_id',
  5816. ),
  5817. ),
  5818. 'organism' => array(
  5819. 'table' => 'organism',
  5820. 'columns' => array(
  5821. 'organism_id' => 'organism_id',
  5822. ),
  5823. ),
  5824. 'cvterm' => array(
  5825. 'table' => 'cvterm',
  5826. 'columns' => array(
  5827. 'type_id' => 'cvterm_id',
  5828. ),
  5829. ),
  5830. ),
  5831. 'referring_tables' => array(
  5832. 0 => 'analysisfeature',
  5833. 1 => 'cell_line_feature',
  5834. 2 => 'element',
  5835. 3 => 'feature_contact',
  5836. 4 => 'feature_cvterm',
  5837. 5 => 'feature_dbxref',
  5838. 6 => 'feature_expression',
  5839. 7 => 'feature_genotype',
  5840. 9 => 'featureloc',
  5841. 11 => 'feature_phenotype',
  5842. 12 => 'featurepos',
  5843. 14 => 'featureprop',
  5844. 15 => 'feature_pub',
  5845. 16 => 'featurerange',
  5846. 21 => 'feature_relationship',
  5847. 23 => 'feature_synonym',
  5848. 24 => 'library_feature',
  5849. 25 => 'nd_reagent',
  5850. 26 => 'phylonode',
  5851. 27 => 'project_feature',
  5852. 28 => 'stock_feature',
  5853. 29 => 'studyprop_feature',
  5854. ),
  5855. );
  5856. return $description;
  5857. }
  5858. /**
  5859. * Implements hook_chado_schema_v1_3_feature_contact()
  5860. *
  5861. * Purpose: To describe the structure of 'feature_contact' to tripal
  5862. * @see chado_insert_record()
  5863. * @see chado_update_record()
  5864. * @see chado_select_record()
  5865. * @see chado_generate_var()
  5866. * @see chado_expan_var()
  5867. *
  5868. * @return
  5869. * An array describing the 'feature_contact' table
  5870. *
  5871. * @ingroup tripal_chado_v1.3_schema_api
  5872. *
  5873. */
  5874. function tripal_chado_chado_schema_v1_3_feature_contact() {
  5875. $description = array(
  5876. 'description' => '',
  5877. 'table' => 'feature_contact',
  5878. 'fields' => array(
  5879. 'feature_contact_id' => array(
  5880. 'size' => 'big',
  5881. 'type' => 'serial',
  5882. 'not null' => TRUE,
  5883. ),
  5884. 'feature_id' => array(
  5885. 'size' => 'big',
  5886. 'type' => 'int',
  5887. 'not null' => TRUE,
  5888. ),
  5889. 'contact_id' => array(
  5890. 'size' => 'big',
  5891. 'type' => 'int',
  5892. 'not null' => TRUE,
  5893. ),
  5894. ),
  5895. 'unique keys' => array(
  5896. 'feature_contact_c1' => array(
  5897. 0 => 'feature_id',
  5898. 1 => 'contact_id',
  5899. ),
  5900. ),
  5901. 'indexes' => array(
  5902. 'feature_contact_idx1' => array(
  5903. 0 => 'feature_id',
  5904. ),
  5905. 'feature_contact_idx2' => array(
  5906. 0 => 'contact_id',
  5907. ),
  5908. ),
  5909. 'primary key' => array(
  5910. 0 => 'feature_contact_id',
  5911. ),
  5912. 'foreign keys' => array(
  5913. 'contact' => array(
  5914. 'table' => 'contact',
  5915. 'columns' => array(
  5916. 'contact_id' => 'contact_id',
  5917. ),
  5918. ),
  5919. 'feature' => array(
  5920. 'table' => 'feature',
  5921. 'columns' => array(
  5922. 'feature_id' => 'feature_id',
  5923. ),
  5924. ),
  5925. ),
  5926. 'referring_tables' => array(
  5927. ),
  5928. );
  5929. return $description;
  5930. }
  5931. /**
  5932. * Implements hook_chado_schema_v1_3_feature_cvterm()
  5933. *
  5934. * Purpose: To describe the structure of 'feature_cvterm' to tripal
  5935. * @see chado_insert_record()
  5936. * @see chado_update_record()
  5937. * @see chado_select_record()
  5938. * @see chado_generate_var()
  5939. * @see chado_expan_var()
  5940. *
  5941. * @return
  5942. * An array describing the 'feature_cvterm' table
  5943. *
  5944. * @ingroup tripal_chado_v1.3_schema_api
  5945. *
  5946. */
  5947. function tripal_chado_chado_schema_v1_3_feature_cvterm() {
  5948. $description = array(
  5949. 'description' => '',
  5950. 'table' => 'feature_cvterm',
  5951. 'fields' => array(
  5952. 'feature_cvterm_id' => array(
  5953. 'size' => 'big',
  5954. 'type' => 'serial',
  5955. 'not null' => TRUE,
  5956. ),
  5957. 'feature_id' => array(
  5958. 'size' => 'big',
  5959. 'type' => 'int',
  5960. 'not null' => TRUE,
  5961. ),
  5962. 'cvterm_id' => array(
  5963. 'size' => 'big',
  5964. 'type' => 'int',
  5965. 'not null' => TRUE,
  5966. ),
  5967. 'pub_id' => array(
  5968. 'size' => 'big',
  5969. 'type' => 'int',
  5970. 'not null' => TRUE,
  5971. ),
  5972. 'is_not' => array(
  5973. 'size' => 'normal',
  5974. 'type' => 'boolean',
  5975. 'not null' => TRUE,
  5976. 'default' => FALSE,
  5977. ),
  5978. 'rank' => array(
  5979. 'size' => 'normal',
  5980. 'type' => 'int',
  5981. 'not null' => TRUE,
  5982. 'default' => 0,
  5983. ),
  5984. ),
  5985. 'unique keys' => array(
  5986. 'feature_cvterm_c1' => array(
  5987. 0 => 'feature_id',
  5988. 1 => 'cvterm_id',
  5989. 2 => 'pub_id',
  5990. 3 => 'rank',
  5991. ),
  5992. ),
  5993. 'indexes' => array(
  5994. 'feature_cvterm_idx1' => array(
  5995. 0 => 'feature_id',
  5996. ),
  5997. 'feature_cvterm_idx2' => array(
  5998. 0 => 'cvterm_id',
  5999. ),
  6000. 'feature_cvterm_idx3' => array(
  6001. 0 => 'pub_id',
  6002. ),
  6003. ),
  6004. 'primary key' => array(
  6005. 0 => 'feature_cvterm_id',
  6006. ),
  6007. 'foreign keys' => array(
  6008. 'feature' => array(
  6009. 'table' => 'feature',
  6010. 'columns' => array(
  6011. 'feature_id' => 'feature_id',
  6012. ),
  6013. ),
  6014. 'cvterm' => array(
  6015. 'table' => 'cvterm',
  6016. 'columns' => array(
  6017. 'cvterm_id' => 'cvterm_id',
  6018. ),
  6019. ),
  6020. 'pub' => array(
  6021. 'table' => 'pub',
  6022. 'columns' => array(
  6023. 'pub_id' => 'pub_id',
  6024. ),
  6025. ),
  6026. ),
  6027. 'referring_tables' => array(
  6028. 0 => 'feature_cvterm_dbxref',
  6029. 1 => 'feature_cvtermprop',
  6030. 2 => 'feature_cvterm_pub',
  6031. ),
  6032. );
  6033. return $description;
  6034. }
  6035. /**
  6036. * Implements hook_chado_schema_v1_3_feature_cvterm_dbxref()
  6037. *
  6038. * Purpose: To describe the structure of 'feature_cvterm_dbxref' to tripal
  6039. * @see chado_insert_record()
  6040. * @see chado_update_record()
  6041. * @see chado_select_record()
  6042. * @see chado_generate_var()
  6043. * @see chado_expan_var()
  6044. *
  6045. * @return
  6046. * An array describing the 'feature_cvterm_dbxref' table
  6047. *
  6048. * @ingroup tripal_chado_v1.3_schema_api
  6049. *
  6050. */
  6051. function tripal_chado_chado_schema_v1_3_feature_cvterm_dbxref() {
  6052. $description = array(
  6053. 'description' => '',
  6054. 'table' => 'feature_cvterm_dbxref',
  6055. 'fields' => array(
  6056. 'feature_cvterm_dbxref_id' => array(
  6057. 'size' => 'big',
  6058. 'type' => 'serial',
  6059. 'not null' => TRUE,
  6060. ),
  6061. 'feature_cvterm_id' => array(
  6062. 'size' => 'big',
  6063. 'type' => 'int',
  6064. 'not null' => TRUE,
  6065. ),
  6066. 'dbxref_id' => array(
  6067. 'size' => 'big',
  6068. 'type' => 'int',
  6069. 'not null' => TRUE,
  6070. ),
  6071. ),
  6072. 'unique keys' => array(
  6073. 'feature_cvterm_dbxref_c1' => array(
  6074. 0 => 'feature_cvterm_id',
  6075. 1 => 'dbxref_id',
  6076. ),
  6077. ),
  6078. 'indexes' => array(
  6079. 'feature_cvterm_dbxref_idx1' => array(
  6080. 0 => 'feature_cvterm_id',
  6081. ),
  6082. 'feature_cvterm_dbxref_idx2' => array(
  6083. 0 => 'dbxref_id',
  6084. ),
  6085. ),
  6086. 'primary key' => array(
  6087. 0 => 'feature_cvterm_dbxref_id',
  6088. ),
  6089. 'foreign keys' => array(
  6090. 'feature_cvterm' => array(
  6091. 'table' => 'feature_cvterm',
  6092. 'columns' => array(
  6093. 'feature_cvterm_id' => 'feature_cvterm_id',
  6094. ),
  6095. ),
  6096. 'dbxref' => array(
  6097. 'table' => 'dbxref',
  6098. 'columns' => array(
  6099. 'dbxref_id' => 'dbxref_id',
  6100. ),
  6101. ),
  6102. ),
  6103. 'referring_tables' => array(
  6104. ),
  6105. );
  6106. return $description;
  6107. }
  6108. /**
  6109. * Implements hook_chado_schema_v1_3_feature_cvtermprop()
  6110. *
  6111. * Purpose: To describe the structure of 'feature_cvtermprop' to tripal
  6112. * @see chado_insert_record()
  6113. * @see chado_update_record()
  6114. * @see chado_select_record()
  6115. * @see chado_generate_var()
  6116. * @see chado_expan_var()
  6117. *
  6118. * @return
  6119. * An array describing the 'feature_cvtermprop' table
  6120. *
  6121. * @ingroup tripal_chado_v1.3_schema_api
  6122. *
  6123. */
  6124. function tripal_chado_chado_schema_v1_3_feature_cvtermprop() {
  6125. $description = array(
  6126. 'description' => '',
  6127. 'table' => 'feature_cvtermprop',
  6128. 'fields' => array(
  6129. 'feature_cvtermprop_id' => array(
  6130. 'size' => 'big',
  6131. 'type' => 'serial',
  6132. 'not null' => TRUE,
  6133. ),
  6134. 'feature_cvterm_id' => array(
  6135. 'size' => 'big',
  6136. 'type' => 'int',
  6137. 'not null' => TRUE,
  6138. ),
  6139. 'type_id' => array(
  6140. 'size' => 'big',
  6141. 'type' => 'int',
  6142. 'not null' => TRUE,
  6143. ),
  6144. 'value' => array(
  6145. 'size' => 'normal',
  6146. 'type' => 'text',
  6147. 'not null' => FALSE,
  6148. ),
  6149. 'rank' => array(
  6150. 'size' => 'normal',
  6151. 'type' => 'int',
  6152. 'not null' => TRUE,
  6153. 'default' => 0,
  6154. ),
  6155. ),
  6156. 'unique keys' => array(
  6157. 'feature_cvtermprop_c1' => array(
  6158. 0 => 'feature_cvterm_id',
  6159. 1 => 'type_id',
  6160. 2 => 'rank',
  6161. ),
  6162. ),
  6163. 'indexes' => array(
  6164. 'feature_cvtermprop_idx1' => array(
  6165. 0 => 'feature_cvterm_id',
  6166. ),
  6167. 'feature_cvtermprop_idx2' => array(
  6168. 0 => 'type_id',
  6169. ),
  6170. ),
  6171. 'primary key' => array(
  6172. 0 => 'feature_cvtermprop_id',
  6173. ),
  6174. 'foreign keys' => array(
  6175. 'feature_cvterm' => array(
  6176. 'table' => 'feature_cvterm',
  6177. 'columns' => array(
  6178. 'feature_cvterm_id' => 'feature_cvterm_id',
  6179. ),
  6180. ),
  6181. 'cvterm' => array(
  6182. 'table' => 'cvterm',
  6183. 'columns' => array(
  6184. 'type_id' => 'cvterm_id',
  6185. ),
  6186. ),
  6187. ),
  6188. 'referring_tables' => array(
  6189. ),
  6190. );
  6191. return $description;
  6192. }
  6193. /**
  6194. * Implements hook_chado_schema_v1_3_feature_cvterm_pub()
  6195. *
  6196. * Purpose: To describe the structure of 'feature_cvterm_pub' to tripal
  6197. * @see chado_insert_record()
  6198. * @see chado_update_record()
  6199. * @see chado_select_record()
  6200. * @see chado_generate_var()
  6201. * @see chado_expan_var()
  6202. *
  6203. * @return
  6204. * An array describing the 'feature_cvterm_pub' table
  6205. *
  6206. * @ingroup tripal_chado_v1.3_schema_api
  6207. *
  6208. */
  6209. function tripal_chado_chado_schema_v1_3_feature_cvterm_pub() {
  6210. $description = array(
  6211. 'description' => '',
  6212. 'table' => 'feature_cvterm_pub',
  6213. 'fields' => array(
  6214. 'feature_cvterm_pub_id' => array(
  6215. 'size' => 'big',
  6216. 'type' => 'serial',
  6217. 'not null' => TRUE,
  6218. ),
  6219. 'feature_cvterm_id' => array(
  6220. 'size' => 'big',
  6221. 'type' => 'int',
  6222. 'not null' => TRUE,
  6223. ),
  6224. 'pub_id' => array(
  6225. 'size' => 'big',
  6226. 'type' => 'int',
  6227. 'not null' => TRUE,
  6228. ),
  6229. ),
  6230. 'unique keys' => array(
  6231. 'feature_cvterm_pub_c1' => array(
  6232. 0 => 'feature_cvterm_id',
  6233. 1 => 'pub_id',
  6234. ),
  6235. ),
  6236. 'indexes' => array(
  6237. 'feature_cvterm_pub_idx1' => array(
  6238. 0 => 'feature_cvterm_id',
  6239. ),
  6240. 'feature_cvterm_pub_idx2' => array(
  6241. 0 => 'pub_id',
  6242. ),
  6243. ),
  6244. 'primary key' => array(
  6245. 0 => 'feature_cvterm_pub_id',
  6246. ),
  6247. 'foreign keys' => array(
  6248. 'feature_cvterm' => array(
  6249. 'table' => 'feature_cvterm',
  6250. 'columns' => array(
  6251. 'feature_cvterm_id' => 'feature_cvterm_id',
  6252. ),
  6253. ),
  6254. 'pub' => array(
  6255. 'table' => 'pub',
  6256. 'columns' => array(
  6257. 'pub_id' => 'pub_id',
  6258. ),
  6259. ),
  6260. ),
  6261. 'referring_tables' => array(
  6262. ),
  6263. );
  6264. return $description;
  6265. }
  6266. /**
  6267. * Implements hook_chado_schema_v1_3_feature_dbxref()
  6268. *
  6269. * Purpose: To describe the structure of 'feature_dbxref' to tripal
  6270. * @see chado_insert_record()
  6271. * @see chado_update_record()
  6272. * @see chado_select_record()
  6273. * @see chado_generate_var()
  6274. * @see chado_expan_var()
  6275. *
  6276. * @return
  6277. * An array describing the 'feature_dbxref' table
  6278. *
  6279. * @ingroup tripal_chado_v1.3_schema_api
  6280. *
  6281. */
  6282. function tripal_chado_chado_schema_v1_3_feature_dbxref() {
  6283. $description = array(
  6284. 'description' => '',
  6285. 'table' => 'feature_dbxref',
  6286. 'fields' => array(
  6287. 'feature_dbxref_id' => array(
  6288. 'size' => 'big',
  6289. 'type' => 'serial',
  6290. 'not null' => TRUE,
  6291. ),
  6292. 'feature_id' => array(
  6293. 'size' => 'big',
  6294. 'type' => 'int',
  6295. 'not null' => TRUE,
  6296. ),
  6297. 'dbxref_id' => array(
  6298. 'size' => 'big',
  6299. 'type' => 'int',
  6300. 'not null' => TRUE,
  6301. ),
  6302. 'is_current' => array(
  6303. 'size' => 'normal',
  6304. 'type' => 'boolean',
  6305. 'not null' => TRUE,
  6306. 'default' => 'true',
  6307. ),
  6308. ),
  6309. 'unique keys' => array(
  6310. 'feature_dbxref_c1' => array(
  6311. 0 => 'feature_id',
  6312. 1 => 'dbxref_id',
  6313. ),
  6314. ),
  6315. 'indexes' => array(
  6316. 'feature_dbxref_idx1' => array(
  6317. 0 => 'feature_id',
  6318. ),
  6319. 'feature_dbxref_idx2' => array(
  6320. 0 => 'dbxref_id',
  6321. ),
  6322. ),
  6323. 'primary key' => array(
  6324. 0 => 'feature_dbxref_id',
  6325. ),
  6326. 'foreign keys' => array(
  6327. 'feature' => array(
  6328. 'table' => 'feature',
  6329. 'columns' => array(
  6330. 'feature_id' => 'feature_id',
  6331. ),
  6332. ),
  6333. 'dbxref' => array(
  6334. 'table' => 'dbxref',
  6335. 'columns' => array(
  6336. 'dbxref_id' => 'dbxref_id',
  6337. ),
  6338. ),
  6339. ),
  6340. 'referring_tables' => array(
  6341. ),
  6342. );
  6343. return $description;
  6344. }
  6345. /**
  6346. * Implements hook_chado_schema_v1_3_feature_expression()
  6347. *
  6348. * Purpose: To describe the structure of 'feature_expression' to tripal
  6349. * @see chado_insert_record()
  6350. * @see chado_update_record()
  6351. * @see chado_select_record()
  6352. * @see chado_generate_var()
  6353. * @see chado_expan_var()
  6354. *
  6355. * @return
  6356. * An array describing the 'feature_expression' table
  6357. *
  6358. * @ingroup tripal_chado_v1.3_schema_api
  6359. *
  6360. */
  6361. function tripal_chado_chado_schema_v1_3_feature_expression() {
  6362. $description = array(
  6363. 'description' => '',
  6364. 'table' => 'feature_expression',
  6365. 'fields' => array(
  6366. 'feature_expression_id' => array(
  6367. 'size' => 'big',
  6368. 'type' => 'serial',
  6369. 'not null' => TRUE,
  6370. ),
  6371. 'expression_id' => array(
  6372. 'size' => 'big',
  6373. 'type' => 'int',
  6374. 'not null' => TRUE,
  6375. ),
  6376. 'feature_id' => array(
  6377. 'size' => 'big',
  6378. 'type' => 'int',
  6379. 'not null' => TRUE,
  6380. ),
  6381. 'pub_id' => array(
  6382. 'size' => 'big',
  6383. 'type' => 'int',
  6384. 'not null' => TRUE,
  6385. ),
  6386. ),
  6387. 'unique keys' => array(
  6388. 'feature_expression_c1' => array(
  6389. 0 => 'expression_id',
  6390. 1 => 'feature_id',
  6391. 2 => 'pub_id',
  6392. ),
  6393. ),
  6394. 'indexes' => array(
  6395. 'feature_expression_idx1' => array(
  6396. 0 => 'expression_id',
  6397. ),
  6398. 'feature_expression_idx2' => array(
  6399. 0 => 'feature_id',
  6400. ),
  6401. 'feature_expression_idx3' => array(
  6402. 0 => 'pub_id',
  6403. ),
  6404. ),
  6405. 'primary key' => array(
  6406. 0 => 'feature_expression_id',
  6407. ),
  6408. 'foreign keys' => array(
  6409. 'expression' => array(
  6410. 'table' => 'expression',
  6411. 'columns' => array(
  6412. 'expression_id' => 'expression_id',
  6413. ),
  6414. ),
  6415. 'feature' => array(
  6416. 'table' => 'feature',
  6417. 'columns' => array(
  6418. 'feature_id' => 'feature_id',
  6419. ),
  6420. ),
  6421. 'pub' => array(
  6422. 'table' => 'pub',
  6423. 'columns' => array(
  6424. 'pub_id' => 'pub_id',
  6425. ),
  6426. ),
  6427. ),
  6428. 'referring_tables' => array(
  6429. 0 => 'feature_expressionprop',
  6430. ),
  6431. );
  6432. return $description;
  6433. }
  6434. /**
  6435. * Implements hook_chado_schema_v1_3_feature_expressionprop()
  6436. *
  6437. * Purpose: To describe the structure of 'feature_expressionprop' to tripal
  6438. * @see chado_insert_record()
  6439. * @see chado_update_record()
  6440. * @see chado_select_record()
  6441. * @see chado_generate_var()
  6442. * @see chado_expan_var()
  6443. *
  6444. * @return
  6445. * An array describing the 'feature_expressionprop' table
  6446. *
  6447. * @ingroup tripal_chado_v1.3_schema_api
  6448. *
  6449. */
  6450. function tripal_chado_chado_schema_v1_3_feature_expressionprop() {
  6451. $description = array(
  6452. 'description' => '',
  6453. 'table' => 'feature_expressionprop',
  6454. 'fields' => array(
  6455. 'feature_expressionprop_id' => array(
  6456. 'size' => 'big',
  6457. 'type' => 'serial',
  6458. 'not null' => TRUE,
  6459. ),
  6460. 'feature_expression_id' => array(
  6461. 'size' => 'big',
  6462. 'type' => 'int',
  6463. 'not null' => TRUE,
  6464. ),
  6465. 'type_id' => array(
  6466. 'size' => 'big',
  6467. 'type' => 'int',
  6468. 'not null' => TRUE,
  6469. ),
  6470. 'value' => array(
  6471. 'size' => 'normal',
  6472. 'type' => 'text',
  6473. 'not null' => FALSE,
  6474. ),
  6475. 'rank' => array(
  6476. 'size' => 'normal',
  6477. 'type' => 'int',
  6478. 'not null' => TRUE,
  6479. 'default' => 0,
  6480. ),
  6481. ),
  6482. 'unique keys' => array(
  6483. 'feature_expressionprop_c1' => array(
  6484. 0 => 'feature_expression_id',
  6485. 1 => 'type_id',
  6486. 2 => 'rank',
  6487. ),
  6488. ),
  6489. 'indexes' => array(
  6490. 'feature_expressionprop_idx1' => array(
  6491. 0 => 'feature_expression_id',
  6492. ),
  6493. 'feature_expressionprop_idx2' => array(
  6494. 0 => 'type_id',
  6495. ),
  6496. ),
  6497. 'primary key' => array(
  6498. 0 => 'feature_expressionprop_id',
  6499. ),
  6500. 'foreign keys' => array(
  6501. 'feature_expression' => array(
  6502. 'table' => 'feature_expression',
  6503. 'columns' => array(
  6504. 'feature_expression_id' => 'feature_expression_id',
  6505. ),
  6506. ),
  6507. 'cvterm' => array(
  6508. 'table' => 'cvterm',
  6509. 'columns' => array(
  6510. 'type_id' => 'cvterm_id',
  6511. ),
  6512. ),
  6513. ),
  6514. 'referring_tables' => array(
  6515. ),
  6516. );
  6517. return $description;
  6518. }
  6519. /**
  6520. * Implements hook_chado_schema_v1_3_feature_genotype()
  6521. *
  6522. * Purpose: To describe the structure of 'feature_genotype' to tripal
  6523. * @see chado_insert_record()
  6524. * @see chado_update_record()
  6525. * @see chado_select_record()
  6526. * @see chado_generate_var()
  6527. * @see chado_expan_var()
  6528. *
  6529. * @return
  6530. * An array describing the 'feature_genotype' table
  6531. *
  6532. * @ingroup tripal_chado_v1.3_schema_api
  6533. *
  6534. */
  6535. function tripal_chado_chado_schema_v1_3_feature_genotype() {
  6536. $description = array(
  6537. 'description' => '',
  6538. 'table' => 'feature_genotype',
  6539. 'fields' => array(
  6540. 'feature_genotype_id' => array(
  6541. 'size' => 'big',
  6542. 'type' => 'serial',
  6543. 'not null' => TRUE,
  6544. ),
  6545. 'feature_id' => array(
  6546. 'size' => 'big',
  6547. 'type' => 'int',
  6548. 'not null' => TRUE,
  6549. ),
  6550. 'genotype_id' => array(
  6551. 'size' => 'big',
  6552. 'type' => 'int',
  6553. 'not null' => TRUE,
  6554. ),
  6555. 'chromosome_id' => array(
  6556. 'size' => 'big',
  6557. 'type' => 'int',
  6558. 'not null' => FALSE,
  6559. ),
  6560. 'rank' => array(
  6561. 'size' => 'normal',
  6562. 'type' => 'int',
  6563. 'not null' => TRUE,
  6564. ),
  6565. 'cgroup' => array(
  6566. 'size' => 'normal',
  6567. 'type' => 'int',
  6568. 'not null' => TRUE,
  6569. ),
  6570. 'cvterm_id' => array(
  6571. 'size' => 'big',
  6572. 'type' => 'int',
  6573. 'not null' => TRUE,
  6574. ),
  6575. ),
  6576. 'unique keys' => array(
  6577. 'feature_genotype_c1' => array(
  6578. 0 => 'feature_id',
  6579. 1 => 'genotype_id',
  6580. 2 => 'cvterm_id',
  6581. 3 => 'chromosome_id',
  6582. 4 => 'rank',
  6583. 5 => 'cgroup',
  6584. ),
  6585. ),
  6586. 'indexes' => array(
  6587. 'feature_genotype_idx1' => array(
  6588. 0 => 'feature_id',
  6589. ),
  6590. 'feature_genotype_idx2' => array(
  6591. 0 => 'genotype_id',
  6592. ),
  6593. ),
  6594. 'primary key' => array(
  6595. 0 => 'feature_genotype_id',
  6596. ),
  6597. 'foreign keys' => array(
  6598. 'feature' => array(
  6599. 'table' => 'feature',
  6600. 'columns' => array(
  6601. 'feature_id' => 'feature_id',
  6602. 'chromosome_id' => 'feature_id',
  6603. ),
  6604. ),
  6605. 'genotype' => array(
  6606. 'table' => 'genotype',
  6607. 'columns' => array(
  6608. 'genotype_id' => 'genotype_id',
  6609. ),
  6610. ),
  6611. 'cvterm' => array(
  6612. 'table' => 'cvterm',
  6613. 'columns' => array(
  6614. 'cvterm_id' => 'cvterm_id',
  6615. ),
  6616. ),
  6617. ),
  6618. 'referring_tables' => array(
  6619. ),
  6620. );
  6621. return $description;
  6622. }
  6623. /**
  6624. * Implements hook_chado_schema_v1_3_featureloc()
  6625. *
  6626. * Purpose: To describe the structure of 'featureloc' to tripal
  6627. * @see chado_insert_record()
  6628. * @see chado_update_record()
  6629. * @see chado_select_record()
  6630. * @see chado_generate_var()
  6631. * @see chado_expan_var()
  6632. *
  6633. * @return
  6634. * An array describing the 'featureloc' table
  6635. *
  6636. * @ingroup tripal_chado_v1.3_schema_api
  6637. *
  6638. */
  6639. function tripal_chado_chado_schema_v1_3_featureloc() {
  6640. $description = array(
  6641. 'description' => '',
  6642. 'table' => 'featureloc',
  6643. 'fields' => array(
  6644. 'featureloc_id' => array(
  6645. 'size' => 'big',
  6646. 'type' => 'serial',
  6647. 'not null' => TRUE,
  6648. ),
  6649. 'feature_id' => array(
  6650. 'size' => 'big',
  6651. 'type' => 'int',
  6652. 'not null' => TRUE,
  6653. ),
  6654. 'srcfeature_id' => array(
  6655. 'size' => 'big',
  6656. 'type' => 'int',
  6657. 'not null' => FALSE,
  6658. ),
  6659. 'fmin' => array(
  6660. 'size' => 'big',
  6661. 'type' => 'int',
  6662. 'not null' => FALSE,
  6663. ),
  6664. 'is_fmin_partial' => array(
  6665. 'size' => 'normal',
  6666. 'type' => 'boolean',
  6667. 'not null' => TRUE,
  6668. 'default' => FALSE,
  6669. ),
  6670. 'fmax' => array(
  6671. 'size' => 'big',
  6672. 'type' => 'int',
  6673. 'not null' => FALSE,
  6674. ),
  6675. 'is_fmax_partial' => array(
  6676. 'size' => 'normal',
  6677. 'type' => 'boolean',
  6678. 'not null' => TRUE,
  6679. 'default' => FALSE,
  6680. ),
  6681. 'strand' => array(
  6682. 'size' => 'small',
  6683. 'type' => 'int',
  6684. 'not null' => FALSE,
  6685. ),
  6686. 'phase' => array(
  6687. 'size' => 'normal',
  6688. 'type' => 'int',
  6689. 'not null' => FALSE,
  6690. ),
  6691. 'residue_info' => array(
  6692. 'size' => 'normal',
  6693. 'type' => 'text',
  6694. 'not null' => FALSE,
  6695. ),
  6696. 'locgroup' => array(
  6697. 'size' => 'normal',
  6698. 'type' => 'int',
  6699. 'not null' => TRUE,
  6700. 'default' => 0,
  6701. ),
  6702. 'rank' => array(
  6703. 'size' => 'normal',
  6704. 'type' => 'int',
  6705. 'not null' => TRUE,
  6706. 'default' => 0,
  6707. ),
  6708. ),
  6709. 'indexes' => array(
  6710. 'binloc_boxrange' => array(
  6711. 0 => 'fmin',
  6712. ),
  6713. 'binloc_boxrange_src' => array(
  6714. 0 => 'srcfeature_id',
  6715. 1 => 'fmin',
  6716. ),
  6717. 'featureloc_idx1' => array(
  6718. 0 => 'feature_id',
  6719. ),
  6720. 'featureloc_idx1b' => array(
  6721. 0 => 'feature_id',
  6722. 1 => 'fmin',
  6723. 2 => 'fmax',
  6724. ),
  6725. 'featureloc_idx2' => array(
  6726. 0 => 'srcfeature_id',
  6727. ),
  6728. 'featureloc_idx3' => array(
  6729. 0 => 'srcfeature_id',
  6730. 1 => 'fmin',
  6731. 2 => 'fmax',
  6732. ),
  6733. ),
  6734. 'unique keys' => array(
  6735. 'featureloc_c1' => array(
  6736. 0 => 'feature_id',
  6737. 1 => 'locgroup',
  6738. 2 => 'rank',
  6739. ),
  6740. ),
  6741. 'primary key' => array(
  6742. 0 => 'featureloc_id',
  6743. ),
  6744. 'foreign keys' => array(
  6745. 'feature' => array(
  6746. 'table' => 'feature',
  6747. 'columns' => array(
  6748. 'feature_id' => 'feature_id',
  6749. 'srcfeature_id' => 'feature_id',
  6750. ),
  6751. ),
  6752. ),
  6753. 'referring_tables' => array(
  6754. 0 => 'featureloc_pub',
  6755. ),
  6756. );
  6757. return $description;
  6758. }
  6759. /**
  6760. * Implements hook_chado_schema_v1_3_featureloc_pub()
  6761. *
  6762. * Purpose: To describe the structure of 'featureloc_pub' to tripal
  6763. * @see chado_insert_record()
  6764. * @see chado_update_record()
  6765. * @see chado_select_record()
  6766. * @see chado_generate_var()
  6767. * @see chado_expan_var()
  6768. *
  6769. * @return
  6770. * An array describing the 'featureloc_pub' table
  6771. *
  6772. * @ingroup tripal_chado_v1.3_schema_api
  6773. *
  6774. */
  6775. function tripal_chado_chado_schema_v1_3_featureloc_pub() {
  6776. $description = array(
  6777. 'description' => '',
  6778. 'table' => 'featureloc_pub',
  6779. 'fields' => array(
  6780. 'featureloc_pub_id' => array(
  6781. 'size' => 'big',
  6782. 'type' => 'serial',
  6783. 'not null' => TRUE,
  6784. ),
  6785. 'featureloc_id' => array(
  6786. 'size' => 'big',
  6787. 'type' => 'int',
  6788. 'not null' => TRUE,
  6789. ),
  6790. 'pub_id' => array(
  6791. 'size' => 'big',
  6792. 'type' => 'int',
  6793. 'not null' => TRUE,
  6794. ),
  6795. ),
  6796. 'unique keys' => array(
  6797. 'featureloc_pub_c1' => array(
  6798. 0 => 'featureloc_id',
  6799. 1 => 'pub_id',
  6800. ),
  6801. ),
  6802. 'indexes' => array(
  6803. 'featureloc_pub_idx1' => array(
  6804. 0 => 'featureloc_id',
  6805. ),
  6806. 'featureloc_pub_idx2' => array(
  6807. 0 => 'pub_id',
  6808. ),
  6809. ),
  6810. 'primary key' => array(
  6811. 0 => 'featureloc_pub_id',
  6812. ),
  6813. 'foreign keys' => array(
  6814. 'featureloc' => array(
  6815. 'table' => 'featureloc',
  6816. 'columns' => array(
  6817. 'featureloc_id' => 'featureloc_id',
  6818. ),
  6819. ),
  6820. 'pub' => array(
  6821. 'table' => 'pub',
  6822. 'columns' => array(
  6823. 'pub_id' => 'pub_id',
  6824. ),
  6825. ),
  6826. ),
  6827. 'referring_tables' => array(
  6828. ),
  6829. );
  6830. return $description;
  6831. }
  6832. /**
  6833. * Implements hook_chado_schema_v1_3_featuremap()
  6834. *
  6835. * Purpose: To describe the structure of 'featuremap' to tripal
  6836. * @see chado_insert_record()
  6837. * @see chado_update_record()
  6838. * @see chado_select_record()
  6839. * @see chado_generate_var()
  6840. * @see chado_expan_var()
  6841. *
  6842. * @return
  6843. * An array describing the 'featuremap' table
  6844. *
  6845. * @ingroup tripal_chado_v1.3_schema_api
  6846. *
  6847. */
  6848. function tripal_chado_chado_schema_v1_3_featuremap() {
  6849. $description = array(
  6850. 'description' => '',
  6851. 'table' => 'featuremap',
  6852. 'fields' => array(
  6853. 'featuremap_id' => array(
  6854. 'size' => 'big',
  6855. 'type' => 'serial',
  6856. 'not null' => TRUE,
  6857. ),
  6858. 'name' => array(
  6859. 'size' => 'normal',
  6860. 'type' => 'varchar',
  6861. 'length' => '255',
  6862. 'not null' => FALSE,
  6863. ),
  6864. 'description' => array(
  6865. 'size' => 'normal',
  6866. 'type' => 'text',
  6867. 'not null' => FALSE,
  6868. ),
  6869. 'unittype_id' => array(
  6870. 'size' => 'big',
  6871. 'type' => 'int',
  6872. 'not null' => FALSE,
  6873. ),
  6874. ),
  6875. 'unique keys' => array(
  6876. 'featuremap_c1' => array(
  6877. 0 => 'name',
  6878. ),
  6879. ),
  6880. 'primary key' => array(
  6881. 0 => 'featuremap_id',
  6882. ),
  6883. 'foreign keys' => array(
  6884. 'cvterm' => array(
  6885. 'table' => 'cvterm',
  6886. 'columns' => array(
  6887. 'unittype_id' => 'cvterm_id',
  6888. ),
  6889. ),
  6890. ),
  6891. 'referring_tables' => array(
  6892. 0 => 'featuremap_contact',
  6893. 1 => 'featuremap_dbxref',
  6894. 2 => 'featuremap_organism',
  6895. 3 => 'featuremapprop',
  6896. 4 => 'featuremap_pub',
  6897. 5 => 'featurepos',
  6898. 6 => 'featurerange',
  6899. 7 => 'stock_featuremap',
  6900. ),
  6901. );
  6902. return $description;
  6903. }
  6904. /**
  6905. * Implements hook_chado_schema_v1_3_featuremap_contact()
  6906. *
  6907. * Purpose: To describe the structure of 'featuremap_contact' to tripal
  6908. * @see chado_insert_record()
  6909. * @see chado_update_record()
  6910. * @see chado_select_record()
  6911. * @see chado_generate_var()
  6912. * @see chado_expan_var()
  6913. *
  6914. * @return
  6915. * An array describing the 'featuremap_contact' table
  6916. *
  6917. * @ingroup tripal_chado_v1.3_schema_api
  6918. *
  6919. */
  6920. function tripal_chado_chado_schema_v1_3_featuremap_contact() {
  6921. $description = array(
  6922. 'description' => '',
  6923. 'table' => 'featuremap_contact',
  6924. 'fields' => array(
  6925. 'featuremap_contact_id' => array(
  6926. 'size' => 'big',
  6927. 'type' => 'serial',
  6928. 'not null' => TRUE,
  6929. ),
  6930. 'featuremap_id' => array(
  6931. 'size' => 'big',
  6932. 'type' => 'int',
  6933. 'not null' => TRUE,
  6934. ),
  6935. 'contact_id' => array(
  6936. 'size' => 'big',
  6937. 'type' => 'int',
  6938. 'not null' => TRUE,
  6939. ),
  6940. ),
  6941. 'unique keys' => array(
  6942. 'featuremap_contact_c1' => array(
  6943. 0 => 'featuremap_id',
  6944. 1 => 'contact_id',
  6945. ),
  6946. ),
  6947. 'indexes' => array(
  6948. 'featuremap_contact_idx1' => array(
  6949. 0 => 'featuremap_id',
  6950. ),
  6951. 'featuremap_contact_idx2' => array(
  6952. 0 => 'contact_id',
  6953. ),
  6954. ),
  6955. 'primary key' => array(
  6956. 0 => 'featuremap_contact_id',
  6957. ),
  6958. 'foreign keys' => array(
  6959. 'contact' => array(
  6960. 'table' => 'contact',
  6961. 'columns' => array(
  6962. 'contact_id' => 'contact_id',
  6963. ),
  6964. ),
  6965. 'featuremap' => array(
  6966. 'table' => 'featuremap',
  6967. 'columns' => array(
  6968. 'featuremap_id' => 'featuremap_id',
  6969. ),
  6970. ),
  6971. ),
  6972. 'referring_tables' => array(
  6973. ),
  6974. );
  6975. return $description;
  6976. }
  6977. /**
  6978. * Implements hook_chado_schema_v1_3_featuremap_dbxref()
  6979. *
  6980. * Purpose: To describe the structure of 'featuremap_dbxref' to tripal
  6981. * @see chado_insert_record()
  6982. * @see chado_update_record()
  6983. * @see chado_select_record()
  6984. * @see chado_generate_var()
  6985. * @see chado_expan_var()
  6986. *
  6987. * @return
  6988. * An array describing the 'featuremap_dbxref' table
  6989. *
  6990. * @ingroup tripal_chado_v1.3_schema_api
  6991. *
  6992. */
  6993. function tripal_chado_chado_schema_v1_3_featuremap_dbxref() {
  6994. $description = array(
  6995. 'description' => '',
  6996. 'table' => 'featuremap_dbxref',
  6997. 'fields' => array(
  6998. 'featuremap_dbxref_id' => array(
  6999. 'size' => 'big',
  7000. 'type' => 'serial',
  7001. 'not null' => TRUE,
  7002. ),
  7003. 'featuremap_id' => array(
  7004. 'size' => 'big',
  7005. 'type' => 'int',
  7006. 'not null' => TRUE,
  7007. ),
  7008. 'dbxref_id' => array(
  7009. 'size' => 'big',
  7010. 'type' => 'int',
  7011. 'not null' => TRUE,
  7012. ),
  7013. 'is_current' => array(
  7014. 'size' => 'normal',
  7015. 'type' => 'boolean',
  7016. 'not null' => TRUE,
  7017. 'default' => 'true',
  7018. ),
  7019. ),
  7020. // TODO: this unique constraint is missing from the actual Chado schema.
  7021. // It should be included.
  7022. 'unique keys' => array(
  7023. 'feature_dbxref_c1' => array(
  7024. 0 => 'featuremap_id',
  7025. 1 => 'dbxref_id',
  7026. ),
  7027. ),
  7028. 'indexes' => array(
  7029. 'featuremap_dbxref_idx1' => array(
  7030. 0 => 'featuremap_id',
  7031. ),
  7032. 'featuremap_dbxref_idx2' => array(
  7033. 0 => 'dbxref_id',
  7034. ),
  7035. ),
  7036. 'primary key' => array(
  7037. 0 => 'featuremap_dbxref_id',
  7038. ),
  7039. 'foreign keys' => array(
  7040. 'featuremap' => array(
  7041. 'table' => 'featuremap',
  7042. 'columns' => array(
  7043. 'featuremap_id' => 'featuremap_id',
  7044. ),
  7045. ),
  7046. 'dbxref' => array(
  7047. 'table' => 'dbxref',
  7048. 'columns' => array(
  7049. 'dbxref_id' => 'dbxref_id',
  7050. ),
  7051. ),
  7052. ),
  7053. 'referring_tables' => array(
  7054. ),
  7055. );
  7056. return $description;
  7057. }
  7058. /**
  7059. * Implements hook_chado_schema_v1_3_featuremap_organism()
  7060. *
  7061. * Purpose: To describe the structure of 'featuremap_organism' to tripal
  7062. * @see chado_insert_record()
  7063. * @see chado_update_record()
  7064. * @see chado_select_record()
  7065. * @see chado_generate_var()
  7066. * @see chado_expan_var()
  7067. *
  7068. * @return
  7069. * An array describing the 'featuremap_organism' table
  7070. *
  7071. * @ingroup tripal_chado_v1.3_schema_api
  7072. *
  7073. */
  7074. function tripal_chado_chado_schema_v1_3_featuremap_organism() {
  7075. $description = array(
  7076. 'description' => '',
  7077. 'table' => 'featuremap_organism',
  7078. 'fields' => array(
  7079. 'featuremap_organism_id' => array(
  7080. 'size' => 'big',
  7081. 'type' => 'serial',
  7082. 'not null' => TRUE,
  7083. ),
  7084. 'featuremap_id' => array(
  7085. 'size' => 'big',
  7086. 'type' => 'int',
  7087. 'not null' => TRUE,
  7088. ),
  7089. 'organism_id' => array(
  7090. 'size' => 'big',
  7091. 'type' => 'int',
  7092. 'not null' => TRUE,
  7093. ),
  7094. ),
  7095. 'unique keys' => array(
  7096. 'featuremap_organism_c1' => array(
  7097. 0 => 'featuremap_id',
  7098. 1 => 'organism_id',
  7099. ),
  7100. ),
  7101. 'indexes' => array(
  7102. 'featuremap_organism_idx1' => array(
  7103. 0 => 'featuremap_id',
  7104. ),
  7105. 'featuremap_organism_idx2' => array(
  7106. 0 => 'organism_id',
  7107. ),
  7108. ),
  7109. 'primary key' => array(
  7110. 0 => 'featuremap_organism_id',
  7111. ),
  7112. 'foreign keys' => array(
  7113. 'featuremap' => array(
  7114. 'table' => 'featuremap',
  7115. 'columns' => array(
  7116. 'featuremap_id' => 'featuremap_id',
  7117. ),
  7118. ),
  7119. 'organism' => array(
  7120. 'table' => 'organism',
  7121. 'columns' => array(
  7122. 'organism_id' => 'organism_id',
  7123. ),
  7124. ),
  7125. ),
  7126. 'referring_tables' => array(
  7127. ),
  7128. );
  7129. return $description;
  7130. }
  7131. /**
  7132. * Implements hook_chado_schema_v1_3_featuremapprop()
  7133. *
  7134. * Purpose: To describe the structure of 'featuremapprop' to tripal
  7135. * @see chado_insert_record()
  7136. * @see chado_update_record()
  7137. * @see chado_select_record()
  7138. * @see chado_generate_var()
  7139. * @see chado_expan_var()
  7140. *
  7141. * @return
  7142. * An array describing the 'featuremapprop' table
  7143. *
  7144. * @ingroup tripal_chado_v1.3_schema_api
  7145. *
  7146. */
  7147. function tripal_chado_chado_schema_v1_3_featuremapprop() {
  7148. $description = array(
  7149. 'description' => '',
  7150. 'table' => 'featuremapprop',
  7151. 'fields' => array(
  7152. 'featuremapprop_id' => array(
  7153. 'size' => 'big',
  7154. 'type' => 'serial',
  7155. 'not null' => TRUE,
  7156. ),
  7157. 'featuremap_id' => array(
  7158. 'size' => 'big',
  7159. 'type' => 'int',
  7160. 'not null' => TRUE,
  7161. ),
  7162. 'type_id' => array(
  7163. 'size' => 'big',
  7164. 'type' => 'int',
  7165. 'not null' => TRUE,
  7166. ),
  7167. 'value' => array(
  7168. 'size' => 'normal',
  7169. 'type' => 'text',
  7170. 'not null' => FALSE,
  7171. ),
  7172. 'rank' => array(
  7173. 'size' => 'normal',
  7174. 'type' => 'int',
  7175. 'not null' => TRUE,
  7176. 'default' => 0,
  7177. ),
  7178. ),
  7179. 'unique keys' => array(
  7180. 'featuremapprop_c1' => array(
  7181. 0 => 'featuremap_id',
  7182. 1 => 'type_id',
  7183. 2 => 'rank',
  7184. ),
  7185. ),
  7186. 'indexes' => array(
  7187. 'featuremapprop_idx1' => array(
  7188. 0 => 'featuremap_id',
  7189. ),
  7190. 'featuremapprop_idx2' => array(
  7191. 0 => 'type_id',
  7192. ),
  7193. ),
  7194. 'primary key' => array(
  7195. 0 => 'featuremapprop_id',
  7196. ),
  7197. 'foreign keys' => array(
  7198. 'featuremap' => array(
  7199. 'table' => 'featuremap',
  7200. 'columns' => array(
  7201. 'featuremap_id' => 'featuremap_id',
  7202. ),
  7203. ),
  7204. 'cvterm' => array(
  7205. 'table' => 'cvterm',
  7206. 'columns' => array(
  7207. 'type_id' => 'cvterm_id',
  7208. ),
  7209. ),
  7210. ),
  7211. 'referring_tables' => array(
  7212. ),
  7213. );
  7214. return $description;
  7215. }
  7216. /**
  7217. * Implements hook_chado_schema_v1_3_featuremap_pub()
  7218. *
  7219. * Purpose: To describe the structure of 'featuremap_pub' to tripal
  7220. * @see chado_insert_record()
  7221. * @see chado_update_record()
  7222. * @see chado_select_record()
  7223. * @see chado_generate_var()
  7224. * @see chado_expan_var()
  7225. *
  7226. * @return
  7227. * An array describing the 'featuremap_pub' table
  7228. *
  7229. * @ingroup tripal_chado_v1.3_schema_api
  7230. *
  7231. */
  7232. function tripal_chado_chado_schema_v1_3_featuremap_pub() {
  7233. $description = array(
  7234. 'description' => '',
  7235. 'table' => 'featuremap_pub',
  7236. 'fields' => array(
  7237. 'featuremap_pub_id' => array(
  7238. 'size' => 'big',
  7239. 'type' => 'serial',
  7240. 'not null' => TRUE,
  7241. ),
  7242. 'featuremap_id' => array(
  7243. 'size' => 'big',
  7244. 'type' => 'int',
  7245. 'not null' => TRUE,
  7246. ),
  7247. 'pub_id' => array(
  7248. 'size' => 'big',
  7249. 'type' => 'int',
  7250. 'not null' => TRUE,
  7251. ),
  7252. ),
  7253. // TODO: this unique constraint is missing from the actual Chado schema.
  7254. // It should be included.
  7255. 'unique keys' => array(
  7256. 'feature_pub_c1' => array(
  7257. 0 => 'featuremap_id',
  7258. 1 => 'pub_id',
  7259. ),
  7260. ),
  7261. 'indexes' => array(
  7262. 'featuremap_pub_idx1' => array(
  7263. 0 => 'featuremap_id',
  7264. ),
  7265. 'featuremap_pub_idx2' => array(
  7266. 0 => 'pub_id',
  7267. ),
  7268. ),
  7269. 'primary key' => array(
  7270. 0 => 'featuremap_pub_id',
  7271. ),
  7272. 'foreign keys' => array(
  7273. 'featuremap' => array(
  7274. 'table' => 'featuremap',
  7275. 'columns' => array(
  7276. 'featuremap_id' => 'featuremap_id',
  7277. ),
  7278. ),
  7279. 'pub' => array(
  7280. 'table' => 'pub',
  7281. 'columns' => array(
  7282. 'pub_id' => 'pub_id',
  7283. ),
  7284. ),
  7285. ),
  7286. 'referring_tables' => array(
  7287. ),
  7288. );
  7289. return $description;
  7290. }
  7291. /**
  7292. * Implements hook_chado_schema_v1_3_feature_phenotype()
  7293. *
  7294. * Purpose: To describe the structure of 'feature_phenotype' to tripal
  7295. * @see chado_insert_record()
  7296. * @see chado_update_record()
  7297. * @see chado_select_record()
  7298. * @see chado_generate_var()
  7299. * @see chado_expan_var()
  7300. *
  7301. * @return
  7302. * An array describing the 'feature_phenotype' table
  7303. *
  7304. * @ingroup tripal_chado_v1.3_schema_api
  7305. *
  7306. */
  7307. function tripal_chado_chado_schema_v1_3_feature_phenotype() {
  7308. $description = array(
  7309. 'description' => '',
  7310. 'table' => 'feature_phenotype',
  7311. 'fields' => array(
  7312. 'feature_phenotype_id' => array(
  7313. 'size' => 'big',
  7314. 'type' => 'serial',
  7315. 'not null' => TRUE,
  7316. ),
  7317. 'feature_id' => array(
  7318. 'size' => 'big',
  7319. 'type' => 'int',
  7320. 'not null' => TRUE,
  7321. ),
  7322. 'phenotype_id' => array(
  7323. 'size' => 'big',
  7324. 'type' => 'int',
  7325. 'not null' => TRUE,
  7326. ),
  7327. ),
  7328. 'unique keys' => array(
  7329. 'feature_phenotype_c1' => array(
  7330. 0 => 'feature_id',
  7331. 1 => 'phenotype_id',
  7332. ),
  7333. ),
  7334. 'indexes' => array(
  7335. 'feature_phenotype_idx1' => array(
  7336. 0 => 'feature_id',
  7337. ),
  7338. 'feature_phenotype_idx2' => array(
  7339. 0 => 'phenotype_id',
  7340. ),
  7341. ),
  7342. 'primary key' => array(
  7343. 0 => 'feature_phenotype_id',
  7344. ),
  7345. 'foreign keys' => array(
  7346. 'feature' => array(
  7347. 'table' => 'feature',
  7348. 'columns' => array(
  7349. 'feature_id' => 'feature_id',
  7350. ),
  7351. ),
  7352. 'phenotype' => array(
  7353. 'table' => 'phenotype',
  7354. 'columns' => array(
  7355. 'phenotype_id' => 'phenotype_id',
  7356. ),
  7357. ),
  7358. ),
  7359. 'referring_tables' => array(
  7360. ),
  7361. );
  7362. return $description;
  7363. }
  7364. /**
  7365. * Implements hook_chado_schema_v1_3_featurepos()
  7366. *
  7367. * Purpose: To describe the structure of 'featurepos' to tripal
  7368. * @see chado_insert_record()
  7369. * @see chado_update_record()
  7370. * @see chado_select_record()
  7371. * @see chado_generate_var()
  7372. * @see chado_expan_var()
  7373. *
  7374. * @return
  7375. * An array describing the 'featurepos' table
  7376. *
  7377. * @ingroup tripal_chado_v1.3_schema_api
  7378. *
  7379. */
  7380. function tripal_chado_chado_schema_v1_3_featurepos() {
  7381. $description = array(
  7382. 'description' => '',
  7383. 'table' => 'featurepos',
  7384. 'fields' => array(
  7385. 'featurepos_id' => array(
  7386. 'size' => 'big',
  7387. 'type' => 'serial',
  7388. 'not null' => TRUE,
  7389. ),
  7390. 'featuremap_id' => array(
  7391. 'size' => 'big',
  7392. 'type' => 'int',
  7393. 'not null' => TRUE,
  7394. ),
  7395. 'feature_id' => array(
  7396. 'size' => 'big',
  7397. 'type' => 'int',
  7398. 'not null' => TRUE,
  7399. ),
  7400. 'map_feature_id' => array(
  7401. 'size' => 'big',
  7402. 'type' => 'int',
  7403. 'not null' => TRUE,
  7404. ),
  7405. 'mappos' => array(
  7406. 'size' => 'big',
  7407. 'type' => 'float',
  7408. 'not null' => TRUE,
  7409. ),
  7410. ),
  7411. 'indexes' => array(
  7412. 'featurepos_idx1' => array(
  7413. 0 => 'featuremap_id',
  7414. ),
  7415. 'featurepos_idx2' => array(
  7416. 0 => 'feature_id',
  7417. ),
  7418. 'featurepos_idx3' => array(
  7419. 0 => 'map_feature_id',
  7420. ),
  7421. ),
  7422. 'primary key' => array(
  7423. 0 => 'featurepos_id',
  7424. ),
  7425. 'foreign keys' => array(
  7426. 'featuremap' => array(
  7427. 'table' => 'featuremap',
  7428. 'columns' => array(
  7429. 'featuremap_id' => 'featuremap_id',
  7430. ),
  7431. ),
  7432. 'feature' => array(
  7433. 'table' => 'feature',
  7434. 'columns' => array(
  7435. 'feature_id' => 'feature_id',
  7436. 'map_feature_id' => 'feature_id',
  7437. ),
  7438. ),
  7439. ),
  7440. 'referring_tables' => array(
  7441. 0 => 'featureposprop',
  7442. ),
  7443. );
  7444. return $description;
  7445. }
  7446. /**
  7447. * Implements hook_chado_schema_v1_3_featureposprop()
  7448. *
  7449. * Purpose: To describe the structure of 'featureposprop' to tripal
  7450. * @see chado_insert_record()
  7451. * @see chado_update_record()
  7452. * @see chado_select_record()
  7453. * @see chado_generate_var()
  7454. * @see chado_expan_var()
  7455. *
  7456. * @return
  7457. * An array describing the 'featureposprop' table
  7458. *
  7459. * @ingroup tripal_chado_v1.3_schema_api
  7460. *
  7461. */
  7462. function tripal_chado_chado_schema_v1_3_featureposprop() {
  7463. $description = array(
  7464. 'description' => '',
  7465. 'table' => 'featureposprop',
  7466. 'fields' => array(
  7467. 'featureposprop_id' => array(
  7468. 'size' => 'big',
  7469. 'type' => 'serial',
  7470. 'not null' => TRUE,
  7471. ),
  7472. 'featurepos_id' => array(
  7473. 'size' => 'big',
  7474. 'type' => 'int',
  7475. 'not null' => TRUE,
  7476. ),
  7477. 'type_id' => array(
  7478. 'size' => 'big',
  7479. 'type' => 'int',
  7480. 'not null' => TRUE,
  7481. ),
  7482. 'value' => array(
  7483. 'size' => 'normal',
  7484. 'type' => 'text',
  7485. 'not null' => FALSE,
  7486. ),
  7487. 'rank' => array(
  7488. 'size' => 'normal',
  7489. 'type' => 'int',
  7490. 'not null' => TRUE,
  7491. 'default' => 0,
  7492. ),
  7493. ),
  7494. 'unique keys' => array(
  7495. 'featureposprop_c1' => array(
  7496. 0 => 'featurepos_id',
  7497. 1 => 'type_id',
  7498. 2 => 'rank',
  7499. ),
  7500. ),
  7501. 'indexes' => array(
  7502. 'featureposprop_idx1' => array(
  7503. 0 => 'featurepos_id',
  7504. ),
  7505. 'featureposprop_idx2' => array(
  7506. 0 => 'type_id',
  7507. ),
  7508. ),
  7509. 'primary key' => array(
  7510. 0 => 'featureposprop_id',
  7511. ),
  7512. 'foreign keys' => array(
  7513. 'featurepos' => array(
  7514. 'table' => 'featurepos',
  7515. 'columns' => array(
  7516. 'featurepos_id' => 'featurepos_id',
  7517. ),
  7518. ),
  7519. 'cvterm' => array(
  7520. 'table' => 'cvterm',
  7521. 'columns' => array(
  7522. 'type_id' => 'cvterm_id',
  7523. ),
  7524. ),
  7525. ),
  7526. 'referring_tables' => array(
  7527. ),
  7528. );
  7529. return $description;
  7530. }
  7531. /**
  7532. * Implements hook_chado_schema_v1_3_featureprop()
  7533. *
  7534. * Purpose: To describe the structure of 'featureprop' to tripal
  7535. * @see chado_insert_record()
  7536. * @see chado_update_record()
  7537. * @see chado_select_record()
  7538. * @see chado_generate_var()
  7539. * @see chado_expan_var()
  7540. *
  7541. * @return
  7542. * An array describing the 'featureprop' table
  7543. *
  7544. * @ingroup tripal_chado_v1.3_schema_api
  7545. *
  7546. */
  7547. function tripal_chado_chado_schema_v1_3_featureprop() {
  7548. $description = array(
  7549. 'description' => '',
  7550. 'table' => 'featureprop',
  7551. 'fields' => array(
  7552. 'featureprop_id' => array(
  7553. 'size' => 'big',
  7554. 'type' => 'serial',
  7555. 'not null' => TRUE,
  7556. ),
  7557. 'feature_id' => array(
  7558. 'size' => 'big',
  7559. 'type' => 'int',
  7560. 'not null' => TRUE,
  7561. ),
  7562. 'type_id' => array(
  7563. 'size' => 'big',
  7564. 'type' => 'int',
  7565. 'not null' => TRUE,
  7566. ),
  7567. 'value' => array(
  7568. 'size' => 'normal',
  7569. 'type' => 'text',
  7570. 'not null' => FALSE,
  7571. ),
  7572. 'rank' => array(
  7573. 'size' => 'normal',
  7574. 'type' => 'int',
  7575. 'not null' => TRUE,
  7576. 'default' => 0,
  7577. ),
  7578. ),
  7579. 'unique keys' => array(
  7580. 'featureprop_c1' => array(
  7581. 0 => 'feature_id',
  7582. 1 => 'type_id',
  7583. 2 => 'rank',
  7584. ),
  7585. ),
  7586. 'indexes' => array(
  7587. 'featureprop_idx1' => array(
  7588. 0 => 'feature_id',
  7589. ),
  7590. 'featureprop_idx2' => array(
  7591. 0 => 'type_id',
  7592. ),
  7593. ),
  7594. 'primary key' => array(
  7595. 0 => 'featureprop_id',
  7596. ),
  7597. 'foreign keys' => array(
  7598. 'feature' => array(
  7599. 'table' => 'feature',
  7600. 'columns' => array(
  7601. 'feature_id' => 'feature_id',
  7602. ),
  7603. ),
  7604. 'cvterm' => array(
  7605. 'table' => 'cvterm',
  7606. 'columns' => array(
  7607. 'type_id' => 'cvterm_id',
  7608. ),
  7609. ),
  7610. ),
  7611. 'referring_tables' => array(
  7612. 0 => 'featureprop_pub',
  7613. ),
  7614. );
  7615. return $description;
  7616. }
  7617. /**
  7618. * Implements hook_chado_schema_v1_3_featureprop_pub()
  7619. *
  7620. * Purpose: To describe the structure of 'featureprop_pub' to tripal
  7621. * @see chado_insert_record()
  7622. * @see chado_update_record()
  7623. * @see chado_select_record()
  7624. * @see chado_generate_var()
  7625. * @see chado_expan_var()
  7626. *
  7627. * @return
  7628. * An array describing the 'featureprop_pub' table
  7629. *
  7630. * @ingroup tripal_chado_v1.3_schema_api
  7631. *
  7632. */
  7633. function tripal_chado_chado_schema_v1_3_featureprop_pub() {
  7634. $description = array(
  7635. 'description' => '',
  7636. 'table' => 'featureprop_pub',
  7637. 'fields' => array(
  7638. 'featureprop_pub_id' => array(
  7639. 'size' => 'big',
  7640. 'type' => 'serial',
  7641. 'not null' => TRUE,
  7642. ),
  7643. 'featureprop_id' => array(
  7644. 'size' => 'big',
  7645. 'type' => 'int',
  7646. 'not null' => TRUE,
  7647. ),
  7648. 'pub_id' => array(
  7649. 'size' => 'big',
  7650. 'type' => 'int',
  7651. 'not null' => TRUE,
  7652. ),
  7653. ),
  7654. 'unique keys' => array(
  7655. 'featureprop_pub_c1' => array(
  7656. 0 => 'featureprop_id',
  7657. 1 => 'pub_id',
  7658. ),
  7659. ),
  7660. 'indexes' => array(
  7661. 'featureprop_pub_idx1' => array(
  7662. 0 => 'featureprop_id',
  7663. ),
  7664. 'featureprop_pub_idx2' => array(
  7665. 0 => 'pub_id',
  7666. ),
  7667. ),
  7668. 'primary key' => array(
  7669. 0 => 'featureprop_pub_id',
  7670. ),
  7671. 'foreign keys' => array(
  7672. 'featureprop' => array(
  7673. 'table' => 'featureprop',
  7674. 'columns' => array(
  7675. 'featureprop_id' => 'featureprop_id',
  7676. ),
  7677. ),
  7678. 'pub' => array(
  7679. 'table' => 'pub',
  7680. 'columns' => array(
  7681. 'pub_id' => 'pub_id',
  7682. ),
  7683. ),
  7684. ),
  7685. 'referring_tables' => array(
  7686. ),
  7687. );
  7688. return $description;
  7689. }
  7690. /**
  7691. * Implements hook_chado_schema_v1_3_feature_pub()
  7692. *
  7693. * Purpose: To describe the structure of 'feature_pub' to tripal
  7694. * @see chado_insert_record()
  7695. * @see chado_update_record()
  7696. * @see chado_select_record()
  7697. * @see chado_generate_var()
  7698. * @see chado_expan_var()
  7699. *
  7700. * @return
  7701. * An array describing the 'feature_pub' table
  7702. *
  7703. * @ingroup tripal_chado_v1.3_schema_api
  7704. *
  7705. */
  7706. function tripal_chado_chado_schema_v1_3_feature_pub() {
  7707. $description = array(
  7708. 'description' => '',
  7709. 'table' => 'feature_pub',
  7710. 'fields' => array(
  7711. 'feature_pub_id' => array(
  7712. 'size' => 'big',
  7713. 'type' => 'serial',
  7714. 'not null' => TRUE,
  7715. ),
  7716. 'feature_id' => array(
  7717. 'size' => 'big',
  7718. 'type' => 'int',
  7719. 'not null' => TRUE,
  7720. ),
  7721. 'pub_id' => array(
  7722. 'size' => 'big',
  7723. 'type' => 'int',
  7724. 'not null' => TRUE,
  7725. ),
  7726. ),
  7727. 'unique keys' => array(
  7728. 'feature_pub_c1' => array(
  7729. 0 => 'feature_id',
  7730. 1 => 'pub_id',
  7731. ),
  7732. ),
  7733. 'indexes' => array(
  7734. 'feature_pub_idx1' => array(
  7735. 0 => 'feature_id',
  7736. ),
  7737. 'feature_pub_idx2' => array(
  7738. 0 => 'pub_id',
  7739. ),
  7740. ),
  7741. 'primary key' => array(
  7742. 0 => 'feature_pub_id',
  7743. ),
  7744. 'foreign keys' => array(
  7745. 'feature' => array(
  7746. 'table' => 'feature',
  7747. 'columns' => array(
  7748. 'feature_id' => 'feature_id',
  7749. ),
  7750. ),
  7751. 'pub' => array(
  7752. 'table' => 'pub',
  7753. 'columns' => array(
  7754. 'pub_id' => 'pub_id',
  7755. ),
  7756. ),
  7757. ),
  7758. 'referring_tables' => array(
  7759. 0 => 'feature_pubprop',
  7760. ),
  7761. );
  7762. return $description;
  7763. }
  7764. /**
  7765. * Implements hook_chado_schema_v1_3_feature_pubprop()
  7766. *
  7767. * Purpose: To describe the structure of 'feature_pubprop' to tripal
  7768. * @see chado_insert_record()
  7769. * @see chado_update_record()
  7770. * @see chado_select_record()
  7771. * @see chado_generate_var()
  7772. * @see chado_expan_var()
  7773. *
  7774. * @return
  7775. * An array describing the 'feature_pubprop' table
  7776. *
  7777. * @ingroup tripal_chado_v1.3_schema_api
  7778. *
  7779. */
  7780. function tripal_chado_chado_schema_v1_3_feature_pubprop() {
  7781. $description = array(
  7782. 'description' => '',
  7783. 'table' => 'feature_pubprop',
  7784. 'fields' => array(
  7785. 'feature_pubprop_id' => array(
  7786. 'size' => 'big',
  7787. 'type' => 'serial',
  7788. 'not null' => TRUE,
  7789. ),
  7790. 'feature_pub_id' => array(
  7791. 'size' => 'big',
  7792. 'type' => 'int',
  7793. 'not null' => TRUE,
  7794. ),
  7795. 'type_id' => array(
  7796. 'size' => 'big',
  7797. 'type' => 'int',
  7798. 'not null' => TRUE,
  7799. ),
  7800. 'value' => array(
  7801. 'size' => 'normal',
  7802. 'type' => 'text',
  7803. 'not null' => FALSE,
  7804. ),
  7805. 'rank' => array(
  7806. 'size' => 'normal',
  7807. 'type' => 'int',
  7808. 'not null' => TRUE,
  7809. 'default' => 0,
  7810. ),
  7811. ),
  7812. 'unique keys' => array(
  7813. 'feature_pubprop_c1' => array(
  7814. 0 => 'feature_pub_id',
  7815. 1 => 'type_id',
  7816. 2 => 'rank',
  7817. ),
  7818. ),
  7819. 'indexes' => array(
  7820. 'feature_pubprop_idx1' => array(
  7821. 0 => 'feature_pub_id',
  7822. ),
  7823. ),
  7824. 'primary key' => array(
  7825. 0 => 'feature_pubprop_id',
  7826. ),
  7827. 'foreign keys' => array(
  7828. 'feature_pub' => array(
  7829. 'table' => 'feature_pub',
  7830. 'columns' => array(
  7831. 'feature_pub_id' => 'feature_pub_id',
  7832. ),
  7833. ),
  7834. 'cvterm' => array(
  7835. 'table' => 'cvterm',
  7836. 'columns' => array(
  7837. 'type_id' => 'cvterm_id',
  7838. ),
  7839. ),
  7840. ),
  7841. 'referring_tables' => array(
  7842. ),
  7843. );
  7844. return $description;
  7845. }
  7846. /**
  7847. * Implements hook_chado_schema_v1_3_featurerange()
  7848. *
  7849. * Purpose: To describe the structure of 'featurerange' to tripal
  7850. * @see chado_insert_record()
  7851. * @see chado_update_record()
  7852. * @see chado_select_record()
  7853. * @see chado_generate_var()
  7854. * @see chado_expan_var()
  7855. *
  7856. * @return
  7857. * An array describing the 'featurerange' table
  7858. *
  7859. * @ingroup tripal_chado_v1.3_schema_api
  7860. *
  7861. */
  7862. function tripal_chado_chado_schema_v1_3_featurerange() {
  7863. $description = array(
  7864. 'description' => '',
  7865. 'table' => 'featurerange',
  7866. 'fields' => array(
  7867. 'featurerange_id' => array(
  7868. 'size' => 'big',
  7869. 'type' => 'serial',
  7870. 'not null' => TRUE,
  7871. ),
  7872. 'featuremap_id' => array(
  7873. 'size' => 'big',
  7874. 'type' => 'int',
  7875. 'not null' => TRUE,
  7876. ),
  7877. 'feature_id' => array(
  7878. 'size' => 'big',
  7879. 'type' => 'int',
  7880. 'not null' => TRUE,
  7881. ),
  7882. 'leftstartf_id' => array(
  7883. 'size' => 'big',
  7884. 'type' => 'int',
  7885. 'not null' => TRUE,
  7886. ),
  7887. 'leftendf_id' => array(
  7888. 'size' => 'big',
  7889. 'type' => 'int',
  7890. 'not null' => FALSE,
  7891. ),
  7892. 'rightstartf_id' => array(
  7893. 'size' => 'big',
  7894. 'type' => 'int',
  7895. 'not null' => FALSE,
  7896. ),
  7897. 'rightendf_id' => array(
  7898. 'size' => 'big',
  7899. 'type' => 'int',
  7900. 'not null' => TRUE,
  7901. ),
  7902. 'rangestr' => array(
  7903. 'size' => 'normal',
  7904. 'type' => 'varchar',
  7905. 'length' => '255',
  7906. 'not null' => FALSE,
  7907. ),
  7908. ),
  7909. 'indexes' => array(
  7910. 'featurerange_idx1' => array(
  7911. 0 => 'featuremap_id',
  7912. ),
  7913. 'featurerange_idx2' => array(
  7914. 0 => 'feature_id',
  7915. ),
  7916. 'featurerange_idx3' => array(
  7917. 0 => 'leftstartf_id',
  7918. ),
  7919. 'featurerange_idx4' => array(
  7920. 0 => 'leftendf_id',
  7921. ),
  7922. 'featurerange_idx5' => array(
  7923. 0 => 'rightstartf_id',
  7924. ),
  7925. 'featurerange_idx6' => array(
  7926. 0 => 'rightendf_id',
  7927. ),
  7928. ),
  7929. 'primary key' => array(
  7930. 0 => 'featurerange_id',
  7931. ),
  7932. 'foreign keys' => array(
  7933. 'featuremap' => array(
  7934. 'table' => 'featuremap',
  7935. 'columns' => array(
  7936. 'featuremap_id' => 'featuremap_id',
  7937. ),
  7938. ),
  7939. 'feature' => array(
  7940. 'table' => 'feature',
  7941. 'columns' => array(
  7942. 'feature_id' => 'feature_id',
  7943. 'leftstartf_id' => 'feature_id',
  7944. 'leftendf_id' => 'feature_id',
  7945. 'rightstartf_id' => 'feature_id',
  7946. 'rightendf_id' => 'feature_id',
  7947. ),
  7948. ),
  7949. ),
  7950. 'referring_tables' => array(
  7951. ),
  7952. );
  7953. return $description;
  7954. }
  7955. /**
  7956. * Implements hook_chado_schema_v1_3_feature_relationship()
  7957. *
  7958. * Purpose: To describe the structure of 'feature_relationship' to tripal
  7959. * @see chado_insert_record()
  7960. * @see chado_update_record()
  7961. * @see chado_select_record()
  7962. * @see chado_generate_var()
  7963. * @see chado_expan_var()
  7964. *
  7965. * @return
  7966. * An array describing the 'feature_relationship' table
  7967. *
  7968. * @ingroup tripal_chado_v1.3_schema_api
  7969. *
  7970. */
  7971. function tripal_chado_chado_schema_v1_3_feature_relationship() {
  7972. $description = array(
  7973. 'description' => '',
  7974. 'table' => 'feature_relationship',
  7975. 'fields' => array(
  7976. 'feature_relationship_id' => array(
  7977. 'size' => 'big',
  7978. 'type' => 'serial',
  7979. 'not null' => TRUE,
  7980. ),
  7981. 'subject_id' => array(
  7982. 'size' => 'big',
  7983. 'type' => 'int',
  7984. 'not null' => TRUE,
  7985. ),
  7986. 'object_id' => array(
  7987. 'size' => 'big',
  7988. 'type' => 'int',
  7989. 'not null' => TRUE,
  7990. ),
  7991. 'type_id' => array(
  7992. 'size' => 'big',
  7993. 'type' => 'int',
  7994. 'not null' => TRUE,
  7995. ),
  7996. 'value' => array(
  7997. 'size' => 'normal',
  7998. 'type' => 'text',
  7999. 'not null' => FALSE,
  8000. ),
  8001. 'rank' => array(
  8002. 'size' => 'normal',
  8003. 'type' => 'int',
  8004. 'not null' => TRUE,
  8005. 'default' => 0,
  8006. ),
  8007. ),
  8008. 'unique keys' => array(
  8009. 'feature_relationship_c1' => array(
  8010. 0 => 'subject_id',
  8011. 1 => 'object_id',
  8012. 2 => 'type_id',
  8013. 3 => 'rank',
  8014. ),
  8015. ),
  8016. 'indexes' => array(
  8017. 'feature_relationship_idx1' => array(
  8018. 0 => 'subject_id',
  8019. ),
  8020. 'feature_relationship_idx1b' => array(
  8021. 0 => 'object_id',
  8022. 1 => 'subject_id',
  8023. 2 => 'type_id',
  8024. ),
  8025. 'feature_relationship_idx2' => array(
  8026. 0 => 'object_id',
  8027. ),
  8028. 'feature_relationship_idx3' => array(
  8029. 0 => 'type_id',
  8030. ),
  8031. ),
  8032. 'primary key' => array(
  8033. 0 => 'feature_relationship_id',
  8034. ),
  8035. 'foreign keys' => array(
  8036. 'feature' => array(
  8037. 'table' => 'feature',
  8038. 'columns' => array(
  8039. 'subject_id' => 'feature_id',
  8040. 'object_id' => 'feature_id',
  8041. ),
  8042. ),
  8043. 'cvterm' => array(
  8044. 'table' => 'cvterm',
  8045. 'columns' => array(
  8046. 'type_id' => 'cvterm_id',
  8047. ),
  8048. ),
  8049. ),
  8050. 'referring_tables' => array(
  8051. 0 => 'feature_relationshipprop',
  8052. 1 => 'feature_relationship_pub',
  8053. ),
  8054. );
  8055. return $description;
  8056. }
  8057. /**
  8058. * Implements hook_chado_schema_v1_3_feature_relationshipprop()
  8059. *
  8060. * Purpose: To describe the structure of 'feature_relationshipprop' to tripal
  8061. * @see chado_insert_record()
  8062. * @see chado_update_record()
  8063. * @see chado_select_record()
  8064. * @see chado_generate_var()
  8065. * @see chado_expan_var()
  8066. *
  8067. * @return
  8068. * An array describing the 'feature_relationshipprop' table
  8069. *
  8070. * @ingroup tripal_chado_v1.3_schema_api
  8071. *
  8072. */
  8073. function tripal_chado_chado_schema_v1_3_feature_relationshipprop() {
  8074. $description = array(
  8075. 'description' => '',
  8076. 'table' => 'feature_relationshipprop',
  8077. 'fields' => array(
  8078. 'feature_relationshipprop_id' => array(
  8079. 'size' => 'big',
  8080. 'type' => 'serial',
  8081. 'not null' => TRUE,
  8082. ),
  8083. 'feature_relationship_id' => array(
  8084. 'size' => 'big',
  8085. 'type' => 'int',
  8086. 'not null' => TRUE,
  8087. ),
  8088. 'type_id' => array(
  8089. 'size' => 'big',
  8090. 'type' => 'int',
  8091. 'not null' => TRUE,
  8092. ),
  8093. 'value' => array(
  8094. 'size' => 'normal',
  8095. 'type' => 'text',
  8096. 'not null' => FALSE,
  8097. ),
  8098. 'rank' => array(
  8099. 'size' => 'normal',
  8100. 'type' => 'int',
  8101. 'not null' => TRUE,
  8102. 'default' => 0,
  8103. ),
  8104. ),
  8105. 'unique keys' => array(
  8106. 'feature_relationshipprop_c1' => array(
  8107. 0 => 'feature_relationship_id',
  8108. 1 => 'type_id',
  8109. 2 => 'rank',
  8110. ),
  8111. ),
  8112. 'indexes' => array(
  8113. 'feature_relationshipprop_idx1' => array(
  8114. 0 => 'feature_relationship_id',
  8115. ),
  8116. 'feature_relationshipprop_idx2' => array(
  8117. 0 => 'type_id',
  8118. ),
  8119. ),
  8120. 'primary key' => array(
  8121. 0 => 'feature_relationshipprop_id',
  8122. ),
  8123. 'foreign keys' => array(
  8124. 'feature_relationship' => array(
  8125. 'table' => 'feature_relationship',
  8126. 'columns' => array(
  8127. 'feature_relationship_id' => 'feature_relationship_id',
  8128. ),
  8129. ),
  8130. 'cvterm' => array(
  8131. 'table' => 'cvterm',
  8132. 'columns' => array(
  8133. 'type_id' => 'cvterm_id',
  8134. ),
  8135. ),
  8136. ),
  8137. 'referring_tables' => array(
  8138. 0 => 'feature_relationshipprop_pub',
  8139. ),
  8140. );
  8141. return $description;
  8142. }
  8143. /**
  8144. * Implements hook_chado_schema_v1_3_feature_relationshipprop_pub()
  8145. *
  8146. * Purpose: To describe the structure of 'feature_relationshipprop_pub' to tripal
  8147. * @see chado_insert_record()
  8148. * @see chado_update_record()
  8149. * @see chado_select_record()
  8150. * @see chado_generate_var()
  8151. * @see chado_expan_var()
  8152. *
  8153. * @return
  8154. * An array describing the 'feature_relationshipprop_pub' table
  8155. *
  8156. * @ingroup tripal_chado_v1.3_schema_api
  8157. *
  8158. */
  8159. function tripal_chado_chado_schema_v1_3_feature_relationshipprop_pub() {
  8160. $description = array(
  8161. 'description' => '',
  8162. 'table' => 'feature_relationshipprop_pub',
  8163. 'fields' => array(
  8164. 'feature_relationshipprop_pub_id' => array(
  8165. 'size' => 'big',
  8166. 'type' => 'serial',
  8167. 'not null' => TRUE,
  8168. ),
  8169. 'feature_relationshipprop_id' => array(
  8170. 'size' => 'big',
  8171. 'type' => 'int',
  8172. 'not null' => TRUE,
  8173. ),
  8174. 'pub_id' => array(
  8175. 'size' => 'big',
  8176. 'type' => 'int',
  8177. 'not null' => TRUE,
  8178. ),
  8179. ),
  8180. 'unique keys' => array(
  8181. 'feature_relationshipprop_pub_c1' => array(
  8182. 0 => 'feature_relationshipprop_id',
  8183. 1 => 'pub_id',
  8184. ),
  8185. ),
  8186. 'indexes' => array(
  8187. 'feature_relationshipprop_pub_idx1' => array(
  8188. 0 => 'feature_relationshipprop_id',
  8189. ),
  8190. 'feature_relationshipprop_pub_idx2' => array(
  8191. 0 => 'pub_id',
  8192. ),
  8193. ),
  8194. 'primary key' => array(
  8195. 0 => 'feature_relationshipprop_pub_id',
  8196. ),
  8197. 'foreign keys' => array(
  8198. 'feature_relationshipprop' => array(
  8199. 'table' => 'feature_relationshipprop',
  8200. 'columns' => array(
  8201. 'feature_relationshipprop_id' => 'feature_relationshipprop_id',
  8202. ),
  8203. ),
  8204. 'pub' => array(
  8205. 'table' => 'pub',
  8206. 'columns' => array(
  8207. 'pub_id' => 'pub_id',
  8208. ),
  8209. ),
  8210. ),
  8211. 'referring_tables' => array(
  8212. ),
  8213. );
  8214. return $description;
  8215. }
  8216. /**
  8217. * Implements hook_chado_schema_v1_3_feature_relationship_pub()
  8218. *
  8219. * Purpose: To describe the structure of 'feature_relationship_pub' to tripal
  8220. * @see chado_insert_record()
  8221. * @see chado_update_record()
  8222. * @see chado_select_record()
  8223. * @see chado_generate_var()
  8224. * @see chado_expan_var()
  8225. *
  8226. * @return
  8227. * An array describing the 'feature_relationship_pub' table
  8228. *
  8229. * @ingroup tripal_chado_v1.3_schema_api
  8230. *
  8231. */
  8232. function tripal_chado_chado_schema_v1_3_feature_relationship_pub() {
  8233. $description = array(
  8234. 'description' => '',
  8235. 'table' => 'feature_relationship_pub',
  8236. 'fields' => array(
  8237. 'feature_relationship_pub_id' => array(
  8238. 'size' => 'big',
  8239. 'type' => 'serial',
  8240. 'not null' => TRUE,
  8241. ),
  8242. 'feature_relationship_id' => array(
  8243. 'size' => 'big',
  8244. 'type' => 'int',
  8245. 'not null' => TRUE,
  8246. ),
  8247. 'pub_id' => array(
  8248. 'size' => 'big',
  8249. 'type' => 'int',
  8250. 'not null' => TRUE,
  8251. ),
  8252. ),
  8253. 'unique keys' => array(
  8254. 'feature_relationship_pub_c1' => array(
  8255. 0 => 'feature_relationship_id',
  8256. 1 => 'pub_id',
  8257. ),
  8258. ),
  8259. 'indexes' => array(
  8260. 'feature_relationship_pub_idx1' => array(
  8261. 0 => 'feature_relationship_id',
  8262. ),
  8263. 'feature_relationship_pub_idx2' => array(
  8264. 0 => 'pub_id',
  8265. ),
  8266. ),
  8267. 'primary key' => array(
  8268. 0 => 'feature_relationship_pub_id',
  8269. ),
  8270. 'foreign keys' => array(
  8271. 'feature_relationship' => array(
  8272. 'table' => 'feature_relationship',
  8273. 'columns' => array(
  8274. 'feature_relationship_id' => 'feature_relationship_id',
  8275. ),
  8276. ),
  8277. 'pub' => array(
  8278. 'table' => 'pub',
  8279. 'columns' => array(
  8280. 'pub_id' => 'pub_id',
  8281. ),
  8282. ),
  8283. ),
  8284. 'referring_tables' => array(
  8285. ),
  8286. );
  8287. return $description;
  8288. }
  8289. /**
  8290. * Implements hook_chado_schema_v1_3_feature_synonym()
  8291. *
  8292. * Purpose: To describe the structure of 'feature_synonym' to tripal
  8293. * @see chado_insert_record()
  8294. * @see chado_update_record()
  8295. * @see chado_select_record()
  8296. * @see chado_generate_var()
  8297. * @see chado_expan_var()
  8298. *
  8299. * @return
  8300. * An array describing the 'feature_synonym' table
  8301. *
  8302. * @ingroup tripal_chado_v1.3_schema_api
  8303. *
  8304. */
  8305. function tripal_chado_chado_schema_v1_3_feature_synonym() {
  8306. $description = array(
  8307. 'description' => '',
  8308. 'table' => 'feature_synonym',
  8309. 'fields' => array(
  8310. 'feature_synonym_id' => array(
  8311. 'size' => 'big',
  8312. 'type' => 'serial',
  8313. 'not null' => TRUE,
  8314. ),
  8315. 'synonym_id' => array(
  8316. 'size' => 'big',
  8317. 'type' => 'int',
  8318. 'not null' => TRUE,
  8319. ),
  8320. 'feature_id' => array(
  8321. 'size' => 'big',
  8322. 'type' => 'int',
  8323. 'not null' => TRUE,
  8324. ),
  8325. 'pub_id' => array(
  8326. 'size' => 'big',
  8327. 'type' => 'int',
  8328. 'not null' => TRUE,
  8329. ),
  8330. 'is_current' => array(
  8331. 'size' => 'normal',
  8332. 'type' => 'boolean',
  8333. 'not null' => TRUE,
  8334. 'default' => FALSE,
  8335. ),
  8336. 'is_internal' => array(
  8337. 'size' => 'normal',
  8338. 'type' => 'boolean',
  8339. 'not null' => TRUE,
  8340. 'default' => FALSE,
  8341. ),
  8342. ),
  8343. 'unique keys' => array(
  8344. 'feature_synonym_c1' => array(
  8345. 0 => 'synonym_id',
  8346. 1 => 'feature_id',
  8347. 2 => 'pub_id',
  8348. ),
  8349. ),
  8350. 'indexes' => array(
  8351. 'feature_synonym_idx1' => array(
  8352. 0 => 'synonym_id',
  8353. ),
  8354. 'feature_synonym_idx2' => array(
  8355. 0 => 'feature_id',
  8356. ),
  8357. 'feature_synonym_idx3' => array(
  8358. 0 => 'pub_id',
  8359. ),
  8360. ),
  8361. 'primary key' => array(
  8362. 0 => 'feature_synonym_id',
  8363. ),
  8364. 'foreign keys' => array(
  8365. 'synonym' => array(
  8366. 'table' => 'synonym',
  8367. 'columns' => array(
  8368. 'synonym_id' => 'synonym_id',
  8369. ),
  8370. ),
  8371. 'feature' => array(
  8372. 'table' => 'feature',
  8373. 'columns' => array(
  8374. 'feature_id' => 'feature_id',
  8375. ),
  8376. ),
  8377. 'pub' => array(
  8378. 'table' => 'pub',
  8379. 'columns' => array(
  8380. 'pub_id' => 'pub_id',
  8381. ),
  8382. ),
  8383. ),
  8384. 'referring_tables' => array(
  8385. ),
  8386. );
  8387. return $description;
  8388. }
  8389. /**
  8390. * Implements hook_chado_schema_v1_3_genotype()
  8391. *
  8392. * Purpose: To describe the structure of 'genotype' to tripal
  8393. * @see chado_insert_record()
  8394. * @see chado_update_record()
  8395. * @see chado_select_record()
  8396. * @see chado_generate_var()
  8397. * @see chado_expan_var()
  8398. *
  8399. * @return
  8400. * An array describing the 'genotype' table
  8401. *
  8402. * @ingroup tripal_chado_v1.3_schema_api
  8403. *
  8404. */
  8405. function tripal_chado_chado_schema_v1_3_genotype() {
  8406. $description = array(
  8407. 'description' => '',
  8408. 'table' => 'genotype',
  8409. 'fields' => array(
  8410. 'genotype_id' => array(
  8411. 'size' => 'big',
  8412. 'type' => 'serial',
  8413. 'not null' => TRUE,
  8414. ),
  8415. 'name' => array(
  8416. 'size' => 'normal',
  8417. 'type' => 'text',
  8418. 'not null' => FALSE,
  8419. ),
  8420. 'uniquename' => array(
  8421. 'size' => 'normal',
  8422. 'type' => 'text',
  8423. 'not null' => TRUE,
  8424. ),
  8425. 'description' => array(
  8426. 'size' => 'normal',
  8427. 'type' => 'text',
  8428. 'not null' => FALSE,
  8429. ),
  8430. 'type_id' => array(
  8431. 'size' => 'big',
  8432. 'type' => 'int',
  8433. 'not null' => TRUE,
  8434. ),
  8435. ),
  8436. 'unique keys' => array(
  8437. 'genotype_c1' => array(
  8438. 0 => 'uniquename',
  8439. ),
  8440. ),
  8441. 'indexes' => array(
  8442. 'genotype_idx1' => array(
  8443. 0 => 'uniquename',
  8444. ),
  8445. 'genotype_idx2' => array(
  8446. 0 => 'name',
  8447. ),
  8448. ),
  8449. 'primary key' => array(
  8450. 0 => 'genotype_id',
  8451. ),
  8452. 'foreign keys' => array(
  8453. 'cvterm' => array(
  8454. 'table' => 'cvterm',
  8455. 'columns' => array(
  8456. 'type_id' => 'cvterm_id',
  8457. ),
  8458. ),
  8459. ),
  8460. 'referring_tables' => array(
  8461. 0 => 'feature_genotype',
  8462. 1 => 'genotypeprop',
  8463. 2 => 'nd_experiment_genotype',
  8464. 3 => 'phendesc',
  8465. 4 => 'phenotype_comparison',
  8466. 6 => 'phenstatement',
  8467. 7 => 'stock_genotype',
  8468. ),
  8469. );
  8470. return $description;
  8471. }
  8472. /**
  8473. * Implements hook_chado_schema_v1_3_genotypeprop()
  8474. *
  8475. * Purpose: To describe the structure of 'genotypeprop' to tripal
  8476. * @see chado_insert_record()
  8477. * @see chado_update_record()
  8478. * @see chado_select_record()
  8479. * @see chado_generate_var()
  8480. * @see chado_expan_var()
  8481. *
  8482. * @return
  8483. * An array describing the 'genotypeprop' table
  8484. *
  8485. * @ingroup tripal_chado_v1.3_schema_api
  8486. *
  8487. */
  8488. function tripal_chado_chado_schema_v1_3_genotypeprop() {
  8489. $description = array(
  8490. 'description' => '',
  8491. 'table' => 'genotypeprop',
  8492. 'fields' => array(
  8493. 'genotypeprop_id' => array(
  8494. 'size' => 'big',
  8495. 'type' => 'serial',
  8496. 'not null' => TRUE,
  8497. ),
  8498. 'genotype_id' => array(
  8499. 'size' => 'big',
  8500. 'type' => 'int',
  8501. 'not null' => TRUE,
  8502. ),
  8503. 'type_id' => array(
  8504. 'size' => 'big',
  8505. 'type' => 'int',
  8506. 'not null' => TRUE,
  8507. ),
  8508. 'value' => array(
  8509. 'size' => 'normal',
  8510. 'type' => 'text',
  8511. 'not null' => FALSE,
  8512. ),
  8513. 'rank' => array(
  8514. 'size' => 'normal',
  8515. 'type' => 'int',
  8516. 'not null' => TRUE,
  8517. 'default' => 0,
  8518. ),
  8519. ),
  8520. 'unique keys' => array(
  8521. 'genotypeprop_c1' => array(
  8522. 0 => 'genotype_id',
  8523. 1 => 'type_id',
  8524. 2 => 'rank',
  8525. ),
  8526. ),
  8527. 'indexes' => array(
  8528. 'genotypeprop_idx1' => array(
  8529. 0 => 'genotype_id',
  8530. ),
  8531. 'genotypeprop_idx2' => array(
  8532. 0 => 'type_id',
  8533. ),
  8534. ),
  8535. 'primary key' => array(
  8536. 0 => 'genotypeprop_id',
  8537. ),
  8538. 'foreign keys' => array(
  8539. 'genotype' => array(
  8540. 'table' => 'genotype',
  8541. 'columns' => array(
  8542. 'genotype_id' => 'genotype_id',
  8543. ),
  8544. ),
  8545. 'cvterm' => array(
  8546. 'table' => 'cvterm',
  8547. 'columns' => array(
  8548. 'type_id' => 'cvterm_id',
  8549. ),
  8550. ),
  8551. ),
  8552. 'referring_tables' => array(
  8553. ),
  8554. );
  8555. return $description;
  8556. }
  8557. /**
  8558. * Implements hook_chado_schema_v1_3_library()
  8559. *
  8560. * Purpose: To describe the structure of 'library' to tripal
  8561. * @see chado_insert_record()
  8562. * @see chado_update_record()
  8563. * @see chado_select_record()
  8564. * @see chado_generate_var()
  8565. * @see chado_expan_var()
  8566. *
  8567. * @return
  8568. * An array describing the 'library' table
  8569. *
  8570. * @ingroup tripal_chado_v1.3_schema_api
  8571. *
  8572. */
  8573. function tripal_chado_chado_schema_v1_3_library() {
  8574. $description = array(
  8575. 'description' => '',
  8576. 'table' => 'library',
  8577. 'fields' => array(
  8578. 'library_id' => array(
  8579. 'size' => 'big',
  8580. 'type' => 'serial',
  8581. 'not null' => TRUE,
  8582. ),
  8583. 'organism_id' => array(
  8584. 'size' => 'big',
  8585. 'type' => 'int',
  8586. 'not null' => TRUE,
  8587. ),
  8588. 'name' => array(
  8589. 'size' => 'normal',
  8590. 'type' => 'varchar',
  8591. 'length' => '255',
  8592. 'not null' => FALSE,
  8593. ),
  8594. 'uniquename' => array(
  8595. 'size' => 'normal',
  8596. 'type' => 'text',
  8597. 'not null' => TRUE,
  8598. ),
  8599. 'type_id' => array(
  8600. 'size' => 'big',
  8601. 'type' => 'int',
  8602. 'not null' => TRUE,
  8603. ),
  8604. 'is_obsolete' => array(
  8605. 'size' => 'normal',
  8606. 'type' => 'int',
  8607. 'not null' => TRUE,
  8608. 'default' => 0,
  8609. ),
  8610. 'timeaccessioned' => array(
  8611. 'size' => 'normal',
  8612. 'type' => 'datetime',
  8613. 'not null' => TRUE,
  8614. 'default' => 'now()',
  8615. ),
  8616. 'timelastmodified' => array(
  8617. 'size' => 'normal',
  8618. 'type' => 'datetime',
  8619. 'not null' => TRUE,
  8620. 'default' => 'now()',
  8621. ),
  8622. ),
  8623. 'unique keys' => array(
  8624. 'library_c1' => array(
  8625. 0 => 'organism_id',
  8626. 1 => 'uniquename',
  8627. 2 => 'type_id',
  8628. ),
  8629. ),
  8630. 'indexes' => array(
  8631. 'library_contact_idx1' => array(
  8632. 0 => 'library_id',
  8633. ),
  8634. 'library_idx1' => array(
  8635. 0 => 'organism_id',
  8636. ),
  8637. 'library_idx2' => array(
  8638. 0 => 'type_id',
  8639. ),
  8640. 'library_idx3' => array(
  8641. 0 => 'uniquename',
  8642. ),
  8643. 'library_name_ind1' => array(
  8644. 0 => 'name',
  8645. ),
  8646. ),
  8647. 'primary key' => array(
  8648. 0 => 'library_id',
  8649. ),
  8650. 'foreign keys' => array(
  8651. 'organism' => array(
  8652. 'table' => 'organism',
  8653. 'columns' => array(
  8654. 'organism_id' => 'organism_id',
  8655. ),
  8656. ),
  8657. 'cvterm' => array(
  8658. 'table' => 'cvterm',
  8659. 'columns' => array(
  8660. 'type_id' => 'cvterm_id',
  8661. ),
  8662. ),
  8663. ),
  8664. 'referring_tables' => array(
  8665. 0 => 'cell_line_library',
  8666. 1 => 'library_contact',
  8667. 2 => 'library_cvterm',
  8668. 3 => 'library_dbxref',
  8669. 4 => 'library_expression',
  8670. 5 => 'library_feature',
  8671. 6 => 'libraryprop',
  8672. 7 => 'library_pub',
  8673. 8 => 'library_relationship',
  8674. 10 => 'library_synonym',
  8675. 11 => 'stock_library',
  8676. ),
  8677. );
  8678. return $description;
  8679. }
  8680. /**
  8681. * Implements hook_chado_schema_v1_3_library_contact()
  8682. *
  8683. * Purpose: To describe the structure of 'library_contact' to tripal
  8684. * @see chado_insert_record()
  8685. * @see chado_update_record()
  8686. * @see chado_select_record()
  8687. * @see chado_generate_var()
  8688. * @see chado_expan_var()
  8689. *
  8690. * @return
  8691. * An array describing the 'library_contact' table
  8692. *
  8693. * @ingroup tripal_chado_v1.3_schema_api
  8694. *
  8695. */
  8696. function tripal_chado_chado_schema_v1_3_library_contact() {
  8697. $description = array(
  8698. 'description' => '',
  8699. 'table' => 'library_contact',
  8700. 'fields' => array(
  8701. 'library_contact_id' => array(
  8702. 'size' => 'big',
  8703. 'type' => 'serial',
  8704. 'not null' => TRUE,
  8705. ),
  8706. 'library_id' => array(
  8707. 'size' => 'big',
  8708. 'type' => 'int',
  8709. 'not null' => TRUE,
  8710. ),
  8711. 'contact_id' => array(
  8712. 'size' => 'big',
  8713. 'type' => 'int',
  8714. 'not null' => TRUE,
  8715. ),
  8716. ),
  8717. 'unique keys' => array(
  8718. 'library_contact_c1' => array(
  8719. 0 => 'library_id',
  8720. 1 => 'contact_id',
  8721. ),
  8722. ),
  8723. 'primary key' => array(
  8724. 0 => 'library_contact_id',
  8725. ),
  8726. 'foreign keys' => array(
  8727. 'library' => array(
  8728. 'table' => 'library',
  8729. 'columns' => array(
  8730. 'library_id' => 'library_id',
  8731. ),
  8732. ),
  8733. 'contact' => array(
  8734. 'table' => 'contact',
  8735. 'columns' => array(
  8736. 'contact_id' => 'contact_id',
  8737. ),
  8738. ),
  8739. ),
  8740. 'referring_tables' => array(
  8741. ),
  8742. );
  8743. return $description;
  8744. }
  8745. /**
  8746. * Implements hook_chado_schema_v1_3_library_cvterm()
  8747. *
  8748. * Purpose: To describe the structure of 'library_cvterm' to tripal
  8749. * @see chado_insert_record()
  8750. * @see chado_update_record()
  8751. * @see chado_select_record()
  8752. * @see chado_generate_var()
  8753. * @see chado_expan_var()
  8754. *
  8755. * @return
  8756. * An array describing the 'library_cvterm' table
  8757. *
  8758. * @ingroup tripal_chado_v1.3_schema_api
  8759. *
  8760. */
  8761. function tripal_chado_chado_schema_v1_3_library_cvterm() {
  8762. $description = array(
  8763. 'description' => '',
  8764. 'table' => 'library_cvterm',
  8765. 'fields' => array(
  8766. 'library_cvterm_id' => array(
  8767. 'size' => 'big',
  8768. 'type' => 'serial',
  8769. 'not null' => TRUE,
  8770. ),
  8771. 'library_id' => array(
  8772. 'size' => 'big',
  8773. 'type' => 'int',
  8774. 'not null' => TRUE,
  8775. ),
  8776. 'cvterm_id' => array(
  8777. 'size' => 'big',
  8778. 'type' => 'int',
  8779. 'not null' => TRUE,
  8780. ),
  8781. 'pub_id' => array(
  8782. 'size' => 'big',
  8783. 'type' => 'int',
  8784. 'not null' => TRUE,
  8785. ),
  8786. ),
  8787. 'unique keys' => array(
  8788. 'library_cvterm_c1' => array(
  8789. 0 => 'library_id',
  8790. 1 => 'cvterm_id',
  8791. 2 => 'pub_id',
  8792. ),
  8793. ),
  8794. 'indexes' => array(
  8795. 'library_cvterm_idx1' => array(
  8796. 0 => 'library_id',
  8797. ),
  8798. 'library_cvterm_idx2' => array(
  8799. 0 => 'cvterm_id',
  8800. ),
  8801. 'library_cvterm_idx3' => array(
  8802. 0 => 'pub_id',
  8803. ),
  8804. ),
  8805. 'primary key' => array(
  8806. 0 => 'library_cvterm_id',
  8807. ),
  8808. 'foreign keys' => array(
  8809. 'library' => array(
  8810. 'table' => 'library',
  8811. 'columns' => array(
  8812. 'library_id' => 'library_id',
  8813. ),
  8814. ),
  8815. 'cvterm' => array(
  8816. 'table' => 'cvterm',
  8817. 'columns' => array(
  8818. 'cvterm_id' => 'cvterm_id',
  8819. ),
  8820. ),
  8821. 'pub' => array(
  8822. 'table' => 'pub',
  8823. 'columns' => array(
  8824. 'pub_id' => 'pub_id',
  8825. ),
  8826. ),
  8827. ),
  8828. 'referring_tables' => array(
  8829. ),
  8830. );
  8831. return $description;
  8832. }
  8833. /**
  8834. * Implements hook_chado_schema_v1_3_library_dbxref()
  8835. *
  8836. * Purpose: To describe the structure of 'library_dbxref' to tripal
  8837. * @see chado_insert_record()
  8838. * @see chado_update_record()
  8839. * @see chado_select_record()
  8840. * @see chado_generate_var()
  8841. * @see chado_expan_var()
  8842. *
  8843. * @return
  8844. * An array describing the 'library_dbxref' table
  8845. *
  8846. * @ingroup tripal_chado_v1.3_schema_api
  8847. *
  8848. */
  8849. function tripal_chado_chado_schema_v1_3_library_dbxref() {
  8850. $description = array(
  8851. 'description' => '',
  8852. 'table' => 'library_dbxref',
  8853. 'fields' => array(
  8854. 'library_dbxref_id' => array(
  8855. 'size' => 'big',
  8856. 'type' => 'serial',
  8857. 'not null' => TRUE,
  8858. ),
  8859. 'library_id' => array(
  8860. 'size' => 'big',
  8861. 'type' => 'int',
  8862. 'not null' => TRUE,
  8863. ),
  8864. 'dbxref_id' => array(
  8865. 'size' => 'big',
  8866. 'type' => 'int',
  8867. 'not null' => TRUE,
  8868. ),
  8869. 'is_current' => array(
  8870. 'size' => 'normal',
  8871. 'type' => 'boolean',
  8872. 'not null' => TRUE,
  8873. 'default' => 'true',
  8874. ),
  8875. ),
  8876. 'unique keys' => array(
  8877. 'library_dbxref_c1' => array(
  8878. 0 => 'library_id',
  8879. 1 => 'dbxref_id',
  8880. ),
  8881. ),
  8882. 'indexes' => array(
  8883. 'library_dbxref_idx1' => array(
  8884. 0 => 'library_id',
  8885. ),
  8886. 'library_dbxref_idx2' => array(
  8887. 0 => 'dbxref_id',
  8888. ),
  8889. ),
  8890. 'primary key' => array(
  8891. 0 => 'library_dbxref_id',
  8892. ),
  8893. 'foreign keys' => array(
  8894. 'library' => array(
  8895. 'table' => 'library',
  8896. 'columns' => array(
  8897. 'library_id' => 'library_id',
  8898. ),
  8899. ),
  8900. 'dbxref' => array(
  8901. 'table' => 'dbxref',
  8902. 'columns' => array(
  8903. 'dbxref_id' => 'dbxref_id',
  8904. ),
  8905. ),
  8906. ),
  8907. 'referring_tables' => array(
  8908. ),
  8909. );
  8910. return $description;
  8911. }
  8912. /**
  8913. * Implements hook_chado_schema_v1_3_library_expression()
  8914. *
  8915. * Purpose: To describe the structure of 'library_expression' to tripal
  8916. * @see chado_insert_record()
  8917. * @see chado_update_record()
  8918. * @see chado_select_record()
  8919. * @see chado_generate_var()
  8920. * @see chado_expan_var()
  8921. *
  8922. * @return
  8923. * An array describing the 'library_expression' table
  8924. *
  8925. * @ingroup tripal_chado_v1.3_schema_api
  8926. *
  8927. */
  8928. function tripal_chado_chado_schema_v1_3_library_expression() {
  8929. $description = array(
  8930. 'description' => '',
  8931. 'table' => 'library_expression',
  8932. 'fields' => array(
  8933. 'library_expression_id' => array(
  8934. 'size' => 'big',
  8935. 'type' => 'serial',
  8936. 'not null' => TRUE,
  8937. ),
  8938. 'library_id' => array(
  8939. 'size' => 'big',
  8940. 'type' => 'int',
  8941. 'not null' => TRUE,
  8942. ),
  8943. 'expression_id' => array(
  8944. 'size' => 'big',
  8945. 'type' => 'int',
  8946. 'not null' => TRUE,
  8947. ),
  8948. 'pub_id' => array(
  8949. 'size' => 'big',
  8950. 'type' => 'int',
  8951. 'not null' => TRUE,
  8952. ),
  8953. ),
  8954. 'unique keys' => array(
  8955. 'library_expression_c1' => array(
  8956. 0 => 'library_id',
  8957. 1 => 'expression_id',
  8958. ),
  8959. ),
  8960. 'indexes' => array(
  8961. 'library_expression_idx1' => array(
  8962. 0 => 'library_id',
  8963. ),
  8964. 'library_expression_idx2' => array(
  8965. 0 => 'expression_id',
  8966. ),
  8967. 'library_expression_idx3' => array(
  8968. 0 => 'pub_id',
  8969. ),
  8970. ),
  8971. 'primary key' => array(
  8972. 0 => 'library_expression_id',
  8973. ),
  8974. 'foreign keys' => array(
  8975. 'library' => array(
  8976. 'table' => 'library',
  8977. 'columns' => array(
  8978. 'library_id' => 'library_id',
  8979. ),
  8980. ),
  8981. 'expression' => array(
  8982. 'table' => 'expression',
  8983. 'columns' => array(
  8984. 'expression_id' => 'expression_id',
  8985. ),
  8986. ),
  8987. 'pub' => array(
  8988. 'table' => 'pub',
  8989. 'columns' => array(
  8990. 'pub_id' => 'pub_id',
  8991. ),
  8992. ),
  8993. ),
  8994. 'referring_tables' => array(
  8995. 0 => 'library_expressionprop',
  8996. ),
  8997. );
  8998. return $description;
  8999. }
  9000. /**
  9001. * Implements hook_chado_schema_v1_3_library_expressionprop()
  9002. *
  9003. * Purpose: To describe the structure of 'library_expressionprop' to tripal
  9004. * @see chado_insert_record()
  9005. * @see chado_update_record()
  9006. * @see chado_select_record()
  9007. * @see chado_generate_var()
  9008. * @see chado_expan_var()
  9009. *
  9010. * @return
  9011. * An array describing the 'library_expressionprop' table
  9012. *
  9013. * @ingroup tripal_chado_v1.3_schema_api
  9014. *
  9015. */
  9016. function tripal_chado_chado_schema_v1_3_library_expressionprop() {
  9017. $description = array(
  9018. 'description' => '',
  9019. 'table' => 'library_expressionprop',
  9020. 'fields' => array(
  9021. 'library_expressionprop_id' => array(
  9022. 'size' => 'big',
  9023. 'type' => 'serial',
  9024. 'not null' => TRUE,
  9025. ),
  9026. 'library_expression_id' => array(
  9027. 'size' => 'big',
  9028. 'type' => 'int',
  9029. 'not null' => TRUE,
  9030. ),
  9031. 'type_id' => array(
  9032. 'size' => 'big',
  9033. 'type' => 'int',
  9034. 'not null' => TRUE,
  9035. ),
  9036. 'value' => array(
  9037. 'size' => 'normal',
  9038. 'type' => 'text',
  9039. 'not null' => FALSE,
  9040. ),
  9041. 'rank' => array(
  9042. 'size' => 'normal',
  9043. 'type' => 'int',
  9044. 'not null' => TRUE,
  9045. 'default' => 0,
  9046. ),
  9047. ),
  9048. 'unique keys' => array(
  9049. 'library_expressionprop_c1' => array(
  9050. 0 => 'library_expression_id',
  9051. 1 => 'type_id',
  9052. 2 => 'rank',
  9053. ),
  9054. ),
  9055. 'indexes' => array(
  9056. 'library_expressionprop_idx1' => array(
  9057. 0 => 'library_expression_id',
  9058. ),
  9059. 'library_expressionprop_idx2' => array(
  9060. 0 => 'type_id',
  9061. ),
  9062. ),
  9063. 'primary key' => array(
  9064. 0 => 'library_expressionprop_id',
  9065. ),
  9066. 'foreign keys' => array(
  9067. 'library_expression' => array(
  9068. 'table' => 'library_expression',
  9069. 'columns' => array(
  9070. 'library_expression_id' => 'library_expression_id',
  9071. ),
  9072. ),
  9073. 'cvterm' => array(
  9074. 'table' => 'cvterm',
  9075. 'columns' => array(
  9076. 'type_id' => 'cvterm_id',
  9077. ),
  9078. ),
  9079. ),
  9080. 'referring_tables' => array(
  9081. ),
  9082. );
  9083. return $description;
  9084. }
  9085. /**
  9086. * Implements hook_chado_schema_v1_3_library_feature()
  9087. *
  9088. * Purpose: To describe the structure of 'library_feature' to tripal
  9089. * @see chado_insert_record()
  9090. * @see chado_update_record()
  9091. * @see chado_select_record()
  9092. * @see chado_generate_var()
  9093. * @see chado_expan_var()
  9094. *
  9095. * @return
  9096. * An array describing the 'library_feature' table
  9097. *
  9098. * @ingroup tripal_chado_v1.3_schema_api
  9099. *
  9100. */
  9101. function tripal_chado_chado_schema_v1_3_library_feature() {
  9102. $description = array(
  9103. 'description' => '',
  9104. 'table' => 'library_feature',
  9105. 'fields' => array(
  9106. 'library_feature_id' => array(
  9107. 'size' => 'big',
  9108. 'type' => 'serial',
  9109. 'not null' => TRUE,
  9110. ),
  9111. 'library_id' => array(
  9112. 'size' => 'big',
  9113. 'type' => 'int',
  9114. 'not null' => TRUE,
  9115. ),
  9116. 'feature_id' => array(
  9117. 'size' => 'big',
  9118. 'type' => 'int',
  9119. 'not null' => TRUE,
  9120. ),
  9121. ),
  9122. 'unique keys' => array(
  9123. 'library_feature_c1' => array(
  9124. 0 => 'library_id',
  9125. 1 => 'feature_id',
  9126. ),
  9127. ),
  9128. 'indexes' => array(
  9129. 'library_feature_idx1' => array(
  9130. 0 => 'library_id',
  9131. ),
  9132. 'library_feature_idx2' => array(
  9133. 0 => 'feature_id',
  9134. ),
  9135. ),
  9136. 'primary key' => array(
  9137. 0 => 'library_feature_id',
  9138. ),
  9139. 'foreign keys' => array(
  9140. 'library' => array(
  9141. 'table' => 'library',
  9142. 'columns' => array(
  9143. 'library_id' => 'library_id',
  9144. ),
  9145. ),
  9146. 'feature' => array(
  9147. 'table' => 'feature',
  9148. 'columns' => array(
  9149. 'feature_id' => 'feature_id',
  9150. ),
  9151. ),
  9152. ),
  9153. 'referring_tables' => array(
  9154. 0 => 'library_featureprop',
  9155. ),
  9156. );
  9157. return $description;
  9158. }
  9159. /**
  9160. * Implements hook_chado_schema_v1_3_library_featureprop()
  9161. *
  9162. * Purpose: To describe the structure of 'library_featureprop' to tripal
  9163. * @see chado_insert_record()
  9164. * @see chado_update_record()
  9165. * @see chado_select_record()
  9166. * @see chado_generate_var()
  9167. * @see chado_expan_var()
  9168. *
  9169. * @return
  9170. * An array describing the 'library_featureprop' table
  9171. *
  9172. * @ingroup tripal_chado_v1.3_schema_api
  9173. *
  9174. */
  9175. function tripal_chado_chado_schema_v1_3_library_featureprop() {
  9176. $description = array(
  9177. 'description' => '',
  9178. 'table' => 'library_featureprop',
  9179. 'fields' => array(
  9180. 'library_featureprop_id' => array(
  9181. 'size' => 'big',
  9182. 'type' => 'serial',
  9183. 'not null' => TRUE,
  9184. ),
  9185. 'library_feature_id' => array(
  9186. 'size' => 'big',
  9187. 'type' => 'int',
  9188. 'not null' => TRUE,
  9189. ),
  9190. 'type_id' => array(
  9191. 'size' => 'big',
  9192. 'type' => 'int',
  9193. 'not null' => TRUE,
  9194. ),
  9195. 'value' => array(
  9196. 'size' => 'normal',
  9197. 'type' => 'text',
  9198. 'not null' => FALSE,
  9199. ),
  9200. 'rank' => array(
  9201. 'size' => 'normal',
  9202. 'type' => 'int',
  9203. 'not null' => TRUE,
  9204. 'default' => 0,
  9205. ),
  9206. ),
  9207. 'unique keys' => array(
  9208. 'library_featureprop_c1' => array(
  9209. 0 => 'library_feature_id',
  9210. 1 => 'type_id',
  9211. 2 => 'rank',
  9212. ),
  9213. ),
  9214. 'indexes' => array(
  9215. 'library_featureprop_idx1' => array(
  9216. 0 => 'library_feature_id',
  9217. ),
  9218. 'library_featureprop_idx2' => array(
  9219. 0 => 'type_id',
  9220. ),
  9221. ),
  9222. 'primary key' => array(
  9223. 0 => 'library_featureprop_id',
  9224. ),
  9225. 'foreign keys' => array(
  9226. 'library_feature' => array(
  9227. 'table' => 'library_feature',
  9228. 'columns' => array(
  9229. 'library_feature_id' => 'library_feature_id',
  9230. ),
  9231. ),
  9232. 'cvterm' => array(
  9233. 'table' => 'cvterm',
  9234. 'columns' => array(
  9235. 'type_id' => 'cvterm_id',
  9236. ),
  9237. ),
  9238. ),
  9239. 'referring_tables' => array(
  9240. ),
  9241. );
  9242. return $description;
  9243. }
  9244. /**
  9245. * Implements hook_chado_schema_v1_3_libraryprop()
  9246. *
  9247. * Purpose: To describe the structure of 'libraryprop' to tripal
  9248. * @see chado_insert_record()
  9249. * @see chado_update_record()
  9250. * @see chado_select_record()
  9251. * @see chado_generate_var()
  9252. * @see chado_expan_var()
  9253. *
  9254. * @return
  9255. * An array describing the 'libraryprop' table
  9256. *
  9257. * @ingroup tripal_chado_v1.3_schema_api
  9258. *
  9259. */
  9260. function tripal_chado_chado_schema_v1_3_libraryprop() {
  9261. $description = array(
  9262. 'description' => '',
  9263. 'table' => 'libraryprop',
  9264. 'fields' => array(
  9265. 'libraryprop_id' => array(
  9266. 'size' => 'big',
  9267. 'type' => 'serial',
  9268. 'not null' => TRUE,
  9269. ),
  9270. 'library_id' => array(
  9271. 'size' => 'big',
  9272. 'type' => 'int',
  9273. 'not null' => TRUE,
  9274. ),
  9275. 'type_id' => array(
  9276. 'size' => 'big',
  9277. 'type' => 'int',
  9278. 'not null' => TRUE,
  9279. ),
  9280. 'value' => array(
  9281. 'size' => 'normal',
  9282. 'type' => 'text',
  9283. 'not null' => FALSE,
  9284. ),
  9285. 'rank' => array(
  9286. 'size' => 'normal',
  9287. 'type' => 'int',
  9288. 'not null' => TRUE,
  9289. 'default' => 0,
  9290. ),
  9291. ),
  9292. 'unique keys' => array(
  9293. 'libraryprop_c1' => array(
  9294. 0 => 'library_id',
  9295. 1 => 'type_id',
  9296. 2 => 'rank',
  9297. ),
  9298. ),
  9299. 'indexes' => array(
  9300. 'libraryprop_idx1' => array(
  9301. 0 => 'library_id',
  9302. ),
  9303. 'libraryprop_idx2' => array(
  9304. 0 => 'type_id',
  9305. ),
  9306. ),
  9307. 'primary key' => array(
  9308. 0 => 'libraryprop_id',
  9309. ),
  9310. 'foreign keys' => array(
  9311. 'library' => array(
  9312. 'table' => 'library',
  9313. 'columns' => array(
  9314. 'library_id' => 'library_id',
  9315. ),
  9316. ),
  9317. 'cvterm' => array(
  9318. 'table' => 'cvterm',
  9319. 'columns' => array(
  9320. 'type_id' => 'cvterm_id',
  9321. ),
  9322. ),
  9323. ),
  9324. 'referring_tables' => array(
  9325. 0 => 'libraryprop_pub',
  9326. ),
  9327. );
  9328. return $description;
  9329. }
  9330. /**
  9331. * Implements hook_chado_schema_v1_3_libraryprop_pub()
  9332. *
  9333. * Purpose: To describe the structure of 'libraryprop_pub' to tripal
  9334. * @see chado_insert_record()
  9335. * @see chado_update_record()
  9336. * @see chado_select_record()
  9337. * @see chado_generate_var()
  9338. * @see chado_expan_var()
  9339. *
  9340. * @return
  9341. * An array describing the 'libraryprop_pub' table
  9342. *
  9343. * @ingroup tripal_chado_v1.3_schema_api
  9344. *
  9345. */
  9346. function tripal_chado_chado_schema_v1_3_libraryprop_pub() {
  9347. $description = array(
  9348. 'description' => '',
  9349. 'table' => 'libraryprop_pub',
  9350. 'fields' => array(
  9351. 'libraryprop_pub_id' => array(
  9352. 'size' => 'big',
  9353. 'type' => 'serial',
  9354. 'not null' => TRUE,
  9355. ),
  9356. 'libraryprop_id' => array(
  9357. 'size' => 'big',
  9358. 'type' => 'int',
  9359. 'not null' => TRUE,
  9360. ),
  9361. 'pub_id' => array(
  9362. 'size' => 'big',
  9363. 'type' => 'int',
  9364. 'not null' => TRUE,
  9365. ),
  9366. ),
  9367. 'unique keys' => array(
  9368. 'libraryprop_pub_c1' => array(
  9369. 0 => 'libraryprop_id',
  9370. 1 => 'pub_id',
  9371. ),
  9372. ),
  9373. 'indexes' => array(
  9374. 'libraryprop_pub_idx1' => array(
  9375. 0 => 'libraryprop_id',
  9376. ),
  9377. 'libraryprop_pub_idx2' => array(
  9378. 0 => 'pub_id',
  9379. ),
  9380. ),
  9381. 'primary key' => array(
  9382. 0 => 'libraryprop_pub_id',
  9383. ),
  9384. 'foreign keys' => array(
  9385. 'libraryprop' => array(
  9386. 'table' => 'libraryprop',
  9387. 'columns' => array(
  9388. 'libraryprop_id' => 'libraryprop_id',
  9389. ),
  9390. ),
  9391. 'pub' => array(
  9392. 'table' => 'pub',
  9393. 'columns' => array(
  9394. 'pub_id' => 'pub_id',
  9395. ),
  9396. ),
  9397. ),
  9398. 'referring_tables' => array(
  9399. ),
  9400. );
  9401. return $description;
  9402. }
  9403. /**
  9404. * Implements hook_chado_schema_v1_3_library_pub()
  9405. *
  9406. * Purpose: To describe the structure of 'library_pub' to tripal
  9407. * @see chado_insert_record()
  9408. * @see chado_update_record()
  9409. * @see chado_select_record()
  9410. * @see chado_generate_var()
  9411. * @see chado_expan_var()
  9412. *
  9413. * @return
  9414. * An array describing the 'library_pub' table
  9415. *
  9416. * @ingroup tripal_chado_v1.3_schema_api
  9417. *
  9418. */
  9419. function tripal_chado_chado_schema_v1_3_library_pub() {
  9420. $description = array(
  9421. 'description' => '',
  9422. 'table' => 'library_pub',
  9423. 'fields' => array(
  9424. 'library_pub_id' => array(
  9425. 'size' => 'big',
  9426. 'type' => 'serial',
  9427. 'not null' => TRUE,
  9428. ),
  9429. 'library_id' => array(
  9430. 'size' => 'big',
  9431. 'type' => 'int',
  9432. 'not null' => TRUE,
  9433. ),
  9434. 'pub_id' => array(
  9435. 'size' => 'big',
  9436. 'type' => 'int',
  9437. 'not null' => TRUE,
  9438. ),
  9439. ),
  9440. 'unique keys' => array(
  9441. 'library_pub_c1' => array(
  9442. 0 => 'library_id',
  9443. 1 => 'pub_id',
  9444. ),
  9445. ),
  9446. 'indexes' => array(
  9447. 'library_pub_idx1' => array(
  9448. 0 => 'library_id',
  9449. ),
  9450. 'library_pub_idx2' => array(
  9451. 0 => 'pub_id',
  9452. ),
  9453. ),
  9454. 'primary key' => array(
  9455. 0 => 'library_pub_id',
  9456. ),
  9457. 'foreign keys' => array(
  9458. 'library' => array(
  9459. 'table' => 'library',
  9460. 'columns' => array(
  9461. 'library_id' => 'library_id',
  9462. ),
  9463. ),
  9464. 'pub' => array(
  9465. 'table' => 'pub',
  9466. 'columns' => array(
  9467. 'pub_id' => 'pub_id',
  9468. ),
  9469. ),
  9470. ),
  9471. 'referring_tables' => array(
  9472. ),
  9473. );
  9474. return $description;
  9475. }
  9476. /**
  9477. * Implements hook_chado_schema_v1_3_library_relationship()
  9478. *
  9479. * Purpose: To describe the structure of 'library_relationship' to tripal
  9480. * @see chado_insert_record()
  9481. * @see chado_update_record()
  9482. * @see chado_select_record()
  9483. * @see chado_generate_var()
  9484. * @see chado_expan_var()
  9485. *
  9486. * @return
  9487. * An array describing the 'library_relationship' table
  9488. *
  9489. * @ingroup tripal_chado_v1.3_schema_api
  9490. *
  9491. */
  9492. function tripal_chado_chado_schema_v1_3_library_relationship() {
  9493. $description = array(
  9494. 'description' => '',
  9495. 'table' => 'library_relationship',
  9496. 'fields' => array(
  9497. 'library_relationship_id' => array(
  9498. 'size' => 'big',
  9499. 'type' => 'serial',
  9500. 'not null' => TRUE,
  9501. ),
  9502. 'subject_id' => array(
  9503. 'size' => 'big',
  9504. 'type' => 'int',
  9505. 'not null' => TRUE,
  9506. ),
  9507. 'object_id' => array(
  9508. 'size' => 'big',
  9509. 'type' => 'int',
  9510. 'not null' => TRUE,
  9511. ),
  9512. 'type_id' => array(
  9513. 'size' => 'big',
  9514. 'type' => 'int',
  9515. 'not null' => TRUE,
  9516. ),
  9517. ),
  9518. 'unique keys' => array(
  9519. 'library_relationship_c1' => array(
  9520. 0 => 'subject_id',
  9521. 1 => 'object_id',
  9522. 2 => 'type_id',
  9523. ),
  9524. ),
  9525. 'indexes' => array(
  9526. 'library_relationship_idx1' => array(
  9527. 0 => 'subject_id',
  9528. ),
  9529. 'library_relationship_idx2' => array(
  9530. 0 => 'object_id',
  9531. ),
  9532. 'library_relationship_idx3' => array(
  9533. 0 => 'type_id',
  9534. ),
  9535. ),
  9536. 'primary key' => array(
  9537. 0 => 'library_relationship_id',
  9538. ),
  9539. 'foreign keys' => array(
  9540. 'library' => array(
  9541. 'table' => 'library',
  9542. 'columns' => array(
  9543. 'subject_id' => 'library_id',
  9544. 'object_id' => 'library_id',
  9545. ),
  9546. ),
  9547. 'cvterm' => array(
  9548. 'table' => 'cvterm',
  9549. 'columns' => array(
  9550. 'type_id' => 'cvterm_id',
  9551. ),
  9552. ),
  9553. ),
  9554. 'referring_tables' => array(
  9555. 0 => 'library_relationship_pub',
  9556. ),
  9557. );
  9558. return $description;
  9559. }
  9560. /**
  9561. * Implements hook_chado_schema_v1_3_library_relationship_pub()
  9562. *
  9563. * Purpose: To describe the structure of 'library_relationship_pub' to tripal
  9564. * @see chado_insert_record()
  9565. * @see chado_update_record()
  9566. * @see chado_select_record()
  9567. * @see chado_generate_var()
  9568. * @see chado_expan_var()
  9569. *
  9570. * @return
  9571. * An array describing the 'library_relationship_pub' table
  9572. *
  9573. * @ingroup tripal_chado_v1.3_schema_api
  9574. *
  9575. */
  9576. function tripal_chado_chado_schema_v1_3_library_relationship_pub() {
  9577. $description = array(
  9578. 'description' => '',
  9579. 'table' => 'library_relationship_pub',
  9580. 'fields' => array(
  9581. 'library_relationship_pub_id' => array(
  9582. 'size' => 'big',
  9583. 'type' => 'serial',
  9584. 'not null' => TRUE,
  9585. ),
  9586. 'library_relationship_id' => array(
  9587. 'size' => 'big',
  9588. 'type' => 'int',
  9589. 'not null' => TRUE,
  9590. ),
  9591. 'pub_id' => array(
  9592. 'size' => 'big',
  9593. 'type' => 'int',
  9594. 'not null' => TRUE,
  9595. ),
  9596. ),
  9597. 'unique keys' => array(
  9598. 'library_relationship_pub_c1' => array(
  9599. 0 => 'library_relationship_id',
  9600. 1 => 'pub_id',
  9601. ),
  9602. ),
  9603. 'indexes' => array(
  9604. 'library_relationship_pub_idx1' => array(
  9605. 0 => 'library_relationship_id',
  9606. ),
  9607. 'library_relationship_pub_idx2' => array(
  9608. 0 => 'pub_id',
  9609. ),
  9610. ),
  9611. 'primary key' => array(
  9612. 0 => 'library_relationship_pub_id',
  9613. ),
  9614. 'foreign keys' => array(
  9615. 'library_relationship' => array(
  9616. 'table' => 'library_relationship',
  9617. 'columns' => array(
  9618. 'library_relationship_id' => 'library_relationship_id',
  9619. ),
  9620. ),
  9621. 'pub' => array(
  9622. 'table' => 'pub',
  9623. 'columns' => array(
  9624. 'pub_id' => 'pub_id',
  9625. ),
  9626. ),
  9627. ),
  9628. 'referring_tables' => array(
  9629. ),
  9630. );
  9631. return $description;
  9632. }
  9633. /**
  9634. * Implements hook_chado_schema_v1_3_library_synonym()
  9635. *
  9636. * Purpose: To describe the structure of 'library_synonym' to tripal
  9637. * @see chado_insert_record()
  9638. * @see chado_update_record()
  9639. * @see chado_select_record()
  9640. * @see chado_generate_var()
  9641. * @see chado_expan_var()
  9642. *
  9643. * @return
  9644. * An array describing the 'library_synonym' table
  9645. *
  9646. * @ingroup tripal_chado_v1.3_schema_api
  9647. *
  9648. */
  9649. function tripal_chado_chado_schema_v1_3_library_synonym() {
  9650. $description = array(
  9651. 'description' => '',
  9652. 'table' => 'library_synonym',
  9653. 'fields' => array(
  9654. 'library_synonym_id' => array(
  9655. 'size' => 'big',
  9656. 'type' => 'serial',
  9657. 'not null' => TRUE,
  9658. ),
  9659. 'synonym_id' => array(
  9660. 'size' => 'big',
  9661. 'type' => 'int',
  9662. 'not null' => TRUE,
  9663. ),
  9664. 'library_id' => array(
  9665. 'size' => 'big',
  9666. 'type' => 'int',
  9667. 'not null' => TRUE,
  9668. ),
  9669. 'pub_id' => array(
  9670. 'size' => 'big',
  9671. 'type' => 'int',
  9672. 'not null' => TRUE,
  9673. ),
  9674. 'is_current' => array(
  9675. 'size' => 'normal',
  9676. 'type' => 'boolean',
  9677. 'not null' => TRUE,
  9678. 'default' => 'true',
  9679. ),
  9680. 'is_internal' => array(
  9681. 'size' => 'normal',
  9682. 'type' => 'boolean',
  9683. 'not null' => TRUE,
  9684. 'default' => FALSE,
  9685. ),
  9686. ),
  9687. 'unique keys' => array(
  9688. 'library_synonym_c1' => array(
  9689. 0 => 'synonym_id',
  9690. 1 => 'library_id',
  9691. 2 => 'pub_id',
  9692. ),
  9693. ),
  9694. 'indexes' => array(
  9695. 'library_synonym_idx1' => array(
  9696. 0 => 'synonym_id',
  9697. ),
  9698. 'library_synonym_idx2' => array(
  9699. 0 => 'library_id',
  9700. ),
  9701. 'library_synonym_idx3' => array(
  9702. 0 => 'pub_id',
  9703. ),
  9704. ),
  9705. 'primary key' => array(
  9706. 0 => 'library_synonym_id',
  9707. ),
  9708. 'foreign keys' => array(
  9709. 'synonym' => array(
  9710. 'table' => 'synonym',
  9711. 'columns' => array(
  9712. 'synonym_id' => 'synonym_id',
  9713. ),
  9714. ),
  9715. 'library' => array(
  9716. 'table' => 'library',
  9717. 'columns' => array(
  9718. 'library_id' => 'library_id',
  9719. ),
  9720. ),
  9721. 'pub' => array(
  9722. 'table' => 'pub',
  9723. 'columns' => array(
  9724. 'pub_id' => 'pub_id',
  9725. ),
  9726. ),
  9727. ),
  9728. 'referring_tables' => array(
  9729. ),
  9730. );
  9731. return $description;
  9732. }
  9733. /**
  9734. * Implements hook_chado_schema_v1_3_magedocumentation()
  9735. *
  9736. * Purpose: To describe the structure of 'magedocumentation' to tripal
  9737. * @see chado_insert_record()
  9738. * @see chado_update_record()
  9739. * @see chado_select_record()
  9740. * @see chado_generate_var()
  9741. * @see chado_expan_var()
  9742. *
  9743. * @return
  9744. * An array describing the 'magedocumentation' table
  9745. *
  9746. * @ingroup tripal_chado_v1.3_schema_api
  9747. *
  9748. */
  9749. function tripal_chado_chado_schema_v1_3_magedocumentation() {
  9750. $description = array(
  9751. 'description' => '',
  9752. 'table' => 'magedocumentation',
  9753. 'fields' => array(
  9754. 'magedocumentation_id' => array(
  9755. 'size' => 'big',
  9756. 'type' => 'serial',
  9757. 'not null' => TRUE,
  9758. ),
  9759. 'mageml_id' => array(
  9760. 'size' => 'big',
  9761. 'type' => 'int',
  9762. 'not null' => TRUE,
  9763. ),
  9764. 'tableinfo_id' => array(
  9765. 'size' => 'big',
  9766. 'type' => 'int',
  9767. 'not null' => TRUE,
  9768. ),
  9769. 'row_id' => array(
  9770. 'size' => 'normal',
  9771. 'type' => 'int',
  9772. 'not null' => TRUE,
  9773. ),
  9774. 'mageidentifier' => array(
  9775. 'size' => 'normal',
  9776. 'type' => 'text',
  9777. 'not null' => TRUE,
  9778. ),
  9779. ),
  9780. 'indexes' => array(
  9781. 'magedocumentation_idx1' => array(
  9782. 0 => 'mageml_id',
  9783. ),
  9784. 'magedocumentation_idx2' => array(
  9785. 0 => 'tableinfo_id',
  9786. ),
  9787. 'magedocumentation_idx3' => array(
  9788. 0 => 'row_id',
  9789. ),
  9790. ),
  9791. 'primary key' => array(
  9792. 0 => 'magedocumentation_id',
  9793. ),
  9794. 'foreign keys' => array(
  9795. 'mageml' => array(
  9796. 'table' => 'mageml',
  9797. 'columns' => array(
  9798. 'mageml_id' => 'mageml_id',
  9799. ),
  9800. ),
  9801. 'tableinfo' => array(
  9802. 'table' => 'tableinfo',
  9803. 'columns' => array(
  9804. 'tableinfo_id' => 'tableinfo_id',
  9805. ),
  9806. ),
  9807. ),
  9808. 'referring_tables' => array(
  9809. ),
  9810. );
  9811. return $description;
  9812. }
  9813. /**
  9814. * Implements hook_chado_schema_v1_3_mageml()
  9815. *
  9816. * Purpose: To describe the structure of 'mageml' to tripal
  9817. * @see chado_insert_record()
  9818. * @see chado_update_record()
  9819. * @see chado_select_record()
  9820. * @see chado_generate_var()
  9821. * @see chado_expan_var()
  9822. *
  9823. * @return
  9824. * An array describing the 'mageml' table
  9825. *
  9826. * @ingroup tripal_chado_v1.3_schema_api
  9827. *
  9828. */
  9829. function tripal_chado_chado_schema_v1_3_mageml() {
  9830. $description = array(
  9831. 'description' => '',
  9832. 'table' => 'mageml',
  9833. 'fields' => array(
  9834. 'mageml_id' => array(
  9835. 'size' => 'big',
  9836. 'type' => 'serial',
  9837. 'not null' => TRUE,
  9838. ),
  9839. 'mage_package' => array(
  9840. 'size' => 'normal',
  9841. 'type' => 'text',
  9842. 'not null' => TRUE,
  9843. ),
  9844. 'mage_ml' => array(
  9845. 'size' => 'normal',
  9846. 'type' => 'text',
  9847. 'not null' => TRUE,
  9848. ),
  9849. ),
  9850. 'primary key' => array(
  9851. 0 => 'mageml_id',
  9852. ),
  9853. 'foreign keys' => array(
  9854. ),
  9855. 'referring_tables' => array(
  9856. 0 => 'magedocumentation',
  9857. ),
  9858. );
  9859. return $description;
  9860. }
  9861. /**
  9862. * Implements hook_chado_schema_v1_3_materialized_view()
  9863. *
  9864. * Purpose: To describe the structure of 'materialized_view' to tripal
  9865. * @see chado_insert_record()
  9866. * @see chado_update_record()
  9867. * @see chado_select_record()
  9868. * @see chado_generate_var()
  9869. * @see chado_expan_var()
  9870. *
  9871. * @return
  9872. * An array describing the 'materialized_view' table
  9873. *
  9874. * @ingroup tripal_chado_v1.3_schema_api
  9875. *
  9876. */
  9877. function tripal_chado_chado_schema_v1_3_materialized_view() {
  9878. $description = array(
  9879. 'description' => '',
  9880. 'table' => 'materialized_view',
  9881. 'fields' => array(
  9882. 'materialized_view_id' => array(
  9883. 'size' => 'normal',
  9884. 'type' => 'serial',
  9885. 'not null' => TRUE,
  9886. ),
  9887. 'last_update' => array(
  9888. 'size' => 'normal',
  9889. 'type' => 'datetime',
  9890. 'not null' => FALSE,
  9891. ),
  9892. 'refresh_time' => array(
  9893. 'size' => 'normal',
  9894. 'type' => 'int',
  9895. 'not null' => FALSE,
  9896. ),
  9897. 'name' => array(
  9898. 'size' => 'normal',
  9899. 'type' => 'varchar',
  9900. 'length' => '64',
  9901. 'not null' => FALSE,
  9902. ),
  9903. 'mv_schema' => array(
  9904. 'size' => 'normal',
  9905. 'type' => 'varchar',
  9906. 'length' => '64',
  9907. 'not null' => FALSE,
  9908. ),
  9909. 'mv_table' => array(
  9910. 'size' => 'normal',
  9911. 'type' => 'varchar',
  9912. 'length' => '128',
  9913. 'not null' => FALSE,
  9914. ),
  9915. 'mv_specs' => array(
  9916. 'size' => 'normal',
  9917. 'type' => 'text',
  9918. 'not null' => FALSE,
  9919. ),
  9920. 'indexed' => array(
  9921. 'size' => 'normal',
  9922. 'type' => 'text',
  9923. 'not null' => FALSE,
  9924. ),
  9925. 'query' => array(
  9926. 'size' => 'normal',
  9927. 'type' => 'text',
  9928. 'not null' => FALSE,
  9929. ),
  9930. 'special_index' => array(
  9931. 'size' => 'normal',
  9932. 'type' => 'text',
  9933. 'not null' => FALSE,
  9934. ),
  9935. ),
  9936. 'unique keys' => array(
  9937. 'name' => array(
  9938. 0 => 'name',
  9939. ),
  9940. ),
  9941. 'foreign keys' => array(
  9942. ),
  9943. 'referring_tables' => array(
  9944. ),
  9945. );
  9946. return $description;
  9947. }
  9948. /**
  9949. * Implements hook_chado_schema_v1_3_nd_experiment()
  9950. *
  9951. * Purpose: To describe the structure of 'nd_experiment' to tripal
  9952. * @see chado_insert_record()
  9953. * @see chado_update_record()
  9954. * @see chado_select_record()
  9955. * @see chado_generate_var()
  9956. * @see chado_expan_var()
  9957. *
  9958. * @return
  9959. * An array describing the 'nd_experiment' table
  9960. *
  9961. * @ingroup tripal_chado_v1.3_schema_api
  9962. *
  9963. */
  9964. function tripal_chado_chado_schema_v1_3_nd_experiment() {
  9965. $description = array(
  9966. 'description' => '',
  9967. 'table' => 'nd_experiment',
  9968. 'fields' => array(
  9969. 'nd_experiment_id' => array(
  9970. 'size' => 'big',
  9971. 'type' => 'serial',
  9972. 'not null' => TRUE,
  9973. ),
  9974. 'nd_geolocation_id' => array(
  9975. 'size' => 'big',
  9976. 'type' => 'int',
  9977. 'not null' => TRUE,
  9978. ),
  9979. 'type_id' => array(
  9980. 'size' => 'big',
  9981. 'type' => 'int',
  9982. 'not null' => TRUE,
  9983. ),
  9984. ),
  9985. 'indexes' => array(
  9986. 'nd_experiment_idx1' => array(
  9987. 0 => 'nd_geolocation_id',
  9988. ),
  9989. 'nd_experiment_idx2' => array(
  9990. 0 => 'type_id',
  9991. ),
  9992. ),
  9993. 'primary key' => array(
  9994. 0 => 'nd_experiment_id',
  9995. ),
  9996. 'foreign keys' => array(
  9997. 'nd_geolocation' => array(
  9998. 'table' => 'nd_geolocation',
  9999. 'columns' => array(
  10000. 'nd_geolocation_id' => 'nd_geolocation_id',
  10001. ),
  10002. ),
  10003. 'cvterm' => array(
  10004. 'table' => 'cvterm',
  10005. 'columns' => array(
  10006. 'type_id' => 'cvterm_id',
  10007. ),
  10008. ),
  10009. ),
  10010. 'referring_tables' => array(
  10011. 0 => 'nd_experiment_analysis',
  10012. 1 => 'nd_experiment_contact',
  10013. 2 => 'nd_experiment_dbxref',
  10014. 3 => 'nd_experiment_genotype',
  10015. 4 => 'nd_experiment_phenotype',
  10016. 5 => 'nd_experiment_project',
  10017. 6 => 'nd_experimentprop',
  10018. 7 => 'nd_experiment_protocol',
  10019. 8 => 'nd_experiment_pub',
  10020. 9 => 'nd_experiment_stock',
  10021. ),
  10022. );
  10023. return $description;
  10024. }
  10025. /**
  10026. * Implements hook_chado_schema_v1_3_nd_experiment_analysis()
  10027. *
  10028. * Purpose: To describe the structure of 'nd_experiment_analysis' to tripal
  10029. * @see chado_insert_record()
  10030. * @see chado_update_record()
  10031. * @see chado_select_record()
  10032. * @see chado_generate_var()
  10033. * @see chado_expan_var()
  10034. *
  10035. * @return
  10036. * An array describing the 'nd_experiment_analysis' table
  10037. *
  10038. * @ingroup tripal_chado_v1.3_schema_api
  10039. *
  10040. */
  10041. function tripal_chado_chado_schema_v1_3_nd_experiment_analysis() {
  10042. $description = array(
  10043. 'description' => '',
  10044. 'table' => 'nd_experiment_analysis',
  10045. 'fields' => array(
  10046. 'nd_experiment_analysis_id' => array(
  10047. 'size' => 'big',
  10048. 'type' => 'serial',
  10049. 'not null' => TRUE,
  10050. ),
  10051. 'nd_experiment_id' => array(
  10052. 'size' => 'big',
  10053. 'type' => 'int',
  10054. 'not null' => TRUE,
  10055. ),
  10056. 'analysis_id' => array(
  10057. 'size' => 'big',
  10058. 'type' => 'int',
  10059. 'not null' => TRUE,
  10060. ),
  10061. 'type_id' => array(
  10062. 'size' => 'big',
  10063. 'type' => 'int',
  10064. 'not null' => FALSE,
  10065. ),
  10066. ),
  10067. 'indexes' => array(
  10068. 'nd_experiment_analysis_idx1' => array(
  10069. 0 => 'nd_experiment_id',
  10070. ),
  10071. 'nd_experiment_analysis_idx2' => array(
  10072. 0 => 'analysis_id',
  10073. ),
  10074. 'nd_experiment_analysis_idx3' => array(
  10075. 0 => 'type_id',
  10076. ),
  10077. ),
  10078. 'primary key' => array(
  10079. 0 => 'nd_experiment_analysis_id',
  10080. ),
  10081. 'foreign keys' => array(
  10082. 'nd_experiment' => array(
  10083. 'table' => 'nd_experiment',
  10084. 'columns' => array(
  10085. 'nd_experiment_id' => 'nd_experiment_id',
  10086. ),
  10087. ),
  10088. 'analysis' => array(
  10089. 'table' => 'analysis',
  10090. 'columns' => array(
  10091. 'analysis_id' => 'analysis_id',
  10092. ),
  10093. ),
  10094. 'cvterm' => array(
  10095. 'table' => 'cvterm',
  10096. 'columns' => array(
  10097. 'type_id' => 'cvterm_id',
  10098. ),
  10099. ),
  10100. ),
  10101. 'referring_tables' => array(
  10102. ),
  10103. );
  10104. return $description;
  10105. }
  10106. /**
  10107. * Implements hook_chado_schema_v1_3_nd_experiment_contact()
  10108. *
  10109. * Purpose: To describe the structure of 'nd_experiment_contact' to tripal
  10110. * @see chado_insert_record()
  10111. * @see chado_update_record()
  10112. * @see chado_select_record()
  10113. * @see chado_generate_var()
  10114. * @see chado_expan_var()
  10115. *
  10116. * @return
  10117. * An array describing the 'nd_experiment_contact' table
  10118. *
  10119. * @ingroup tripal_chado_v1.3_schema_api
  10120. *
  10121. */
  10122. function tripal_chado_chado_schema_v1_3_nd_experiment_contact() {
  10123. $description = array(
  10124. 'description' => '',
  10125. 'table' => 'nd_experiment_contact',
  10126. 'fields' => array(
  10127. 'nd_experiment_contact_id' => array(
  10128. 'size' => 'big',
  10129. 'type' => 'serial',
  10130. 'not null' => TRUE,
  10131. ),
  10132. 'nd_experiment_id' => array(
  10133. 'size' => 'big',
  10134. 'type' => 'int',
  10135. 'not null' => TRUE,
  10136. ),
  10137. 'contact_id' => array(
  10138. 'size' => 'big',
  10139. 'type' => 'int',
  10140. 'not null' => TRUE,
  10141. ),
  10142. ),
  10143. 'indexes' => array(
  10144. 'nd_experiment_contact_idx1' => array(
  10145. 0 => 'nd_experiment_id',
  10146. ),
  10147. 'nd_experiment_contact_idx2' => array(
  10148. 0 => 'contact_id',
  10149. ),
  10150. ),
  10151. 'primary key' => array(
  10152. 0 => 'nd_experiment_contact_id',
  10153. ),
  10154. 'foreign keys' => array(
  10155. 'nd_experiment' => array(
  10156. 'table' => 'nd_experiment',
  10157. 'columns' => array(
  10158. 'nd_experiment_id' => 'nd_experiment_id',
  10159. ),
  10160. ),
  10161. 'contact' => array(
  10162. 'table' => 'contact',
  10163. 'columns' => array(
  10164. 'contact_id' => 'contact_id',
  10165. ),
  10166. ),
  10167. ),
  10168. 'referring_tables' => array(
  10169. ),
  10170. );
  10171. return $description;
  10172. }
  10173. /**
  10174. * Implements hook_chado_schema_v1_3_nd_experiment_dbxref()
  10175. *
  10176. * Purpose: To describe the structure of 'nd_experiment_dbxref' to tripal
  10177. * @see chado_insert_record()
  10178. * @see chado_update_record()
  10179. * @see chado_select_record()
  10180. * @see chado_generate_var()
  10181. * @see chado_expan_var()
  10182. *
  10183. * @return
  10184. * An array describing the 'nd_experiment_dbxref' table
  10185. *
  10186. * @ingroup tripal_chado_v1.3_schema_api
  10187. *
  10188. */
  10189. function tripal_chado_chado_schema_v1_3_nd_experiment_dbxref() {
  10190. $description = array(
  10191. 'description' => '',
  10192. 'table' => 'nd_experiment_dbxref',
  10193. 'fields' => array(
  10194. 'nd_experiment_dbxref_id' => array(
  10195. 'size' => 'big',
  10196. 'type' => 'serial',
  10197. 'not null' => TRUE,
  10198. ),
  10199. 'nd_experiment_id' => array(
  10200. 'size' => 'big',
  10201. 'type' => 'int',
  10202. 'not null' => TRUE,
  10203. ),
  10204. 'dbxref_id' => array(
  10205. 'size' => 'big',
  10206. 'type' => 'int',
  10207. 'not null' => TRUE,
  10208. ),
  10209. ),
  10210. 'indexes' => array(
  10211. 'nd_experiment_dbxref_idx1' => array(
  10212. 0 => 'nd_experiment_id',
  10213. ),
  10214. 'nd_experiment_dbxref_idx2' => array(
  10215. 0 => 'dbxref_id',
  10216. ),
  10217. ),
  10218. 'primary key' => array(
  10219. 0 => 'nd_experiment_dbxref_id',
  10220. ),
  10221. 'foreign keys' => array(
  10222. 'nd_experiment' => array(
  10223. 'table' => 'nd_experiment',
  10224. 'columns' => array(
  10225. 'nd_experiment_id' => 'nd_experiment_id',
  10226. ),
  10227. ),
  10228. 'dbxref' => array(
  10229. 'table' => 'dbxref',
  10230. 'columns' => array(
  10231. 'dbxref_id' => 'dbxref_id',
  10232. ),
  10233. ),
  10234. ),
  10235. 'referring_tables' => array(
  10236. ),
  10237. );
  10238. return $description;
  10239. }
  10240. /**
  10241. * Implements hook_chado_schema_v1_3_nd_experiment_genotype()
  10242. *
  10243. * Purpose: To describe the structure of 'nd_experiment_genotype' to tripal
  10244. * @see chado_insert_record()
  10245. * @see chado_update_record()
  10246. * @see chado_select_record()
  10247. * @see chado_generate_var()
  10248. * @see chado_expan_var()
  10249. *
  10250. * @return
  10251. * An array describing the 'nd_experiment_genotype' table
  10252. *
  10253. * @ingroup tripal_chado_v1.3_schema_api
  10254. *
  10255. */
  10256. function tripal_chado_chado_schema_v1_3_nd_experiment_genotype() {
  10257. $description = array(
  10258. 'description' => '',
  10259. 'table' => 'nd_experiment_genotype',
  10260. 'fields' => array(
  10261. 'nd_experiment_genotype_id' => array(
  10262. 'size' => 'big',
  10263. 'type' => 'serial',
  10264. 'not null' => TRUE,
  10265. ),
  10266. 'nd_experiment_id' => array(
  10267. 'size' => 'big',
  10268. 'type' => 'int',
  10269. 'not null' => TRUE,
  10270. ),
  10271. 'genotype_id' => array(
  10272. 'size' => 'big',
  10273. 'type' => 'int',
  10274. 'not null' => TRUE,
  10275. ),
  10276. ),
  10277. 'unique keys' => array(
  10278. 'nd_experiment_genotype_c1' => array(
  10279. 0 => 'nd_experiment_id',
  10280. 1 => 'genotype_id',
  10281. ),
  10282. ),
  10283. 'indexes' => array(
  10284. 'nd_experiment_genotype_idx1' => array(
  10285. 0 => 'nd_experiment_id',
  10286. ),
  10287. 'nd_experiment_genotype_idx2' => array(
  10288. 0 => 'genotype_id',
  10289. ),
  10290. ),
  10291. 'primary key' => array(
  10292. 0 => 'nd_experiment_genotype_id',
  10293. ),
  10294. 'foreign keys' => array(
  10295. 'nd_experiment' => array(
  10296. 'table' => 'nd_experiment',
  10297. 'columns' => array(
  10298. 'nd_experiment_id' => 'nd_experiment_id',
  10299. ),
  10300. ),
  10301. 'genotype' => array(
  10302. 'table' => 'genotype',
  10303. 'columns' => array(
  10304. 'genotype_id' => 'genotype_id',
  10305. ),
  10306. ),
  10307. ),
  10308. 'referring_tables' => array(
  10309. ),
  10310. );
  10311. return $description;
  10312. }
  10313. /**
  10314. * Implements hook_chado_schema_v1_3_nd_experiment_phenotype()
  10315. *
  10316. * Purpose: To describe the structure of 'nd_experiment_phenotype' to tripal
  10317. * @see chado_insert_record()
  10318. * @see chado_update_record()
  10319. * @see chado_select_record()
  10320. * @see chado_generate_var()
  10321. * @see chado_expan_var()
  10322. *
  10323. * @return
  10324. * An array describing the 'nd_experiment_phenotype' table
  10325. *
  10326. * @ingroup tripal_chado_v1.3_schema_api
  10327. *
  10328. */
  10329. function tripal_chado_chado_schema_v1_3_nd_experiment_phenotype() {
  10330. $description = array(
  10331. 'description' => '',
  10332. 'table' => 'nd_experiment_phenotype',
  10333. 'fields' => array(
  10334. 'nd_experiment_phenotype_id' => array(
  10335. 'size' => 'big',
  10336. 'type' => 'serial',
  10337. 'not null' => TRUE,
  10338. ),
  10339. 'nd_experiment_id' => array(
  10340. 'size' => 'big',
  10341. 'type' => 'int',
  10342. 'not null' => TRUE,
  10343. ),
  10344. 'phenotype_id' => array(
  10345. 'size' => 'big',
  10346. 'type' => 'int',
  10347. 'not null' => TRUE,
  10348. ),
  10349. ),
  10350. 'unique keys' => array(
  10351. 'nd_experiment_phenotype_c1' => array(
  10352. 0 => 'nd_experiment_id',
  10353. 1 => 'phenotype_id',
  10354. ),
  10355. ),
  10356. 'indexes' => array(
  10357. 'nd_experiment_phenotype_idx1' => array(
  10358. 0 => 'nd_experiment_id',
  10359. ),
  10360. 'nd_experiment_phenotype_idx2' => array(
  10361. 0 => 'phenotype_id',
  10362. ),
  10363. ),
  10364. 'primary key' => array(
  10365. 0 => 'nd_experiment_phenotype_id',
  10366. ),
  10367. 'foreign keys' => array(
  10368. 'nd_experiment' => array(
  10369. 'table' => 'nd_experiment',
  10370. 'columns' => array(
  10371. 'nd_experiment_id' => 'nd_experiment_id',
  10372. ),
  10373. ),
  10374. 'phenotype' => array(
  10375. 'table' => 'phenotype',
  10376. 'columns' => array(
  10377. 'phenotype_id' => 'phenotype_id',
  10378. ),
  10379. ),
  10380. ),
  10381. 'referring_tables' => array(
  10382. ),
  10383. );
  10384. return $description;
  10385. }
  10386. /**
  10387. * Implements hook_chado_schema_v1_3_nd_experiment_project()
  10388. *
  10389. * Purpose: To describe the structure of 'nd_experiment_project' to tripal
  10390. * @see chado_insert_record()
  10391. * @see chado_update_record()
  10392. * @see chado_select_record()
  10393. * @see chado_generate_var()
  10394. * @see chado_expan_var()
  10395. *
  10396. * @return
  10397. * An array describing the 'nd_experiment_project' table
  10398. *
  10399. * @ingroup tripal_chado_v1.3_schema_api
  10400. *
  10401. */
  10402. function tripal_chado_chado_schema_v1_3_nd_experiment_project() {
  10403. $description = array(
  10404. 'description' => '',
  10405. 'table' => 'nd_experiment_project',
  10406. 'fields' => array(
  10407. 'nd_experiment_project_id' => array(
  10408. 'size' => 'big',
  10409. 'type' => 'serial',
  10410. 'not null' => TRUE,
  10411. ),
  10412. 'project_id' => array(
  10413. 'size' => 'big',
  10414. 'type' => 'int',
  10415. 'not null' => TRUE,
  10416. ),
  10417. 'nd_experiment_id' => array(
  10418. 'size' => 'big',
  10419. 'type' => 'int',
  10420. 'not null' => TRUE,
  10421. ),
  10422. ),
  10423. 'unique keys' => array(
  10424. 'nd_experiment_project_c1' => array(
  10425. 0 => 'project_id',
  10426. 1 => 'nd_experiment_id',
  10427. ),
  10428. ),
  10429. 'indexes' => array(
  10430. 'nd_experiment_project_idx1' => array(
  10431. 0 => 'project_id',
  10432. ),
  10433. 'nd_experiment_project_idx2' => array(
  10434. 0 => 'nd_experiment_id',
  10435. ),
  10436. ),
  10437. 'primary key' => array(
  10438. 0 => 'nd_experiment_project_id',
  10439. ),
  10440. 'foreign keys' => array(
  10441. 'project' => array(
  10442. 'table' => 'project',
  10443. 'columns' => array(
  10444. 'project_id' => 'project_id',
  10445. ),
  10446. ),
  10447. 'nd_experiment' => array(
  10448. 'table' => 'nd_experiment',
  10449. 'columns' => array(
  10450. 'nd_experiment_id' => 'nd_experiment_id',
  10451. ),
  10452. ),
  10453. ),
  10454. 'referring_tables' => array(
  10455. ),
  10456. );
  10457. return $description;
  10458. }
  10459. /**
  10460. * Implements hook_chado_schema_v1_3_nd_experimentprop()
  10461. *
  10462. * Purpose: To describe the structure of 'nd_experimentprop' to tripal
  10463. * @see chado_insert_record()
  10464. * @see chado_update_record()
  10465. * @see chado_select_record()
  10466. * @see chado_generate_var()
  10467. * @see chado_expan_var()
  10468. *
  10469. * @return
  10470. * An array describing the 'nd_experimentprop' table
  10471. *
  10472. * @ingroup tripal_chado_v1.3_schema_api
  10473. *
  10474. */
  10475. function tripal_chado_chado_schema_v1_3_nd_experimentprop() {
  10476. $description = array(
  10477. 'description' => '',
  10478. 'table' => 'nd_experimentprop',
  10479. 'fields' => array(
  10480. 'nd_experimentprop_id' => array(
  10481. 'size' => 'big',
  10482. 'type' => 'serial',
  10483. 'not null' => TRUE,
  10484. ),
  10485. 'nd_experiment_id' => array(
  10486. 'size' => 'big',
  10487. 'type' => 'int',
  10488. 'not null' => TRUE,
  10489. ),
  10490. 'type_id' => array(
  10491. 'size' => 'big',
  10492. 'type' => 'int',
  10493. 'not null' => TRUE,
  10494. ),
  10495. 'value' => array(
  10496. 'size' => 'normal',
  10497. 'type' => 'text',
  10498. 'not null' => FALSE,
  10499. ),
  10500. 'rank' => array(
  10501. 'size' => 'normal',
  10502. 'type' => 'int',
  10503. 'not null' => TRUE,
  10504. 'default' => 0,
  10505. ),
  10506. ),
  10507. 'unique keys' => array(
  10508. 'nd_experimentprop_c1' => array(
  10509. 0 => 'nd_experiment_id',
  10510. 1 => 'type_id',
  10511. 2 => 'rank',
  10512. ),
  10513. ),
  10514. 'indexes' => array(
  10515. 'nd_experimentprop_idx1' => array(
  10516. 0 => 'nd_experiment_id',
  10517. ),
  10518. 'nd_experimentprop_idx2' => array(
  10519. 0 => 'type_id',
  10520. ),
  10521. ),
  10522. 'primary key' => array(
  10523. 0 => 'nd_experimentprop_id',
  10524. ),
  10525. 'foreign keys' => array(
  10526. 'nd_experiment' => array(
  10527. 'table' => 'nd_experiment',
  10528. 'columns' => array(
  10529. 'nd_experiment_id' => 'nd_experiment_id',
  10530. ),
  10531. ),
  10532. 'cvterm' => array(
  10533. 'table' => 'cvterm',
  10534. 'columns' => array(
  10535. 'type_id' => 'cvterm_id',
  10536. ),
  10537. ),
  10538. ),
  10539. 'referring_tables' => array(
  10540. ),
  10541. );
  10542. return $description;
  10543. }
  10544. /**
  10545. * Implements hook_chado_schema_v1_3_nd_experiment_protocol()
  10546. *
  10547. * Purpose: To describe the structure of 'nd_experiment_protocol' to tripal
  10548. * @see chado_insert_record()
  10549. * @see chado_update_record()
  10550. * @see chado_select_record()
  10551. * @see chado_generate_var()
  10552. * @see chado_expan_var()
  10553. *
  10554. * @return
  10555. * An array describing the 'nd_experiment_protocol' table
  10556. *
  10557. * @ingroup tripal_chado_v1.3_schema_api
  10558. *
  10559. */
  10560. function tripal_chado_chado_schema_v1_3_nd_experiment_protocol() {
  10561. $description = array(
  10562. 'description' => '',
  10563. 'table' => 'nd_experiment_protocol',
  10564. 'fields' => array(
  10565. 'nd_experiment_protocol_id' => array(
  10566. 'size' => 'big',
  10567. 'type' => 'serial',
  10568. 'not null' => TRUE,
  10569. ),
  10570. 'nd_experiment_id' => array(
  10571. 'size' => 'big',
  10572. 'type' => 'int',
  10573. 'not null' => TRUE,
  10574. ),
  10575. 'nd_protocol_id' => array(
  10576. 'size' => 'big',
  10577. 'type' => 'int',
  10578. 'not null' => TRUE,
  10579. ),
  10580. ),
  10581. 'indexes' => array(
  10582. 'nd_experiment_protocol_idx1' => array(
  10583. 0 => 'nd_experiment_id',
  10584. ),
  10585. 'nd_experiment_protocol_idx2' => array(
  10586. 0 => 'nd_protocol_id',
  10587. ),
  10588. ),
  10589. 'primary key' => array(
  10590. 0 => 'nd_experiment_protocol_id',
  10591. ),
  10592. 'foreign keys' => array(
  10593. 'nd_experiment' => array(
  10594. 'table' => 'nd_experiment',
  10595. 'columns' => array(
  10596. 'nd_experiment_id' => 'nd_experiment_id',
  10597. ),
  10598. ),
  10599. 'nd_protocol' => array(
  10600. 'table' => 'nd_protocol',
  10601. 'columns' => array(
  10602. 'nd_protocol_id' => 'nd_protocol_id',
  10603. ),
  10604. ),
  10605. ),
  10606. 'referring_tables' => array(
  10607. ),
  10608. );
  10609. return $description;
  10610. }
  10611. /**
  10612. * Implements hook_chado_schema_v1_3_nd_experiment_pub()
  10613. *
  10614. * Purpose: To describe the structure of 'nd_experiment_pub' to tripal
  10615. * @see chado_insert_record()
  10616. * @see chado_update_record()
  10617. * @see chado_select_record()
  10618. * @see chado_generate_var()
  10619. * @see chado_expan_var()
  10620. *
  10621. * @return
  10622. * An array describing the 'nd_experiment_pub' table
  10623. *
  10624. * @ingroup tripal_chado_v1.3_schema_api
  10625. *
  10626. */
  10627. function tripal_chado_chado_schema_v1_3_nd_experiment_pub() {
  10628. $description = array(
  10629. 'description' => '',
  10630. 'table' => 'nd_experiment_pub',
  10631. 'fields' => array(
  10632. 'nd_experiment_pub_id' => array(
  10633. 'size' => 'big',
  10634. 'type' => 'serial',
  10635. 'not null' => TRUE,
  10636. ),
  10637. 'nd_experiment_id' => array(
  10638. 'size' => 'big',
  10639. 'type' => 'int',
  10640. 'not null' => TRUE,
  10641. ),
  10642. 'pub_id' => array(
  10643. 'size' => 'big',
  10644. 'type' => 'int',
  10645. 'not null' => TRUE,
  10646. ),
  10647. ),
  10648. 'unique keys' => array(
  10649. 'nd_experiment_pub_c1' => array(
  10650. 0 => 'nd_experiment_id',
  10651. 1 => 'pub_id',
  10652. ),
  10653. ),
  10654. 'indexes' => array(
  10655. 'nd_experiment_pub_idx1' => array(
  10656. 0 => 'nd_experiment_id',
  10657. ),
  10658. 'nd_experiment_pub_idx2' => array(
  10659. 0 => 'pub_id',
  10660. ),
  10661. ),
  10662. 'primary key' => array(
  10663. 0 => 'nd_experiment_pub_id',
  10664. ),
  10665. 'foreign keys' => array(
  10666. 'nd_experiment' => array(
  10667. 'table' => 'nd_experiment',
  10668. 'columns' => array(
  10669. 'nd_experiment_id' => 'nd_experiment_id',
  10670. ),
  10671. ),
  10672. 'pub' => array(
  10673. 'table' => 'pub',
  10674. 'columns' => array(
  10675. 'pub_id' => 'pub_id',
  10676. ),
  10677. ),
  10678. ),
  10679. 'referring_tables' => array(
  10680. ),
  10681. );
  10682. return $description;
  10683. }
  10684. /**
  10685. * Implements hook_chado_schema_v1_3_nd_experiment_stock()
  10686. *
  10687. * Purpose: To describe the structure of 'nd_experiment_stock' to tripal
  10688. * @see chado_insert_record()
  10689. * @see chado_update_record()
  10690. * @see chado_select_record()
  10691. * @see chado_generate_var()
  10692. * @see chado_expan_var()
  10693. *
  10694. * @return
  10695. * An array describing the 'nd_experiment_stock' table
  10696. *
  10697. * @ingroup tripal_chado_v1.3_schema_api
  10698. *
  10699. */
  10700. function tripal_chado_chado_schema_v1_3_nd_experiment_stock() {
  10701. $description = array(
  10702. 'description' => '',
  10703. 'table' => 'nd_experiment_stock',
  10704. 'fields' => array(
  10705. 'nd_experiment_stock_id' => array(
  10706. 'size' => 'big',
  10707. 'type' => 'serial',
  10708. 'not null' => TRUE,
  10709. ),
  10710. 'nd_experiment_id' => array(
  10711. 'size' => 'big',
  10712. 'type' => 'int',
  10713. 'not null' => TRUE,
  10714. ),
  10715. 'stock_id' => array(
  10716. 'size' => 'big',
  10717. 'type' => 'int',
  10718. 'not null' => TRUE,
  10719. ),
  10720. 'type_id' => array(
  10721. 'size' => 'big',
  10722. 'type' => 'int',
  10723. 'not null' => TRUE,
  10724. ),
  10725. ),
  10726. 'indexes' => array(
  10727. 'nd_experiment_stock_idx1' => array(
  10728. 0 => 'nd_experiment_id',
  10729. ),
  10730. 'nd_experiment_stock_idx2' => array(
  10731. 0 => 'stock_id',
  10732. ),
  10733. 'nd_experiment_stock_idx3' => array(
  10734. 0 => 'type_id',
  10735. ),
  10736. ),
  10737. 'primary key' => array(
  10738. 0 => 'nd_experiment_stock_id',
  10739. ),
  10740. 'foreign keys' => array(
  10741. 'nd_experiment' => array(
  10742. 'table' => 'nd_experiment',
  10743. 'columns' => array(
  10744. 'nd_experiment_id' => 'nd_experiment_id',
  10745. ),
  10746. ),
  10747. 'stock' => array(
  10748. 'table' => 'stock',
  10749. 'columns' => array(
  10750. 'stock_id' => 'stock_id',
  10751. ),
  10752. ),
  10753. 'cvterm' => array(
  10754. 'table' => 'cvterm',
  10755. 'columns' => array(
  10756. 'type_id' => 'cvterm_id',
  10757. ),
  10758. ),
  10759. ),
  10760. 'referring_tables' => array(
  10761. 0 => 'nd_experiment_stock_dbxref',
  10762. 1 => 'nd_experiment_stockprop',
  10763. ),
  10764. );
  10765. return $description;
  10766. }
  10767. /**
  10768. * Implements hook_chado_schema_v1_3_nd_experiment_stock_dbxref()
  10769. *
  10770. * Purpose: To describe the structure of 'nd_experiment_stock_dbxref' to tripal
  10771. * @see chado_insert_record()
  10772. * @see chado_update_record()
  10773. * @see chado_select_record()
  10774. * @see chado_generate_var()
  10775. * @see chado_expan_var()
  10776. *
  10777. * @return
  10778. * An array describing the 'nd_experiment_stock_dbxref' table
  10779. *
  10780. * @ingroup tripal_chado_v1.3_schema_api
  10781. *
  10782. */
  10783. function tripal_chado_chado_schema_v1_3_nd_experiment_stock_dbxref() {
  10784. $description = array(
  10785. 'description' => '',
  10786. 'table' => 'nd_experiment_stock_dbxref',
  10787. 'fields' => array(
  10788. 'nd_experiment_stock_dbxref_id' => array(
  10789. 'size' => 'big',
  10790. 'type' => 'serial',
  10791. 'not null' => TRUE,
  10792. ),
  10793. 'nd_experiment_stock_id' => array(
  10794. 'size' => 'big',
  10795. 'type' => 'int',
  10796. 'not null' => TRUE,
  10797. ),
  10798. 'dbxref_id' => array(
  10799. 'size' => 'big',
  10800. 'type' => 'int',
  10801. 'not null' => TRUE,
  10802. ),
  10803. ),
  10804. 'indexes' => array(
  10805. 'nd_experiment_stock_dbxref_idx1' => array(
  10806. 0 => 'nd_experiment_stock_id',
  10807. ),
  10808. 'nd_experiment_stock_dbxref_idx2' => array(
  10809. 0 => 'dbxref_id',
  10810. ),
  10811. ),
  10812. 'primary key' => array(
  10813. 0 => 'nd_experiment_stock_dbxref_id',
  10814. ),
  10815. 'foreign keys' => array(
  10816. 'nd_experiment_stock' => array(
  10817. 'table' => 'nd_experiment_stock',
  10818. 'columns' => array(
  10819. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  10820. ),
  10821. ),
  10822. 'dbxref' => array(
  10823. 'table' => 'dbxref',
  10824. 'columns' => array(
  10825. 'dbxref_id' => 'dbxref_id',
  10826. ),
  10827. ),
  10828. ),
  10829. 'referring_tables' => array(
  10830. ),
  10831. );
  10832. return $description;
  10833. }
  10834. /**
  10835. * Implements hook_chado_schema_v1_3_nd_experiment_stockprop()
  10836. *
  10837. * Purpose: To describe the structure of 'nd_experiment_stockprop' to tripal
  10838. * @see chado_insert_record()
  10839. * @see chado_update_record()
  10840. * @see chado_select_record()
  10841. * @see chado_generate_var()
  10842. * @see chado_expan_var()
  10843. *
  10844. * @return
  10845. * An array describing the 'nd_experiment_stockprop' table
  10846. *
  10847. * @ingroup tripal_chado_v1.3_schema_api
  10848. *
  10849. */
  10850. function tripal_chado_chado_schema_v1_3_nd_experiment_stockprop() {
  10851. $description = array(
  10852. 'description' => '',
  10853. 'table' => 'nd_experiment_stockprop',
  10854. 'fields' => array(
  10855. 'nd_experiment_stockprop_id' => array(
  10856. 'size' => 'big',
  10857. 'type' => 'serial',
  10858. 'not null' => TRUE,
  10859. ),
  10860. 'nd_experiment_stock_id' => array(
  10861. 'size' => 'big',
  10862. 'type' => 'int',
  10863. 'not null' => TRUE,
  10864. ),
  10865. 'type_id' => array(
  10866. 'size' => 'big',
  10867. 'type' => 'int',
  10868. 'not null' => TRUE,
  10869. ),
  10870. 'value' => array(
  10871. 'size' => 'normal',
  10872. 'type' => 'text',
  10873. 'not null' => FALSE,
  10874. ),
  10875. 'rank' => array(
  10876. 'size' => 'normal',
  10877. 'type' => 'int',
  10878. 'not null' => TRUE,
  10879. 'default' => 0,
  10880. ),
  10881. ),
  10882. 'unique keys' => array(
  10883. 'nd_experiment_stockprop_c1' => array(
  10884. 0 => 'nd_experiment_stock_id',
  10885. 1 => 'type_id',
  10886. 2 => 'rank',
  10887. ),
  10888. ),
  10889. 'indexes' => array(
  10890. 'nd_experiment_stockprop_idx1' => array(
  10891. 0 => 'nd_experiment_stock_id',
  10892. ),
  10893. 'nd_experiment_stockprop_idx2' => array(
  10894. 0 => 'type_id',
  10895. ),
  10896. ),
  10897. 'primary key' => array(
  10898. 0 => 'nd_experiment_stockprop_id',
  10899. ),
  10900. 'foreign keys' => array(
  10901. 'nd_experiment_stock' => array(
  10902. 'table' => 'nd_experiment_stock',
  10903. 'columns' => array(
  10904. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  10905. ),
  10906. ),
  10907. 'cvterm' => array(
  10908. 'table' => 'cvterm',
  10909. 'columns' => array(
  10910. 'type_id' => 'cvterm_id',
  10911. ),
  10912. ),
  10913. ),
  10914. 'referring_tables' => array(
  10915. ),
  10916. );
  10917. return $description;
  10918. }
  10919. /**
  10920. * Implements hook_chado_schema_v1_3_nd_geolocation()
  10921. *
  10922. * Purpose: To describe the structure of 'nd_geolocation' to tripal
  10923. * @see chado_insert_record()
  10924. * @see chado_update_record()
  10925. * @see chado_select_record()
  10926. * @see chado_generate_var()
  10927. * @see chado_expan_var()
  10928. *
  10929. * @return
  10930. * An array describing the 'nd_geolocation' table
  10931. *
  10932. * @ingroup tripal_chado_v1.3_schema_api
  10933. *
  10934. */
  10935. function tripal_chado_chado_schema_v1_3_nd_geolocation() {
  10936. $description = array(
  10937. 'description' => '',
  10938. 'table' => 'nd_geolocation',
  10939. 'fields' => array(
  10940. 'nd_geolocation_id' => array(
  10941. 'size' => 'big',
  10942. 'type' => 'serial',
  10943. 'not null' => TRUE,
  10944. ),
  10945. 'description' => array(
  10946. 'size' => 'normal',
  10947. 'type' => 'text',
  10948. 'not null' => FALSE,
  10949. ),
  10950. 'latitude' => array(
  10951. 'size' => 'normal',
  10952. 'type' => 'float',
  10953. 'not null' => FALSE,
  10954. ),
  10955. 'longitude' => array(
  10956. 'size' => 'normal',
  10957. 'type' => 'float',
  10958. 'not null' => FALSE,
  10959. ),
  10960. 'geodetic_datum' => array(
  10961. 'size' => 'normal',
  10962. 'type' => 'varchar',
  10963. 'length' => '32',
  10964. 'not null' => FALSE,
  10965. ),
  10966. 'altitude' => array(
  10967. 'size' => 'normal',
  10968. 'type' => 'float',
  10969. 'not null' => FALSE,
  10970. ),
  10971. ),
  10972. 'indexes' => array(
  10973. 'nd_geolocation_idx1' => array(
  10974. 0 => 'latitude',
  10975. ),
  10976. 'nd_geolocation_idx2' => array(
  10977. 0 => 'longitude',
  10978. ),
  10979. 'nd_geolocation_idx3' => array(
  10980. 0 => 'altitude',
  10981. ),
  10982. ),
  10983. 'primary key' => array(
  10984. 0 => 'nd_geolocation_id',
  10985. ),
  10986. 'foreign keys' => array(
  10987. ),
  10988. 'referring_tables' => array(
  10989. 0 => 'nd_experiment',
  10990. 1 => 'nd_geolocationprop',
  10991. ),
  10992. );
  10993. return $description;
  10994. }
  10995. /**
  10996. * Implements hook_chado_schema_v1_3_nd_geolocationprop()
  10997. *
  10998. * Purpose: To describe the structure of 'nd_geolocationprop' to tripal
  10999. * @see chado_insert_record()
  11000. * @see chado_update_record()
  11001. * @see chado_select_record()
  11002. * @see chado_generate_var()
  11003. * @see chado_expan_var()
  11004. *
  11005. * @return
  11006. * An array describing the 'nd_geolocationprop' table
  11007. *
  11008. * @ingroup tripal_chado_v1.3_schema_api
  11009. *
  11010. */
  11011. function tripal_chado_chado_schema_v1_3_nd_geolocationprop() {
  11012. $description = array(
  11013. 'description' => '',
  11014. 'table' => 'nd_geolocationprop',
  11015. 'fields' => array(
  11016. 'nd_geolocationprop_id' => array(
  11017. 'size' => 'big',
  11018. 'type' => 'serial',
  11019. 'not null' => TRUE,
  11020. ),
  11021. 'nd_geolocation_id' => array(
  11022. 'size' => 'big',
  11023. 'type' => 'int',
  11024. 'not null' => TRUE,
  11025. ),
  11026. 'type_id' => array(
  11027. 'size' => 'big',
  11028. 'type' => 'int',
  11029. 'not null' => TRUE,
  11030. ),
  11031. 'value' => array(
  11032. 'size' => 'normal',
  11033. 'type' => 'text',
  11034. 'not null' => FALSE,
  11035. ),
  11036. 'rank' => array(
  11037. 'size' => 'normal',
  11038. 'type' => 'int',
  11039. 'not null' => TRUE,
  11040. 'default' => 0,
  11041. ),
  11042. ),
  11043. 'unique keys' => array(
  11044. 'nd_geolocationprop_c1' => array(
  11045. 0 => 'nd_geolocation_id',
  11046. 1 => 'type_id',
  11047. 2 => 'rank',
  11048. ),
  11049. ),
  11050. 'indexes' => array(
  11051. 'nd_geolocationprop_idx1' => array(
  11052. 0 => 'nd_geolocation_id',
  11053. ),
  11054. 'nd_geolocationprop_idx2' => array(
  11055. 0 => 'type_id',
  11056. ),
  11057. ),
  11058. 'primary key' => array(
  11059. 0 => 'nd_geolocationprop_id',
  11060. ),
  11061. 'foreign keys' => array(
  11062. 'nd_geolocation' => array(
  11063. 'table' => 'nd_geolocation',
  11064. 'columns' => array(
  11065. 'nd_geolocation_id' => 'nd_geolocation_id',
  11066. ),
  11067. ),
  11068. 'cvterm' => array(
  11069. 'table' => 'cvterm',
  11070. 'columns' => array(
  11071. 'type_id' => 'cvterm_id',
  11072. ),
  11073. ),
  11074. ),
  11075. 'referring_tables' => array(
  11076. ),
  11077. );
  11078. return $description;
  11079. }
  11080. /**
  11081. * Implements hook_chado_schema_v1_3_nd_protocol()
  11082. *
  11083. * Purpose: To describe the structure of 'nd_protocol' to tripal
  11084. * @see chado_insert_record()
  11085. * @see chado_update_record()
  11086. * @see chado_select_record()
  11087. * @see chado_generate_var()
  11088. * @see chado_expan_var()
  11089. *
  11090. * @return
  11091. * An array describing the 'nd_protocol' table
  11092. *
  11093. * @ingroup tripal_chado_v1.3_schema_api
  11094. *
  11095. */
  11096. function tripal_chado_chado_schema_v1_3_nd_protocol() {
  11097. $description = array(
  11098. 'description' => '',
  11099. 'table' => 'nd_protocol',
  11100. 'fields' => array(
  11101. 'nd_protocol_id' => array(
  11102. 'size' => 'big',
  11103. 'type' => 'serial',
  11104. 'not null' => TRUE,
  11105. ),
  11106. 'name' => array(
  11107. 'size' => 'normal',
  11108. 'type' => 'varchar',
  11109. 'length' => '255',
  11110. 'not null' => TRUE,
  11111. ),
  11112. 'type_id' => array(
  11113. 'size' => 'big',
  11114. 'type' => 'int',
  11115. 'not null' => TRUE,
  11116. ),
  11117. ),
  11118. 'indexes' => array(
  11119. 'nd_protocol_idx1' => array(
  11120. 0 => 'type_id',
  11121. ),
  11122. ),
  11123. 'unique keys' => array(
  11124. 'name' => array(
  11125. 0 => 'name',
  11126. ),
  11127. ),
  11128. 'primary key' => array(
  11129. 0 => 'nd_protocol_id',
  11130. ),
  11131. 'foreign keys' => array(
  11132. 'cvterm' => array(
  11133. 'table' => 'cvterm',
  11134. 'columns' => array(
  11135. 'type_id' => 'cvterm_id',
  11136. ),
  11137. ),
  11138. ),
  11139. 'referring_tables' => array(
  11140. 0 => 'nd_experiment_protocol',
  11141. 1 => 'nd_protocolprop',
  11142. 2 => 'nd_protocol_reagent',
  11143. ),
  11144. );
  11145. return $description;
  11146. }
  11147. /**
  11148. * Implements hook_chado_schema_v1_3_nd_protocolprop()
  11149. *
  11150. * Purpose: To describe the structure of 'nd_protocolprop' to tripal
  11151. * @see chado_insert_record()
  11152. * @see chado_update_record()
  11153. * @see chado_select_record()
  11154. * @see chado_generate_var()
  11155. * @see chado_expan_var()
  11156. *
  11157. * @return
  11158. * An array describing the 'nd_protocolprop' table
  11159. *
  11160. * @ingroup tripal_chado_v1.3_schema_api
  11161. *
  11162. */
  11163. function tripal_chado_chado_schema_v1_3_nd_protocolprop() {
  11164. $description = array(
  11165. 'description' => '',
  11166. 'table' => 'nd_protocolprop',
  11167. 'fields' => array(
  11168. 'nd_protocolprop_id' => array(
  11169. 'size' => 'big',
  11170. 'type' => 'serial',
  11171. 'not null' => TRUE,
  11172. ),
  11173. 'nd_protocol_id' => array(
  11174. 'size' => 'big',
  11175. 'type' => 'int',
  11176. 'not null' => TRUE,
  11177. ),
  11178. 'type_id' => array(
  11179. 'size' => 'big',
  11180. 'type' => 'int',
  11181. 'not null' => TRUE,
  11182. ),
  11183. 'value' => array(
  11184. 'size' => 'normal',
  11185. 'type' => 'text',
  11186. 'not null' => FALSE,
  11187. ),
  11188. 'rank' => array(
  11189. 'size' => 'normal',
  11190. 'type' => 'int',
  11191. 'not null' => TRUE,
  11192. 'default' => 0,
  11193. ),
  11194. ),
  11195. 'unique keys' => array(
  11196. 'nd_protocolprop_c1' => array(
  11197. 0 => 'nd_protocol_id',
  11198. 1 => 'type_id',
  11199. 2 => 'rank',
  11200. ),
  11201. ),
  11202. 'indexes' => array(
  11203. 'nd_protocolprop_idx1' => array(
  11204. 0 => 'nd_protocol_id',
  11205. ),
  11206. 'nd_protocolprop_idx2' => array(
  11207. 0 => 'type_id',
  11208. ),
  11209. ),
  11210. 'primary key' => array(
  11211. 0 => 'nd_protocolprop_id',
  11212. ),
  11213. 'foreign keys' => array(
  11214. 'nd_protocol' => array(
  11215. 'table' => 'nd_protocol',
  11216. 'columns' => array(
  11217. 'nd_protocol_id' => 'nd_protocol_id',
  11218. ),
  11219. ),
  11220. 'cvterm' => array(
  11221. 'table' => 'cvterm',
  11222. 'columns' => array(
  11223. 'type_id' => 'cvterm_id',
  11224. ),
  11225. ),
  11226. ),
  11227. 'referring_tables' => array(
  11228. ),
  11229. );
  11230. return $description;
  11231. }
  11232. /**
  11233. * Implements hook_chado_schema_v1_3_nd_protocol_reagent()
  11234. *
  11235. * Purpose: To describe the structure of 'nd_protocol_reagent' to tripal
  11236. * @see chado_insert_record()
  11237. * @see chado_update_record()
  11238. * @see chado_select_record()
  11239. * @see chado_generate_var()
  11240. * @see chado_expan_var()
  11241. *
  11242. * @return
  11243. * An array describing the 'nd_protocol_reagent' table
  11244. *
  11245. * @ingroup tripal_chado_v1.3_schema_api
  11246. *
  11247. */
  11248. function tripal_chado_chado_schema_v1_3_nd_protocol_reagent() {
  11249. $description = array(
  11250. 'description' => '',
  11251. 'table' => 'nd_protocol_reagent',
  11252. 'fields' => array(
  11253. 'nd_protocol_reagent_id' => array(
  11254. 'size' => 'big',
  11255. 'type' => 'serial',
  11256. 'not null' => TRUE,
  11257. ),
  11258. 'nd_protocol_id' => array(
  11259. 'size' => 'big',
  11260. 'type' => 'int',
  11261. 'not null' => TRUE,
  11262. ),
  11263. 'reagent_id' => array(
  11264. 'size' => 'big',
  11265. 'type' => 'int',
  11266. 'not null' => TRUE,
  11267. ),
  11268. 'type_id' => array(
  11269. 'size' => 'big',
  11270. 'type' => 'int',
  11271. 'not null' => TRUE,
  11272. ),
  11273. ),
  11274. 'indexes' => array(
  11275. 'nd_protocol_reagent_idx1' => array(
  11276. 0 => 'nd_protocol_id',
  11277. ),
  11278. 'nd_protocol_reagent_idx2' => array(
  11279. 0 => 'reagent_id',
  11280. ),
  11281. 'nd_protocol_reagent_idx3' => array(
  11282. 0 => 'type_id',
  11283. ),
  11284. ),
  11285. 'primary key' => array(
  11286. 0 => 'nd_protocol_reagent_id',
  11287. ),
  11288. 'foreign keys' => array(
  11289. 'nd_protocol' => array(
  11290. 'table' => 'nd_protocol',
  11291. 'columns' => array(
  11292. 'nd_protocol_id' => 'nd_protocol_id',
  11293. ),
  11294. ),
  11295. 'nd_reagent' => array(
  11296. 'table' => 'nd_reagent',
  11297. 'columns' => array(
  11298. 'reagent_id' => 'nd_reagent_id',
  11299. ),
  11300. ),
  11301. 'cvterm' => array(
  11302. 'table' => 'cvterm',
  11303. 'columns' => array(
  11304. 'type_id' => 'cvterm_id',
  11305. ),
  11306. ),
  11307. ),
  11308. 'referring_tables' => array(
  11309. ),
  11310. );
  11311. return $description;
  11312. }
  11313. /**
  11314. * Implements hook_chado_schema_v1_3_nd_reagent()
  11315. *
  11316. * Purpose: To describe the structure of 'nd_reagent' to tripal
  11317. * @see chado_insert_record()
  11318. * @see chado_update_record()
  11319. * @see chado_select_record()
  11320. * @see chado_generate_var()
  11321. * @see chado_expan_var()
  11322. *
  11323. * @return
  11324. * An array describing the 'nd_reagent' table
  11325. *
  11326. * @ingroup tripal_chado_v1.3_schema_api
  11327. *
  11328. */
  11329. function tripal_chado_chado_schema_v1_3_nd_reagent() {
  11330. $description = array(
  11331. 'description' => '',
  11332. 'table' => 'nd_reagent',
  11333. 'fields' => array(
  11334. 'nd_reagent_id' => array(
  11335. 'size' => 'big',
  11336. 'type' => 'serial',
  11337. 'not null' => TRUE,
  11338. ),
  11339. 'name' => array(
  11340. 'size' => 'normal',
  11341. 'type' => 'varchar',
  11342. 'length' => '80',
  11343. 'not null' => TRUE,
  11344. ),
  11345. 'type_id' => array(
  11346. 'size' => 'big',
  11347. 'type' => 'int',
  11348. 'not null' => TRUE,
  11349. ),
  11350. 'feature_id' => array(
  11351. 'size' => 'big',
  11352. 'type' => 'int',
  11353. 'not null' => FALSE,
  11354. ),
  11355. ),
  11356. 'indexes' => array(
  11357. 'nd_reagent_idx1' => array(
  11358. 0 => 'type_id',
  11359. ),
  11360. 'nd_reagent_idx2' => array(
  11361. 0 => 'feature_id',
  11362. ),
  11363. ),
  11364. 'primary key' => array(
  11365. 0 => 'nd_reagent_id',
  11366. ),
  11367. 'foreign keys' => array(
  11368. 'cvterm' => array(
  11369. 'table' => 'cvterm',
  11370. 'columns' => array(
  11371. 'type_id' => 'cvterm_id',
  11372. ),
  11373. ),
  11374. 'feature' => array(
  11375. 'table' => 'feature',
  11376. 'columns' => array(
  11377. 'feature_id' => 'feature_id',
  11378. ),
  11379. ),
  11380. ),
  11381. 'referring_tables' => array(
  11382. 0 => 'nd_protocol_reagent',
  11383. 1 => 'nd_reagentprop',
  11384. 2 => 'nd_reagent_relationship',
  11385. ),
  11386. );
  11387. return $description;
  11388. }
  11389. /**
  11390. * Implements hook_chado_schema_v1_3_nd_reagentprop()
  11391. *
  11392. * Purpose: To describe the structure of 'nd_reagentprop' to tripal
  11393. * @see chado_insert_record()
  11394. * @see chado_update_record()
  11395. * @see chado_select_record()
  11396. * @see chado_generate_var()
  11397. * @see chado_expan_var()
  11398. *
  11399. * @return
  11400. * An array describing the 'nd_reagentprop' table
  11401. *
  11402. * @ingroup tripal_chado_v1.3_schema_api
  11403. *
  11404. */
  11405. function tripal_chado_chado_schema_v1_3_nd_reagentprop() {
  11406. $description = array(
  11407. 'description' => '',
  11408. 'table' => 'nd_reagentprop',
  11409. 'fields' => array(
  11410. 'nd_reagentprop_id' => array(
  11411. 'size' => 'big',
  11412. 'type' => 'serial',
  11413. 'not null' => TRUE,
  11414. ),
  11415. 'nd_reagent_id' => array(
  11416. 'size' => 'big',
  11417. 'type' => 'int',
  11418. 'not null' => TRUE,
  11419. ),
  11420. 'type_id' => array(
  11421. 'size' => 'big',
  11422. 'type' => 'int',
  11423. 'not null' => TRUE,
  11424. ),
  11425. 'value' => array(
  11426. 'size' => 'normal',
  11427. 'type' => 'text',
  11428. 'not null' => FALSE,
  11429. ),
  11430. 'rank' => array(
  11431. 'size' => 'normal',
  11432. 'type' => 'int',
  11433. 'not null' => TRUE,
  11434. 'default' => 0,
  11435. ),
  11436. ),
  11437. 'unique keys' => array(
  11438. 'nd_reagentprop_c1' => array(
  11439. 0 => 'nd_reagent_id',
  11440. 1 => 'type_id',
  11441. 2 => 'rank',
  11442. ),
  11443. ),
  11444. 'indexes' => array(
  11445. 'nd_reagentprop_idx1' => array(
  11446. 0 => 'nd_reagent_id',
  11447. ),
  11448. 'nd_reagentprop_idx2' => array(
  11449. 0 => 'type_id',
  11450. ),
  11451. ),
  11452. 'primary key' => array(
  11453. 0 => 'nd_reagentprop_id',
  11454. ),
  11455. 'foreign keys' => array(
  11456. 'nd_reagent' => array(
  11457. 'table' => 'nd_reagent',
  11458. 'columns' => array(
  11459. 'nd_reagent_id' => 'nd_reagent_id',
  11460. ),
  11461. ),
  11462. 'cvterm' => array(
  11463. 'table' => 'cvterm',
  11464. 'columns' => array(
  11465. 'type_id' => 'cvterm_id',
  11466. ),
  11467. ),
  11468. ),
  11469. 'referring_tables' => array(
  11470. ),
  11471. );
  11472. return $description;
  11473. }
  11474. /**
  11475. * Implements hook_chado_schema_v1_3_nd_reagent_relationship()
  11476. *
  11477. * Purpose: To describe the structure of 'nd_reagent_relationship' to tripal
  11478. * @see chado_insert_record()
  11479. * @see chado_update_record()
  11480. * @see chado_select_record()
  11481. * @see chado_generate_var()
  11482. * @see chado_expan_var()
  11483. *
  11484. * @return
  11485. * An array describing the 'nd_reagent_relationship' table
  11486. *
  11487. * @ingroup tripal_chado_v1.3_schema_api
  11488. *
  11489. */
  11490. function tripal_chado_chado_schema_v1_3_nd_reagent_relationship() {
  11491. $description = array(
  11492. 'description' => '',
  11493. 'table' => 'nd_reagent_relationship',
  11494. 'fields' => array(
  11495. 'nd_reagent_relationship_id' => array(
  11496. 'size' => 'big',
  11497. 'type' => 'serial',
  11498. 'not null' => TRUE,
  11499. ),
  11500. 'subject_reagent_id' => array(
  11501. 'size' => 'big',
  11502. 'type' => 'int',
  11503. 'not null' => TRUE,
  11504. ),
  11505. 'object_reagent_id' => array(
  11506. 'size' => 'big',
  11507. 'type' => 'int',
  11508. 'not null' => TRUE,
  11509. ),
  11510. 'type_id' => array(
  11511. 'size' => 'big',
  11512. 'type' => 'int',
  11513. 'not null' => TRUE,
  11514. ),
  11515. ),
  11516. 'indexes' => array(
  11517. 'nd_reagent_relationship_idx1' => array(
  11518. 0 => 'subject_reagent_id',
  11519. ),
  11520. 'nd_reagent_relationship_idx2' => array(
  11521. 0 => 'object_reagent_id',
  11522. ),
  11523. 'nd_reagent_relationship_idx3' => array(
  11524. 0 => 'type_id',
  11525. ),
  11526. ),
  11527. 'primary key' => array(
  11528. 0 => 'nd_reagent_relationship_id',
  11529. ),
  11530. 'foreign keys' => array(
  11531. 'nd_reagent' => array(
  11532. 'table' => 'nd_reagent',
  11533. 'columns' => array(
  11534. 'subject_reagent_id' => 'nd_reagent_id',
  11535. 'object_reagent_id' => 'nd_reagent_id',
  11536. ),
  11537. ),
  11538. 'cvterm' => array(
  11539. 'table' => 'cvterm',
  11540. 'columns' => array(
  11541. 'type_id' => 'cvterm_id',
  11542. ),
  11543. ),
  11544. ),
  11545. 'referring_tables' => array(
  11546. ),
  11547. );
  11548. return $description;
  11549. }
  11550. /**
  11551. * Implements hook_chado_schema_v1_3_organism()
  11552. *
  11553. * Purpose: To describe the structure of 'organism' to tripal
  11554. * @see chado_insert_record()
  11555. * @see chado_update_record()
  11556. * @see chado_select_record()
  11557. * @see chado_generate_var()
  11558. * @see chado_expan_var()
  11559. *
  11560. * @return
  11561. * An array describing the 'organism' table
  11562. *
  11563. * @ingroup tripal_chado_v1.3_schema_api
  11564. *
  11565. */
  11566. function tripal_chado_chado_schema_v1_3_organism() {
  11567. $description = array(
  11568. 'description' => '',
  11569. 'table' => 'organism',
  11570. 'fields' => array(
  11571. 'organism_id' => array(
  11572. 'size' => 'big',
  11573. 'type' => 'serial',
  11574. 'not null' => TRUE,
  11575. ),
  11576. 'abbreviation' => array(
  11577. 'size' => 'normal',
  11578. 'type' => 'varchar',
  11579. 'length' => '255',
  11580. 'not null' => FALSE,
  11581. ),
  11582. 'genus' => array(
  11583. 'size' => 'normal',
  11584. 'type' => 'varchar',
  11585. 'length' => '255',
  11586. 'not null' => TRUE,
  11587. ),
  11588. 'species' => array(
  11589. 'size' => 'normal',
  11590. 'type' => 'varchar',
  11591. 'length' => '255',
  11592. 'not null' => TRUE,
  11593. ),
  11594. 'common_name' => array(
  11595. 'size' => 'normal',
  11596. 'type' => 'varchar',
  11597. 'length' => '255',
  11598. 'not null' => FALSE,
  11599. ),
  11600. 'infraspecific_name' => array(
  11601. 'size' => 'normal',
  11602. 'type' => 'varchar',
  11603. 'length' => '1024',
  11604. 'not null' => FALSE,
  11605. ),
  11606. 'type_id' => array(
  11607. 'size' => 'big',
  11608. 'type' => 'int',
  11609. 'not null' => FALSE,
  11610. ),
  11611. 'comment' => array(
  11612. 'size' => 'normal',
  11613. 'type' => 'text',
  11614. 'not null' => FALSE,
  11615. ),
  11616. ),
  11617. 'unique keys' => array(
  11618. 'organism_c1' => array(
  11619. 0 => 'genus',
  11620. 1 => 'species',
  11621. 2 => 'type_id',
  11622. 3 => 'infraspecific_name',
  11623. ),
  11624. ),
  11625. 'primary key' => array(
  11626. 0 => 'organism_id',
  11627. ),
  11628. 'foreign keys' => array(
  11629. 'cvterm' => array(
  11630. 'table' => 'cvterm',
  11631. 'columns' => array(
  11632. 'type_id' => 'cvterm_id',
  11633. ),
  11634. ),
  11635. ),
  11636. 'referring_tables' => array(
  11637. 0 => 'analysis_organism',
  11638. 1 => 'biomaterial',
  11639. 2 => 'cell_line',
  11640. 3 => 'feature',
  11641. 4 => 'featuremap_organism',
  11642. 5 => 'library',
  11643. 6 => 'organism_cvterm',
  11644. 7 => 'organism_dbxref',
  11645. 8 => 'organismprop',
  11646. 9 => 'organism_pub',
  11647. 10 => 'organism_relationship',
  11648. 12 => 'phenotype_comparison',
  11649. 13 => 'phylonode_organism',
  11650. 14 => 'stock',
  11651. ),
  11652. );
  11653. return $description;
  11654. }
  11655. /**
  11656. * Implements hook_chado_schema_v1_3_organism_cvterm()
  11657. *
  11658. * Purpose: To describe the structure of 'organism_cvterm' to tripal
  11659. * @see chado_insert_record()
  11660. * @see chado_update_record()
  11661. * @see chado_select_record()
  11662. * @see chado_generate_var()
  11663. * @see chado_expan_var()
  11664. *
  11665. * @return
  11666. * An array describing the 'organism_cvterm' table
  11667. *
  11668. * @ingroup tripal_chado_v1.3_schema_api
  11669. *
  11670. */
  11671. function tripal_chado_chado_schema_v1_3_organism_cvterm() {
  11672. $description = array(
  11673. 'description' => '',
  11674. 'table' => 'organism_cvterm',
  11675. 'fields' => array(
  11676. 'organism_cvterm_id' => array(
  11677. 'size' => 'big',
  11678. 'type' => 'serial',
  11679. 'not null' => TRUE,
  11680. ),
  11681. 'organism_id' => array(
  11682. 'size' => 'big',
  11683. 'type' => 'int',
  11684. 'not null' => TRUE,
  11685. ),
  11686. 'cvterm_id' => array(
  11687. 'size' => 'big',
  11688. 'type' => 'int',
  11689. 'not null' => TRUE,
  11690. ),
  11691. 'rank' => array(
  11692. 'size' => 'normal',
  11693. 'type' => 'int',
  11694. 'not null' => TRUE,
  11695. 'default' => 0,
  11696. ),
  11697. 'pub_id' => array(
  11698. 'size' => 'big',
  11699. 'type' => 'int',
  11700. 'not null' => TRUE,
  11701. ),
  11702. ),
  11703. 'unique keys' => array(
  11704. 'organism_cvterm_c1' => array(
  11705. 0 => 'organism_id',
  11706. 1 => 'cvterm_id',
  11707. 2 => 'pub_id',
  11708. ),
  11709. ),
  11710. 'indexes' => array(
  11711. 'organism_cvterm_idx1' => array(
  11712. 0 => 'organism_id',
  11713. ),
  11714. 'organism_cvterm_idx2' => array(
  11715. 0 => 'cvterm_id',
  11716. ),
  11717. ),
  11718. 'primary key' => array(
  11719. 0 => 'organism_cvterm_id',
  11720. ),
  11721. 'foreign keys' => array(
  11722. 'organism' => array(
  11723. 'table' => 'organism',
  11724. 'columns' => array(
  11725. 'organism_id' => 'organism_id',
  11726. ),
  11727. ),
  11728. 'cvterm' => array(
  11729. 'table' => 'cvterm',
  11730. 'columns' => array(
  11731. 'cvterm_id' => 'cvterm_id',
  11732. ),
  11733. ),
  11734. 'pub' => array(
  11735. 'table' => 'pub',
  11736. 'columns' => array(
  11737. 'pub_id' => 'pub_id',
  11738. ),
  11739. ),
  11740. ),
  11741. 'referring_tables' => array(
  11742. 0 => 'organism_cvtermprop',
  11743. ),
  11744. );
  11745. return $description;
  11746. }
  11747. /**
  11748. * Implements hook_chado_schema_v1_3_organism_cvtermprop()
  11749. *
  11750. * Purpose: To describe the structure of 'organism_cvtermprop' to tripal
  11751. * @see chado_insert_record()
  11752. * @see chado_update_record()
  11753. * @see chado_select_record()
  11754. * @see chado_generate_var()
  11755. * @see chado_expan_var()
  11756. *
  11757. * @return
  11758. * An array describing the 'organism_cvtermprop' table
  11759. *
  11760. * @ingroup tripal_chado_v1.3_schema_api
  11761. *
  11762. */
  11763. function tripal_chado_chado_schema_v1_3_organism_cvtermprop() {
  11764. $description = array(
  11765. 'description' => '',
  11766. 'table' => 'organism_cvtermprop',
  11767. 'fields' => array(
  11768. 'organism_cvtermprop_id' => array(
  11769. 'size' => 'big',
  11770. 'type' => 'serial',
  11771. 'not null' => TRUE,
  11772. ),
  11773. 'organism_cvterm_id' => array(
  11774. 'size' => 'big',
  11775. 'type' => 'int',
  11776. 'not null' => TRUE,
  11777. ),
  11778. 'type_id' => array(
  11779. 'size' => 'big',
  11780. 'type' => 'int',
  11781. 'not null' => TRUE,
  11782. ),
  11783. 'value' => array(
  11784. 'size' => 'normal',
  11785. 'type' => 'text',
  11786. 'not null' => FALSE,
  11787. ),
  11788. 'rank' => array(
  11789. 'size' => 'normal',
  11790. 'type' => 'int',
  11791. 'not null' => TRUE,
  11792. 'default' => 0,
  11793. ),
  11794. ),
  11795. 'unique keys' => array(
  11796. 'organism_cvtermprop_c1' => array(
  11797. 0 => 'organism_cvterm_id',
  11798. 1 => 'type_id',
  11799. 2 => 'rank',
  11800. ),
  11801. ),
  11802. 'indexes' => array(
  11803. 'organism_cvtermprop_idx1' => array(
  11804. 0 => 'organism_cvterm_id',
  11805. ),
  11806. 'organism_cvtermprop_idx2' => array(
  11807. 0 => 'type_id',
  11808. ),
  11809. ),
  11810. 'primary key' => array(
  11811. 0 => 'organism_cvtermprop_id',
  11812. ),
  11813. 'foreign keys' => array(
  11814. 'organism_cvterm' => array(
  11815. 'table' => 'organism_cvterm',
  11816. 'columns' => array(
  11817. 'organism_cvterm_id' => 'organism_cvterm_id',
  11818. ),
  11819. ),
  11820. 'cvterm' => array(
  11821. 'table' => 'cvterm',
  11822. 'columns' => array(
  11823. 'type_id' => 'cvterm_id',
  11824. ),
  11825. ),
  11826. ),
  11827. 'referring_tables' => array(
  11828. ),
  11829. );
  11830. return $description;
  11831. }
  11832. /**
  11833. * Implements hook_chado_schema_v1_3_organism_dbxref()
  11834. *
  11835. * Purpose: To describe the structure of 'organism_dbxref' to tripal
  11836. * @see chado_insert_record()
  11837. * @see chado_update_record()
  11838. * @see chado_select_record()
  11839. * @see chado_generate_var()
  11840. * @see chado_expan_var()
  11841. *
  11842. * @return
  11843. * An array describing the 'organism_dbxref' table
  11844. *
  11845. * @ingroup tripal_chado_v1.3_schema_api
  11846. *
  11847. */
  11848. function tripal_chado_chado_schema_v1_3_organism_dbxref() {
  11849. $description = array(
  11850. 'description' => '',
  11851. 'table' => 'organism_dbxref',
  11852. 'fields' => array(
  11853. 'organism_dbxref_id' => array(
  11854. 'size' => 'big',
  11855. 'type' => 'serial',
  11856. 'not null' => TRUE,
  11857. ),
  11858. 'organism_id' => array(
  11859. 'size' => 'big',
  11860. 'type' => 'int',
  11861. 'not null' => TRUE,
  11862. ),
  11863. 'dbxref_id' => array(
  11864. 'size' => 'big',
  11865. 'type' => 'int',
  11866. 'not null' => TRUE,
  11867. ),
  11868. ),
  11869. 'unique keys' => array(
  11870. 'organism_dbxref_c1' => array(
  11871. 0 => 'organism_id',
  11872. 1 => 'dbxref_id',
  11873. ),
  11874. ),
  11875. 'indexes' => array(
  11876. 'organism_dbxref_idx1' => array(
  11877. 0 => 'organism_id',
  11878. ),
  11879. 'organism_dbxref_idx2' => array(
  11880. 0 => 'dbxref_id',
  11881. ),
  11882. ),
  11883. 'primary key' => array(
  11884. 0 => 'organism_dbxref_id',
  11885. ),
  11886. 'foreign keys' => array(
  11887. 'organism' => array(
  11888. 'table' => 'organism',
  11889. 'columns' => array(
  11890. 'organism_id' => 'organism_id',
  11891. ),
  11892. ),
  11893. 'dbxref' => array(
  11894. 'table' => 'dbxref',
  11895. 'columns' => array(
  11896. 'dbxref_id' => 'dbxref_id',
  11897. ),
  11898. ),
  11899. ),
  11900. 'referring_tables' => array(
  11901. ),
  11902. );
  11903. return $description;
  11904. }
  11905. /**
  11906. * Implements hook_chado_schema_v1_3_organism_feature_count()
  11907. *
  11908. * Purpose: To describe the structure of 'organism_feature_count' to tripal
  11909. * @see chado_insert_record()
  11910. * @see chado_update_record()
  11911. * @see chado_select_record()
  11912. * @see chado_generate_var()
  11913. * @see chado_expan_var()
  11914. *
  11915. * @return
  11916. * An array describing the 'organism_feature_count' table
  11917. *
  11918. * @ingroup tripal_chado_v1.3_schema_api
  11919. *
  11920. */
  11921. function tripal_chado_chado_schema_v1_3_organism_feature_count() {
  11922. $description = array(
  11923. 'description' => '',
  11924. 'table' => 'organism_feature_count',
  11925. 'fields' => array(
  11926. 'organism_id' => array(
  11927. 'size' => 'normal',
  11928. 'type' => 'int',
  11929. 'not null' => TRUE,
  11930. ),
  11931. 'genus' => array(
  11932. 'size' => 'normal',
  11933. 'type' => 'varchar',
  11934. 'length' => '255',
  11935. 'not null' => TRUE,
  11936. ),
  11937. 'species' => array(
  11938. 'size' => 'normal',
  11939. 'type' => 'varchar',
  11940. 'length' => '255',
  11941. 'not null' => TRUE,
  11942. ),
  11943. 'common_name' => array(
  11944. 'size' => 'normal',
  11945. 'type' => 'varchar',
  11946. 'length' => '255',
  11947. 'not null' => FALSE,
  11948. ),
  11949. 'num_features' => array(
  11950. 'size' => 'normal',
  11951. 'type' => 'int',
  11952. 'not null' => TRUE,
  11953. ),
  11954. 'cvterm_id' => array(
  11955. 'size' => 'normal',
  11956. 'type' => 'int',
  11957. 'not null' => TRUE,
  11958. ),
  11959. 'feature_type' => array(
  11960. 'size' => 'normal',
  11961. 'type' => 'varchar',
  11962. 'length' => '255',
  11963. 'not null' => TRUE,
  11964. ),
  11965. ),
  11966. 'indexes' => array(
  11967. 'organism_feature_count_idx1' => array(
  11968. 0 => 'organism_id',
  11969. ),
  11970. 'organism_feature_count_idx2' => array(
  11971. 0 => 'cvterm_id',
  11972. ),
  11973. 'organism_feature_count_idx3' => array(
  11974. 0 => 'feature_type',
  11975. ),
  11976. ),
  11977. 'foreign keys' => array(
  11978. ),
  11979. 'referring_tables' => array(
  11980. ),
  11981. );
  11982. return $description;
  11983. }
  11984. /**
  11985. * Implements hook_chado_schema_v1_3_organismprop()
  11986. *
  11987. * Purpose: To describe the structure of 'organismprop' to tripal
  11988. * @see chado_insert_record()
  11989. * @see chado_update_record()
  11990. * @see chado_select_record()
  11991. * @see chado_generate_var()
  11992. * @see chado_expan_var()
  11993. *
  11994. * @return
  11995. * An array describing the 'organismprop' table
  11996. *
  11997. * @ingroup tripal_chado_v1.3_schema_api
  11998. *
  11999. */
  12000. function tripal_chado_chado_schema_v1_3_organismprop() {
  12001. $description = array(
  12002. 'description' => '',
  12003. 'table' => 'organismprop',
  12004. 'fields' => array(
  12005. 'organismprop_id' => array(
  12006. 'size' => 'big',
  12007. 'type' => 'serial',
  12008. 'not null' => TRUE,
  12009. ),
  12010. 'organism_id' => array(
  12011. 'size' => 'big',
  12012. 'type' => 'int',
  12013. 'not null' => TRUE,
  12014. ),
  12015. 'type_id' => array(
  12016. 'size' => 'big',
  12017. 'type' => 'int',
  12018. 'not null' => TRUE,
  12019. ),
  12020. 'value' => array(
  12021. 'size' => 'normal',
  12022. 'type' => 'text',
  12023. 'not null' => FALSE,
  12024. ),
  12025. 'rank' => array(
  12026. 'size' => 'normal',
  12027. 'type' => 'int',
  12028. 'not null' => TRUE,
  12029. 'default' => 0,
  12030. ),
  12031. ),
  12032. 'unique keys' => array(
  12033. 'organismprop_c1' => array(
  12034. 0 => 'organism_id',
  12035. 1 => 'type_id',
  12036. 2 => 'rank',
  12037. ),
  12038. ),
  12039. 'indexes' => array(
  12040. 'organismprop_idx1' => array(
  12041. 0 => 'organism_id',
  12042. ),
  12043. 'organismprop_idx2' => array(
  12044. 0 => 'type_id',
  12045. ),
  12046. ),
  12047. 'primary key' => array(
  12048. 0 => 'organismprop_id',
  12049. ),
  12050. 'foreign keys' => array(
  12051. 'organism' => array(
  12052. 'table' => 'organism',
  12053. 'columns' => array(
  12054. 'organism_id' => 'organism_id',
  12055. ),
  12056. ),
  12057. 'cvterm' => array(
  12058. 'table' => 'cvterm',
  12059. 'columns' => array(
  12060. 'type_id' => 'cvterm_id',
  12061. ),
  12062. ),
  12063. ),
  12064. 'referring_tables' => array(
  12065. 0 => 'organismprop_pub',
  12066. ),
  12067. );
  12068. return $description;
  12069. }
  12070. /**
  12071. * Implements hook_chado_schema_v1_3_organismprop_pub()
  12072. *
  12073. * Purpose: To describe the structure of 'organismprop_pub' to tripal
  12074. * @see chado_insert_record()
  12075. * @see chado_update_record()
  12076. * @see chado_select_record()
  12077. * @see chado_generate_var()
  12078. * @see chado_expan_var()
  12079. *
  12080. * @return
  12081. * An array describing the 'organismprop_pub' table
  12082. *
  12083. * @ingroup tripal_chado_v1.3_schema_api
  12084. *
  12085. */
  12086. function tripal_chado_chado_schema_v1_3_organismprop_pub() {
  12087. $description = array(
  12088. 'description' => '',
  12089. 'table' => 'organismprop_pub',
  12090. 'fields' => array(
  12091. 'organismprop_pub_id' => array(
  12092. 'size' => 'big',
  12093. 'type' => 'serial',
  12094. 'not null' => TRUE,
  12095. ),
  12096. 'organismprop_id' => array(
  12097. 'size' => 'big',
  12098. 'type' => 'int',
  12099. 'not null' => TRUE,
  12100. ),
  12101. 'pub_id' => array(
  12102. 'size' => 'big',
  12103. 'type' => 'int',
  12104. 'not null' => TRUE,
  12105. ),
  12106. 'value' => array(
  12107. 'size' => 'normal',
  12108. 'type' => 'text',
  12109. 'not null' => FALSE,
  12110. ),
  12111. 'rank' => array(
  12112. 'size' => 'normal',
  12113. 'type' => 'int',
  12114. 'not null' => TRUE,
  12115. 'default' => 0,
  12116. ),
  12117. ),
  12118. 'unique keys' => array(
  12119. 'organismprop_pub_c1' => array(
  12120. 0 => 'organismprop_id',
  12121. 1 => 'pub_id',
  12122. ),
  12123. ),
  12124. 'indexes' => array(
  12125. 'organismprop_pub_idx1' => array(
  12126. 0 => 'organismprop_id',
  12127. ),
  12128. 'organismprop_pub_idx2' => array(
  12129. 0 => 'pub_id',
  12130. ),
  12131. ),
  12132. 'primary key' => array(
  12133. 0 => 'organismprop_pub_id',
  12134. ),
  12135. 'foreign keys' => array(
  12136. 'organismprop' => array(
  12137. 'table' => 'organismprop',
  12138. 'columns' => array(
  12139. 'organismprop_id' => 'organismprop_id',
  12140. ),
  12141. ),
  12142. 'pub' => array(
  12143. 'table' => 'pub',
  12144. 'columns' => array(
  12145. 'pub_id' => 'pub_id',
  12146. ),
  12147. ),
  12148. ),
  12149. 'referring_tables' => array(
  12150. ),
  12151. );
  12152. return $description;
  12153. }
  12154. /**
  12155. * Implements hook_chado_schema_v1_3_organism_pub()
  12156. *
  12157. * Purpose: To describe the structure of 'organism_pub' to tripal
  12158. * @see chado_insert_record()
  12159. * @see chado_update_record()
  12160. * @see chado_select_record()
  12161. * @see chado_generate_var()
  12162. * @see chado_expan_var()
  12163. *
  12164. * @return
  12165. * An array describing the 'organism_pub' table
  12166. *
  12167. * @ingroup tripal_chado_v1.3_schema_api
  12168. *
  12169. */
  12170. function tripal_chado_chado_schema_v1_3_organism_pub() {
  12171. $description = array(
  12172. 'description' => '',
  12173. 'table' => 'organism_pub',
  12174. 'fields' => array(
  12175. 'organism_pub_id' => array(
  12176. 'size' => 'big',
  12177. 'type' => 'serial',
  12178. 'not null' => TRUE,
  12179. ),
  12180. 'organism_id' => array(
  12181. 'size' => 'big',
  12182. 'type' => 'int',
  12183. 'not null' => TRUE,
  12184. ),
  12185. 'pub_id' => array(
  12186. 'size' => 'big',
  12187. 'type' => 'int',
  12188. 'not null' => TRUE,
  12189. ),
  12190. ),
  12191. 'unique keys' => array(
  12192. 'organism_pub_c1' => array(
  12193. 0 => 'organism_id',
  12194. 1 => 'pub_id',
  12195. ),
  12196. ),
  12197. 'indexes' => array(
  12198. 'organism_pub_idx1' => array(
  12199. 0 => 'organism_id',
  12200. ),
  12201. 'organism_pub_idx2' => array(
  12202. 0 => 'pub_id',
  12203. ),
  12204. ),
  12205. 'primary key' => array(
  12206. 0 => 'organism_pub_id',
  12207. ),
  12208. 'foreign keys' => array(
  12209. 'organism' => array(
  12210. 'table' => 'organism',
  12211. 'columns' => array(
  12212. 'organism_id' => 'organism_id',
  12213. ),
  12214. ),
  12215. 'pub' => array(
  12216. 'table' => 'pub',
  12217. 'columns' => array(
  12218. 'pub_id' => 'pub_id',
  12219. ),
  12220. ),
  12221. ),
  12222. 'referring_tables' => array(
  12223. ),
  12224. );
  12225. return $description;
  12226. }
  12227. /**
  12228. * Implements hook_chado_schema_v1_3_organism_relationship()
  12229. *
  12230. * Purpose: To describe the structure of 'organism_relationship' to tripal
  12231. * @see chado_insert_record()
  12232. * @see chado_update_record()
  12233. * @see chado_select_record()
  12234. * @see chado_generate_var()
  12235. * @see chado_expan_var()
  12236. *
  12237. * @return
  12238. * An array describing the 'organism_relationship' table
  12239. *
  12240. * @ingroup tripal_chado_v1.3_schema_api
  12241. *
  12242. */
  12243. function tripal_chado_chado_schema_v1_3_organism_relationship() {
  12244. $description = array(
  12245. 'description' => '',
  12246. 'table' => 'organism_relationship',
  12247. 'fields' => array(
  12248. 'organism_relationship_id' => array(
  12249. 'size' => 'big',
  12250. 'type' => 'serial',
  12251. 'not null' => TRUE,
  12252. ),
  12253. 'subject_id' => array(
  12254. 'size' => 'big',
  12255. 'type' => 'int',
  12256. 'not null' => TRUE,
  12257. ),
  12258. 'object_id' => array(
  12259. 'size' => 'big',
  12260. 'type' => 'int',
  12261. 'not null' => TRUE,
  12262. ),
  12263. 'type_id' => array(
  12264. 'size' => 'big',
  12265. 'type' => 'int',
  12266. 'not null' => TRUE,
  12267. ),
  12268. 'rank' => array(
  12269. 'size' => 'normal',
  12270. 'type' => 'int',
  12271. 'not null' => TRUE,
  12272. 'default' => 0,
  12273. ),
  12274. ),
  12275. 'unique keys' => array(
  12276. 'organism_relationship_c1' => array(
  12277. 0 => 'subject_id',
  12278. 1 => 'object_id',
  12279. 2 => 'type_id',
  12280. 3 => 'rank',
  12281. ),
  12282. ),
  12283. 'indexes' => array(
  12284. 'organism_relationship_idx1' => array(
  12285. 0 => 'subject_id',
  12286. ),
  12287. 'organism_relationship_idx2' => array(
  12288. 0 => 'object_id',
  12289. ),
  12290. 'organism_relationship_idx3' => array(
  12291. 0 => 'type_id',
  12292. ),
  12293. ),
  12294. 'primary key' => array(
  12295. 0 => 'organism_relationship_id',
  12296. ),
  12297. 'foreign keys' => array(
  12298. 'organism' => array(
  12299. 'table' => 'organism',
  12300. 'columns' => array(
  12301. 'object_id' => 'organism_id',
  12302. 'subject_id' => 'organism_id',
  12303. ),
  12304. ),
  12305. 'cvterm' => array(
  12306. 'table' => 'cvterm',
  12307. 'columns' => array(
  12308. 'type_id' => 'cvterm_id',
  12309. ),
  12310. ),
  12311. ),
  12312. 'referring_tables' => array(
  12313. ),
  12314. );
  12315. return $description;
  12316. }
  12317. /**
  12318. * Implements hook_chado_schema_v1_3_phendesc()
  12319. *
  12320. * Purpose: To describe the structure of 'phendesc' to tripal
  12321. * @see chado_insert_record()
  12322. * @see chado_update_record()
  12323. * @see chado_select_record()
  12324. * @see chado_generate_var()
  12325. * @see chado_expan_var()
  12326. *
  12327. * @return
  12328. * An array describing the 'phendesc' table
  12329. *
  12330. * @ingroup tripal_chado_v1.3_schema_api
  12331. *
  12332. */
  12333. function tripal_chado_chado_schema_v1_3_phendesc() {
  12334. $description = array(
  12335. 'description' => '',
  12336. 'table' => 'phendesc',
  12337. 'fields' => array(
  12338. 'phendesc_id' => array(
  12339. 'size' => 'big',
  12340. 'type' => 'serial',
  12341. 'not null' => TRUE,
  12342. ),
  12343. 'genotype_id' => array(
  12344. 'size' => 'big',
  12345. 'type' => 'int',
  12346. 'not null' => TRUE,
  12347. ),
  12348. 'environment_id' => array(
  12349. 'size' => 'big',
  12350. 'type' => 'int',
  12351. 'not null' => TRUE,
  12352. ),
  12353. 'description' => array(
  12354. 'size' => 'normal',
  12355. 'type' => 'text',
  12356. 'not null' => TRUE,
  12357. ),
  12358. 'type_id' => array(
  12359. 'size' => 'big',
  12360. 'type' => 'int',
  12361. 'not null' => TRUE,
  12362. ),
  12363. 'pub_id' => array(
  12364. 'size' => 'big',
  12365. 'type' => 'int',
  12366. 'not null' => TRUE,
  12367. ),
  12368. ),
  12369. 'unique keys' => array(
  12370. 'phendesc_c1' => array(
  12371. 0 => 'genotype_id',
  12372. 1 => 'environment_id',
  12373. 2 => 'type_id',
  12374. 3 => 'pub_id',
  12375. ),
  12376. ),
  12377. 'indexes' => array(
  12378. 'phendesc_idx1' => array(
  12379. 0 => 'genotype_id',
  12380. ),
  12381. 'phendesc_idx2' => array(
  12382. 0 => 'environment_id',
  12383. ),
  12384. 'phendesc_idx3' => array(
  12385. 0 => 'pub_id',
  12386. ),
  12387. ),
  12388. 'primary key' => array(
  12389. 0 => 'phendesc_id',
  12390. ),
  12391. 'foreign keys' => array(
  12392. 'genotype' => array(
  12393. 'table' => 'genotype',
  12394. 'columns' => array(
  12395. 'genotype_id' => 'genotype_id',
  12396. ),
  12397. ),
  12398. 'environment' => array(
  12399. 'table' => 'environment',
  12400. 'columns' => array(
  12401. 'environment_id' => 'environment_id',
  12402. ),
  12403. ),
  12404. 'cvterm' => array(
  12405. 'table' => 'cvterm',
  12406. 'columns' => array(
  12407. 'type_id' => 'cvterm_id',
  12408. ),
  12409. ),
  12410. 'pub' => array(
  12411. 'table' => 'pub',
  12412. 'columns' => array(
  12413. 'pub_id' => 'pub_id',
  12414. ),
  12415. ),
  12416. ),
  12417. 'referring_tables' => array(
  12418. ),
  12419. );
  12420. return $description;
  12421. }
  12422. /**
  12423. * Implements hook_chado_schema_v1_3_phenotype()
  12424. *
  12425. * Purpose: To describe the structure of 'phenotype' to tripal
  12426. * @see chado_insert_record()
  12427. * @see chado_update_record()
  12428. * @see chado_select_record()
  12429. * @see chado_generate_var()
  12430. * @see chado_expan_var()
  12431. *
  12432. * @return
  12433. * An array describing the 'phenotype' table
  12434. *
  12435. * @ingroup tripal_chado_v1.3_schema_api
  12436. *
  12437. */
  12438. function tripal_chado_chado_schema_v1_3_phenotype() {
  12439. $description = array(
  12440. 'description' => '',
  12441. 'table' => 'phenotype',
  12442. 'fields' => array(
  12443. 'phenotype_id' => array(
  12444. 'size' => 'big',
  12445. 'type' => 'serial',
  12446. 'not null' => TRUE,
  12447. ),
  12448. 'uniquename' => array(
  12449. 'size' => 'normal',
  12450. 'type' => 'text',
  12451. 'not null' => TRUE,
  12452. ),
  12453. 'name' => array(
  12454. 'size' => 'normal',
  12455. 'type' => 'text',
  12456. 'not null' => FALSE,
  12457. ),
  12458. 'observable_id' => array(
  12459. 'size' => 'big',
  12460. 'type' => 'int',
  12461. 'not null' => FALSE,
  12462. ),
  12463. 'attr_id' => array(
  12464. 'size' => 'big',
  12465. 'type' => 'int',
  12466. 'not null' => FALSE,
  12467. ),
  12468. 'value' => array(
  12469. 'size' => 'normal',
  12470. 'type' => 'text',
  12471. 'not null' => FALSE,
  12472. ),
  12473. 'cvalue_id' => array(
  12474. 'size' => 'big',
  12475. 'type' => 'int',
  12476. 'not null' => FALSE,
  12477. ),
  12478. 'assay_id' => array(
  12479. 'size' => 'big',
  12480. 'type' => 'int',
  12481. 'not null' => FALSE,
  12482. ),
  12483. ),
  12484. 'unique keys' => array(
  12485. 'phenotype_c1' => array(
  12486. 0 => 'uniquename',
  12487. ),
  12488. ),
  12489. 'indexes' => array(
  12490. 'phenotype_idx1' => array(
  12491. 0 => 'cvalue_id',
  12492. ),
  12493. 'phenotype_idx2' => array(
  12494. 0 => 'observable_id',
  12495. ),
  12496. 'phenotype_idx3' => array(
  12497. 0 => 'attr_id',
  12498. ),
  12499. ),
  12500. 'primary key' => array(
  12501. 0 => 'phenotype_id',
  12502. ),
  12503. 'foreign keys' => array(
  12504. 'cvterm' => array(
  12505. 'table' => 'cvterm',
  12506. 'columns' => array(
  12507. 'observable_id' => 'cvterm_id',
  12508. 'attr_id' => 'cvterm_id',
  12509. 'cvalue_id' => 'cvterm_id',
  12510. 'assay_id' => 'cvterm_id',
  12511. ),
  12512. ),
  12513. ),
  12514. 'referring_tables' => array(
  12515. 0 => 'feature_phenotype',
  12516. 1 => 'nd_experiment_phenotype',
  12517. 2 => 'phenotype_comparison',
  12518. 4 => 'phenotype_cvterm',
  12519. 5 => 'phenotypeprop',
  12520. 6 => 'phenstatement',
  12521. ),
  12522. );
  12523. return $description;
  12524. }
  12525. /**
  12526. * Implements hook_chado_schema_v1_3_phenotype_comparison()
  12527. *
  12528. * Purpose: To describe the structure of 'phenotype_comparison' to tripal
  12529. * @see chado_insert_record()
  12530. * @see chado_update_record()
  12531. * @see chado_select_record()
  12532. * @see chado_generate_var()
  12533. * @see chado_expan_var()
  12534. *
  12535. * @return
  12536. * An array describing the 'phenotype_comparison' table
  12537. *
  12538. * @ingroup tripal_chado_v1.3_schema_api
  12539. *
  12540. */
  12541. function tripal_chado_chado_schema_v1_3_phenotype_comparison() {
  12542. $description = array(
  12543. 'description' => '',
  12544. 'table' => 'phenotype_comparison',
  12545. 'fields' => array(
  12546. 'phenotype_comparison_id' => array(
  12547. 'size' => 'big',
  12548. 'type' => 'serial',
  12549. 'not null' => TRUE,
  12550. ),
  12551. 'genotype1_id' => array(
  12552. 'size' => 'big',
  12553. 'type' => 'int',
  12554. 'not null' => TRUE,
  12555. ),
  12556. 'environment1_id' => array(
  12557. 'size' => 'big',
  12558. 'type' => 'int',
  12559. 'not null' => TRUE,
  12560. ),
  12561. 'genotype2_id' => array(
  12562. 'size' => 'big',
  12563. 'type' => 'int',
  12564. 'not null' => TRUE,
  12565. ),
  12566. 'environment2_id' => array(
  12567. 'size' => 'big',
  12568. 'type' => 'int',
  12569. 'not null' => TRUE,
  12570. ),
  12571. 'phenotype1_id' => array(
  12572. 'size' => 'big',
  12573. 'type' => 'int',
  12574. 'not null' => TRUE,
  12575. ),
  12576. 'phenotype2_id' => array(
  12577. 'size' => 'big',
  12578. 'type' => 'int',
  12579. 'not null' => FALSE,
  12580. ),
  12581. 'pub_id' => array(
  12582. 'size' => 'big',
  12583. 'type' => 'int',
  12584. 'not null' => TRUE,
  12585. ),
  12586. 'organism_id' => array(
  12587. 'size' => 'big',
  12588. 'type' => 'int',
  12589. 'not null' => TRUE,
  12590. ),
  12591. ),
  12592. 'unique keys' => array(
  12593. 'phenotype_comparison_c1' => array(
  12594. 0 => 'genotype1_id',
  12595. 1 => 'environment1_id',
  12596. 2 => 'genotype2_id',
  12597. 3 => 'environment2_id',
  12598. 4 => 'phenotype1_id',
  12599. 5 => 'pub_id',
  12600. ),
  12601. ),
  12602. 'indexes' => array(
  12603. 'phenotype_comparison_idx1' => array(
  12604. 0 => 'genotype1_id',
  12605. ),
  12606. 'phenotype_comparison_idx2' => array(
  12607. 0 => 'genotype2_id',
  12608. ),
  12609. 'phenotype_comparison_idx4' => array(
  12610. 0 => 'pub_id',
  12611. ),
  12612. ),
  12613. 'primary key' => array(
  12614. 0 => 'phenotype_comparison_id',
  12615. ),
  12616. 'foreign keys' => array(
  12617. 'genotype' => array(
  12618. 'table' => 'genotype',
  12619. 'columns' => array(
  12620. 'genotype1_id' => 'genotype_id',
  12621. 'genotype2_id' => 'genotype_id',
  12622. ),
  12623. ),
  12624. 'environment' => array(
  12625. 'table' => 'environment',
  12626. 'columns' => array(
  12627. 'environment1_id' => 'environment_id',
  12628. 'environment2_id' => 'environment_id',
  12629. ),
  12630. ),
  12631. 'phenotype' => array(
  12632. 'table' => 'phenotype',
  12633. 'columns' => array(
  12634. 'phenotype1_id' => 'phenotype_id',
  12635. 'phenotype2_id' => 'phenotype_id',
  12636. ),
  12637. ),
  12638. 'pub' => array(
  12639. 'table' => 'pub',
  12640. 'columns' => array(
  12641. 'pub_id' => 'pub_id',
  12642. ),
  12643. ),
  12644. 'organism' => array(
  12645. 'table' => 'organism',
  12646. 'columns' => array(
  12647. 'organism_id' => 'organism_id',
  12648. ),
  12649. ),
  12650. ),
  12651. 'referring_tables' => array(
  12652. 0 => 'phenotype_comparison_cvterm',
  12653. ),
  12654. );
  12655. return $description;
  12656. }
  12657. /**
  12658. * Implements hook_chado_schema_v1_3_phenotype_comparison_cvterm()
  12659. *
  12660. * Purpose: To describe the structure of 'phenotype_comparison_cvterm' to tripal
  12661. * @see chado_insert_record()
  12662. * @see chado_update_record()
  12663. * @see chado_select_record()
  12664. * @see chado_generate_var()
  12665. * @see chado_expan_var()
  12666. *
  12667. * @return
  12668. * An array describing the 'phenotype_comparison_cvterm' table
  12669. *
  12670. * @ingroup tripal_chado_v1.3_schema_api
  12671. *
  12672. */
  12673. function tripal_chado_chado_schema_v1_3_phenotype_comparison_cvterm() {
  12674. $description = array(
  12675. 'description' => '',
  12676. 'table' => 'phenotype_comparison_cvterm',
  12677. 'fields' => array(
  12678. 'phenotype_comparison_cvterm_id' => array(
  12679. 'size' => 'big',
  12680. 'type' => 'serial',
  12681. 'not null' => TRUE,
  12682. ),
  12683. 'phenotype_comparison_id' => array(
  12684. 'size' => 'big',
  12685. 'type' => 'int',
  12686. 'not null' => TRUE,
  12687. ),
  12688. 'cvterm_id' => array(
  12689. 'size' => 'big',
  12690. 'type' => 'int',
  12691. 'not null' => TRUE,
  12692. ),
  12693. 'pub_id' => array(
  12694. 'size' => 'big',
  12695. 'type' => 'int',
  12696. 'not null' => TRUE,
  12697. ),
  12698. 'rank' => array(
  12699. 'size' => 'normal',
  12700. 'type' => 'int',
  12701. 'not null' => TRUE,
  12702. 'default' => 0,
  12703. ),
  12704. ),
  12705. 'unique keys' => array(
  12706. 'phenotype_comparison_cvterm_c1' => array(
  12707. 0 => 'phenotype_comparison_id',
  12708. 1 => 'cvterm_id',
  12709. ),
  12710. ),
  12711. 'indexes' => array(
  12712. 'phenotype_comparison_cvterm_idx1' => array(
  12713. 0 => 'phenotype_comparison_id',
  12714. ),
  12715. 'phenotype_comparison_cvterm_idx2' => array(
  12716. 0 => 'cvterm_id',
  12717. ),
  12718. ),
  12719. 'primary key' => array(
  12720. 0 => 'phenotype_comparison_cvterm_id',
  12721. ),
  12722. 'foreign keys' => array(
  12723. 'phenotype_comparison' => array(
  12724. 'table' => 'phenotype_comparison',
  12725. 'columns' => array(
  12726. 'phenotype_comparison_id' => 'phenotype_comparison_id',
  12727. ),
  12728. ),
  12729. 'cvterm' => array(
  12730. 'table' => 'cvterm',
  12731. 'columns' => array(
  12732. 'cvterm_id' => 'cvterm_id',
  12733. ),
  12734. ),
  12735. 'pub' => array(
  12736. 'table' => 'pub',
  12737. 'columns' => array(
  12738. 'pub_id' => 'pub_id',
  12739. ),
  12740. ),
  12741. ),
  12742. 'referring_tables' => array(
  12743. ),
  12744. );
  12745. return $description;
  12746. }
  12747. /**
  12748. * Implements hook_chado_schema_v1_3_phenotype_cvterm()
  12749. *
  12750. * Purpose: To describe the structure of 'phenotype_cvterm' to tripal
  12751. * @see chado_insert_record()
  12752. * @see chado_update_record()
  12753. * @see chado_select_record()
  12754. * @see chado_generate_var()
  12755. * @see chado_expan_var()
  12756. *
  12757. * @return
  12758. * An array describing the 'phenotype_cvterm' table
  12759. *
  12760. * @ingroup tripal_chado_v1.3_schema_api
  12761. *
  12762. */
  12763. function tripal_chado_chado_schema_v1_3_phenotype_cvterm() {
  12764. $description = array(
  12765. 'description' => '',
  12766. 'table' => 'phenotype_cvterm',
  12767. 'fields' => array(
  12768. 'phenotype_cvterm_id' => array(
  12769. 'size' => 'big',
  12770. 'type' => 'serial',
  12771. 'not null' => TRUE,
  12772. ),
  12773. 'phenotype_id' => array(
  12774. 'size' => 'big',
  12775. 'type' => 'int',
  12776. 'not null' => TRUE,
  12777. ),
  12778. 'cvterm_id' => array(
  12779. 'size' => 'big',
  12780. 'type' => 'int',
  12781. 'not null' => TRUE,
  12782. ),
  12783. 'rank' => array(
  12784. 'size' => 'normal',
  12785. 'type' => 'int',
  12786. 'not null' => TRUE,
  12787. 'default' => 0,
  12788. ),
  12789. ),
  12790. 'unique keys' => array(
  12791. 'phenotype_cvterm_c1' => array(
  12792. 0 => 'phenotype_id',
  12793. 1 => 'cvterm_id',
  12794. 2 => 'rank',
  12795. ),
  12796. ),
  12797. 'indexes' => array(
  12798. 'phenotype_cvterm_idx1' => array(
  12799. 0 => 'phenotype_id',
  12800. ),
  12801. 'phenotype_cvterm_idx2' => array(
  12802. 0 => 'cvterm_id',
  12803. ),
  12804. ),
  12805. 'primary key' => array(
  12806. 0 => 'phenotype_cvterm_id',
  12807. ),
  12808. 'foreign keys' => array(
  12809. 'phenotype' => array(
  12810. 'table' => 'phenotype',
  12811. 'columns' => array(
  12812. 'phenotype_id' => 'phenotype_id',
  12813. ),
  12814. ),
  12815. 'cvterm' => array(
  12816. 'table' => 'cvterm',
  12817. 'columns' => array(
  12818. 'cvterm_id' => 'cvterm_id',
  12819. ),
  12820. ),
  12821. ),
  12822. 'referring_tables' => array(
  12823. ),
  12824. );
  12825. return $description;
  12826. }
  12827. /**
  12828. * Implements hook_chado_schema_v1_3_phenotypeprop()
  12829. *
  12830. * Purpose: To describe the structure of 'phenotypeprop' to tripal
  12831. * @see chado_insert_record()
  12832. * @see chado_update_record()
  12833. * @see chado_select_record()
  12834. * @see chado_generate_var()
  12835. * @see chado_expan_var()
  12836. *
  12837. * @return
  12838. * An array describing the 'phenotypeprop' table
  12839. *
  12840. * @ingroup tripal_chado_v1.3_schema_api
  12841. *
  12842. */
  12843. function tripal_chado_chado_schema_v1_3_phenotypeprop() {
  12844. $description = array(
  12845. 'description' => '',
  12846. 'table' => 'phenotypeprop',
  12847. 'fields' => array(
  12848. 'phenotypeprop_id' => array(
  12849. 'size' => 'big',
  12850. 'type' => 'serial',
  12851. 'not null' => TRUE,
  12852. ),
  12853. 'phenotype_id' => array(
  12854. 'size' => 'big',
  12855. 'type' => 'int',
  12856. 'not null' => TRUE,
  12857. ),
  12858. 'type_id' => array(
  12859. 'size' => 'big',
  12860. 'type' => 'int',
  12861. 'not null' => TRUE,
  12862. ),
  12863. 'value' => array(
  12864. 'size' => 'normal',
  12865. 'type' => 'text',
  12866. 'not null' => FALSE,
  12867. ),
  12868. 'rank' => array(
  12869. 'size' => 'normal',
  12870. 'type' => 'int',
  12871. 'not null' => TRUE,
  12872. 'default' => 0,
  12873. ),
  12874. ),
  12875. 'unique keys' => array(
  12876. 'phenotypeprop_c1' => array(
  12877. 0 => 'phenotype_id',
  12878. 1 => 'type_id',
  12879. 2 => 'rank',
  12880. ),
  12881. ),
  12882. 'indexes' => array(
  12883. 'phenotypeprop_idx1' => array(
  12884. 0 => 'phenotype_id',
  12885. ),
  12886. 'phenotypeprop_idx2' => array(
  12887. 0 => 'type_id',
  12888. ),
  12889. ),
  12890. 'primary key' => array(
  12891. 0 => 'phenotypeprop_id',
  12892. ),
  12893. 'foreign keys' => array(
  12894. 'phenotype' => array(
  12895. 'table' => 'phenotype',
  12896. 'columns' => array(
  12897. 'phenotype_id' => 'phenotype_id',
  12898. ),
  12899. ),
  12900. 'cvterm' => array(
  12901. 'table' => 'cvterm',
  12902. 'columns' => array(
  12903. 'type_id' => 'cvterm_id',
  12904. ),
  12905. ),
  12906. ),
  12907. 'referring_tables' => array(
  12908. ),
  12909. );
  12910. return $description;
  12911. }
  12912. /**
  12913. * Implements hook_chado_schema_v1_3_phenstatement()
  12914. *
  12915. * Purpose: To describe the structure of 'phenstatement' to tripal
  12916. * @see chado_insert_record()
  12917. * @see chado_update_record()
  12918. * @see chado_select_record()
  12919. * @see chado_generate_var()
  12920. * @see chado_expan_var()
  12921. *
  12922. * @return
  12923. * An array describing the 'phenstatement' table
  12924. *
  12925. * @ingroup tripal_chado_v1.3_schema_api
  12926. *
  12927. */
  12928. function tripal_chado_chado_schema_v1_3_phenstatement() {
  12929. $description = array(
  12930. 'description' => '',
  12931. 'table' => 'phenstatement',
  12932. 'fields' => array(
  12933. 'phenstatement_id' => array(
  12934. 'size' => 'big',
  12935. 'type' => 'serial',
  12936. 'not null' => TRUE,
  12937. ),
  12938. 'genotype_id' => array(
  12939. 'size' => 'big',
  12940. 'type' => 'int',
  12941. 'not null' => TRUE,
  12942. ),
  12943. 'environment_id' => array(
  12944. 'size' => 'big',
  12945. 'type' => 'int',
  12946. 'not null' => TRUE,
  12947. ),
  12948. 'phenotype_id' => array(
  12949. 'size' => 'big',
  12950. 'type' => 'int',
  12951. 'not null' => TRUE,
  12952. ),
  12953. 'type_id' => array(
  12954. 'size' => 'big',
  12955. 'type' => 'int',
  12956. 'not null' => TRUE,
  12957. ),
  12958. 'pub_id' => array(
  12959. 'size' => 'big',
  12960. 'type' => 'int',
  12961. 'not null' => TRUE,
  12962. ),
  12963. ),
  12964. 'unique keys' => array(
  12965. 'phenstatement_c1' => array(
  12966. 0 => 'genotype_id',
  12967. 1 => 'phenotype_id',
  12968. 2 => 'environment_id',
  12969. 3 => 'type_id',
  12970. 4 => 'pub_id',
  12971. ),
  12972. ),
  12973. 'indexes' => array(
  12974. 'phenstatement_idx1' => array(
  12975. 0 => 'genotype_id',
  12976. ),
  12977. 'phenstatement_idx2' => array(
  12978. 0 => 'phenotype_id',
  12979. ),
  12980. ),
  12981. 'primary key' => array(
  12982. 0 => 'phenstatement_id',
  12983. ),
  12984. 'foreign keys' => array(
  12985. 'genotype' => array(
  12986. 'table' => 'genotype',
  12987. 'columns' => array(
  12988. 'genotype_id' => 'genotype_id',
  12989. ),
  12990. ),
  12991. 'environment' => array(
  12992. 'table' => 'environment',
  12993. 'columns' => array(
  12994. 'environment_id' => 'environment_id',
  12995. ),
  12996. ),
  12997. 'phenotype' => array(
  12998. 'table' => 'phenotype',
  12999. 'columns' => array(
  13000. 'phenotype_id' => 'phenotype_id',
  13001. ),
  13002. ),
  13003. 'cvterm' => array(
  13004. 'table' => 'cvterm',
  13005. 'columns' => array(
  13006. 'type_id' => 'cvterm_id',
  13007. ),
  13008. ),
  13009. 'pub' => array(
  13010. 'table' => 'pub',
  13011. 'columns' => array(
  13012. 'pub_id' => 'pub_id',
  13013. ),
  13014. ),
  13015. ),
  13016. 'referring_tables' => array(
  13017. ),
  13018. );
  13019. return $description;
  13020. }
  13021. /**
  13022. * Implements hook_chado_schema_v1_3_phylonode()
  13023. *
  13024. * Purpose: To describe the structure of 'phylonode' to tripal
  13025. * @see chado_insert_record()
  13026. * @see chado_update_record()
  13027. * @see chado_select_record()
  13028. * @see chado_generate_var()
  13029. * @see chado_expan_var()
  13030. *
  13031. * @return
  13032. * An array describing the 'phylonode' table
  13033. *
  13034. * @ingroup tripal_chado_v1.3_schema_api
  13035. *
  13036. */
  13037. function tripal_chado_chado_schema_v1_3_phylonode() {
  13038. $description = array(
  13039. 'description' => '',
  13040. 'table' => 'phylonode',
  13041. 'fields' => array(
  13042. 'phylonode_id' => array(
  13043. 'size' => 'big',
  13044. 'type' => 'serial',
  13045. 'not null' => TRUE,
  13046. ),
  13047. 'phylotree_id' => array(
  13048. 'size' => 'big',
  13049. 'type' => 'int',
  13050. 'not null' => TRUE,
  13051. ),
  13052. 'parent_phylonode_id' => array(
  13053. 'size' => 'big',
  13054. 'type' => 'int',
  13055. 'not null' => FALSE,
  13056. ),
  13057. 'left_idx' => array(
  13058. 'size' => 'normal',
  13059. 'type' => 'int',
  13060. 'not null' => TRUE,
  13061. ),
  13062. 'right_idx' => array(
  13063. 'size' => 'normal',
  13064. 'type' => 'int',
  13065. 'not null' => TRUE,
  13066. ),
  13067. 'type_id' => array(
  13068. 'size' => 'big',
  13069. 'type' => 'int',
  13070. 'not null' => FALSE,
  13071. ),
  13072. 'feature_id' => array(
  13073. 'size' => 'big',
  13074. 'type' => 'int',
  13075. 'not null' => FALSE,
  13076. ),
  13077. 'label' => array(
  13078. 'size' => 'normal',
  13079. 'type' => 'varchar',
  13080. 'length' => '255',
  13081. 'not null' => FALSE,
  13082. ),
  13083. 'distance' => array(
  13084. 'size' => 'big',
  13085. 'type' => 'float',
  13086. 'not null' => FALSE,
  13087. ),
  13088. ),
  13089. 'indexes' => array(
  13090. 'parent_phylonode_id' => array(
  13091. 0 => 'parent_phylonode_id',
  13092. ),
  13093. ),
  13094. 'unique keys' => array(
  13095. 'phylotree_id_left_idx' => array(
  13096. 0 => 'phylotree_id',
  13097. 1 => 'left_idx',
  13098. ),
  13099. 'phylotree_id_right_idx' => array(
  13100. 0 => 'phylotree_id',
  13101. 1 => 'right_idx',
  13102. ),
  13103. ),
  13104. 'primary key' => array(
  13105. 0 => 'phylonode_id',
  13106. ),
  13107. 'foreign keys' => array(
  13108. 'phylotree' => array(
  13109. 'table' => 'phylotree',
  13110. 'columns' => array(
  13111. 'phylotree_id' => 'phylotree_id',
  13112. ),
  13113. ),
  13114. 'phylonode' => array(
  13115. 'table' => 'phylonode',
  13116. 'columns' => array(
  13117. 'parent_phylonode_id' => 'phylonode_id',
  13118. ),
  13119. ),
  13120. 'cvterm' => array(
  13121. 'table' => 'cvterm',
  13122. 'columns' => array(
  13123. 'type_id' => 'cvterm_id',
  13124. ),
  13125. ),
  13126. 'feature' => array(
  13127. 'table' => 'feature',
  13128. 'columns' => array(
  13129. 'feature_id' => 'feature_id',
  13130. ),
  13131. ),
  13132. ),
  13133. 'referring_tables' => array(
  13134. 0 => 'phylonode',
  13135. 1 => 'phylonode_dbxref',
  13136. 2 => 'phylonode_organism',
  13137. 3 => 'phylonodeprop',
  13138. 4 => 'phylonode_pub',
  13139. 5 => 'phylonode_relationship',
  13140. ),
  13141. );
  13142. return $description;
  13143. }
  13144. /**
  13145. * Implements hook_chado_schema_v1_3_phylonode_dbxref()
  13146. *
  13147. * Purpose: To describe the structure of 'phylonode_dbxref' to tripal
  13148. * @see chado_insert_record()
  13149. * @see chado_update_record()
  13150. * @see chado_select_record()
  13151. * @see chado_generate_var()
  13152. * @see chado_expan_var()
  13153. *
  13154. * @return
  13155. * An array describing the 'phylonode_dbxref' table
  13156. *
  13157. * @ingroup tripal_chado_v1.3_schema_api
  13158. *
  13159. */
  13160. function tripal_chado_chado_schema_v1_3_phylonode_dbxref() {
  13161. $description = array(
  13162. 'description' => '',
  13163. 'table' => 'phylonode_dbxref',
  13164. 'fields' => array(
  13165. 'phylonode_dbxref_id' => array(
  13166. 'size' => 'big',
  13167. 'type' => 'serial',
  13168. 'not null' => TRUE,
  13169. ),
  13170. 'phylonode_id' => array(
  13171. 'size' => 'big',
  13172. 'type' => 'int',
  13173. 'not null' => TRUE,
  13174. ),
  13175. 'dbxref_id' => array(
  13176. 'size' => 'big',
  13177. 'type' => 'int',
  13178. 'not null' => TRUE,
  13179. ),
  13180. ),
  13181. 'indexes' => array(
  13182. 'phylonode_dbxref_idx1' => array(
  13183. 0 => 'phylonode_id',
  13184. ),
  13185. 'phylonode_dbxref_idx2' => array(
  13186. 0 => 'dbxref_id',
  13187. ),
  13188. ),
  13189. 'unique keys' => array(
  13190. 'phylonode_id_dbxref_id' => array(
  13191. 0 => 'phylonode_id',
  13192. 1 => 'dbxref_id',
  13193. ),
  13194. ),
  13195. 'primary key' => array(
  13196. 0 => 'phylonode_dbxref_id',
  13197. ),
  13198. 'foreign keys' => array(
  13199. 'phylonode' => array(
  13200. 'table' => 'phylonode',
  13201. 'columns' => array(
  13202. 'phylonode_id' => 'phylonode_id',
  13203. ),
  13204. ),
  13205. 'dbxref' => array(
  13206. 'table' => 'dbxref',
  13207. 'columns' => array(
  13208. 'dbxref_id' => 'dbxref_id',
  13209. ),
  13210. ),
  13211. ),
  13212. 'referring_tables' => array(
  13213. ),
  13214. );
  13215. return $description;
  13216. }
  13217. /**
  13218. * Implements hook_chado_schema_v1_3_phylonode_organism()
  13219. *
  13220. * Purpose: To describe the structure of 'phylonode_organism' to tripal
  13221. * @see chado_insert_record()
  13222. * @see chado_update_record()
  13223. * @see chado_select_record()
  13224. * @see chado_generate_var()
  13225. * @see chado_expan_var()
  13226. *
  13227. * @return
  13228. * An array describing the 'phylonode_organism' table
  13229. *
  13230. * @ingroup tripal_chado_v1.3_schema_api
  13231. *
  13232. */
  13233. function tripal_chado_chado_schema_v1_3_phylonode_organism() {
  13234. $description = array(
  13235. 'description' => '',
  13236. 'table' => 'phylonode_organism',
  13237. 'fields' => array(
  13238. 'phylonode_organism_id' => array(
  13239. 'size' => 'big',
  13240. 'type' => 'serial',
  13241. 'not null' => TRUE,
  13242. ),
  13243. 'phylonode_id' => array(
  13244. 'size' => 'big',
  13245. 'type' => 'int',
  13246. 'not null' => TRUE,
  13247. ),
  13248. 'organism_id' => array(
  13249. 'size' => 'big',
  13250. 'type' => 'int',
  13251. 'not null' => TRUE,
  13252. ),
  13253. ),
  13254. 'indexes' => array(
  13255. 'phylonode_organism_idx1' => array(
  13256. 0 => 'phylonode_id',
  13257. ),
  13258. 'phylonode_organism_idx2' => array(
  13259. 0 => 'organism_id',
  13260. ),
  13261. ),
  13262. 'unique keys' => array(
  13263. 'phylonode_id' => array(
  13264. 0 => 'phylonode_id',
  13265. ),
  13266. ),
  13267. 'primary key' => array(
  13268. 0 => 'phylonode_organism_id',
  13269. ),
  13270. 'foreign keys' => array(
  13271. 'phylonode' => array(
  13272. 'table' => 'phylonode',
  13273. 'columns' => array(
  13274. 'phylonode_id' => 'phylonode_id',
  13275. ),
  13276. ),
  13277. 'organism' => array(
  13278. 'table' => 'organism',
  13279. 'columns' => array(
  13280. 'organism_id' => 'organism_id',
  13281. ),
  13282. ),
  13283. ),
  13284. 'referring_tables' => array(
  13285. ),
  13286. );
  13287. return $description;
  13288. }
  13289. /**
  13290. * Implements hook_chado_schema_v1_3_phylonodeprop()
  13291. *
  13292. * Purpose: To describe the structure of 'phylonodeprop' to tripal
  13293. * @see chado_insert_record()
  13294. * @see chado_update_record()
  13295. * @see chado_select_record()
  13296. * @see chado_generate_var()
  13297. * @see chado_expan_var()
  13298. *
  13299. * @return
  13300. * An array describing the 'phylonodeprop' table
  13301. *
  13302. * @ingroup tripal_chado_v1.3_schema_api
  13303. *
  13304. */
  13305. function tripal_chado_chado_schema_v1_3_phylonodeprop() {
  13306. $description = array(
  13307. 'description' => '',
  13308. 'table' => 'phylonodeprop',
  13309. 'fields' => array(
  13310. 'phylonodeprop_id' => array(
  13311. 'size' => 'big',
  13312. 'type' => 'serial',
  13313. 'not null' => TRUE,
  13314. ),
  13315. 'phylonode_id' => array(
  13316. 'size' => 'big',
  13317. 'type' => 'int',
  13318. 'not null' => TRUE,
  13319. ),
  13320. 'type_id' => array(
  13321. 'size' => 'big',
  13322. 'type' => 'int',
  13323. 'not null' => TRUE,
  13324. ),
  13325. 'value' => array(
  13326. 'size' => 'normal',
  13327. 'type' => 'text',
  13328. 'not null' => TRUE,
  13329. 'default' => '',
  13330. ),
  13331. 'rank' => array(
  13332. 'size' => 'normal',
  13333. 'type' => 'int',
  13334. 'not null' => TRUE,
  13335. 'default' => 0,
  13336. ),
  13337. ),
  13338. 'indexes' => array(
  13339. 'phylonodeprop_idx1' => array(
  13340. 0 => 'phylonode_id',
  13341. ),
  13342. 'phylonodeprop_idx2' => array(
  13343. 0 => 'type_id',
  13344. ),
  13345. ),
  13346. 'unique keys' => array(
  13347. 'phylonode_id_type_id_value_rank' => array(
  13348. 0 => 'phylonode_id',
  13349. 1 => 'type_id',
  13350. 2 => 'value',
  13351. 3 => 'rank',
  13352. ),
  13353. ),
  13354. 'primary key' => array(
  13355. 0 => 'phylonodeprop_id',
  13356. ),
  13357. 'foreign keys' => array(
  13358. 'phylonode' => array(
  13359. 'table' => 'phylonode',
  13360. 'columns' => array(
  13361. 'phylonode_id' => 'phylonode_id',
  13362. ),
  13363. ),
  13364. 'cvterm' => array(
  13365. 'table' => 'cvterm',
  13366. 'columns' => array(
  13367. 'type_id' => 'cvterm_id',
  13368. ),
  13369. ),
  13370. ),
  13371. 'referring_tables' => array(
  13372. ),
  13373. );
  13374. return $description;
  13375. }
  13376. /**
  13377. * Implements hook_chado_schema_v1_3_phylonode_pub()
  13378. *
  13379. * Purpose: To describe the structure of 'phylonode_pub' to tripal
  13380. * @see chado_insert_record()
  13381. * @see chado_update_record()
  13382. * @see chado_select_record()
  13383. * @see chado_generate_var()
  13384. * @see chado_expan_var()
  13385. *
  13386. * @return
  13387. * An array describing the 'phylonode_pub' table
  13388. *
  13389. * @ingroup tripal_chado_v1.3_schema_api
  13390. *
  13391. */
  13392. function tripal_chado_chado_schema_v1_3_phylonode_pub() {
  13393. $description = array(
  13394. 'description' => '',
  13395. 'table' => 'phylonode_pub',
  13396. 'fields' => array(
  13397. 'phylonode_pub_id' => array(
  13398. 'size' => 'big',
  13399. 'type' => 'serial',
  13400. 'not null' => TRUE,
  13401. ),
  13402. 'phylonode_id' => array(
  13403. 'size' => 'big',
  13404. 'type' => 'int',
  13405. 'not null' => TRUE,
  13406. ),
  13407. 'pub_id' => array(
  13408. 'size' => 'big',
  13409. 'type' => 'int',
  13410. 'not null' => TRUE,
  13411. ),
  13412. ),
  13413. 'indexes' => array(
  13414. 'phylonode_pub_idx1' => array(
  13415. 0 => 'phylonode_id',
  13416. ),
  13417. 'phylonode_pub_idx2' => array(
  13418. 0 => 'pub_id',
  13419. ),
  13420. ),
  13421. 'unique keys' => array(
  13422. 'phylonode_id_pub_id' => array(
  13423. 0 => 'phylonode_id',
  13424. 1 => 'pub_id',
  13425. ),
  13426. ),
  13427. 'primary key' => array(
  13428. 0 => 'phylonode_pub_id',
  13429. ),
  13430. 'foreign keys' => array(
  13431. 'phylonode' => array(
  13432. 'table' => 'phylonode',
  13433. 'columns' => array(
  13434. 'phylonode_id' => 'phylonode_id',
  13435. ),
  13436. ),
  13437. 'pub' => array(
  13438. 'table' => 'pub',
  13439. 'columns' => array(
  13440. 'pub_id' => 'pub_id',
  13441. ),
  13442. ),
  13443. ),
  13444. 'referring_tables' => array(
  13445. ),
  13446. );
  13447. return $description;
  13448. }
  13449. /**
  13450. * Implements hook_chado_schema_v1_3_phylonode_relationship()
  13451. *
  13452. * Purpose: To describe the structure of 'phylonode_relationship' to tripal
  13453. * @see chado_insert_record()
  13454. * @see chado_update_record()
  13455. * @see chado_select_record()
  13456. * @see chado_generate_var()
  13457. * @see chado_expan_var()
  13458. *
  13459. * @return
  13460. * An array describing the 'phylonode_relationship' table
  13461. *
  13462. * @ingroup tripal_chado_v1.3_schema_api
  13463. *
  13464. */
  13465. function tripal_chado_chado_schema_v1_3_phylonode_relationship() {
  13466. $description = array(
  13467. 'description' => '',
  13468. 'table' => 'phylonode_relationship',
  13469. 'fields' => array(
  13470. 'phylonode_relationship_id' => array(
  13471. 'size' => 'big',
  13472. 'type' => 'serial',
  13473. 'not null' => TRUE,
  13474. ),
  13475. 'subject_id' => array(
  13476. 'size' => 'big',
  13477. 'type' => 'int',
  13478. 'not null' => TRUE,
  13479. ),
  13480. 'object_id' => array(
  13481. 'size' => 'big',
  13482. 'type' => 'int',
  13483. 'not null' => TRUE,
  13484. ),
  13485. 'type_id' => array(
  13486. 'size' => 'big',
  13487. 'type' => 'int',
  13488. 'not null' => TRUE,
  13489. ),
  13490. 'rank' => array(
  13491. 'size' => 'normal',
  13492. 'type' => 'int',
  13493. 'not null' => FALSE,
  13494. ),
  13495. 'phylotree_id' => array(
  13496. 'size' => 'big',
  13497. 'type' => 'int',
  13498. 'not null' => TRUE,
  13499. ),
  13500. ),
  13501. 'indexes' => array(
  13502. 'phylonode_relationship_idx1' => array(
  13503. 0 => 'subject_id',
  13504. ),
  13505. 'phylonode_relationship_idx2' => array(
  13506. 0 => 'object_id',
  13507. ),
  13508. 'phylonode_relationship_idx3' => array(
  13509. 0 => 'type_id',
  13510. ),
  13511. ),
  13512. 'primary key' => array(
  13513. 0 => 'phylonode_relationship_id',
  13514. ),
  13515. 'unique keys' => array(
  13516. 'subject_id_object_id_type_id' => array(
  13517. 0 => 'subject_id',
  13518. 1 => 'object_id',
  13519. 2 => 'type_id',
  13520. ),
  13521. ),
  13522. 'foreign keys' => array(
  13523. 'phylonode' => array(
  13524. 'table' => 'phylonode',
  13525. 'columns' => array(
  13526. 'subject_id' => 'phylonode_id',
  13527. 'object_id' => 'phylonode_id',
  13528. ),
  13529. ),
  13530. 'cvterm' => array(
  13531. 'table' => 'cvterm',
  13532. 'columns' => array(
  13533. 'type_id' => 'cvterm_id',
  13534. ),
  13535. ),
  13536. 'phylotree' => array(
  13537. 'table' => 'phylotree',
  13538. 'columns' => array(
  13539. 'phylotree_id' => 'phylotree_id',
  13540. ),
  13541. ),
  13542. ),
  13543. 'referring_tables' => array(
  13544. ),
  13545. );
  13546. return $description;
  13547. }
  13548. /**
  13549. * Implements hook_chado_schema_v1_3_phylotree()
  13550. *
  13551. * Purpose: To describe the structure of 'phylotree' to tripal
  13552. * @see chado_insert_record()
  13553. * @see chado_update_record()
  13554. * @see chado_select_record()
  13555. * @see chado_generate_var()
  13556. * @see chado_expan_var()
  13557. *
  13558. * @return
  13559. * An array describing the 'phylotree' table
  13560. *
  13561. * @ingroup tripal_chado_v1.3_schema_api
  13562. *
  13563. */
  13564. function tripal_chado_chado_schema_v1_3_phylotree() {
  13565. $description = array(
  13566. 'description' => '',
  13567. 'table' => 'phylotree',
  13568. 'fields' => array(
  13569. 'phylotree_id' => array(
  13570. 'size' => 'big',
  13571. 'type' => 'serial',
  13572. 'not null' => TRUE,
  13573. ),
  13574. 'dbxref_id' => array(
  13575. 'size' => 'big',
  13576. 'type' => 'int',
  13577. 'not null' => TRUE,
  13578. ),
  13579. 'name' => array(
  13580. 'size' => 'normal',
  13581. 'type' => 'varchar',
  13582. 'length' => '255',
  13583. 'not null' => FALSE,
  13584. ),
  13585. 'type_id' => array(
  13586. 'size' => 'big',
  13587. 'type' => 'int',
  13588. 'not null' => FALSE,
  13589. ),
  13590. 'analysis_id' => array(
  13591. 'size' => 'big',
  13592. 'type' => 'int',
  13593. 'not null' => FALSE,
  13594. ),
  13595. 'comment' => array(
  13596. 'size' => 'normal',
  13597. 'type' => 'text',
  13598. 'not null' => FALSE,
  13599. ),
  13600. ),
  13601. 'indexes' => array(
  13602. 'phylotree_idx1' => array(
  13603. 0 => 'phylotree_id',
  13604. ),
  13605. ),
  13606. 'primary key' => array(
  13607. 0 => 'phylotree_id',
  13608. ),
  13609. 'foreign keys' => array(
  13610. 'dbxref' => array(
  13611. 'table' => 'dbxref',
  13612. 'columns' => array(
  13613. 'dbxref_id' => 'dbxref_id',
  13614. ),
  13615. ),
  13616. 'cvterm' => array(
  13617. 'table' => 'cvterm',
  13618. 'columns' => array(
  13619. 'type_id' => 'cvterm_id',
  13620. ),
  13621. ),
  13622. 'analysis' => array(
  13623. 'table' => 'analysis',
  13624. 'columns' => array(
  13625. 'analysis_id' => 'analysis_id',
  13626. ),
  13627. ),
  13628. ),
  13629. 'referring_tables' => array(
  13630. 0 => 'phylonode',
  13631. 1 => 'phylonode_relationship',
  13632. 2 => 'phylotreeprop',
  13633. 3 => 'phylotree_pub',
  13634. ),
  13635. );
  13636. return $description;
  13637. }
  13638. /**
  13639. * Implements hook_chado_schema_v1_3_phylotreeprop()
  13640. *
  13641. * Purpose: To describe the structure of 'phylotreeprop' to tripal
  13642. * @see chado_insert_record()
  13643. * @see chado_update_record()
  13644. * @see chado_select_record()
  13645. * @see chado_generate_var()
  13646. * @see chado_expan_var()
  13647. *
  13648. * @return
  13649. * An array describing the 'phylotreeprop' table
  13650. *
  13651. * @ingroup tripal_chado_v1.3_schema_api
  13652. *
  13653. */
  13654. function tripal_chado_chado_schema_v1_3_phylotreeprop() {
  13655. $description = array(
  13656. 'description' => '',
  13657. 'table' => 'phylotreeprop',
  13658. 'fields' => array(
  13659. 'phylotreeprop_id' => array(
  13660. 'size' => 'big',
  13661. 'type' => 'serial',
  13662. 'not null' => TRUE,
  13663. ),
  13664. 'phylotree_id' => array(
  13665. 'size' => 'big',
  13666. 'type' => 'int',
  13667. 'not null' => TRUE,
  13668. ),
  13669. 'type_id' => array(
  13670. 'size' => 'big',
  13671. 'type' => 'int',
  13672. 'not null' => TRUE,
  13673. ),
  13674. 'value' => array(
  13675. 'size' => 'normal',
  13676. 'type' => 'text',
  13677. 'not null' => FALSE,
  13678. ),
  13679. 'rank' => array(
  13680. 'size' => 'normal',
  13681. 'type' => 'int',
  13682. 'not null' => TRUE,
  13683. 'default' => 0,
  13684. ),
  13685. ),
  13686. 'unique keys' => array(
  13687. 'phylotreeprop_c1' => array(
  13688. 0 => 'phylotree_id',
  13689. 1 => 'type_id',
  13690. 2 => 'rank',
  13691. ),
  13692. ),
  13693. 'indexes' => array(
  13694. 'phylotreeprop_idx1' => array(
  13695. 0 => 'phylotree_id',
  13696. ),
  13697. 'phylotreeprop_idx2' => array(
  13698. 0 => 'type_id',
  13699. ),
  13700. ),
  13701. 'primary key' => array(
  13702. 0 => 'phylotreeprop_id',
  13703. ),
  13704. 'foreign keys' => array(
  13705. 'phylotree' => array(
  13706. 'table' => 'phylotree',
  13707. 'columns' => array(
  13708. 'phylotree_id' => 'phylotree_id',
  13709. ),
  13710. ),
  13711. 'cvterm' => array(
  13712. 'table' => 'cvterm',
  13713. 'columns' => array(
  13714. 'type_id' => 'cvterm_id',
  13715. ),
  13716. ),
  13717. ),
  13718. 'referring_tables' => array(
  13719. ),
  13720. );
  13721. return $description;
  13722. }
  13723. /**
  13724. * Implements hook_chado_schema_v1_3_phylotree_pub()
  13725. *
  13726. * Purpose: To describe the structure of 'phylotree_pub' to tripal
  13727. * @see chado_insert_record()
  13728. * @see chado_update_record()
  13729. * @see chado_select_record()
  13730. * @see chado_generate_var()
  13731. * @see chado_expan_var()
  13732. *
  13733. * @return
  13734. * An array describing the 'phylotree_pub' table
  13735. *
  13736. * @ingroup tripal_chado_v1.3_schema_api
  13737. *
  13738. */
  13739. function tripal_chado_chado_schema_v1_3_phylotree_pub() {
  13740. $description = array(
  13741. 'description' => '',
  13742. 'table' => 'phylotree_pub',
  13743. 'fields' => array(
  13744. 'phylotree_pub_id' => array(
  13745. 'size' => 'big',
  13746. 'type' => 'serial',
  13747. 'not null' => TRUE,
  13748. ),
  13749. 'phylotree_id' => array(
  13750. 'size' => 'big',
  13751. 'type' => 'int',
  13752. 'not null' => TRUE,
  13753. ),
  13754. 'pub_id' => array(
  13755. 'size' => 'big',
  13756. 'type' => 'int',
  13757. 'not null' => TRUE,
  13758. ),
  13759. ),
  13760. 'indexes' => array(
  13761. 'phylotree_pub_idx1' => array(
  13762. 0 => 'phylotree_id',
  13763. ),
  13764. 'phylotree_pub_idx2' => array(
  13765. 0 => 'pub_id',
  13766. ),
  13767. ),
  13768. 'unique keys' => array(
  13769. 'phylotree_id_pub_id' => array(
  13770. 0 => 'phylotree_id',
  13771. 1 => 'pub_id',
  13772. ),
  13773. ),
  13774. 'primary key' => array(
  13775. 0 => 'phylotree_pub_id',
  13776. ),
  13777. 'foreign keys' => array(
  13778. 'phylotree' => array(
  13779. 'table' => 'phylotree',
  13780. 'columns' => array(
  13781. 'phylotree_id' => 'phylotree_id',
  13782. ),
  13783. ),
  13784. 'pub' => array(
  13785. 'table' => 'pub',
  13786. 'columns' => array(
  13787. 'pub_id' => 'pub_id',
  13788. ),
  13789. ),
  13790. ),
  13791. 'referring_tables' => array(
  13792. ),
  13793. );
  13794. return $description;
  13795. }
  13796. /**
  13797. * Implements hook_chado_schema_v1_3_project()
  13798. *
  13799. * Purpose: To describe the structure of 'project' to tripal
  13800. * @see chado_insert_record()
  13801. * @see chado_update_record()
  13802. * @see chado_select_record()
  13803. * @see chado_generate_var()
  13804. * @see chado_expan_var()
  13805. *
  13806. * @return
  13807. * An array describing the 'project' table
  13808. *
  13809. * @ingroup tripal_chado_v1.3_schema_api
  13810. *
  13811. */
  13812. function tripal_chado_chado_schema_v1_3_project() {
  13813. $description = array(
  13814. 'description' => '',
  13815. 'table' => 'project',
  13816. 'fields' => array(
  13817. 'project_id' => array(
  13818. 'size' => 'big',
  13819. 'type' => 'serial',
  13820. 'not null' => TRUE,
  13821. ),
  13822. 'name' => array(
  13823. 'size' => 'normal',
  13824. 'type' => 'varchar',
  13825. 'length' => '255',
  13826. 'not null' => TRUE,
  13827. ),
  13828. 'description' => array(
  13829. 'size' => 'normal',
  13830. 'type' => 'text',
  13831. 'not null' => FALSE,
  13832. ),
  13833. ),
  13834. 'unique keys' => array(
  13835. 'project_c1' => array(
  13836. 0 => 'name',
  13837. ),
  13838. ),
  13839. 'primary key' => array(
  13840. 0 => 'project_id',
  13841. ),
  13842. 'foreign keys' => array(
  13843. ),
  13844. 'referring_tables' => array(
  13845. 0 => 'assay_project',
  13846. 1 => 'nd_experiment_project',
  13847. 2 => 'project_analysis',
  13848. 3 => 'project_contact',
  13849. 4 => 'project_dbxref',
  13850. 5 => 'project_feature',
  13851. 6 => 'projectprop',
  13852. 7 => 'project_pub',
  13853. 8 => 'project_relationship',
  13854. 10 => 'project_stock',
  13855. ),
  13856. );
  13857. return $description;
  13858. }
  13859. /**
  13860. * Implements hook_chado_schema_v1_3_project_analysis()
  13861. *
  13862. * Purpose: To describe the structure of 'project_analysis' to tripal
  13863. * @see chado_insert_record()
  13864. * @see chado_update_record()
  13865. * @see chado_select_record()
  13866. * @see chado_generate_var()
  13867. * @see chado_expan_var()
  13868. *
  13869. * @return
  13870. * An array describing the 'project_analysis' table
  13871. *
  13872. * @ingroup tripal_chado_v1.3_schema_api
  13873. *
  13874. */
  13875. function tripal_chado_chado_schema_v1_3_project_analysis() {
  13876. $description = array(
  13877. 'description' => '',
  13878. 'table' => 'project_analysis',
  13879. 'fields' => array(
  13880. 'project_analysis_id' => array(
  13881. 'size' => 'big',
  13882. 'type' => 'serial',
  13883. 'not null' => TRUE,
  13884. ),
  13885. 'project_id' => array(
  13886. 'size' => 'big',
  13887. 'type' => 'int',
  13888. 'not null' => TRUE,
  13889. ),
  13890. 'analysis_id' => array(
  13891. 'size' => 'big',
  13892. 'type' => 'int',
  13893. 'not null' => TRUE,
  13894. ),
  13895. 'rank' => array(
  13896. 'size' => 'normal',
  13897. 'type' => 'int',
  13898. 'not null' => TRUE,
  13899. 'default' => 0,
  13900. ),
  13901. ),
  13902. 'unique keys' => array(
  13903. 'project_analysis_c1' => array(
  13904. 0 => 'project_id',
  13905. 1 => 'analysis_id',
  13906. ),
  13907. ),
  13908. 'indexes' => array(
  13909. 'project_analysis_idx1' => array(
  13910. 0 => 'project_id',
  13911. ),
  13912. 'project_analysis_idx2' => array(
  13913. 0 => 'analysis_id',
  13914. ),
  13915. ),
  13916. 'primary key' => array(
  13917. 0 => 'project_analysis_id',
  13918. ),
  13919. 'foreign keys' => array(
  13920. 'project' => array(
  13921. 'table' => 'project',
  13922. 'columns' => array(
  13923. 'project_id' => 'project_id',
  13924. ),
  13925. ),
  13926. 'analysis' => array(
  13927. 'table' => 'analysis',
  13928. 'columns' => array(
  13929. 'analysis_id' => 'analysis_id',
  13930. ),
  13931. ),
  13932. ),
  13933. 'referring_tables' => array(
  13934. ),
  13935. );
  13936. return $description;
  13937. }
  13938. /**
  13939. * Implements hook_chado_schema_v1_3_project_contact()
  13940. *
  13941. * Purpose: To describe the structure of 'project_contact' to tripal
  13942. * @see chado_insert_record()
  13943. * @see chado_update_record()
  13944. * @see chado_select_record()
  13945. * @see chado_generate_var()
  13946. * @see chado_expan_var()
  13947. *
  13948. * @return
  13949. * An array describing the 'project_contact' table
  13950. *
  13951. * @ingroup tripal_chado_v1.3_schema_api
  13952. *
  13953. */
  13954. function tripal_chado_chado_schema_v1_3_project_contact() {
  13955. $description = array(
  13956. 'description' => '',
  13957. 'table' => 'project_contact',
  13958. 'fields' => array(
  13959. 'project_contact_id' => array(
  13960. 'size' => 'big',
  13961. 'type' => 'serial',
  13962. 'not null' => TRUE,
  13963. ),
  13964. 'project_id' => array(
  13965. 'size' => 'big',
  13966. 'type' => 'int',
  13967. 'not null' => TRUE,
  13968. ),
  13969. 'contact_id' => array(
  13970. 'size' => 'big',
  13971. 'type' => 'int',
  13972. 'not null' => TRUE,
  13973. ),
  13974. ),
  13975. 'unique keys' => array(
  13976. 'project_contact_c1' => array(
  13977. 0 => 'project_id',
  13978. 1 => 'contact_id',
  13979. ),
  13980. ),
  13981. 'indexes' => array(
  13982. 'project_contact_idx1' => array(
  13983. 0 => 'project_id',
  13984. ),
  13985. 'project_contact_idx2' => array(
  13986. 0 => 'contact_id',
  13987. ),
  13988. ),
  13989. 'primary key' => array(
  13990. 0 => 'project_contact_id',
  13991. ),
  13992. 'foreign keys' => array(
  13993. 'project' => array(
  13994. 'table' => 'project',
  13995. 'columns' => array(
  13996. 'project_id' => 'project_id',
  13997. ),
  13998. ),
  13999. 'contact' => array(
  14000. 'table' => 'contact',
  14001. 'columns' => array(
  14002. 'contact_id' => 'contact_id',
  14003. ),
  14004. ),
  14005. ),
  14006. 'referring_tables' => array(
  14007. ),
  14008. );
  14009. return $description;
  14010. }
  14011. /**
  14012. * Implements hook_chado_schema_v1_3_project_dbxref()
  14013. *
  14014. * Purpose: To describe the structure of 'project_dbxref' to tripal
  14015. * @see chado_insert_record()
  14016. * @see chado_update_record()
  14017. * @see chado_select_record()
  14018. * @see chado_generate_var()
  14019. * @see chado_expan_var()
  14020. *
  14021. * @return
  14022. * An array describing the 'project_dbxref' table
  14023. *
  14024. * @ingroup tripal_chado_v1.3_schema_api
  14025. *
  14026. */
  14027. function tripal_chado_chado_schema_v1_3_project_dbxref() {
  14028. $description = array(
  14029. 'description' => '',
  14030. 'table' => 'project_dbxref',
  14031. 'fields' => array(
  14032. 'project_dbxref_id' => array(
  14033. 'size' => 'big',
  14034. 'type' => 'serial',
  14035. 'not null' => TRUE,
  14036. ),
  14037. 'project_id' => array(
  14038. 'size' => 'big',
  14039. 'type' => 'int',
  14040. 'not null' => TRUE,
  14041. ),
  14042. 'dbxref_id' => array(
  14043. 'size' => 'big',
  14044. 'type' => 'int',
  14045. 'not null' => TRUE,
  14046. ),
  14047. 'is_current' => array(
  14048. 'size' => 'normal',
  14049. 'type' => 'boolean',
  14050. 'not null' => TRUE,
  14051. 'default' => 'true',
  14052. ),
  14053. ),
  14054. 'unique keys' => array(
  14055. 'project_dbxref_c1' => array(
  14056. 0 => 'project_id',
  14057. 1 => 'dbxref_id',
  14058. ),
  14059. ),
  14060. 'indexes' => array(
  14061. 'project_dbxref_idx1' => array(
  14062. 0 => 'project_id',
  14063. ),
  14064. 'project_dbxref_idx2' => array(
  14065. 0 => 'dbxref_id',
  14066. ),
  14067. ),
  14068. 'primary key' => array(
  14069. 0 => 'project_dbxref_id',
  14070. ),
  14071. 'foreign keys' => array(
  14072. 'dbxref' => array(
  14073. 'table' => 'dbxref',
  14074. 'columns' => array(
  14075. 'dbxref_id' => 'dbxref_id',
  14076. ),
  14077. ),
  14078. 'project' => array(
  14079. 'table' => 'project',
  14080. 'columns' => array(
  14081. 'project_id' => 'project_id',
  14082. ),
  14083. ),
  14084. ),
  14085. 'referring_tables' => array(
  14086. ),
  14087. );
  14088. return $description;
  14089. }
  14090. /**
  14091. * Implements hook_chado_schema_v1_3_project_feature()
  14092. *
  14093. * Purpose: To describe the structure of 'project_feature' to tripal
  14094. * @see chado_insert_record()
  14095. * @see chado_update_record()
  14096. * @see chado_select_record()
  14097. * @see chado_generate_var()
  14098. * @see chado_expan_var()
  14099. *
  14100. * @return
  14101. * An array describing the 'project_feature' table
  14102. *
  14103. * @ingroup tripal_chado_v1.3_schema_api
  14104. *
  14105. */
  14106. function tripal_chado_chado_schema_v1_3_project_feature() {
  14107. $description = array(
  14108. 'description' => '',
  14109. 'table' => 'project_feature',
  14110. 'fields' => array(
  14111. 'project_feature_id' => array(
  14112. 'size' => 'big',
  14113. 'type' => 'serial',
  14114. 'not null' => TRUE,
  14115. ),
  14116. 'feature_id' => array(
  14117. 'size' => 'big',
  14118. 'type' => 'int',
  14119. 'not null' => TRUE,
  14120. ),
  14121. 'project_id' => array(
  14122. 'size' => 'big',
  14123. 'type' => 'int',
  14124. 'not null' => TRUE,
  14125. ),
  14126. ),
  14127. 'unique keys' => array(
  14128. 'project_feature_c1' => array(
  14129. 0 => 'feature_id',
  14130. 1 => 'project_id',
  14131. ),
  14132. ),
  14133. 'indexes' => array(
  14134. 'project_feature_idx1' => array(
  14135. 0 => 'feature_id',
  14136. ),
  14137. 'project_feature_idx2' => array(
  14138. 0 => 'project_id',
  14139. ),
  14140. ),
  14141. 'primary key' => array(
  14142. 0 => 'project_feature_id',
  14143. ),
  14144. 'foreign keys' => array(
  14145. 'feature' => array(
  14146. 'table' => 'feature',
  14147. 'columns' => array(
  14148. 'feature_id' => 'feature_id',
  14149. ),
  14150. ),
  14151. 'project' => array(
  14152. 'table' => 'project',
  14153. 'columns' => array(
  14154. 'project_id' => 'project_id',
  14155. ),
  14156. ),
  14157. ),
  14158. 'referring_tables' => array(
  14159. ),
  14160. );
  14161. return $description;
  14162. }
  14163. /**
  14164. * Implements hook_chado_schema_v1_3_projectprop()
  14165. *
  14166. * Purpose: To describe the structure of 'projectprop' to tripal
  14167. * @see chado_insert_record()
  14168. * @see chado_update_record()
  14169. * @see chado_select_record()
  14170. * @see chado_generate_var()
  14171. * @see chado_expan_var()
  14172. *
  14173. * @return
  14174. * An array describing the 'projectprop' table
  14175. *
  14176. * @ingroup tripal_chado_v1.3_schema_api
  14177. *
  14178. */
  14179. function tripal_chado_chado_schema_v1_3_projectprop() {
  14180. $description = array(
  14181. 'description' => '',
  14182. 'table' => 'projectprop',
  14183. 'fields' => array(
  14184. 'projectprop_id' => array(
  14185. 'size' => 'big',
  14186. 'type' => 'serial',
  14187. 'not null' => TRUE,
  14188. ),
  14189. 'project_id' => array(
  14190. 'size' => 'big',
  14191. 'type' => 'int',
  14192. 'not null' => TRUE,
  14193. ),
  14194. 'type_id' => array(
  14195. 'size' => 'big',
  14196. 'type' => 'int',
  14197. 'not null' => TRUE,
  14198. ),
  14199. 'value' => array(
  14200. 'size' => 'normal',
  14201. 'type' => 'text',
  14202. 'not null' => FALSE,
  14203. ),
  14204. 'rank' => array(
  14205. 'size' => 'normal',
  14206. 'type' => 'int',
  14207. 'not null' => TRUE,
  14208. 'default' => 0,
  14209. ),
  14210. ),
  14211. 'unique keys' => array(
  14212. 'projectprop_c1' => array(
  14213. 0 => 'project_id',
  14214. 1 => 'type_id',
  14215. 2 => 'rank',
  14216. ),
  14217. ),
  14218. 'primary key' => array(
  14219. 0 => 'projectprop_id',
  14220. ),
  14221. 'foreign keys' => array(
  14222. 'project' => array(
  14223. 'table' => 'project',
  14224. 'columns' => array(
  14225. 'project_id' => 'project_id',
  14226. ),
  14227. ),
  14228. 'cvterm' => array(
  14229. 'table' => 'cvterm',
  14230. 'columns' => array(
  14231. 'type_id' => 'cvterm_id',
  14232. ),
  14233. ),
  14234. ),
  14235. 'referring_tables' => array(
  14236. ),
  14237. );
  14238. return $description;
  14239. }
  14240. /**
  14241. * Implements hook_chado_schema_v1_3_project_pub()
  14242. *
  14243. * Purpose: To describe the structure of 'project_pub' to tripal
  14244. * @see chado_insert_record()
  14245. * @see chado_update_record()
  14246. * @see chado_select_record()
  14247. * @see chado_generate_var()
  14248. * @see chado_expan_var()
  14249. *
  14250. * @return
  14251. * An array describing the 'project_pub' table
  14252. *
  14253. * @ingroup tripal_chado_v1.3_schema_api
  14254. *
  14255. */
  14256. function tripal_chado_chado_schema_v1_3_project_pub() {
  14257. $description = array(
  14258. 'description' => '',
  14259. 'table' => 'project_pub',
  14260. 'fields' => array(
  14261. 'project_pub_id' => array(
  14262. 'size' => 'big',
  14263. 'type' => 'serial',
  14264. 'not null' => TRUE,
  14265. ),
  14266. 'project_id' => array(
  14267. 'size' => 'big',
  14268. 'type' => 'int',
  14269. 'not null' => TRUE,
  14270. ),
  14271. 'pub_id' => array(
  14272. 'size' => 'big',
  14273. 'type' => 'int',
  14274. 'not null' => TRUE,
  14275. ),
  14276. ),
  14277. 'unique keys' => array(
  14278. 'project_pub_c1' => array(
  14279. 0 => 'project_id',
  14280. 1 => 'pub_id',
  14281. ),
  14282. ),
  14283. 'indexes' => array(
  14284. 'project_pub_idx1' => array(
  14285. 0 => 'project_id',
  14286. ),
  14287. 'project_pub_idx2' => array(
  14288. 0 => 'pub_id',
  14289. ),
  14290. ),
  14291. 'primary key' => array(
  14292. 0 => 'project_pub_id',
  14293. ),
  14294. 'foreign keys' => array(
  14295. 'project' => array(
  14296. 'table' => 'project',
  14297. 'columns' => array(
  14298. 'project_id' => 'project_id',
  14299. ),
  14300. ),
  14301. 'pub' => array(
  14302. 'table' => 'pub',
  14303. 'columns' => array(
  14304. 'pub_id' => 'pub_id',
  14305. ),
  14306. ),
  14307. ),
  14308. 'referring_tables' => array(
  14309. ),
  14310. );
  14311. return $description;
  14312. }
  14313. /**
  14314. * Implements hook_chado_schema_v1_3_project_relationship()
  14315. *
  14316. * Purpose: To describe the structure of 'project_relationship' to tripal
  14317. * @see chado_insert_record()
  14318. * @see chado_update_record()
  14319. * @see chado_select_record()
  14320. * @see chado_generate_var()
  14321. * @see chado_expan_var()
  14322. *
  14323. * @return
  14324. * An array describing the 'project_relationship' table
  14325. *
  14326. * @ingroup tripal_chado_v1.3_schema_api
  14327. *
  14328. */
  14329. function tripal_chado_chado_schema_v1_3_project_relationship() {
  14330. $description = array(
  14331. 'description' => '',
  14332. 'table' => 'project_relationship',
  14333. 'fields' => array(
  14334. 'project_relationship_id' => array(
  14335. 'size' => 'big',
  14336. 'type' => 'serial',
  14337. 'not null' => TRUE,
  14338. ),
  14339. 'subject_project_id' => array(
  14340. 'size' => 'big',
  14341. 'type' => 'int',
  14342. 'not null' => TRUE,
  14343. ),
  14344. 'object_project_id' => array(
  14345. 'size' => 'big',
  14346. 'type' => 'int',
  14347. 'not null' => TRUE,
  14348. ),
  14349. 'type_id' => array(
  14350. 'size' => 'big',
  14351. 'type' => 'int',
  14352. 'not null' => TRUE,
  14353. ),
  14354. ),
  14355. 'unique keys' => array(
  14356. 'project_relationship_c1' => array(
  14357. 0 => 'subject_project_id',
  14358. 1 => 'object_project_id',
  14359. 2 => 'type_id',
  14360. ),
  14361. ),
  14362. 'primary key' => array(
  14363. 0 => 'project_relationship_id',
  14364. ),
  14365. 'foreign keys' => array(
  14366. 'project' => array(
  14367. 'table' => 'project',
  14368. 'columns' => array(
  14369. 'subject_project_id' => 'project_id',
  14370. 'object_project_id' => 'project_id',
  14371. ),
  14372. ),
  14373. 'cvterm' => array(
  14374. 'table' => 'cvterm',
  14375. 'columns' => array(
  14376. 'type_id' => 'cvterm_id',
  14377. ),
  14378. ),
  14379. ),
  14380. 'referring_tables' => array(
  14381. ),
  14382. );
  14383. return $description;
  14384. }
  14385. /**
  14386. * Implements hook_chado_schema_v1_3_project_stock()
  14387. *
  14388. * Purpose: To describe the structure of 'project_stock' to tripal
  14389. * @see chado_insert_record()
  14390. * @see chado_update_record()
  14391. * @see chado_select_record()
  14392. * @see chado_generate_var()
  14393. * @see chado_expan_var()
  14394. *
  14395. * @return
  14396. * An array describing the 'project_stock' table
  14397. *
  14398. * @ingroup tripal_chado_v1.3_schema_api
  14399. *
  14400. */
  14401. function tripal_chado_chado_schema_v1_3_project_stock() {
  14402. $description = array(
  14403. 'description' => '',
  14404. 'table' => 'project_stock',
  14405. 'fields' => array(
  14406. 'project_stock_id' => array(
  14407. 'size' => 'big',
  14408. 'type' => 'serial',
  14409. 'not null' => TRUE,
  14410. ),
  14411. 'stock_id' => array(
  14412. 'size' => 'big',
  14413. 'type' => 'int',
  14414. 'not null' => TRUE,
  14415. ),
  14416. 'project_id' => array(
  14417. 'size' => 'big',
  14418. 'type' => 'int',
  14419. 'not null' => TRUE,
  14420. ),
  14421. ),
  14422. 'unique keys' => array(
  14423. 'project_stock_c1' => array(
  14424. 0 => 'stock_id',
  14425. 1 => 'project_id',
  14426. ),
  14427. ),
  14428. 'indexes' => array(
  14429. 'project_stock_idx1' => array(
  14430. 0 => 'stock_id',
  14431. ),
  14432. 'project_stock_idx2' => array(
  14433. 0 => 'project_id',
  14434. ),
  14435. ),
  14436. 'primary key' => array(
  14437. 0 => 'project_stock_id',
  14438. ),
  14439. 'foreign keys' => array(
  14440. 'stock' => array(
  14441. 'table' => 'stock',
  14442. 'columns' => array(
  14443. 'stock_id' => 'stock_id',
  14444. ),
  14445. ),
  14446. 'project' => array(
  14447. 'table' => 'project',
  14448. 'columns' => array(
  14449. 'project_id' => 'project_id',
  14450. ),
  14451. ),
  14452. ),
  14453. 'referring_tables' => array(
  14454. ),
  14455. );
  14456. return $description;
  14457. }
  14458. /**
  14459. * Implements hook_chado_schema_v1_3_protocol()
  14460. *
  14461. * Purpose: To describe the structure of 'protocol' to tripal
  14462. * @see chado_insert_record()
  14463. * @see chado_update_record()
  14464. * @see chado_select_record()
  14465. * @see chado_generate_var()
  14466. * @see chado_expan_var()
  14467. *
  14468. * @return
  14469. * An array describing the 'protocol' table
  14470. *
  14471. * @ingroup tripal_chado_v1.3_schema_api
  14472. *
  14473. */
  14474. function tripal_chado_chado_schema_v1_3_protocol() {
  14475. $description = array(
  14476. 'description' => '',
  14477. 'table' => 'protocol',
  14478. 'fields' => array(
  14479. 'protocol_id' => array(
  14480. 'size' => 'big',
  14481. 'type' => 'serial',
  14482. 'not null' => TRUE,
  14483. ),
  14484. 'type_id' => array(
  14485. 'size' => 'big',
  14486. 'type' => 'int',
  14487. 'not null' => TRUE,
  14488. ),
  14489. 'pub_id' => array(
  14490. 'size' => 'big',
  14491. 'type' => 'int',
  14492. 'not null' => FALSE,
  14493. ),
  14494. 'dbxref_id' => array(
  14495. 'size' => 'big',
  14496. 'type' => 'int',
  14497. 'not null' => FALSE,
  14498. ),
  14499. 'name' => array(
  14500. 'size' => 'normal',
  14501. 'type' => 'text',
  14502. 'not null' => TRUE,
  14503. ),
  14504. 'uri' => array(
  14505. 'size' => 'normal',
  14506. 'type' => 'text',
  14507. 'not null' => FALSE,
  14508. ),
  14509. 'protocoldescription' => array(
  14510. 'size' => 'normal',
  14511. 'type' => 'text',
  14512. 'not null' => FALSE,
  14513. ),
  14514. 'hardwaredescription' => array(
  14515. 'size' => 'normal',
  14516. 'type' => 'text',
  14517. 'not null' => FALSE,
  14518. ),
  14519. 'softwaredescription' => array(
  14520. 'size' => 'normal',
  14521. 'type' => 'text',
  14522. 'not null' => FALSE,
  14523. ),
  14524. ),
  14525. 'unique keys' => array(
  14526. 'protocol_c1' => array(
  14527. 0 => 'name',
  14528. ),
  14529. ),
  14530. 'indexes' => array(
  14531. 'protocol_idx1' => array(
  14532. 0 => 'type_id',
  14533. ),
  14534. 'protocol_idx2' => array(
  14535. 0 => 'pub_id',
  14536. ),
  14537. 'protocol_idx3' => array(
  14538. 0 => 'dbxref_id',
  14539. ),
  14540. ),
  14541. 'primary key' => array(
  14542. 0 => 'protocol_id',
  14543. ),
  14544. 'foreign keys' => array(
  14545. 'cvterm' => array(
  14546. 'table' => 'cvterm',
  14547. 'columns' => array(
  14548. 'type_id' => 'cvterm_id',
  14549. ),
  14550. ),
  14551. 'pub' => array(
  14552. 'table' => 'pub',
  14553. 'columns' => array(
  14554. 'pub_id' => 'pub_id',
  14555. ),
  14556. ),
  14557. 'dbxref' => array(
  14558. 'table' => 'dbxref',
  14559. 'columns' => array(
  14560. 'dbxref_id' => 'dbxref_id',
  14561. ),
  14562. ),
  14563. ),
  14564. 'referring_tables' => array(
  14565. 0 => 'acquisition',
  14566. 1 => 'arraydesign',
  14567. 2 => 'assay',
  14568. 3 => 'protocolparam',
  14569. 4 => 'quantification',
  14570. 5 => 'treatment',
  14571. ),
  14572. );
  14573. return $description;
  14574. }
  14575. /**
  14576. * Implements hook_chado_schema_v1_3_protocolparam()
  14577. *
  14578. * Purpose: To describe the structure of 'protocolparam' to tripal
  14579. * @see chado_insert_record()
  14580. * @see chado_update_record()
  14581. * @see chado_select_record()
  14582. * @see chado_generate_var()
  14583. * @see chado_expan_var()
  14584. *
  14585. * @return
  14586. * An array describing the 'protocolparam' table
  14587. *
  14588. * @ingroup tripal_chado_v1.3_schema_api
  14589. *
  14590. */
  14591. function tripal_chado_chado_schema_v1_3_protocolparam() {
  14592. $description = array(
  14593. 'description' => '',
  14594. 'table' => 'protocolparam',
  14595. 'fields' => array(
  14596. 'protocolparam_id' => array(
  14597. 'size' => 'big',
  14598. 'type' => 'serial',
  14599. 'not null' => TRUE,
  14600. ),
  14601. 'protocol_id' => array(
  14602. 'size' => 'big',
  14603. 'type' => 'int',
  14604. 'not null' => TRUE,
  14605. ),
  14606. 'name' => array(
  14607. 'size' => 'normal',
  14608. 'type' => 'text',
  14609. 'not null' => TRUE,
  14610. ),
  14611. 'datatype_id' => array(
  14612. 'size' => 'big',
  14613. 'type' => 'int',
  14614. 'not null' => FALSE,
  14615. ),
  14616. 'unittype_id' => array(
  14617. 'size' => 'big',
  14618. 'type' => 'int',
  14619. 'not null' => FALSE,
  14620. ),
  14621. 'value' => array(
  14622. 'size' => 'normal',
  14623. 'type' => 'text',
  14624. 'not null' => FALSE,
  14625. ),
  14626. 'rank' => array(
  14627. 'size' => 'normal',
  14628. 'type' => 'int',
  14629. 'not null' => TRUE,
  14630. 'default' => 0,
  14631. ),
  14632. ),
  14633. 'indexes' => array(
  14634. 'protocolparam_idx1' => array(
  14635. 0 => 'protocol_id',
  14636. ),
  14637. 'protocolparam_idx2' => array(
  14638. 0 => 'datatype_id',
  14639. ),
  14640. 'protocolparam_idx3' => array(
  14641. 0 => 'unittype_id',
  14642. ),
  14643. ),
  14644. 'primary key' => array(
  14645. 0 => 'protocolparam_id',
  14646. ),
  14647. 'foreign keys' => array(
  14648. 'protocol' => array(
  14649. 'table' => 'protocol',
  14650. 'columns' => array(
  14651. 'protocol_id' => 'protocol_id',
  14652. ),
  14653. ),
  14654. 'cvterm' => array(
  14655. 'table' => 'cvterm',
  14656. 'columns' => array(
  14657. 'datatype_id' => 'cvterm_id',
  14658. 'unittype_id' => 'cvterm_id',
  14659. ),
  14660. ),
  14661. ),
  14662. 'referring_tables' => array(
  14663. ),
  14664. );
  14665. return $description;
  14666. }
  14667. /**
  14668. * Implements hook_chado_schema_v1_3_pub()
  14669. *
  14670. * Purpose: To describe the structure of 'pub' to tripal
  14671. * @see chado_insert_record()
  14672. * @see chado_update_record()
  14673. * @see chado_select_record()
  14674. * @see chado_generate_var()
  14675. * @see chado_expan_var()
  14676. *
  14677. * @return
  14678. * An array describing the 'pub' table
  14679. *
  14680. * @ingroup tripal_chado_v1.3_schema_api
  14681. *
  14682. */
  14683. function tripal_chado_chado_schema_v1_3_pub() {
  14684. $description = array(
  14685. 'description' => '',
  14686. 'table' => 'pub',
  14687. 'fields' => array(
  14688. 'pub_id' => array(
  14689. 'size' => 'big',
  14690. 'type' => 'serial',
  14691. 'not null' => TRUE,
  14692. ),
  14693. 'title' => array(
  14694. 'size' => 'normal',
  14695. 'type' => 'text',
  14696. 'not null' => FALSE,
  14697. ),
  14698. 'volumetitle' => array(
  14699. 'size' => 'normal',
  14700. 'type' => 'text',
  14701. 'not null' => FALSE,
  14702. ),
  14703. 'volume' => array(
  14704. 'size' => 'normal',
  14705. 'type' => 'varchar',
  14706. 'length' => '255',
  14707. 'not null' => FALSE,
  14708. ),
  14709. 'series_name' => array(
  14710. 'size' => 'normal',
  14711. 'type' => 'varchar',
  14712. 'length' => '255',
  14713. 'not null' => FALSE,
  14714. ),
  14715. 'issue' => array(
  14716. 'size' => 'normal',
  14717. 'type' => 'varchar',
  14718. 'length' => '255',
  14719. 'not null' => FALSE,
  14720. ),
  14721. 'pyear' => array(
  14722. 'size' => 'normal',
  14723. 'type' => 'varchar',
  14724. 'length' => '255',
  14725. 'not null' => FALSE,
  14726. ),
  14727. 'pages' => array(
  14728. 'size' => 'normal',
  14729. 'type' => 'varchar',
  14730. 'length' => '255',
  14731. 'not null' => FALSE,
  14732. ),
  14733. 'miniref' => array(
  14734. 'size' => 'normal',
  14735. 'type' => 'varchar',
  14736. 'length' => '255',
  14737. 'not null' => FALSE,
  14738. ),
  14739. 'uniquename' => array(
  14740. 'size' => 'normal',
  14741. 'type' => 'text',
  14742. 'not null' => TRUE,
  14743. ),
  14744. 'type_id' => array(
  14745. 'size' => 'big',
  14746. 'type' => 'int',
  14747. 'not null' => TRUE,
  14748. ),
  14749. 'is_obsolete' => array(
  14750. 'size' => 'normal',
  14751. 'type' => 'boolean',
  14752. 'not null' => FALSE,
  14753. 'default' => FALSE,
  14754. ),
  14755. 'publisher' => array(
  14756. 'size' => 'normal',
  14757. 'type' => 'varchar',
  14758. 'length' => '255',
  14759. 'not null' => FALSE,
  14760. ),
  14761. 'pubplace' => array(
  14762. 'size' => 'normal',
  14763. 'type' => 'varchar',
  14764. 'length' => '255',
  14765. 'not null' => FALSE,
  14766. ),
  14767. ),
  14768. 'unique keys' => array(
  14769. 'pub_c1' => array(
  14770. 0 => 'uniquename',
  14771. ),
  14772. ),
  14773. 'indexes' => array(
  14774. 'pub_idx1' => array(
  14775. 0 => 'type_id',
  14776. ),
  14777. ),
  14778. 'primary key' => array(
  14779. 0 => 'pub_id',
  14780. ),
  14781. 'foreign keys' => array(
  14782. 'cvterm' => array(
  14783. 'table' => 'cvterm',
  14784. 'columns' => array(
  14785. 'type_id' => 'cvterm_id',
  14786. ),
  14787. ),
  14788. ),
  14789. 'referring_tables' => array(
  14790. 0 => 'analysis_pub',
  14791. 1 => 'cell_line_cvterm',
  14792. 2 => 'cell_line_feature',
  14793. 3 => 'cell_line_library',
  14794. 4 => 'cell_lineprop_pub',
  14795. 5 => 'cell_line_pub',
  14796. 6 => 'cell_line_synonym',
  14797. 7 => 'expression_pub',
  14798. 8 => 'feature_cvterm',
  14799. 9 => 'feature_cvterm_pub',
  14800. 10 => 'feature_expression',
  14801. 11 => 'featureloc_pub',
  14802. 12 => 'featuremap_pub',
  14803. 13 => 'featureprop_pub',
  14804. 14 => 'feature_pub',
  14805. 15 => 'feature_relationshipprop_pub',
  14806. 16 => 'feature_relationship_pub',
  14807. 17 => 'feature_synonym',
  14808. 18 => 'library_cvterm',
  14809. 19 => 'library_expression',
  14810. 20 => 'libraryprop_pub',
  14811. 21 => 'library_pub',
  14812. 22 => 'library_relationship_pub',
  14813. 23 => 'library_synonym',
  14814. 24 => 'nd_experiment_pub',
  14815. 25 => 'organism_cvterm',
  14816. 26 => 'organismprop_pub',
  14817. 27 => 'organism_pub',
  14818. 28 => 'phendesc',
  14819. 29 => 'phenotype_comparison',
  14820. 30 => 'phenotype_comparison_cvterm',
  14821. 31 => 'phenstatement',
  14822. 32 => 'phylonode_pub',
  14823. 33 => 'phylotree_pub',
  14824. 34 => 'project_pub',
  14825. 35 => 'protocol',
  14826. 36 => 'pubauthor',
  14827. 37 => 'pub_dbxref',
  14828. 38 => 'pubprop',
  14829. 39 => 'pub_relationship',
  14830. 41 => 'stock_cvterm',
  14831. 42 => 'stockprop_pub',
  14832. 43 => 'stock_pub',
  14833. 44 => 'stock_relationship_cvterm',
  14834. 45 => 'stock_relationship_pub',
  14835. 46 => 'study',
  14836. ),
  14837. );
  14838. return $description;
  14839. }
  14840. /**
  14841. * Implements hook_chado_schema_v1_3_pubauthor()
  14842. *
  14843. * Purpose: To describe the structure of 'pubauthor' to tripal
  14844. * @see chado_insert_record()
  14845. * @see chado_update_record()
  14846. * @see chado_select_record()
  14847. * @see chado_generate_var()
  14848. * @see chado_expan_var()
  14849. *
  14850. * @return
  14851. * An array describing the 'pubauthor' table
  14852. *
  14853. * @ingroup tripal_chado_v1.3_schema_api
  14854. *
  14855. */
  14856. function tripal_chado_chado_schema_v1_3_pubauthor() {
  14857. $description = array(
  14858. 'description' => '',
  14859. 'table' => 'pubauthor',
  14860. 'fields' => array(
  14861. 'pubauthor_id' => array(
  14862. 'size' => 'big',
  14863. 'type' => 'serial',
  14864. 'not null' => TRUE,
  14865. ),
  14866. 'pub_id' => array(
  14867. 'size' => 'big',
  14868. 'type' => 'int',
  14869. 'not null' => TRUE,
  14870. ),
  14871. 'rank' => array(
  14872. 'size' => 'normal',
  14873. 'type' => 'int',
  14874. 'not null' => TRUE,
  14875. ),
  14876. 'editor' => array(
  14877. 'size' => 'normal',
  14878. 'type' => 'boolean',
  14879. 'not null' => FALSE,
  14880. 'default' => FALSE,
  14881. ),
  14882. 'surname' => array(
  14883. 'size' => 'normal',
  14884. 'type' => 'varchar',
  14885. 'length' => '100',
  14886. 'not null' => TRUE,
  14887. ),
  14888. 'givennames' => array(
  14889. 'size' => 'normal',
  14890. 'type' => 'varchar',
  14891. 'length' => '100',
  14892. 'not null' => FALSE,
  14893. ),
  14894. 'suffix' => array(
  14895. 'size' => 'normal',
  14896. 'type' => 'varchar',
  14897. 'length' => '100',
  14898. 'not null' => FALSE,
  14899. ),
  14900. ),
  14901. 'unique keys' => array(
  14902. 'pubauthor_c1' => array(
  14903. 0 => 'pub_id',
  14904. 1 => 'rank',
  14905. ),
  14906. ),
  14907. 'indexes' => array(
  14908. 'pubauthor_contact_idx1' => array(
  14909. 0 => 'pubauthor_id',
  14910. ),
  14911. 'pubauthor_idx2' => array(
  14912. 0 => 'pub_id',
  14913. ),
  14914. ),
  14915. 'primary key' => array(
  14916. 0 => 'pubauthor_id',
  14917. ),
  14918. 'foreign keys' => array(
  14919. 'pub' => array(
  14920. 'table' => 'pub',
  14921. 'columns' => array(
  14922. 'pub_id' => 'pub_id',
  14923. ),
  14924. ),
  14925. ),
  14926. 'referring_tables' => array(
  14927. 0 => 'pubauthor_contact',
  14928. ),
  14929. );
  14930. return $description;
  14931. }
  14932. /**
  14933. * Implements hook_chado_schema_v1_3_pubauthor_contact()
  14934. *
  14935. * Purpose: To describe the structure of 'pubauthor_contact' to tripal
  14936. * @see chado_insert_record()
  14937. * @see chado_update_record()
  14938. * @see chado_select_record()
  14939. * @see chado_generate_var()
  14940. * @see chado_expan_var()
  14941. *
  14942. * @return
  14943. * An array describing the 'pubauthor_contact' table
  14944. *
  14945. * @ingroup tripal_chado_v1.3_schema_api
  14946. *
  14947. */
  14948. function tripal_chado_chado_schema_v1_3_pubauthor_contact() {
  14949. $description = array(
  14950. 'description' => '',
  14951. 'table' => 'pubauthor_contact',
  14952. 'fields' => array(
  14953. 'pubauthor_contact_id' => array(
  14954. 'size' => 'big',
  14955. 'type' => 'serial',
  14956. 'not null' => TRUE,
  14957. ),
  14958. 'contact_id' => array(
  14959. 'size' => 'big',
  14960. 'type' => 'int',
  14961. 'not null' => TRUE,
  14962. ),
  14963. 'pubauthor_id' => array(
  14964. 'size' => 'big',
  14965. 'type' => 'int',
  14966. 'not null' => TRUE,
  14967. ),
  14968. ),
  14969. 'unique keys' => array(
  14970. 'pubauthor_contact_c1' => array(
  14971. 0 => 'contact_id',
  14972. 1 => 'pubauthor_id',
  14973. ),
  14974. ),
  14975. 'primary key' => array(
  14976. 0 => 'pubauthor_contact_id',
  14977. ),
  14978. 'foreign keys' => array(
  14979. 'pubauthor' => array(
  14980. 'table' => 'pubauthor',
  14981. 'columns' => array(
  14982. 'pubauthor_id' => 'pubauthor_id',
  14983. ),
  14984. ),
  14985. 'contact' => array(
  14986. 'table' => 'contact',
  14987. 'columns' => array(
  14988. 'contact_id' => 'contact_id',
  14989. ),
  14990. ),
  14991. ),
  14992. 'referring_tables' => array(
  14993. ),
  14994. );
  14995. return $description;
  14996. }
  14997. /**
  14998. * Implements hook_chado_schema_v1_3_pub_dbxref()
  14999. *
  15000. * Purpose: To describe the structure of 'pub_dbxref' to tripal
  15001. * @see chado_insert_record()
  15002. * @see chado_update_record()
  15003. * @see chado_select_record()
  15004. * @see chado_generate_var()
  15005. * @see chado_expan_var()
  15006. *
  15007. * @return
  15008. * An array describing the 'pub_dbxref' table
  15009. *
  15010. * @ingroup tripal_chado_v1.3_schema_api
  15011. *
  15012. */
  15013. function tripal_chado_chado_schema_v1_3_pub_dbxref() {
  15014. $description = array(
  15015. 'description' => '',
  15016. 'table' => 'pub_dbxref',
  15017. 'fields' => array(
  15018. 'pub_dbxref_id' => array(
  15019. 'size' => 'big',
  15020. 'type' => 'serial',
  15021. 'not null' => TRUE,
  15022. ),
  15023. 'pub_id' => array(
  15024. 'size' => 'big',
  15025. 'type' => 'int',
  15026. 'not null' => TRUE,
  15027. ),
  15028. 'dbxref_id' => array(
  15029. 'size' => 'big',
  15030. 'type' => 'int',
  15031. 'not null' => TRUE,
  15032. ),
  15033. 'is_current' => array(
  15034. 'size' => 'normal',
  15035. 'type' => 'boolean',
  15036. 'not null' => TRUE,
  15037. 'default' => 'true',
  15038. ),
  15039. ),
  15040. 'unique keys' => array(
  15041. 'pub_dbxref_c1' => array(
  15042. 0 => 'pub_id',
  15043. 1 => 'dbxref_id',
  15044. ),
  15045. ),
  15046. 'indexes' => array(
  15047. 'pub_dbxref_idx1' => array(
  15048. 0 => 'pub_id',
  15049. ),
  15050. 'pub_dbxref_idx2' => array(
  15051. 0 => 'dbxref_id',
  15052. ),
  15053. ),
  15054. 'primary key' => array(
  15055. 0 => 'pub_dbxref_id',
  15056. ),
  15057. 'foreign keys' => array(
  15058. 'pub' => array(
  15059. 'table' => 'pub',
  15060. 'columns' => array(
  15061. 'pub_id' => 'pub_id',
  15062. ),
  15063. ),
  15064. 'dbxref' => array(
  15065. 'table' => 'dbxref',
  15066. 'columns' => array(
  15067. 'dbxref_id' => 'dbxref_id',
  15068. ),
  15069. ),
  15070. ),
  15071. 'referring_tables' => array(
  15072. ),
  15073. );
  15074. return $description;
  15075. }
  15076. /**
  15077. * Implements hook_chado_schema_v1_3_pubprop()
  15078. *
  15079. * Purpose: To describe the structure of 'pubprop' to tripal
  15080. * @see chado_insert_record()
  15081. * @see chado_update_record()
  15082. * @see chado_select_record()
  15083. * @see chado_generate_var()
  15084. * @see chado_expan_var()
  15085. *
  15086. * @return
  15087. * An array describing the 'pubprop' table
  15088. *
  15089. * @ingroup tripal_chado_v1.3_schema_api
  15090. *
  15091. */
  15092. function tripal_chado_chado_schema_v1_3_pubprop() {
  15093. $description = array(
  15094. 'description' => '',
  15095. 'table' => 'pubprop',
  15096. 'fields' => array(
  15097. 'pubprop_id' => array(
  15098. 'size' => 'big',
  15099. 'type' => 'serial',
  15100. 'not null' => TRUE,
  15101. ),
  15102. 'pub_id' => array(
  15103. 'size' => 'big',
  15104. 'type' => 'int',
  15105. 'not null' => TRUE,
  15106. ),
  15107. 'type_id' => array(
  15108. 'size' => 'big',
  15109. 'type' => 'int',
  15110. 'not null' => TRUE,
  15111. ),
  15112. 'value' => array(
  15113. 'size' => 'normal',
  15114. 'type' => 'text',
  15115. 'not null' => TRUE,
  15116. ),
  15117. 'rank' => array(
  15118. 'size' => 'normal',
  15119. 'type' => 'int',
  15120. 'not null' => FALSE,
  15121. ),
  15122. ),
  15123. 'unique keys' => array(
  15124. 'pubprop_c1' => array(
  15125. 0 => 'pub_id',
  15126. 1 => 'type_id',
  15127. 2 => 'rank',
  15128. ),
  15129. ),
  15130. 'indexes' => array(
  15131. 'pubprop_idx1' => array(
  15132. 0 => 'pub_id',
  15133. ),
  15134. 'pubprop_idx2' => array(
  15135. 0 => 'type_id',
  15136. ),
  15137. ),
  15138. 'primary key' => array(
  15139. 0 => 'pubprop_id',
  15140. ),
  15141. 'foreign keys' => array(
  15142. 'pub' => array(
  15143. 'table' => 'pub',
  15144. 'columns' => array(
  15145. 'pub_id' => 'pub_id',
  15146. ),
  15147. ),
  15148. 'cvterm' => array(
  15149. 'table' => 'cvterm',
  15150. 'columns' => array(
  15151. 'type_id' => 'cvterm_id',
  15152. ),
  15153. ),
  15154. ),
  15155. 'referring_tables' => array(
  15156. ),
  15157. );
  15158. return $description;
  15159. }
  15160. /**
  15161. * Implements hook_chado_schema_v1_3_pub_relationship()
  15162. *
  15163. * Purpose: To describe the structure of 'pub_relationship' to tripal
  15164. * @see chado_insert_record()
  15165. * @see chado_update_record()
  15166. * @see chado_select_record()
  15167. * @see chado_generate_var()
  15168. * @see chado_expan_var()
  15169. *
  15170. * @return
  15171. * An array describing the 'pub_relationship' table
  15172. *
  15173. * @ingroup tripal_chado_v1.3_schema_api
  15174. *
  15175. */
  15176. function tripal_chado_chado_schema_v1_3_pub_relationship() {
  15177. $description = array(
  15178. 'description' => '',
  15179. 'table' => 'pub_relationship',
  15180. 'fields' => array(
  15181. 'pub_relationship_id' => array(
  15182. 'size' => 'big',
  15183. 'type' => 'serial',
  15184. 'not null' => TRUE,
  15185. ),
  15186. 'subject_id' => array(
  15187. 'size' => 'big',
  15188. 'type' => 'int',
  15189. 'not null' => TRUE,
  15190. ),
  15191. 'object_id' => array(
  15192. 'size' => 'big',
  15193. 'type' => 'int',
  15194. 'not null' => TRUE,
  15195. ),
  15196. 'type_id' => array(
  15197. 'size' => 'big',
  15198. 'type' => 'int',
  15199. 'not null' => TRUE,
  15200. ),
  15201. ),
  15202. 'unique keys' => array(
  15203. 'pub_relationship_c1' => array(
  15204. 0 => 'subject_id',
  15205. 1 => 'object_id',
  15206. 2 => 'type_id',
  15207. ),
  15208. ),
  15209. 'indexes' => array(
  15210. 'pub_relationship_idx1' => array(
  15211. 0 => 'subject_id',
  15212. ),
  15213. 'pub_relationship_idx2' => array(
  15214. 0 => 'object_id',
  15215. ),
  15216. 'pub_relationship_idx3' => array(
  15217. 0 => 'type_id',
  15218. ),
  15219. ),
  15220. 'primary key' => array(
  15221. 0 => 'pub_relationship_id',
  15222. ),
  15223. 'foreign keys' => array(
  15224. 'pub' => array(
  15225. 'table' => 'pub',
  15226. 'columns' => array(
  15227. 'subject_id' => 'pub_id',
  15228. 'object_id' => 'pub_id',
  15229. ),
  15230. ),
  15231. 'cvterm' => array(
  15232. 'table' => 'cvterm',
  15233. 'columns' => array(
  15234. 'type_id' => 'cvterm_id',
  15235. ),
  15236. ),
  15237. ),
  15238. 'referring_tables' => array(
  15239. ),
  15240. );
  15241. return $description;
  15242. }
  15243. /**
  15244. * Implements hook_chado_schema_v1_3_quantification()
  15245. *
  15246. * Purpose: To describe the structure of 'quantification' to tripal
  15247. * @see chado_insert_record()
  15248. * @see chado_update_record()
  15249. * @see chado_select_record()
  15250. * @see chado_generate_var()
  15251. * @see chado_expan_var()
  15252. *
  15253. * @return
  15254. * An array describing the 'quantification' table
  15255. *
  15256. * @ingroup tripal_chado_v1.3_schema_api
  15257. *
  15258. */
  15259. function tripal_chado_chado_schema_v1_3_quantification() {
  15260. $description = array(
  15261. 'description' => '',
  15262. 'table' => 'quantification',
  15263. 'fields' => array(
  15264. 'quantification_id' => array(
  15265. 'size' => 'big',
  15266. 'type' => 'serial',
  15267. 'not null' => TRUE,
  15268. ),
  15269. 'acquisition_id' => array(
  15270. 'size' => 'big',
  15271. 'type' => 'int',
  15272. 'not null' => TRUE,
  15273. ),
  15274. 'operator_id' => array(
  15275. 'size' => 'big',
  15276. 'type' => 'int',
  15277. 'not null' => FALSE,
  15278. ),
  15279. 'protocol_id' => array(
  15280. 'size' => 'big',
  15281. 'type' => 'int',
  15282. 'not null' => FALSE,
  15283. ),
  15284. 'analysis_id' => array(
  15285. 'size' => 'big',
  15286. 'type' => 'int',
  15287. 'not null' => TRUE,
  15288. ),
  15289. 'quantificationdate' => array(
  15290. 'size' => 'normal',
  15291. 'type' => 'datetime',
  15292. 'not null' => FALSE,
  15293. 'default' => 'now()',
  15294. ),
  15295. 'name' => array(
  15296. 'size' => 'normal',
  15297. 'type' => 'text',
  15298. 'not null' => FALSE,
  15299. ),
  15300. 'uri' => array(
  15301. 'size' => 'normal',
  15302. 'type' => 'text',
  15303. 'not null' => FALSE,
  15304. ),
  15305. ),
  15306. 'unique keys' => array(
  15307. 'quantification_c1' => array(
  15308. 0 => 'name',
  15309. 1 => 'analysis_id',
  15310. ),
  15311. ),
  15312. 'indexes' => array(
  15313. 'quantification_idx1' => array(
  15314. 0 => 'acquisition_id',
  15315. ),
  15316. 'quantification_idx2' => array(
  15317. 0 => 'operator_id',
  15318. ),
  15319. 'quantification_idx3' => array(
  15320. 0 => 'protocol_id',
  15321. ),
  15322. 'quantification_idx4' => array(
  15323. 0 => 'analysis_id',
  15324. ),
  15325. ),
  15326. 'primary key' => array(
  15327. 0 => 'quantification_id',
  15328. ),
  15329. 'foreign keys' => array(
  15330. 'acquisition' => array(
  15331. 'table' => 'acquisition',
  15332. 'columns' => array(
  15333. 'acquisition_id' => 'acquisition_id',
  15334. ),
  15335. ),
  15336. 'contact' => array(
  15337. 'table' => 'contact',
  15338. 'columns' => array(
  15339. 'operator_id' => 'contact_id',
  15340. ),
  15341. ),
  15342. 'protocol' => array(
  15343. 'table' => 'protocol',
  15344. 'columns' => array(
  15345. 'protocol_id' => 'protocol_id',
  15346. ),
  15347. ),
  15348. 'analysis' => array(
  15349. 'table' => 'analysis',
  15350. 'columns' => array(
  15351. 'analysis_id' => 'analysis_id',
  15352. ),
  15353. ),
  15354. ),
  15355. 'referring_tables' => array(
  15356. 0 => 'elementresult',
  15357. 1 => 'quantificationprop',
  15358. 2 => 'quantification_relationship',
  15359. ),
  15360. );
  15361. return $description;
  15362. }
  15363. /**
  15364. * Implements hook_chado_schema_v1_3_quantificationprop()
  15365. *
  15366. * Purpose: To describe the structure of 'quantificationprop' to tripal
  15367. * @see chado_insert_record()
  15368. * @see chado_update_record()
  15369. * @see chado_select_record()
  15370. * @see chado_generate_var()
  15371. * @see chado_expan_var()
  15372. *
  15373. * @return
  15374. * An array describing the 'quantificationprop' table
  15375. *
  15376. * @ingroup tripal_chado_v1.3_schema_api
  15377. *
  15378. */
  15379. function tripal_chado_chado_schema_v1_3_quantificationprop() {
  15380. $description = array(
  15381. 'description' => '',
  15382. 'table' => 'quantificationprop',
  15383. 'fields' => array(
  15384. 'quantificationprop_id' => array(
  15385. 'size' => 'big',
  15386. 'type' => 'serial',
  15387. 'not null' => TRUE,
  15388. ),
  15389. 'quantification_id' => array(
  15390. 'size' => 'big',
  15391. 'type' => 'int',
  15392. 'not null' => TRUE,
  15393. ),
  15394. 'type_id' => array(
  15395. 'size' => 'big',
  15396. 'type' => 'int',
  15397. 'not null' => TRUE,
  15398. ),
  15399. 'value' => array(
  15400. 'size' => 'normal',
  15401. 'type' => 'text',
  15402. 'not null' => FALSE,
  15403. ),
  15404. 'rank' => array(
  15405. 'size' => 'normal',
  15406. 'type' => 'int',
  15407. 'not null' => TRUE,
  15408. 'default' => 0,
  15409. ),
  15410. ),
  15411. 'unique keys' => array(
  15412. 'quantificationprop_c1' => array(
  15413. 0 => 'quantification_id',
  15414. 1 => 'type_id',
  15415. 2 => 'rank',
  15416. ),
  15417. ),
  15418. 'indexes' => array(
  15419. 'quantificationprop_idx1' => array(
  15420. 0 => 'quantification_id',
  15421. ),
  15422. 'quantificationprop_idx2' => array(
  15423. 0 => 'type_id',
  15424. ),
  15425. ),
  15426. 'primary key' => array(
  15427. 0 => 'quantificationprop_id',
  15428. ),
  15429. 'foreign keys' => array(
  15430. 'quantification' => array(
  15431. 'table' => 'quantification',
  15432. 'columns' => array(
  15433. 'quantification_id' => 'quantification_id',
  15434. ),
  15435. ),
  15436. 'cvterm' => array(
  15437. 'table' => 'cvterm',
  15438. 'columns' => array(
  15439. 'type_id' => 'cvterm_id',
  15440. ),
  15441. ),
  15442. ),
  15443. 'referring_tables' => array(
  15444. ),
  15445. );
  15446. return $description;
  15447. }
  15448. /**
  15449. * Implements hook_chado_schema_v1_3_quantification_relationship()
  15450. *
  15451. * Purpose: To describe the structure of 'quantification_relationship' to tripal
  15452. * @see chado_insert_record()
  15453. * @see chado_update_record()
  15454. * @see chado_select_record()
  15455. * @see chado_generate_var()
  15456. * @see chado_expan_var()
  15457. *
  15458. * @return
  15459. * An array describing the 'quantification_relationship' table
  15460. *
  15461. * @ingroup tripal_chado_v1.3_schema_api
  15462. *
  15463. */
  15464. function tripal_chado_chado_schema_v1_3_quantification_relationship() {
  15465. $description = array(
  15466. 'description' => '',
  15467. 'table' => 'quantification_relationship',
  15468. 'fields' => array(
  15469. 'quantification_relationship_id' => array(
  15470. 'size' => 'big',
  15471. 'type' => 'serial',
  15472. 'not null' => TRUE,
  15473. ),
  15474. 'subject_id' => array(
  15475. 'size' => 'big',
  15476. 'type' => 'int',
  15477. 'not null' => TRUE,
  15478. ),
  15479. 'type_id' => array(
  15480. 'size' => 'big',
  15481. 'type' => 'int',
  15482. 'not null' => TRUE,
  15483. ),
  15484. 'object_id' => array(
  15485. 'size' => 'big',
  15486. 'type' => 'int',
  15487. 'not null' => TRUE,
  15488. ),
  15489. ),
  15490. 'unique keys' => array(
  15491. 'quantification_relationship_c1' => array(
  15492. 0 => 'subject_id',
  15493. 1 => 'object_id',
  15494. 2 => 'type_id',
  15495. ),
  15496. ),
  15497. 'indexes' => array(
  15498. 'quantification_relationship_idx1' => array(
  15499. 0 => 'subject_id',
  15500. ),
  15501. 'quantification_relationship_idx2' => array(
  15502. 0 => 'type_id',
  15503. ),
  15504. 'quantification_relationship_idx3' => array(
  15505. 0 => 'object_id',
  15506. ),
  15507. ),
  15508. 'primary key' => array(
  15509. 0 => 'quantification_relationship_id',
  15510. ),
  15511. 'foreign keys' => array(
  15512. 'quantification' => array(
  15513. 'table' => 'quantification',
  15514. 'columns' => array(
  15515. 'subject_id' => 'quantification_id',
  15516. 'object_id' => 'quantification_id',
  15517. ),
  15518. ),
  15519. 'cvterm' => array(
  15520. 'table' => 'cvterm',
  15521. 'columns' => array(
  15522. 'type_id' => 'cvterm_id',
  15523. ),
  15524. ),
  15525. ),
  15526. 'referring_tables' => array(
  15527. ),
  15528. );
  15529. return $description;
  15530. }
  15531. /**
  15532. * Implements hook_chado_schema_v1_3_stock()
  15533. *
  15534. * Purpose: To describe the structure of 'stock' to tripal
  15535. * @see chado_insert_record()
  15536. * @see chado_update_record()
  15537. * @see chado_select_record()
  15538. * @see chado_generate_var()
  15539. * @see chado_expan_var()
  15540. *
  15541. * @return
  15542. * An array describing the 'stock' table
  15543. *
  15544. * @ingroup tripal_chado_v1.3_schema_api
  15545. *
  15546. */
  15547. function tripal_chado_chado_schema_v1_3_stock() {
  15548. $description = array(
  15549. 'description' => '',
  15550. 'table' => 'stock',
  15551. 'fields' => array(
  15552. 'stock_id' => array(
  15553. 'size' => 'big',
  15554. 'type' => 'serial',
  15555. 'not null' => TRUE,
  15556. ),
  15557. 'dbxref_id' => array(
  15558. 'size' => 'big',
  15559. 'type' => 'int',
  15560. 'not null' => FALSE,
  15561. ),
  15562. 'organism_id' => array(
  15563. 'size' => 'big',
  15564. 'type' => 'int',
  15565. 'not null' => FALSE,
  15566. ),
  15567. 'name' => array(
  15568. 'size' => 'normal',
  15569. 'type' => 'varchar',
  15570. 'length' => '255',
  15571. 'not null' => FALSE,
  15572. ),
  15573. 'uniquename' => array(
  15574. 'size' => 'normal',
  15575. 'type' => 'text',
  15576. 'not null' => TRUE,
  15577. ),
  15578. 'description' => array(
  15579. 'size' => 'normal',
  15580. 'type' => 'text',
  15581. 'not null' => FALSE,
  15582. ),
  15583. 'type_id' => array(
  15584. 'size' => 'big',
  15585. 'type' => 'int',
  15586. 'not null' => TRUE,
  15587. ),
  15588. 'is_obsolete' => array(
  15589. 'size' => 'normal',
  15590. 'type' => 'boolean',
  15591. 'not null' => TRUE,
  15592. 'default' => FALSE,
  15593. ),
  15594. ),
  15595. 'unique keys' => array(
  15596. 'stock_c1' => array(
  15597. 0 => 'organism_id',
  15598. 1 => 'uniquename',
  15599. 2 => 'type_id',
  15600. ),
  15601. ),
  15602. 'indexes' => array(
  15603. 'stock_idx1' => array(
  15604. 0 => 'dbxref_id',
  15605. ),
  15606. 'stock_idx2' => array(
  15607. 0 => 'organism_id',
  15608. ),
  15609. 'stock_idx3' => array(
  15610. 0 => 'type_id',
  15611. ),
  15612. 'stock_idx4' => array(
  15613. 0 => 'uniquename',
  15614. ),
  15615. 'stock_name_ind1' => array(
  15616. 0 => 'name',
  15617. ),
  15618. ),
  15619. 'primary key' => array(
  15620. 0 => 'stock_id',
  15621. ),
  15622. 'foreign keys' => array(
  15623. 'dbxref' => array(
  15624. 'table' => 'dbxref',
  15625. 'columns' => array(
  15626. 'dbxref_id' => 'dbxref_id',
  15627. ),
  15628. ),
  15629. 'organism' => array(
  15630. 'table' => 'organism',
  15631. 'columns' => array(
  15632. 'organism_id' => 'organism_id',
  15633. ),
  15634. ),
  15635. 'cvterm' => array(
  15636. 'table' => 'cvterm',
  15637. 'columns' => array(
  15638. 'type_id' => 'cvterm_id',
  15639. ),
  15640. ),
  15641. ),
  15642. 'referring_tables' => array(
  15643. 0 => 'nd_experiment_stock',
  15644. 1 => 'project_stock',
  15645. 2 => 'stockcollection_stock',
  15646. 3 => 'stock_cvterm',
  15647. 4 => 'stock_dbxref',
  15648. 5 => 'stock_feature',
  15649. 6 => 'stock_featuremap',
  15650. 7 => 'stock_genotype',
  15651. 8 => 'stock_library',
  15652. 9 => 'stockprop',
  15653. 10 => 'stock_pub',
  15654. 11 => 'stock_relationship',
  15655. ),
  15656. );
  15657. return $description;
  15658. }
  15659. /**
  15660. * Implements hook_chado_schema_v1_3_stockcollection()
  15661. *
  15662. * Purpose: To describe the structure of 'stockcollection' to tripal
  15663. * @see chado_insert_record()
  15664. * @see chado_update_record()
  15665. * @see chado_select_record()
  15666. * @see chado_generate_var()
  15667. * @see chado_expan_var()
  15668. *
  15669. * @return
  15670. * An array describing the 'stockcollection' table
  15671. *
  15672. * @ingroup tripal_chado_v1.3_schema_api
  15673. *
  15674. */
  15675. function tripal_chado_chado_schema_v1_3_stockcollection() {
  15676. $description = array(
  15677. 'description' => '',
  15678. 'table' => 'stockcollection',
  15679. 'fields' => array(
  15680. 'stockcollection_id' => array(
  15681. 'size' => 'big',
  15682. 'type' => 'serial',
  15683. 'not null' => TRUE,
  15684. ),
  15685. 'type_id' => array(
  15686. 'size' => 'big',
  15687. 'type' => 'int',
  15688. 'not null' => TRUE,
  15689. ),
  15690. 'contact_id' => array(
  15691. 'size' => 'big',
  15692. 'type' => 'int',
  15693. 'not null' => FALSE,
  15694. ),
  15695. 'name' => array(
  15696. 'size' => 'normal',
  15697. 'type' => 'varchar',
  15698. 'length' => '255',
  15699. 'not null' => FALSE,
  15700. ),
  15701. 'uniquename' => array(
  15702. 'size' => 'normal',
  15703. 'type' => 'text',
  15704. 'not null' => TRUE,
  15705. ),
  15706. ),
  15707. 'unique keys' => array(
  15708. 'stockcollection_c1' => array(
  15709. 0 => 'uniquename',
  15710. 1 => 'type_id',
  15711. ),
  15712. ),
  15713. 'indexes' => array(
  15714. 'stockcollection_idx1' => array(
  15715. 0 => 'contact_id',
  15716. ),
  15717. 'stockcollection_idx2' => array(
  15718. 0 => 'type_id',
  15719. ),
  15720. 'stockcollection_idx3' => array(
  15721. 0 => 'uniquename',
  15722. ),
  15723. 'stockcollection_name_ind1' => array(
  15724. 0 => 'name',
  15725. ),
  15726. ),
  15727. 'primary key' => array(
  15728. 0 => 'stockcollection_id',
  15729. ),
  15730. 'foreign keys' => array(
  15731. 'cvterm' => array(
  15732. 'table' => 'cvterm',
  15733. 'columns' => array(
  15734. 'type_id' => 'cvterm_id',
  15735. ),
  15736. ),
  15737. 'contact' => array(
  15738. 'table' => 'contact',
  15739. 'columns' => array(
  15740. 'contact_id' => 'contact_id',
  15741. ),
  15742. ),
  15743. ),
  15744. 'referring_tables' => array(
  15745. 0 => 'stockcollection_db',
  15746. 1 => 'stockcollectionprop',
  15747. 2 => 'stockcollection_stock',
  15748. ),
  15749. );
  15750. return $description;
  15751. }
  15752. /**
  15753. * Implements hook_chado_schema_v1_3_stockcollection_db()
  15754. *
  15755. * Purpose: To describe the structure of 'stockcollection_db' to tripal
  15756. * @see chado_insert_record()
  15757. * @see chado_update_record()
  15758. * @see chado_select_record()
  15759. * @see chado_generate_var()
  15760. * @see chado_expan_var()
  15761. *
  15762. * @return
  15763. * An array describing the 'stockcollection_db' table
  15764. *
  15765. * @ingroup tripal_chado_v1.3_schema_api
  15766. *
  15767. */
  15768. function tripal_chado_chado_schema_v1_3_stockcollection_db() {
  15769. $description = array(
  15770. 'description' => '',
  15771. 'table' => 'stockcollection_db',
  15772. 'fields' => array(
  15773. 'stockcollection_db_id' => array(
  15774. 'size' => 'big',
  15775. 'type' => 'serial',
  15776. 'not null' => TRUE,
  15777. ),
  15778. 'stockcollection_id' => array(
  15779. 'size' => 'big',
  15780. 'type' => 'int',
  15781. 'not null' => TRUE,
  15782. ),
  15783. 'db_id' => array(
  15784. 'size' => 'big',
  15785. 'type' => 'int',
  15786. 'not null' => TRUE,
  15787. ),
  15788. ),
  15789. 'unique keys' => array(
  15790. 'stockcollection_db_c1' => array(
  15791. 0 => 'stockcollection_id',
  15792. 1 => 'db_id',
  15793. ),
  15794. ),
  15795. 'indexes' => array(
  15796. 'stockcollection_db_idx1' => array(
  15797. 0 => 'stockcollection_id',
  15798. ),
  15799. 'stockcollection_db_idx2' => array(
  15800. 0 => 'db_id',
  15801. ),
  15802. ),
  15803. 'primary key' => array(
  15804. 0 => 'stockcollection_db_id',
  15805. ),
  15806. 'foreign keys' => array(
  15807. 'db' => array(
  15808. 'table' => 'db',
  15809. 'columns' => array(
  15810. 'db_id' => 'db_id',
  15811. ),
  15812. ),
  15813. 'stockcollection' => array(
  15814. 'table' => 'stockcollection',
  15815. 'columns' => array(
  15816. 'stockcollection_id' => 'stockcollection_id',
  15817. ),
  15818. ),
  15819. ),
  15820. 'referring_tables' => array(
  15821. ),
  15822. );
  15823. return $description;
  15824. }
  15825. /**
  15826. * Implements hook_chado_schema_v1_3_stockcollectionprop()
  15827. *
  15828. * Purpose: To describe the structure of 'stockcollectionprop' to tripal
  15829. * @see chado_insert_record()
  15830. * @see chado_update_record()
  15831. * @see chado_select_record()
  15832. * @see chado_generate_var()
  15833. * @see chado_expan_var()
  15834. *
  15835. * @return
  15836. * An array describing the 'stockcollectionprop' table
  15837. *
  15838. * @ingroup tripal_chado_v1.3_schema_api
  15839. *
  15840. */
  15841. function tripal_chado_chado_schema_v1_3_stockcollectionprop() {
  15842. $description = array(
  15843. 'description' => '',
  15844. 'table' => 'stockcollectionprop',
  15845. 'fields' => array(
  15846. 'stockcollectionprop_id' => array(
  15847. 'size' => 'big',
  15848. 'type' => 'serial',
  15849. 'not null' => TRUE,
  15850. ),
  15851. 'stockcollection_id' => array(
  15852. 'size' => 'big',
  15853. 'type' => 'int',
  15854. 'not null' => TRUE,
  15855. ),
  15856. 'type_id' => array(
  15857. 'size' => 'big',
  15858. 'type' => 'int',
  15859. 'not null' => TRUE,
  15860. ),
  15861. 'value' => array(
  15862. 'size' => 'normal',
  15863. 'type' => 'text',
  15864. 'not null' => FALSE,
  15865. ),
  15866. 'rank' => array(
  15867. 'size' => 'normal',
  15868. 'type' => 'int',
  15869. 'not null' => TRUE,
  15870. 'default' => 0,
  15871. ),
  15872. ),
  15873. 'unique keys' => array(
  15874. 'stockcollectionprop_c1' => array(
  15875. 0 => 'stockcollection_id',
  15876. 1 => 'type_id',
  15877. 2 => 'rank',
  15878. ),
  15879. ),
  15880. 'indexes' => array(
  15881. 'stockcollectionprop_idx1' => array(
  15882. 0 => 'stockcollection_id',
  15883. ),
  15884. 'stockcollectionprop_idx2' => array(
  15885. 0 => 'type_id',
  15886. ),
  15887. ),
  15888. 'primary key' => array(
  15889. 0 => 'stockcollectionprop_id',
  15890. ),
  15891. 'foreign keys' => array(
  15892. 'stockcollection' => array(
  15893. 'table' => 'stockcollection',
  15894. 'columns' => array(
  15895. 'stockcollection_id' => 'stockcollection_id',
  15896. ),
  15897. ),
  15898. 'cvterm' => array(
  15899. 'table' => 'cvterm',
  15900. 'columns' => array(
  15901. 'type_id' => 'cvterm_id',
  15902. ),
  15903. ),
  15904. ),
  15905. 'referring_tables' => array(
  15906. ),
  15907. );
  15908. return $description;
  15909. }
  15910. /**
  15911. * Implements hook_chado_schema_v1_3_stockcollection_stock()
  15912. *
  15913. * Purpose: To describe the structure of 'stockcollection_stock' to tripal
  15914. * @see chado_insert_record()
  15915. * @see chado_update_record()
  15916. * @see chado_select_record()
  15917. * @see chado_generate_var()
  15918. * @see chado_expan_var()
  15919. *
  15920. * @return
  15921. * An array describing the 'stockcollection_stock' table
  15922. *
  15923. * @ingroup tripal_chado_v1.3_schema_api
  15924. *
  15925. */
  15926. function tripal_chado_chado_schema_v1_3_stockcollection_stock() {
  15927. $description = array(
  15928. 'description' => '',
  15929. 'table' => 'stockcollection_stock',
  15930. 'fields' => array(
  15931. 'stockcollection_stock_id' => array(
  15932. 'size' => 'big',
  15933. 'type' => 'serial',
  15934. 'not null' => TRUE,
  15935. ),
  15936. 'stockcollection_id' => array(
  15937. 'size' => 'big',
  15938. 'type' => 'int',
  15939. 'not null' => TRUE,
  15940. ),
  15941. 'stock_id' => array(
  15942. 'size' => 'big',
  15943. 'type' => 'int',
  15944. 'not null' => TRUE,
  15945. ),
  15946. ),
  15947. 'unique keys' => array(
  15948. 'stockcollection_stock_c1' => array(
  15949. 0 => 'stockcollection_id',
  15950. 1 => 'stock_id',
  15951. ),
  15952. ),
  15953. 'indexes' => array(
  15954. 'stockcollection_stock_idx1' => array(
  15955. 0 => 'stockcollection_id',
  15956. ),
  15957. 'stockcollection_stock_idx2' => array(
  15958. 0 => 'stock_id',
  15959. ),
  15960. ),
  15961. 'primary key' => array(
  15962. 0 => 'stockcollection_stock_id',
  15963. ),
  15964. 'foreign keys' => array(
  15965. 'stockcollection' => array(
  15966. 'table' => 'stockcollection',
  15967. 'columns' => array(
  15968. 'stockcollection_id' => 'stockcollection_id',
  15969. ),
  15970. ),
  15971. 'stock' => array(
  15972. 'table' => 'stock',
  15973. 'columns' => array(
  15974. 'stock_id' => 'stock_id',
  15975. ),
  15976. ),
  15977. ),
  15978. 'referring_tables' => array(
  15979. ),
  15980. );
  15981. return $description;
  15982. }
  15983. /**
  15984. * Implements hook_chado_schema_v1_3_stock_cvterm()
  15985. *
  15986. * Purpose: To describe the structure of 'stock_cvterm' to tripal
  15987. * @see chado_insert_record()
  15988. * @see chado_update_record()
  15989. * @see chado_select_record()
  15990. * @see chado_generate_var()
  15991. * @see chado_expan_var()
  15992. *
  15993. * @return
  15994. * An array describing the 'stock_cvterm' table
  15995. *
  15996. * @ingroup tripal_chado_v1.3_schema_api
  15997. *
  15998. */
  15999. function tripal_chado_chado_schema_v1_3_stock_cvterm() {
  16000. $description = array(
  16001. 'description' => '',
  16002. 'table' => 'stock_cvterm',
  16003. 'fields' => array(
  16004. 'stock_cvterm_id' => array(
  16005. 'size' => 'big',
  16006. 'type' => 'serial',
  16007. 'not null' => TRUE,
  16008. ),
  16009. 'stock_id' => array(
  16010. 'size' => 'big',
  16011. 'type' => 'int',
  16012. 'not null' => TRUE,
  16013. ),
  16014. 'cvterm_id' => array(
  16015. 'size' => 'big',
  16016. 'type' => 'int',
  16017. 'not null' => TRUE,
  16018. ),
  16019. 'pub_id' => array(
  16020. 'size' => 'big',
  16021. 'type' => 'int',
  16022. 'not null' => TRUE,
  16023. ),
  16024. 'is_not' => array(
  16025. 'size' => 'normal',
  16026. 'type' => 'boolean',
  16027. 'not null' => TRUE,
  16028. 'default' => FALSE,
  16029. ),
  16030. 'rank' => array(
  16031. 'size' => 'normal',
  16032. 'type' => 'int',
  16033. 'not null' => TRUE,
  16034. 'default' => 0,
  16035. ),
  16036. ),
  16037. 'unique keys' => array(
  16038. 'stock_cvterm_c1' => array(
  16039. 0 => 'stock_id',
  16040. 1 => 'cvterm_id',
  16041. 2 => 'pub_id',
  16042. 3 => 'rank',
  16043. ),
  16044. ),
  16045. 'indexes' => array(
  16046. 'stock_cvterm_idx1' => array(
  16047. 0 => 'stock_id',
  16048. ),
  16049. 'stock_cvterm_idx2' => array(
  16050. 0 => 'cvterm_id',
  16051. ),
  16052. 'stock_cvterm_idx3' => array(
  16053. 0 => 'pub_id',
  16054. ),
  16055. ),
  16056. 'primary key' => array(
  16057. 0 => 'stock_cvterm_id',
  16058. ),
  16059. 'foreign keys' => array(
  16060. 'stock' => array(
  16061. 'table' => 'stock',
  16062. 'columns' => array(
  16063. 'stock_id' => 'stock_id',
  16064. ),
  16065. ),
  16066. 'cvterm' => array(
  16067. 'table' => 'cvterm',
  16068. 'columns' => array(
  16069. 'cvterm_id' => 'cvterm_id',
  16070. ),
  16071. ),
  16072. 'pub' => array(
  16073. 'table' => 'pub',
  16074. 'columns' => array(
  16075. 'pub_id' => 'pub_id',
  16076. ),
  16077. ),
  16078. ),
  16079. 'referring_tables' => array(
  16080. 0 => 'stock_cvtermprop',
  16081. ),
  16082. );
  16083. return $description;
  16084. }
  16085. /**
  16086. * Implements hook_chado_schema_v1_3_stock_cvtermprop()
  16087. *
  16088. * Purpose: To describe the structure of 'stock_cvtermprop' to tripal
  16089. * @see chado_insert_record()
  16090. * @see chado_update_record()
  16091. * @see chado_select_record()
  16092. * @see chado_generate_var()
  16093. * @see chado_expan_var()
  16094. *
  16095. * @return
  16096. * An array describing the 'stock_cvtermprop' table
  16097. *
  16098. * @ingroup tripal_chado_v1.3_schema_api
  16099. *
  16100. */
  16101. function tripal_chado_chado_schema_v1_3_stock_cvtermprop() {
  16102. $description = array(
  16103. 'description' => '',
  16104. 'table' => 'stock_cvtermprop',
  16105. 'fields' => array(
  16106. 'stock_cvtermprop_id' => array(
  16107. 'size' => 'big',
  16108. 'type' => 'serial',
  16109. 'not null' => TRUE,
  16110. ),
  16111. 'stock_cvterm_id' => array(
  16112. 'size' => 'big',
  16113. 'type' => 'int',
  16114. 'not null' => TRUE,
  16115. ),
  16116. 'type_id' => array(
  16117. 'size' => 'big',
  16118. 'type' => 'int',
  16119. 'not null' => TRUE,
  16120. ),
  16121. 'value' => array(
  16122. 'size' => 'normal',
  16123. 'type' => 'text',
  16124. 'not null' => FALSE,
  16125. ),
  16126. 'rank' => array(
  16127. 'size' => 'normal',
  16128. 'type' => 'int',
  16129. 'not null' => TRUE,
  16130. 'default' => 0,
  16131. ),
  16132. ),
  16133. 'unique keys' => array(
  16134. 'stock_cvtermprop_c1' => array(
  16135. 0 => 'stock_cvterm_id',
  16136. 1 => 'type_id',
  16137. 2 => 'rank',
  16138. ),
  16139. ),
  16140. 'indexes' => array(
  16141. 'stock_cvtermprop_idx1' => array(
  16142. 0 => 'stock_cvterm_id',
  16143. ),
  16144. 'stock_cvtermprop_idx2' => array(
  16145. 0 => 'type_id',
  16146. ),
  16147. ),
  16148. 'primary key' => array(
  16149. 0 => 'stock_cvtermprop_id',
  16150. ),
  16151. 'foreign keys' => array(
  16152. 'stock_cvterm' => array(
  16153. 'table' => 'stock_cvterm',
  16154. 'columns' => array(
  16155. 'stock_cvterm_id' => 'stock_cvterm_id',
  16156. ),
  16157. ),
  16158. 'cvterm' => array(
  16159. 'table' => 'cvterm',
  16160. 'columns' => array(
  16161. 'type_id' => 'cvterm_id',
  16162. ),
  16163. ),
  16164. ),
  16165. 'referring_tables' => array(
  16166. ),
  16167. );
  16168. return $description;
  16169. }
  16170. /**
  16171. * Implements hook_chado_schema_v1_3_stock_dbxref()
  16172. *
  16173. * Purpose: To describe the structure of 'stock_dbxref' to tripal
  16174. * @see chado_insert_record()
  16175. * @see chado_update_record()
  16176. * @see chado_select_record()
  16177. * @see chado_generate_var()
  16178. * @see chado_expan_var()
  16179. *
  16180. * @return
  16181. * An array describing the 'stock_dbxref' table
  16182. *
  16183. * @ingroup tripal_chado_v1.3_schema_api
  16184. *
  16185. */
  16186. function tripal_chado_chado_schema_v1_3_stock_dbxref() {
  16187. $description = array(
  16188. 'description' => '',
  16189. 'table' => 'stock_dbxref',
  16190. 'fields' => array(
  16191. 'stock_dbxref_id' => array(
  16192. 'size' => 'big',
  16193. 'type' => 'serial',
  16194. 'not null' => TRUE,
  16195. ),
  16196. 'stock_id' => array(
  16197. 'size' => 'big',
  16198. 'type' => 'int',
  16199. 'not null' => TRUE,
  16200. ),
  16201. 'dbxref_id' => array(
  16202. 'size' => 'big',
  16203. 'type' => 'int',
  16204. 'not null' => TRUE,
  16205. ),
  16206. 'is_current' => array(
  16207. 'size' => 'normal',
  16208. 'type' => 'boolean',
  16209. 'not null' => TRUE,
  16210. 'default' => 'true',
  16211. ),
  16212. ),
  16213. 'unique keys' => array(
  16214. 'stock_dbxref_c1' => array(
  16215. 0 => 'stock_id',
  16216. 1 => 'dbxref_id',
  16217. ),
  16218. ),
  16219. 'indexes' => array(
  16220. 'stock_dbxref_idx1' => array(
  16221. 0 => 'stock_id',
  16222. ),
  16223. 'stock_dbxref_idx2' => array(
  16224. 0 => 'dbxref_id',
  16225. ),
  16226. ),
  16227. 'primary key' => array(
  16228. 0 => 'stock_dbxref_id',
  16229. ),
  16230. 'foreign keys' => array(
  16231. 'stock' => array(
  16232. 'table' => 'stock',
  16233. 'columns' => array(
  16234. 'stock_id' => 'stock_id',
  16235. ),
  16236. ),
  16237. 'dbxref' => array(
  16238. 'table' => 'dbxref',
  16239. 'columns' => array(
  16240. 'dbxref_id' => 'dbxref_id',
  16241. ),
  16242. ),
  16243. ),
  16244. 'referring_tables' => array(
  16245. 0 => 'stock_dbxrefprop',
  16246. ),
  16247. );
  16248. return $description;
  16249. }
  16250. /**
  16251. * Implements hook_chado_schema_v1_3_stock_dbxrefprop()
  16252. *
  16253. * Purpose: To describe the structure of 'stock_dbxrefprop' to tripal
  16254. * @see chado_insert_record()
  16255. * @see chado_update_record()
  16256. * @see chado_select_record()
  16257. * @see chado_generate_var()
  16258. * @see chado_expan_var()
  16259. *
  16260. * @return
  16261. * An array describing the 'stock_dbxrefprop' table
  16262. *
  16263. * @ingroup tripal_chado_v1.3_schema_api
  16264. *
  16265. */
  16266. function tripal_chado_chado_schema_v1_3_stock_dbxrefprop() {
  16267. $description = array(
  16268. 'description' => '',
  16269. 'table' => 'stock_dbxrefprop',
  16270. 'fields' => array(
  16271. 'stock_dbxrefprop_id' => array(
  16272. 'size' => 'big',
  16273. 'type' => 'serial',
  16274. 'not null' => TRUE,
  16275. ),
  16276. 'stock_dbxref_id' => array(
  16277. 'size' => 'big',
  16278. 'type' => 'int',
  16279. 'not null' => TRUE,
  16280. ),
  16281. 'type_id' => array(
  16282. 'size' => 'big',
  16283. 'type' => 'int',
  16284. 'not null' => TRUE,
  16285. ),
  16286. 'value' => array(
  16287. 'size' => 'normal',
  16288. 'type' => 'text',
  16289. 'not null' => FALSE,
  16290. ),
  16291. 'rank' => array(
  16292. 'size' => 'normal',
  16293. 'type' => 'int',
  16294. 'not null' => TRUE,
  16295. 'default' => 0,
  16296. ),
  16297. ),
  16298. 'unique keys' => array(
  16299. 'stock_dbxrefprop_c1' => array(
  16300. 0 => 'stock_dbxref_id',
  16301. 1 => 'type_id',
  16302. 2 => 'rank',
  16303. ),
  16304. ),
  16305. 'indexes' => array(
  16306. 'stock_dbxrefprop_idx1' => array(
  16307. 0 => 'stock_dbxref_id',
  16308. ),
  16309. 'stock_dbxrefprop_idx2' => array(
  16310. 0 => 'type_id',
  16311. ),
  16312. ),
  16313. 'primary key' => array(
  16314. 0 => 'stock_dbxrefprop_id',
  16315. ),
  16316. 'foreign keys' => array(
  16317. 'stock_dbxref' => array(
  16318. 'table' => 'stock_dbxref',
  16319. 'columns' => array(
  16320. 'stock_dbxref_id' => 'stock_dbxref_id',
  16321. ),
  16322. ),
  16323. 'cvterm' => array(
  16324. 'table' => 'cvterm',
  16325. 'columns' => array(
  16326. 'type_id' => 'cvterm_id',
  16327. ),
  16328. ),
  16329. ),
  16330. 'referring_tables' => array(
  16331. ),
  16332. );
  16333. return $description;
  16334. }
  16335. /**
  16336. * Implements hook_chado_schema_v1_3_stock_feature()
  16337. *
  16338. * Purpose: To describe the structure of 'stock_feature' to tripal
  16339. * @see chado_insert_record()
  16340. * @see chado_update_record()
  16341. * @see chado_select_record()
  16342. * @see chado_generate_var()
  16343. * @see chado_expan_var()
  16344. *
  16345. * @return
  16346. * An array describing the 'stock_feature' table
  16347. *
  16348. * @ingroup tripal_chado_v1.3_schema_api
  16349. *
  16350. */
  16351. function tripal_chado_chado_schema_v1_3_stock_feature() {
  16352. $description = array(
  16353. 'description' => '',
  16354. 'table' => 'stock_feature',
  16355. 'fields' => array(
  16356. 'stock_feature_id' => array(
  16357. 'size' => 'big',
  16358. 'type' => 'serial',
  16359. 'not null' => TRUE,
  16360. ),
  16361. 'feature_id' => array(
  16362. 'size' => 'big',
  16363. 'type' => 'int',
  16364. 'not null' => TRUE,
  16365. ),
  16366. 'stock_id' => array(
  16367. 'size' => 'big',
  16368. 'type' => 'int',
  16369. 'not null' => TRUE,
  16370. ),
  16371. 'type_id' => array(
  16372. 'size' => 'big',
  16373. 'type' => 'int',
  16374. 'not null' => TRUE,
  16375. ),
  16376. 'rank' => array(
  16377. 'size' => 'normal',
  16378. 'type' => 'int',
  16379. 'not null' => TRUE,
  16380. 'default' => 0,
  16381. ),
  16382. ),
  16383. 'unique keys' => array(
  16384. 'stock_feature_c1' => array(
  16385. 0 => 'feature_id',
  16386. 1 => 'stock_id',
  16387. 2 => 'type_id',
  16388. 3 => 'rank',
  16389. ),
  16390. ),
  16391. 'indexes' => array(
  16392. 'stock_feature_idx1' => array(
  16393. 0 => 'stock_feature_id',
  16394. ),
  16395. 'stock_feature_idx2' => array(
  16396. 0 => 'feature_id',
  16397. ),
  16398. 'stock_feature_idx3' => array(
  16399. 0 => 'stock_id',
  16400. ),
  16401. 'stock_feature_idx4' => array(
  16402. 0 => 'type_id',
  16403. ),
  16404. ),
  16405. 'primary key' => array(
  16406. 0 => 'stock_feature_id',
  16407. ),
  16408. 'foreign keys' => array(
  16409. 'feature' => array(
  16410. 'table' => 'feature',
  16411. 'columns' => array(
  16412. 'feature_id' => 'feature_id',
  16413. ),
  16414. ),
  16415. 'stock' => array(
  16416. 'table' => 'stock',
  16417. 'columns' => array(
  16418. 'stock_id' => 'stock_id',
  16419. ),
  16420. ),
  16421. 'cvterm' => array(
  16422. 'table' => 'cvterm',
  16423. 'columns' => array(
  16424. 'type_id' => 'cvterm_id',
  16425. ),
  16426. ),
  16427. ),
  16428. 'referring_tables' => array(
  16429. ),
  16430. );
  16431. return $description;
  16432. }
  16433. /**
  16434. * Implements hook_chado_schema_v1_3_stock_featuremap()
  16435. *
  16436. * Purpose: To describe the structure of 'stock_featuremap' to tripal
  16437. * @see chado_insert_record()
  16438. * @see chado_update_record()
  16439. * @see chado_select_record()
  16440. * @see chado_generate_var()
  16441. * @see chado_expan_var()
  16442. *
  16443. * @return
  16444. * An array describing the 'stock_featuremap' table
  16445. *
  16446. * @ingroup tripal_chado_v1.3_schema_api
  16447. *
  16448. */
  16449. function tripal_chado_chado_schema_v1_3_stock_featuremap() {
  16450. $description = array(
  16451. 'description' => '',
  16452. 'table' => 'stock_featuremap',
  16453. 'fields' => array(
  16454. 'stock_featuremap_id' => array(
  16455. 'size' => 'big',
  16456. 'type' => 'serial',
  16457. 'not null' => TRUE,
  16458. ),
  16459. 'featuremap_id' => array(
  16460. 'size' => 'big',
  16461. 'type' => 'int',
  16462. 'not null' => TRUE,
  16463. ),
  16464. 'stock_id' => array(
  16465. 'size' => 'big',
  16466. 'type' => 'int',
  16467. 'not null' => TRUE,
  16468. ),
  16469. 'type_id' => array(
  16470. 'size' => 'big',
  16471. 'type' => 'int',
  16472. 'not null' => FALSE,
  16473. ),
  16474. ),
  16475. 'unique keys' => array(
  16476. 'stock_featuremap_c1' => array(
  16477. 0 => 'featuremap_id',
  16478. 1 => 'stock_id',
  16479. 2 => 'type_id',
  16480. ),
  16481. ),
  16482. 'indexes' => array(
  16483. 'stock_featuremap_idx1' => array(
  16484. 0 => 'featuremap_id',
  16485. ),
  16486. 'stock_featuremap_idx2' => array(
  16487. 0 => 'stock_id',
  16488. ),
  16489. 'stock_featuremap_idx3' => array(
  16490. 0 => 'type_id',
  16491. ),
  16492. ),
  16493. 'primary key' => array(
  16494. 0 => 'stock_featuremap_id',
  16495. ),
  16496. 'foreign keys' => array(
  16497. 'featuremap' => array(
  16498. 'table' => 'featuremap',
  16499. 'columns' => array(
  16500. 'featuremap_id' => 'featuremap_id',
  16501. ),
  16502. ),
  16503. 'stock' => array(
  16504. 'table' => 'stock',
  16505. 'columns' => array(
  16506. 'stock_id' => 'stock_id',
  16507. ),
  16508. ),
  16509. 'cvterm' => array(
  16510. 'table' => 'cvterm',
  16511. 'columns' => array(
  16512. 'type_id' => 'cvterm_id',
  16513. ),
  16514. ),
  16515. ),
  16516. 'referring_tables' => array(
  16517. ),
  16518. );
  16519. return $description;
  16520. }
  16521. /**
  16522. * Implements hook_chado_schema_v1_3_stock_genotype()
  16523. *
  16524. * Purpose: To describe the structure of 'stock_genotype' to tripal
  16525. * @see chado_insert_record()
  16526. * @see chado_update_record()
  16527. * @see chado_select_record()
  16528. * @see chado_generate_var()
  16529. * @see chado_expan_var()
  16530. *
  16531. * @return
  16532. * An array describing the 'stock_genotype' table
  16533. *
  16534. * @ingroup tripal_chado_v1.3_schema_api
  16535. *
  16536. */
  16537. function tripal_chado_chado_schema_v1_3_stock_genotype() {
  16538. $description = array(
  16539. 'description' => '',
  16540. 'table' => 'stock_genotype',
  16541. 'fields' => array(
  16542. 'stock_genotype_id' => array(
  16543. 'size' => 'big',
  16544. 'type' => 'serial',
  16545. 'not null' => TRUE,
  16546. ),
  16547. 'stock_id' => array(
  16548. 'size' => 'big',
  16549. 'type' => 'int',
  16550. 'not null' => TRUE,
  16551. ),
  16552. 'genotype_id' => array(
  16553. 'size' => 'big',
  16554. 'type' => 'int',
  16555. 'not null' => TRUE,
  16556. ),
  16557. ),
  16558. 'unique keys' => array(
  16559. 'stock_genotype_c1' => array(
  16560. 0 => 'stock_id',
  16561. 1 => 'genotype_id',
  16562. ),
  16563. ),
  16564. 'indexes' => array(
  16565. 'stock_genotype_idx1' => array(
  16566. 0 => 'stock_id',
  16567. ),
  16568. 'stock_genotype_idx2' => array(
  16569. 0 => 'genotype_id',
  16570. ),
  16571. ),
  16572. 'primary key' => array(
  16573. 0 => 'stock_genotype_id',
  16574. ),
  16575. 'foreign keys' => array(
  16576. 'stock' => array(
  16577. 'table' => 'stock',
  16578. 'columns' => array(
  16579. 'stock_id' => 'stock_id',
  16580. ),
  16581. ),
  16582. 'genotype' => array(
  16583. 'table' => 'genotype',
  16584. 'columns' => array(
  16585. 'genotype_id' => 'genotype_id',
  16586. ),
  16587. ),
  16588. ),
  16589. 'referring_tables' => array(
  16590. ),
  16591. );
  16592. return $description;
  16593. }
  16594. /**
  16595. * Implements hook_chado_schema_v1_3_stock_library()
  16596. *
  16597. * Purpose: To describe the structure of 'stock_library' to tripal
  16598. * @see chado_insert_record()
  16599. * @see chado_update_record()
  16600. * @see chado_select_record()
  16601. * @see chado_generate_var()
  16602. * @see chado_expan_var()
  16603. *
  16604. * @return
  16605. * An array describing the 'stock_library' table
  16606. *
  16607. * @ingroup tripal_chado_v1.3_schema_api
  16608. *
  16609. */
  16610. function tripal_chado_chado_schema_v1_3_stock_library() {
  16611. $description = array(
  16612. 'description' => '',
  16613. 'table' => 'stock_library',
  16614. 'fields' => array(
  16615. 'stock_library_id' => array(
  16616. 'size' => 'big',
  16617. 'type' => 'serial',
  16618. 'not null' => TRUE,
  16619. ),
  16620. 'library_id' => array(
  16621. 'size' => 'big',
  16622. 'type' => 'int',
  16623. 'not null' => TRUE,
  16624. ),
  16625. 'stock_id' => array(
  16626. 'size' => 'big',
  16627. 'type' => 'int',
  16628. 'not null' => TRUE,
  16629. ),
  16630. ),
  16631. 'unique keys' => array(
  16632. 'stock_library_c1' => array(
  16633. 0 => 'library_id',
  16634. 1 => 'stock_id',
  16635. ),
  16636. ),
  16637. 'indexes' => array(
  16638. 'stock_library_idx1' => array(
  16639. 0 => 'library_id',
  16640. ),
  16641. 'stock_library_idx2' => array(
  16642. 0 => 'stock_id',
  16643. ),
  16644. ),
  16645. 'primary key' => array(
  16646. 0 => 'stock_library_id',
  16647. ),
  16648. 'foreign keys' => array(
  16649. 'library' => array(
  16650. 'table' => 'library',
  16651. 'columns' => array(
  16652. 'library_id' => 'library_id',
  16653. ),
  16654. ),
  16655. 'stock' => array(
  16656. 'table' => 'stock',
  16657. 'columns' => array(
  16658. 'stock_id' => 'stock_id',
  16659. ),
  16660. ),
  16661. ),
  16662. 'referring_tables' => array(
  16663. ),
  16664. );
  16665. return $description;
  16666. }
  16667. /**
  16668. * Implements hook_chado_schema_v1_3_stockprop()
  16669. *
  16670. * Purpose: To describe the structure of 'stockprop' to tripal
  16671. * @see chado_insert_record()
  16672. * @see chado_update_record()
  16673. * @see chado_select_record()
  16674. * @see chado_generate_var()
  16675. * @see chado_expan_var()
  16676. *
  16677. * @return
  16678. * An array describing the 'stockprop' table
  16679. *
  16680. * @ingroup tripal_chado_v1.3_schema_api
  16681. *
  16682. */
  16683. function tripal_chado_chado_schema_v1_3_stockprop() {
  16684. $description = array(
  16685. 'description' => '',
  16686. 'table' => 'stockprop',
  16687. 'fields' => array(
  16688. 'stockprop_id' => array(
  16689. 'size' => 'big',
  16690. 'type' => 'serial',
  16691. 'not null' => TRUE,
  16692. ),
  16693. 'stock_id' => array(
  16694. 'size' => 'big',
  16695. 'type' => 'int',
  16696. 'not null' => TRUE,
  16697. ),
  16698. 'type_id' => array(
  16699. 'size' => 'big',
  16700. 'type' => 'int',
  16701. 'not null' => TRUE,
  16702. ),
  16703. 'value' => array(
  16704. 'size' => 'normal',
  16705. 'type' => 'text',
  16706. 'not null' => FALSE,
  16707. ),
  16708. 'rank' => array(
  16709. 'size' => 'normal',
  16710. 'type' => 'int',
  16711. 'not null' => TRUE,
  16712. 'default' => 0,
  16713. ),
  16714. ),
  16715. 'unique keys' => array(
  16716. 'stockprop_c1' => array(
  16717. 0 => 'stock_id',
  16718. 1 => 'type_id',
  16719. 2 => 'rank',
  16720. ),
  16721. ),
  16722. 'indexes' => array(
  16723. 'stockprop_idx1' => array(
  16724. 0 => 'stock_id',
  16725. ),
  16726. 'stockprop_idx2' => array(
  16727. 0 => 'type_id',
  16728. ),
  16729. ),
  16730. 'primary key' => array(
  16731. 0 => 'stockprop_id',
  16732. ),
  16733. 'foreign keys' => array(
  16734. 'stock' => array(
  16735. 'table' => 'stock',
  16736. 'columns' => array(
  16737. 'stock_id' => 'stock_id',
  16738. ),
  16739. ),
  16740. 'cvterm' => array(
  16741. 'table' => 'cvterm',
  16742. 'columns' => array(
  16743. 'type_id' => 'cvterm_id',
  16744. ),
  16745. ),
  16746. ),
  16747. 'referring_tables' => array(
  16748. 0 => 'stockprop_pub',
  16749. ),
  16750. );
  16751. return $description;
  16752. }
  16753. /**
  16754. * Implements hook_chado_schema_v1_3_stockprop_pub()
  16755. *
  16756. * Purpose: To describe the structure of 'stockprop_pub' to tripal
  16757. * @see chado_insert_record()
  16758. * @see chado_update_record()
  16759. * @see chado_select_record()
  16760. * @see chado_generate_var()
  16761. * @see chado_expan_var()
  16762. *
  16763. * @return
  16764. * An array describing the 'stockprop_pub' table
  16765. *
  16766. * @ingroup tripal_chado_v1.3_schema_api
  16767. *
  16768. */
  16769. function tripal_chado_chado_schema_v1_3_stockprop_pub() {
  16770. $description = array(
  16771. 'description' => '',
  16772. 'table' => 'stockprop_pub',
  16773. 'fields' => array(
  16774. 'stockprop_pub_id' => array(
  16775. 'size' => 'big',
  16776. 'type' => 'serial',
  16777. 'not null' => TRUE,
  16778. ),
  16779. 'stockprop_id' => array(
  16780. 'size' => 'big',
  16781. 'type' => 'int',
  16782. 'not null' => TRUE,
  16783. ),
  16784. 'pub_id' => array(
  16785. 'size' => 'big',
  16786. 'type' => 'int',
  16787. 'not null' => TRUE,
  16788. ),
  16789. ),
  16790. 'unique keys' => array(
  16791. 'stockprop_pub_c1' => array(
  16792. 0 => 'stockprop_id',
  16793. 1 => 'pub_id',
  16794. ),
  16795. ),
  16796. 'indexes' => array(
  16797. 'stockprop_pub_idx1' => array(
  16798. 0 => 'stockprop_id',
  16799. ),
  16800. 'stockprop_pub_idx2' => array(
  16801. 0 => 'pub_id',
  16802. ),
  16803. ),
  16804. 'primary key' => array(
  16805. 0 => 'stockprop_pub_id',
  16806. ),
  16807. 'foreign keys' => array(
  16808. 'stockprop' => array(
  16809. 'table' => 'stockprop',
  16810. 'columns' => array(
  16811. 'stockprop_id' => 'stockprop_id',
  16812. ),
  16813. ),
  16814. 'pub' => array(
  16815. 'table' => 'pub',
  16816. 'columns' => array(
  16817. 'pub_id' => 'pub_id',
  16818. ),
  16819. ),
  16820. ),
  16821. 'referring_tables' => array(
  16822. ),
  16823. );
  16824. return $description;
  16825. }
  16826. /**
  16827. * Implements hook_chado_schema_v1_3_stock_pub()
  16828. *
  16829. * Purpose: To describe the structure of 'stock_pub' to tripal
  16830. * @see chado_insert_record()
  16831. * @see chado_update_record()
  16832. * @see chado_select_record()
  16833. * @see chado_generate_var()
  16834. * @see chado_expan_var()
  16835. *
  16836. * @return
  16837. * An array describing the 'stock_pub' table
  16838. *
  16839. * @ingroup tripal_chado_v1.3_schema_api
  16840. *
  16841. */
  16842. function tripal_chado_chado_schema_v1_3_stock_pub() {
  16843. $description = array(
  16844. 'description' => '',
  16845. 'table' => 'stock_pub',
  16846. 'fields' => array(
  16847. 'stock_pub_id' => array(
  16848. 'size' => 'big',
  16849. 'type' => 'serial',
  16850. 'not null' => TRUE,
  16851. ),
  16852. 'stock_id' => array(
  16853. 'size' => 'big',
  16854. 'type' => 'int',
  16855. 'not null' => TRUE,
  16856. ),
  16857. 'pub_id' => array(
  16858. 'size' => 'big',
  16859. 'type' => 'int',
  16860. 'not null' => TRUE,
  16861. ),
  16862. ),
  16863. 'unique keys' => array(
  16864. 'stock_pub_c1' => array(
  16865. 0 => 'stock_id',
  16866. 1 => 'pub_id',
  16867. ),
  16868. ),
  16869. 'indexes' => array(
  16870. 'stock_pub_idx1' => array(
  16871. 0 => 'stock_id',
  16872. ),
  16873. 'stock_pub_idx2' => array(
  16874. 0 => 'pub_id',
  16875. ),
  16876. ),
  16877. 'primary key' => array(
  16878. 0 => 'stock_pub_id',
  16879. ),
  16880. 'foreign keys' => array(
  16881. 'stock' => array(
  16882. 'table' => 'stock',
  16883. 'columns' => array(
  16884. 'stock_id' => 'stock_id',
  16885. ),
  16886. ),
  16887. 'pub' => array(
  16888. 'table' => 'pub',
  16889. 'columns' => array(
  16890. 'pub_id' => 'pub_id',
  16891. ),
  16892. ),
  16893. ),
  16894. 'referring_tables' => array(
  16895. ),
  16896. );
  16897. return $description;
  16898. }
  16899. /**
  16900. * Implements hook_chado_schema_v1_3_stock_relationship()
  16901. *
  16902. * Purpose: To describe the structure of 'stock_relationship' to tripal
  16903. * @see chado_insert_record()
  16904. * @see chado_update_record()
  16905. * @see chado_select_record()
  16906. * @see chado_generate_var()
  16907. * @see chado_expan_var()
  16908. *
  16909. * @return
  16910. * An array describing the 'stock_relationship' table
  16911. *
  16912. * @ingroup tripal_chado_v1.3_schema_api
  16913. *
  16914. */
  16915. function tripal_chado_chado_schema_v1_3_stock_relationship() {
  16916. $description = array(
  16917. 'description' => '',
  16918. 'table' => 'stock_relationship',
  16919. 'fields' => array(
  16920. 'stock_relationship_id' => array(
  16921. 'size' => 'big',
  16922. 'type' => 'serial',
  16923. 'not null' => TRUE,
  16924. ),
  16925. 'subject_id' => array(
  16926. 'size' => 'big',
  16927. 'type' => 'int',
  16928. 'not null' => TRUE,
  16929. ),
  16930. 'object_id' => array(
  16931. 'size' => 'big',
  16932. 'type' => 'int',
  16933. 'not null' => TRUE,
  16934. ),
  16935. 'type_id' => array(
  16936. 'size' => 'big',
  16937. 'type' => 'int',
  16938. 'not null' => TRUE,
  16939. ),
  16940. 'value' => array(
  16941. 'size' => 'normal',
  16942. 'type' => 'text',
  16943. 'not null' => FALSE,
  16944. ),
  16945. 'rank' => array(
  16946. 'size' => 'normal',
  16947. 'type' => 'int',
  16948. 'not null' => TRUE,
  16949. 'default' => 0,
  16950. ),
  16951. ),
  16952. 'unique keys' => array(
  16953. 'stock_relationship_c1' => array(
  16954. 0 => 'subject_id',
  16955. 1 => 'object_id',
  16956. 2 => 'type_id',
  16957. 3 => 'rank',
  16958. ),
  16959. ),
  16960. 'indexes' => array(
  16961. 'stock_relationship_idx1' => array(
  16962. 0 => 'subject_id',
  16963. ),
  16964. 'stock_relationship_idx2' => array(
  16965. 0 => 'object_id',
  16966. ),
  16967. 'stock_relationship_idx3' => array(
  16968. 0 => 'type_id',
  16969. ),
  16970. ),
  16971. 'primary key' => array(
  16972. 0 => 'stock_relationship_id',
  16973. ),
  16974. 'foreign keys' => array(
  16975. 'stock' => array(
  16976. 'table' => 'stock',
  16977. 'columns' => array(
  16978. 'subject_id' => 'stock_id',
  16979. 'object_id' => 'stock_id',
  16980. ),
  16981. ),
  16982. 'cvterm' => array(
  16983. 'table' => 'cvterm',
  16984. 'columns' => array(
  16985. 'type_id' => 'cvterm_id',
  16986. ),
  16987. ),
  16988. ),
  16989. 'referring_tables' => array(
  16990. 0 => 'stock_relationship_cvterm',
  16991. 1 => 'stock_relationship_pub',
  16992. ),
  16993. );
  16994. return $description;
  16995. }
  16996. /**
  16997. * Implements hook_chado_schema_v1_3_stock_relationship_cvterm()
  16998. *
  16999. * Purpose: To describe the structure of 'stock_relationship_cvterm' to tripal
  17000. * @see chado_insert_record()
  17001. * @see chado_update_record()
  17002. * @see chado_select_record()
  17003. * @see chado_generate_var()
  17004. * @see chado_expan_var()
  17005. *
  17006. * @return
  17007. * An array describing the 'stock_relationship_cvterm' table
  17008. *
  17009. * @ingroup tripal_chado_v1.3_schema_api
  17010. *
  17011. */
  17012. function tripal_chado_chado_schema_v1_3_stock_relationship_cvterm() {
  17013. $description = array(
  17014. 'description' => '',
  17015. 'table' => 'stock_relationship_cvterm',
  17016. 'fields' => array(
  17017. 'stock_relationship_cvterm_id' => array(
  17018. 'size' => 'big',
  17019. 'type' => 'serial',
  17020. 'not null' => TRUE,
  17021. ),
  17022. 'stock_relationship_id' => array(
  17023. 'size' => 'big',
  17024. 'type' => 'int',
  17025. 'not null' => TRUE,
  17026. ),
  17027. 'cvterm_id' => array(
  17028. 'size' => 'big',
  17029. 'type' => 'int',
  17030. 'not null' => TRUE,
  17031. ),
  17032. 'pub_id' => array(
  17033. 'size' => 'big',
  17034. 'type' => 'int',
  17035. 'not null' => FALSE,
  17036. ),
  17037. ),
  17038. 'primary key' => array(
  17039. 0 => 'stock_relationship_cvterm_id',
  17040. ),
  17041. 'foreign keys' => array(
  17042. 'stock_relationship' => array(
  17043. 'table' => 'stock_relationship',
  17044. 'columns' => array(
  17045. 'stock_relationship_id' => 'stock_relationship_id',
  17046. ),
  17047. ),
  17048. 'cvterm' => array(
  17049. 'table' => 'cvterm',
  17050. 'columns' => array(
  17051. 'cvterm_id' => 'cvterm_id',
  17052. ),
  17053. ),
  17054. 'pub' => array(
  17055. 'table' => 'pub',
  17056. 'columns' => array(
  17057. 'pub_id' => 'pub_id',
  17058. ),
  17059. ),
  17060. ),
  17061. 'referring_tables' => array(
  17062. ),
  17063. );
  17064. return $description;
  17065. }
  17066. /**
  17067. * Implements hook_chado_schema_v1_3_stock_relationship_pub()
  17068. *
  17069. * Purpose: To describe the structure of 'stock_relationship_pub' to tripal
  17070. * @see chado_insert_record()
  17071. * @see chado_update_record()
  17072. * @see chado_select_record()
  17073. * @see chado_generate_var()
  17074. * @see chado_expan_var()
  17075. *
  17076. * @return
  17077. * An array describing the 'stock_relationship_pub' table
  17078. *
  17079. * @ingroup tripal_chado_v1.3_schema_api
  17080. *
  17081. */
  17082. function tripal_chado_chado_schema_v1_3_stock_relationship_pub() {
  17083. $description = array(
  17084. 'description' => '',
  17085. 'table' => 'stock_relationship_pub',
  17086. 'fields' => array(
  17087. 'stock_relationship_pub_id' => array(
  17088. 'size' => 'big',
  17089. 'type' => 'serial',
  17090. 'not null' => TRUE,
  17091. ),
  17092. 'stock_relationship_id' => array(
  17093. 'size' => 'big',
  17094. 'type' => 'int',
  17095. 'not null' => TRUE,
  17096. ),
  17097. 'pub_id' => array(
  17098. 'size' => 'big',
  17099. 'type' => 'int',
  17100. 'not null' => TRUE,
  17101. ),
  17102. ),
  17103. 'unique keys' => array(
  17104. 'stock_relationship_pub_c1' => array(
  17105. 0 => 'stock_relationship_id',
  17106. 1 => 'pub_id',
  17107. ),
  17108. ),
  17109. 'indexes' => array(
  17110. 'stock_relationship_pub_idx1' => array(
  17111. 0 => 'stock_relationship_id',
  17112. ),
  17113. 'stock_relationship_pub_idx2' => array(
  17114. 0 => 'pub_id',
  17115. ),
  17116. ),
  17117. 'primary key' => array(
  17118. 0 => 'stock_relationship_pub_id',
  17119. ),
  17120. 'foreign keys' => array(
  17121. 'stock_relationship' => array(
  17122. 'table' => 'stock_relationship',
  17123. 'columns' => array(
  17124. 'stock_relationship_id' => 'stock_relationship_id',
  17125. ),
  17126. ),
  17127. 'pub' => array(
  17128. 'table' => 'pub',
  17129. 'columns' => array(
  17130. 'pub_id' => 'pub_id',
  17131. ),
  17132. ),
  17133. ),
  17134. 'referring_tables' => array(
  17135. ),
  17136. );
  17137. return $description;
  17138. }
  17139. /**
  17140. * Implements hook_chado_schema_v1_3_study()
  17141. *
  17142. * Purpose: To describe the structure of 'study' to tripal
  17143. * @see chado_insert_record()
  17144. * @see chado_update_record()
  17145. * @see chado_select_record()
  17146. * @see chado_generate_var()
  17147. * @see chado_expan_var()
  17148. *
  17149. * @return
  17150. * An array describing the 'study' table
  17151. *
  17152. * @ingroup tripal_chado_v1.3_schema_api
  17153. *
  17154. */
  17155. function tripal_chado_chado_schema_v1_3_study() {
  17156. $description = array(
  17157. 'description' => '',
  17158. 'table' => 'study',
  17159. 'fields' => array(
  17160. 'study_id' => array(
  17161. 'size' => 'big',
  17162. 'type' => 'serial',
  17163. 'not null' => TRUE,
  17164. ),
  17165. 'contact_id' => array(
  17166. 'size' => 'big',
  17167. 'type' => 'int',
  17168. 'not null' => TRUE,
  17169. ),
  17170. 'pub_id' => array(
  17171. 'size' => 'big',
  17172. 'type' => 'int',
  17173. 'not null' => FALSE,
  17174. ),
  17175. 'dbxref_id' => array(
  17176. 'size' => 'big',
  17177. 'type' => 'int',
  17178. 'not null' => FALSE,
  17179. ),
  17180. 'name' => array(
  17181. 'size' => 'normal',
  17182. 'type' => 'text',
  17183. 'not null' => TRUE,
  17184. ),
  17185. 'description' => array(
  17186. 'size' => 'normal',
  17187. 'type' => 'text',
  17188. 'not null' => FALSE,
  17189. ),
  17190. ),
  17191. 'unique keys' => array(
  17192. 'study_c1' => array(
  17193. 0 => 'name',
  17194. ),
  17195. ),
  17196. 'indexes' => array(
  17197. 'study_idx1' => array(
  17198. 0 => 'contact_id',
  17199. ),
  17200. 'study_idx2' => array(
  17201. 0 => 'pub_id',
  17202. ),
  17203. 'study_idx3' => array(
  17204. 0 => 'dbxref_id',
  17205. ),
  17206. ),
  17207. 'primary key' => array(
  17208. 0 => 'study_id',
  17209. ),
  17210. 'foreign keys' => array(
  17211. 'contact' => array(
  17212. 'table' => 'contact',
  17213. 'columns' => array(
  17214. 'contact_id' => 'contact_id',
  17215. ),
  17216. ),
  17217. 'pub' => array(
  17218. 'table' => 'pub',
  17219. 'columns' => array(
  17220. 'pub_id' => 'pub_id',
  17221. ),
  17222. ),
  17223. 'dbxref' => array(
  17224. 'table' => 'dbxref',
  17225. 'columns' => array(
  17226. 'dbxref_id' => 'dbxref_id',
  17227. ),
  17228. ),
  17229. ),
  17230. 'referring_tables' => array(
  17231. 0 => 'study_assay',
  17232. 1 => 'studydesign',
  17233. 2 => 'studyprop',
  17234. ),
  17235. );
  17236. return $description;
  17237. }
  17238. /**
  17239. * Implements hook_chado_schema_v1_3_study_assay()
  17240. *
  17241. * Purpose: To describe the structure of 'study_assay' to tripal
  17242. * @see chado_insert_record()
  17243. * @see chado_update_record()
  17244. * @see chado_select_record()
  17245. * @see chado_generate_var()
  17246. * @see chado_expan_var()
  17247. *
  17248. * @return
  17249. * An array describing the 'study_assay' table
  17250. *
  17251. * @ingroup tripal_chado_v1.3_schema_api
  17252. *
  17253. */
  17254. function tripal_chado_chado_schema_v1_3_study_assay() {
  17255. $description = array(
  17256. 'description' => '',
  17257. 'table' => 'study_assay',
  17258. 'fields' => array(
  17259. 'study_assay_id' => array(
  17260. 'size' => 'big',
  17261. 'type' => 'serial',
  17262. 'not null' => TRUE,
  17263. ),
  17264. 'study_id' => array(
  17265. 'size' => 'big',
  17266. 'type' => 'int',
  17267. 'not null' => TRUE,
  17268. ),
  17269. 'assay_id' => array(
  17270. 'size' => 'big',
  17271. 'type' => 'int',
  17272. 'not null' => TRUE,
  17273. ),
  17274. ),
  17275. 'unique keys' => array(
  17276. 'study_assay_c1' => array(
  17277. 0 => 'study_id',
  17278. 1 => 'assay_id',
  17279. ),
  17280. ),
  17281. 'indexes' => array(
  17282. 'study_assay_idx1' => array(
  17283. 0 => 'study_id',
  17284. ),
  17285. 'study_assay_idx2' => array(
  17286. 0 => 'assay_id',
  17287. ),
  17288. ),
  17289. 'primary key' => array(
  17290. 0 => 'study_assay_id',
  17291. ),
  17292. 'foreign keys' => array(
  17293. 'study' => array(
  17294. 'table' => 'study',
  17295. 'columns' => array(
  17296. 'study_id' => 'study_id',
  17297. ),
  17298. ),
  17299. 'assay' => array(
  17300. 'table' => 'assay',
  17301. 'columns' => array(
  17302. 'assay_id' => 'assay_id',
  17303. ),
  17304. ),
  17305. ),
  17306. 'referring_tables' => array(
  17307. ),
  17308. );
  17309. return $description;
  17310. }
  17311. /**
  17312. * Implements hook_chado_schema_v1_3_studydesign()
  17313. *
  17314. * Purpose: To describe the structure of 'studydesign' to tripal
  17315. * @see chado_insert_record()
  17316. * @see chado_update_record()
  17317. * @see chado_select_record()
  17318. * @see chado_generate_var()
  17319. * @see chado_expan_var()
  17320. *
  17321. * @return
  17322. * An array describing the 'studydesign' table
  17323. *
  17324. * @ingroup tripal_chado_v1.3_schema_api
  17325. *
  17326. */
  17327. function tripal_chado_chado_schema_v1_3_studydesign() {
  17328. $description = array(
  17329. 'description' => '',
  17330. 'table' => 'studydesign',
  17331. 'fields' => array(
  17332. 'studydesign_id' => array(
  17333. 'size' => 'big',
  17334. 'type' => 'serial',
  17335. 'not null' => TRUE,
  17336. ),
  17337. 'study_id' => array(
  17338. 'size' => 'big',
  17339. 'type' => 'int',
  17340. 'not null' => TRUE,
  17341. ),
  17342. 'description' => array(
  17343. 'size' => 'normal',
  17344. 'type' => 'text',
  17345. 'not null' => FALSE,
  17346. ),
  17347. ),
  17348. 'indexes' => array(
  17349. 'studydesign_idx1' => array(
  17350. 0 => 'study_id',
  17351. ),
  17352. ),
  17353. 'primary key' => array(
  17354. 0 => 'studydesign_id',
  17355. ),
  17356. 'foreign keys' => array(
  17357. 'study' => array(
  17358. 'table' => 'study',
  17359. 'columns' => array(
  17360. 'study_id' => 'study_id',
  17361. ),
  17362. ),
  17363. ),
  17364. 'referring_tables' => array(
  17365. 0 => 'studydesignprop',
  17366. 1 => 'studyfactor',
  17367. ),
  17368. );
  17369. return $description;
  17370. }
  17371. /**
  17372. * Implements hook_chado_schema_v1_3_studydesignprop()
  17373. *
  17374. * Purpose: To describe the structure of 'studydesignprop' to tripal
  17375. * @see chado_insert_record()
  17376. * @see chado_update_record()
  17377. * @see chado_select_record()
  17378. * @see chado_generate_var()
  17379. * @see chado_expan_var()
  17380. *
  17381. * @return
  17382. * An array describing the 'studydesignprop' table
  17383. *
  17384. * @ingroup tripal_chado_v1.3_schema_api
  17385. *
  17386. */
  17387. function tripal_chado_chado_schema_v1_3_studydesignprop() {
  17388. $description = array(
  17389. 'description' => '',
  17390. 'table' => 'studydesignprop',
  17391. 'fields' => array(
  17392. 'studydesignprop_id' => array(
  17393. 'size' => 'big',
  17394. 'type' => 'serial',
  17395. 'not null' => TRUE,
  17396. ),
  17397. 'studydesign_id' => array(
  17398. 'size' => 'big',
  17399. 'type' => 'int',
  17400. 'not null' => TRUE,
  17401. ),
  17402. 'type_id' => array(
  17403. 'size' => 'big',
  17404. 'type' => 'int',
  17405. 'not null' => TRUE,
  17406. ),
  17407. 'value' => array(
  17408. 'size' => 'normal',
  17409. 'type' => 'text',
  17410. 'not null' => FALSE,
  17411. ),
  17412. 'rank' => array(
  17413. 'size' => 'normal',
  17414. 'type' => 'int',
  17415. 'not null' => TRUE,
  17416. 'default' => 0,
  17417. ),
  17418. ),
  17419. 'unique keys' => array(
  17420. 'studydesignprop_c1' => array(
  17421. 0 => 'studydesign_id',
  17422. 1 => 'type_id',
  17423. 2 => 'rank',
  17424. ),
  17425. ),
  17426. 'indexes' => array(
  17427. 'studydesignprop_idx1' => array(
  17428. 0 => 'studydesign_id',
  17429. ),
  17430. 'studydesignprop_idx2' => array(
  17431. 0 => 'type_id',
  17432. ),
  17433. ),
  17434. 'primary key' => array(
  17435. 0 => 'studydesignprop_id',
  17436. ),
  17437. 'foreign keys' => array(
  17438. 'studydesign' => array(
  17439. 'table' => 'studydesign',
  17440. 'columns' => array(
  17441. 'studydesign_id' => 'studydesign_id',
  17442. ),
  17443. ),
  17444. 'cvterm' => array(
  17445. 'table' => 'cvterm',
  17446. 'columns' => array(
  17447. 'type_id' => 'cvterm_id',
  17448. ),
  17449. ),
  17450. ),
  17451. 'referring_tables' => array(
  17452. ),
  17453. );
  17454. return $description;
  17455. }
  17456. /**
  17457. * Implements hook_chado_schema_v1_3_studyfactor()
  17458. *
  17459. * Purpose: To describe the structure of 'studyfactor' to tripal
  17460. * @see chado_insert_record()
  17461. * @see chado_update_record()
  17462. * @see chado_select_record()
  17463. * @see chado_generate_var()
  17464. * @see chado_expan_var()
  17465. *
  17466. * @return
  17467. * An array describing the 'studyfactor' table
  17468. *
  17469. * @ingroup tripal_chado_v1.3_schema_api
  17470. *
  17471. */
  17472. function tripal_chado_chado_schema_v1_3_studyfactor() {
  17473. $description = array(
  17474. 'description' => '',
  17475. 'table' => 'studyfactor',
  17476. 'fields' => array(
  17477. 'studyfactor_id' => array(
  17478. 'size' => 'big',
  17479. 'type' => 'serial',
  17480. 'not null' => TRUE,
  17481. ),
  17482. 'studydesign_id' => array(
  17483. 'size' => 'big',
  17484. 'type' => 'int',
  17485. 'not null' => TRUE,
  17486. ),
  17487. 'type_id' => array(
  17488. 'size' => 'big',
  17489. 'type' => 'int',
  17490. 'not null' => FALSE,
  17491. ),
  17492. 'name' => array(
  17493. 'size' => 'normal',
  17494. 'type' => 'text',
  17495. 'not null' => TRUE,
  17496. ),
  17497. 'description' => array(
  17498. 'size' => 'normal',
  17499. 'type' => 'text',
  17500. 'not null' => FALSE,
  17501. ),
  17502. ),
  17503. 'indexes' => array(
  17504. 'studyfactor_idx1' => array(
  17505. 0 => 'studydesign_id',
  17506. ),
  17507. 'studyfactor_idx2' => array(
  17508. 0 => 'type_id',
  17509. ),
  17510. ),
  17511. 'primary key' => array(
  17512. 0 => 'studyfactor_id',
  17513. ),
  17514. 'foreign keys' => array(
  17515. 'studydesign' => array(
  17516. 'table' => 'studydesign',
  17517. 'columns' => array(
  17518. 'studydesign_id' => 'studydesign_id',
  17519. ),
  17520. ),
  17521. 'cvterm' => array(
  17522. 'table' => 'cvterm',
  17523. 'columns' => array(
  17524. 'type_id' => 'cvterm_id',
  17525. ),
  17526. ),
  17527. ),
  17528. 'referring_tables' => array(
  17529. 0 => 'studyfactorvalue',
  17530. ),
  17531. );
  17532. return $description;
  17533. }
  17534. /**
  17535. * Implements hook_chado_schema_v1_3_studyfactorvalue()
  17536. *
  17537. * Purpose: To describe the structure of 'studyfactorvalue' to tripal
  17538. * @see chado_insert_record()
  17539. * @see chado_update_record()
  17540. * @see chado_select_record()
  17541. * @see chado_generate_var()
  17542. * @see chado_expan_var()
  17543. *
  17544. * @return
  17545. * An array describing the 'studyfactorvalue' table
  17546. *
  17547. * @ingroup tripal_chado_v1.3_schema_api
  17548. *
  17549. */
  17550. function tripal_chado_chado_schema_v1_3_studyfactorvalue() {
  17551. $description = array(
  17552. 'description' => '',
  17553. 'table' => 'studyfactorvalue',
  17554. 'fields' => array(
  17555. 'studyfactorvalue_id' => array(
  17556. 'size' => 'big',
  17557. 'type' => 'serial',
  17558. 'not null' => TRUE,
  17559. ),
  17560. 'studyfactor_id' => array(
  17561. 'size' => 'big',
  17562. 'type' => 'int',
  17563. 'not null' => TRUE,
  17564. ),
  17565. 'assay_id' => array(
  17566. 'size' => 'big',
  17567. 'type' => 'int',
  17568. 'not null' => TRUE,
  17569. ),
  17570. 'factorvalue' => array(
  17571. 'size' => 'normal',
  17572. 'type' => 'text',
  17573. 'not null' => FALSE,
  17574. ),
  17575. 'name' => array(
  17576. 'size' => 'normal',
  17577. 'type' => 'text',
  17578. 'not null' => FALSE,
  17579. ),
  17580. 'rank' => array(
  17581. 'size' => 'normal',
  17582. 'type' => 'int',
  17583. 'not null' => TRUE,
  17584. 'default' => 0,
  17585. ),
  17586. ),
  17587. 'indexes' => array(
  17588. 'studyfactorvalue_idx1' => array(
  17589. 0 => 'studyfactor_id',
  17590. ),
  17591. 'studyfactorvalue_idx2' => array(
  17592. 0 => 'assay_id',
  17593. ),
  17594. ),
  17595. 'primary key' => array(
  17596. 0 => 'studyfactorvalue_id',
  17597. ),
  17598. 'foreign keys' => array(
  17599. 'studyfactor' => array(
  17600. 'table' => 'studyfactor',
  17601. 'columns' => array(
  17602. 'studyfactor_id' => 'studyfactor_id',
  17603. ),
  17604. ),
  17605. 'assay' => array(
  17606. 'table' => 'assay',
  17607. 'columns' => array(
  17608. 'assay_id' => 'assay_id',
  17609. ),
  17610. ),
  17611. ),
  17612. 'referring_tables' => array(
  17613. ),
  17614. );
  17615. return $description;
  17616. }
  17617. /**
  17618. * Implements hook_chado_schema_v1_3_studyprop()
  17619. *
  17620. * Purpose: To describe the structure of 'studyprop' to tripal
  17621. * @see chado_insert_record()
  17622. * @see chado_update_record()
  17623. * @see chado_select_record()
  17624. * @see chado_generate_var()
  17625. * @see chado_expan_var()
  17626. *
  17627. * @return
  17628. * An array describing the 'studyprop' table
  17629. *
  17630. * @ingroup tripal_chado_v1.3_schema_api
  17631. *
  17632. */
  17633. function tripal_chado_chado_schema_v1_3_studyprop() {
  17634. $description = array(
  17635. 'description' => '',
  17636. 'table' => 'studyprop',
  17637. 'fields' => array(
  17638. 'studyprop_id' => array(
  17639. 'size' => 'big',
  17640. 'type' => 'serial',
  17641. 'not null' => TRUE,
  17642. ),
  17643. 'study_id' => array(
  17644. 'size' => 'big',
  17645. 'type' => 'int',
  17646. 'not null' => TRUE,
  17647. ),
  17648. 'type_id' => array(
  17649. 'size' => 'big',
  17650. 'type' => 'int',
  17651. 'not null' => TRUE,
  17652. ),
  17653. 'value' => array(
  17654. 'size' => 'normal',
  17655. 'type' => 'text',
  17656. 'not null' => FALSE,
  17657. ),
  17658. 'rank' => array(
  17659. 'size' => 'normal',
  17660. 'type' => 'int',
  17661. 'not null' => TRUE,
  17662. 'default' => 0,
  17663. ),
  17664. ),
  17665. 'indexes' => array(
  17666. 'studyprop_idx1' => array(
  17667. 0 => 'study_id',
  17668. ),
  17669. 'studyprop_idx2' => array(
  17670. 0 => 'type_id',
  17671. ),
  17672. ),
  17673. 'primary key' => array(
  17674. 0 => 'studyprop_id',
  17675. ),
  17676. 'unique keys' => array(
  17677. 'study_id_type_id_rank' => array(
  17678. 0 => 'study_id',
  17679. 1 => 'type_id',
  17680. 2 => 'rank',
  17681. ),
  17682. ),
  17683. 'foreign keys' => array(
  17684. 'study' => array(
  17685. 'table' => 'study',
  17686. 'columns' => array(
  17687. 'study_id' => 'study_id',
  17688. ),
  17689. ),
  17690. 'cvterm' => array(
  17691. 'table' => 'cvterm',
  17692. 'columns' => array(
  17693. 'type_id' => 'cvterm_id',
  17694. ),
  17695. ),
  17696. ),
  17697. 'referring_tables' => array(
  17698. 0 => 'studyprop_feature',
  17699. ),
  17700. );
  17701. return $description;
  17702. }
  17703. /**
  17704. * Implements hook_chado_schema_v1_3_studyprop_feature()
  17705. *
  17706. * Purpose: To describe the structure of 'studyprop_feature' to tripal
  17707. * @see chado_insert_record()
  17708. * @see chado_update_record()
  17709. * @see chado_select_record()
  17710. * @see chado_generate_var()
  17711. * @see chado_expan_var()
  17712. *
  17713. * @return
  17714. * An array describing the 'studyprop_feature' table
  17715. *
  17716. * @ingroup tripal_chado_v1.3_schema_api
  17717. *
  17718. */
  17719. function tripal_chado_chado_schema_v1_3_studyprop_feature() {
  17720. $description = array(
  17721. 'description' => '',
  17722. 'table' => 'studyprop_feature',
  17723. 'fields' => array(
  17724. 'studyprop_feature_id' => array(
  17725. 'size' => 'big',
  17726. 'type' => 'serial',
  17727. 'not null' => TRUE,
  17728. ),
  17729. 'studyprop_id' => array(
  17730. 'size' => 'big',
  17731. 'type' => 'int',
  17732. 'not null' => TRUE,
  17733. ),
  17734. 'feature_id' => array(
  17735. 'size' => 'big',
  17736. 'type' => 'int',
  17737. 'not null' => TRUE,
  17738. ),
  17739. 'type_id' => array(
  17740. 'size' => 'big',
  17741. 'type' => 'int',
  17742. 'not null' => FALSE,
  17743. ),
  17744. ),
  17745. 'indexes' => array(
  17746. 'studyprop_feature_idx1' => array(
  17747. 0 => 'studyprop_id',
  17748. ),
  17749. 'studyprop_feature_idx2' => array(
  17750. 0 => 'feature_id',
  17751. ),
  17752. ),
  17753. 'primary key' => array(
  17754. 0 => 'studyprop_feature_id',
  17755. ),
  17756. 'unique keys' => array(
  17757. 'studyprop_id_feature_id' => array(
  17758. 0 => 'studyprop_id',
  17759. 1 => 'feature_id',
  17760. ),
  17761. ),
  17762. 'foreign keys' => array(
  17763. 'studyprop' => array(
  17764. 'table' => 'studyprop',
  17765. 'columns' => array(
  17766. 'studyprop_id' => 'studyprop_id',
  17767. ),
  17768. ),
  17769. 'feature' => array(
  17770. 'table' => 'feature',
  17771. 'columns' => array(
  17772. 'feature_id' => 'feature_id',
  17773. ),
  17774. ),
  17775. 'cvterm' => array(
  17776. 'table' => 'cvterm',
  17777. 'columns' => array(
  17778. 'type_id' => 'cvterm_id',
  17779. ),
  17780. ),
  17781. ),
  17782. 'referring_tables' => array(
  17783. ),
  17784. );
  17785. return $description;
  17786. }
  17787. /**
  17788. * Implements hook_chado_schema_v1_3_synonym()
  17789. *
  17790. * Purpose: To describe the structure of 'synonym' to tripal
  17791. * @see chado_insert_record()
  17792. * @see chado_update_record()
  17793. * @see chado_select_record()
  17794. * @see chado_generate_var()
  17795. * @see chado_expan_var()
  17796. *
  17797. * @return
  17798. * An array describing the 'synonym' table
  17799. *
  17800. * @ingroup tripal_chado_v1.3_schema_api
  17801. *
  17802. */
  17803. function tripal_chado_chado_schema_v1_3_synonym() {
  17804. $description = array(
  17805. 'description' => '',
  17806. 'table' => 'synonym',
  17807. 'fields' => array(
  17808. 'synonym_id' => array(
  17809. 'size' => 'big',
  17810. 'type' => 'serial',
  17811. 'not null' => TRUE,
  17812. ),
  17813. 'name' => array(
  17814. 'size' => 'normal',
  17815. 'type' => 'varchar',
  17816. 'length' => '255',
  17817. 'not null' => TRUE,
  17818. ),
  17819. 'type_id' => array(
  17820. 'size' => 'big',
  17821. 'type' => 'int',
  17822. 'not null' => TRUE,
  17823. ),
  17824. 'synonym_sgml' => array(
  17825. 'size' => 'normal',
  17826. 'type' => 'varchar',
  17827. 'length' => '255',
  17828. 'not null' => TRUE,
  17829. ),
  17830. ),
  17831. 'unique keys' => array(
  17832. 'synonym_c1' => array(
  17833. 0 => 'name',
  17834. 1 => 'type_id',
  17835. ),
  17836. ),
  17837. 'indexes' => array(
  17838. 'synonym_idx1' => array(
  17839. 0 => 'type_id',
  17840. ),
  17841. ),
  17842. 'primary key' => array(
  17843. 0 => 'synonym_id',
  17844. ),
  17845. 'foreign keys' => array(
  17846. 'cvterm' => array(
  17847. 'table' => 'cvterm',
  17848. 'columns' => array(
  17849. 'type_id' => 'cvterm_id',
  17850. ),
  17851. ),
  17852. ),
  17853. 'referring_tables' => array(
  17854. 0 => 'cell_line_synonym',
  17855. 1 => 'feature_synonym',
  17856. 2 => 'library_synonym',
  17857. ),
  17858. );
  17859. return $description;
  17860. }
  17861. /**
  17862. * Implements hook_chado_schema_v1_3_tableinfo()
  17863. *
  17864. * Purpose: To describe the structure of 'tableinfo' to tripal
  17865. * @see chado_insert_record()
  17866. * @see chado_update_record()
  17867. * @see chado_select_record()
  17868. * @see chado_generate_var()
  17869. * @see chado_expan_var()
  17870. *
  17871. * @return
  17872. * An array describing the 'tableinfo' table
  17873. *
  17874. * @ingroup tripal_chado_v1.3_schema_api
  17875. *
  17876. */
  17877. function tripal_chado_chado_schema_v1_3_tableinfo() {
  17878. $description = array(
  17879. 'description' => '',
  17880. 'table' => 'tableinfo',
  17881. 'fields' => array(
  17882. 'tableinfo_id' => array(
  17883. 'size' => 'big',
  17884. 'type' => 'serial',
  17885. 'not null' => TRUE,
  17886. ),
  17887. 'name' => array(
  17888. 'size' => 'normal',
  17889. 'type' => 'varchar',
  17890. 'length' => '30',
  17891. 'not null' => TRUE,
  17892. ),
  17893. 'primary_key_column' => array(
  17894. 'size' => 'normal',
  17895. 'type' => 'varchar',
  17896. 'length' => '30',
  17897. 'not null' => FALSE,
  17898. ),
  17899. 'is_view' => array(
  17900. 'size' => 'normal',
  17901. 'type' => 'int',
  17902. 'not null' => TRUE,
  17903. 'default' => 0,
  17904. ),
  17905. 'view_on_table_id' => array(
  17906. 'size' => 'big',
  17907. 'type' => 'int',
  17908. 'not null' => FALSE,
  17909. ),
  17910. 'superclass_table_id' => array(
  17911. 'size' => 'big',
  17912. 'type' => 'int',
  17913. 'not null' => FALSE,
  17914. ),
  17915. 'is_updateable' => array(
  17916. 'size' => 'normal',
  17917. 'type' => 'int',
  17918. 'not null' => TRUE,
  17919. 'default' => 1,
  17920. ),
  17921. 'modification_date' => array(
  17922. 'size' => 'normal',
  17923. 'type' => 'date',
  17924. 'not null' => TRUE,
  17925. 'default' => 'now()',
  17926. ),
  17927. ),
  17928. 'unique keys' => array(
  17929. 'tableinfo_c1' => array(
  17930. 0 => 'name',
  17931. ),
  17932. ),
  17933. 'primary key' => array(
  17934. 0 => 'tableinfo_id',
  17935. ),
  17936. 'foreign keys' => array(
  17937. ),
  17938. 'referring_tables' => array(
  17939. 0 => 'control',
  17940. 1 => 'magedocumentation',
  17941. ),
  17942. );
  17943. return $description;
  17944. }
  17945. /**
  17946. * Implements hook_chado_schema_v1_3_treatment()
  17947. *
  17948. * Purpose: To describe the structure of 'treatment' to tripal
  17949. * @see chado_insert_record()
  17950. * @see chado_update_record()
  17951. * @see chado_select_record()
  17952. * @see chado_generate_var()
  17953. * @see chado_expan_var()
  17954. *
  17955. * @return
  17956. * An array describing the 'treatment' table
  17957. *
  17958. * @ingroup tripal_chado_v1.3_schema_api
  17959. *
  17960. */
  17961. function tripal_chado_chado_schema_v1_3_treatment() {
  17962. $description = array(
  17963. 'description' => '',
  17964. 'table' => 'treatment',
  17965. 'fields' => array(
  17966. 'treatment_id' => array(
  17967. 'size' => 'big',
  17968. 'type' => 'serial',
  17969. 'not null' => TRUE,
  17970. ),
  17971. 'rank' => array(
  17972. 'size' => 'normal',
  17973. 'type' => 'int',
  17974. 'not null' => TRUE,
  17975. 'default' => 0,
  17976. ),
  17977. 'biomaterial_id' => array(
  17978. 'size' => 'big',
  17979. 'type' => 'int',
  17980. 'not null' => TRUE,
  17981. ),
  17982. 'type_id' => array(
  17983. 'size' => 'big',
  17984. 'type' => 'int',
  17985. 'not null' => TRUE,
  17986. ),
  17987. 'protocol_id' => array(
  17988. 'size' => 'big',
  17989. 'type' => 'int',
  17990. 'not null' => FALSE,
  17991. ),
  17992. 'name' => array(
  17993. 'size' => 'normal',
  17994. 'type' => 'text',
  17995. 'not null' => FALSE,
  17996. ),
  17997. ),
  17998. 'indexes' => array(
  17999. 'treatment_idx1' => array(
  18000. 0 => 'biomaterial_id',
  18001. ),
  18002. 'treatment_idx2' => array(
  18003. 0 => 'type_id',
  18004. ),
  18005. 'treatment_idx3' => array(
  18006. 0 => 'protocol_id',
  18007. ),
  18008. ),
  18009. 'primary key' => array(
  18010. 0 => 'treatment_id',
  18011. ),
  18012. 'foreign keys' => array(
  18013. 'biomaterial' => array(
  18014. 'table' => 'biomaterial',
  18015. 'columns' => array(
  18016. 'biomaterial_id' => 'biomaterial_id',
  18017. ),
  18018. ),
  18019. 'cvterm' => array(
  18020. 'table' => 'cvterm',
  18021. 'columns' => array(
  18022. 'type_id' => 'cvterm_id',
  18023. ),
  18024. ),
  18025. 'protocol' => array(
  18026. 'table' => 'protocol',
  18027. 'columns' => array(
  18028. 'protocol_id' => 'protocol_id',
  18029. ),
  18030. ),
  18031. ),
  18032. 'referring_tables' => array(
  18033. 0 => 'biomaterial_treatment',
  18034. ),
  18035. );
  18036. return $description;
  18037. }
  18038. /**
  18039. * Lists the table names in the v1.3 chado schema
  18040. *
  18041. * @return
  18042. * An array containing all of the table names
  18043. *
  18044. * @ingroup tripal_chado_v1.3_schema_api
  18045. *
  18046. */
  18047. function tripal_chado_chado_get_v1_3_tables() {
  18048. $tables = array(
  18049. 'acquisition',
  18050. 'acquisitionprop',
  18051. 'acquisition_relationship',
  18052. 'analysis',
  18053. 'analysis_cvterm',
  18054. 'analysis_dbxref',
  18055. 'analysisfeature',
  18056. 'analysisfeatureprop',
  18057. 'analysis_organism',
  18058. 'analysisprop',
  18059. 'analysis_pub',
  18060. 'analysis_relationship',
  18061. 'arraydesign',
  18062. 'arraydesignprop',
  18063. 'assay',
  18064. 'assay_biomaterial',
  18065. 'assay_project',
  18066. 'assayprop',
  18067. 'biomaterial',
  18068. 'biomaterial_dbxref',
  18069. 'biomaterialprop',
  18070. 'biomaterial_relationship',
  18071. 'biomaterial_treatment',
  18072. 'cell_line',
  18073. 'cell_line_cvterm',
  18074. 'cell_line_cvtermprop',
  18075. 'cell_line_dbxref',
  18076. 'cell_line_feature',
  18077. 'cell_line_library',
  18078. 'cell_lineprop',
  18079. 'cell_lineprop_pub',
  18080. 'cell_line_pub',
  18081. 'cell_line_relationship',
  18082. 'cell_line_synonym',
  18083. 'chadoprop',
  18084. 'channel',
  18085. 'contact',
  18086. 'contactprop',
  18087. 'contact_relationship',
  18088. 'control',
  18089. 'cv',
  18090. 'cvprop',
  18091. 'cv_root_mview',
  18092. 'cvterm',
  18093. 'cvterm_dbxref',
  18094. 'cvtermpath',
  18095. 'cvtermprop',
  18096. 'cvterm_relationship',
  18097. 'cvtermsynonym',
  18098. 'db',
  18099. 'dbprop',
  18100. 'dbxref',
  18101. 'dbxrefprop',
  18102. 'eimage',
  18103. 'element',
  18104. 'element_relationship',
  18105. 'elementresult',
  18106. 'elementresult_relationship',
  18107. 'environment',
  18108. 'environment_cvterm',
  18109. 'expression',
  18110. 'expression_cvterm',
  18111. 'expression_cvtermprop',
  18112. 'expression_image',
  18113. 'expressionprop',
  18114. 'expression_pub',
  18115. 'feature',
  18116. 'feature_contact',
  18117. 'feature_cvterm',
  18118. 'feature_cvterm_dbxref',
  18119. 'feature_cvtermprop',
  18120. 'feature_cvterm_pub',
  18121. 'feature_dbxref',
  18122. 'feature_expression',
  18123. 'feature_expressionprop',
  18124. 'feature_genotype',
  18125. 'featureloc',
  18126. 'featureloc_pub',
  18127. 'featuremap',
  18128. 'featuremap_contact',
  18129. 'featuremap_dbxref',
  18130. 'featuremap_organism',
  18131. 'featuremapprop',
  18132. 'featuremap_pub',
  18133. 'feature_phenotype',
  18134. 'featurepos',
  18135. 'featureposprop',
  18136. 'featureprop',
  18137. 'featureprop_pub',
  18138. 'feature_pub',
  18139. 'feature_pubprop',
  18140. 'featurerange',
  18141. 'feature_relationship',
  18142. 'feature_relationshipprop',
  18143. 'feature_relationshipprop_pub',
  18144. 'feature_relationship_pub',
  18145. 'feature_synonym',
  18146. 'genotype',
  18147. 'genotypeprop',
  18148. 'library',
  18149. 'library_contact',
  18150. 'library_cvterm',
  18151. 'library_dbxref',
  18152. 'library_expression',
  18153. 'library_expressionprop',
  18154. 'library_feature',
  18155. 'library_featureprop',
  18156. 'libraryprop',
  18157. 'libraryprop_pub',
  18158. 'library_pub',
  18159. 'library_relationship',
  18160. 'library_relationship_pub',
  18161. 'library_synonym',
  18162. 'magedocumentation',
  18163. 'mageml',
  18164. 'materialized_view',
  18165. 'nd_experiment',
  18166. 'nd_experiment_analysis',
  18167. 'nd_experiment_contact',
  18168. 'nd_experiment_dbxref',
  18169. 'nd_experiment_genotype',
  18170. 'nd_experiment_phenotype',
  18171. 'nd_experiment_project',
  18172. 'nd_experimentprop',
  18173. 'nd_experiment_protocol',
  18174. 'nd_experiment_pub',
  18175. 'nd_experiment_stock',
  18176. 'nd_experiment_stock_dbxref',
  18177. 'nd_experiment_stockprop',
  18178. 'nd_geolocation',
  18179. 'nd_geolocationprop',
  18180. 'nd_protocol',
  18181. 'nd_protocolprop',
  18182. 'nd_protocol_reagent',
  18183. 'nd_reagent',
  18184. 'nd_reagentprop',
  18185. 'nd_reagent_relationship',
  18186. 'organism',
  18187. 'organism_cvterm',
  18188. 'organism_cvtermprop',
  18189. 'organism_dbxref',
  18190. 'organism_feature_count',
  18191. 'organismprop',
  18192. 'organismprop_pub',
  18193. 'organism_pub',
  18194. 'organism_relationship',
  18195. 'phendesc',
  18196. 'phenotype',
  18197. 'phenotype_comparison',
  18198. 'phenotype_comparison_cvterm',
  18199. 'phenotype_cvterm',
  18200. 'phenotypeprop',
  18201. 'phenstatement',
  18202. 'phylonode',
  18203. 'phylonode_dbxref',
  18204. 'phylonode_organism',
  18205. 'phylonodeprop',
  18206. 'phylonode_pub',
  18207. 'phylonode_relationship',
  18208. 'phylotree',
  18209. 'phylotreeprop',
  18210. 'phylotree_pub',
  18211. 'project',
  18212. 'project_analysis',
  18213. 'project_contact',
  18214. 'project_dbxref',
  18215. 'project_feature',
  18216. 'projectprop',
  18217. 'project_pub',
  18218. 'project_relationship',
  18219. 'project_stock',
  18220. 'protocol',
  18221. 'protocolparam',
  18222. 'pub',
  18223. 'pubauthor',
  18224. 'pubauthor_contact',
  18225. 'pub_dbxref',
  18226. 'pubprop',
  18227. 'pub_relationship',
  18228. 'quantification',
  18229. 'quantificationprop',
  18230. 'quantification_relationship',
  18231. 'stock',
  18232. 'stockcollection',
  18233. 'stockcollection_db',
  18234. 'stockcollectionprop',
  18235. 'stockcollection_stock',
  18236. 'stock_cvterm',
  18237. 'stock_cvtermprop',
  18238. 'stock_dbxref',
  18239. 'stock_dbxrefprop',
  18240. 'stock_feature',
  18241. 'stock_featuremap',
  18242. 'stock_genotype',
  18243. 'stock_library',
  18244. 'stockprop',
  18245. 'stockprop_pub',
  18246. 'stock_pub',
  18247. 'stock_relationship',
  18248. 'stock_relationship_cvterm',
  18249. 'stock_relationship_pub',
  18250. 'study',
  18251. 'study_assay',
  18252. 'studydesign',
  18253. 'studydesignprop',
  18254. 'studyfactor',
  18255. 'studyfactorvalue',
  18256. 'studyprop',
  18257. 'studyprop_feature',
  18258. 'synonym',
  18259. 'tableinfo',
  18260. 'treatment',
  18261. );
  18262. return $tables;
  18263. }