tripal_core.schema_v1.11.api.inc 250 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867
  1. <?php
  2. /* @file: This file contains default schema definitions for all chado v1.11 tables
  3. * to be used by other function. Specifically these functions are used
  4. * by the tripal_core select/insert/update API functions and by
  5. * the Tripal Views module.
  6. *
  7. * These schema definitions can be augmented by anohter modules
  8. * (specifically to add missing definitions) by implementing
  9. * hook_chado_schema_v1_11_<table name>().
  10. *
  11. * @defgroup tripal_schema_v1_11_api Chado v1.11 Schema API
  12. * @ingroup tripal_core_api
  13. * @{
  14. * Provides an application programming interface (API) for describing Chado tables.
  15. * This API consists of a set of functions, one for each table in Chado. Each
  16. * function simply returns a Drupal style array that defines the table.
  17. *
  18. * Because Drupal 6 does not handle foreign key (FK) relationships, however FK
  19. * relationships are needed to for Tripal Views. Therefore, FK relationships
  20. * have been added to the schema defintitions below.
  21. *
  22. * The functions provided in this documentation should not be called as is, but if you need
  23. * the Drupal-style array definition for any table, use the following function
  24. * call:
  25. *
  26. * $table_desc = tripal_core_get_chado_table_schema($table)
  27. *
  28. * where the variable $table contains the name of the table you want to
  29. * retireve. The tripal_core_get_chado_table_schema function determines the appropriate version of
  30. * Chado and uses the Drupal hook infrastructure to call the appropriate
  31. * hook function to retrieve the table schema.
  32. *
  33. * @}
  34. */
  35. /**
  36. * Implements hook_chado_schema_v1_11_acquisition()
  37. * Purpose: To describe the structure of 'acquisition' to tripal
  38. * @see tripal_core_chado_insert()
  39. * @see tripal_core_chado_update()
  40. * @see tripal_core_chado_select()
  41. *
  42. * @return
  43. * An array describing the 'acquisition' table
  44. *
  45. * @ingroup tripal_chado_v1.11_schema_api
  46. *
  47. */
  48. function tripal_core_chado_schema_v1_11_acquisition() {
  49. $description = array(
  50. 'table' => 'acquisition',
  51. 'fields' => array(
  52. 'acquisition_id' => array(
  53. 'type' => 'serial',
  54. 'not NULL' => '1',
  55. ),
  56. 'assay_id' => array(
  57. 'type' => 'int',
  58. 'not NULL' => '1',
  59. ),
  60. 'protocol_id' => array(
  61. 'type' => 'int',
  62. 'not NULL' => '',
  63. ),
  64. 'channel_id' => array(
  65. 'type' => 'int',
  66. 'not NULL' => '',
  67. ),
  68. 'acquisitiondate' => array(
  69. 'type' => 'datetime',
  70. 'not NULL' => '',
  71. 'default' => 'ow(',
  72. ),
  73. 'name' => array(
  74. 'type' => 'text',
  75. 'not NULL' => '',
  76. ),
  77. 'uri' => array(
  78. 'type' => 'text',
  79. 'not NULL' => '',
  80. ),
  81. ),
  82. 'primary key' => array(
  83. 0 => 'acquisition_id',
  84. ),
  85. 'unique keys' => array(
  86. 'acquisition_c1' => array(
  87. 0 => 'name',
  88. ),
  89. ),
  90. 'indexes' => array(
  91. 'acquisition_idx1' => array(
  92. 0 => 'assay_id',
  93. ),
  94. 'acquisition_idx2' => array(
  95. 0 => 'protocol_id',
  96. ),
  97. 'acquisition_idx3' => array(
  98. 0 => 'channel_id',
  99. ),
  100. ),
  101. 'foreign keys' => array(
  102. 'protocol' => array(
  103. 'table' => 'protocol',
  104. 'columns' => array(
  105. 'protocol_id' => 'protocol_id',
  106. ),
  107. ),
  108. 'channel' => array(
  109. 'table' => 'channel',
  110. 'columns' => array(
  111. 'channel_id' => 'channel_id',
  112. ),
  113. ),
  114. 'assay' => array(
  115. 'table' => 'assay',
  116. 'columns' => array(
  117. 'assay_id' => 'assay_id',
  118. ),
  119. ),
  120. ),
  121. );
  122. return $description;
  123. }
  124. /**
  125. * Implements hook_chado_schema_v1_11_acquisition_relationship()
  126. * Purpose: To describe the structure of 'acquisition_relationship' to tripal
  127. * @see tripal_core_chado_insert()
  128. * @see tripal_core_chado_update()
  129. * @see tripal_core_chado_select()
  130. *
  131. * @return
  132. * An array describing the 'acquisition_relationship' table
  133. *
  134. * @ingroup tripal_chado_v1.11_schema_api
  135. *
  136. */
  137. function tripal_core_chado_schema_v1_11_acquisition_relationship() {
  138. $description = array(
  139. 'table' => 'acquisition_relationship',
  140. 'fields' => array(
  141. 'acquisition_relationship_id' => array(
  142. 'type' => 'serial',
  143. 'not NULL' => '1',
  144. ),
  145. 'subject_id' => array(
  146. 'type' => 'int',
  147. 'not NULL' => '1',
  148. ),
  149. 'type_id' => array(
  150. 'type' => 'int',
  151. 'not NULL' => '1',
  152. ),
  153. 'object_id' => array(
  154. 'type' => 'int',
  155. 'not NULL' => '1',
  156. ),
  157. 'value' => array(
  158. 'type' => 'text',
  159. 'not NULL' => '',
  160. ),
  161. 'rank' => array(
  162. 'type' => 'int',
  163. 'not NULL' => '1',
  164. 'default' => '0',
  165. ),
  166. ),
  167. 'primary key' => array(
  168. 0 => 'acquisition_relationship_id',
  169. ),
  170. 'unique keys' => array(
  171. 'acquisition_relationship_c1' => array(
  172. 0 => 'subject_id',
  173. 1 => 'object_id',
  174. 2 => 'type_id',
  175. 3 => 'rank',
  176. ),
  177. ),
  178. 'indexes' => array(
  179. 'acquisition_relationship_idx1' => array(
  180. 0 => 'subject_id',
  181. ),
  182. 'acquisition_relationship_idx2' => array(
  183. 0 => 'type_id',
  184. ),
  185. 'acquisition_relationship_idx3' => array(
  186. 0 => 'object_id',
  187. ),
  188. ),
  189. 'foreign keys' => array(
  190. 'cvterm' => array(
  191. 'table' => 'cvterm',
  192. 'columns' => array(
  193. 'type_id' => 'cvterm_id',
  194. ),
  195. ),
  196. 'acquisition' => array(
  197. 'table' => 'acquisition',
  198. 'columns' => array(
  199. 'subject_id' => 'acquisition_id',
  200. 'object_id' => 'acquisition_id',
  201. ),
  202. ),
  203. ),
  204. );
  205. return $description;
  206. }
  207. /**
  208. * Implements hook_chado_schema_v1_11_acquisitionprop()
  209. * Purpose: To describe the structure of 'acquisitionprop' to tripal
  210. * @see tripal_core_chado_insert()
  211. * @see tripal_core_chado_update()
  212. * @see tripal_core_chado_select()
  213. *
  214. * @return
  215. * An array describing the 'acquisitionprop' table
  216. *
  217. * @ingroup tripal_chado_v1.11_schema_api
  218. *
  219. */
  220. function tripal_core_chado_schema_v1_11_acquisitionprop() {
  221. $description = array(
  222. 'table' => 'acquisitionprop',
  223. 'fields' => array(
  224. 'acquisitionprop_id' => array(
  225. 'type' => 'serial',
  226. 'not NULL' => '1',
  227. ),
  228. 'acquisition_id' => array(
  229. 'type' => 'int',
  230. 'not NULL' => '1',
  231. ),
  232. 'type_id' => array(
  233. 'type' => 'int',
  234. 'not NULL' => '1',
  235. ),
  236. 'value' => array(
  237. 'type' => 'text',
  238. 'not NULL' => '',
  239. ),
  240. 'rank' => array(
  241. 'type' => 'int',
  242. 'not NULL' => '1',
  243. 'default' => '0',
  244. ),
  245. ),
  246. 'primary key' => array(
  247. 0 => 'acquisitionprop_id',
  248. ),
  249. 'unique keys' => array(
  250. 'acquisitionprop_c1' => array(
  251. 0 => 'acquisition_id',
  252. 1 => 'type_id',
  253. 2 => 'rank',
  254. ),
  255. ),
  256. 'indexes' => array(
  257. 'acquisitionprop_idx1' => array(
  258. 0 => 'acquisition_id',
  259. ),
  260. 'acquisitionprop_idx2' => array(
  261. 0 => 'type_id',
  262. ),
  263. ),
  264. 'foreign keys' => array(
  265. 'cvterm' => array(
  266. 'table' => 'cvterm',
  267. 'columns' => array(
  268. 'type_id' => 'cvterm_id',
  269. ),
  270. ),
  271. 'acquisition' => array(
  272. 'table' => 'acquisition',
  273. 'columns' => array(
  274. 'acquisition_id' => 'acquisition_id',
  275. ),
  276. ),
  277. ),
  278. );
  279. return $description;
  280. }
  281. /**
  282. * Implements hook_chado_schema_v1_11_analysis()
  283. * Purpose: To describe the structure of 'analysis' to tripal
  284. * @see tripal_core_chado_insert()
  285. * @see tripal_core_chado_update()
  286. * @see tripal_core_chado_select()
  287. *
  288. * @return
  289. * An array describing the 'analysis' table
  290. *
  291. * @ingroup tripal_chado_v1.11_schema_api
  292. *
  293. */
  294. function tripal_core_chado_schema_v1_11_analysis() {
  295. $description = array(
  296. 'referring_tables' => array(
  297. 0 => 'analysisfeature',
  298. 1 => 'analysisprop',
  299. 2 => 'phylotree',
  300. 3 => 'quantification',
  301. ),
  302. 'table' => 'analysis',
  303. 'fields' => array(
  304. 'analysis_id' => array(
  305. 'type' => 'serial',
  306. 'not NULL' => '1',
  307. ),
  308. 'name' => array(
  309. 'type' => 'varchar',
  310. 'length' => '255',
  311. 'not NULL' => '',
  312. ),
  313. 'description' => array(
  314. 'type' => 'text',
  315. 'not NULL' => '',
  316. ),
  317. 'program' => array(
  318. 'type' => 'varchar',
  319. 'length' => '255',
  320. 'not NULL' => '1',
  321. ),
  322. 'programversion' => array(
  323. 'type' => 'varchar',
  324. 'length' => '255',
  325. 'not NULL' => '1',
  326. ),
  327. 'algorithm' => array(
  328. 'type' => 'varchar',
  329. 'length' => '255',
  330. 'not NULL' => '',
  331. ),
  332. 'sourcename' => array(
  333. 'type' => 'varchar',
  334. 'length' => '255',
  335. 'not NULL' => '',
  336. ),
  337. 'sourceversion' => array(
  338. 'type' => 'varchar',
  339. 'length' => '255',
  340. 'not NULL' => '',
  341. ),
  342. 'sourceuri' => array(
  343. 'type' => 'text',
  344. 'not NULL' => '',
  345. ),
  346. 'timeexecuted' => array(
  347. 'type' => 'datetime',
  348. 'not NULL' => '1',
  349. 'default' => 'ow(',
  350. ),
  351. ),
  352. 'primary key' => array(
  353. 0 => 'analysis_id',
  354. ),
  355. 'unique keys' => array(
  356. 'analysis_c1' => array(
  357. 0 => 'program',
  358. 1 => 'programversion',
  359. 2 => 'sourcename',
  360. ),
  361. ),
  362. 'indexes' => array(
  363. ),
  364. 'foreign keys' => array(
  365. ),
  366. );
  367. return $description;
  368. }
  369. /**
  370. * Implements hook_chado_schema_v1_11_analysisprop()
  371. *
  372. * Purpose: To describe the structure of 'analysisprop' to tripal. This table doesn't
  373. * exist in Chado v1.1 (it does in v1.2), so we need to describe it here
  374. *
  375. * @see tripal_core_chado_insert()
  376. * @see tripal_core_chado_update()
  377. * @see tripal_core_chado_select()
  378. *
  379. * @return
  380. * An array describing the 'analysisprop' table
  381. *
  382. * @ingroup tripal_chado_v1.11_schema_api
  383. *
  384. */
  385. function tripal_core_chado_schema_v1_11_analysisprop() {
  386. $description = array(
  387. 'table' => 'analysisprop',
  388. 'fields' => array(
  389. 'analysisprop_id' => array(
  390. 'type' => 'serial',
  391. 'not NULL' => '1',
  392. ),
  393. 'analysis_id' => array(
  394. 'type' => 'int',
  395. 'not NULL' => '1',
  396. ),
  397. 'type_id' => array(
  398. 'type' => 'int',
  399. 'not NULL' => '1',
  400. ),
  401. 'value' => array(
  402. 'type' => 'text',
  403. 'not NULL' => '',
  404. ),
  405. ),
  406. 'primary key' => array(
  407. 0 => 'analysisprop_id',
  408. ),
  409. 'unique keys' => array(
  410. 'analysisprop_c1' => array(
  411. 0 => 'analysis_id',
  412. 1 => 'type_id',
  413. ),
  414. ),
  415. 'indexes' => array(
  416. 'analysisprop_idx1' => array(
  417. 0 => 'analysis_id',
  418. ),
  419. 'analysisprop_idx2' => array(
  420. 0 => 'type_id',
  421. ),
  422. ),
  423. 'foreign keys' => array(
  424. 'cvterm' => array(
  425. 'table' => 'cvterm',
  426. 'columns' => array(
  427. 'type_id' => 'cvterm_id',
  428. ),
  429. ),
  430. 'analysis' => array(
  431. 'table' => 'analysis',
  432. 'columns' => array(
  433. 'analysis_id' => 'analysis_id',
  434. ),
  435. ),
  436. ),
  437. );
  438. return $description;
  439. }
  440. /**
  441. * Implements hook_chado_schema_v1_11_analysisfeature()
  442. * Purpose: To describe the structure of 'analysisfeature' to tripal
  443. * @see tripal_core_chado_insert()
  444. * @see tripal_core_chado_update()
  445. * @see tripal_core_chado_select()
  446. *
  447. * @return
  448. * An array describing the 'analysisfeature' table
  449. *
  450. * @ingroup tripal_chado_v1.11_schema_api
  451. *
  452. */
  453. function tripal_core_chado_schema_v1_11_analysisfeature() {
  454. $description = array(
  455. 'table' => 'analysisfeature',
  456. 'fields' => array(
  457. 'analysisfeature_id' => array(
  458. 'type' => 'serial',
  459. 'not NULL' => '1',
  460. ),
  461. 'feature_id' => array(
  462. 'type' => 'int',
  463. 'not NULL' => '1',
  464. ),
  465. 'analysis_id' => array(
  466. 'type' => 'int',
  467. 'not NULL' => '1',
  468. ),
  469. 'rawscore' => array(
  470. 'type' => 'float',
  471. 'size' => 'big',
  472. 'not NULL' => '',
  473. ),
  474. 'normscore' => array(
  475. 'type' => 'float',
  476. 'size' => 'big',
  477. 'not NULL' => '',
  478. ),
  479. 'significance' => array(
  480. 'type' => 'float',
  481. 'size' => 'big',
  482. 'not NULL' => '',
  483. ),
  484. 'identity' => array(
  485. 'type' => 'float',
  486. 'size' => 'big',
  487. 'not NULL' => '',
  488. ),
  489. ),
  490. 'primary key' => array(
  491. 0 => 'analysisfeature_id',
  492. ),
  493. 'unique keys' => array(
  494. 'analysisfeature_c1' => array(
  495. 0 => 'feature_id',
  496. 1 => 'analysis_id',
  497. ),
  498. ),
  499. 'indexes' => array(
  500. 'analysisfeature_idx1' => array(
  501. 0 => 'feature_id',
  502. ),
  503. 'analysisfeature_idx2' => array(
  504. 0 => 'analysis_id',
  505. ),
  506. ),
  507. 'foreign keys' => array(
  508. 'feature' => array(
  509. 'table' => 'feature',
  510. 'columns' => array(
  511. 'feature_id' => 'feature_id',
  512. ),
  513. ),
  514. 'analysis' => array(
  515. 'table' => 'analysis',
  516. 'columns' => array(
  517. 'analysis_id' => 'analysis_id',
  518. ),
  519. ),
  520. ),
  521. );
  522. return $description;
  523. }
  524. /**
  525. * Implements hook_chado_schema_v1_11_arraydesign()
  526. * Purpose: To describe the structure of 'arraydesign' to tripal
  527. * @see tripal_core_chado_insert()
  528. * @see tripal_core_chado_update()
  529. * @see tripal_core_chado_select()
  530. *
  531. * @return
  532. * An array describing the 'arraydesign' table
  533. *
  534. * @ingroup tripal_chado_v1.11_schema_api
  535. *
  536. */
  537. function tripal_core_chado_schema_v1_11_arraydesign() {
  538. $description = array(
  539. 'table' => 'arraydesign',
  540. 'fields' => array(
  541. 'arraydesign_id' => array(
  542. 'type' => 'serial',
  543. 'not NULL' => '1',
  544. ),
  545. 'manufacturer_id' => array(
  546. 'type' => 'int',
  547. 'not NULL' => '1',
  548. ),
  549. 'platformtype_id' => array(
  550. 'type' => 'int',
  551. 'not NULL' => '1',
  552. ),
  553. 'substratetype_id' => array(
  554. 'type' => 'int',
  555. 'not NULL' => '',
  556. ),
  557. 'protocol_id' => array(
  558. 'type' => 'int',
  559. 'not NULL' => '',
  560. ),
  561. 'dbxref_id' => array(
  562. 'type' => 'int',
  563. 'not NULL' => '',
  564. ),
  565. 'name' => array(
  566. 'type' => 'text',
  567. 'not NULL' => '1',
  568. ),
  569. 'version' => array(
  570. 'type' => 'text',
  571. 'not NULL' => '',
  572. ),
  573. 'description' => array(
  574. 'type' => 'text',
  575. 'not NULL' => '',
  576. ),
  577. 'array_dimensions' => array(
  578. 'type' => 'text',
  579. 'not NULL' => '',
  580. ),
  581. 'element_dimensions' => array(
  582. 'type' => 'text',
  583. 'not NULL' => '',
  584. ),
  585. 'num_of_elements' => array(
  586. 'type' => 'int',
  587. 'not NULL' => '',
  588. ),
  589. 'num_array_columns' => array(
  590. 'type' => 'int',
  591. 'not NULL' => '',
  592. ),
  593. 'num_array_rows' => array(
  594. 'type' => 'int',
  595. 'not NULL' => '',
  596. ),
  597. 'num_grid_columns' => array(
  598. 'type' => 'int',
  599. 'not NULL' => '',
  600. ),
  601. 'num_grid_rows' => array(
  602. 'type' => 'int',
  603. 'not NULL' => '',
  604. ),
  605. 'num_sub_columns' => array(
  606. 'type' => 'int',
  607. 'not NULL' => '',
  608. ),
  609. 'num_sub_rows' => array(
  610. 'type' => 'int',
  611. 'not NULL' => '',
  612. ),
  613. ),
  614. 'primary key' => array(
  615. 0 => 'arraydesign_id',
  616. ),
  617. 'unique keys' => array(
  618. 'arraydesign_c1' => array(
  619. 0 => 'name',
  620. ),
  621. ),
  622. 'indexes' => array(
  623. 'arraydesign_idx1' => array(
  624. 0 => 'manufacturer_id',
  625. ),
  626. 'arraydesign_idx2' => array(
  627. 0 => 'platformtype_id',
  628. ),
  629. 'arraydesign_idx3' => array(
  630. 0 => 'substratetype_id',
  631. ),
  632. 'arraydesign_idx4' => array(
  633. 0 => 'protocol_id',
  634. ),
  635. 'arraydesign_idx5' => array(
  636. 0 => 'dbxref_id',
  637. ),
  638. ),
  639. 'foreign keys' => array(
  640. 'dbxref' => array(
  641. 'table' => 'dbxref',
  642. 'columns' => array(
  643. 'dbxref_id' => 'dbxref_id',
  644. ),
  645. ),
  646. 'cvterm' => array(
  647. 'table' => 'cvterm',
  648. 'columns' => array(
  649. 'platformtype_id' => 'cvterm_id',
  650. 'substratetype_id' => 'cvterm_id',
  651. ),
  652. ),
  653. 'contact' => array(
  654. 'table' => 'contact',
  655. 'columns' => array(
  656. 'manufacturer_id' => 'contact_id',
  657. ),
  658. ),
  659. 'protocol' => array(
  660. 'table' => 'protocol',
  661. 'columns' => array(
  662. 'protocol_id' => 'protocol_id',
  663. ),
  664. ),
  665. ),
  666. );
  667. return $description;
  668. }
  669. /**
  670. * Implements hook_chado_schema_v1_11_arraydesignprop()
  671. * Purpose: To describe the structure of 'arraydesignprop' to tripal
  672. * @see tripal_core_chado_insert()
  673. * @see tripal_core_chado_update()
  674. * @see tripal_core_chado_select()
  675. *
  676. * @return
  677. * An array describing the 'arraydesignprop' table
  678. *
  679. * @ingroup tripal_chado_v1.11_schema_api
  680. *
  681. */
  682. function tripal_core_chado_schema_v1_11_arraydesignprop() {
  683. $description = array(
  684. 'table' => 'arraydesignprop',
  685. 'fields' => array(
  686. 'arraydesignprop_id' => array(
  687. 'type' => 'serial',
  688. 'not NULL' => '1',
  689. ),
  690. 'arraydesign_id' => array(
  691. 'type' => 'int',
  692. 'not NULL' => '1',
  693. ),
  694. 'type_id' => array(
  695. 'type' => 'int',
  696. 'not NULL' => '1',
  697. ),
  698. 'value' => array(
  699. 'type' => 'text',
  700. 'not NULL' => '',
  701. ),
  702. 'rank' => array(
  703. 'type' => 'int',
  704. 'not NULL' => '1',
  705. 'default' => '0',
  706. ),
  707. ),
  708. 'primary key' => array(
  709. 0 => 'arraydesignprop_id',
  710. ),
  711. 'unique keys' => array(
  712. 'arraydesignprop_c1' => array(
  713. 0 => 'arraydesign_id',
  714. 1 => 'type_id',
  715. 2 => 'rank',
  716. ),
  717. ),
  718. 'indexes' => array(
  719. 'arraydesignprop_idx1' => array(
  720. 0 => 'arraydesign_id',
  721. ),
  722. 'arraydesignprop_idx2' => array(
  723. 0 => 'type_id',
  724. ),
  725. ),
  726. 'foreign keys' => array(
  727. 'cvterm' => array(
  728. 'table' => 'cvterm',
  729. 'columns' => array(
  730. 'type_id' => 'cvterm_id',
  731. ),
  732. ),
  733. 'arraydesign' => array(
  734. 'table' => 'arraydesign',
  735. 'columns' => array(
  736. 'arraydesign_id' => 'arraydesign_id',
  737. ),
  738. ),
  739. ),
  740. );
  741. return $description;
  742. }
  743. /**
  744. * Implements hook_chado_schema_v1_11_assay()
  745. * Purpose: To describe the structure of 'assay' to tripal
  746. * @see tripal_core_chado_insert()
  747. * @see tripal_core_chado_update()
  748. * @see tripal_core_chado_select()
  749. *
  750. * @return
  751. * An array describing the 'assay' table
  752. *
  753. * @ingroup tripal_chado_v1.11_schema_api
  754. *
  755. */
  756. function tripal_core_chado_schema_v1_11_assay() {
  757. $description = array(
  758. 'table' => 'assay',
  759. 'fields' => array(
  760. 'assay_id' => array(
  761. 'type' => 'serial',
  762. 'not NULL' => '1',
  763. ),
  764. 'arraydesign_id' => array(
  765. 'type' => 'int',
  766. 'not NULL' => '1',
  767. ),
  768. 'protocol_id' => array(
  769. 'type' => 'int',
  770. 'not NULL' => '',
  771. ),
  772. 'assaydate' => array(
  773. 'type' => 'datetime',
  774. 'not NULL' => '',
  775. 'default' => 'ow(',
  776. ),
  777. 'arrayidentifier' => array(
  778. 'type' => 'text',
  779. 'not NULL' => '',
  780. ),
  781. 'arraybatchidentifier' => array(
  782. 'type' => 'text',
  783. 'not NULL' => '',
  784. ),
  785. 'operator_id' => array(
  786. 'type' => 'int',
  787. 'not NULL' => '1',
  788. ),
  789. 'dbxref_id' => array(
  790. 'type' => 'int',
  791. 'not NULL' => '',
  792. ),
  793. 'name' => array(
  794. 'type' => 'text',
  795. 'not NULL' => '',
  796. ),
  797. 'description' => array(
  798. 'type' => 'text',
  799. 'not NULL' => '',
  800. ),
  801. ),
  802. 'primary key' => array(
  803. 0 => 'assay_id',
  804. ),
  805. 'unique keys' => array(
  806. 'assay_c1' => array(
  807. 0 => 'name',
  808. ),
  809. ),
  810. 'indexes' => array(
  811. 'assay_idx1' => array(
  812. 0 => 'arraydesign_id',
  813. ),
  814. 'assay_idx2' => array(
  815. 0 => 'protocol_id',
  816. ),
  817. 'assay_idx3' => array(
  818. 0 => 'operator_id',
  819. ),
  820. 'assay_idx4' => array(
  821. 0 => 'dbxref_id',
  822. ),
  823. ),
  824. 'foreign keys' => array(
  825. 'dbxref' => array(
  826. 'table' => 'dbxref',
  827. 'columns' => array(
  828. 'dbxref_id' => 'dbxref_id',
  829. ),
  830. ),
  831. 'contact' => array(
  832. 'table' => 'contact',
  833. 'columns' => array(
  834. 'operator_id' => 'contact_id',
  835. ),
  836. ),
  837. 'protocol' => array(
  838. 'table' => 'protocol',
  839. 'columns' => array(
  840. 'protocol_id' => 'protocol_id',
  841. ),
  842. ),
  843. 'arraydesign' => array(
  844. 'table' => 'arraydesign',
  845. 'columns' => array(
  846. 'arraydesign_id' => 'arraydesign_id',
  847. ),
  848. ),
  849. ),
  850. );
  851. return $description;
  852. }
  853. /**
  854. * Implements hook_chado_schema_v1_11_assay_biomaterial()
  855. * Purpose: To describe the structure of 'assay_biomaterial' to tripal
  856. * @see tripal_core_chado_insert()
  857. * @see tripal_core_chado_update()
  858. * @see tripal_core_chado_select()
  859. *
  860. * @return
  861. * An array describing the 'assay_biomaterial' table
  862. *
  863. * @ingroup tripal_chado_v1.11_schema_api
  864. *
  865. */
  866. function tripal_core_chado_schema_v1_11_assay_biomaterial() {
  867. $description = array(
  868. 'table' => 'assay_biomaterial',
  869. 'fields' => array(
  870. 'assay_biomaterial_id' => array(
  871. 'type' => 'serial',
  872. 'not NULL' => '1',
  873. ),
  874. 'assay_id' => array(
  875. 'type' => 'int',
  876. 'not NULL' => '1',
  877. ),
  878. 'biomaterial_id' => array(
  879. 'type' => 'int',
  880. 'not NULL' => '1',
  881. ),
  882. 'channel_id' => array(
  883. 'type' => 'int',
  884. 'not NULL' => '',
  885. ),
  886. 'rank' => array(
  887. 'type' => 'int',
  888. 'not NULL' => '1',
  889. 'default' => '0',
  890. ),
  891. ),
  892. 'primary key' => array(
  893. 0 => 'assay_biomaterial_id',
  894. ),
  895. 'unique keys' => array(
  896. 'assay_biomaterial_c1' => array(
  897. 0 => 'assay_id',
  898. 1 => 'biomaterial_id',
  899. 2 => 'channel_id',
  900. 3 => 'rank',
  901. ),
  902. ),
  903. 'indexes' => array(
  904. 'assay_biomaterial_idx1' => array(
  905. 0 => 'assay_id',
  906. ),
  907. 'assay_biomaterial_idx2' => array(
  908. 0 => 'biomaterial_id',
  909. ),
  910. 'assay_biomaterial_idx3' => array(
  911. 0 => 'channel_id',
  912. ),
  913. ),
  914. 'foreign keys' => array(
  915. 'channel' => array(
  916. 'table' => 'channel',
  917. 'columns' => array(
  918. 'channel_id' => 'channel_id',
  919. ),
  920. ),
  921. 'assay' => array(
  922. 'table' => 'assay',
  923. 'columns' => array(
  924. 'assay_id' => 'assay_id',
  925. ),
  926. ),
  927. 'biomaterial' => array(
  928. 'table' => 'biomaterial',
  929. 'columns' => array(
  930. 'biomaterial_id' => 'biomaterial_id',
  931. ),
  932. ),
  933. ),
  934. );
  935. return $description;
  936. }
  937. /**
  938. * Implements hook_chado_schema_v1_11_assay_project()
  939. * Purpose: To describe the structure of 'assay_project' to tripal
  940. * @see tripal_core_chado_insert()
  941. * @see tripal_core_chado_update()
  942. * @see tripal_core_chado_select()
  943. *
  944. * @return
  945. * An array describing the 'assay_project' table
  946. *
  947. * @ingroup tripal_chado_v1.11_schema_api
  948. *
  949. */
  950. function tripal_core_chado_schema_v1_11_assay_project() {
  951. $description = array(
  952. 'table' => 'assay_project',
  953. 'fields' => array(
  954. 'assay_project_id' => array(
  955. 'type' => 'serial',
  956. 'not NULL' => '1',
  957. ),
  958. 'assay_id' => array(
  959. 'type' => 'int',
  960. 'not NULL' => '1',
  961. ),
  962. 'project_id' => array(
  963. 'type' => 'int',
  964. 'not NULL' => '1',
  965. ),
  966. ),
  967. 'primary key' => array(
  968. 0 => 'assay_project_id',
  969. ),
  970. 'unique keys' => array(
  971. 'assay_project_c1' => array(
  972. 0 => 'assay_id',
  973. 1 => 'project_id',
  974. ),
  975. ),
  976. 'indexes' => array(
  977. 'assay_project_idx1' => array(
  978. 0 => 'assay_id',
  979. ),
  980. 'assay_project_idx2' => array(
  981. 0 => 'project_id',
  982. ),
  983. ),
  984. 'foreign keys' => array(
  985. 'project' => array(
  986. 'table' => 'project',
  987. 'columns' => array(
  988. 'project_id' => 'project_id',
  989. ),
  990. ),
  991. 'assay' => array(
  992. 'table' => 'assay',
  993. 'columns' => array(
  994. 'assay_id' => 'assay_id',
  995. ),
  996. ),
  997. ),
  998. );
  999. return $description;
  1000. }
  1001. /**
  1002. * Implements hook_chado_schema_v1_11_assayprop()
  1003. * Purpose: To describe the structure of 'assayprop' to tripal
  1004. * @see tripal_core_chado_insert()
  1005. * @see tripal_core_chado_update()
  1006. * @see tripal_core_chado_select()
  1007. *
  1008. * @return
  1009. * An array describing the 'assayprop' table
  1010. *
  1011. * @ingroup tripal_chado_v1.11_schema_api
  1012. *
  1013. */
  1014. function tripal_core_chado_schema_v1_11_assayprop() {
  1015. $description = array(
  1016. 'table' => 'assayprop',
  1017. 'fields' => array(
  1018. 'assayprop_id' => array(
  1019. 'type' => 'serial',
  1020. 'not NULL' => '1',
  1021. ),
  1022. 'assay_id' => array(
  1023. 'type' => 'int',
  1024. 'not NULL' => '1',
  1025. ),
  1026. 'type_id' => array(
  1027. 'type' => 'int',
  1028. 'not NULL' => '1',
  1029. ),
  1030. 'value' => array(
  1031. 'type' => 'text',
  1032. 'not NULL' => '',
  1033. ),
  1034. 'rank' => array(
  1035. 'type' => 'int',
  1036. 'not NULL' => '1',
  1037. 'default' => '0',
  1038. ),
  1039. ),
  1040. 'primary key' => array(
  1041. 0 => 'assayprop_id',
  1042. ),
  1043. 'unique keys' => array(
  1044. 'assayprop_c1' => array(
  1045. 0 => 'assay_id',
  1046. 1 => 'type_id',
  1047. 2 => 'rank',
  1048. ),
  1049. ),
  1050. 'indexes' => array(
  1051. 'assayprop_idx1' => array(
  1052. 0 => 'assay_id',
  1053. ),
  1054. 'assayprop_idx2' => array(
  1055. 0 => 'type_id',
  1056. ),
  1057. ),
  1058. 'foreign keys' => array(
  1059. 'cvterm' => array(
  1060. 'table' => 'cvterm',
  1061. 'columns' => array(
  1062. 'type_id' => 'cvterm_id',
  1063. ),
  1064. ),
  1065. 'assay' => array(
  1066. 'table' => 'assay',
  1067. 'columns' => array(
  1068. 'assay_id' => 'assay_id',
  1069. ),
  1070. ),
  1071. ),
  1072. );
  1073. return $description;
  1074. }
  1075. /**
  1076. * Implements hook_chado_schema_v1_11_biomaterial()
  1077. * Purpose: To describe the structure of 'biomaterial' to tripal
  1078. * @see tripal_core_chado_insert()
  1079. * @see tripal_core_chado_update()
  1080. * @see tripal_core_chado_select()
  1081. *
  1082. * @return
  1083. * An array describing the 'biomaterial' table
  1084. *
  1085. * @ingroup tripal_chado_v1.11_schema_api
  1086. *
  1087. */
  1088. function tripal_core_chado_schema_v1_11_biomaterial() {
  1089. $description = array(
  1090. 'table' => 'biomaterial',
  1091. 'fields' => array(
  1092. 'biomaterial_id' => array(
  1093. 'type' => 'serial',
  1094. 'not NULL' => '1',
  1095. ),
  1096. 'taxon_id' => array(
  1097. 'type' => 'int',
  1098. 'not NULL' => '',
  1099. ),
  1100. 'biosourceprovider_id' => array(
  1101. 'type' => 'int',
  1102. 'not NULL' => '',
  1103. ),
  1104. 'dbxref_id' => array(
  1105. 'type' => 'int',
  1106. 'not NULL' => '',
  1107. ),
  1108. 'name' => array(
  1109. 'type' => 'text',
  1110. 'not NULL' => '',
  1111. ),
  1112. 'description' => array(
  1113. 'type' => 'text',
  1114. 'not NULL' => '',
  1115. ),
  1116. ),
  1117. 'primary key' => array(
  1118. 0 => 'biomaterial_id',
  1119. ),
  1120. 'unique keys' => array(
  1121. 'biomaterial_c1' => array(
  1122. 0 => 'name',
  1123. ),
  1124. ),
  1125. 'indexes' => array(
  1126. 'biomaterial_idx1' => array(
  1127. 0 => 'taxon_id',
  1128. ),
  1129. 'biomaterial_idx2' => array(
  1130. 0 => 'biosourceprovider_id',
  1131. ),
  1132. 'biomaterial_idx3' => array(
  1133. 0 => 'dbxref_id',
  1134. ),
  1135. ),
  1136. 'foreign keys' => array(
  1137. 'dbxref' => array(
  1138. 'table' => 'dbxref',
  1139. 'columns' => array(
  1140. 'dbxref_id' => 'dbxref_id',
  1141. ),
  1142. ),
  1143. 'organism' => array(
  1144. 'table' => 'organism',
  1145. 'columns' => array(
  1146. 'taxon_id' => 'organism_id',
  1147. ),
  1148. ),
  1149. 'contact' => array(
  1150. 'table' => 'contact',
  1151. 'columns' => array(
  1152. 'biosourceprovider_id' => 'contact_id',
  1153. ),
  1154. ),
  1155. ),
  1156. );
  1157. return $description;
  1158. }
  1159. /**
  1160. * Implements hook_chado_schema_v1_11_biomaterial_dbxref()
  1161. * Purpose: To describe the structure of 'biomaterial_dbxref' to tripal
  1162. * @see tripal_core_chado_insert()
  1163. * @see tripal_core_chado_update()
  1164. * @see tripal_core_chado_select()
  1165. *
  1166. * @return
  1167. * An array describing the 'biomaterial_dbxref' table
  1168. *
  1169. * @ingroup tripal_chado_v1.11_schema_api
  1170. *
  1171. */
  1172. function tripal_core_chado_schema_v1_11_biomaterial_dbxref() {
  1173. $description = array(
  1174. 'table' => 'biomaterial_dbxref',
  1175. 'fields' => array(
  1176. 'biomaterial_dbxref_id' => array(
  1177. 'type' => 'serial',
  1178. 'not NULL' => '1',
  1179. ),
  1180. 'biomaterial_id' => array(
  1181. 'type' => 'int',
  1182. 'not NULL' => '1',
  1183. ),
  1184. 'dbxref_id' => array(
  1185. 'type' => 'int',
  1186. 'not NULL' => '1',
  1187. ),
  1188. ),
  1189. 'primary key' => array(
  1190. 0 => 'biomaterial_dbxref_id',
  1191. ),
  1192. 'unique keys' => array(
  1193. 'biomaterial_dbxref_c1' => array(
  1194. 0 => 'biomaterial_id',
  1195. 1 => 'dbxref_id',
  1196. ),
  1197. ),
  1198. 'indexes' => array(
  1199. 'biomaterial_dbxref_idx1' => array(
  1200. 0 => 'biomaterial_id',
  1201. ),
  1202. 'biomaterial_dbxref_idx2' => array(
  1203. 0 => 'dbxref_id',
  1204. ),
  1205. ),
  1206. 'foreign keys' => array(
  1207. 'dbxref' => array(
  1208. 'table' => 'dbxref',
  1209. 'columns' => array(
  1210. 'dbxref_id' => 'dbxref_id',
  1211. ),
  1212. ),
  1213. 'biomaterial' => array(
  1214. 'table' => 'biomaterial',
  1215. 'columns' => array(
  1216. 'biomaterial_id' => 'biomaterial_id',
  1217. ),
  1218. ),
  1219. ),
  1220. );
  1221. return $description;
  1222. }
  1223. /**
  1224. * Implements hook_chado_schema_v1_11_biomaterial_relationship()
  1225. * Purpose: To describe the structure of 'biomaterial_relationship' to tripal
  1226. * @see tripal_core_chado_insert()
  1227. * @see tripal_core_chado_update()
  1228. * @see tripal_core_chado_select()
  1229. *
  1230. * @return
  1231. * An array describing the 'biomaterial_relationship' table
  1232. *
  1233. * @ingroup tripal_chado_v1.11_schema_api
  1234. *
  1235. */
  1236. function tripal_core_chado_schema_v1_11_biomaterial_relationship() {
  1237. $description = array(
  1238. 'table' => 'biomaterial_relationship',
  1239. 'fields' => array(
  1240. 'biomaterial_relationship_id' => array(
  1241. 'type' => 'serial',
  1242. 'not NULL' => '1',
  1243. ),
  1244. 'subject_id' => array(
  1245. 'type' => 'int',
  1246. 'not NULL' => '1',
  1247. ),
  1248. 'type_id' => array(
  1249. 'type' => 'int',
  1250. 'not NULL' => '1',
  1251. ),
  1252. 'object_id' => array(
  1253. 'type' => 'int',
  1254. 'not NULL' => '1',
  1255. ),
  1256. ),
  1257. 'primary key' => array(
  1258. 0 => 'biomaterial_relationship_id',
  1259. ),
  1260. 'unique keys' => array(
  1261. 'biomaterial_relationship_c1' => array(
  1262. 0 => 'subject_id',
  1263. 1 => 'object_id',
  1264. 2 => 'type_id',
  1265. ),
  1266. ),
  1267. 'indexes' => array(
  1268. 'biomaterial_relationship_idx1' => array(
  1269. 0 => 'subject_id',
  1270. ),
  1271. 'biomaterial_relationship_idx2' => array(
  1272. 0 => 'object_id',
  1273. ),
  1274. 'biomaterial_relationship_idx3' => array(
  1275. 0 => 'type_id',
  1276. ),
  1277. ),
  1278. 'foreign keys' => array(
  1279. 'cvterm' => array(
  1280. 'table' => 'cvterm',
  1281. 'columns' => array(
  1282. 'type_id' => 'cvterm_id',
  1283. ),
  1284. ),
  1285. 'biomaterial' => array(
  1286. 'table' => 'biomaterial',
  1287. 'columns' => array(
  1288. 'subject_id' => 'biomaterial_id',
  1289. 'object_id' => 'biomaterial_id',
  1290. ),
  1291. ),
  1292. ),
  1293. );
  1294. return $description;
  1295. }
  1296. /**
  1297. * Implements hook_chado_schema_v1_11_biomaterial_treatment()
  1298. * Purpose: To describe the structure of 'biomaterial_treatment' to tripal
  1299. * @see tripal_core_chado_insert()
  1300. * @see tripal_core_chado_update()
  1301. * @see tripal_core_chado_select()
  1302. *
  1303. * @return
  1304. * An array describing the 'biomaterial_treatment' table
  1305. *
  1306. * @ingroup tripal_chado_v1.11_schema_api
  1307. *
  1308. */
  1309. function tripal_core_chado_schema_v1_11_biomaterial_treatment() {
  1310. $description = array(
  1311. 'table' => 'biomaterial_treatment',
  1312. 'fields' => array(
  1313. 'biomaterial_treatment_id' => array(
  1314. 'type' => 'serial',
  1315. 'not NULL' => '1',
  1316. ),
  1317. 'biomaterial_id' => array(
  1318. 'type' => 'int',
  1319. 'not NULL' => '1',
  1320. ),
  1321. 'treatment_id' => array(
  1322. 'type' => 'int',
  1323. 'not NULL' => '1',
  1324. ),
  1325. 'unittype_id' => array(
  1326. 'type' => 'int',
  1327. 'not NULL' => '',
  1328. ),
  1329. 'value' => array(
  1330. 'type' => 'float',
  1331. 'not NULL' => '',
  1332. ),
  1333. 'rank' => array(
  1334. 'type' => 'int',
  1335. 'not NULL' => '1',
  1336. 'default' => '0',
  1337. ),
  1338. ),
  1339. 'primary key' => array(
  1340. 0 => 'biomaterial_treatment_id',
  1341. ),
  1342. 'unique keys' => array(
  1343. 'biomaterial_treatment_c1' => array(
  1344. 0 => 'biomaterial_id',
  1345. 1 => 'treatment_id',
  1346. ),
  1347. ),
  1348. 'indexes' => array(
  1349. 'biomaterial_treatment_idx1' => array(
  1350. 0 => 'biomaterial_id',
  1351. ),
  1352. 'biomaterial_treatment_idx2' => array(
  1353. 0 => 'treatment_id',
  1354. ),
  1355. 'biomaterial_treatment_idx3' => array(
  1356. 0 => 'unittype_id',
  1357. ),
  1358. ),
  1359. 'foreign keys' => array(
  1360. 'cvterm' => array(
  1361. 'table' => 'cvterm',
  1362. 'columns' => array(
  1363. 'unittype_id' => 'cvterm_id',
  1364. ),
  1365. ),
  1366. 'biomaterial' => array(
  1367. 'table' => 'biomaterial',
  1368. 'columns' => array(
  1369. 'biomaterial_id' => 'biomaterial_id',
  1370. ),
  1371. ),
  1372. 'treatment' => array(
  1373. 'table' => 'treatment',
  1374. 'columns' => array(
  1375. 'treatment_id' => 'treatment_id',
  1376. ),
  1377. ),
  1378. ),
  1379. );
  1380. return $description;
  1381. }
  1382. /**
  1383. * Implements hook_chado_schema_v1_11_biomaterialprop()
  1384. * Purpose: To describe the structure of 'biomaterialprop' to tripal
  1385. * @see tripal_core_chado_insert()
  1386. * @see tripal_core_chado_update()
  1387. * @see tripal_core_chado_select()
  1388. *
  1389. * @return
  1390. * An array describing the 'biomaterialprop' table
  1391. *
  1392. * @ingroup tripal_chado_v1.11_schema_api
  1393. *
  1394. */
  1395. function tripal_core_chado_schema_v1_11_biomaterialprop() {
  1396. $description = array(
  1397. 'table' => 'biomaterialprop',
  1398. 'fields' => array(
  1399. 'biomaterialprop_id' => array(
  1400. 'type' => 'serial',
  1401. 'not NULL' => '1',
  1402. ),
  1403. 'biomaterial_id' => array(
  1404. 'type' => 'int',
  1405. 'not NULL' => '1',
  1406. ),
  1407. 'type_id' => array(
  1408. 'type' => 'int',
  1409. 'not NULL' => '1',
  1410. ),
  1411. 'value' => array(
  1412. 'type' => 'text',
  1413. 'not NULL' => '',
  1414. ),
  1415. 'rank' => array(
  1416. 'type' => 'int',
  1417. 'not NULL' => '1',
  1418. 'default' => '0',
  1419. ),
  1420. ),
  1421. 'primary key' => array(
  1422. 0 => 'biomaterialprop_id',
  1423. ),
  1424. 'unique keys' => array(
  1425. 'biomaterialprop_c1' => array(
  1426. 0 => 'biomaterial_id',
  1427. 1 => 'type_id',
  1428. 2 => 'rank',
  1429. ),
  1430. ),
  1431. 'indexes' => array(
  1432. 'biomaterialprop_idx1' => array(
  1433. 0 => 'biomaterial_id',
  1434. ),
  1435. 'biomaterialprop_idx2' => array(
  1436. 0 => 'type_id',
  1437. ),
  1438. ),
  1439. 'foreign keys' => array(
  1440. 'cvterm' => array(
  1441. 'table' => 'cvterm',
  1442. 'columns' => array(
  1443. 'type_id' => 'cvterm_id',
  1444. ),
  1445. ),
  1446. 'biomaterial' => array(
  1447. 'table' => 'biomaterial',
  1448. 'columns' => array(
  1449. 'biomaterial_id' => 'biomaterial_id',
  1450. ),
  1451. ),
  1452. ),
  1453. );
  1454. return $description;
  1455. }
  1456. /**
  1457. * Implements hook_chado_schema_v1_11_cell_line()
  1458. * Purpose: To describe the structure of 'cell_line' to tripal
  1459. * @see tripal_core_chado_insert()
  1460. * @see tripal_core_chado_update()
  1461. * @see tripal_core_chado_select()
  1462. *
  1463. * @return
  1464. * An array describing the 'cell_line' table
  1465. *
  1466. * @ingroup tripal_chado_v1.11_schema_api
  1467. *
  1468. */
  1469. function tripal_core_chado_schema_v1_11_cell_line() {
  1470. $description = array(
  1471. 'table' => 'cell_line',
  1472. 'fields' => array(
  1473. 'cell_line_id' => array(
  1474. 'type' => 'serial',
  1475. 'not NULL' => '1',
  1476. ),
  1477. 'name' => array(
  1478. 'type' => 'varchar',
  1479. 'length' => '255',
  1480. 'not NULL' => '',
  1481. ),
  1482. 'uniquename' => array(
  1483. 'type' => 'varchar',
  1484. 'length' => '255',
  1485. 'not NULL' => '1',
  1486. ),
  1487. 'organism_id' => array(
  1488. 'type' => 'int',
  1489. 'not NULL' => '1',
  1490. ),
  1491. 'timeaccessioned' => array(
  1492. 'type' => 'datetime',
  1493. 'not NULL' => '1',
  1494. 'default' => 'ow(',
  1495. ),
  1496. 'timelastmodified' => array(
  1497. 'type' => 'datetime',
  1498. 'not NULL' => '1',
  1499. 'default' => 'ow(',
  1500. ),
  1501. ),
  1502. 'primary key' => array(
  1503. 0 => 'cell_line_id',
  1504. ),
  1505. 'unique keys' => array(
  1506. 'cell_line_c1' => array(
  1507. 0 => 'uniquename',
  1508. 1 => 'organism_id',
  1509. ),
  1510. ),
  1511. 'indexes' => array(
  1512. ),
  1513. 'foreign keys' => array(
  1514. 'organism' => array(
  1515. 'table' => 'organism',
  1516. 'columns' => array(
  1517. 'organism_id' => 'organism_id',
  1518. ),
  1519. ),
  1520. ),
  1521. );
  1522. return $description;
  1523. }
  1524. /**
  1525. * Implements hook_chado_schema_v1_11_cell_line_cvterm()
  1526. * Purpose: To describe the structure of 'cell_line_cvterm' to tripal
  1527. * @see tripal_core_chado_insert()
  1528. * @see tripal_core_chado_update()
  1529. * @see tripal_core_chado_select()
  1530. *
  1531. * @return
  1532. * An array describing the 'cell_line_cvterm' table
  1533. *
  1534. * @ingroup tripal_chado_v1.11_schema_api
  1535. *
  1536. */
  1537. function tripal_core_chado_schema_v1_11_cell_line_cvterm() {
  1538. $description = array(
  1539. 'table' => 'cell_line_cvterm',
  1540. 'fields' => array(
  1541. 'cell_line_cvterm_id' => array(
  1542. 'type' => 'serial',
  1543. 'not NULL' => '1',
  1544. ),
  1545. 'cell_line_id' => array(
  1546. 'type' => 'int',
  1547. 'not NULL' => '1',
  1548. ),
  1549. 'cvterm_id' => array(
  1550. 'type' => 'int',
  1551. 'not NULL' => '1',
  1552. ),
  1553. 'pub_id' => array(
  1554. 'type' => 'int',
  1555. 'not NULL' => '1',
  1556. ),
  1557. 'rank' => array(
  1558. 'type' => 'int',
  1559. 'not NULL' => '1',
  1560. 'default' => '0',
  1561. ),
  1562. ),
  1563. 'primary key' => array(
  1564. 0 => 'cell_line_cvterm_id',
  1565. ),
  1566. 'unique keys' => array(
  1567. 'cell_line_cvterm_c1' => array(
  1568. 0 => 'cell_line_id',
  1569. 1 => 'cvterm_id',
  1570. 2 => 'pub_id',
  1571. 3 => 'rank',
  1572. ),
  1573. ),
  1574. 'indexes' => array(
  1575. ),
  1576. 'foreign keys' => array(
  1577. 'cvterm' => array(
  1578. 'table' => 'cvterm',
  1579. 'columns' => array(
  1580. 'cvterm_id' => 'cvterm_id',
  1581. ),
  1582. ),
  1583. 'pub' => array(
  1584. 'table' => 'pub',
  1585. 'columns' => array(
  1586. 'pub_id' => 'pub_id',
  1587. ),
  1588. ),
  1589. 'cell_line' => array(
  1590. 'table' => 'cell_line',
  1591. 'columns' => array(
  1592. 'cell_line_id' => 'cell_line_id',
  1593. ),
  1594. ),
  1595. ),
  1596. );
  1597. return $description;
  1598. }
  1599. /**
  1600. * Implements hook_chado_schema_v1_11_cell_line_cvtermprop()
  1601. * Purpose: To describe the structure of 'cell_line_cvtermprop' to tripal
  1602. * @see tripal_core_chado_insert()
  1603. * @see tripal_core_chado_update()
  1604. * @see tripal_core_chado_select()
  1605. *
  1606. * @return
  1607. * An array describing the 'cell_line_cvtermprop' table
  1608. *
  1609. * @ingroup tripal_chado_v1.11_schema_api
  1610. *
  1611. */
  1612. function tripal_core_chado_schema_v1_11_cell_line_cvtermprop() {
  1613. $description = array(
  1614. 'table' => 'cell_line_cvtermprop',
  1615. 'fields' => array(
  1616. 'cell_line_cvtermprop_id' => array(
  1617. 'type' => 'serial',
  1618. 'not NULL' => '1',
  1619. ),
  1620. 'cell_line_cvterm_id' => array(
  1621. 'type' => 'int',
  1622. 'not NULL' => '1',
  1623. ),
  1624. 'type_id' => array(
  1625. 'type' => 'int',
  1626. 'not NULL' => '1',
  1627. ),
  1628. 'value' => array(
  1629. 'type' => 'text',
  1630. 'not NULL' => '',
  1631. ),
  1632. 'rank' => array(
  1633. 'type' => 'int',
  1634. 'not NULL' => '1',
  1635. 'default' => '0',
  1636. ),
  1637. ),
  1638. 'primary key' => array(
  1639. 0 => 'cell_line_cvtermprop_id',
  1640. ),
  1641. 'unique keys' => array(
  1642. 'cell_line_cvtermprop_c1' => array(
  1643. 0 => 'cell_line_cvterm_id',
  1644. 1 => 'type_id',
  1645. 2 => 'rank',
  1646. ),
  1647. ),
  1648. 'indexes' => array(
  1649. ),
  1650. 'foreign keys' => array(
  1651. 'cvterm' => array(
  1652. 'table' => 'cvterm',
  1653. 'columns' => array(
  1654. 'type_id' => 'cvterm_id',
  1655. ),
  1656. ),
  1657. 'cell_line_cvterm' => array(
  1658. 'table' => 'cell_line_cvterm',
  1659. 'columns' => array(
  1660. 'cell_line_cvterm_id' => 'cell_line_cvterm_id',
  1661. ),
  1662. ),
  1663. ),
  1664. );
  1665. return $description;
  1666. }
  1667. /**
  1668. * Implements hook_chado_schema_v1_11_cell_line_dbxref()
  1669. * Purpose: To describe the structure of 'cell_line_dbxref' to tripal
  1670. * @see tripal_core_chado_insert()
  1671. * @see tripal_core_chado_update()
  1672. * @see tripal_core_chado_select()
  1673. *
  1674. * @return
  1675. * An array describing the 'cell_line_dbxref' table
  1676. *
  1677. * @ingroup tripal_chado_v1.11_schema_api
  1678. *
  1679. */
  1680. function tripal_core_chado_schema_v1_11_cell_line_dbxref() {
  1681. $description = array(
  1682. 'table' => 'cell_line_dbxref',
  1683. 'fields' => array(
  1684. 'cell_line_dbxref_id' => array(
  1685. 'type' => 'serial',
  1686. 'not NULL' => '1',
  1687. ),
  1688. 'cell_line_id' => array(
  1689. 'type' => 'int',
  1690. 'not NULL' => '1',
  1691. ),
  1692. 'dbxref_id' => array(
  1693. 'type' => 'int',
  1694. 'not NULL' => '1',
  1695. ),
  1696. 'is_current' => array(
  1697. 'type' => 'boolean',
  1698. 'not NULL' => '1',
  1699. 'default' => 'ru',
  1700. ),
  1701. ),
  1702. 'primary key' => array(
  1703. 0 => 'cell_line_dbxref_id',
  1704. ),
  1705. 'unique keys' => array(
  1706. 'cell_line_dbxref_c1' => array(
  1707. 0 => 'cell_line_id',
  1708. 1 => 'dbxref_id',
  1709. ),
  1710. ),
  1711. 'indexes' => array(
  1712. ),
  1713. 'foreign keys' => array(
  1714. 'dbxref' => array(
  1715. 'table' => 'dbxref',
  1716. 'columns' => array(
  1717. 'dbxref_id' => 'dbxref_id',
  1718. ),
  1719. ),
  1720. 'cell_line' => array(
  1721. 'table' => 'cell_line',
  1722. 'columns' => array(
  1723. 'cell_line_id' => 'cell_line_id',
  1724. ),
  1725. ),
  1726. ),
  1727. );
  1728. return $description;
  1729. }
  1730. /**
  1731. * Implements hook_chado_schema_v1_11_cell_line_feature()
  1732. * Purpose: To describe the structure of 'cell_line_feature' to tripal
  1733. * @see tripal_core_chado_insert()
  1734. * @see tripal_core_chado_update()
  1735. * @see tripal_core_chado_select()
  1736. *
  1737. * @return
  1738. * An array describing the 'cell_line_feature' table
  1739. *
  1740. * @ingroup tripal_chado_v1.11_schema_api
  1741. *
  1742. */
  1743. function tripal_core_chado_schema_v1_11_cell_line_feature() {
  1744. $description = array(
  1745. 'table' => 'cell_line_feature',
  1746. 'fields' => array(
  1747. 'cell_line_feature_id' => array(
  1748. 'type' => 'serial',
  1749. 'not NULL' => '1',
  1750. ),
  1751. 'cell_line_id' => array(
  1752. 'type' => 'int',
  1753. 'not NULL' => '1',
  1754. ),
  1755. 'feature_id' => array(
  1756. 'type' => 'int',
  1757. 'not NULL' => '1',
  1758. ),
  1759. 'pub_id' => array(
  1760. 'type' => 'int',
  1761. 'not NULL' => '1',
  1762. ),
  1763. ),
  1764. 'primary key' => array(
  1765. 0 => 'cell_line_feature_id',
  1766. ),
  1767. 'unique keys' => array(
  1768. 'cell_line_feature_c1' => array(
  1769. 0 => 'cell_line_id',
  1770. 1 => 'feature_id',
  1771. 2 => 'pub_id',
  1772. ),
  1773. ),
  1774. 'indexes' => array(
  1775. ),
  1776. 'foreign keys' => array(
  1777. 'pub' => array(
  1778. 'table' => 'pub',
  1779. 'columns' => array(
  1780. 'pub_id' => 'pub_id',
  1781. ),
  1782. ),
  1783. 'feature' => array(
  1784. 'table' => 'feature',
  1785. 'columns' => array(
  1786. 'feature_id' => 'feature_id',
  1787. ),
  1788. ),
  1789. 'cell_line' => array(
  1790. 'table' => 'cell_line',
  1791. 'columns' => array(
  1792. 'cell_line_id' => 'cell_line_id',
  1793. ),
  1794. ),
  1795. ),
  1796. );
  1797. return $description;
  1798. }
  1799. /**
  1800. * Implements hook_chado_schema_v1_11_cell_line_library()
  1801. * Purpose: To describe the structure of 'cell_line_library' to tripal
  1802. * @see tripal_core_chado_insert()
  1803. * @see tripal_core_chado_update()
  1804. * @see tripal_core_chado_select()
  1805. *
  1806. * @return
  1807. * An array describing the 'cell_line_library' table
  1808. *
  1809. * @ingroup tripal_chado_v1.11_schema_api
  1810. *
  1811. */
  1812. function tripal_core_chado_schema_v1_11_cell_line_library() {
  1813. $description = array(
  1814. 'table' => 'cell_line_library',
  1815. 'fields' => array(
  1816. 'cell_line_library_id' => array(
  1817. 'type' => 'serial',
  1818. 'not NULL' => '1',
  1819. ),
  1820. 'cell_line_id' => array(
  1821. 'type' => 'int',
  1822. 'not NULL' => '1',
  1823. ),
  1824. 'library_id' => array(
  1825. 'type' => 'int',
  1826. 'not NULL' => '1',
  1827. ),
  1828. 'pub_id' => array(
  1829. 'type' => 'int',
  1830. 'not NULL' => '1',
  1831. ),
  1832. ),
  1833. 'primary key' => array(
  1834. 0 => 'cell_line_library_id',
  1835. ),
  1836. 'unique keys' => array(
  1837. 'cell_line_library_c1' => array(
  1838. 0 => 'cell_line_id',
  1839. 1 => 'library_id',
  1840. 2 => 'pub_id',
  1841. ),
  1842. ),
  1843. 'indexes' => array(
  1844. ),
  1845. 'foreign keys' => array(
  1846. 'pub' => array(
  1847. 'table' => 'pub',
  1848. 'columns' => array(
  1849. 'pub_id' => 'pub_id',
  1850. ),
  1851. ),
  1852. 'library' => array(
  1853. 'table' => 'library',
  1854. 'columns' => array(
  1855. 'library_id' => 'library_id',
  1856. ),
  1857. ),
  1858. 'cell_line' => array(
  1859. 'table' => 'cell_line',
  1860. 'columns' => array(
  1861. 'cell_line_id' => 'cell_line_id',
  1862. ),
  1863. ),
  1864. ),
  1865. );
  1866. return $description;
  1867. }
  1868. /**
  1869. * Implements hook_chado_schema_v1_11_cell_line_pub()
  1870. * Purpose: To describe the structure of 'cell_line_pub' to tripal
  1871. * @see tripal_core_chado_insert()
  1872. * @see tripal_core_chado_update()
  1873. * @see tripal_core_chado_select()
  1874. *
  1875. * @return
  1876. * An array describing the 'cell_line_pub' table
  1877. *
  1878. * @ingroup tripal_chado_v1.11_schema_api
  1879. *
  1880. */
  1881. function tripal_core_chado_schema_v1_11_cell_line_pub() {
  1882. $description = array(
  1883. 'table' => 'cell_line_pub',
  1884. 'fields' => array(
  1885. 'cell_line_pub_id' => array(
  1886. 'type' => 'serial',
  1887. 'not NULL' => '1',
  1888. ),
  1889. 'cell_line_id' => array(
  1890. 'type' => 'int',
  1891. 'not NULL' => '1',
  1892. ),
  1893. 'pub_id' => array(
  1894. 'type' => 'int',
  1895. 'not NULL' => '1',
  1896. ),
  1897. ),
  1898. 'primary key' => array(
  1899. 0 => 'cell_line_pub_id',
  1900. ),
  1901. 'unique keys' => array(
  1902. 'cell_line_pub_c1' => array(
  1903. 0 => 'cell_line_id',
  1904. 1 => 'pub_id',
  1905. ),
  1906. ),
  1907. 'indexes' => array(
  1908. ),
  1909. 'foreign keys' => array(
  1910. 'pub' => array(
  1911. 'table' => 'pub',
  1912. 'columns' => array(
  1913. 'pub_id' => 'pub_id',
  1914. ),
  1915. ),
  1916. 'cell_line' => array(
  1917. 'table' => 'cell_line',
  1918. 'columns' => array(
  1919. 'cell_line_id' => 'cell_line_id',
  1920. ),
  1921. ),
  1922. ),
  1923. );
  1924. return $description;
  1925. }
  1926. /**
  1927. * Implements hook_chado_schema_v1_11_cell_line_relationship()
  1928. * Purpose: To describe the structure of 'cell_line_relationship' to tripal
  1929. * @see tripal_core_chado_insert()
  1930. * @see tripal_core_chado_update()
  1931. * @see tripal_core_chado_select()
  1932. *
  1933. * @return
  1934. * An array describing the 'cell_line_relationship' table
  1935. *
  1936. * @ingroup tripal_chado_v1.11_schema_api
  1937. *
  1938. */
  1939. function tripal_core_chado_schema_v1_11_cell_line_relationship() {
  1940. $description = array(
  1941. 'table' => 'cell_line_relationship',
  1942. 'fields' => array(
  1943. 'cell_line_relationship_id' => array(
  1944. 'type' => 'serial',
  1945. 'not NULL' => '1',
  1946. ),
  1947. 'subject_id' => array(
  1948. 'type' => 'int',
  1949. 'not NULL' => '1',
  1950. ),
  1951. 'object_id' => array(
  1952. 'type' => 'int',
  1953. 'not NULL' => '1',
  1954. ),
  1955. 'type_id' => array(
  1956. 'type' => 'int',
  1957. 'not NULL' => '1',
  1958. ),
  1959. ),
  1960. 'primary key' => array(
  1961. 0 => 'cell_line_relationship_id',
  1962. ),
  1963. 'unique keys' => array(
  1964. 'cell_line_relationship_c1' => array(
  1965. 0 => 'subject_id',
  1966. 1 => 'object_id',
  1967. 2 => 'type_id',
  1968. ),
  1969. ),
  1970. 'indexes' => array(
  1971. ),
  1972. 'foreign keys' => array(
  1973. 'cvterm' => array(
  1974. 'table' => 'cvterm',
  1975. 'columns' => array(
  1976. 'type_id' => 'cvterm_id',
  1977. ),
  1978. ),
  1979. 'cell_line' => array(
  1980. 'table' => 'cell_line',
  1981. 'columns' => array(
  1982. 'subject_id' => 'cell_line_id',
  1983. 'object_id' => 'cell_line_id',
  1984. ),
  1985. ),
  1986. ),
  1987. );
  1988. return $description;
  1989. }
  1990. /**
  1991. * Implements hook_chado_schema_v1_11_cell_line_synonym()
  1992. * Purpose: To describe the structure of 'cell_line_synonym' to tripal
  1993. * @see tripal_core_chado_insert()
  1994. * @see tripal_core_chado_update()
  1995. * @see tripal_core_chado_select()
  1996. *
  1997. * @return
  1998. * An array describing the 'cell_line_synonym' table
  1999. *
  2000. * @ingroup tripal_chado_v1.11_schema_api
  2001. *
  2002. */
  2003. function tripal_core_chado_schema_v1_11_cell_line_synonym() {
  2004. $description = array(
  2005. 'table' => 'cell_line_synonym',
  2006. 'fields' => array(
  2007. 'cell_line_synonym_id' => array(
  2008. 'type' => 'serial',
  2009. 'not NULL' => '1',
  2010. ),
  2011. 'cell_line_id' => array(
  2012. 'type' => 'int',
  2013. 'not NULL' => '1',
  2014. ),
  2015. 'synonym_id' => array(
  2016. 'type' => 'int',
  2017. 'not NULL' => '1',
  2018. ),
  2019. 'pub_id' => array(
  2020. 'type' => 'int',
  2021. 'not NULL' => '1',
  2022. ),
  2023. 'is_current' => array(
  2024. 'type' => 'boolean',
  2025. 'not NULL' => '1',
  2026. 'default' => 'als',
  2027. ),
  2028. 'is_internal' => array(
  2029. 'type' => 'boolean',
  2030. 'not NULL' => '1',
  2031. 'default' => 'als',
  2032. ),
  2033. ),
  2034. 'primary key' => array(
  2035. 0 => 'cell_line_synonym_id',
  2036. ),
  2037. 'unique keys' => array(
  2038. 'cell_line_synonym_c1' => array(
  2039. 0 => 'synonym_id',
  2040. 1 => 'cell_line_id',
  2041. 2 => 'pub_id',
  2042. ),
  2043. ),
  2044. 'indexes' => array(
  2045. ),
  2046. 'foreign keys' => array(
  2047. 'pub' => array(
  2048. 'table' => 'pub',
  2049. 'columns' => array(
  2050. 'pub_id' => 'pub_id',
  2051. ),
  2052. ),
  2053. 'synonym' => array(
  2054. 'table' => 'synonym',
  2055. 'columns' => array(
  2056. 'synonym_id' => 'synonym_id',
  2057. ),
  2058. ),
  2059. 'cell_line' => array(
  2060. 'table' => 'cell_line',
  2061. 'columns' => array(
  2062. 'cell_line_id' => 'cell_line_id',
  2063. ),
  2064. ),
  2065. ),
  2066. );
  2067. return $description;
  2068. }
  2069. /**
  2070. * Implements hook_chado_schema_v1_11_cell_lineprop()
  2071. * Purpose: To describe the structure of 'cell_lineprop' to tripal
  2072. * @see tripal_core_chado_insert()
  2073. * @see tripal_core_chado_update()
  2074. * @see tripal_core_chado_select()
  2075. *
  2076. * @return
  2077. * An array describing the 'cell_lineprop' table
  2078. *
  2079. * @ingroup tripal_chado_v1.11_schema_api
  2080. *
  2081. */
  2082. function tripal_core_chado_schema_v1_11_cell_lineprop() {
  2083. $description = array(
  2084. 'table' => 'cell_lineprop',
  2085. 'fields' => array(
  2086. 'cell_lineprop_id' => array(
  2087. 'type' => 'serial',
  2088. 'not NULL' => '1',
  2089. ),
  2090. 'cell_line_id' => array(
  2091. 'type' => 'int',
  2092. 'not NULL' => '1',
  2093. ),
  2094. 'type_id' => array(
  2095. 'type' => 'int',
  2096. 'not NULL' => '1',
  2097. ),
  2098. 'value' => array(
  2099. 'type' => 'text',
  2100. 'not NULL' => '',
  2101. ),
  2102. 'rank' => array(
  2103. 'type' => 'int',
  2104. 'not NULL' => '1',
  2105. 'default' => '0',
  2106. ),
  2107. ),
  2108. 'primary key' => array(
  2109. 0 => 'cell_lineprop_id',
  2110. ),
  2111. 'unique keys' => array(
  2112. 'cell_lineprop_c1' => array(
  2113. 0 => 'cell_line_id',
  2114. 1 => 'type_id',
  2115. 2 => 'rank',
  2116. ),
  2117. ),
  2118. 'indexes' => array(
  2119. ),
  2120. 'foreign keys' => array(
  2121. 'cvterm' => array(
  2122. 'table' => 'cvterm',
  2123. 'columns' => array(
  2124. 'type_id' => 'cvterm_id',
  2125. ),
  2126. ),
  2127. 'cell_line' => array(
  2128. 'table' => 'cell_line',
  2129. 'columns' => array(
  2130. 'cell_line_id' => 'cell_line_id',
  2131. ),
  2132. ),
  2133. ),
  2134. );
  2135. return $description;
  2136. }
  2137. /**
  2138. * Implements hook_chado_schema_v1_11_cell_lineprop_pub()
  2139. * Purpose: To describe the structure of 'cell_lineprop_pub' to tripal
  2140. * @see tripal_core_chado_insert()
  2141. * @see tripal_core_chado_update()
  2142. * @see tripal_core_chado_select()
  2143. *
  2144. * @return
  2145. * An array describing the 'cell_lineprop_pub' table
  2146. *
  2147. * @ingroup tripal_chado_v1.11_schema_api
  2148. *
  2149. */
  2150. function tripal_core_chado_schema_v1_11_cell_lineprop_pub() {
  2151. $description = array(
  2152. 'table' => 'cell_lineprop_pub',
  2153. 'fields' => array(
  2154. 'cell_lineprop_pub_id' => array(
  2155. 'type' => 'serial',
  2156. 'not NULL' => '1',
  2157. ),
  2158. 'cell_lineprop_id' => array(
  2159. 'type' => 'int',
  2160. 'not NULL' => '1',
  2161. ),
  2162. 'pub_id' => array(
  2163. 'type' => 'int',
  2164. 'not NULL' => '1',
  2165. ),
  2166. ),
  2167. 'primary key' => array(
  2168. 0 => 'cell_lineprop_pub_id',
  2169. ),
  2170. 'unique keys' => array(
  2171. 'cell_lineprop_pub_c1' => array(
  2172. 0 => 'cell_lineprop_id',
  2173. 1 => 'pub_id',
  2174. ),
  2175. ),
  2176. 'indexes' => array(
  2177. ),
  2178. 'foreign keys' => array(
  2179. 'pub' => array(
  2180. 'table' => 'pub',
  2181. 'columns' => array(
  2182. 'pub_id' => 'pub_id',
  2183. ),
  2184. ),
  2185. 'cell_lineprop' => array(
  2186. 'table' => 'cell_lineprop',
  2187. 'columns' => array(
  2188. 'cell_lineprop_id' => 'cell_lineprop_id',
  2189. ),
  2190. ),
  2191. ),
  2192. );
  2193. return $description;
  2194. }
  2195. /**
  2196. * Implements hook_chado_schema_v1_11_channel()
  2197. * Purpose: To describe the structure of 'channel' to tripal
  2198. * @see tripal_core_chado_insert()
  2199. * @see tripal_core_chado_update()
  2200. * @see tripal_core_chado_select()
  2201. *
  2202. * @return
  2203. * An array describing the 'channel' table
  2204. *
  2205. * @ingroup tripal_chado_v1.11_schema_api
  2206. *
  2207. */
  2208. function tripal_core_chado_schema_v1_11_channel() {
  2209. $description = array(
  2210. 'table' => 'channel',
  2211. 'fields' => array(
  2212. 'channel_id' => array(
  2213. 'type' => 'serial',
  2214. 'not NULL' => '1',
  2215. ),
  2216. 'name' => array(
  2217. 'type' => 'text',
  2218. 'not NULL' => '1',
  2219. ),
  2220. 'definition' => array(
  2221. 'type' => 'text',
  2222. 'not NULL' => '1',
  2223. ),
  2224. ),
  2225. 'primary key' => array(
  2226. 0 => 'channel_id',
  2227. ),
  2228. 'unique keys' => array(
  2229. 'channel_c1' => array(
  2230. 0 => 'name',
  2231. ),
  2232. ),
  2233. 'indexes' => array(
  2234. ),
  2235. 'foreign keys' => array(
  2236. ),
  2237. );
  2238. return $description;
  2239. }
  2240. /**
  2241. * Implements hook_chado_schema_v1_11_contact()
  2242. * Purpose: To describe the structure of 'contact' to tripal
  2243. * @see tripal_core_chado_insert()
  2244. * @see tripal_core_chado_update()
  2245. * @see tripal_core_chado_select()
  2246. *
  2247. * @return
  2248. * An array describing the 'contact' table
  2249. *
  2250. * @ingroup tripal_chado_v1.11_schema_api
  2251. *
  2252. */
  2253. function tripal_core_chado_schema_v1_11_contact() {
  2254. $description = array(
  2255. 'table' => 'contact',
  2256. 'fields' => array(
  2257. 'contact_id' => array(
  2258. 'type' => 'serial',
  2259. 'not NULL' => '1',
  2260. ),
  2261. 'type_id' => array(
  2262. 'type' => 'int',
  2263. 'not NULL' => '',
  2264. ),
  2265. 'name' => array(
  2266. 'type' => 'varchar',
  2267. 'length' => '255',
  2268. 'not NULL' => '1',
  2269. ),
  2270. 'description' => array(
  2271. 'type' => 'varchar',
  2272. 'length' => '255',
  2273. 'not NULL' => '',
  2274. ),
  2275. ),
  2276. 'primary key' => array(
  2277. 0 => 'contact_id',
  2278. ),
  2279. 'unique keys' => array(
  2280. 'contact_c1' => array(
  2281. 0 => 'name',
  2282. ),
  2283. ),
  2284. 'indexes' => array(
  2285. ),
  2286. 'foreign keys' => array(
  2287. 'cvterm' => array(
  2288. 'table' => 'cvterm',
  2289. 'columns' => array(
  2290. 'type_id' => 'cvterm_id',
  2291. ),
  2292. ),
  2293. ),
  2294. );
  2295. return $description;
  2296. }
  2297. /**
  2298. * Implements hook_chado_schema_v1_11_contact_relationship()
  2299. * Purpose: To describe the structure of 'contact_relationship' to tripal
  2300. * @see tripal_core_chado_insert()
  2301. * @see tripal_core_chado_update()
  2302. * @see tripal_core_chado_select()
  2303. *
  2304. * @return
  2305. * An array describing the 'contact_relationship' table
  2306. *
  2307. * @ingroup tripal_chado_v1.11_schema_api
  2308. *
  2309. */
  2310. function tripal_core_chado_schema_v1_11_contact_relationship() {
  2311. $description = array(
  2312. 'table' => 'contact_relationship',
  2313. 'fields' => array(
  2314. 'contact_relationship_id' => array(
  2315. 'type' => 'serial',
  2316. 'not NULL' => '1',
  2317. ),
  2318. 'type_id' => array(
  2319. 'type' => 'int',
  2320. 'not NULL' => '1',
  2321. ),
  2322. 'subject_id' => array(
  2323. 'type' => 'int',
  2324. 'not NULL' => '1',
  2325. ),
  2326. 'object_id' => array(
  2327. 'type' => 'int',
  2328. 'not NULL' => '1',
  2329. ),
  2330. ),
  2331. 'primary key' => array(
  2332. 0 => 'contact_relationship_id',
  2333. ),
  2334. 'unique keys' => array(
  2335. 'contact_relationship_c1' => array(
  2336. 0 => 'subject_id',
  2337. 1 => 'object_id',
  2338. 2 => 'type_id',
  2339. ),
  2340. ),
  2341. 'indexes' => array(
  2342. 'contact_relationship_idx1' => array(
  2343. 0 => 'type_id',
  2344. ),
  2345. 'contact_relationship_idx2' => array(
  2346. 0 => 'subject_id',
  2347. ),
  2348. 'contact_relationship_idx3' => array(
  2349. 0 => 'object_id',
  2350. ),
  2351. ),
  2352. 'foreign keys' => array(
  2353. 'cvterm' => array(
  2354. 'table' => 'cvterm',
  2355. 'columns' => array(
  2356. 'type_id' => 'cvterm_id',
  2357. ),
  2358. ),
  2359. 'contact' => array(
  2360. 'table' => 'contact',
  2361. 'columns' => array(
  2362. 'subject_id' => 'contact_id',
  2363. 'object_id' => 'contact_id',
  2364. ),
  2365. ),
  2366. ),
  2367. );
  2368. return $description;
  2369. }
  2370. /**
  2371. * Implements hook_chado_schema_v1_11_control()
  2372. * Purpose: To describe the structure of 'control' to tripal
  2373. * @see tripal_core_chado_insert()
  2374. * @see tripal_core_chado_update()
  2375. * @see tripal_core_chado_select()
  2376. *
  2377. * @return
  2378. * An array describing the 'control' table
  2379. *
  2380. * @ingroup tripal_chado_v1.11_schema_api
  2381. *
  2382. */
  2383. function tripal_core_chado_schema_v1_11_control() {
  2384. $description = array(
  2385. 'table' => 'control',
  2386. 'fields' => array(
  2387. 'control_id' => array(
  2388. 'type' => 'serial',
  2389. 'not NULL' => '1',
  2390. ),
  2391. 'type_id' => array(
  2392. 'type' => 'int',
  2393. 'not NULL' => '1',
  2394. ),
  2395. 'assay_id' => array(
  2396. 'type' => 'int',
  2397. 'not NULL' => '1',
  2398. ),
  2399. 'tableinfo_id' => array(
  2400. 'type' => 'int',
  2401. 'not NULL' => '1',
  2402. ),
  2403. 'row_id' => array(
  2404. 'type' => 'int',
  2405. 'not NULL' => '1',
  2406. ),
  2407. 'name' => array(
  2408. 'type' => 'text',
  2409. 'not NULL' => '',
  2410. ),
  2411. 'value' => array(
  2412. 'type' => 'text',
  2413. 'not NULL' => '',
  2414. ),
  2415. 'rank' => array(
  2416. 'type' => 'int',
  2417. 'not NULL' => '1',
  2418. 'default' => '0',
  2419. ),
  2420. ),
  2421. 'primary key' => array(
  2422. 0 => 'control_id',
  2423. ),
  2424. 'unique keys' => array(
  2425. ),
  2426. 'indexes' => array(
  2427. 'control_idx1' => array(
  2428. 0 => 'type_id',
  2429. ),
  2430. 'control_idx2' => array(
  2431. 0 => 'assay_id',
  2432. ),
  2433. 'control_idx3' => array(
  2434. 0 => 'tableinfo_id',
  2435. ),
  2436. 'control_idx4' => array(
  2437. 0 => 'row_id',
  2438. ),
  2439. ),
  2440. 'foreign keys' => array(
  2441. 'tableinfo' => array(
  2442. 'table' => 'tableinfo',
  2443. 'columns' => array(
  2444. 'tableinfo_id' => 'tableinfo_id',
  2445. ),
  2446. ),
  2447. 'cvterm' => array(
  2448. 'table' => 'cvterm',
  2449. 'columns' => array(
  2450. 'type_id' => 'cvterm_id',
  2451. ),
  2452. ),
  2453. 'assay' => array(
  2454. 'table' => 'assay',
  2455. 'columns' => array(
  2456. 'assay_id' => 'assay_id',
  2457. ),
  2458. ),
  2459. ),
  2460. );
  2461. return $description;
  2462. }
  2463. /**
  2464. * Implements hook_chado_schema_v1_11_cv()
  2465. * Purpose: To describe the structure of 'cv' to tripal
  2466. * @see tripal_core_chado_insert()
  2467. * @see tripal_core_chado_update()
  2468. * @see tripal_core_chado_select()
  2469. *
  2470. * @return
  2471. * An array describing the 'cv' table
  2472. *
  2473. * @ingroup tripal_chado_v1.11_schema_api
  2474. *
  2475. */
  2476. function tripal_core_chado_schema_v1_11_cv() {
  2477. $description = array(
  2478. 'table' => 'cv',
  2479. 'fields' => array(
  2480. 'cv_id' => array(
  2481. 'type' => 'serial',
  2482. 'not NULL' => '1',
  2483. ),
  2484. 'name' => array(
  2485. 'type' => 'varchar',
  2486. 'length' => '255',
  2487. 'not NULL' => '1',
  2488. ),
  2489. 'definition' => array(
  2490. 'type' => 'text',
  2491. 'not NULL' => '',
  2492. ),
  2493. ),
  2494. 'primary key' => array(
  2495. 0 => 'cv_id',
  2496. ),
  2497. 'unique keys' => array(
  2498. 'cv_c1' => array(
  2499. 0 => 'name',
  2500. ),
  2501. ),
  2502. 'indexes' => array(
  2503. ),
  2504. 'foreign keys' => array(
  2505. ),
  2506. );
  2507. return $description;
  2508. }
  2509. /**
  2510. * Implements hook_chado_schema_v1_11_cvterm()
  2511. * Purpose: To describe the structure of 'cvterm' to tripal
  2512. * @see tripal_core_chado_insert()
  2513. * @see tripal_core_chado_update()
  2514. * @see tripal_core_chado_select()
  2515. *
  2516. * @return
  2517. * An array describing the 'cvterm' table
  2518. *
  2519. * @ingroup tripal_chado_v1.11_schema_api
  2520. *
  2521. */
  2522. function tripal_core_chado_schema_v1_11_cvterm() {
  2523. $description = array(
  2524. 'table' => 'cvterm',
  2525. 'fields' => array(
  2526. 'cvterm_id' => array(
  2527. 'type' => 'serial',
  2528. 'not NULL' => '1',
  2529. ),
  2530. 'cv_id' => array(
  2531. 'type' => 'int',
  2532. 'not NULL' => '1',
  2533. ),
  2534. 'name' => array(
  2535. 'type' => 'varchar',
  2536. 'length' => '1024',
  2537. 'not NULL' => '1',
  2538. ),
  2539. 'definition' => array(
  2540. 'type' => 'text',
  2541. 'not NULL' => '',
  2542. ),
  2543. 'dbxref_id' => array(
  2544. 'type' => 'int',
  2545. 'not NULL' => '1',
  2546. ),
  2547. 'is_obsolete' => array(
  2548. 'type' => 'int',
  2549. 'not NULL' => '1',
  2550. 'default' => '0',
  2551. ),
  2552. 'is_relationshiptype' => array(
  2553. 'type' => 'int',
  2554. 'not NULL' => '1',
  2555. 'default' => '0',
  2556. ),
  2557. ),
  2558. 'primary key' => array(
  2559. 0 => 'cvterm_id',
  2560. ),
  2561. 'unique keys' => array(
  2562. 'cvterm_c1' => array(
  2563. 0 => 'name',
  2564. 1 => 'cv_id',
  2565. 2 => 'is_obsolete',
  2566. ),
  2567. 'cvterm_c2' => array(
  2568. 0 => 'dbxref_id',
  2569. ),
  2570. ),
  2571. 'indexes' => array(
  2572. 'cvterm_idx1' => array(
  2573. 0 => 'cv_id',
  2574. ),
  2575. 'cvterm_idx2' => array(
  2576. 0 => 'name',
  2577. ),
  2578. 'cvterm_idx3' => array(
  2579. 0 => 'dbxref_id',
  2580. ),
  2581. ),
  2582. 'foreign keys' => array(
  2583. 'dbxref' => array(
  2584. 'table' => 'dbxref',
  2585. 'columns' => array(
  2586. 'dbxref_id' => 'dbxref_id',
  2587. ),
  2588. ),
  2589. 'cv' => array(
  2590. 'table' => 'cv',
  2591. 'columns' => array(
  2592. 'cv_id' => 'cv_id',
  2593. ),
  2594. ),
  2595. ),
  2596. );
  2597. return $description;
  2598. }
  2599. /**
  2600. * Implements hook_chado_schema_v1_11_cvterm_dbxref()
  2601. * Purpose: To describe the structure of 'cvterm_dbxref' to tripal
  2602. * @see tripal_core_chado_insert()
  2603. * @see tripal_core_chado_update()
  2604. * @see tripal_core_chado_select()
  2605. *
  2606. * @return
  2607. * An array describing the 'cvterm_dbxref' table
  2608. *
  2609. * @ingroup tripal_chado_v1.11_schema_api
  2610. *
  2611. */
  2612. function tripal_core_chado_schema_v1_11_cvterm_dbxref() {
  2613. $description = array(
  2614. 'table' => 'cvterm_dbxref',
  2615. 'fields' => array(
  2616. 'cvterm_dbxref_id' => array(
  2617. 'type' => 'serial',
  2618. 'not NULL' => '1',
  2619. ),
  2620. 'cvterm_id' => array(
  2621. 'type' => 'int',
  2622. 'not NULL' => '1',
  2623. ),
  2624. 'dbxref_id' => array(
  2625. 'type' => 'int',
  2626. 'not NULL' => '1',
  2627. ),
  2628. 'is_for_definition' => array(
  2629. 'type' => 'int',
  2630. 'not NULL' => '1',
  2631. 'default' => '0',
  2632. ),
  2633. ),
  2634. 'primary key' => array(
  2635. 0 => 'cvterm_dbxref_id',
  2636. ),
  2637. 'unique keys' => array(
  2638. 'cvterm_dbxref_c1' => array(
  2639. 0 => 'cvterm_id',
  2640. 1 => 'dbxref_id',
  2641. ),
  2642. ),
  2643. 'indexes' => array(
  2644. 'cvterm_dbxref_idx1' => array(
  2645. 0 => 'cvterm_id',
  2646. ),
  2647. 'cvterm_dbxref_idx2' => array(
  2648. 0 => 'dbxref_id',
  2649. ),
  2650. ),
  2651. 'foreign keys' => array(
  2652. 'dbxref' => array(
  2653. 'table' => 'dbxref',
  2654. 'columns' => array(
  2655. 'dbxref_id' => 'dbxref_id',
  2656. ),
  2657. ),
  2658. 'cvterm' => array(
  2659. 'table' => 'cvterm',
  2660. 'columns' => array(
  2661. 'cvterm_id' => 'cvterm_id',
  2662. ),
  2663. ),
  2664. ),
  2665. );
  2666. return $description;
  2667. }
  2668. /**
  2669. * Implements hook_chado_schema_v1_11_cvterm_relationship()
  2670. * Purpose: To describe the structure of 'cvterm_relationship' to tripal
  2671. * @see tripal_core_chado_insert()
  2672. * @see tripal_core_chado_update()
  2673. * @see tripal_core_chado_select()
  2674. *
  2675. * @return
  2676. * An array describing the 'cvterm_relationship' table
  2677. *
  2678. * @ingroup tripal_chado_v1.11_schema_api
  2679. *
  2680. */
  2681. function tripal_core_chado_schema_v1_11_cvterm_relationship() {
  2682. $description = array(
  2683. 'table' => 'cvterm_relationship',
  2684. 'fields' => array(
  2685. 'cvterm_relationship_id' => array(
  2686. 'type' => 'serial',
  2687. 'not NULL' => '1',
  2688. ),
  2689. 'type_id' => array(
  2690. 'type' => 'int',
  2691. 'not NULL' => '1',
  2692. ),
  2693. 'subject_id' => array(
  2694. 'type' => 'int',
  2695. 'not NULL' => '1',
  2696. ),
  2697. 'object_id' => array(
  2698. 'type' => 'int',
  2699. 'not NULL' => '1',
  2700. ),
  2701. ),
  2702. 'primary key' => array(
  2703. 0 => 'cvterm_relationship_id',
  2704. ),
  2705. 'unique keys' => array(
  2706. 'cvterm_relationship_c1' => array(
  2707. 0 => 'subject_id',
  2708. 1 => 'object_id',
  2709. 2 => 'type_id',
  2710. ),
  2711. ),
  2712. 'indexes' => array(
  2713. 'cvterm_relationship_idx1' => array(
  2714. 0 => 'type_id',
  2715. ),
  2716. 'cvterm_relationship_idx2' => array(
  2717. 0 => 'subject_id',
  2718. ),
  2719. 'cvterm_relationship_idx3' => array(
  2720. 0 => 'object_id',
  2721. ),
  2722. ),
  2723. 'foreign keys' => array(
  2724. 'cvterm' => array(
  2725. 'table' => 'cvterm',
  2726. 'columns' => array(
  2727. 'type_id' => 'cvterm_id',
  2728. 'subject_id' => 'cvterm_id',
  2729. 'object_id' => 'cvterm_id',
  2730. ),
  2731. ),
  2732. ),
  2733. );
  2734. return $description;
  2735. }
  2736. /**
  2737. * Implements hook_chado_schema_v1_11_cvtermpath()
  2738. * Purpose: To describe the structure of 'cvtermpath' to tripal
  2739. * @see tripal_core_chado_insert()
  2740. * @see tripal_core_chado_update()
  2741. * @see tripal_core_chado_select()
  2742. *
  2743. * @return
  2744. * An array describing the 'cvtermpath' table
  2745. *
  2746. * @ingroup tripal_chado_v1.11_schema_api
  2747. *
  2748. */
  2749. function tripal_core_chado_schema_v1_11_cvtermpath() {
  2750. $description = array(
  2751. 'table' => 'cvtermpath',
  2752. 'fields' => array(
  2753. 'cvtermpath_id' => array(
  2754. 'type' => 'serial',
  2755. 'not NULL' => '1',
  2756. ),
  2757. 'type_id' => array(
  2758. 'type' => 'int',
  2759. 'not NULL' => '',
  2760. ),
  2761. 'subject_id' => array(
  2762. 'type' => 'int',
  2763. 'not NULL' => '1',
  2764. ),
  2765. 'object_id' => array(
  2766. 'type' => 'int',
  2767. 'not NULL' => '1',
  2768. ),
  2769. 'cv_id' => array(
  2770. 'type' => 'int',
  2771. 'not NULL' => '1',
  2772. ),
  2773. 'pathdistance' => array(
  2774. 'type' => 'int',
  2775. 'not NULL' => '',
  2776. ),
  2777. ),
  2778. 'primary key' => array(
  2779. 0 => 'cvtermpath_id',
  2780. ),
  2781. 'unique keys' => array(
  2782. 'cvtermpath_c1' => array(
  2783. 0 => 'subject_id',
  2784. 1 => 'object_id',
  2785. 2 => 'type_id',
  2786. 3 => 'pathdistance',
  2787. ),
  2788. ),
  2789. 'indexes' => array(
  2790. 'cvtermpath_idx1' => array(
  2791. 0 => 'type_id',
  2792. ),
  2793. 'cvtermpath_idx2' => array(
  2794. 0 => 'subject_id',
  2795. ),
  2796. 'cvtermpath_idx3' => array(
  2797. 0 => 'object_id',
  2798. ),
  2799. 'cvtermpath_idx4' => array(
  2800. 0 => 'cv_id',
  2801. ),
  2802. ),
  2803. 'foreign keys' => array(
  2804. 'cv' => array(
  2805. 'table' => 'cv',
  2806. 'columns' => array(
  2807. 'cv_id' => 'cv_id',
  2808. ),
  2809. ),
  2810. 'cvterm' => array(
  2811. 'table' => 'cvterm',
  2812. 'columns' => array(
  2813. 'type_id' => 'cvterm_id',
  2814. 'subject_id' => 'cvterm_id',
  2815. 'object_id' => 'cvterm_id',
  2816. ),
  2817. ),
  2818. ),
  2819. );
  2820. return $description;
  2821. }
  2822. /**
  2823. * Implements hook_chado_schema_v1_11_cvtermprop()
  2824. * Purpose: To describe the structure of 'cvtermprop' to tripal
  2825. * @see tripal_core_chado_insert()
  2826. * @see tripal_core_chado_update()
  2827. * @see tripal_core_chado_select()
  2828. *
  2829. * @return
  2830. * An array describing the 'cvtermprop' table
  2831. *
  2832. * @ingroup tripal_chado_v1.11_schema_api
  2833. *
  2834. */
  2835. function tripal_core_chado_schema_v1_11_cvtermprop() {
  2836. $description = array(
  2837. 'table' => 'cvtermprop',
  2838. 'fields' => array(
  2839. 'cvtermprop_id' => array(
  2840. 'type' => 'serial',
  2841. 'not NULL' => '1',
  2842. ),
  2843. 'cvterm_id' => array(
  2844. 'type' => 'int',
  2845. 'not NULL' => '1',
  2846. ),
  2847. 'type_id' => array(
  2848. 'type' => 'int',
  2849. 'not NULL' => '1',
  2850. ),
  2851. 'value' => array(
  2852. 'type' => 'text',
  2853. 'not NULL' => '1',
  2854. 'default' => '',
  2855. ),
  2856. 'rank' => array(
  2857. 'type' => 'int',
  2858. 'not NULL' => '1',
  2859. 'default' => '0',
  2860. ),
  2861. ),
  2862. 'primary key' => array(
  2863. 0 => 'cvtermprop_id',
  2864. ),
  2865. 'unique keys' => array(
  2866. 'cvterm_id' => array(
  2867. 0 => 'cvterm_id',
  2868. 1 => 'type_id',
  2869. 2 => 'value',
  2870. 3 => 'rank',
  2871. ),
  2872. ),
  2873. 'indexes' => array(
  2874. 'cvtermprop_idx1' => array(
  2875. 0 => 'cvterm_id',
  2876. ),
  2877. 'cvtermprop_idx2' => array(
  2878. 0 => 'type_id',
  2879. ),
  2880. ),
  2881. 'foreign keys' => array(
  2882. 'cvterm' => array(
  2883. 'table' => 'cvterm',
  2884. 'columns' => array(
  2885. 'cvterm_id' => 'cvterm_id',
  2886. 'type_id' => 'cvterm_id',
  2887. ),
  2888. ),
  2889. ),
  2890. );
  2891. return $description;
  2892. }
  2893. /**
  2894. * Implements hook_chado_schema_v1_11_cvtermsynonym()
  2895. * Purpose: To describe the structure of 'cvtermsynonym' to tripal
  2896. * @see tripal_core_chado_insert()
  2897. * @see tripal_core_chado_update()
  2898. * @see tripal_core_chado_select()
  2899. *
  2900. * @return
  2901. * An array describing the 'cvtermsynonym' table
  2902. *
  2903. * @ingroup tripal_chado_v1.11_schema_api
  2904. *
  2905. */
  2906. function tripal_core_chado_schema_v1_11_cvtermsynonym() {
  2907. $description = array(
  2908. 'table' => 'cvtermsynonym',
  2909. 'fields' => array(
  2910. 'cvtermsynonym_id' => array(
  2911. 'type' => 'serial',
  2912. 'not NULL' => '1',
  2913. ),
  2914. 'cvterm_id' => array(
  2915. 'type' => 'int',
  2916. 'not NULL' => '1',
  2917. ),
  2918. 'synonym' => array(
  2919. 'type' => 'varchar',
  2920. 'length' => '1024',
  2921. 'not NULL' => '1',
  2922. ),
  2923. 'type_id' => array(
  2924. 'type' => 'int',
  2925. 'not NULL' => '',
  2926. ),
  2927. ),
  2928. 'primary key' => array(
  2929. 0 => 'cvtermsynonym_id',
  2930. ),
  2931. 'unique keys' => array(
  2932. 'cvtermsynonym_c1' => array(
  2933. 0 => 'cvterm_id',
  2934. 1 => 'synonym',
  2935. ),
  2936. ),
  2937. 'indexes' => array(
  2938. 'cvtermsynonym_idx1' => array(
  2939. 0 => 'cvterm_id',
  2940. ),
  2941. ),
  2942. 'foreign keys' => array(
  2943. 'cvterm' => array(
  2944. 'table' => 'cvterm',
  2945. 'columns' => array(
  2946. 'cvterm_id' => 'cvterm_id',
  2947. 'type_id' => 'cvterm_id',
  2948. ),
  2949. ),
  2950. ),
  2951. );
  2952. return $description;
  2953. }
  2954. /**
  2955. * Implements hook_chado_schema_v1_11_db()
  2956. * Purpose: To describe the structure of 'db' to tripal
  2957. * @see tripal_core_chado_insert()
  2958. * @see tripal_core_chado_update()
  2959. * @see tripal_core_chado_select()
  2960. *
  2961. * @return
  2962. * An array describing the 'db' table
  2963. *
  2964. * @ingroup tripal_chado_v1.11_schema_api
  2965. *
  2966. */
  2967. function tripal_core_chado_schema_v1_11_db() {
  2968. $description = array(
  2969. 'table' => 'db',
  2970. 'fields' => array(
  2971. 'db_id' => array(
  2972. 'type' => 'serial',
  2973. 'not NULL' => '1',
  2974. ),
  2975. 'name' => array(
  2976. 'type' => 'varchar',
  2977. 'length' => '255',
  2978. 'not NULL' => '1',
  2979. ),
  2980. 'description' => array(
  2981. 'type' => 'varchar',
  2982. 'length' => '255',
  2983. 'not NULL' => '',
  2984. ),
  2985. 'urlprefix' => array(
  2986. 'type' => 'varchar',
  2987. 'length' => '255',
  2988. 'not NULL' => '',
  2989. ),
  2990. 'url' => array(
  2991. 'type' => 'varchar',
  2992. 'length' => '255',
  2993. 'not NULL' => '',
  2994. ),
  2995. ),
  2996. 'primary key' => array(
  2997. 0 => 'db_id',
  2998. ),
  2999. 'unique keys' => array(
  3000. 'db_c1' => array(
  3001. 0 => 'name',
  3002. ),
  3003. ),
  3004. 'indexes' => array(
  3005. ),
  3006. 'foreign keys' => array(
  3007. ),
  3008. );
  3009. return $description;
  3010. }
  3011. /**
  3012. * Implements hook_chado_schema_v1_11_dbxref()
  3013. * Purpose: To describe the structure of 'dbxref' to tripal
  3014. * @see tripal_core_chado_insert()
  3015. * @see tripal_core_chado_update()
  3016. * @see tripal_core_chado_select()
  3017. *
  3018. * @return
  3019. * An array describing the 'dbxref' table
  3020. *
  3021. * @ingroup tripal_chado_v1.11_schema_api
  3022. *
  3023. */
  3024. function tripal_core_chado_schema_v1_11_dbxref() {
  3025. $description = array(
  3026. 'table' => 'dbxref',
  3027. 'fields' => array(
  3028. 'dbxref_id' => array(
  3029. 'type' => 'serial',
  3030. 'not NULL' => '1',
  3031. ),
  3032. 'db_id' => array(
  3033. 'type' => 'int',
  3034. 'not NULL' => '1',
  3035. ),
  3036. 'accession' => array(
  3037. 'type' => 'varchar',
  3038. 'length' => '255',
  3039. 'not NULL' => '1',
  3040. ),
  3041. 'version' => array(
  3042. 'type' => 'varchar',
  3043. 'length' => '255',
  3044. 'not NULL' => '1',
  3045. 'default' => '',
  3046. ),
  3047. 'description' => array(
  3048. 'type' => 'text',
  3049. 'not NULL' => '',
  3050. ),
  3051. ),
  3052. 'primary key' => array(
  3053. 0 => 'dbxref_id',
  3054. ),
  3055. 'unique keys' => array(
  3056. 'dbxref_c1' => array(
  3057. 0 => 'db_id',
  3058. 1 => 'accession',
  3059. 2 => 'version',
  3060. ),
  3061. ),
  3062. 'indexes' => array(
  3063. 'dbxref_idx1' => array(
  3064. 0 => 'db_id',
  3065. ),
  3066. 'dbxref_idx2' => array(
  3067. 0 => 'accession',
  3068. ),
  3069. 'dbxref_idx3' => array(
  3070. 0 => 'version',
  3071. ),
  3072. ),
  3073. 'foreign keys' => array(
  3074. 'db' => array(
  3075. 'table' => 'db',
  3076. 'columns' => array(
  3077. 'db_id' => 'db_id',
  3078. ),
  3079. ),
  3080. ),
  3081. );
  3082. return $description;
  3083. }
  3084. /**
  3085. * Implements hook_chado_schema_v1_11_dbxrefprop()
  3086. * Purpose: To describe the structure of 'dbxrefprop' to tripal
  3087. * @see tripal_core_chado_insert()
  3088. * @see tripal_core_chado_update()
  3089. * @see tripal_core_chado_select()
  3090. *
  3091. * @return
  3092. * An array describing the 'dbxrefprop' table
  3093. *
  3094. * @ingroup tripal_chado_v1.11_schema_api
  3095. *
  3096. */
  3097. function tripal_core_chado_schema_v1_11_dbxrefprop() {
  3098. $description = array(
  3099. 'table' => 'dbxrefprop',
  3100. 'fields' => array(
  3101. 'dbxrefprop_id' => array(
  3102. 'type' => 'serial',
  3103. 'not NULL' => '1',
  3104. ),
  3105. 'dbxref_id' => array(
  3106. 'type' => 'int',
  3107. 'not NULL' => '1',
  3108. ),
  3109. 'type_id' => array(
  3110. 'type' => 'int',
  3111. 'not NULL' => '1',
  3112. ),
  3113. 'value' => array(
  3114. 'type' => 'text',
  3115. 'not NULL' => '1',
  3116. 'default' => '',
  3117. ),
  3118. 'rank' => array(
  3119. 'type' => 'int',
  3120. 'not NULL' => '1',
  3121. 'default' => '0',
  3122. ),
  3123. ),
  3124. 'primary key' => array(
  3125. 0 => 'dbxrefprop_id',
  3126. ),
  3127. 'unique keys' => array(
  3128. 'dbxrefprop_c1' => array(
  3129. 0 => 'dbxref_id',
  3130. 1 => 'type_id',
  3131. 2 => 'rank',
  3132. ),
  3133. ),
  3134. 'indexes' => array(
  3135. 'dbxrefprop_idx1' => array(
  3136. 0 => 'dbxref_id',
  3137. ),
  3138. 'dbxrefprop_idx2' => array(
  3139. 0 => 'type_id',
  3140. ),
  3141. ),
  3142. 'foreign keys' => array(
  3143. 'dbxref' => array(
  3144. 'table' => 'dbxref',
  3145. 'columns' => array(
  3146. 'dbxref_id' => 'dbxref_id',
  3147. ),
  3148. ),
  3149. 'cvterm' => array(
  3150. 'table' => 'cvterm',
  3151. 'columns' => array(
  3152. 'type_id' => 'cvterm_id',
  3153. ),
  3154. ),
  3155. ),
  3156. );
  3157. return $description;
  3158. }
  3159. /**
  3160. * Implements hook_chado_schema_v1_11_eimage()
  3161. * Purpose: To describe the structure of 'eimage' to tripal
  3162. * @see tripal_core_chado_insert()
  3163. * @see tripal_core_chado_update()
  3164. * @see tripal_core_chado_select()
  3165. *
  3166. * @return
  3167. * An array describing the 'eimage' table
  3168. *
  3169. * @ingroup tripal_chado_v1.11_schema_api
  3170. *
  3171. */
  3172. function tripal_core_chado_schema_v1_11_eimage() {
  3173. $description = array(
  3174. 'table' => 'eimage',
  3175. 'fields' => array(
  3176. 'eimage_id' => array(
  3177. 'type' => 'serial',
  3178. 'not NULL' => '1',
  3179. ),
  3180. 'eimage_data' => array(
  3181. 'type' => 'text',
  3182. 'not NULL' => '',
  3183. ),
  3184. 'eimage_type' => array(
  3185. 'type' => 'varchar',
  3186. 'length' => '255',
  3187. 'not NULL' => '1',
  3188. ),
  3189. 'image_uri' => array(
  3190. 'type' => 'varchar',
  3191. 'length' => '255',
  3192. 'not NULL' => '',
  3193. ),
  3194. ),
  3195. 'primary key' => array(
  3196. 0 => 'eimage_id',
  3197. ),
  3198. 'unique keys' => array(
  3199. ),
  3200. 'indexes' => array(
  3201. ),
  3202. 'foreign keys' => array(
  3203. ),
  3204. );
  3205. return $description;
  3206. }
  3207. /**
  3208. * Implements hook_chado_schema_v1_11_element()
  3209. * Purpose: To describe the structure of 'element' to tripal
  3210. * @see tripal_core_chado_insert()
  3211. * @see tripal_core_chado_update()
  3212. * @see tripal_core_chado_select()
  3213. *
  3214. * @return
  3215. * An array describing the 'element' table
  3216. *
  3217. * @ingroup tripal_chado_v1.11_schema_api
  3218. *
  3219. */
  3220. function tripal_core_chado_schema_v1_11_element() {
  3221. $description = array(
  3222. 'table' => 'element',
  3223. 'fields' => array(
  3224. 'element_id' => array(
  3225. 'type' => 'serial',
  3226. 'not NULL' => '1',
  3227. ),
  3228. 'feature_id' => array(
  3229. 'type' => 'int',
  3230. 'not NULL' => '',
  3231. ),
  3232. 'arraydesign_id' => array(
  3233. 'type' => 'int',
  3234. 'not NULL' => '1',
  3235. ),
  3236. 'type_id' => array(
  3237. 'type' => 'int',
  3238. 'not NULL' => '',
  3239. ),
  3240. 'dbxref_id' => array(
  3241. 'type' => 'int',
  3242. 'not NULL' => '',
  3243. ),
  3244. ),
  3245. 'primary key' => array(
  3246. 0 => 'element_id',
  3247. ),
  3248. 'unique keys' => array(
  3249. 'element_c1' => array(
  3250. 0 => 'feature_id',
  3251. 1 => 'arraydesign_id',
  3252. ),
  3253. ),
  3254. 'indexes' => array(
  3255. 'element_idx1' => array(
  3256. 0 => 'feature_id',
  3257. ),
  3258. 'element_idx2' => array(
  3259. 0 => 'arraydesign_id',
  3260. ),
  3261. 'element_idx3' => array(
  3262. 0 => 'type_id',
  3263. ),
  3264. 'element_idx4' => array(
  3265. 0 => 'dbxref_id',
  3266. ),
  3267. ),
  3268. 'foreign keys' => array(
  3269. 'dbxref' => array(
  3270. 'table' => 'dbxref',
  3271. 'columns' => array(
  3272. 'dbxref_id' => 'dbxref_id',
  3273. ),
  3274. ),
  3275. 'cvterm' => array(
  3276. 'table' => 'cvterm',
  3277. 'columns' => array(
  3278. 'type_id' => 'cvterm_id',
  3279. ),
  3280. ),
  3281. 'feature' => array(
  3282. 'table' => 'feature',
  3283. 'columns' => array(
  3284. 'feature_id' => 'feature_id',
  3285. ),
  3286. ),
  3287. 'arraydesign' => array(
  3288. 'table' => 'arraydesign',
  3289. 'columns' => array(
  3290. 'arraydesign_id' => 'arraydesign_id',
  3291. ),
  3292. ),
  3293. ),
  3294. );
  3295. return $description;
  3296. }
  3297. /**
  3298. * Implements hook_chado_schema_v1_11_element_relationship()
  3299. * Purpose: To describe the structure of 'element_relationship' to tripal
  3300. * @see tripal_core_chado_insert()
  3301. * @see tripal_core_chado_update()
  3302. * @see tripal_core_chado_select()
  3303. *
  3304. * @return
  3305. * An array describing the 'element_relationship' table
  3306. *
  3307. * @ingroup tripal_chado_v1.11_schema_api
  3308. *
  3309. */
  3310. function tripal_core_chado_schema_v1_11_element_relationship() {
  3311. $description = array(
  3312. 'table' => 'element_relationship',
  3313. 'fields' => array(
  3314. 'element_relationship_id' => array(
  3315. 'type' => 'serial',
  3316. 'not NULL' => '1',
  3317. ),
  3318. 'subject_id' => array(
  3319. 'type' => 'int',
  3320. 'not NULL' => '1',
  3321. ),
  3322. 'type_id' => array(
  3323. 'type' => 'int',
  3324. 'not NULL' => '1',
  3325. ),
  3326. 'object_id' => array(
  3327. 'type' => 'int',
  3328. 'not NULL' => '1',
  3329. ),
  3330. 'value' => array(
  3331. 'type' => 'text',
  3332. 'not NULL' => '',
  3333. ),
  3334. 'rank' => array(
  3335. 'type' => 'int',
  3336. 'not NULL' => '1',
  3337. 'default' => '0',
  3338. ),
  3339. ),
  3340. 'primary key' => array(
  3341. 0 => 'element_relationship_id',
  3342. ),
  3343. 'unique keys' => array(
  3344. 'element_relationship_c1' => array(
  3345. 0 => 'subject_id',
  3346. 1 => 'object_id',
  3347. 2 => 'type_id',
  3348. 3 => 'rank',
  3349. ),
  3350. ),
  3351. 'indexes' => array(
  3352. 'element_relationship_idx1' => array(
  3353. 0 => 'subject_id',
  3354. ),
  3355. 'element_relationship_idx2' => array(
  3356. 0 => 'type_id',
  3357. ),
  3358. 'element_relationship_idx3' => array(
  3359. 0 => 'object_id',
  3360. ),
  3361. 'element_relationship_idx4' => array(
  3362. 0 => 'value',
  3363. ),
  3364. ),
  3365. 'foreign keys' => array(
  3366. 'cvterm' => array(
  3367. 'table' => 'cvterm',
  3368. 'columns' => array(
  3369. 'type_id' => 'cvterm_id',
  3370. ),
  3371. ),
  3372. 'element' => array(
  3373. 'table' => 'element',
  3374. 'columns' => array(
  3375. 'subject_id' => 'element_id',
  3376. 'object_id' => 'element_id',
  3377. ),
  3378. ),
  3379. ),
  3380. );
  3381. return $description;
  3382. }
  3383. /**
  3384. * Implements hook_chado_schema_v1_11_elementresult()
  3385. * Purpose: To describe the structure of 'elementresult' to tripal
  3386. * @see tripal_core_chado_insert()
  3387. * @see tripal_core_chado_update()
  3388. * @see tripal_core_chado_select()
  3389. *
  3390. * @return
  3391. * An array describing the 'elementresult' table
  3392. *
  3393. * @ingroup tripal_chado_v1.11_schema_api
  3394. *
  3395. */
  3396. function tripal_core_chado_schema_v1_11_elementresult() {
  3397. $description = array(
  3398. 'table' => 'elementresult',
  3399. 'fields' => array(
  3400. 'elementresult_id' => array(
  3401. 'type' => 'serial',
  3402. 'not NULL' => '1',
  3403. ),
  3404. 'element_id' => array(
  3405. 'type' => 'int',
  3406. 'not NULL' => '1',
  3407. ),
  3408. 'quantification_id' => array(
  3409. 'type' => 'int',
  3410. 'not NULL' => '1',
  3411. ),
  3412. 'signal' => array(
  3413. 'type' => 'float',
  3414. 'size' => 'big',
  3415. 'not NULL' => '1',
  3416. ),
  3417. ),
  3418. 'primary key' => array(
  3419. 0 => 'elementresult_id',
  3420. ),
  3421. 'unique keys' => array(
  3422. 'elementresult_c1' => array(
  3423. 0 => 'element_id',
  3424. 1 => 'quantification_id',
  3425. ),
  3426. ),
  3427. 'indexes' => array(
  3428. 'elementresult_idx1' => array(
  3429. 0 => 'element_id',
  3430. ),
  3431. 'elementresult_idx2' => array(
  3432. 0 => 'quantification_id',
  3433. ),
  3434. 'elementresult_idx3' => array(
  3435. 0 => 'signal',
  3436. ),
  3437. ),
  3438. 'foreign keys' => array(
  3439. 'quantification' => array(
  3440. 'table' => 'quantification',
  3441. 'columns' => array(
  3442. 'quantification_id' => 'quantification_id',
  3443. ),
  3444. ),
  3445. 'element' => array(
  3446. 'table' => 'element',
  3447. 'columns' => array(
  3448. 'element_id' => 'element_id',
  3449. ),
  3450. ),
  3451. ),
  3452. );
  3453. return $description;
  3454. }
  3455. /**
  3456. * Implements hook_chado_schema_v1_11_elementresult_relationship()
  3457. * Purpose: To describe the structure of 'elementresult_relationship' to tripal
  3458. * @see tripal_core_chado_insert()
  3459. * @see tripal_core_chado_update()
  3460. * @see tripal_core_chado_select()
  3461. *
  3462. * @return
  3463. * An array describing the 'elementresult_relationship' table
  3464. *
  3465. * @ingroup tripal_chado_v1.11_schema_api
  3466. *
  3467. */
  3468. function tripal_core_chado_schema_v1_11_elementresult_relationship() {
  3469. $description = array(
  3470. 'table' => 'elementresult_relationship',
  3471. 'fields' => array(
  3472. 'elementresult_relationship_id' => array(
  3473. 'type' => 'serial',
  3474. 'not NULL' => '1',
  3475. ),
  3476. 'subject_id' => array(
  3477. 'type' => 'int',
  3478. 'not NULL' => '1',
  3479. ),
  3480. 'type_id' => array(
  3481. 'type' => 'int',
  3482. 'not NULL' => '1',
  3483. ),
  3484. 'object_id' => array(
  3485. 'type' => 'int',
  3486. 'not NULL' => '1',
  3487. ),
  3488. 'value' => array(
  3489. 'type' => 'text',
  3490. 'not NULL' => '',
  3491. ),
  3492. 'rank' => array(
  3493. 'type' => 'int',
  3494. 'not NULL' => '1',
  3495. 'default' => '0',
  3496. ),
  3497. ),
  3498. 'primary key' => array(
  3499. 0 => 'elementresult_relationship_id',
  3500. ),
  3501. 'unique keys' => array(
  3502. 'elementresult_relationship_c1' => array(
  3503. 0 => 'subject_id',
  3504. 1 => 'object_id',
  3505. 2 => 'type_id',
  3506. 3 => 'rank',
  3507. ),
  3508. ),
  3509. 'indexes' => array(
  3510. 'elementresult_relationship_idx1' => array(
  3511. 0 => 'subject_id',
  3512. ),
  3513. 'elementresult_relationship_idx2' => array(
  3514. 0 => 'type_id',
  3515. ),
  3516. 'elementresult_relationship_idx3' => array(
  3517. 0 => 'object_id',
  3518. ),
  3519. 'elementresult_relationship_idx4' => array(
  3520. 0 => 'value',
  3521. ),
  3522. ),
  3523. 'foreign keys' => array(
  3524. 'cvterm' => array(
  3525. 'table' => 'cvterm',
  3526. 'columns' => array(
  3527. 'type_id' => 'cvterm_id',
  3528. ),
  3529. ),
  3530. 'elementresult' => array(
  3531. 'table' => 'elementresult',
  3532. 'columns' => array(
  3533. 'subject_id' => 'elementresult_id',
  3534. 'object_id' => 'elementresult_id',
  3535. ),
  3536. ),
  3537. ),
  3538. );
  3539. return $description;
  3540. }
  3541. /**
  3542. * Implements hook_chado_schema_v1_11_environment()
  3543. * Purpose: To describe the structure of 'environment' to tripal
  3544. * @see tripal_core_chado_insert()
  3545. * @see tripal_core_chado_update()
  3546. * @see tripal_core_chado_select()
  3547. *
  3548. * @return
  3549. * An array describing the 'environment' table
  3550. *
  3551. * @ingroup tripal_chado_v1.11_schema_api
  3552. *
  3553. */
  3554. function tripal_core_chado_schema_v1_11_environment() {
  3555. $description = array(
  3556. 'table' => 'environment',
  3557. 'fields' => array(
  3558. 'environment_id' => array(
  3559. 'type' => 'serial',
  3560. 'not NULL' => '1',
  3561. ),
  3562. 'uniquename' => array(
  3563. 'type' => 'text',
  3564. 'not NULL' => '1',
  3565. ),
  3566. 'description' => array(
  3567. 'type' => 'text',
  3568. 'not NULL' => '',
  3569. ),
  3570. ),
  3571. 'primary key' => array(
  3572. 0 => 'environment_id',
  3573. ),
  3574. 'unique keys' => array(
  3575. 'environment_c1' => array(
  3576. 0 => 'uniquename',
  3577. ),
  3578. ),
  3579. 'indexes' => array(
  3580. 'environment_idx1' => array(
  3581. 0 => 'uniquename',
  3582. ),
  3583. ),
  3584. 'foreign keys' => array(
  3585. ),
  3586. );
  3587. return $description;
  3588. }
  3589. /**
  3590. * Implements hook_chado_schema_v1_11_environment_cvterm()
  3591. * Purpose: To describe the structure of 'environment_cvterm' to tripal
  3592. * @see tripal_core_chado_insert()
  3593. * @see tripal_core_chado_update()
  3594. * @see tripal_core_chado_select()
  3595. *
  3596. * @return
  3597. * An array describing the 'environment_cvterm' table
  3598. *
  3599. * @ingroup tripal_chado_v1.11_schema_api
  3600. *
  3601. */
  3602. function tripal_core_chado_schema_v1_11_environment_cvterm() {
  3603. $description = array(
  3604. 'table' => 'environment_cvterm',
  3605. 'fields' => array(
  3606. 'environment_cvterm_id' => array(
  3607. 'type' => 'serial',
  3608. 'not NULL' => '1',
  3609. ),
  3610. 'environment_id' => array(
  3611. 'type' => 'int',
  3612. 'not NULL' => '1',
  3613. ),
  3614. 'cvterm_id' => array(
  3615. 'type' => 'int',
  3616. 'not NULL' => '1',
  3617. ),
  3618. ),
  3619. 'primary key' => array(
  3620. 0 => 'environment_cvterm_id',
  3621. ),
  3622. 'unique keys' => array(
  3623. 'environment_cvterm_c1' => array(
  3624. 0 => 'environment_id',
  3625. 1 => 'cvterm_id',
  3626. ),
  3627. ),
  3628. 'indexes' => array(
  3629. 'environment_cvterm_idx1' => array(
  3630. 0 => 'environment_id',
  3631. ),
  3632. 'environment_cvterm_idx2' => array(
  3633. 0 => 'cvterm_id',
  3634. ),
  3635. ),
  3636. 'foreign keys' => array(
  3637. 'cvterm' => array(
  3638. 'table' => 'cvterm',
  3639. 'columns' => array(
  3640. 'cvterm_id' => 'cvterm_id',
  3641. ),
  3642. ),
  3643. 'environment' => array(
  3644. 'table' => 'environment',
  3645. 'columns' => array(
  3646. 'environment_id' => 'environment_id',
  3647. ),
  3648. ),
  3649. ),
  3650. );
  3651. return $description;
  3652. }
  3653. /**
  3654. * Implements hook_chado_schema_v1_11_expression()
  3655. * Purpose: To describe the structure of 'expression' to tripal
  3656. * @see tripal_core_chado_insert()
  3657. * @see tripal_core_chado_update()
  3658. * @see tripal_core_chado_select()
  3659. *
  3660. * @return
  3661. * An array describing the 'expression' table
  3662. *
  3663. * @ingroup tripal_chado_v1.11_schema_api
  3664. *
  3665. */
  3666. function tripal_core_chado_schema_v1_11_expression() {
  3667. $description = array(
  3668. 'table' => 'expression',
  3669. 'fields' => array(
  3670. 'expression_id' => array(
  3671. 'type' => 'serial',
  3672. 'not NULL' => '1',
  3673. ),
  3674. 'uniquename' => array(
  3675. 'type' => 'text',
  3676. 'not NULL' => '1',
  3677. ),
  3678. 'md5checksum' => array(
  3679. 'type' => 'char',
  3680. 'length' => '32',
  3681. 'not NULL' => '',
  3682. ),
  3683. 'description' => array(
  3684. 'type' => 'text',
  3685. 'not NULL' => '',
  3686. ),
  3687. ),
  3688. 'primary key' => array(
  3689. 0 => 'expression_id',
  3690. ),
  3691. 'unique keys' => array(
  3692. 'expression_c1' => array(
  3693. 0 => 'uniquename',
  3694. ),
  3695. ),
  3696. 'indexes' => array(
  3697. ),
  3698. 'foreign keys' => array(
  3699. ),
  3700. );
  3701. return $description;
  3702. }
  3703. /**
  3704. * Implements hook_chado_schema_v1_11_expression_cvterm()
  3705. * Purpose: To describe the structure of 'expression_cvterm' to tripal
  3706. * @see tripal_core_chado_insert()
  3707. * @see tripal_core_chado_update()
  3708. * @see tripal_core_chado_select()
  3709. *
  3710. * @return
  3711. * An array describing the 'expression_cvterm' table
  3712. *
  3713. * @ingroup tripal_chado_v1.11_schema_api
  3714. *
  3715. */
  3716. function tripal_core_chado_schema_v1_11_expression_cvterm() {
  3717. $description = array(
  3718. 'table' => 'expression_cvterm',
  3719. 'fields' => array(
  3720. 'expression_cvterm_id' => array(
  3721. 'type' => 'serial',
  3722. 'not NULL' => '1',
  3723. ),
  3724. 'expression_id' => array(
  3725. 'type' => 'int',
  3726. 'not NULL' => '1',
  3727. ),
  3728. 'cvterm_id' => array(
  3729. 'type' => 'int',
  3730. 'not NULL' => '1',
  3731. ),
  3732. 'rank' => array(
  3733. 'type' => 'int',
  3734. 'not NULL' => '1',
  3735. 'default' => '0',
  3736. ),
  3737. 'cvterm_type_id' => array(
  3738. 'type' => 'int',
  3739. 'not NULL' => '1',
  3740. ),
  3741. ),
  3742. 'primary key' => array(
  3743. 0 => 'expression_cvterm_id',
  3744. ),
  3745. 'unique keys' => array(
  3746. 'expression_cvterm_c1' => array(
  3747. 0 => 'expression_id',
  3748. 1 => 'cvterm_id',
  3749. 2 => 'cvterm_type_id',
  3750. ),
  3751. ),
  3752. 'indexes' => array(
  3753. 'expression_cvterm_idx1' => array(
  3754. 0 => 'expression_id',
  3755. ),
  3756. 'expression_cvterm_idx2' => array(
  3757. 0 => 'cvterm_id',
  3758. ),
  3759. 'expression_cvterm_idx3' => array(
  3760. 0 => 'cvterm_type_id',
  3761. ),
  3762. ),
  3763. 'foreign keys' => array(
  3764. 'cvterm' => array(
  3765. 'table' => 'cvterm',
  3766. 'columns' => array(
  3767. 'cvterm_id' => 'cvterm_id',
  3768. 'cvterm_type_id' => 'cvterm_id',
  3769. ),
  3770. ),
  3771. 'expression' => array(
  3772. 'table' => 'expression',
  3773. 'columns' => array(
  3774. 'expression_id' => 'expression_id',
  3775. ),
  3776. ),
  3777. ),
  3778. );
  3779. return $description;
  3780. }
  3781. /**
  3782. * Implements hook_chado_schema_v1_11_expression_cvtermprop()
  3783. * Purpose: To describe the structure of 'expression_cvtermprop' to tripal
  3784. * @see tripal_core_chado_insert()
  3785. * @see tripal_core_chado_update()
  3786. * @see tripal_core_chado_select()
  3787. *
  3788. * @return
  3789. * An array describing the 'expression_cvtermprop' table
  3790. *
  3791. * @ingroup tripal_chado_v1.11_schema_api
  3792. *
  3793. */
  3794. function tripal_core_chado_schema_v1_11_expression_cvtermprop() {
  3795. $description = array(
  3796. 'table' => 'expression_cvtermprop',
  3797. 'fields' => array(
  3798. 'expression_cvtermprop_id' => array(
  3799. 'type' => 'serial',
  3800. 'not NULL' => '1',
  3801. ),
  3802. 'expression_cvterm_id' => array(
  3803. 'type' => 'int',
  3804. 'not NULL' => '1',
  3805. ),
  3806. 'type_id' => array(
  3807. 'type' => 'int',
  3808. 'not NULL' => '1',
  3809. ),
  3810. 'value' => array(
  3811. 'type' => 'text',
  3812. 'not NULL' => '',
  3813. ),
  3814. 'rank' => array(
  3815. 'type' => 'int',
  3816. 'not NULL' => '1',
  3817. 'default' => '0',
  3818. ),
  3819. ),
  3820. 'primary key' => array(
  3821. 0 => 'expression_cvtermprop_id',
  3822. ),
  3823. 'unique keys' => array(
  3824. 'expression_cvtermprop_c1' => array(
  3825. 0 => 'expression_cvterm_id',
  3826. 1 => 'type_id',
  3827. 2 => 'rank',
  3828. ),
  3829. ),
  3830. 'indexes' => array(
  3831. 'expression_cvtermprop_idx1' => array(
  3832. 0 => 'expression_cvterm_id',
  3833. ),
  3834. 'expression_cvtermprop_idx2' => array(
  3835. 0 => 'type_id',
  3836. ),
  3837. ),
  3838. 'foreign keys' => array(
  3839. 'cvterm' => array(
  3840. 'table' => 'cvterm',
  3841. 'columns' => array(
  3842. 'type_id' => 'cvterm_id',
  3843. ),
  3844. ),
  3845. 'expression_cvterm' => array(
  3846. 'table' => 'expression_cvterm',
  3847. 'columns' => array(
  3848. 'expression_cvterm_id' => 'expression_cvterm_id',
  3849. ),
  3850. ),
  3851. ),
  3852. );
  3853. return $description;
  3854. }
  3855. /**
  3856. * Implements hook_chado_schema_v1_11_expression_image()
  3857. * Purpose: To describe the structure of 'expression_image' to tripal
  3858. * @see tripal_core_chado_insert()
  3859. * @see tripal_core_chado_update()
  3860. * @see tripal_core_chado_select()
  3861. *
  3862. * @return
  3863. * An array describing the 'expression_image' table
  3864. *
  3865. * @ingroup tripal_chado_v1.11_schema_api
  3866. *
  3867. */
  3868. function tripal_core_chado_schema_v1_11_expression_image() {
  3869. $description = array(
  3870. 'table' => 'expression_image',
  3871. 'fields' => array(
  3872. 'expression_image_id' => array(
  3873. 'type' => 'serial',
  3874. 'not NULL' => '1',
  3875. ),
  3876. 'expression_id' => array(
  3877. 'type' => 'int',
  3878. 'not NULL' => '1',
  3879. ),
  3880. 'eimage_id' => array(
  3881. 'type' => 'int',
  3882. 'not NULL' => '1',
  3883. ),
  3884. ),
  3885. 'primary key' => array(
  3886. 0 => 'expression_image_id',
  3887. ),
  3888. 'unique keys' => array(
  3889. 'expression_image_c1' => array(
  3890. 0 => 'expression_id',
  3891. 1 => 'eimage_id',
  3892. ),
  3893. ),
  3894. 'indexes' => array(
  3895. 'expression_image_idx1' => array(
  3896. 0 => 'expression_id',
  3897. ),
  3898. 'expression_image_idx2' => array(
  3899. 0 => 'eimage_id',
  3900. ),
  3901. ),
  3902. 'foreign keys' => array(
  3903. 'expression' => array(
  3904. 'table' => 'expression',
  3905. 'columns' => array(
  3906. 'expression_id' => 'expression_id',
  3907. ),
  3908. ),
  3909. 'eimage' => array(
  3910. 'table' => 'eimage',
  3911. 'columns' => array(
  3912. 'eimage_id' => 'eimage_id',
  3913. ),
  3914. ),
  3915. ),
  3916. );
  3917. return $description;
  3918. }
  3919. /**
  3920. * Implements hook_chado_schema_v1_11_expression_pub()
  3921. * Purpose: To describe the structure of 'expression_pub' to tripal
  3922. * @see tripal_core_chado_insert()
  3923. * @see tripal_core_chado_update()
  3924. * @see tripal_core_chado_select()
  3925. *
  3926. * @return
  3927. * An array describing the 'expression_pub' table
  3928. *
  3929. * @ingroup tripal_chado_v1.11_schema_api
  3930. *
  3931. */
  3932. function tripal_core_chado_schema_v1_11_expression_pub() {
  3933. $description = array(
  3934. 'table' => 'expression_pub',
  3935. 'fields' => array(
  3936. 'expression_pub_id' => array(
  3937. 'type' => 'serial',
  3938. 'not NULL' => '1',
  3939. ),
  3940. 'expression_id' => array(
  3941. 'type' => 'int',
  3942. 'not NULL' => '1',
  3943. ),
  3944. 'pub_id' => array(
  3945. 'type' => 'int',
  3946. 'not NULL' => '1',
  3947. ),
  3948. ),
  3949. 'primary key' => array(
  3950. 0 => 'expression_pub_id',
  3951. ),
  3952. 'unique keys' => array(
  3953. 'expression_pub_c1' => array(
  3954. 0 => 'expression_id',
  3955. 1 => 'pub_id',
  3956. ),
  3957. ),
  3958. 'indexes' => array(
  3959. 'expression_pub_idx1' => array(
  3960. 0 => 'expression_id',
  3961. ),
  3962. 'expression_pub_idx2' => array(
  3963. 0 => 'pub_id',
  3964. ),
  3965. ),
  3966. 'foreign keys' => array(
  3967. 'pub' => array(
  3968. 'table' => 'pub',
  3969. 'columns' => array(
  3970. 'pub_id' => 'pub_id',
  3971. ),
  3972. ),
  3973. 'expression' => array(
  3974. 'table' => 'expression',
  3975. 'columns' => array(
  3976. 'expression_id' => 'expression_id',
  3977. ),
  3978. ),
  3979. ),
  3980. );
  3981. return $description;
  3982. }
  3983. /**
  3984. * Implements hook_chado_schema_v1_11_expressionprop()
  3985. * Purpose: To describe the structure of 'expressionprop' to tripal
  3986. * @see tripal_core_chado_insert()
  3987. * @see tripal_core_chado_update()
  3988. * @see tripal_core_chado_select()
  3989. *
  3990. * @return
  3991. * An array describing the 'expressionprop' table
  3992. *
  3993. * @ingroup tripal_chado_v1.11_schema_api
  3994. *
  3995. */
  3996. function tripal_core_chado_schema_v1_11_expressionprop() {
  3997. $description = array(
  3998. 'table' => 'expressionprop',
  3999. 'fields' => array(
  4000. 'expressionprop_id' => array(
  4001. 'type' => 'serial',
  4002. 'not NULL' => '1',
  4003. ),
  4004. 'expression_id' => array(
  4005. 'type' => 'int',
  4006. 'not NULL' => '1',
  4007. ),
  4008. 'type_id' => array(
  4009. 'type' => 'int',
  4010. 'not NULL' => '1',
  4011. ),
  4012. 'value' => array(
  4013. 'type' => 'text',
  4014. 'not NULL' => '',
  4015. ),
  4016. 'rank' => array(
  4017. 'type' => 'int',
  4018. 'not NULL' => '1',
  4019. 'default' => '0',
  4020. ),
  4021. ),
  4022. 'primary key' => array(
  4023. 0 => 'expressionprop_id',
  4024. ),
  4025. 'unique keys' => array(
  4026. 'expressionprop_c1' => array(
  4027. 0 => 'expression_id',
  4028. 1 => 'type_id',
  4029. 2 => 'rank',
  4030. ),
  4031. ),
  4032. 'indexes' => array(
  4033. 'expressionprop_idx1' => array(
  4034. 0 => 'expression_id',
  4035. ),
  4036. 'expressionprop_idx2' => array(
  4037. 0 => 'type_id',
  4038. ),
  4039. ),
  4040. 'foreign keys' => array(
  4041. 'cvterm' => array(
  4042. 'table' => 'cvterm',
  4043. 'columns' => array(
  4044. 'type_id' => 'cvterm_id',
  4045. ),
  4046. ),
  4047. 'expression' => array(
  4048. 'table' => 'expression',
  4049. 'columns' => array(
  4050. 'expression_id' => 'expression_id',
  4051. ),
  4052. ),
  4053. ),
  4054. );
  4055. return $description;
  4056. }
  4057. /**
  4058. * Implements hook_chado_schema_v1_11_feature()
  4059. * Purpose: To describe the structure of 'feature' to tripal
  4060. * @see tripal_core_chado_insert()
  4061. * @see tripal_core_chado_update()
  4062. * @see tripal_core_chado_select()
  4063. *
  4064. * @return
  4065. * An array describing the 'feature' table
  4066. *
  4067. * @ingroup tripal_chado_v1.11_schema_api
  4068. *
  4069. */
  4070. function tripal_core_chado_schema_v1_11_feature() {
  4071. $description = array(
  4072. 'table' => 'feature',
  4073. 'fields' => array(
  4074. 'feature_id' => array(
  4075. 'type' => 'serial',
  4076. 'not NULL' => '1',
  4077. ),
  4078. 'dbxref_id' => array(
  4079. 'type' => 'int',
  4080. 'not NULL' => '',
  4081. ),
  4082. 'organism_id' => array(
  4083. 'type' => 'int',
  4084. 'not NULL' => '1',
  4085. ),
  4086. 'name' => array(
  4087. 'type' => 'varchar',
  4088. 'length' => '255',
  4089. 'not NULL' => '',
  4090. ),
  4091. 'uniquename' => array(
  4092. 'type' => 'text',
  4093. 'not NULL' => '1',
  4094. ),
  4095. 'residues' => array(
  4096. 'type' => 'text',
  4097. 'not NULL' => '',
  4098. ),
  4099. 'seqlen' => array(
  4100. 'type' => 'int',
  4101. 'not NULL' => '',
  4102. ),
  4103. 'md5checksum' => array(
  4104. 'type' => 'char',
  4105. 'length' => '32',
  4106. 'not NULL' => '',
  4107. ),
  4108. 'type_id' => array(
  4109. 'type' => 'int',
  4110. 'not NULL' => '1',
  4111. ),
  4112. 'is_analysis' => array(
  4113. 'type' => 'boolean',
  4114. 'not NULL' => '1',
  4115. 'default' => 'als',
  4116. ),
  4117. 'is_obsolete' => array(
  4118. 'type' => 'boolean',
  4119. 'not NULL' => '1',
  4120. 'default' => 'als',
  4121. ),
  4122. 'timeaccessioned' => array(
  4123. 'type' => 'datetime',
  4124. 'not NULL' => '1',
  4125. 'default' => 'ow(',
  4126. ),
  4127. 'timelastmodified' => array(
  4128. 'type' => 'datetime',
  4129. 'not NULL' => '1',
  4130. 'default' => 'ow(',
  4131. ),
  4132. ),
  4133. 'primary key' => array(
  4134. 0 => 'feature_id',
  4135. ),
  4136. 'unique keys' => array(
  4137. 'feature_c1' => array(
  4138. 0 => 'organism_id',
  4139. 1 => 'uniquename',
  4140. 2 => 'type_id',
  4141. ),
  4142. ),
  4143. 'indexes' => array(
  4144. 'feature_idx1' => array(
  4145. 0 => 'dbxref_id',
  4146. ),
  4147. 'feature_idx2' => array(
  4148. 0 => 'organism_id',
  4149. ),
  4150. 'feature_idx3' => array(
  4151. 0 => 'type_id',
  4152. ),
  4153. 'feature_idx4' => array(
  4154. 0 => 'uniquename',
  4155. ),
  4156. 'feature_name_ind1' => array(
  4157. 0 => 'name',
  4158. ),
  4159. ),
  4160. 'foreign keys' => array(
  4161. 'organism' => array(
  4162. 'table' => 'organism',
  4163. 'columns' => array(
  4164. 'organism_id' => 'organism_id',
  4165. ),
  4166. ),
  4167. 'dbxref' => array(
  4168. 'table' => 'dbxref',
  4169. 'columns' => array(
  4170. 'dbxref_id' => 'dbxref_id',
  4171. ),
  4172. ),
  4173. 'cvterm' => array(
  4174. 'table' => 'cvterm',
  4175. 'columns' => array(
  4176. 'type_id' => 'cvterm_id',
  4177. ),
  4178. ),
  4179. ),
  4180. 'referring_tables' => array(
  4181. 0 => 'analysisfeature',
  4182. 1 => 'element',
  4183. 2 => 'feature_cvterm',
  4184. 3 => 'feature_dbxref',
  4185. 4 => 'feature_expression',
  4186. 5 => 'feature_genotype',
  4187. 6 => 'feature_phenotype',
  4188. 7 => 'feature_pub',
  4189. 8 => 'feature_relationship',
  4190. 9 => 'feature_synonym',
  4191. 10 => 'featureloc',
  4192. 11 => 'featurepos',
  4193. 12 => 'featureprop',
  4194. 13 => 'featurerange',
  4195. 14 => 'library_feature',
  4196. 15 => 'phylonode',
  4197. 16 => 'wwwuser_feature',
  4198. ),
  4199. );
  4200. return $description;
  4201. }
  4202. /**
  4203. * Implements hook_chado_schema_v1_11_feature_cvterm()
  4204. * Purpose: To describe the structure of 'feature_cvterm' to tripal
  4205. * @see tripal_core_chado_insert()
  4206. * @see tripal_core_chado_update()
  4207. * @see tripal_core_chado_select()
  4208. *
  4209. * @return
  4210. * An array describing the 'feature_cvterm' table
  4211. *
  4212. * @ingroup tripal_chado_v1.11_schema_api
  4213. *
  4214. */
  4215. function tripal_core_chado_schema_v1_11_feature_cvterm() {
  4216. $description = array(
  4217. 'table' => 'feature_cvterm',
  4218. 'fields' => array(
  4219. 'feature_cvterm_id' => array(
  4220. 'type' => 'serial',
  4221. 'not NULL' => '1',
  4222. ),
  4223. 'feature_id' => array(
  4224. 'type' => 'int',
  4225. 'not NULL' => '1',
  4226. ),
  4227. 'cvterm_id' => array(
  4228. 'type' => 'int',
  4229. 'not NULL' => '1',
  4230. ),
  4231. 'pub_id' => array(
  4232. 'type' => 'int',
  4233. 'not NULL' => '1',
  4234. ),
  4235. 'is_not' => array(
  4236. 'type' => 'boolean',
  4237. 'not NULL' => '1',
  4238. 'default' => 'als',
  4239. ),
  4240. 'rank' => array(
  4241. 'type' => 'int',
  4242. 'not NULL' => '1',
  4243. 'default' => '0',
  4244. ),
  4245. ),
  4246. 'primary key' => array(
  4247. 0 => 'feature_cvterm_id',
  4248. ),
  4249. 'unique keys' => array(
  4250. 'feature_cvterm_c1' => array(
  4251. 0 => 'feature_id',
  4252. 1 => 'cvterm_id',
  4253. 2 => 'pub_id',
  4254. 3 => 'rank',
  4255. ),
  4256. ),
  4257. 'indexes' => array(
  4258. 'feature_cvterm_idx1' => array(
  4259. 0 => 'feature_id',
  4260. ),
  4261. 'feature_cvterm_idx2' => array(
  4262. 0 => 'cvterm_id',
  4263. ),
  4264. 'feature_cvterm_idx3' => array(
  4265. 0 => 'pub_id',
  4266. ),
  4267. ),
  4268. 'foreign keys' => array(
  4269. 'feature' => array(
  4270. 'table' => 'feature',
  4271. 'columns' => array(
  4272. 'feature_id' => 'feature_id',
  4273. ),
  4274. ),
  4275. 'cvterm' => array(
  4276. 'table' => 'cvterm',
  4277. 'columns' => array(
  4278. 'cvterm_id' => 'cvterm_id',
  4279. ),
  4280. ),
  4281. 'pub' => array(
  4282. 'table' => 'pub',
  4283. 'columns' => array(
  4284. 'pub_id' => 'pub_id',
  4285. ),
  4286. ),
  4287. ),
  4288. );
  4289. return $description;
  4290. }
  4291. /**
  4292. * Implements hook_chado_schema_v1_11_feature_cvterm_dbxref()
  4293. * Purpose: To describe the structure of 'feature_cvterm_dbxref' to tripal
  4294. * @see tripal_core_chado_insert()
  4295. * @see tripal_core_chado_update()
  4296. * @see tripal_core_chado_select()
  4297. *
  4298. * @return
  4299. * An array describing the 'feature_cvterm_dbxref' table
  4300. *
  4301. * @ingroup tripal_chado_v1.11_schema_api
  4302. *
  4303. */
  4304. function tripal_core_chado_schema_v1_11_feature_cvterm_dbxref() {
  4305. $description = array(
  4306. 'table' => 'feature_cvterm_dbxref',
  4307. 'fields' => array(
  4308. 'feature_cvterm_dbxref_id' => array(
  4309. 'type' => 'serial',
  4310. 'not NULL' => '1',
  4311. ),
  4312. 'feature_cvterm_id' => array(
  4313. 'type' => 'int',
  4314. 'not NULL' => '1',
  4315. ),
  4316. 'dbxref_id' => array(
  4317. 'type' => 'int',
  4318. 'not NULL' => '1',
  4319. ),
  4320. ),
  4321. 'primary key' => array(
  4322. 0 => 'feature_cvterm_dbxref_id',
  4323. ),
  4324. 'unique keys' => array(
  4325. 'feature_cvterm_dbxref_c1' => array(
  4326. 0 => 'feature_cvterm_id',
  4327. 1 => 'dbxref_id',
  4328. ),
  4329. ),
  4330. 'indexes' => array(
  4331. 'feature_cvterm_dbxref_idx1' => array(
  4332. 0 => 'feature_cvterm_id',
  4333. ),
  4334. 'feature_cvterm_dbxref_idx2' => array(
  4335. 0 => 'dbxref_id',
  4336. ),
  4337. ),
  4338. 'foreign keys' => array(
  4339. 'feature_cvterm' => array(
  4340. 'table' => 'feature_cvterm',
  4341. 'columns' => array(
  4342. 'feature_cvterm_id' => 'feature_cvterm_id',
  4343. ),
  4344. ),
  4345. 'dbxref' => array(
  4346. 'table' => 'dbxref',
  4347. 'columns' => array(
  4348. 'dbxref_id' => 'dbxref_id',
  4349. ),
  4350. ),
  4351. ),
  4352. );
  4353. return $description;
  4354. }
  4355. /**
  4356. * Implements hook_chado_schema_v1_11_feature_cvterm_pub()
  4357. * Purpose: To describe the structure of 'feature_cvterm_pub' to tripal
  4358. * @see tripal_core_chado_insert()
  4359. * @see tripal_core_chado_update()
  4360. * @see tripal_core_chado_select()
  4361. *
  4362. * @return
  4363. * An array describing the 'feature_cvterm_pub' table
  4364. *
  4365. * @ingroup tripal_chado_v1.11_schema_api
  4366. *
  4367. */
  4368. function tripal_core_chado_schema_v1_11_feature_cvterm_pub() {
  4369. $description = array(
  4370. 'table' => 'feature_cvterm_pub',
  4371. 'fields' => array(
  4372. 'feature_cvterm_pub_id' => array(
  4373. 'type' => 'serial',
  4374. 'not NULL' => '1',
  4375. ),
  4376. 'feature_cvterm_id' => array(
  4377. 'type' => 'int',
  4378. 'not NULL' => '1',
  4379. ),
  4380. 'pub_id' => array(
  4381. 'type' => 'int',
  4382. 'not NULL' => '1',
  4383. ),
  4384. ),
  4385. 'primary key' => array(
  4386. 0 => 'feature_cvterm_pub_id',
  4387. ),
  4388. 'unique keys' => array(
  4389. 'feature_cvterm_pub_c1' => array(
  4390. 0 => 'feature_cvterm_id',
  4391. 1 => 'pub_id',
  4392. ),
  4393. ),
  4394. 'indexes' => array(
  4395. 'feature_cvterm_pub_idx1' => array(
  4396. 0 => 'feature_cvterm_id',
  4397. ),
  4398. 'feature_cvterm_pub_idx2' => array(
  4399. 0 => 'pub_id',
  4400. ),
  4401. ),
  4402. 'foreign keys' => array(
  4403. 'feature_cvterm' => array(
  4404. 'table' => 'feature_cvterm',
  4405. 'columns' => array(
  4406. 'feature_cvterm_id' => 'feature_cvterm_id',
  4407. ),
  4408. ),
  4409. 'pub' => array(
  4410. 'table' => 'pub',
  4411. 'columns' => array(
  4412. 'pub_id' => 'pub_id',
  4413. ),
  4414. ),
  4415. ),
  4416. );
  4417. return $description;
  4418. }
  4419. /**
  4420. * Implements hook_chado_schema_v1_11_feature_cvtermprop()
  4421. * Purpose: To describe the structure of 'feature_cvtermprop' to tripal
  4422. * @see tripal_core_chado_insert()
  4423. * @see tripal_core_chado_update()
  4424. * @see tripal_core_chado_select()
  4425. *
  4426. * @return
  4427. * An array describing the 'feature_cvtermprop' table
  4428. *
  4429. * @ingroup tripal_chado_v1.11_schema_api
  4430. *
  4431. */
  4432. function tripal_core_chado_schema_v1_11_feature_cvtermprop() {
  4433. $description = array(
  4434. 'table' => 'feature_cvtermprop',
  4435. 'fields' => array(
  4436. 'feature_cvtermprop_id' => array(
  4437. 'type' => 'serial',
  4438. 'not NULL' => '1',
  4439. ),
  4440. 'feature_cvterm_id' => array(
  4441. 'type' => 'int',
  4442. 'not NULL' => '1',
  4443. ),
  4444. 'type_id' => array(
  4445. 'type' => 'int',
  4446. 'not NULL' => '1',
  4447. ),
  4448. 'value' => array(
  4449. 'type' => 'text',
  4450. 'not NULL' => '',
  4451. ),
  4452. 'rank' => array(
  4453. 'type' => 'int',
  4454. 'not NULL' => '1',
  4455. 'default' => '0',
  4456. ),
  4457. ),
  4458. 'primary key' => array(
  4459. 0 => 'feature_cvtermprop_id',
  4460. ),
  4461. 'unique keys' => array(
  4462. 'feature_cvtermprop_c1' => array(
  4463. 0 => 'feature_cvterm_id',
  4464. 1 => 'type_id',
  4465. 2 => 'rank',
  4466. ),
  4467. ),
  4468. 'indexes' => array(
  4469. 'feature_cvtermprop_idx1' => array(
  4470. 0 => 'feature_cvterm_id',
  4471. ),
  4472. 'feature_cvtermprop_idx2' => array(
  4473. 0 => 'type_id',
  4474. ),
  4475. ),
  4476. 'foreign keys' => array(
  4477. 'feature_cvterm' => array(
  4478. 'table' => 'feature_cvterm',
  4479. 'columns' => array(
  4480. 'feature_cvterm_id' => 'feature_cvterm_id',
  4481. ),
  4482. ),
  4483. 'cvterm' => array(
  4484. 'table' => 'cvterm',
  4485. 'columns' => array(
  4486. 'type_id' => 'cvterm_id',
  4487. ),
  4488. ),
  4489. ),
  4490. );
  4491. return $description;
  4492. }
  4493. /**
  4494. * Implements hook_chado_schema_v1_11_feature_dbxref()
  4495. * Purpose: To describe the structure of 'feature_dbxref' to tripal
  4496. * @see tripal_core_chado_insert()
  4497. * @see tripal_core_chado_update()
  4498. * @see tripal_core_chado_select()
  4499. *
  4500. * @return
  4501. * An array describing the 'feature_dbxref' table
  4502. *
  4503. * @ingroup tripal_chado_v1.11_schema_api
  4504. *
  4505. */
  4506. function tripal_core_chado_schema_v1_11_feature_dbxref() {
  4507. $description = array(
  4508. 'table' => 'feature_dbxref',
  4509. 'fields' => array(
  4510. 'feature_dbxref_id' => array(
  4511. 'type' => 'serial',
  4512. 'not NULL' => '1',
  4513. ),
  4514. 'feature_id' => array(
  4515. 'type' => 'int',
  4516. 'not NULL' => '1',
  4517. ),
  4518. 'dbxref_id' => array(
  4519. 'type' => 'int',
  4520. 'not NULL' => '1',
  4521. ),
  4522. 'is_current' => array(
  4523. 'type' => 'boolean',
  4524. 'not NULL' => '1',
  4525. 'default' => 'ru',
  4526. ),
  4527. ),
  4528. 'primary key' => array(
  4529. 0 => 'feature_dbxref_id',
  4530. ),
  4531. 'unique keys' => array(
  4532. 'feature_dbxref_c1' => array(
  4533. 0 => 'feature_id',
  4534. 1 => 'dbxref_id',
  4535. ),
  4536. ),
  4537. 'indexes' => array(
  4538. 'feature_dbxref_idx1' => array(
  4539. 0 => 'feature_id',
  4540. ),
  4541. 'feature_dbxref_idx2' => array(
  4542. 0 => 'dbxref_id',
  4543. ),
  4544. ),
  4545. 'foreign keys' => array(
  4546. 'feature' => array(
  4547. 'table' => 'feature',
  4548. 'columns' => array(
  4549. 'feature_id' => 'feature_id',
  4550. ),
  4551. ),
  4552. 'dbxref' => array(
  4553. 'table' => 'dbxref',
  4554. 'columns' => array(
  4555. 'dbxref_id' => 'dbxref_id',
  4556. ),
  4557. ),
  4558. ),
  4559. );
  4560. return $description;
  4561. }
  4562. /**
  4563. * Implements hook_chado_schema_v1_11_feature_expression()
  4564. * Purpose: To describe the structure of 'feature_expression' to tripal
  4565. * @see tripal_core_chado_insert()
  4566. * @see tripal_core_chado_update()
  4567. * @see tripal_core_chado_select()
  4568. *
  4569. * @return
  4570. * An array describing the 'feature_expression' table
  4571. *
  4572. * @ingroup tripal_chado_v1.11_schema_api
  4573. *
  4574. */
  4575. function tripal_core_chado_schema_v1_11_feature_expression() {
  4576. $description = array(
  4577. 'table' => 'feature_expression',
  4578. 'fields' => array(
  4579. 'feature_expression_id' => array(
  4580. 'type' => 'serial',
  4581. 'not NULL' => '1',
  4582. ),
  4583. 'expression_id' => array(
  4584. 'type' => 'int',
  4585. 'not NULL' => '1',
  4586. ),
  4587. 'feature_id' => array(
  4588. 'type' => 'int',
  4589. 'not NULL' => '1',
  4590. ),
  4591. 'pub_id' => array(
  4592. 'type' => 'int',
  4593. 'not NULL' => '1',
  4594. ),
  4595. ),
  4596. 'primary key' => array(
  4597. 0 => 'feature_expression_id',
  4598. ),
  4599. 'unique keys' => array(
  4600. 'feature_expression_c1' => array(
  4601. 0 => 'expression_id',
  4602. 1 => 'feature_id',
  4603. 2 => 'pub_id',
  4604. ),
  4605. ),
  4606. 'indexes' => array(
  4607. 'feature_expression_idx1' => array(
  4608. 0 => 'expression_id',
  4609. ),
  4610. 'feature_expression_idx2' => array(
  4611. 0 => 'feature_id',
  4612. ),
  4613. 'feature_expression_idx3' => array(
  4614. 0 => 'pub_id',
  4615. ),
  4616. ),
  4617. 'foreign keys' => array(
  4618. 'pub' => array(
  4619. 'table' => 'pub',
  4620. 'columns' => array(
  4621. 'pub_id' => 'pub_id',
  4622. ),
  4623. ),
  4624. 'feature' => array(
  4625. 'table' => 'feature',
  4626. 'columns' => array(
  4627. 'feature_id' => 'feature_id',
  4628. ),
  4629. ),
  4630. 'expression' => array(
  4631. 'table' => 'expression',
  4632. 'columns' => array(
  4633. 'expression_id' => 'expression_id',
  4634. ),
  4635. ),
  4636. ),
  4637. );
  4638. return $description;
  4639. }
  4640. /**
  4641. * Implements hook_chado_schema_v1_11_feature_expressionprop()
  4642. * Purpose: To describe the structure of 'feature_expressionprop' to tripal
  4643. * @see tripal_core_chado_insert()
  4644. * @see tripal_core_chado_update()
  4645. * @see tripal_core_chado_select()
  4646. *
  4647. * @return
  4648. * An array describing the 'feature_expressionprop' table
  4649. *
  4650. * @ingroup tripal_chado_v1.11_schema_api
  4651. *
  4652. */
  4653. function tripal_core_chado_schema_v1_11_feature_expressionprop() {
  4654. $description = array(
  4655. 'table' => 'feature_expressionprop',
  4656. 'fields' => array(
  4657. 'feature_expressionprop_id' => array(
  4658. 'type' => 'serial',
  4659. 'not NULL' => '1',
  4660. ),
  4661. 'feature_expression_id' => array(
  4662. 'type' => 'int',
  4663. 'not NULL' => '1',
  4664. ),
  4665. 'type_id' => array(
  4666. 'type' => 'int',
  4667. 'not NULL' => '1',
  4668. ),
  4669. 'value' => array(
  4670. 'type' => 'text',
  4671. 'not NULL' => '',
  4672. ),
  4673. 'rank' => array(
  4674. 'type' => 'int',
  4675. 'not NULL' => '1',
  4676. 'default' => '0',
  4677. ),
  4678. ),
  4679. 'primary key' => array(
  4680. 0 => 'feature_expressionprop_id',
  4681. ),
  4682. 'unique keys' => array(
  4683. 'feature_expressionprop_c1' => array(
  4684. 0 => 'feature_expression_id',
  4685. 1 => 'type_id',
  4686. 2 => 'rank',
  4687. ),
  4688. ),
  4689. 'indexes' => array(
  4690. 'feature_expressionprop_idx1' => array(
  4691. 0 => 'feature_expression_id',
  4692. ),
  4693. 'feature_expressionprop_idx2' => array(
  4694. 0 => 'type_id',
  4695. ),
  4696. ),
  4697. 'foreign keys' => array(
  4698. 'cvterm' => array(
  4699. 'table' => 'cvterm',
  4700. 'columns' => array(
  4701. 'type_id' => 'cvterm_id',
  4702. ),
  4703. ),
  4704. 'feature_expression' => array(
  4705. 'table' => 'feature_expression',
  4706. 'columns' => array(
  4707. 'feature_expression_id' => 'feature_expression_id',
  4708. ),
  4709. ),
  4710. ),
  4711. );
  4712. return $description;
  4713. }
  4714. /**
  4715. * Implements hook_chado_schema_v1_11_feature_genotype()
  4716. * Purpose: To describe the structure of 'feature_genotype' to tripal
  4717. * @see tripal_core_chado_insert()
  4718. * @see tripal_core_chado_update()
  4719. * @see tripal_core_chado_select()
  4720. *
  4721. * @return
  4722. * An array describing the 'feature_genotype' table
  4723. *
  4724. * @ingroup tripal_chado_v1.11_schema_api
  4725. *
  4726. */
  4727. function tripal_core_chado_schema_v1_11_feature_genotype() {
  4728. $description = array(
  4729. 'table' => 'feature_genotype',
  4730. 'fields' => array(
  4731. 'feature_genotype_id' => array(
  4732. 'type' => 'serial',
  4733. 'not NULL' => '1',
  4734. ),
  4735. 'feature_id' => array(
  4736. 'type' => 'int',
  4737. 'not NULL' => '1',
  4738. ),
  4739. 'genotype_id' => array(
  4740. 'type' => 'int',
  4741. 'not NULL' => '1',
  4742. ),
  4743. 'chromosome_id' => array(
  4744. 'type' => 'int',
  4745. 'not NULL' => '',
  4746. ),
  4747. 'rank' => array(
  4748. 'type' => 'int',
  4749. 'not NULL' => '1',
  4750. ),
  4751. 'cgroup' => array(
  4752. 'type' => 'int',
  4753. 'not NULL' => '1',
  4754. ),
  4755. 'cvterm_id' => array(
  4756. 'type' => 'int',
  4757. 'not NULL' => '1',
  4758. ),
  4759. ),
  4760. 'primary key' => array(
  4761. 0 => 'feature_genotype_id',
  4762. ),
  4763. 'unique keys' => array(
  4764. 'feature_genotype_c1' => array(
  4765. 0 => 'feature_id',
  4766. 1 => 'genotype_id',
  4767. 2 => 'cvterm_id',
  4768. 3 => 'chromosome_id',
  4769. 4 => 'rank',
  4770. 5 => 'cgroup',
  4771. ),
  4772. ),
  4773. 'indexes' => array(
  4774. 'feature_genotype_idx1' => array(
  4775. 0 => 'feature_id',
  4776. ),
  4777. 'feature_genotype_idx2' => array(
  4778. 0 => 'genotype_id',
  4779. ),
  4780. ),
  4781. 'foreign keys' => array(
  4782. 'cvterm' => array(
  4783. 'table' => 'cvterm',
  4784. 'columns' => array(
  4785. 'cvterm_id' => 'cvterm_id',
  4786. ),
  4787. ),
  4788. 'feature' => array(
  4789. 'table' => 'feature',
  4790. 'columns' => array(
  4791. 'feature_id' => 'feature_id',
  4792. 'chromosome_id' => 'feature_id',
  4793. ),
  4794. ),
  4795. 'genotype' => array(
  4796. 'table' => 'genotype',
  4797. 'columns' => array(
  4798. 'genotype_id' => 'genotype_id',
  4799. ),
  4800. ),
  4801. ),
  4802. );
  4803. return $description;
  4804. }
  4805. /**
  4806. * Implements hook_chado_schema_v1_11_feature_phenotype()
  4807. * Purpose: To describe the structure of 'feature_phenotype' to tripal
  4808. * @see tripal_core_chado_insert()
  4809. * @see tripal_core_chado_update()
  4810. * @see tripal_core_chado_select()
  4811. *
  4812. * @return
  4813. * An array describing the 'feature_phenotype' table
  4814. *
  4815. * @ingroup tripal_chado_v1.11_schema_api
  4816. *
  4817. */
  4818. function tripal_core_chado_schema_v1_11_feature_phenotype() {
  4819. $description = array(
  4820. 'table' => 'feature_phenotype',
  4821. 'fields' => array(
  4822. 'feature_phenotype_id' => array(
  4823. 'type' => 'serial',
  4824. 'not NULL' => '1',
  4825. ),
  4826. 'feature_id' => array(
  4827. 'type' => 'int',
  4828. 'not NULL' => '1',
  4829. ),
  4830. 'phenotype_id' => array(
  4831. 'type' => 'int',
  4832. 'not NULL' => '1',
  4833. ),
  4834. ),
  4835. 'primary key' => array(
  4836. 0 => 'feature_phenotype_id',
  4837. ),
  4838. 'unique keys' => array(
  4839. 'feature_phenotype_c1' => array(
  4840. 0 => 'feature_id',
  4841. 1 => 'phenotype_id',
  4842. ),
  4843. ),
  4844. 'indexes' => array(
  4845. 'feature_phenotype_idx1' => array(
  4846. 0 => 'feature_id',
  4847. ),
  4848. 'feature_phenotype_idx2' => array(
  4849. 0 => 'phenotype_id',
  4850. ),
  4851. ),
  4852. 'foreign keys' => array(
  4853. 'feature' => array(
  4854. 'table' => 'feature',
  4855. 'columns' => array(
  4856. 'feature_id' => 'feature_id',
  4857. ),
  4858. ),
  4859. 'phenotype' => array(
  4860. 'table' => 'phenotype',
  4861. 'columns' => array(
  4862. 'phenotype_id' => 'phenotype_id',
  4863. ),
  4864. ),
  4865. ),
  4866. );
  4867. return $description;
  4868. }
  4869. /**
  4870. * Implements hook_chado_schema_v1_11_feature_pub()
  4871. * Purpose: To describe the structure of 'feature_pub' to tripal
  4872. * @see tripal_core_chado_insert()
  4873. * @see tripal_core_chado_update()
  4874. * @see tripal_core_chado_select()
  4875. *
  4876. * @return
  4877. * An array describing the 'feature_pub' table
  4878. *
  4879. * @ingroup tripal_chado_v1.11_schema_api
  4880. *
  4881. */
  4882. function tripal_core_chado_schema_v1_11_feature_pub() {
  4883. $description = array(
  4884. 'table' => 'feature_pub',
  4885. 'fields' => array(
  4886. 'feature_pub_id' => array(
  4887. 'type' => 'serial',
  4888. 'not NULL' => '1',
  4889. ),
  4890. 'feature_id' => array(
  4891. 'type' => 'int',
  4892. 'not NULL' => '1',
  4893. ),
  4894. 'pub_id' => array(
  4895. 'type' => 'int',
  4896. 'not NULL' => '1',
  4897. ),
  4898. ),
  4899. 'primary key' => array(
  4900. 0 => 'feature_pub_id',
  4901. ),
  4902. 'unique keys' => array(
  4903. 'feature_pub_c1' => array(
  4904. 0 => 'feature_id',
  4905. 1 => 'pub_id',
  4906. ),
  4907. ),
  4908. 'indexes' => array(
  4909. 'feature_pub_idx1' => array(
  4910. 0 => 'feature_id',
  4911. ),
  4912. 'feature_pub_idx2' => array(
  4913. 0 => 'pub_id',
  4914. ),
  4915. ),
  4916. 'foreign keys' => array(
  4917. 'pub' => array(
  4918. 'table' => 'pub',
  4919. 'columns' => array(
  4920. 'pub_id' => 'pub_id',
  4921. ),
  4922. ),
  4923. 'feature' => array(
  4924. 'table' => 'feature',
  4925. 'columns' => array(
  4926. 'feature_id' => 'feature_id',
  4927. ),
  4928. ),
  4929. ),
  4930. );
  4931. return $description;
  4932. }
  4933. /**
  4934. * Implements hook_chado_schema_v1_11_feature_pubprop()
  4935. * Purpose: To describe the structure of 'feature_pubprop' to tripal
  4936. * @see tripal_core_chado_insert()
  4937. * @see tripal_core_chado_update()
  4938. * @see tripal_core_chado_select()
  4939. *
  4940. * @return
  4941. * An array describing the 'feature_pubprop' table
  4942. *
  4943. * @ingroup tripal_chado_v1.11_schema_api
  4944. *
  4945. */
  4946. function tripal_core_chado_schema_v1_11_feature_pubprop() {
  4947. $description = array(
  4948. 'table' => 'feature_pubprop',
  4949. 'fields' => array(
  4950. 'feature_pubprop_id' => array(
  4951. 'type' => 'serial',
  4952. 'not NULL' => '1',
  4953. ),
  4954. 'feature_pub_id' => array(
  4955. 'type' => 'int',
  4956. 'not NULL' => '1',
  4957. ),
  4958. 'type_id' => array(
  4959. 'type' => 'int',
  4960. 'not NULL' => '1',
  4961. ),
  4962. 'value' => array(
  4963. 'type' => 'text',
  4964. 'not NULL' => '',
  4965. ),
  4966. 'rank' => array(
  4967. 'type' => 'int',
  4968. 'not NULL' => '1',
  4969. 'default' => '0',
  4970. ),
  4971. ),
  4972. 'primary key' => array(
  4973. 0 => 'feature_pubprop_id',
  4974. ),
  4975. 'unique keys' => array(
  4976. 'feature_pubprop_c1' => array(
  4977. 0 => 'feature_pub_id',
  4978. 1 => 'type_id',
  4979. 2 => 'rank',
  4980. ),
  4981. ),
  4982. 'indexes' => array(
  4983. 'feature_pubprop_idx1' => array(
  4984. 0 => 'feature_pub_id',
  4985. ),
  4986. ),
  4987. 'foreign keys' => array(
  4988. 'cvterm' => array(
  4989. 'table' => 'cvterm',
  4990. 'columns' => array(
  4991. 'type_id' => 'cvterm_id',
  4992. ),
  4993. ),
  4994. 'feature_pub' => array(
  4995. 'table' => 'feature_pub',
  4996. 'columns' => array(
  4997. 'feature_pub_id' => 'feature_pub_id',
  4998. ),
  4999. ),
  5000. ),
  5001. );
  5002. return $description;
  5003. }
  5004. /**
  5005. * Implements hook_chado_schema_v1_11_feature_relationship()
  5006. * Purpose: To describe the structure of 'feature_relationship' to tripal
  5007. * @see tripal_core_chado_insert()
  5008. * @see tripal_core_chado_update()
  5009. * @see tripal_core_chado_select()
  5010. *
  5011. * @return
  5012. * An array describing the 'feature_relationship' table
  5013. *
  5014. * @ingroup tripal_chado_v1.11_schema_api
  5015. *
  5016. */
  5017. function tripal_core_chado_schema_v1_11_feature_relationship() {
  5018. $description = array(
  5019. 'table' => 'feature_relationship',
  5020. 'fields' => array(
  5021. 'feature_relationship_id' => array(
  5022. 'type' => 'serial',
  5023. 'not NULL' => '1',
  5024. ),
  5025. 'subject_id' => array(
  5026. 'type' => 'int',
  5027. 'not NULL' => '1',
  5028. ),
  5029. 'object_id' => array(
  5030. 'type' => 'int',
  5031. 'not NULL' => '1',
  5032. ),
  5033. 'type_id' => array(
  5034. 'type' => 'int',
  5035. 'not NULL' => '1',
  5036. ),
  5037. 'value' => array(
  5038. 'type' => 'text',
  5039. 'not NULL' => '',
  5040. ),
  5041. 'rank' => array(
  5042. 'type' => 'int',
  5043. 'not NULL' => '1',
  5044. 'default' => '0',
  5045. ),
  5046. ),
  5047. 'primary key' => array(
  5048. 0 => 'feature_relationship_id',
  5049. ),
  5050. 'unique keys' => array(
  5051. 'feature_relationship_c1' => array(
  5052. 0 => 'subject_id',
  5053. 1 => 'object_id',
  5054. 2 => 'type_id',
  5055. 3 => 'rank',
  5056. ),
  5057. ),
  5058. 'indexes' => array(
  5059. 'feature_relationship_idx1' => array(
  5060. 0 => 'subject_id',
  5061. ),
  5062. 'feature_relationship_idx2' => array(
  5063. 0 => 'object_id',
  5064. ),
  5065. 'feature_relationship_idx3' => array(
  5066. 0 => 'type_id',
  5067. ),
  5068. ),
  5069. 'foreign keys' => array(
  5070. 'feature' => array(
  5071. 'table' => 'feature',
  5072. 'columns' => array(
  5073. 'object_id' => 'feature_id',
  5074. 'subject_id' => 'feature_id',
  5075. ),
  5076. ),
  5077. 'cvterm' => array(
  5078. 'table' => 'cvterm',
  5079. 'columns' => array(
  5080. 'type_id' => 'cvterm_id',
  5081. ),
  5082. ),
  5083. ),
  5084. );
  5085. return $description;
  5086. }
  5087. /**
  5088. * Implements hook_chado_schema_v1_11_feature_relationship_pub()
  5089. * Purpose: To describe the structure of 'feature_relationship_pub' to tripal
  5090. * @see tripal_core_chado_insert()
  5091. * @see tripal_core_chado_update()
  5092. * @see tripal_core_chado_select()
  5093. *
  5094. * @return
  5095. * An array describing the 'feature_relationship_pub' table
  5096. *
  5097. * @ingroup tripal_chado_v1.11_schema_api
  5098. *
  5099. */
  5100. function tripal_core_chado_schema_v1_11_feature_relationship_pub() {
  5101. $description = array(
  5102. 'table' => 'feature_relationship_pub',
  5103. 'fields' => array(
  5104. 'feature_relationship_pub_id' => array(
  5105. 'type' => 'serial',
  5106. 'not NULL' => '1',
  5107. ),
  5108. 'feature_relationship_id' => array(
  5109. 'type' => 'int',
  5110. 'not NULL' => '1',
  5111. ),
  5112. 'pub_id' => array(
  5113. 'type' => 'int',
  5114. 'not NULL' => '1',
  5115. ),
  5116. ),
  5117. 'primary key' => array(
  5118. 0 => 'feature_relationship_pub_id',
  5119. ),
  5120. 'unique keys' => array(
  5121. 'feature_relationship_pub_c1' => array(
  5122. 0 => 'feature_relationship_id',
  5123. 1 => 'pub_id',
  5124. ),
  5125. ),
  5126. 'indexes' => array(
  5127. 'feature_relationship_pub_idx1' => array(
  5128. 0 => 'feature_relationship_id',
  5129. ),
  5130. 'feature_relationship_pub_idx2' => array(
  5131. 0 => 'pub_id',
  5132. ),
  5133. ),
  5134. 'foreign keys' => array(
  5135. 'pub' => array(
  5136. 'table' => 'pub',
  5137. 'columns' => array(
  5138. 'pub_id' => 'pub_id',
  5139. ),
  5140. ),
  5141. 'feature_relationship' => array(
  5142. 'table' => 'feature_relationship',
  5143. 'columns' => array(
  5144. 'feature_relationship_id' => 'feature_relationship_id',
  5145. ),
  5146. ),
  5147. ),
  5148. );
  5149. return $description;
  5150. }
  5151. /**
  5152. * Implements hook_chado_schema_v1_11_feature_relationshipprop()
  5153. * Purpose: To describe the structure of 'feature_relationshipprop' to tripal
  5154. * @see tripal_core_chado_insert()
  5155. * @see tripal_core_chado_update()
  5156. * @see tripal_core_chado_select()
  5157. *
  5158. * @return
  5159. * An array describing the 'feature_relationshipprop' table
  5160. *
  5161. * @ingroup tripal_chado_v1.11_schema_api
  5162. *
  5163. */
  5164. function tripal_core_chado_schema_v1_11_feature_relationshipprop() {
  5165. $description = array(
  5166. 'table' => 'feature_relationshipprop',
  5167. 'fields' => array(
  5168. 'feature_relationshipprop_id' => array(
  5169. 'type' => 'serial',
  5170. 'not NULL' => '1',
  5171. ),
  5172. 'feature_relationship_id' => array(
  5173. 'type' => 'int',
  5174. 'not NULL' => '1',
  5175. ),
  5176. 'type_id' => array(
  5177. 'type' => 'int',
  5178. 'not NULL' => '1',
  5179. ),
  5180. 'value' => array(
  5181. 'type' => 'text',
  5182. 'not NULL' => '',
  5183. ),
  5184. 'rank' => array(
  5185. 'type' => 'int',
  5186. 'not NULL' => '1',
  5187. 'default' => '0',
  5188. ),
  5189. ),
  5190. 'primary key' => array(
  5191. 0 => 'feature_relationshipprop_id',
  5192. ),
  5193. 'unique keys' => array(
  5194. 'feature_relationshipprop_c1' => array(
  5195. 0 => 'feature_relationship_id',
  5196. 1 => 'type_id',
  5197. 2 => 'rank',
  5198. ),
  5199. ),
  5200. 'indexes' => array(
  5201. 'feature_relationshipprop_idx1' => array(
  5202. 0 => 'feature_relationship_id',
  5203. ),
  5204. 'feature_relationshipprop_idx2' => array(
  5205. 0 => 'type_id',
  5206. ),
  5207. ),
  5208. 'foreign keys' => array(
  5209. 'cvterm' => array(
  5210. 'table' => 'cvterm',
  5211. 'columns' => array(
  5212. 'type_id' => 'cvterm_id',
  5213. ),
  5214. ),
  5215. 'feature_relationship' => array(
  5216. 'table' => 'feature_relationship',
  5217. 'columns' => array(
  5218. 'feature_relationship_id' => 'feature_relationship_id',
  5219. ),
  5220. ),
  5221. ),
  5222. );
  5223. return $description;
  5224. }
  5225. /**
  5226. * Implements hook_chado_schema_v1_11_feature_relationshipprop_pub()
  5227. * Purpose: To describe the structure of 'feature_relationshipprop_pub' to tripal
  5228. * @see tripal_core_chado_insert()
  5229. * @see tripal_core_chado_update()
  5230. * @see tripal_core_chado_select()
  5231. *
  5232. * @return
  5233. * An array describing the 'feature_relationshipprop_pub' table
  5234. *
  5235. * @ingroup tripal_chado_v1.11_schema_api
  5236. *
  5237. */
  5238. function tripal_core_chado_schema_v1_11_feature_relationshipprop_pub() {
  5239. $description = array(
  5240. 'table' => 'feature_relationshipprop_pub',
  5241. 'fields' => array(
  5242. 'feature_relationshipprop_pub_id' => array(
  5243. 'type' => 'serial',
  5244. 'not NULL' => '1',
  5245. ),
  5246. 'feature_relationshipprop_id' => array(
  5247. 'type' => 'int',
  5248. 'not NULL' => '1',
  5249. ),
  5250. 'pub_id' => array(
  5251. 'type' => 'int',
  5252. 'not NULL' => '1',
  5253. ),
  5254. ),
  5255. 'primary key' => array(
  5256. 0 => 'feature_relationshipprop_pub_id',
  5257. ),
  5258. 'unique keys' => array(
  5259. 'feature_relationshipprop_pub_c1' => array(
  5260. 0 => 'feature_relationshipprop_id',
  5261. 1 => 'pub_id',
  5262. ),
  5263. ),
  5264. 'indexes' => array(
  5265. 'feature_relationshipprop_pub_idx1' => array(
  5266. 0 => 'feature_relationshipprop_id',
  5267. ),
  5268. 'feature_relationshipprop_pub_idx2' => array(
  5269. 0 => 'pub_id',
  5270. ),
  5271. ),
  5272. 'foreign keys' => array(
  5273. 'feature_relationshipprop' => array(
  5274. 'table' => 'feature_relationshipprop',
  5275. 'columns' => array(
  5276. 'feature_relationshipprop_id' => 'feature_relationshipprop_id',
  5277. ),
  5278. ),
  5279. 'pub' => array(
  5280. 'table' => 'pub',
  5281. 'columns' => array(
  5282. 'pub_id' => 'pub_id',
  5283. ),
  5284. ),
  5285. ),
  5286. );
  5287. return $description;
  5288. }
  5289. /**
  5290. * Implements hook_chado_schema_v1_11_feature_synonym()
  5291. * Purpose: To describe the structure of 'feature_synonym' to tripal
  5292. * @see tripal_core_chado_insert()
  5293. * @see tripal_core_chado_update()
  5294. * @see tripal_core_chado_select()
  5295. *
  5296. * @return
  5297. * An array describing the 'feature_synonym' table
  5298. *
  5299. * @ingroup tripal_chado_v1.11_schema_api
  5300. *
  5301. */
  5302. function tripal_core_chado_schema_v1_11_feature_synonym() {
  5303. $description = array(
  5304. 'table' => 'feature_synonym',
  5305. 'fields' => array(
  5306. 'feature_synonym_id' => array(
  5307. 'type' => 'serial',
  5308. 'not NULL' => '1',
  5309. ),
  5310. 'synonym_id' => array(
  5311. 'type' => 'int',
  5312. 'not NULL' => '1',
  5313. ),
  5314. 'feature_id' => array(
  5315. 'type' => 'int',
  5316. 'not NULL' => '1',
  5317. ),
  5318. 'pub_id' => array(
  5319. 'type' => 'int',
  5320. 'not NULL' => '1',
  5321. ),
  5322. 'is_current' => array(
  5323. 'type' => 'boolean',
  5324. 'not NULL' => '1',
  5325. 'default' => 'als',
  5326. ),
  5327. 'is_internal' => array(
  5328. 'type' => 'boolean',
  5329. 'not NULL' => '1',
  5330. 'default' => 'als',
  5331. ),
  5332. ),
  5333. 'primary key' => array(
  5334. 0 => 'feature_synonym_id',
  5335. ),
  5336. 'unique keys' => array(
  5337. 'feature_synonym_c1' => array(
  5338. 0 => 'synonym_id',
  5339. 1 => 'feature_id',
  5340. 2 => 'pub_id',
  5341. ),
  5342. ),
  5343. 'indexes' => array(
  5344. 'feature_synonym_idx1' => array(
  5345. 0 => 'synonym_id',
  5346. ),
  5347. 'feature_synonym_idx2' => array(
  5348. 0 => 'feature_id',
  5349. ),
  5350. 'feature_synonym_idx3' => array(
  5351. 0 => 'pub_id',
  5352. ),
  5353. ),
  5354. 'foreign keys' => array(
  5355. 'feature' => array(
  5356. 'table' => 'feature',
  5357. 'columns' => array(
  5358. 'feature_id' => 'feature_id',
  5359. ),
  5360. ),
  5361. 'synonym' => array(
  5362. 'table' => 'synonym',
  5363. 'columns' => array(
  5364. 'synonym_id' => 'synonym_id',
  5365. ),
  5366. ),
  5367. 'pub' => array(
  5368. 'table' => 'pub',
  5369. 'columns' => array(
  5370. 'pub_id' => 'pub_id',
  5371. ),
  5372. ),
  5373. ),
  5374. );
  5375. return $description;
  5376. }
  5377. /**
  5378. * Implements hook_chado_schema_v1_11_featureloc()
  5379. * Purpose: To describe the structure of 'featureloc' to tripal
  5380. * @see tripal_core_chado_insert()
  5381. * @see tripal_core_chado_update()
  5382. * @see tripal_core_chado_select()
  5383. *
  5384. * @return
  5385. * An array describing the 'featureloc' table
  5386. *
  5387. * @ingroup tripal_chado_v1.11_schema_api
  5388. *
  5389. */
  5390. function tripal_core_chado_schema_v1_11_featureloc() {
  5391. $description = array(
  5392. 'table' => 'featureloc',
  5393. 'fields' => array(
  5394. 'featureloc_id' => array(
  5395. 'type' => 'serial',
  5396. 'not NULL' => '1',
  5397. ),
  5398. 'feature_id' => array(
  5399. 'type' => 'int',
  5400. 'not NULL' => '1',
  5401. ),
  5402. 'srcfeature_id' => array(
  5403. 'type' => 'int',
  5404. 'not NULL' => '',
  5405. ),
  5406. 'fmin' => array(
  5407. 'type' => 'int',
  5408. 'not NULL' => '',
  5409. ),
  5410. 'is_fmin_partial' => array(
  5411. 'type' => 'boolean',
  5412. 'not NULL' => '1',
  5413. 'default' => 'als',
  5414. ),
  5415. 'fmax' => array(
  5416. 'type' => 'int',
  5417. 'not NULL' => '',
  5418. ),
  5419. 'is_fmax_partial' => array(
  5420. 'type' => 'boolean',
  5421. 'not NULL' => '1',
  5422. 'default' => 'als',
  5423. ),
  5424. 'strand' => array(
  5425. 'type' => 'int',
  5426. 'size' => 'small',
  5427. 'not NULL' => '',
  5428. ),
  5429. 'phase' => array(
  5430. 'type' => 'int',
  5431. 'not NULL' => '',
  5432. ),
  5433. 'residue_info' => array(
  5434. 'type' => 'text',
  5435. 'not NULL' => '',
  5436. ),
  5437. 'locgroup' => array(
  5438. 'type' => 'int',
  5439. 'not NULL' => '1',
  5440. 'default' => '0',
  5441. ),
  5442. 'rank' => array(
  5443. 'type' => 'int',
  5444. 'not NULL' => '1',
  5445. 'default' => '0',
  5446. ),
  5447. ),
  5448. 'primary key' => array(
  5449. 0 => 'featureloc_id',
  5450. ),
  5451. 'unique keys' => array(
  5452. 'featureloc_c1' => array(
  5453. 0 => 'feature_id',
  5454. 1 => 'locgroup',
  5455. 2 => 'rank',
  5456. ),
  5457. ),
  5458. 'indexes' => array(
  5459. 'binloc_boxrange' => array(
  5460. 0 => 'fmin',
  5461. ),
  5462. 'binloc_boxrange_src' => array(
  5463. 0 => 'srcfeature_id',
  5464. 1 => 'fmin',
  5465. ),
  5466. 'featureloc_idx1' => array(
  5467. 0 => 'feature_id',
  5468. ),
  5469. 'featureloc_idx2' => array(
  5470. 0 => 'srcfeature_id',
  5471. ),
  5472. 'featureloc_idx3' => array(
  5473. 0 => 'srcfeature_id',
  5474. 1 => 'fmin',
  5475. 2 => 'fmax',
  5476. ),
  5477. ),
  5478. 'foreign keys' => array(
  5479. 'feature' => array(
  5480. 'table' => 'feature',
  5481. 'columns' => array(
  5482. 'feature_id' => 'feature_id',
  5483. 'srcfeature_id' => 'feature_id',
  5484. ),
  5485. ),
  5486. ),
  5487. 'referring_tables' => array(
  5488. 0 => 'analysisfeature',
  5489. 1 => 'featureloc_pub',
  5490. ),
  5491. );
  5492. return $description;
  5493. }
  5494. /**
  5495. * Implements hook_chado_schema_v1_11_featureloc_pub()
  5496. * Purpose: To describe the structure of 'featureloc_pub' to tripal
  5497. * @see tripal_core_chado_insert()
  5498. * @see tripal_core_chado_update()
  5499. * @see tripal_core_chado_select()
  5500. *
  5501. * @return
  5502. * An array describing the 'featureloc_pub' table
  5503. *
  5504. * @ingroup tripal_chado_v1.11_schema_api
  5505. *
  5506. */
  5507. function tripal_core_chado_schema_v1_11_featureloc_pub() {
  5508. $description = array(
  5509. 'table' => 'featureloc_pub',
  5510. 'fields' => array(
  5511. 'featureloc_pub_id' => array(
  5512. 'type' => 'serial',
  5513. 'not NULL' => '1',
  5514. ),
  5515. 'featureloc_id' => array(
  5516. 'type' => 'int',
  5517. 'not NULL' => '1',
  5518. ),
  5519. 'pub_id' => array(
  5520. 'type' => 'int',
  5521. 'not NULL' => '1',
  5522. ),
  5523. ),
  5524. 'primary key' => array(
  5525. 0 => 'featureloc_pub_id',
  5526. ),
  5527. 'unique keys' => array(
  5528. 'featureloc_pub_c1' => array(
  5529. 0 => 'featureloc_id',
  5530. 1 => 'pub_id',
  5531. ),
  5532. ),
  5533. 'indexes' => array(
  5534. 'featureloc_pub_idx1' => array(
  5535. 0 => 'featureloc_id',
  5536. ),
  5537. 'featureloc_pub_idx2' => array(
  5538. 0 => 'pub_id',
  5539. ),
  5540. ),
  5541. 'foreign keys' => array(
  5542. 'pub' => array(
  5543. 'table' => 'pub',
  5544. 'columns' => array(
  5545. 'pub_id' => 'pub_id',
  5546. ),
  5547. ),
  5548. 'featureloc' => array(
  5549. 'table' => 'featureloc',
  5550. 'columns' => array(
  5551. 'featureloc_id' => 'featureloc_id',
  5552. ),
  5553. ),
  5554. ),
  5555. );
  5556. return $description;
  5557. }
  5558. /**
  5559. * Implements hook_chado_schema_v1_11_featuremap()
  5560. * Purpose: To describe the structure of 'featuremap' to tripal
  5561. * @see tripal_core_chado_insert()
  5562. * @see tripal_core_chado_update()
  5563. * @see tripal_core_chado_select()
  5564. *
  5565. * @return
  5566. * An array describing the 'featuremap' table
  5567. *
  5568. * @ingroup tripal_chado_v1.11_schema_api
  5569. *
  5570. */
  5571. function tripal_core_chado_schema_v1_11_featuremap() {
  5572. $description = array(
  5573. 'table' => 'featuremap',
  5574. 'fields' => array(
  5575. 'featuremap_id' => array(
  5576. 'type' => 'serial',
  5577. 'not NULL' => '1',
  5578. ),
  5579. 'name' => array(
  5580. 'type' => 'varchar',
  5581. 'length' => '255',
  5582. 'not NULL' => '',
  5583. ),
  5584. 'description' => array(
  5585. 'type' => 'text',
  5586. 'not NULL' => '',
  5587. ),
  5588. 'unittype_id' => array(
  5589. 'type' => 'int',
  5590. 'not NULL' => '',
  5591. ),
  5592. ),
  5593. 'primary key' => array(
  5594. 0 => 'featuremap_id',
  5595. ),
  5596. 'unique keys' => array(
  5597. 'featuremap_c1' => array(
  5598. 0 => 'name',
  5599. ),
  5600. ),
  5601. 'indexes' => array(
  5602. ),
  5603. 'foreign keys' => array(
  5604. 'cvterm' => array(
  5605. 'table' => 'cvterm',
  5606. 'columns' => array(
  5607. 'unittype_id' => 'cvterm_id',
  5608. ),
  5609. ),
  5610. ),
  5611. );
  5612. return $description;
  5613. }
  5614. /**
  5615. * Implements hook_chado_schema_v1_11_featuremap_pub()
  5616. * Purpose: To describe the structure of 'featuremap_pub' to tripal
  5617. * @see tripal_core_chado_insert()
  5618. * @see tripal_core_chado_update()
  5619. * @see tripal_core_chado_select()
  5620. *
  5621. * @return
  5622. * An array describing the 'featuremap_pub' table
  5623. *
  5624. * @ingroup tripal_chado_v1.11_schema_api
  5625. *
  5626. */
  5627. function tripal_core_chado_schema_v1_11_featuremap_pub() {
  5628. $description = array(
  5629. 'table' => 'featuremap_pub',
  5630. 'fields' => array(
  5631. 'featuremap_pub_id' => array(
  5632. 'type' => 'serial',
  5633. 'not NULL' => '1',
  5634. ),
  5635. 'featuremap_id' => array(
  5636. 'type' => 'int',
  5637. 'not NULL' => '1',
  5638. ),
  5639. 'pub_id' => array(
  5640. 'type' => 'int',
  5641. 'not NULL' => '1',
  5642. ),
  5643. ),
  5644. 'primary key' => array(
  5645. 0 => 'featuremap_pub_id',
  5646. ),
  5647. 'unique keys' => array(
  5648. ),
  5649. 'indexes' => array(
  5650. 'featuremap_pub_idx1' => array(
  5651. 0 => 'featuremap_id',
  5652. ),
  5653. 'featuremap_pub_idx2' => array(
  5654. 0 => 'pub_id',
  5655. ),
  5656. ),
  5657. 'foreign keys' => array(
  5658. 'pub' => array(
  5659. 'table' => 'pub',
  5660. 'columns' => array(
  5661. 'pub_id' => 'pub_id',
  5662. ),
  5663. ),
  5664. 'featuremap' => array(
  5665. 'table' => 'featuremap',
  5666. 'columns' => array(
  5667. 'featuremap_id' => 'featuremap_id',
  5668. ),
  5669. ),
  5670. ),
  5671. );
  5672. return $description;
  5673. }
  5674. /**
  5675. * Implements hook_chado_schema_v1_11_featurepos()
  5676. * Purpose: To describe the structure of 'featurepos' to tripal
  5677. * @see tripal_core_chado_insert()
  5678. * @see tripal_core_chado_update()
  5679. * @see tripal_core_chado_select()
  5680. *
  5681. * @return
  5682. * An array describing the 'featurepos' table
  5683. *
  5684. * @ingroup tripal_chado_v1.11_schema_api
  5685. *
  5686. */
  5687. function tripal_core_chado_schema_v1_11_featurepos() {
  5688. $description = array(
  5689. 'table' => 'featurepos',
  5690. 'fields' => array(
  5691. 'featurepos_id' => array(
  5692. 'type' => 'serial',
  5693. 'not NULL' => '1',
  5694. ),
  5695. 'featuremap_id' => array(
  5696. 'type' => 'serial',
  5697. 'not NULL' => '1',
  5698. ),
  5699. 'feature_id' => array(
  5700. 'type' => 'int',
  5701. 'not NULL' => '1',
  5702. ),
  5703. 'map_feature_id' => array(
  5704. 'type' => 'int',
  5705. 'not NULL' => '1',
  5706. ),
  5707. 'mappos' => array(
  5708. 'type' => 'float',
  5709. 'size' => 'big',
  5710. 'not NULL' => '1',
  5711. ),
  5712. ),
  5713. 'primary key' => array(
  5714. 0 => 'featurepos_id',
  5715. ),
  5716. 'unique keys' => array(
  5717. ),
  5718. 'indexes' => array(
  5719. 'featurepos_idx1' => array(
  5720. 0 => 'featuremap_id',
  5721. ),
  5722. 'featurepos_idx2' => array(
  5723. 0 => 'feature_id',
  5724. ),
  5725. 'featurepos_idx3' => array(
  5726. 0 => 'map_feature_id',
  5727. ),
  5728. ),
  5729. 'foreign keys' => array(
  5730. 'feature' => array(
  5731. 'table' => 'feature',
  5732. 'columns' => array(
  5733. 'feature_id' => 'feature_id',
  5734. 'map_feature_id' => 'feature_id',
  5735. ),
  5736. ),
  5737. 'featuremap' => array(
  5738. 'table' => 'featuremap',
  5739. 'columns' => array(
  5740. 'featuremap_id' => 'featuremap_id',
  5741. ),
  5742. ),
  5743. ),
  5744. );
  5745. return $description;
  5746. }
  5747. /**
  5748. * Implements hook_chado_schema_v1_11_featureprop()
  5749. * Purpose: To describe the structure of 'featureprop' to tripal
  5750. * @see tripal_core_chado_insert()
  5751. * @see tripal_core_chado_update()
  5752. * @see tripal_core_chado_select()
  5753. *
  5754. * @return
  5755. * An array describing the 'featureprop' table
  5756. *
  5757. * @ingroup tripal_chado_v1.11_schema_api
  5758. *
  5759. */
  5760. function tripal_core_chado_schema_v1_11_featureprop() {
  5761. $description = array(
  5762. 'table' => 'featureprop',
  5763. 'fields' => array(
  5764. 'featureprop_id' => array(
  5765. 'type' => 'serial',
  5766. 'not NULL' => '1',
  5767. ),
  5768. 'feature_id' => array(
  5769. 'type' => 'int',
  5770. 'not NULL' => '1',
  5771. ),
  5772. 'type_id' => array(
  5773. 'type' => 'int',
  5774. 'not NULL' => '1',
  5775. ),
  5776. 'value' => array(
  5777. 'type' => 'text',
  5778. 'not NULL' => '',
  5779. ),
  5780. 'rank' => array(
  5781. 'type' => 'int',
  5782. 'not NULL' => '1',
  5783. 'default' => '0',
  5784. ),
  5785. ),
  5786. 'primary key' => array(
  5787. 0 => 'featureprop_id',
  5788. ),
  5789. 'unique keys' => array(
  5790. 'featureprop_c1' => array(
  5791. 0 => 'feature_id',
  5792. 1 => 'type_id',
  5793. 2 => 'rank',
  5794. ),
  5795. ),
  5796. 'indexes' => array(
  5797. 'featureprop_idx1' => array(
  5798. 0 => 'feature_id',
  5799. ),
  5800. 'featureprop_idx2' => array(
  5801. 0 => 'type_id',
  5802. ),
  5803. ),
  5804. 'foreign keys' => array(
  5805. 'feature' => array(
  5806. 'table' => 'feature',
  5807. 'columns' => array(
  5808. 'feature_id' => 'feature_id',
  5809. ),
  5810. ),
  5811. 'cvterm' => array(
  5812. 'table' => 'cvterm',
  5813. 'columns' => array(
  5814. 'type_id' => 'cvterm_id',
  5815. ),
  5816. ),
  5817. ),
  5818. 'referring_tables' => array(
  5819. 0 => 'analysisfeature',
  5820. 1 => 'featureprop_pub',
  5821. ),
  5822. );
  5823. return $description;
  5824. }
  5825. /**
  5826. * Implements hook_chado_schema_v1_11_featureprop_pub()
  5827. * Purpose: To describe the structure of 'featureprop_pub' to tripal
  5828. * @see tripal_core_chado_insert()
  5829. * @see tripal_core_chado_update()
  5830. * @see tripal_core_chado_select()
  5831. *
  5832. * @return
  5833. * An array describing the 'featureprop_pub' table
  5834. *
  5835. * @ingroup tripal_chado_v1.11_schema_api
  5836. *
  5837. */
  5838. function tripal_core_chado_schema_v1_11_featureprop_pub() {
  5839. $description = array(
  5840. 'table' => 'featureprop_pub',
  5841. 'fields' => array(
  5842. 'featureprop_pub_id' => array(
  5843. 'type' => 'serial',
  5844. 'not NULL' => '1',
  5845. ),
  5846. 'featureprop_id' => array(
  5847. 'type' => 'int',
  5848. 'not NULL' => '1',
  5849. ),
  5850. 'pub_id' => array(
  5851. 'type' => 'int',
  5852. 'not NULL' => '1',
  5853. ),
  5854. ),
  5855. 'primary key' => array(
  5856. 0 => 'featureprop_pub_id',
  5857. ),
  5858. 'unique keys' => array(
  5859. 'featureprop_pub_c1' => array(
  5860. 0 => 'featureprop_id',
  5861. 1 => 'pub_id',
  5862. ),
  5863. ),
  5864. 'indexes' => array(
  5865. 'featureprop_pub_idx1' => array(
  5866. 0 => 'featureprop_id',
  5867. ),
  5868. 'featureprop_pub_idx2' => array(
  5869. 0 => 'pub_id',
  5870. ),
  5871. ),
  5872. 'foreign keys' => array(
  5873. 'pub' => array(
  5874. 'table' => 'pub',
  5875. 'columns' => array(
  5876. 'pub_id' => 'pub_id',
  5877. ),
  5878. ),
  5879. 'featureprop' => array(
  5880. 'table' => 'featureprop',
  5881. 'columns' => array(
  5882. 'featureprop_id' => 'featureprop_id',
  5883. ),
  5884. ),
  5885. ),
  5886. );
  5887. return $description;
  5888. }
  5889. /**
  5890. * Implements hook_chado_schema_v1_11_featurerange()
  5891. * Purpose: To describe the structure of 'featurerange' to tripal
  5892. * @see tripal_core_chado_insert()
  5893. * @see tripal_core_chado_update()
  5894. * @see tripal_core_chado_select()
  5895. *
  5896. * @return
  5897. * An array describing the 'featurerange' table
  5898. *
  5899. * @ingroup tripal_chado_v1.11_schema_api
  5900. *
  5901. */
  5902. function tripal_core_chado_schema_v1_11_featurerange() {
  5903. $description = array(
  5904. 'table' => 'featurerange',
  5905. 'fields' => array(
  5906. 'featurerange_id' => array(
  5907. 'type' => 'serial',
  5908. 'not NULL' => '1',
  5909. ),
  5910. 'featuremap_id' => array(
  5911. 'type' => 'int',
  5912. 'not NULL' => '1',
  5913. ),
  5914. 'feature_id' => array(
  5915. 'type' => 'int',
  5916. 'not NULL' => '1',
  5917. ),
  5918. 'leftstartf_id' => array(
  5919. 'type' => 'int',
  5920. 'not NULL' => '1',
  5921. ),
  5922. 'leftendf_id' => array(
  5923. 'type' => 'int',
  5924. 'not NULL' => '',
  5925. ),
  5926. 'rightstartf_id' => array(
  5927. 'type' => 'int',
  5928. 'not NULL' => '',
  5929. ),
  5930. 'rightendf_id' => array(
  5931. 'type' => 'int',
  5932. 'not NULL' => '1',
  5933. ),
  5934. 'rangestr' => array(
  5935. 'type' => 'varchar',
  5936. 'length' => '255',
  5937. 'not NULL' => '',
  5938. ),
  5939. ),
  5940. 'primary key' => array(
  5941. 0 => 'featurerange_id',
  5942. ),
  5943. 'unique keys' => array(
  5944. ),
  5945. 'indexes' => array(
  5946. 'featurerange_idx1' => array(
  5947. 0 => 'featuremap_id',
  5948. ),
  5949. 'featurerange_idx2' => array(
  5950. 0 => 'feature_id',
  5951. ),
  5952. 'featurerange_idx3' => array(
  5953. 0 => 'leftstartf_id',
  5954. ),
  5955. 'featurerange_idx4' => array(
  5956. 0 => 'leftendf_id',
  5957. ),
  5958. 'featurerange_idx5' => array(
  5959. 0 => 'rightstartf_id',
  5960. ),
  5961. 'featurerange_idx6' => array(
  5962. 0 => 'rightendf_id',
  5963. ),
  5964. ),
  5965. 'foreign keys' => array(
  5966. 'feature' => array(
  5967. 'table' => 'feature',
  5968. 'columns' => array(
  5969. 'feature_id' => 'feature_id',
  5970. 'leftstartf_id' => 'feature_id',
  5971. 'leftendf_id' => 'feature_id',
  5972. 'rightstartf_id' => 'feature_id',
  5973. 'rightendf_id' => 'feature_id',
  5974. ),
  5975. ),
  5976. 'featuremap' => array(
  5977. 'table' => 'featuremap',
  5978. 'columns' => array(
  5979. 'featuremap_id' => 'featuremap_id',
  5980. ),
  5981. ),
  5982. ),
  5983. );
  5984. return $description;
  5985. }
  5986. /**
  5987. * Implements hook_chado_schema_v1_11_genotype()
  5988. * Purpose: To describe the structure of 'genotype' to tripal
  5989. * @see tripal_core_chado_insert()
  5990. * @see tripal_core_chado_update()
  5991. * @see tripal_core_chado_select()
  5992. *
  5993. * @return
  5994. * An array describing the 'genotype' table
  5995. *
  5996. * @ingroup tripal_chado_v1.11_schema_api
  5997. *
  5998. */
  5999. function tripal_core_chado_schema_v1_11_genotype() {
  6000. $description = array(
  6001. 'table' => 'genotype',
  6002. 'fields' => array(
  6003. 'genotype_id' => array(
  6004. 'type' => 'serial',
  6005. 'not NULL' => '1',
  6006. ),
  6007. 'name' => array(
  6008. 'type' => 'text',
  6009. 'not NULL' => '',
  6010. ),
  6011. 'uniquename' => array(
  6012. 'type' => 'text',
  6013. 'not NULL' => '1',
  6014. ),
  6015. 'description' => array(
  6016. 'type' => 'varchar',
  6017. 'length' => '255',
  6018. 'not NULL' => '',
  6019. ),
  6020. ),
  6021. 'primary key' => array(
  6022. 0 => 'genotype_id',
  6023. ),
  6024. 'unique keys' => array(
  6025. 'genotype_c1' => array(
  6026. 0 => 'uniquename',
  6027. ),
  6028. ),
  6029. 'indexes' => array(
  6030. 'genotype_idx1' => array(
  6031. 0 => 'uniquename',
  6032. ),
  6033. 'genotype_idx2' => array(
  6034. 0 => 'name',
  6035. ),
  6036. ),
  6037. 'foreign keys' => array(
  6038. ),
  6039. );
  6040. return $description;
  6041. }
  6042. /**
  6043. * Implements hook_chado_schema_v1_11_library()
  6044. * Purpose: To describe the structure of 'library' to tripal
  6045. * @see tripal_core_chado_insert()
  6046. * @see tripal_core_chado_update()
  6047. * @see tripal_core_chado_select()
  6048. *
  6049. * @return
  6050. * An array describing the 'library' table
  6051. *
  6052. * @ingroup tripal_chado_v1.11_schema_api
  6053. *
  6054. */
  6055. function tripal_core_chado_schema_v1_11_library() {
  6056. $description = array(
  6057. 'table' => 'library',
  6058. 'referring_tables' => array(
  6059. 0 => 'cell_line_library',
  6060. 1 => 'library_cvterm',
  6061. 2 => 'library_dbxref',
  6062. 3 => 'library_feature',
  6063. 4 => 'library_pub',
  6064. 5 => 'library_synonym',
  6065. 6 => 'libraryprop',
  6066. ),
  6067. 'fields' => array(
  6068. 'library_id' => array(
  6069. 'type' => 'serial',
  6070. 'not NULL' => '1',
  6071. ),
  6072. 'organism_id' => array(
  6073. 'type' => 'int',
  6074. 'not NULL' => '1',
  6075. ),
  6076. 'name' => array(
  6077. 'type' => 'varchar',
  6078. 'length' => '255',
  6079. 'not NULL' => '',
  6080. ),
  6081. 'uniquename' => array(
  6082. 'type' => 'text',
  6083. 'not NULL' => '1',
  6084. ),
  6085. 'type_id' => array(
  6086. 'type' => 'int',
  6087. 'not NULL' => '1',
  6088. ),
  6089. 'is_obsolete' => array(
  6090. 'type' => 'int',
  6091. 'not NULL' => '1',
  6092. 'default' => '0',
  6093. ),
  6094. 'timeaccessioned' => array(
  6095. 'type' => 'datetime',
  6096. 'not NULL' => '1',
  6097. 'default' => 'ow(',
  6098. ),
  6099. 'timelastmodified' => array(
  6100. 'type' => 'datetime',
  6101. 'not NULL' => '1',
  6102. 'default' => 'ow(',
  6103. ),
  6104. ),
  6105. 'primary key' => array(
  6106. 0 => 'library_id',
  6107. ),
  6108. 'unique keys' => array(
  6109. 'library_c1' => array(
  6110. 0 => 'organism_id',
  6111. 1 => 'uniquename',
  6112. 2 => 'type_id',
  6113. ),
  6114. ),
  6115. 'indexes' => array(
  6116. 'library_idx1' => array(
  6117. 0 => 'organism_id',
  6118. ),
  6119. 'library_idx2' => array(
  6120. 0 => 'type_id',
  6121. ),
  6122. 'library_idx3' => array(
  6123. 0 => 'uniquename',
  6124. ),
  6125. 'library_name_ind1' => array(
  6126. 0 => 'name',
  6127. ),
  6128. ),
  6129. 'foreign keys' => array(
  6130. 'cvterm' => array(
  6131. 'table' => 'cvterm',
  6132. 'columns' => array(
  6133. 'type_id' => 'cvterm_id',
  6134. ),
  6135. ),
  6136. 'organism' => array(
  6137. 'table' => 'organism',
  6138. 'columns' => array(
  6139. 'organism_id' => 'organism_id',
  6140. ),
  6141. ),
  6142. ),
  6143. );
  6144. return $description;
  6145. }
  6146. /**
  6147. * Implements hook_chado_schema_v1_11_library_cvterm()
  6148. * Purpose: To describe the structure of 'library_cvterm' to tripal
  6149. * @see tripal_core_chado_insert()
  6150. * @see tripal_core_chado_update()
  6151. * @see tripal_core_chado_select()
  6152. *
  6153. * @return
  6154. * An array describing the 'library_cvterm' table
  6155. *
  6156. * @ingroup tripal_chado_v1.11_schema_api
  6157. *
  6158. */
  6159. function tripal_core_chado_schema_v1_11_library_cvterm() {
  6160. $description = array(
  6161. 'table' => 'library_cvterm',
  6162. 'fields' => array(
  6163. 'library_cvterm_id' => array(
  6164. 'type' => 'serial',
  6165. 'not NULL' => '1',
  6166. ),
  6167. 'library_id' => array(
  6168. 'type' => 'int',
  6169. 'not NULL' => '1',
  6170. ),
  6171. 'cvterm_id' => array(
  6172. 'type' => 'int',
  6173. 'not NULL' => '1',
  6174. ),
  6175. 'pub_id' => array(
  6176. 'type' => 'int',
  6177. 'not NULL' => '1',
  6178. ),
  6179. ),
  6180. 'primary key' => array(
  6181. 0 => 'library_cvterm_id',
  6182. ),
  6183. 'unique keys' => array(
  6184. 'library_cvterm_c1' => array(
  6185. 0 => 'library_id',
  6186. 1 => 'cvterm_id',
  6187. 2 => 'pub_id',
  6188. ),
  6189. ),
  6190. 'indexes' => array(
  6191. 'library_cvterm_idx1' => array(
  6192. 0 => 'library_id',
  6193. ),
  6194. 'library_cvterm_idx2' => array(
  6195. 0 => 'cvterm_id',
  6196. ),
  6197. 'library_cvterm_idx3' => array(
  6198. 0 => 'pub_id',
  6199. ),
  6200. ),
  6201. 'foreign keys' => array(
  6202. 'cvterm' => array(
  6203. 'table' => 'cvterm',
  6204. 'columns' => array(
  6205. 'cvterm_id' => 'cvterm_id',
  6206. ),
  6207. ),
  6208. 'pub' => array(
  6209. 'table' => 'pub',
  6210. 'columns' => array(
  6211. 'pub_id' => 'pub_id',
  6212. ),
  6213. ),
  6214. 'library' => array(
  6215. 'table' => 'library',
  6216. 'columns' => array(
  6217. 'library_id' => 'library_id',
  6218. ),
  6219. ),
  6220. ),
  6221. );
  6222. return $description;
  6223. }
  6224. /**
  6225. * Implements hook_chado_schema_v1_11_library_dbxref()
  6226. * Purpose: To describe the structure of 'library_dbxref' to tripal
  6227. * @see tripal_core_chado_insert()
  6228. * @see tripal_core_chado_update()
  6229. * @see tripal_core_chado_select()
  6230. *
  6231. * @return
  6232. * An array describing the 'library_dbxref' table
  6233. *
  6234. * @ingroup tripal_chado_v1.11_schema_api
  6235. *
  6236. */
  6237. function tripal_core_chado_schema_v1_11_library_dbxref() {
  6238. $description = array(
  6239. 'table' => 'library_dbxref',
  6240. 'fields' => array(
  6241. 'library_dbxref_id' => array(
  6242. 'type' => 'serial',
  6243. 'not NULL' => '1',
  6244. ),
  6245. 'library_id' => array(
  6246. 'type' => 'int',
  6247. 'not NULL' => '1',
  6248. ),
  6249. 'dbxref_id' => array(
  6250. 'type' => 'int',
  6251. 'not NULL' => '1',
  6252. ),
  6253. 'is_current' => array(
  6254. 'type' => 'boolean',
  6255. 'not NULL' => '1',
  6256. 'default' => 'ru',
  6257. ),
  6258. ),
  6259. 'primary key' => array(
  6260. 0 => 'library_dbxref_id',
  6261. ),
  6262. 'unique keys' => array(
  6263. 'library_dbxref_c1' => array(
  6264. 0 => 'library_id',
  6265. 1 => 'dbxref_id',
  6266. ),
  6267. ),
  6268. 'indexes' => array(
  6269. 'library_dbxref_idx1' => array(
  6270. 0 => 'library_id',
  6271. ),
  6272. 'library_dbxref_idx2' => array(
  6273. 0 => 'dbxref_id',
  6274. ),
  6275. ),
  6276. 'foreign keys' => array(
  6277. 'dbxref' => array(
  6278. 'table' => 'dbxref',
  6279. 'columns' => array(
  6280. 'dbxref_id' => 'dbxref_id',
  6281. ),
  6282. ),
  6283. 'library' => array(
  6284. 'table' => 'library',
  6285. 'columns' => array(
  6286. 'library_id' => 'library_id',
  6287. ),
  6288. ),
  6289. ),
  6290. );
  6291. return $description;
  6292. }
  6293. /**
  6294. * Implements hook_chado_schema_v1_11_library_feature()
  6295. * Purpose: To describe the structure of 'library_feature' to tripal
  6296. * @see tripal_core_chado_insert()
  6297. * @see tripal_core_chado_update()
  6298. * @see tripal_core_chado_select()
  6299. *
  6300. * @return
  6301. * An array describing the 'library_feature' table
  6302. *
  6303. * @ingroup tripal_chado_v1.11_schema_api
  6304. *
  6305. */
  6306. function tripal_core_chado_schema_v1_11_library_feature() {
  6307. $description = array(
  6308. 'table' => 'library_feature',
  6309. 'fields' => array(
  6310. 'library_feature_id' => array(
  6311. 'type' => 'serial',
  6312. 'not NULL' => '1',
  6313. ),
  6314. 'library_id' => array(
  6315. 'type' => 'int',
  6316. 'not NULL' => '1',
  6317. ),
  6318. 'feature_id' => array(
  6319. 'type' => 'int',
  6320. 'not NULL' => '1',
  6321. ),
  6322. ),
  6323. 'primary key' => array(
  6324. 0 => 'library_feature_id',
  6325. ),
  6326. 'unique keys' => array(
  6327. 'library_feature_c1' => array(
  6328. 0 => 'library_id',
  6329. 1 => 'feature_id',
  6330. ),
  6331. ),
  6332. 'indexes' => array(
  6333. 'library_feature_idx1' => array(
  6334. 0 => 'library_id',
  6335. ),
  6336. 'library_feature_idx2' => array(
  6337. 0 => 'feature_id',
  6338. ),
  6339. ),
  6340. 'foreign keys' => array(
  6341. 'feature' => array(
  6342. 'table' => 'feature',
  6343. 'columns' => array(
  6344. 'feature_id' => 'feature_id',
  6345. ),
  6346. ),
  6347. 'library' => array(
  6348. 'table' => 'library',
  6349. 'columns' => array(
  6350. 'library_id' => 'library_id',
  6351. ),
  6352. ),
  6353. ),
  6354. );
  6355. return $description;
  6356. }
  6357. /**
  6358. * Implements hook_chado_schema_v1_11_library_pub()
  6359. * Purpose: To describe the structure of 'library_pub' to tripal
  6360. * @see tripal_core_chado_insert()
  6361. * @see tripal_core_chado_update()
  6362. * @see tripal_core_chado_select()
  6363. *
  6364. * @return
  6365. * An array describing the 'library_pub' table
  6366. *
  6367. * @ingroup tripal_chado_v1.11_schema_api
  6368. *
  6369. */
  6370. function tripal_core_chado_schema_v1_11_library_pub() {
  6371. $description = array(
  6372. 'table' => 'library_pub',
  6373. 'fields' => array(
  6374. 'library_pub_id' => array(
  6375. 'type' => 'serial',
  6376. 'not NULL' => '1',
  6377. ),
  6378. 'library_id' => array(
  6379. 'type' => 'int',
  6380. 'not NULL' => '1',
  6381. ),
  6382. 'pub_id' => array(
  6383. 'type' => 'int',
  6384. 'not NULL' => '1',
  6385. ),
  6386. ),
  6387. 'primary key' => array(
  6388. 0 => 'library_pub_id',
  6389. ),
  6390. 'unique keys' => array(
  6391. 'library_pub_c1' => array(
  6392. 0 => 'library_id',
  6393. 1 => 'pub_id',
  6394. ),
  6395. ),
  6396. 'indexes' => array(
  6397. 'library_pub_idx1' => array(
  6398. 0 => 'library_id',
  6399. ),
  6400. 'library_pub_idx2' => array(
  6401. 0 => 'pub_id',
  6402. ),
  6403. ),
  6404. 'foreign keys' => array(
  6405. 'pub' => array(
  6406. 'table' => 'pub',
  6407. 'columns' => array(
  6408. 'pub_id' => 'pub_id',
  6409. ),
  6410. ),
  6411. 'library' => array(
  6412. 'table' => 'library',
  6413. 'columns' => array(
  6414. 'library_id' => 'library_id',
  6415. ),
  6416. ),
  6417. ),
  6418. );
  6419. return $description;
  6420. }
  6421. /**
  6422. * Implements hook_chado_schema_v1_11_library_synonym()
  6423. * Purpose: To describe the structure of 'library_synonym' to tripal
  6424. * @see tripal_core_chado_insert()
  6425. * @see tripal_core_chado_update()
  6426. * @see tripal_core_chado_select()
  6427. *
  6428. * @return
  6429. * An array describing the 'library_synonym' table
  6430. *
  6431. * @ingroup tripal_chado_v1.11_schema_api
  6432. *
  6433. */
  6434. function tripal_core_chado_schema_v1_11_library_synonym() {
  6435. $description = array(
  6436. 'table' => 'library_synonym',
  6437. 'fields' => array(
  6438. 'library_synonym_id' => array(
  6439. 'type' => 'serial',
  6440. 'not NULL' => '1',
  6441. ),
  6442. 'synonym_id' => array(
  6443. 'type' => 'int',
  6444. 'not NULL' => '1',
  6445. ),
  6446. 'library_id' => array(
  6447. 'type' => 'int',
  6448. 'not NULL' => '1',
  6449. ),
  6450. 'pub_id' => array(
  6451. 'type' => 'int',
  6452. 'not NULL' => '1',
  6453. ),
  6454. 'is_current' => array(
  6455. 'type' => 'boolean',
  6456. 'not NULL' => '1',
  6457. 'default' => 'ru',
  6458. ),
  6459. 'is_internal' => array(
  6460. 'type' => 'boolean',
  6461. 'not NULL' => '1',
  6462. 'default' => 'als',
  6463. ),
  6464. ),
  6465. 'primary key' => array(
  6466. 0 => 'library_synonym_id',
  6467. ),
  6468. 'unique keys' => array(
  6469. 'library_synonym_c1' => array(
  6470. 0 => 'synonym_id',
  6471. 1 => 'library_id',
  6472. 2 => 'pub_id',
  6473. ),
  6474. ),
  6475. 'indexes' => array(
  6476. 'library_synonym_idx1' => array(
  6477. 0 => 'synonym_id',
  6478. ),
  6479. 'library_synonym_idx2' => array(
  6480. 0 => 'library_id',
  6481. ),
  6482. 'library_synonym_idx3' => array(
  6483. 0 => 'pub_id',
  6484. ),
  6485. ),
  6486. 'foreign keys' => array(
  6487. 'pub' => array(
  6488. 'table' => 'pub',
  6489. 'columns' => array(
  6490. 'pub_id' => 'pub_id',
  6491. ),
  6492. ),
  6493. 'synonym' => array(
  6494. 'table' => 'synonym',
  6495. 'columns' => array(
  6496. 'synonym_id' => 'synonym_id',
  6497. ),
  6498. ),
  6499. 'library' => array(
  6500. 'table' => 'library',
  6501. 'columns' => array(
  6502. 'library_id' => 'library_id',
  6503. ),
  6504. ),
  6505. ),
  6506. );
  6507. return $description;
  6508. }
  6509. /**
  6510. * Implements hook_chado_schema_v1_11_libraryprop()
  6511. * Purpose: To describe the structure of 'libraryprop' to tripal
  6512. * @see tripal_core_chado_insert()
  6513. * @see tripal_core_chado_update()
  6514. * @see tripal_core_chado_select()
  6515. *
  6516. * @return
  6517. * An array describing the 'libraryprop' table
  6518. *
  6519. * @ingroup tripal_chado_v1.11_schema_api
  6520. *
  6521. */
  6522. function tripal_core_chado_schema_v1_11_libraryprop() {
  6523. $description = array(
  6524. 'table' => 'libraryprop',
  6525. 'fields' => array(
  6526. 'libraryprop_id' => array(
  6527. 'type' => 'serial',
  6528. 'not NULL' => '1',
  6529. ),
  6530. 'library_id' => array(
  6531. 'type' => 'int',
  6532. 'not NULL' => '1',
  6533. ),
  6534. 'type_id' => array(
  6535. 'type' => 'int',
  6536. 'not NULL' => '1',
  6537. ),
  6538. 'value' => array(
  6539. 'type' => 'text',
  6540. 'not NULL' => '',
  6541. ),
  6542. 'rank' => array(
  6543. 'type' => 'int',
  6544. 'not NULL' => '1',
  6545. 'default' => '0',
  6546. ),
  6547. ),
  6548. 'primary key' => array(
  6549. 0 => 'libraryprop_id',
  6550. ),
  6551. 'unique keys' => array(
  6552. 'libraryprop_c1' => array(
  6553. 0 => 'library_id',
  6554. 1 => 'type_id',
  6555. 2 => 'rank',
  6556. ),
  6557. ),
  6558. 'indexes' => array(
  6559. 'libraryprop_idx1' => array(
  6560. 0 => 'library_id',
  6561. ),
  6562. 'libraryprop_idx2' => array(
  6563. 0 => 'type_id',
  6564. ),
  6565. ),
  6566. 'foreign keys' => array(
  6567. 'cvterm' => array(
  6568. 'table' => 'cvterm',
  6569. 'columns' => array(
  6570. 'type_id' => 'cvterm_id',
  6571. ),
  6572. ),
  6573. 'library' => array(
  6574. 'table' => 'library',
  6575. 'columns' => array(
  6576. 'library_id' => 'library_id',
  6577. ),
  6578. ),
  6579. ),
  6580. );
  6581. return $description;
  6582. }
  6583. /**
  6584. * Implements hook_chado_schema_v1_11_libraryprop_pub()
  6585. * Purpose: To describe the structure of 'libraryprop_pub' to tripal
  6586. * @see tripal_core_chado_insert()
  6587. * @see tripal_core_chado_update()
  6588. * @see tripal_core_chado_select()
  6589. *
  6590. * @return
  6591. * An array describing the 'libraryprop_pub' table
  6592. *
  6593. * @ingroup tripal_chado_v1.11_schema_api
  6594. *
  6595. */
  6596. function tripal_core_chado_schema_v1_11_libraryprop_pub() {
  6597. $description = array(
  6598. 'table' => 'libraryprop_pub',
  6599. 'fields' => array(
  6600. 'libraryprop_pub_id' => array(
  6601. 'type' => 'serial',
  6602. 'not NULL' => '1',
  6603. ),
  6604. 'libraryprop_id' => array(
  6605. 'type' => 'int',
  6606. 'not NULL' => '1',
  6607. ),
  6608. 'pub_id' => array(
  6609. 'type' => 'int',
  6610. 'not NULL' => '1',
  6611. ),
  6612. ),
  6613. 'primary key' => array(
  6614. 0 => 'libraryprop_pub_id',
  6615. ),
  6616. 'unique keys' => array(
  6617. 'libraryprop_pub_c1' => array(
  6618. 0 => 'libraryprop_id',
  6619. 1 => 'pub_id',
  6620. ),
  6621. ),
  6622. 'indexes' => array(
  6623. 'libraryprop_pub_idx1' => array(
  6624. 0 => 'libraryprop_id',
  6625. ),
  6626. 'libraryprop_pub_idx2' => array(
  6627. 0 => 'pub_id',
  6628. ),
  6629. ),
  6630. 'foreign keys' => array(
  6631. 'pub' => array(
  6632. 'table' => 'pub',
  6633. 'columns' => array(
  6634. 'pub_id' => 'pub_id',
  6635. ),
  6636. ),
  6637. 'libraryprop' => array(
  6638. 'table' => 'libraryprop',
  6639. 'columns' => array(
  6640. 'libraryprop_id' => 'libraryprop_id',
  6641. ),
  6642. ),
  6643. ),
  6644. );
  6645. return $description;
  6646. }
  6647. /**
  6648. * Implements hook_chado_schema_v1_11_magedocumentation()
  6649. * Purpose: To describe the structure of 'magedocumentation' to tripal
  6650. * @see tripal_core_chado_insert()
  6651. * @see tripal_core_chado_update()
  6652. * @see tripal_core_chado_select()
  6653. *
  6654. * @return
  6655. * An array describing the 'magedocumentation' table
  6656. *
  6657. * @ingroup tripal_chado_v1.11_schema_api
  6658. *
  6659. */
  6660. function tripal_core_chado_schema_v1_11_magedocumentation() {
  6661. $description = array(
  6662. 'table' => 'magedocumentation',
  6663. 'fields' => array(
  6664. 'magedocumentation_id' => array(
  6665. 'type' => 'serial',
  6666. 'not NULL' => '1',
  6667. ),
  6668. 'mageml_id' => array(
  6669. 'type' => 'int',
  6670. 'not NULL' => '1',
  6671. ),
  6672. 'tableinfo_id' => array(
  6673. 'type' => 'int',
  6674. 'not NULL' => '1',
  6675. ),
  6676. 'row_id' => array(
  6677. 'type' => 'int',
  6678. 'not NULL' => '1',
  6679. ),
  6680. 'mageidentifier' => array(
  6681. 'type' => 'text',
  6682. 'not NULL' => '1',
  6683. ),
  6684. ),
  6685. 'primary key' => array(
  6686. 0 => 'magedocumentation_id',
  6687. ),
  6688. 'unique keys' => array(
  6689. ),
  6690. 'indexes' => array(
  6691. 'magedocumentation_idx1' => array(
  6692. 0 => 'mageml_id',
  6693. ),
  6694. 'magedocumentation_idx2' => array(
  6695. 0 => 'tableinfo_id',
  6696. ),
  6697. 'magedocumentation_idx3' => array(
  6698. 0 => 'row_id',
  6699. ),
  6700. ),
  6701. 'foreign keys' => array(
  6702. 'tableinfo' => array(
  6703. 'table' => 'tableinfo',
  6704. 'columns' => array(
  6705. 'tableinfo_id' => 'tableinfo_id',
  6706. ),
  6707. ),
  6708. 'mageml' => array(
  6709. 'table' => 'mageml',
  6710. 'columns' => array(
  6711. 'mageml_id' => 'mageml_id',
  6712. ),
  6713. ),
  6714. ),
  6715. );
  6716. return $description;
  6717. }
  6718. /**
  6719. * Implements hook_chado_schema_v1_11_mageml()
  6720. * Purpose: To describe the structure of 'mageml' to tripal
  6721. * @see tripal_core_chado_insert()
  6722. * @see tripal_core_chado_update()
  6723. * @see tripal_core_chado_select()
  6724. *
  6725. * @return
  6726. * An array describing the 'mageml' table
  6727. *
  6728. * @ingroup tripal_chado_v1.11_schema_api
  6729. *
  6730. */
  6731. function tripal_core_chado_schema_v1_11_mageml() {
  6732. $description = array(
  6733. 'table' => 'mageml',
  6734. 'fields' => array(
  6735. 'mageml_id' => array(
  6736. 'type' => 'serial',
  6737. 'not NULL' => '1',
  6738. ),
  6739. 'mage_package' => array(
  6740. 'type' => 'text',
  6741. 'not NULL' => '1',
  6742. ),
  6743. 'mage_ml' => array(
  6744. 'type' => 'text',
  6745. 'not NULL' => '1',
  6746. ),
  6747. ),
  6748. 'primary key' => array(
  6749. 0 => 'mageml_id',
  6750. ),
  6751. 'unique keys' => array(
  6752. ),
  6753. 'indexes' => array(
  6754. ),
  6755. 'foreign keys' => array(
  6756. ),
  6757. );
  6758. return $description;
  6759. }
  6760. /**
  6761. * Implements hook_chado_schema_v1_11_materialized_view()
  6762. * Purpose: To describe the structure of 'materialized_view' to tripal
  6763. * @see tripal_core_chado_insert()
  6764. * @see tripal_core_chado_update()
  6765. * @see tripal_core_chado_select()
  6766. *
  6767. * @return
  6768. * An array describing the 'materialized_view' table
  6769. *
  6770. * @ingroup tripal_chado_v1.11_schema_api
  6771. *
  6772. */
  6773. function tripal_core_chado_schema_v1_11_materialized_view() {
  6774. $description = array(
  6775. 'table' => 'materialized_view',
  6776. 'fields' => array(
  6777. 'materialized_view_id' => array(
  6778. 'type' => 'serial',
  6779. 'not NULL' => '1',
  6780. ),
  6781. 'last_update' => array(
  6782. 'type' => 'datetime',
  6783. 'not NULL' => '',
  6784. ),
  6785. 'refresh_time' => array(
  6786. 'type' => 'int',
  6787. 'not NULL' => '',
  6788. ),
  6789. 'name' => array(
  6790. 'type' => 'varchar',
  6791. 'length' => '64',
  6792. 'not NULL' => '',
  6793. ),
  6794. 'mv_schema' => array(
  6795. 'type' => 'varchar',
  6796. 'length' => '64',
  6797. 'not NULL' => '',
  6798. ),
  6799. 'mv_table' => array(
  6800. 'type' => 'varchar',
  6801. 'length' => '128',
  6802. 'not NULL' => '',
  6803. ),
  6804. 'mv_specs' => array(
  6805. 'type' => 'text',
  6806. 'not NULL' => '',
  6807. ),
  6808. 'indexed' => array(
  6809. 'type' => 'text',
  6810. 'not NULL' => '',
  6811. ),
  6812. 'query' => array(
  6813. 'type' => 'text',
  6814. 'not NULL' => '',
  6815. ),
  6816. 'special_index' => array(
  6817. 'type' => 'text',
  6818. 'not NULL' => '',
  6819. ),
  6820. ),
  6821. 'primary key' => array(
  6822. ),
  6823. 'unique keys' => array(
  6824. 'name' => array(
  6825. 0 => 'name',
  6826. ),
  6827. ),
  6828. 'indexes' => array(
  6829. ),
  6830. 'foreign keys' => array(
  6831. ),
  6832. );
  6833. return $description;
  6834. }
  6835. /**
  6836. * Implements hook_chado_schema_v1_11_organism()
  6837. * Purpose: To describe the structure of 'organism' to tripal
  6838. * @see tripal_core_chado_insert()
  6839. * @see tripal_core_chado_update()
  6840. * @see tripal_core_chado_select()
  6841. *
  6842. * @return
  6843. * An array describing the 'organism' table
  6844. *
  6845. * @ingroup tripal_chado_v1.11_schema_api
  6846. *
  6847. */
  6848. function tripal_core_chado_schema_v1_11_organism() {
  6849. $description = array(
  6850. 'table' => 'organism',
  6851. 'fields' => array(
  6852. 'organism_id' => array(
  6853. 'type' => 'serial',
  6854. 'not NULL' => '1',
  6855. ),
  6856. 'abbreviation' => array(
  6857. 'type' => 'varchar',
  6858. 'length' => '255',
  6859. 'not NULL' => '',
  6860. ),
  6861. 'genus' => array(
  6862. 'type' => 'varchar',
  6863. 'length' => '255',
  6864. 'not NULL' => '1',
  6865. ),
  6866. 'species' => array(
  6867. 'type' => 'varchar',
  6868. 'length' => '255',
  6869. 'not NULL' => '1',
  6870. ),
  6871. 'common_name' => array(
  6872. 'type' => 'varchar',
  6873. 'length' => '255',
  6874. 'not NULL' => '',
  6875. ),
  6876. 'comment' => array(
  6877. 'type' => 'text',
  6878. 'not NULL' => '',
  6879. ),
  6880. ),
  6881. 'primary key' => array(
  6882. 0 => 'organism_id',
  6883. ),
  6884. 'unique keys' => array(
  6885. 'organism_c1' => array(
  6886. 0 => 'genus',
  6887. 1 => 'species',
  6888. ),
  6889. ),
  6890. 'indexes' => array(
  6891. ),
  6892. 'foreign keys' => array(
  6893. ),
  6894. 'referring_tables' => array(
  6895. 0 => 'biomaterial',
  6896. 1 => 'feature',
  6897. 2 => 'library',
  6898. 3 => 'organism_dbxref',
  6899. 4 => 'organismprop',
  6900. 5 => 'phylonode_organism',
  6901. 6 => 'stock',
  6902. 7 => 'wwwuser_organism',
  6903. ),
  6904. );
  6905. return $description;
  6906. }
  6907. /**
  6908. * Implements hook_chado_schema_v1_11_organism_dbxref()
  6909. * Purpose: To describe the structure of 'organism_dbxref' to tripal
  6910. * @see tripal_core_chado_insert()
  6911. * @see tripal_core_chado_update()
  6912. * @see tripal_core_chado_select()
  6913. *
  6914. * @return
  6915. * An array describing the 'organism_dbxref' table
  6916. *
  6917. * @ingroup tripal_chado_v1.11_schema_api
  6918. *
  6919. */
  6920. function tripal_core_chado_schema_v1_11_organism_dbxref() {
  6921. $description = array(
  6922. 'table' => 'organism_dbxref',
  6923. 'fields' => array(
  6924. 'organism_dbxref_id' => array(
  6925. 'type' => 'serial',
  6926. 'not NULL' => '1',
  6927. ),
  6928. 'organism_id' => array(
  6929. 'type' => 'int',
  6930. 'not NULL' => '1',
  6931. ),
  6932. 'dbxref_id' => array(
  6933. 'type' => 'int',
  6934. 'not NULL' => '1',
  6935. ),
  6936. ),
  6937. 'primary key' => array(
  6938. 0 => 'organism_dbxref_id',
  6939. ),
  6940. 'unique keys' => array(
  6941. 'organism_dbxref_c1' => array(
  6942. 0 => 'organism_id',
  6943. 1 => 'dbxref_id',
  6944. ),
  6945. ),
  6946. 'indexes' => array(
  6947. 'organism_dbxref_idx1' => array(
  6948. 0 => 'organism_id',
  6949. ),
  6950. 'organism_dbxref_idx2' => array(
  6951. 0 => 'dbxref_id',
  6952. ),
  6953. ),
  6954. 'foreign keys' => array(
  6955. 'dbxref' => array(
  6956. 'table' => 'dbxref',
  6957. 'columns' => array(
  6958. 'dbxref_id' => 'dbxref_id',
  6959. ),
  6960. ),
  6961. 'organism' => array(
  6962. 'table' => 'organism',
  6963. 'columns' => array(
  6964. 'organism_id' => 'organism_id',
  6965. ),
  6966. ),
  6967. ),
  6968. );
  6969. return $description;
  6970. }
  6971. /**
  6972. * Implements hook_chado_schema_v1_11_organismprop()
  6973. * Purpose: To describe the structure of 'organismprop' to tripal
  6974. * @see tripal_core_chado_insert()
  6975. * @see tripal_core_chado_update()
  6976. * @see tripal_core_chado_select()
  6977. *
  6978. * @return
  6979. * An array describing the 'organismprop' table
  6980. *
  6981. * @ingroup tripal_chado_v1.11_schema_api
  6982. *
  6983. */
  6984. function tripal_core_chado_schema_v1_11_organismprop() {
  6985. $description = array(
  6986. 'table' => 'organismprop',
  6987. 'fields' => array(
  6988. 'organismprop_id' => array(
  6989. 'type' => 'serial',
  6990. 'not NULL' => '1',
  6991. ),
  6992. 'organism_id' => array(
  6993. 'type' => 'int',
  6994. 'not NULL' => '1',
  6995. ),
  6996. 'type_id' => array(
  6997. 'type' => 'int',
  6998. 'not NULL' => '1',
  6999. ),
  7000. 'value' => array(
  7001. 'type' => 'text',
  7002. 'not NULL' => '',
  7003. ),
  7004. 'rank' => array(
  7005. 'type' => 'int',
  7006. 'not NULL' => '1',
  7007. 'default' => '0',
  7008. ),
  7009. ),
  7010. 'primary key' => array(
  7011. 0 => 'organismprop_id',
  7012. ),
  7013. 'unique keys' => array(
  7014. 'organismprop_c1' => array(
  7015. 0 => 'organism_id',
  7016. 1 => 'type_id',
  7017. 2 => 'rank',
  7018. ),
  7019. ),
  7020. 'indexes' => array(
  7021. 'organismprop_idx1' => array(
  7022. 0 => 'organism_id',
  7023. ),
  7024. 'organismprop_idx2' => array(
  7025. 0 => 'type_id',
  7026. ),
  7027. ),
  7028. 'foreign keys' => array(
  7029. 'cvterm' => array(
  7030. 'table' => 'cvterm',
  7031. 'columns' => array(
  7032. 'type_id' => 'cvterm_id',
  7033. ),
  7034. ),
  7035. 'organism' => array(
  7036. 'table' => 'organism',
  7037. 'columns' => array(
  7038. 'organism_id' => 'organism_id',
  7039. ),
  7040. ),
  7041. ),
  7042. );
  7043. return $description;
  7044. }
  7045. /**
  7046. * Implements hook_chado_schema_v1_11_phendesc()
  7047. * Purpose: To describe the structure of 'phendesc' to tripal
  7048. * @see tripal_core_chado_insert()
  7049. * @see tripal_core_chado_update()
  7050. * @see tripal_core_chado_select()
  7051. *
  7052. * @return
  7053. * An array describing the 'phendesc' table
  7054. *
  7055. * @ingroup tripal_chado_v1.11_schema_api
  7056. *
  7057. */
  7058. function tripal_core_chado_schema_v1_11_phendesc() {
  7059. $description = array(
  7060. 'table' => 'phendesc',
  7061. 'fields' => array(
  7062. 'phendesc_id' => array(
  7063. 'type' => 'serial',
  7064. 'not NULL' => '1',
  7065. ),
  7066. 'genotype_id' => array(
  7067. 'type' => 'int',
  7068. 'not NULL' => '1',
  7069. ),
  7070. 'environment_id' => array(
  7071. 'type' => 'int',
  7072. 'not NULL' => '1',
  7073. ),
  7074. 'description' => array(
  7075. 'type' => 'text',
  7076. 'not NULL' => '1',
  7077. ),
  7078. 'type_id' => array(
  7079. 'type' => 'int',
  7080. 'not NULL' => '1',
  7081. ),
  7082. 'pub_id' => array(
  7083. 'type' => 'int',
  7084. 'not NULL' => '1',
  7085. ),
  7086. ),
  7087. 'primary key' => array(
  7088. 0 => 'phendesc_id',
  7089. ),
  7090. 'unique keys' => array(
  7091. 'phendesc_c1' => array(
  7092. 0 => 'genotype_id',
  7093. 1 => 'environment_id',
  7094. 2 => 'type_id',
  7095. 3 => 'pub_id',
  7096. ),
  7097. ),
  7098. 'indexes' => array(
  7099. 'phendesc_idx1' => array(
  7100. 0 => 'genotype_id',
  7101. ),
  7102. 'phendesc_idx2' => array(
  7103. 0 => 'environment_id',
  7104. ),
  7105. 'phendesc_idx3' => array(
  7106. 0 => 'pub_id',
  7107. ),
  7108. ),
  7109. 'foreign keys' => array(
  7110. 'cvterm' => array(
  7111. 'table' => 'cvterm',
  7112. 'columns' => array(
  7113. 'type_id' => 'cvterm_id',
  7114. ),
  7115. ),
  7116. 'pub' => array(
  7117. 'table' => 'pub',
  7118. 'columns' => array(
  7119. 'pub_id' => 'pub_id',
  7120. ),
  7121. ),
  7122. 'genotype' => array(
  7123. 'table' => 'genotype',
  7124. 'columns' => array(
  7125. 'genotype_id' => 'genotype_id',
  7126. ),
  7127. ),
  7128. 'environment' => array(
  7129. 'table' => 'environment',
  7130. 'columns' => array(
  7131. 'environment_id' => 'environment_id',
  7132. ),
  7133. ),
  7134. ),
  7135. );
  7136. return $description;
  7137. }
  7138. /**
  7139. * Implements hook_chado_schema_v1_11_phenotype()
  7140. * Purpose: To describe the structure of 'phenotype' to tripal
  7141. * @see tripal_core_chado_insert()
  7142. * @see tripal_core_chado_update()
  7143. * @see tripal_core_chado_select()
  7144. *
  7145. * @return
  7146. * An array describing the 'phenotype' table
  7147. *
  7148. * @ingroup tripal_chado_v1.11_schema_api
  7149. *
  7150. */
  7151. function tripal_core_chado_schema_v1_11_phenotype() {
  7152. $description = array(
  7153. 'table' => 'phenotype',
  7154. 'fields' => array(
  7155. 'phenotype_id' => array(
  7156. 'type' => 'serial',
  7157. 'not NULL' => '1',
  7158. ),
  7159. 'uniquename' => array(
  7160. 'type' => 'text',
  7161. 'not NULL' => '1',
  7162. ),
  7163. 'observable_id' => array(
  7164. 'type' => 'int',
  7165. 'not NULL' => '',
  7166. ),
  7167. 'attr_id' => array(
  7168. 'type' => 'int',
  7169. 'not NULL' => '',
  7170. ),
  7171. 'value' => array(
  7172. 'type' => 'text',
  7173. 'not NULL' => '',
  7174. ),
  7175. 'cvalue_id' => array(
  7176. 'type' => 'int',
  7177. 'not NULL' => '',
  7178. ),
  7179. 'assay_id' => array(
  7180. 'type' => 'int',
  7181. 'not NULL' => '',
  7182. ),
  7183. ),
  7184. 'primary key' => array(
  7185. 0 => 'phenotype_id',
  7186. ),
  7187. 'unique keys' => array(
  7188. 'phenotype_c1' => array(
  7189. 0 => 'uniquename',
  7190. ),
  7191. ),
  7192. 'indexes' => array(
  7193. 'phenotype_idx1' => array(
  7194. 0 => 'cvalue_id',
  7195. ),
  7196. 'phenotype_idx2' => array(
  7197. 0 => 'observable_id',
  7198. ),
  7199. 'phenotype_idx3' => array(
  7200. 0 => 'attr_id',
  7201. ),
  7202. ),
  7203. 'foreign keys' => array(
  7204. 'cvterm' => array(
  7205. 'table' => 'cvterm',
  7206. 'columns' => array(
  7207. 'observable_id' => 'cvterm_id',
  7208. 'attr_id' => 'cvterm_id',
  7209. 'cvalue_id' => 'cvterm_id',
  7210. 'assay_id' => 'cvterm_id',
  7211. ),
  7212. ),
  7213. ),
  7214. );
  7215. return $description;
  7216. }
  7217. /**
  7218. * Implements hook_chado_schema_v1_11_phenotype_comparison()
  7219. * Purpose: To describe the structure of 'phenotype_comparison' to tripal
  7220. * @see tripal_core_chado_insert()
  7221. * @see tripal_core_chado_update()
  7222. * @see tripal_core_chado_select()
  7223. *
  7224. * @return
  7225. * An array describing the 'phenotype_comparison' table
  7226. *
  7227. * @ingroup tripal_chado_v1.11_schema_api
  7228. *
  7229. */
  7230. function tripal_core_chado_schema_v1_11_phenotype_comparison() {
  7231. $description = array(
  7232. 'table' => 'phenotype_comparison',
  7233. 'fields' => array(
  7234. 'phenotype_comparison_id' => array(
  7235. 'type' => 'serial',
  7236. 'not NULL' => '1',
  7237. ),
  7238. 'genotype1_id' => array(
  7239. 'type' => 'int',
  7240. 'not NULL' => '1',
  7241. ),
  7242. 'environment1_id' => array(
  7243. 'type' => 'int',
  7244. 'not NULL' => '1',
  7245. ),
  7246. 'genotype2_id' => array(
  7247. 'type' => 'int',
  7248. 'not NULL' => '1',
  7249. ),
  7250. 'environment2_id' => array(
  7251. 'type' => 'int',
  7252. 'not NULL' => '1',
  7253. ),
  7254. 'phenotype1_id' => array(
  7255. 'type' => 'int',
  7256. 'not NULL' => '1',
  7257. ),
  7258. 'phenotype2_id' => array(
  7259. 'type' => 'int',
  7260. 'not NULL' => '',
  7261. ),
  7262. 'pub_id' => array(
  7263. 'type' => 'int',
  7264. 'not NULL' => '1',
  7265. ),
  7266. 'organism_id' => array(
  7267. 'type' => 'int',
  7268. 'not NULL' => '1',
  7269. ),
  7270. ),
  7271. 'primary key' => array(
  7272. 0 => 'phenotype_comparison_id',
  7273. ),
  7274. 'unique keys' => array(
  7275. 'phenotype_comparison_c1' => array(
  7276. 0 => 'genotype1_id',
  7277. 1 => 'environment1_id',
  7278. 2 => 'genotype2_id',
  7279. 3 => 'environment2_id',
  7280. 4 => 'phenotype1_id',
  7281. 5 => 'pub_id',
  7282. ),
  7283. ),
  7284. 'indexes' => array(
  7285. 'phenotype_comparison_idx1' => array(
  7286. 0 => 'genotype1_id',
  7287. ),
  7288. 'phenotype_comparison_idx2' => array(
  7289. 0 => 'genotype2_id',
  7290. ),
  7291. 'phenotype_comparison_idx4' => array(
  7292. 0 => 'pub_id',
  7293. ),
  7294. ),
  7295. 'foreign keys' => array(
  7296. 'pub' => array(
  7297. 'table' => 'pub',
  7298. 'columns' => array(
  7299. 'pub_id' => 'pub_id',
  7300. ),
  7301. ),
  7302. 'organism' => array(
  7303. 'table' => 'organism',
  7304. 'columns' => array(
  7305. 'organism_id' => 'organism_id',
  7306. ),
  7307. ),
  7308. 'phenotype' => array(
  7309. 'table' => 'phenotype',
  7310. 'columns' => array(
  7311. 'phenotype1_id' => 'phenotype_id',
  7312. 'phenotype2_id' => 'phenotype_id',
  7313. ),
  7314. ),
  7315. 'genotype' => array(
  7316. 'table' => 'genotype',
  7317. 'columns' => array(
  7318. 'genotype1_id' => 'genotype_id',
  7319. 'genotype2_id' => 'genotype_id',
  7320. ),
  7321. ),
  7322. 'environment' => array(
  7323. 'table' => 'environment',
  7324. 'columns' => array(
  7325. 'environment1_id' => 'environment_id',
  7326. 'environment2_id' => 'environment_id',
  7327. ),
  7328. ),
  7329. ),
  7330. );
  7331. return $description;
  7332. }
  7333. /**
  7334. * Implements hook_chado_schema_v1_11_phenotype_comparison_cvterm()
  7335. * Purpose: To describe the structure of 'phenotype_comparison_cvterm' to tripal
  7336. * @see tripal_core_chado_insert()
  7337. * @see tripal_core_chado_update()
  7338. * @see tripal_core_chado_select()
  7339. *
  7340. * @return
  7341. * An array describing the 'phenotype_comparison_cvterm' table
  7342. *
  7343. * @ingroup tripal_chado_v1.11_schema_api
  7344. *
  7345. */
  7346. function tripal_core_chado_schema_v1_11_phenotype_comparison_cvterm() {
  7347. $description = array(
  7348. 'table' => 'phenotype_comparison_cvterm',
  7349. 'fields' => array(
  7350. 'phenotype_comparison_cvterm_id' => array(
  7351. 'type' => 'serial',
  7352. 'not NULL' => '1',
  7353. ),
  7354. 'phenotype_comparison_id' => array(
  7355. 'type' => 'int',
  7356. 'not NULL' => '1',
  7357. ),
  7358. 'cvterm_id' => array(
  7359. 'type' => 'int',
  7360. 'not NULL' => '1',
  7361. ),
  7362. 'pub_id' => array(
  7363. 'type' => 'int',
  7364. 'not NULL' => '1',
  7365. ),
  7366. 'rank' => array(
  7367. 'type' => 'int',
  7368. 'not NULL' => '1',
  7369. 'default' => '0',
  7370. ),
  7371. ),
  7372. 'primary key' => array(
  7373. 0 => 'phenotype_comparison_cvterm_id',
  7374. ),
  7375. 'unique keys' => array(
  7376. 'phenotype_comparison_cvterm_c1' => array(
  7377. 0 => 'phenotype_comparison_id',
  7378. 1 => 'cvterm_id',
  7379. ),
  7380. ),
  7381. 'indexes' => array(
  7382. 'phenotype_comparison_cvterm_idx1' => array(
  7383. 0 => 'phenotype_comparison_id',
  7384. ),
  7385. 'phenotype_comparison_cvterm_idx2' => array(
  7386. 0 => 'cvterm_id',
  7387. ),
  7388. ),
  7389. 'foreign keys' => array(
  7390. 'cvterm' => array(
  7391. 'table' => 'cvterm',
  7392. 'columns' => array(
  7393. 'cvterm_id' => 'cvterm_id',
  7394. ),
  7395. ),
  7396. 'pub' => array(
  7397. 'table' => 'pub',
  7398. 'columns' => array(
  7399. 'pub_id' => 'pub_id',
  7400. ),
  7401. ),
  7402. 'phenotype_comparison' => array(
  7403. 'table' => 'phenotype_comparison',
  7404. 'columns' => array(
  7405. 'phenotype_comparison_id' => 'phenotype_comparison_id',
  7406. ),
  7407. ),
  7408. ),
  7409. );
  7410. return $description;
  7411. }
  7412. /**
  7413. * Implements hook_chado_schema_v1_11_phenotype_cvterm()
  7414. * Purpose: To describe the structure of 'phenotype_cvterm' to tripal
  7415. * @see tripal_core_chado_insert()
  7416. * @see tripal_core_chado_update()
  7417. * @see tripal_core_chado_select()
  7418. *
  7419. * @return
  7420. * An array describing the 'phenotype_cvterm' table
  7421. *
  7422. * @ingroup tripal_chado_v1.11_schema_api
  7423. *
  7424. */
  7425. function tripal_core_chado_schema_v1_11_phenotype_cvterm() {
  7426. $description = array(
  7427. 'table' => 'phenotype_cvterm',
  7428. 'fields' => array(
  7429. 'phenotype_cvterm_id' => array(
  7430. 'type' => 'serial',
  7431. 'not NULL' => '1',
  7432. ),
  7433. 'phenotype_id' => array(
  7434. 'type' => 'int',
  7435. 'not NULL' => '1',
  7436. ),
  7437. 'cvterm_id' => array(
  7438. 'type' => 'int',
  7439. 'not NULL' => '1',
  7440. ),
  7441. 'rank' => array(
  7442. 'type' => 'int',
  7443. 'not NULL' => '1',
  7444. 'default' => '0',
  7445. ),
  7446. ),
  7447. 'primary key' => array(
  7448. 0 => 'phenotype_cvterm_id',
  7449. ),
  7450. 'unique keys' => array(
  7451. 'phenotype_cvterm_c1' => array(
  7452. 0 => 'phenotype_id',
  7453. 1 => 'cvterm_id',
  7454. 2 => 'rank',
  7455. ),
  7456. ),
  7457. 'indexes' => array(
  7458. 'phenotype_cvterm_idx1' => array(
  7459. 0 => 'phenotype_id',
  7460. ),
  7461. 'phenotype_cvterm_idx2' => array(
  7462. 0 => 'cvterm_id',
  7463. ),
  7464. ),
  7465. 'foreign keys' => array(
  7466. 'cvterm' => array(
  7467. 'table' => 'cvterm',
  7468. 'columns' => array(
  7469. 'cvterm_id' => 'cvterm_id',
  7470. ),
  7471. ),
  7472. 'phenotype' => array(
  7473. 'table' => 'phenotype',
  7474. 'columns' => array(
  7475. 'phenotype_id' => 'phenotype_id',
  7476. ),
  7477. ),
  7478. ),
  7479. );
  7480. return $description;
  7481. }
  7482. /**
  7483. * Implements hook_chado_schema_v1_11_phenstatement()
  7484. * Purpose: To describe the structure of 'phenstatement' to tripal
  7485. * @see tripal_core_chado_insert()
  7486. * @see tripal_core_chado_update()
  7487. * @see tripal_core_chado_select()
  7488. *
  7489. * @return
  7490. * An array describing the 'phenstatement' table
  7491. *
  7492. * @ingroup tripal_chado_v1.11_schema_api
  7493. *
  7494. */
  7495. function tripal_core_chado_schema_v1_11_phenstatement() {
  7496. $description = array(
  7497. 'table' => 'phenstatement',
  7498. 'fields' => array(
  7499. 'phenstatement_id' => array(
  7500. 'type' => 'serial',
  7501. 'not NULL' => '1',
  7502. ),
  7503. 'genotype_id' => array(
  7504. 'type' => 'int',
  7505. 'not NULL' => '1',
  7506. ),
  7507. 'environment_id' => array(
  7508. 'type' => 'int',
  7509. 'not NULL' => '1',
  7510. ),
  7511. 'phenotype_id' => array(
  7512. 'type' => 'int',
  7513. 'not NULL' => '1',
  7514. ),
  7515. 'type_id' => array(
  7516. 'type' => 'int',
  7517. 'not NULL' => '1',
  7518. ),
  7519. 'pub_id' => array(
  7520. 'type' => 'int',
  7521. 'not NULL' => '1',
  7522. ),
  7523. ),
  7524. 'primary key' => array(
  7525. 0 => 'phenstatement_id',
  7526. ),
  7527. 'unique keys' => array(
  7528. 'phenstatement_c1' => array(
  7529. 0 => 'genotype_id',
  7530. 1 => 'phenotype_id',
  7531. 2 => 'environment_id',
  7532. 3 => 'type_id',
  7533. 4 => 'pub_id',
  7534. ),
  7535. ),
  7536. 'indexes' => array(
  7537. 'phenstatement_idx1' => array(
  7538. 0 => 'genotype_id',
  7539. ),
  7540. 'phenstatement_idx2' => array(
  7541. 0 => 'phenotype_id',
  7542. ),
  7543. ),
  7544. 'foreign keys' => array(
  7545. 'cvterm' => array(
  7546. 'table' => 'cvterm',
  7547. 'columns' => array(
  7548. 'type_id' => 'cvterm_id',
  7549. ),
  7550. ),
  7551. 'pub' => array(
  7552. 'table' => 'pub',
  7553. 'columns' => array(
  7554. 'pub_id' => 'pub_id',
  7555. ),
  7556. ),
  7557. 'phenotype' => array(
  7558. 'table' => 'phenotype',
  7559. 'columns' => array(
  7560. 'phenotype_id' => 'phenotype_id',
  7561. ),
  7562. ),
  7563. 'genotype' => array(
  7564. 'table' => 'genotype',
  7565. 'columns' => array(
  7566. 'genotype_id' => 'genotype_id',
  7567. ),
  7568. ),
  7569. 'environment' => array(
  7570. 'table' => 'environment',
  7571. 'columns' => array(
  7572. 'environment_id' => 'environment_id',
  7573. ),
  7574. ),
  7575. ),
  7576. );
  7577. return $description;
  7578. }
  7579. /**
  7580. * Implements hook_chado_schema_v1_11_phylonode()
  7581. * Purpose: To describe the structure of 'phylonode' to tripal
  7582. * @see tripal_core_chado_insert()
  7583. * @see tripal_core_chado_update()
  7584. * @see tripal_core_chado_select()
  7585. *
  7586. * @return
  7587. * An array describing the 'phylonode' table
  7588. *
  7589. * @ingroup tripal_chado_v1.11_schema_api
  7590. *
  7591. */
  7592. function tripal_core_chado_schema_v1_11_phylonode() {
  7593. $description = array(
  7594. 'table' => 'phylonode',
  7595. 'fields' => array(
  7596. 'phylonode_id' => array(
  7597. 'type' => 'serial',
  7598. 'not NULL' => '1',
  7599. ),
  7600. 'phylotree_id' => array(
  7601. 'type' => 'int',
  7602. 'not NULL' => '1',
  7603. ),
  7604. 'parent_phylonode_id' => array(
  7605. 'type' => 'int',
  7606. 'not NULL' => '',
  7607. ),
  7608. 'left_idx' => array(
  7609. 'type' => 'int',
  7610. 'not NULL' => '1',
  7611. ),
  7612. 'right_idx' => array(
  7613. 'type' => 'int',
  7614. 'not NULL' => '1',
  7615. ),
  7616. 'type_id' => array(
  7617. 'type' => 'int',
  7618. 'not NULL' => '',
  7619. ),
  7620. 'feature_id' => array(
  7621. 'type' => 'int',
  7622. 'not NULL' => '',
  7623. ),
  7624. 'label' => array(
  7625. 'type' => 'varchar',
  7626. 'length' => '255',
  7627. 'not NULL' => '',
  7628. ),
  7629. 'distance' => array(
  7630. 'type' => 'float',
  7631. 'size' => 'big',
  7632. 'not NULL' => '',
  7633. ),
  7634. ),
  7635. 'primary key' => array(
  7636. 0 => 'phylonode_id',
  7637. ),
  7638. 'unique keys' => array(
  7639. 'phylotree_id' => array(
  7640. 0 => 'phylotree_id',
  7641. 1 => 'left_idx',
  7642. ),
  7643. 'phylonode_phylotree_id_key1' => array(
  7644. 0 => 'phylotree_id',
  7645. 1 => 'right_idx',
  7646. ),
  7647. ),
  7648. 'indexes' => array(
  7649. ),
  7650. 'foreign keys' => array(
  7651. 'cvterm' => array(
  7652. 'table' => 'cvterm',
  7653. 'columns' => array(
  7654. 'type_id' => 'cvterm_id',
  7655. ),
  7656. ),
  7657. 'feature' => array(
  7658. 'table' => 'feature',
  7659. 'columns' => array(
  7660. 'feature_id' => 'feature_id',
  7661. ),
  7662. ),
  7663. 'phylotree' => array(
  7664. 'table' => 'phylotree',
  7665. 'columns' => array(
  7666. 'phylotree_id' => 'phylotree_id',
  7667. ),
  7668. ),
  7669. 'phylonode' => array(
  7670. 'table' => 'phylonode',
  7671. 'columns' => array(
  7672. 'parent_phylonode_id' => 'phylonode_id',
  7673. ),
  7674. ),
  7675. ),
  7676. );
  7677. return $description;
  7678. }
  7679. /**
  7680. * Implements hook_chado_schema_v1_11_phylonode_dbxref()
  7681. * Purpose: To describe the structure of 'phylonode_dbxref' to tripal
  7682. * @see tripal_core_chado_insert()
  7683. * @see tripal_core_chado_update()
  7684. * @see tripal_core_chado_select()
  7685. *
  7686. * @return
  7687. * An array describing the 'phylonode_dbxref' table
  7688. *
  7689. * @ingroup tripal_chado_v1.11_schema_api
  7690. *
  7691. */
  7692. function tripal_core_chado_schema_v1_11_phylonode_dbxref() {
  7693. $description = array(
  7694. 'table' => 'phylonode_dbxref',
  7695. 'fields' => array(
  7696. 'phylonode_dbxref_id' => array(
  7697. 'type' => 'serial',
  7698. 'not NULL' => '1',
  7699. ),
  7700. 'phylonode_id' => array(
  7701. 'type' => 'int',
  7702. 'not NULL' => '1',
  7703. ),
  7704. 'dbxref_id' => array(
  7705. 'type' => 'int',
  7706. 'not NULL' => '1',
  7707. ),
  7708. ),
  7709. 'primary key' => array(
  7710. 0 => 'phylonode_dbxref_id',
  7711. ),
  7712. 'unique keys' => array(
  7713. 'phylonode_id' => array(
  7714. 0 => 'phylonode_id',
  7715. 1 => 'dbxref_id',
  7716. ),
  7717. ),
  7718. 'indexes' => array(
  7719. 'phylonode_dbxref_idx1' => array(
  7720. 0 => 'phylonode_id',
  7721. ),
  7722. 'phylonode_dbxref_idx2' => array(
  7723. 0 => 'dbxref_id',
  7724. ),
  7725. ),
  7726. 'foreign keys' => array(
  7727. 'dbxref' => array(
  7728. 'table' => 'dbxref',
  7729. 'columns' => array(
  7730. 'dbxref_id' => 'dbxref_id',
  7731. ),
  7732. ),
  7733. 'phylonode' => array(
  7734. 'table' => 'phylonode',
  7735. 'columns' => array(
  7736. 'phylonode_id' => 'phylonode_id',
  7737. ),
  7738. ),
  7739. ),
  7740. );
  7741. return $description;
  7742. }
  7743. /**
  7744. * Implements hook_chado_schema_v1_11_phylonode_organism()
  7745. * Purpose: To describe the structure of 'phylonode_organism' to tripal
  7746. * @see tripal_core_chado_insert()
  7747. * @see tripal_core_chado_update()
  7748. * @see tripal_core_chado_select()
  7749. *
  7750. * @return
  7751. * An array describing the 'phylonode_organism' table
  7752. *
  7753. * @ingroup tripal_chado_v1.11_schema_api
  7754. *
  7755. */
  7756. function tripal_core_chado_schema_v1_11_phylonode_organism() {
  7757. $description = array(
  7758. 'table' => 'phylonode_organism',
  7759. 'fields' => array(
  7760. 'phylonode_organism_id' => array(
  7761. 'type' => 'serial',
  7762. 'not NULL' => '1',
  7763. ),
  7764. 'phylonode_id' => array(
  7765. 'type' => 'int',
  7766. 'not NULL' => '1',
  7767. ),
  7768. 'organism_id' => array(
  7769. 'type' => 'int',
  7770. 'not NULL' => '1',
  7771. ),
  7772. ),
  7773. 'primary key' => array(
  7774. 0 => 'phylonode_organism_id',
  7775. ),
  7776. 'unique keys' => array(
  7777. 'phylonode_id' => array(
  7778. 0 => 'phylonode_id',
  7779. ),
  7780. ),
  7781. 'indexes' => array(
  7782. 'phylonode_organism_idx1' => array(
  7783. 0 => 'phylonode_id',
  7784. ),
  7785. 'phylonode_organism_idx2' => array(
  7786. 0 => 'organism_id',
  7787. ),
  7788. ),
  7789. 'foreign keys' => array(
  7790. 'organism' => array(
  7791. 'table' => 'organism',
  7792. 'columns' => array(
  7793. 'organism_id' => 'organism_id',
  7794. ),
  7795. ),
  7796. 'phylonode' => array(
  7797. 'table' => 'phylonode',
  7798. 'columns' => array(
  7799. 'phylonode_id' => 'phylonode_id',
  7800. ),
  7801. ),
  7802. ),
  7803. );
  7804. return $description;
  7805. }
  7806. /**
  7807. * Implements hook_chado_schema_v1_11_phylonode_pub()
  7808. * Purpose: To describe the structure of 'phylonode_pub' to tripal
  7809. * @see tripal_core_chado_insert()
  7810. * @see tripal_core_chado_update()
  7811. * @see tripal_core_chado_select()
  7812. *
  7813. * @return
  7814. * An array describing the 'phylonode_pub' table
  7815. *
  7816. * @ingroup tripal_chado_v1.11_schema_api
  7817. *
  7818. */
  7819. function tripal_core_chado_schema_v1_11_phylonode_pub() {
  7820. $description = array(
  7821. 'table' => 'phylonode_pub',
  7822. 'fields' => array(
  7823. 'phylonode_pub_id' => array(
  7824. 'type' => 'serial',
  7825. 'not NULL' => '1',
  7826. ),
  7827. 'phylonode_id' => array(
  7828. 'type' => 'int',
  7829. 'not NULL' => '1',
  7830. ),
  7831. 'pub_id' => array(
  7832. 'type' => 'int',
  7833. 'not NULL' => '1',
  7834. ),
  7835. ),
  7836. 'primary key' => array(
  7837. 0 => 'phylonode_pub_id',
  7838. ),
  7839. 'unique keys' => array(
  7840. 'phylonode_id' => array(
  7841. 0 => 'phylonode_id',
  7842. 1 => 'pub_id',
  7843. ),
  7844. ),
  7845. 'indexes' => array(
  7846. 'phylonode_pub_idx1' => array(
  7847. 0 => 'phylonode_id',
  7848. ),
  7849. 'phylonode_pub_idx2' => array(
  7850. 0 => 'pub_id',
  7851. ),
  7852. ),
  7853. 'foreign keys' => array(
  7854. 'pub' => array(
  7855. 'table' => 'pub',
  7856. 'columns' => array(
  7857. 'pub_id' => 'pub_id',
  7858. ),
  7859. ),
  7860. 'phylonode' => array(
  7861. 'table' => 'phylonode',
  7862. 'columns' => array(
  7863. 'phylonode_id' => 'phylonode_id',
  7864. ),
  7865. ),
  7866. ),
  7867. );
  7868. return $description;
  7869. }
  7870. /**
  7871. * Implements hook_chado_schema_v1_11_phylonode_relationship()
  7872. * Purpose: To describe the structure of 'phylonode_relationship' to tripal
  7873. * @see tripal_core_chado_insert()
  7874. * @see tripal_core_chado_update()
  7875. * @see tripal_core_chado_select()
  7876. *
  7877. * @return
  7878. * An array describing the 'phylonode_relationship' table
  7879. *
  7880. * @ingroup tripal_chado_v1.11_schema_api
  7881. *
  7882. */
  7883. function tripal_core_chado_schema_v1_11_phylonode_relationship() {
  7884. $description = array(
  7885. 'table' => 'phylonode_relationship',
  7886. 'fields' => array(
  7887. 'phylonode_relationship_id' => array(
  7888. 'type' => 'serial',
  7889. 'not NULL' => '1',
  7890. ),
  7891. 'subject_id' => array(
  7892. 'type' => 'int',
  7893. 'not NULL' => '1',
  7894. ),
  7895. 'object_id' => array(
  7896. 'type' => 'int',
  7897. 'not NULL' => '1',
  7898. ),
  7899. 'type_id' => array(
  7900. 'type' => 'int',
  7901. 'not NULL' => '1',
  7902. ),
  7903. 'rank' => array(
  7904. 'type' => 'int',
  7905. 'not NULL' => '',
  7906. ),
  7907. 'phylotree_id' => array(
  7908. 'type' => 'int',
  7909. 'not NULL' => '1',
  7910. ),
  7911. ),
  7912. 'primary key' => array(
  7913. 0 => 'phylonode_relationship_id',
  7914. ),
  7915. 'unique keys' => array(
  7916. 'subject_id' => array(
  7917. 0 => 'subject_id',
  7918. 1 => 'object_id',
  7919. 2 => 'type_id',
  7920. ),
  7921. ),
  7922. 'indexes' => array(
  7923. 'phylonode_relationship_idx1' => array(
  7924. 0 => 'subject_id',
  7925. ),
  7926. 'phylonode_relationship_idx2' => array(
  7927. 0 => 'object_id',
  7928. ),
  7929. 'phylonode_relationship_idx3' => array(
  7930. 0 => 'type_id',
  7931. ),
  7932. ),
  7933. 'foreign keys' => array(
  7934. 'cvterm' => array(
  7935. 'table' => 'cvterm',
  7936. 'columns' => array(
  7937. 'type_id' => 'cvterm_id',
  7938. ),
  7939. ),
  7940. 'phylotree' => array(
  7941. 'table' => 'phylotree',
  7942. 'columns' => array(
  7943. 'phylotree_id' => 'phylotree_id',
  7944. ),
  7945. ),
  7946. 'phylonode' => array(
  7947. 'table' => 'phylonode',
  7948. 'columns' => array(
  7949. 'subject_id' => 'phylonode_id',
  7950. 'object_id' => 'phylonode_id',
  7951. ),
  7952. ),
  7953. ),
  7954. );
  7955. return $description;
  7956. }
  7957. /**
  7958. * Implements hook_chado_schema_v1_11_phylonodeprop()
  7959. * Purpose: To describe the structure of 'phylonodeprop' to tripal
  7960. * @see tripal_core_chado_insert()
  7961. * @see tripal_core_chado_update()
  7962. * @see tripal_core_chado_select()
  7963. *
  7964. * @return
  7965. * An array describing the 'phylonodeprop' table
  7966. *
  7967. * @ingroup tripal_chado_v1.11_schema_api
  7968. *
  7969. */
  7970. function tripal_core_chado_schema_v1_11_phylonodeprop() {
  7971. $description = array(
  7972. 'table' => 'phylonodeprop',
  7973. 'fields' => array(
  7974. 'phylonodeprop_id' => array(
  7975. 'type' => 'serial',
  7976. 'not NULL' => '1',
  7977. ),
  7978. 'phylonode_id' => array(
  7979. 'type' => 'int',
  7980. 'not NULL' => '1',
  7981. ),
  7982. 'type_id' => array(
  7983. 'type' => 'int',
  7984. 'not NULL' => '1',
  7985. ),
  7986. 'value' => array(
  7987. 'type' => 'text',
  7988. 'not NULL' => '1',
  7989. 'default' => '',
  7990. ),
  7991. 'rank' => array(
  7992. 'type' => 'int',
  7993. 'not NULL' => '1',
  7994. 'default' => '0',
  7995. ),
  7996. ),
  7997. 'primary key' => array(
  7998. 0 => 'phylonodeprop_id',
  7999. ),
  8000. 'unique keys' => array(
  8001. 'phylonode_id' => array(
  8002. 0 => 'phylonode_id',
  8003. 1 => 'type_id',
  8004. 2 => 'value',
  8005. 3 => 'rank',
  8006. ),
  8007. ),
  8008. 'indexes' => array(
  8009. 'phylonodeprop_idx1' => array(
  8010. 0 => 'phylonode_id',
  8011. ),
  8012. 'phylonodeprop_idx2' => array(
  8013. 0 => 'type_id',
  8014. ),
  8015. ),
  8016. 'foreign keys' => array(
  8017. 'cvterm' => array(
  8018. 'table' => 'cvterm',
  8019. 'columns' => array(
  8020. 'type_id' => 'cvterm_id',
  8021. ),
  8022. ),
  8023. 'phylonode' => array(
  8024. 'table' => 'phylonode',
  8025. 'columns' => array(
  8026. 'phylonode_id' => 'phylonode_id',
  8027. ),
  8028. ),
  8029. ),
  8030. );
  8031. return $description;
  8032. }
  8033. /**
  8034. * Implements hook_chado_schema_v1_11_phylotree()
  8035. * Purpose: To describe the structure of 'phylotree' to tripal
  8036. * @see tripal_core_chado_insert()
  8037. * @see tripal_core_chado_update()
  8038. * @see tripal_core_chado_select()
  8039. *
  8040. * @return
  8041. * An array describing the 'phylotree' table
  8042. *
  8043. * @ingroup tripal_chado_v1.11_schema_api
  8044. *
  8045. */
  8046. function tripal_core_chado_schema_v1_11_phylotree() {
  8047. $description = array(
  8048. 'table' => 'phylotree',
  8049. 'fields' => array(
  8050. 'phylotree_id' => array(
  8051. 'type' => 'serial',
  8052. 'not NULL' => '1',
  8053. ),
  8054. 'dbxref_id' => array(
  8055. 'type' => 'int',
  8056. 'not NULL' => '1',
  8057. ),
  8058. 'name' => array(
  8059. 'type' => 'varchar',
  8060. 'length' => '255',
  8061. 'not NULL' => '',
  8062. ),
  8063. 'type_id' => array(
  8064. 'type' => 'int',
  8065. 'not NULL' => '',
  8066. ),
  8067. 'analysis_id' => array(
  8068. 'type' => 'int',
  8069. 'not NULL' => '',
  8070. ),
  8071. 'comment' => array(
  8072. 'type' => 'text',
  8073. 'not NULL' => '',
  8074. ),
  8075. ),
  8076. 'primary key' => array(
  8077. 0 => 'phylotree_id',
  8078. ),
  8079. 'unique keys' => array(
  8080. ),
  8081. 'indexes' => array(
  8082. 'phylotree_idx1' => array(
  8083. 0 => 'phylotree_id',
  8084. ),
  8085. ),
  8086. 'foreign keys' => array(
  8087. 'dbxref' => array(
  8088. 'table' => 'dbxref',
  8089. 'columns' => array(
  8090. 'dbxref_id' => 'dbxref_id',
  8091. ),
  8092. ),
  8093. 'cvterm' => array(
  8094. 'table' => 'cvterm',
  8095. 'columns' => array(
  8096. 'type_id' => 'cvterm_id',
  8097. ),
  8098. ),
  8099. 'analysis' => array(
  8100. 'table' => 'analysis',
  8101. 'columns' => array(
  8102. 'analysis_id' => 'analysis_id',
  8103. ),
  8104. ),
  8105. ),
  8106. );
  8107. return $description;
  8108. }
  8109. /**
  8110. * Implements hook_chado_schema_v1_11_phylotree_pub()
  8111. * Purpose: To describe the structure of 'phylotree_pub' to tripal
  8112. * @see tripal_core_chado_insert()
  8113. * @see tripal_core_chado_update()
  8114. * @see tripal_core_chado_select()
  8115. *
  8116. * @return
  8117. * An array describing the 'phylotree_pub' table
  8118. *
  8119. * @ingroup tripal_chado_v1.11_schema_api
  8120. *
  8121. */
  8122. function tripal_core_chado_schema_v1_11_phylotree_pub() {
  8123. $description = array(
  8124. 'table' => 'phylotree_pub',
  8125. 'fields' => array(
  8126. 'phylotree_pub_id' => array(
  8127. 'type' => 'serial',
  8128. 'not NULL' => '1',
  8129. ),
  8130. 'phylotree_id' => array(
  8131. 'type' => 'int',
  8132. 'not NULL' => '1',
  8133. ),
  8134. 'pub_id' => array(
  8135. 'type' => 'int',
  8136. 'not NULL' => '1',
  8137. ),
  8138. ),
  8139. 'primary key' => array(
  8140. 0 => 'phylotree_pub_id',
  8141. ),
  8142. 'unique keys' => array(
  8143. 'phylotree_id' => array(
  8144. 0 => 'phylotree_id',
  8145. 1 => 'pub_id',
  8146. ),
  8147. ),
  8148. 'indexes' => array(
  8149. 'phylotree_pub_idx1' => array(
  8150. 0 => 'phylotree_id',
  8151. ),
  8152. 'phylotree_pub_idx2' => array(
  8153. 0 => 'pub_id',
  8154. ),
  8155. ),
  8156. 'foreign keys' => array(
  8157. 'pub' => array(
  8158. 'table' => 'pub',
  8159. 'columns' => array(
  8160. 'pub_id' => 'pub_id',
  8161. ),
  8162. ),
  8163. 'phylotree' => array(
  8164. 'table' => 'phylotree',
  8165. 'columns' => array(
  8166. 'phylotree_id' => 'phylotree_id',
  8167. ),
  8168. ),
  8169. ),
  8170. );
  8171. return $description;
  8172. }
  8173. /**
  8174. * Implements hook_chado_schema_v1_11_project()
  8175. * Purpose: To describe the structure of 'project' to tripal
  8176. * @see tripal_core_chado_insert()
  8177. * @see tripal_core_chado_update()
  8178. * @see tripal_core_chado_select()
  8179. *
  8180. * @return
  8181. * An array describing the 'project' table
  8182. *
  8183. * @ingroup tripal_chado_v1.11_schema_api
  8184. *
  8185. */
  8186. function tripal_core_chado_schema_v1_11_project() {
  8187. $description = array(
  8188. 'table' => 'project',
  8189. 'fields' => array(
  8190. 'project_id' => array(
  8191. 'type' => 'serial',
  8192. 'not NULL' => '1',
  8193. ),
  8194. 'name' => array(
  8195. 'type' => 'varchar',
  8196. 'length' => '255',
  8197. 'not NULL' => '1',
  8198. ),
  8199. 'description' => array(
  8200. 'type' => 'varchar',
  8201. 'length' => '255',
  8202. 'not NULL' => '1',
  8203. ),
  8204. ),
  8205. 'primary key' => array(
  8206. 0 => 'project_id',
  8207. ),
  8208. 'unique keys' => array(
  8209. 'project_c1' => array(
  8210. 0 => 'name',
  8211. ),
  8212. ),
  8213. 'indexes' => array(
  8214. ),
  8215. 'foreign keys' => array(
  8216. ),
  8217. );
  8218. return $description;
  8219. }
  8220. /**
  8221. * Implements hook_chado_schema_v1_11_protocol()
  8222. * Purpose: To describe the structure of 'protocol' to tripal
  8223. * @see tripal_core_chado_insert()
  8224. * @see tripal_core_chado_update()
  8225. * @see tripal_core_chado_select()
  8226. *
  8227. * @return
  8228. * An array describing the 'protocol' table
  8229. *
  8230. * @ingroup tripal_chado_v1.11_schema_api
  8231. *
  8232. */
  8233. function tripal_core_chado_schema_v1_11_protocol() {
  8234. $description = array(
  8235. 'table' => 'protocol',
  8236. 'fields' => array(
  8237. 'protocol_id' => array(
  8238. 'type' => 'serial',
  8239. 'not NULL' => '1',
  8240. ),
  8241. 'type_id' => array(
  8242. 'type' => 'int',
  8243. 'not NULL' => '1',
  8244. ),
  8245. 'pub_id' => array(
  8246. 'type' => 'int',
  8247. 'not NULL' => '',
  8248. ),
  8249. 'dbxref_id' => array(
  8250. 'type' => 'int',
  8251. 'not NULL' => '',
  8252. ),
  8253. 'name' => array(
  8254. 'type' => 'text',
  8255. 'not NULL' => '1',
  8256. ),
  8257. 'uri' => array(
  8258. 'type' => 'text',
  8259. 'not NULL' => '',
  8260. ),
  8261. 'protocoldescription' => array(
  8262. 'type' => 'text',
  8263. 'not NULL' => '',
  8264. ),
  8265. 'hardwaredescription' => array(
  8266. 'type' => 'text',
  8267. 'not NULL' => '',
  8268. ),
  8269. 'softwaredescription' => array(
  8270. 'type' => 'text',
  8271. 'not NULL' => '',
  8272. ),
  8273. ),
  8274. 'primary key' => array(
  8275. 0 => 'protocol_id',
  8276. ),
  8277. 'unique keys' => array(
  8278. 'protocol_c1' => array(
  8279. 0 => 'name',
  8280. ),
  8281. ),
  8282. 'indexes' => array(
  8283. 'protocol_idx1' => array(
  8284. 0 => 'type_id',
  8285. ),
  8286. 'protocol_idx2' => array(
  8287. 0 => 'pub_id',
  8288. ),
  8289. 'protocol_idx3' => array(
  8290. 0 => 'dbxref_id',
  8291. ),
  8292. ),
  8293. 'foreign keys' => array(
  8294. 'dbxref' => array(
  8295. 'table' => 'dbxref',
  8296. 'columns' => array(
  8297. 'dbxref_id' => 'dbxref_id',
  8298. ),
  8299. ),
  8300. 'cvterm' => array(
  8301. 'table' => 'cvterm',
  8302. 'columns' => array(
  8303. 'type_id' => 'cvterm_id',
  8304. ),
  8305. ),
  8306. 'pub' => array(
  8307. 'table' => 'pub',
  8308. 'columns' => array(
  8309. 'pub_id' => 'pub_id',
  8310. ),
  8311. ),
  8312. ),
  8313. );
  8314. return $description;
  8315. }
  8316. /**
  8317. * Implements hook_chado_schema_v1_11_protocolparam()
  8318. * Purpose: To describe the structure of 'protocolparam' to tripal
  8319. * @see tripal_core_chado_insert()
  8320. * @see tripal_core_chado_update()
  8321. * @see tripal_core_chado_select()
  8322. *
  8323. * @return
  8324. * An array describing the 'protocolparam' table
  8325. *
  8326. * @ingroup tripal_chado_v1.11_schema_api
  8327. *
  8328. */
  8329. function tripal_core_chado_schema_v1_11_protocolparam() {
  8330. $description = array(
  8331. 'table' => 'protocolparam',
  8332. 'fields' => array(
  8333. 'protocolparam_id' => array(
  8334. 'type' => 'serial',
  8335. 'not NULL' => '1',
  8336. ),
  8337. 'protocol_id' => array(
  8338. 'type' => 'int',
  8339. 'not NULL' => '1',
  8340. ),
  8341. 'name' => array(
  8342. 'type' => 'text',
  8343. 'not NULL' => '1',
  8344. ),
  8345. 'datatype_id' => array(
  8346. 'type' => 'int',
  8347. 'not NULL' => '',
  8348. ),
  8349. 'unittype_id' => array(
  8350. 'type' => 'int',
  8351. 'not NULL' => '',
  8352. ),
  8353. 'value' => array(
  8354. 'type' => 'text',
  8355. 'not NULL' => '',
  8356. ),
  8357. 'rank' => array(
  8358. 'type' => 'int',
  8359. 'not NULL' => '1',
  8360. 'default' => '0',
  8361. ),
  8362. ),
  8363. 'primary key' => array(
  8364. 0 => 'protocolparam_id',
  8365. ),
  8366. 'unique keys' => array(
  8367. ),
  8368. 'indexes' => array(
  8369. 'protocolparam_idx1' => array(
  8370. 0 => 'protocol_id',
  8371. ),
  8372. 'protocolparam_idx2' => array(
  8373. 0 => 'datatype_id',
  8374. ),
  8375. 'protocolparam_idx3' => array(
  8376. 0 => 'unittype_id',
  8377. ),
  8378. ),
  8379. 'foreign keys' => array(
  8380. 'cvterm' => array(
  8381. 'table' => 'cvterm',
  8382. 'columns' => array(
  8383. 'datatype_id' => 'cvterm_id',
  8384. 'unittype_id' => 'cvterm_id',
  8385. ),
  8386. ),
  8387. 'protocol' => array(
  8388. 'table' => 'protocol',
  8389. 'columns' => array(
  8390. 'protocol_id' => 'protocol_id',
  8391. ),
  8392. ),
  8393. ),
  8394. );
  8395. return $description;
  8396. }
  8397. /**
  8398. * Implements hook_chado_schema_v1_11_pub()
  8399. * Purpose: To describe the structure of 'pub' to tripal
  8400. * @see tripal_core_chado_insert()
  8401. * @see tripal_core_chado_update()
  8402. * @see tripal_core_chado_select()
  8403. *
  8404. * @return
  8405. * An array describing the 'pub' table
  8406. *
  8407. * @ingroup tripal_chado_v1.11_schema_api
  8408. *
  8409. */
  8410. function tripal_core_chado_schema_v1_11_pub() {
  8411. $description = array(
  8412. 'table' => 'pub',
  8413. 'fields' => array(
  8414. 'pub_id' => array(
  8415. 'type' => 'serial',
  8416. 'not NULL' => '1',
  8417. ),
  8418. 'title' => array(
  8419. 'type' => 'text',
  8420. 'not NULL' => '',
  8421. ),
  8422. 'volumetitle' => array(
  8423. 'type' => 'text',
  8424. 'not NULL' => '',
  8425. ),
  8426. 'volume' => array(
  8427. 'type' => 'varchar',
  8428. 'length' => '255',
  8429. 'not NULL' => '',
  8430. ),
  8431. 'series_name' => array(
  8432. 'type' => 'varchar',
  8433. 'length' => '255',
  8434. 'not NULL' => '',
  8435. ),
  8436. 'issue' => array(
  8437. 'type' => 'varchar',
  8438. 'length' => '255',
  8439. 'not NULL' => '',
  8440. ),
  8441. 'pyear' => array(
  8442. 'type' => 'varchar',
  8443. 'length' => '255',
  8444. 'not NULL' => '',
  8445. ),
  8446. 'pages' => array(
  8447. 'type' => 'varchar',
  8448. 'length' => '255',
  8449. 'not NULL' => '',
  8450. ),
  8451. 'miniref' => array(
  8452. 'type' => 'varchar',
  8453. 'length' => '255',
  8454. 'not NULL' => '',
  8455. ),
  8456. 'uniquename' => array(
  8457. 'type' => 'text',
  8458. 'not NULL' => '1',
  8459. ),
  8460. 'type_id' => array(
  8461. 'type' => 'int',
  8462. 'not NULL' => '1',
  8463. ),
  8464. 'is_obsolete' => array(
  8465. 'type' => 'boolean',
  8466. 'not NULL' => '',
  8467. 'default' => 'als',
  8468. ),
  8469. 'publisher' => array(
  8470. 'type' => 'varchar',
  8471. 'length' => '255',
  8472. 'not NULL' => '',
  8473. ),
  8474. 'pubplace' => array(
  8475. 'type' => 'varchar',
  8476. 'length' => '255',
  8477. 'not NULL' => '',
  8478. ),
  8479. ),
  8480. 'primary key' => array(
  8481. 0 => 'pub_id',
  8482. ),
  8483. 'unique keys' => array(
  8484. 'pub_c1' => array(
  8485. 0 => 'uniquename',
  8486. ),
  8487. ),
  8488. 'indexes' => array(
  8489. 'pub_idx1' => array(
  8490. 0 => 'type_id',
  8491. ),
  8492. ),
  8493. 'foreign keys' => array(
  8494. 'cvterm' => array(
  8495. 'table' => 'cvterm',
  8496. 'columns' => array(
  8497. 'type_id' => 'cvterm_id',
  8498. ),
  8499. ),
  8500. ),
  8501. );
  8502. return $description;
  8503. }
  8504. /**
  8505. * Implements hook_chado_schema_v1_11_pub_dbxref()
  8506. * Purpose: To describe the structure of 'pub_dbxref' to tripal
  8507. * @see tripal_core_chado_insert()
  8508. * @see tripal_core_chado_update()
  8509. * @see tripal_core_chado_select()
  8510. *
  8511. * @return
  8512. * An array describing the 'pub_dbxref' table
  8513. *
  8514. * @ingroup tripal_chado_v1.11_schema_api
  8515. *
  8516. */
  8517. function tripal_core_chado_schema_v1_11_pub_dbxref() {
  8518. $description = array(
  8519. 'table' => 'pub_dbxref',
  8520. 'fields' => array(
  8521. 'pub_dbxref_id' => array(
  8522. 'type' => 'serial',
  8523. 'not NULL' => '1',
  8524. ),
  8525. 'pub_id' => array(
  8526. 'type' => 'int',
  8527. 'not NULL' => '1',
  8528. ),
  8529. 'dbxref_id' => array(
  8530. 'type' => 'int',
  8531. 'not NULL' => '1',
  8532. ),
  8533. 'is_current' => array(
  8534. 'type' => 'boolean',
  8535. 'not NULL' => '1',
  8536. 'default' => 'ru',
  8537. ),
  8538. ),
  8539. 'primary key' => array(
  8540. 0 => 'pub_dbxref_id',
  8541. ),
  8542. 'unique keys' => array(
  8543. 'pub_dbxref_c1' => array(
  8544. 0 => 'pub_id',
  8545. 1 => 'dbxref_id',
  8546. ),
  8547. ),
  8548. 'indexes' => array(
  8549. 'pub_dbxref_idx1' => array(
  8550. 0 => 'pub_id',
  8551. ),
  8552. 'pub_dbxref_idx2' => array(
  8553. 0 => 'dbxref_id',
  8554. ),
  8555. ),
  8556. 'foreign keys' => array(
  8557. 'dbxref' => array(
  8558. 'table' => 'dbxref',
  8559. 'columns' => array(
  8560. 'dbxref_id' => 'dbxref_id',
  8561. ),
  8562. ),
  8563. 'pub' => array(
  8564. 'table' => 'pub',
  8565. 'columns' => array(
  8566. 'pub_id' => 'pub_id',
  8567. ),
  8568. ),
  8569. ),
  8570. );
  8571. return $description;
  8572. }
  8573. /**
  8574. * Implements hook_chado_schema_v1_11_pub_relationship()
  8575. * Purpose: To describe the structure of 'pub_relationship' to tripal
  8576. * @see tripal_core_chado_insert()
  8577. * @see tripal_core_chado_update()
  8578. * @see tripal_core_chado_select()
  8579. *
  8580. * @return
  8581. * An array describing the 'pub_relationship' table
  8582. *
  8583. * @ingroup tripal_chado_v1.11_schema_api
  8584. *
  8585. */
  8586. function tripal_core_chado_schema_v1_11_pub_relationship() {
  8587. $description = array(
  8588. 'table' => 'pub_relationship',
  8589. 'fields' => array(
  8590. 'pub_relationship_id' => array(
  8591. 'type' => 'serial',
  8592. 'not NULL' => '1',
  8593. ),
  8594. 'subject_id' => array(
  8595. 'type' => 'int',
  8596. 'not NULL' => '1',
  8597. ),
  8598. 'object_id' => array(
  8599. 'type' => 'int',
  8600. 'not NULL' => '1',
  8601. ),
  8602. 'type_id' => array(
  8603. 'type' => 'int',
  8604. 'not NULL' => '1',
  8605. ),
  8606. ),
  8607. 'primary key' => array(
  8608. 0 => 'pub_relationship_id',
  8609. ),
  8610. 'unique keys' => array(
  8611. 'pub_relationship_c1' => array(
  8612. 0 => 'subject_id',
  8613. 1 => 'object_id',
  8614. 2 => 'type_id',
  8615. ),
  8616. ),
  8617. 'indexes' => array(
  8618. 'pub_relationship_idx1' => array(
  8619. 0 => 'subject_id',
  8620. ),
  8621. 'pub_relationship_idx2' => array(
  8622. 0 => 'object_id',
  8623. ),
  8624. 'pub_relationship_idx3' => array(
  8625. 0 => 'type_id',
  8626. ),
  8627. ),
  8628. 'foreign keys' => array(
  8629. 'cvterm' => array(
  8630. 'table' => 'cvterm',
  8631. 'columns' => array(
  8632. 'type_id' => 'cvterm_id',
  8633. ),
  8634. ),
  8635. 'pub' => array(
  8636. 'table' => 'pub',
  8637. 'columns' => array(
  8638. 'subject_id' => 'pub_id',
  8639. 'object_id' => 'pub_id',
  8640. ),
  8641. ),
  8642. ),
  8643. );
  8644. return $description;
  8645. }
  8646. /**
  8647. * Implements hook_chado_schema_v1_11_pubauthor()
  8648. * Purpose: To describe the structure of 'pubauthor' to tripal
  8649. * @see tripal_core_chado_insert()
  8650. * @see tripal_core_chado_update()
  8651. * @see tripal_core_chado_select()
  8652. *
  8653. * @return
  8654. * An array describing the 'pubauthor' table
  8655. *
  8656. * @ingroup tripal_chado_v1.11_schema_api
  8657. *
  8658. */
  8659. function tripal_core_chado_schema_v1_11_pubauthor() {
  8660. $description = array(
  8661. 'table' => 'pubauthor',
  8662. 'fields' => array(
  8663. 'pubauthor_id' => array(
  8664. 'type' => 'serial',
  8665. 'not NULL' => '1',
  8666. ),
  8667. 'pub_id' => array(
  8668. 'type' => 'int',
  8669. 'not NULL' => '1',
  8670. ),
  8671. 'rank' => array(
  8672. 'type' => 'int',
  8673. 'not NULL' => '1',
  8674. ),
  8675. 'editor' => array(
  8676. 'type' => 'boolean',
  8677. 'not NULL' => '',
  8678. 'default' => 'als',
  8679. ),
  8680. 'surname' => array(
  8681. 'type' => 'varchar',
  8682. 'length' => '100',
  8683. 'not NULL' => '1',
  8684. ),
  8685. 'givennames' => array(
  8686. 'type' => 'varchar',
  8687. 'length' => '100',
  8688. 'not NULL' => '',
  8689. ),
  8690. 'suffix' => array(
  8691. 'type' => 'varchar',
  8692. 'length' => '100',
  8693. 'not NULL' => '',
  8694. ),
  8695. ),
  8696. 'primary key' => array(
  8697. 0 => 'pubauthor_id',
  8698. ),
  8699. 'unique keys' => array(
  8700. 'pubauthor_c1' => array(
  8701. 0 => 'pub_id',
  8702. 1 => 'rank',
  8703. ),
  8704. ),
  8705. 'indexes' => array(
  8706. 'pubauthor_idx2' => array(
  8707. 0 => 'pub_id',
  8708. ),
  8709. ),
  8710. 'foreign keys' => array(
  8711. 'pub' => array(
  8712. 'table' => 'pub',
  8713. 'columns' => array(
  8714. 'pub_id' => 'pub_id',
  8715. ),
  8716. ),
  8717. ),
  8718. );
  8719. return $description;
  8720. }
  8721. /**
  8722. * Implements hook_chado_schema_v1_11_pubprop()
  8723. * Purpose: To describe the structure of 'pubprop' to tripal
  8724. * @see tripal_core_chado_insert()
  8725. * @see tripal_core_chado_update()
  8726. * @see tripal_core_chado_select()
  8727. *
  8728. * @return
  8729. * An array describing the 'pubprop' table
  8730. *
  8731. * @ingroup tripal_chado_v1.11_schema_api
  8732. *
  8733. */
  8734. function tripal_core_chado_schema_v1_11_pubprop() {
  8735. $description = array(
  8736. 'table' => 'pubprop',
  8737. 'fields' => array(
  8738. 'pubprop_id' => array(
  8739. 'type' => 'serial',
  8740. 'not NULL' => '1',
  8741. ),
  8742. 'pub_id' => array(
  8743. 'type' => 'int',
  8744. 'not NULL' => '1',
  8745. ),
  8746. 'type_id' => array(
  8747. 'type' => 'int',
  8748. 'not NULL' => '1',
  8749. ),
  8750. 'value' => array(
  8751. 'type' => 'text',
  8752. 'not NULL' => '1',
  8753. ),
  8754. 'rank' => array(
  8755. 'type' => 'int',
  8756. 'not NULL' => '',
  8757. ),
  8758. ),
  8759. 'primary key' => array(
  8760. 0 => 'pubprop_id',
  8761. ),
  8762. 'unique keys' => array(
  8763. 'pubprop_c1' => array(
  8764. 0 => 'pub_id',
  8765. 1 => 'type_id',
  8766. 2 => 'rank',
  8767. ),
  8768. ),
  8769. 'indexes' => array(
  8770. 'pubprop_idx1' => array(
  8771. 0 => 'pub_id',
  8772. ),
  8773. 'pubprop_idx2' => array(
  8774. 0 => 'type_id',
  8775. ),
  8776. ),
  8777. 'foreign keys' => array(
  8778. 'cvterm' => array(
  8779. 'table' => 'cvterm',
  8780. 'columns' => array(
  8781. 'type_id' => 'cvterm_id',
  8782. ),
  8783. ),
  8784. 'pub' => array(
  8785. 'table' => 'pub',
  8786. 'columns' => array(
  8787. 'pub_id' => 'pub_id',
  8788. ),
  8789. ),
  8790. ),
  8791. );
  8792. return $description;
  8793. }
  8794. /**
  8795. * Implements hook_chado_schema_v1_11_quantification()
  8796. * Purpose: To describe the structure of 'quantification' to tripal
  8797. * @see tripal_core_chado_insert()
  8798. * @see tripal_core_chado_update()
  8799. * @see tripal_core_chado_select()
  8800. *
  8801. * @return
  8802. * An array describing the 'quantification' table
  8803. *
  8804. * @ingroup tripal_chado_v1.11_schema_api
  8805. *
  8806. */
  8807. function tripal_core_chado_schema_v1_11_quantification() {
  8808. $description = array(
  8809. 'table' => 'quantification',
  8810. 'fields' => array(
  8811. 'quantification_id' => array(
  8812. 'type' => 'serial',
  8813. 'not NULL' => '1',
  8814. ),
  8815. 'acquisition_id' => array(
  8816. 'type' => 'int',
  8817. 'not NULL' => '1',
  8818. ),
  8819. 'operator_id' => array(
  8820. 'type' => 'int',
  8821. 'not NULL' => '',
  8822. ),
  8823. 'protocol_id' => array(
  8824. 'type' => 'int',
  8825. 'not NULL' => '',
  8826. ),
  8827. 'analysis_id' => array(
  8828. 'type' => 'int',
  8829. 'not NULL' => '1',
  8830. ),
  8831. 'quantificationdate' => array(
  8832. 'type' => 'datetime',
  8833. 'not NULL' => '',
  8834. 'default' => 'ow(',
  8835. ),
  8836. 'name' => array(
  8837. 'type' => 'text',
  8838. 'not NULL' => '',
  8839. ),
  8840. 'uri' => array(
  8841. 'type' => 'text',
  8842. 'not NULL' => '',
  8843. ),
  8844. ),
  8845. 'primary key' => array(
  8846. 0 => 'quantification_id',
  8847. ),
  8848. 'unique keys' => array(
  8849. 'quantification_c1' => array(
  8850. 0 => 'name',
  8851. 1 => 'analysis_id',
  8852. ),
  8853. ),
  8854. 'indexes' => array(
  8855. 'quantification_idx1' => array(
  8856. 0 => 'acquisition_id',
  8857. ),
  8858. 'quantification_idx2' => array(
  8859. 0 => 'operator_id',
  8860. ),
  8861. 'quantification_idx3' => array(
  8862. 0 => 'protocol_id',
  8863. ),
  8864. 'quantification_idx4' => array(
  8865. 0 => 'analysis_id',
  8866. ),
  8867. ),
  8868. 'foreign keys' => array(
  8869. 'analysis' => array(
  8870. 'table' => 'analysis',
  8871. 'columns' => array(
  8872. 'analysis_id' => 'analysis_id',
  8873. ),
  8874. ),
  8875. 'contact' => array(
  8876. 'table' => 'contact',
  8877. 'columns' => array(
  8878. 'operator_id' => 'contact_id',
  8879. ),
  8880. ),
  8881. 'protocol' => array(
  8882. 'table' => 'protocol',
  8883. 'columns' => array(
  8884. 'protocol_id' => 'protocol_id',
  8885. ),
  8886. ),
  8887. 'acquisition' => array(
  8888. 'table' => 'acquisition',
  8889. 'columns' => array(
  8890. 'acquisition_id' => 'acquisition_id',
  8891. ),
  8892. ),
  8893. ),
  8894. );
  8895. return $description;
  8896. }
  8897. /**
  8898. * Implements hook_chado_schema_v1_11_quantification_relationship()
  8899. * Purpose: To describe the structure of 'quantification_relationship' to tripal
  8900. * @see tripal_core_chado_insert()
  8901. * @see tripal_core_chado_update()
  8902. * @see tripal_core_chado_select()
  8903. *
  8904. * @return
  8905. * An array describing the 'quantification_relationship' table
  8906. *
  8907. * @ingroup tripal_chado_v1.11_schema_api
  8908. *
  8909. */
  8910. function tripal_core_chado_schema_v1_11_quantification_relationship() {
  8911. $description = array(
  8912. 'table' => 'quantification_relationship',
  8913. 'fields' => array(
  8914. 'quantification_relationship_id' => array(
  8915. 'type' => 'serial',
  8916. 'not NULL' => '1',
  8917. ),
  8918. 'subject_id' => array(
  8919. 'type' => 'int',
  8920. 'not NULL' => '1',
  8921. ),
  8922. 'type_id' => array(
  8923. 'type' => 'int',
  8924. 'not NULL' => '1',
  8925. ),
  8926. 'object_id' => array(
  8927. 'type' => 'int',
  8928. 'not NULL' => '1',
  8929. ),
  8930. ),
  8931. 'primary key' => array(
  8932. 0 => 'quantification_relationship_id',
  8933. ),
  8934. 'unique keys' => array(
  8935. 'quantification_relationship_c1' => array(
  8936. 0 => 'subject_id',
  8937. 1 => 'object_id',
  8938. 2 => 'type_id',
  8939. ),
  8940. ),
  8941. 'indexes' => array(
  8942. 'quantification_relationship_idx1' => array(
  8943. 0 => 'subject_id',
  8944. ),
  8945. 'quantification_relationship_idx2' => array(
  8946. 0 => 'type_id',
  8947. ),
  8948. 'quantification_relationship_idx3' => array(
  8949. 0 => 'object_id',
  8950. ),
  8951. ),
  8952. 'foreign keys' => array(
  8953. 'cvterm' => array(
  8954. 'table' => 'cvterm',
  8955. 'columns' => array(
  8956. 'type_id' => 'cvterm_id',
  8957. ),
  8958. ),
  8959. 'quantification' => array(
  8960. 'table' => 'quantification',
  8961. 'columns' => array(
  8962. 'subject_id' => 'quantification_id',
  8963. 'object_id' => 'quantification_id',
  8964. ),
  8965. ),
  8966. ),
  8967. );
  8968. return $description;
  8969. }
  8970. /**
  8971. * Implements hook_chado_schema_v1_11_quantificationprop()
  8972. * Purpose: To describe the structure of 'quantificationprop' to tripal
  8973. * @see tripal_core_chado_insert()
  8974. * @see tripal_core_chado_update()
  8975. * @see tripal_core_chado_select()
  8976. *
  8977. * @return
  8978. * An array describing the 'quantificationprop' table
  8979. *
  8980. * @ingroup tripal_chado_v1.11_schema_api
  8981. *
  8982. */
  8983. function tripal_core_chado_schema_v1_11_quantificationprop() {
  8984. $description = array(
  8985. 'table' => 'quantificationprop',
  8986. 'fields' => array(
  8987. 'quantificationprop_id' => array(
  8988. 'type' => 'serial',
  8989. 'not NULL' => '1',
  8990. ),
  8991. 'quantification_id' => array(
  8992. 'type' => 'int',
  8993. 'not NULL' => '1',
  8994. ),
  8995. 'type_id' => array(
  8996. 'type' => 'int',
  8997. 'not NULL' => '1',
  8998. ),
  8999. 'value' => array(
  9000. 'type' => 'text',
  9001. 'not NULL' => '',
  9002. ),
  9003. 'rank' => array(
  9004. 'type' => 'int',
  9005. 'not NULL' => '1',
  9006. 'default' => '0',
  9007. ),
  9008. ),
  9009. 'primary key' => array(
  9010. 0 => 'quantificationprop_id',
  9011. ),
  9012. 'unique keys' => array(
  9013. 'quantificationprop_c1' => array(
  9014. 0 => 'quantification_id',
  9015. 1 => 'type_id',
  9016. 2 => 'rank',
  9017. ),
  9018. ),
  9019. 'indexes' => array(
  9020. 'quantificationprop_idx1' => array(
  9021. 0 => 'quantification_id',
  9022. ),
  9023. 'quantificationprop_idx2' => array(
  9024. 0 => 'type_id',
  9025. ),
  9026. ),
  9027. 'foreign keys' => array(
  9028. 'cvterm' => array(
  9029. 'table' => 'cvterm',
  9030. 'columns' => array(
  9031. 'type_id' => 'cvterm_id',
  9032. ),
  9033. ),
  9034. 'quantification' => array(
  9035. 'table' => 'quantification',
  9036. 'columns' => array(
  9037. 'quantification_id' => 'quantification_id',
  9038. ),
  9039. ),
  9040. ),
  9041. );
  9042. return $description;
  9043. }
  9044. /**
  9045. * Implements hook_chado_schema_v1_11_stock()
  9046. * Purpose: To describe the structure of 'stock' to tripal
  9047. * @see tripal_core_chado_insert()
  9048. * @see tripal_core_chado_update()
  9049. * @see tripal_core_chado_select()
  9050. *
  9051. * @return
  9052. * An array describing the 'stock' table
  9053. *
  9054. * @ingroup tripal_chado_v1.11_schema_api
  9055. *
  9056. */
  9057. function tripal_core_chado_schema_v1_11_stock() {
  9058. $description = array(
  9059. 'table' => 'stock',
  9060. 'referring_tables' => array(
  9061. 1 => 'stock_cvterm',
  9062. 2 => 'stock_dbxref',
  9063. 3 => 'stock_genotype',
  9064. 4 => 'stock_pub',
  9065. 5 => 'stock_relationship',
  9066. 7 => 'stockcollection_stock',
  9067. 8 => 'stockprop',
  9068. ),
  9069. 'fields' => array(
  9070. 'stock_id' => array(
  9071. 'type' => 'serial',
  9072. 'not NULL' => '1',
  9073. ),
  9074. 'dbxref_id' => array(
  9075. 'type' => 'int',
  9076. 'not NULL' => '',
  9077. ),
  9078. 'organism_id' => array(
  9079. 'type' => 'int',
  9080. 'not NULL' => '1',
  9081. ),
  9082. 'name' => array(
  9083. 'type' => 'varchar',
  9084. 'length' => '255',
  9085. 'not NULL' => '',
  9086. ),
  9087. 'uniquename' => array(
  9088. 'type' => 'text',
  9089. 'not NULL' => '1',
  9090. ),
  9091. 'description' => array(
  9092. 'type' => 'text',
  9093. 'not NULL' => '',
  9094. ),
  9095. 'type_id' => array(
  9096. 'type' => 'int',
  9097. 'not NULL' => '1',
  9098. ),
  9099. 'is_obsolete' => array(
  9100. 'type' => 'boolean',
  9101. 'not NULL' => '1',
  9102. 'default' => 'als',
  9103. ),
  9104. ),
  9105. 'primary key' => array(
  9106. 0 => 'stock_id',
  9107. ),
  9108. 'unique keys' => array(
  9109. 'stock_c1' => array(
  9110. 0 => 'organism_id',
  9111. 1 => 'uniquename',
  9112. 2 => 'type_id',
  9113. ),
  9114. ),
  9115. 'indexes' => array(
  9116. 'stock_idx1' => array(
  9117. 0 => 'dbxref_id',
  9118. ),
  9119. 'stock_idx2' => array(
  9120. 0 => 'organism_id',
  9121. ),
  9122. 'stock_idx3' => array(
  9123. 0 => 'type_id',
  9124. ),
  9125. 'stock_idx4' => array(
  9126. 0 => 'uniquename',
  9127. ),
  9128. 'stock_name_ind1' => array(
  9129. 0 => 'name',
  9130. ),
  9131. ),
  9132. 'foreign keys' => array(
  9133. 'dbxref' => array(
  9134. 'table' => 'dbxref',
  9135. 'columns' => array(
  9136. 'dbxref_id' => 'dbxref_id',
  9137. ),
  9138. ),
  9139. 'cvterm' => array(
  9140. 'table' => 'cvterm',
  9141. 'columns' => array(
  9142. 'type_id' => 'cvterm_id',
  9143. ),
  9144. ),
  9145. 'organism' => array(
  9146. 'table' => 'organism',
  9147. 'columns' => array(
  9148. 'organism_id' => 'organism_id',
  9149. ),
  9150. ),
  9151. ),
  9152. );
  9153. return $description;
  9154. }
  9155. /**
  9156. * Implements hook_chado_schema_v1_11_stock_cvterm()
  9157. * Purpose: To describe the structure of 'stock_cvterm' to tripal
  9158. * @see tripal_core_chado_insert()
  9159. * @see tripal_core_chado_update()
  9160. * @see tripal_core_chado_select()
  9161. *
  9162. * @return
  9163. * An array describing the 'stock_cvterm' table
  9164. *
  9165. * @ingroup tripal_chado_v1.11_schema_api
  9166. *
  9167. */
  9168. function tripal_core_chado_schema_v1_11_stock_cvterm() {
  9169. $description = array(
  9170. 'table' => 'stock_cvterm',
  9171. 'fields' => array(
  9172. 'stock_cvterm_id' => array(
  9173. 'type' => 'serial',
  9174. 'not NULL' => '1',
  9175. ),
  9176. 'stock_id' => array(
  9177. 'type' => 'int',
  9178. 'not NULL' => '1',
  9179. ),
  9180. 'cvterm_id' => array(
  9181. 'type' => 'int',
  9182. 'not NULL' => '1',
  9183. ),
  9184. 'pub_id' => array(
  9185. 'type' => 'int',
  9186. 'not NULL' => '1',
  9187. ),
  9188. ),
  9189. 'primary key' => array(
  9190. 0 => 'stock_cvterm_id',
  9191. ),
  9192. 'unique keys' => array(
  9193. 'stock_cvterm_c1' => array(
  9194. 0 => 'stock_id',
  9195. 1 => 'cvterm_id',
  9196. 2 => 'pub_id',
  9197. ),
  9198. ),
  9199. 'indexes' => array(
  9200. 'stock_cvterm_idx1' => array(
  9201. 0 => 'stock_id',
  9202. ),
  9203. 'stock_cvterm_idx2' => array(
  9204. 0 => 'cvterm_id',
  9205. ),
  9206. 'stock_cvterm_idx3' => array(
  9207. 0 => 'pub_id',
  9208. ),
  9209. ),
  9210. 'foreign keys' => array(
  9211. 'cvterm' => array(
  9212. 'table' => 'cvterm',
  9213. 'columns' => array(
  9214. 'cvterm_id' => 'cvterm_id',
  9215. ),
  9216. ),
  9217. 'pub' => array(
  9218. 'table' => 'pub',
  9219. 'columns' => array(
  9220. 'pub_id' => 'pub_id',
  9221. ),
  9222. ),
  9223. 'stock' => array(
  9224. 'table' => 'stock',
  9225. 'columns' => array(
  9226. 'stock_id' => 'stock_id',
  9227. ),
  9228. ),
  9229. ),
  9230. );
  9231. return $description;
  9232. }
  9233. /**
  9234. * Implements hook_chado_schema_v1_11_stock_dbxref()
  9235. * Purpose: To describe the structure of 'stock_dbxref' to tripal
  9236. * @see tripal_core_chado_insert()
  9237. * @see tripal_core_chado_update()
  9238. * @see tripal_core_chado_select()
  9239. *
  9240. * @return
  9241. * An array describing the 'stock_dbxref' table
  9242. *
  9243. * @ingroup tripal_chado_v1.11_schema_api
  9244. *
  9245. */
  9246. function tripal_core_chado_schema_v1_11_stock_dbxref() {
  9247. $description = array(
  9248. 'table' => 'stock_dbxref',
  9249. 'fields' => array(
  9250. 'stock_dbxref_id' => array(
  9251. 'type' => 'serial',
  9252. 'not NULL' => '1',
  9253. ),
  9254. 'stock_id' => array(
  9255. 'type' => 'int',
  9256. 'not NULL' => '1',
  9257. ),
  9258. 'dbxref_id' => array(
  9259. 'type' => 'int',
  9260. 'not NULL' => '1',
  9261. ),
  9262. 'is_current' => array(
  9263. 'type' => 'boolean',
  9264. 'not NULL' => '1',
  9265. 'default' => 'ru',
  9266. ),
  9267. ),
  9268. 'primary key' => array(
  9269. 0 => 'stock_dbxref_id',
  9270. ),
  9271. 'unique keys' => array(
  9272. 'stock_dbxref_c1' => array(
  9273. 0 => 'stock_id',
  9274. 1 => 'dbxref_id',
  9275. ),
  9276. ),
  9277. 'indexes' => array(
  9278. 'stock_dbxref_idx1' => array(
  9279. 0 => 'stock_id',
  9280. ),
  9281. 'stock_dbxref_idx2' => array(
  9282. 0 => 'dbxref_id',
  9283. ),
  9284. ),
  9285. 'foreign keys' => array(
  9286. 'dbxref' => array(
  9287. 'table' => 'dbxref',
  9288. 'columns' => array(
  9289. 'dbxref_id' => 'dbxref_id',
  9290. ),
  9291. ),
  9292. 'stock' => array(
  9293. 'table' => 'stock',
  9294. 'columns' => array(
  9295. 'stock_id' => 'stock_id',
  9296. ),
  9297. ),
  9298. ),
  9299. );
  9300. return $description;
  9301. }
  9302. /**
  9303. * Implements hook_chado_schema_v1_11_stock_genotype()
  9304. * Purpose: To describe the structure of 'stock_genotype' to tripal
  9305. * @see tripal_core_chado_insert()
  9306. * @see tripal_core_chado_update()
  9307. * @see tripal_core_chado_select()
  9308. *
  9309. * @return
  9310. * An array describing the 'stock_genotype' table
  9311. *
  9312. * @ingroup tripal_chado_v1.11_schema_api
  9313. *
  9314. */
  9315. function tripal_core_chado_schema_v1_11_stock_genotype() {
  9316. $description = array(
  9317. 'table' => 'stock_genotype',
  9318. 'fields' => array(
  9319. 'stock_genotype_id' => array(
  9320. 'type' => 'serial',
  9321. 'not NULL' => '1',
  9322. ),
  9323. 'stock_id' => array(
  9324. 'type' => 'int',
  9325. 'not NULL' => '1',
  9326. ),
  9327. 'genotype_id' => array(
  9328. 'type' => 'int',
  9329. 'not NULL' => '1',
  9330. ),
  9331. ),
  9332. 'primary key' => array(
  9333. 0 => 'stock_genotype_id',
  9334. ),
  9335. 'unique keys' => array(
  9336. 'stock_genotype_c1' => array(
  9337. 0 => 'stock_id',
  9338. 1 => 'genotype_id',
  9339. ),
  9340. ),
  9341. 'indexes' => array(
  9342. 'stock_genotype_idx1' => array(
  9343. 0 => 'stock_id',
  9344. ),
  9345. 'stock_genotype_idx2' => array(
  9346. 0 => 'genotype_id',
  9347. ),
  9348. ),
  9349. 'foreign keys' => array(
  9350. 'genotype' => array(
  9351. 'table' => 'genotype',
  9352. 'columns' => array(
  9353. 'genotype_id' => 'genotype_id',
  9354. ),
  9355. ),
  9356. 'stock' => array(
  9357. 'table' => 'stock',
  9358. 'columns' => array(
  9359. 'stock_id' => 'stock_id',
  9360. ),
  9361. ),
  9362. ),
  9363. );
  9364. return $description;
  9365. }
  9366. /**
  9367. * Implements hook_chado_schema_v1_11_stock_pub()
  9368. * Purpose: To describe the structure of 'stock_pub' to tripal
  9369. * @see tripal_core_chado_insert()
  9370. * @see tripal_core_chado_update()
  9371. * @see tripal_core_chado_select()
  9372. *
  9373. * @return
  9374. * An array describing the 'stock_pub' table
  9375. *
  9376. * @ingroup tripal_chado_v1.11_schema_api
  9377. *
  9378. */
  9379. function tripal_core_chado_schema_v1_11_stock_pub() {
  9380. $description = array(
  9381. 'table' => 'stock_pub',
  9382. 'fields' => array(
  9383. 'stock_pub_id' => array(
  9384. 'type' => 'serial',
  9385. 'not NULL' => '1',
  9386. ),
  9387. 'stock_id' => array(
  9388. 'type' => 'int',
  9389. 'not NULL' => '1',
  9390. ),
  9391. 'pub_id' => array(
  9392. 'type' => 'int',
  9393. 'not NULL' => '1',
  9394. ),
  9395. ),
  9396. 'primary key' => array(
  9397. 0 => 'stock_pub_id',
  9398. ),
  9399. 'unique keys' => array(
  9400. 'stock_pub_c1' => array(
  9401. 0 => 'stock_id',
  9402. 1 => 'pub_id',
  9403. ),
  9404. ),
  9405. 'indexes' => array(
  9406. 'stock_pub_idx1' => array(
  9407. 0 => 'stock_id',
  9408. ),
  9409. 'stock_pub_idx2' => array(
  9410. 0 => 'pub_id',
  9411. ),
  9412. ),
  9413. 'foreign keys' => array(
  9414. 'pub' => array(
  9415. 'table' => 'pub',
  9416. 'columns' => array(
  9417. 'pub_id' => 'pub_id',
  9418. ),
  9419. ),
  9420. 'stock' => array(
  9421. 'table' => 'stock',
  9422. 'columns' => array(
  9423. 'stock_id' => 'stock_id',
  9424. ),
  9425. ),
  9426. ),
  9427. );
  9428. return $description;
  9429. }
  9430. /**
  9431. * Implements hook_chado_schema_v1_11_stock_relationship()
  9432. * Purpose: To describe the structure of 'stock_relationship' to tripal
  9433. * @see tripal_core_chado_insert()
  9434. * @see tripal_core_chado_update()
  9435. * @see tripal_core_chado_select()
  9436. *
  9437. * @return
  9438. * An array describing the 'stock_relationship' table
  9439. *
  9440. * @ingroup tripal_chado_v1.11_schema_api
  9441. *
  9442. */
  9443. function tripal_core_chado_schema_v1_11_stock_relationship() {
  9444. $description = array(
  9445. 'table' => 'stock_relationship',
  9446. 'fields' => array(
  9447. 'stock_relationship_id' => array(
  9448. 'type' => 'serial',
  9449. 'not NULL' => '1',
  9450. ),
  9451. 'subject_id' => array(
  9452. 'type' => 'int',
  9453. 'not NULL' => '1',
  9454. ),
  9455. 'object_id' => array(
  9456. 'type' => 'int',
  9457. 'not NULL' => '1',
  9458. ),
  9459. 'type_id' => array(
  9460. 'type' => 'int',
  9461. 'not NULL' => '1',
  9462. ),
  9463. 'value' => array(
  9464. 'type' => 'text',
  9465. 'not NULL' => '',
  9466. ),
  9467. 'rank' => array(
  9468. 'type' => 'int',
  9469. 'not NULL' => '1',
  9470. 'default' => '0',
  9471. ),
  9472. ),
  9473. 'primary key' => array(
  9474. 0 => 'stock_relationship_id',
  9475. ),
  9476. 'unique keys' => array(
  9477. 'stock_relationship_c1' => array(
  9478. 0 => 'subject_id',
  9479. 1 => 'object_id',
  9480. 2 => 'type_id',
  9481. 3 => 'rank',
  9482. ),
  9483. ),
  9484. 'indexes' => array(
  9485. 'stock_relationship_idx1' => array(
  9486. 0 => 'subject_id',
  9487. ),
  9488. 'stock_relationship_idx2' => array(
  9489. 0 => 'object_id',
  9490. ),
  9491. 'stock_relationship_idx3' => array(
  9492. 0 => 'type_id',
  9493. ),
  9494. ),
  9495. 'foreign keys' => array(
  9496. 'cvterm' => array(
  9497. 'table' => 'cvterm',
  9498. 'columns' => array(
  9499. 'type_id' => 'cvterm_id',
  9500. ),
  9501. ),
  9502. 'stock' => array(
  9503. 'table' => 'stock',
  9504. 'columns' => array(
  9505. 'subject_id' => 'stock_id',
  9506. 'object_id' => 'stock_id',
  9507. ),
  9508. ),
  9509. ),
  9510. );
  9511. return $description;
  9512. }
  9513. /**
  9514. * Implements hook_chado_schema_v1_11_stock_relationship_pub()
  9515. * Purpose: To describe the structure of 'stock_relationship_pub' to tripal
  9516. * @see tripal_core_chado_insert()
  9517. * @see tripal_core_chado_update()
  9518. * @see tripal_core_chado_select()
  9519. *
  9520. * @return
  9521. * An array describing the 'stock_relationship_pub' table
  9522. *
  9523. * @ingroup tripal_chado_v1.11_schema_api
  9524. *
  9525. */
  9526. function tripal_core_chado_schema_v1_11_stock_relationship_pub() {
  9527. $description = array(
  9528. 'table' => 'stock_relationship_pub',
  9529. 'fields' => array(
  9530. 'stock_relationship_pub_id' => array(
  9531. 'type' => 'serial',
  9532. 'not NULL' => '1',
  9533. ),
  9534. 'stock_relationship_id' => array(
  9535. 'type' => 'int',
  9536. 'not NULL' => '1',
  9537. ),
  9538. 'pub_id' => array(
  9539. 'type' => 'int',
  9540. 'not NULL' => '1',
  9541. ),
  9542. ),
  9543. 'primary key' => array(
  9544. 0 => 'stock_relationship_pub_id',
  9545. ),
  9546. 'unique keys' => array(
  9547. 'stock_relationship_pub_c1' => array(
  9548. 0 => 'stock_relationship_id',
  9549. 1 => 'pub_id',
  9550. ),
  9551. ),
  9552. 'indexes' => array(
  9553. 'stock_relationship_pub_idx1' => array(
  9554. 0 => 'stock_relationship_id',
  9555. ),
  9556. 'stock_relationship_pub_idx2' => array(
  9557. 0 => 'pub_id',
  9558. ),
  9559. ),
  9560. 'foreign keys' => array(
  9561. 'pub' => array(
  9562. 'table' => 'pub',
  9563. 'columns' => array(
  9564. 'pub_id' => 'pub_id',
  9565. ),
  9566. ),
  9567. 'stock_relationship' => array(
  9568. 'table' => 'stock_relationship',
  9569. 'columns' => array(
  9570. 'stock_relationship_id' => 'stock_relationship_id',
  9571. ),
  9572. ),
  9573. ),
  9574. );
  9575. return $description;
  9576. }
  9577. /**
  9578. * Implements hook_chado_schema_v1_11_stockcollection()
  9579. * Purpose: To describe the structure of 'stockcollection' to tripal
  9580. * @see tripal_core_chado_insert()
  9581. * @see tripal_core_chado_update()
  9582. * @see tripal_core_chado_select()
  9583. *
  9584. * @return
  9585. * An array describing the 'stockcollection' table
  9586. *
  9587. * @ingroup tripal_chado_v1.11_schema_api
  9588. *
  9589. */
  9590. function tripal_core_chado_schema_v1_11_stockcollection() {
  9591. $description = array(
  9592. 'table' => 'stockcollection',
  9593. 'fields' => array(
  9594. 'stockcollection_id' => array(
  9595. 'type' => 'serial',
  9596. 'not NULL' => '1',
  9597. ),
  9598. 'type_id' => array(
  9599. 'type' => 'int',
  9600. 'not NULL' => '1',
  9601. ),
  9602. 'contact_id' => array(
  9603. 'type' => 'int',
  9604. 'not NULL' => '',
  9605. ),
  9606. 'name' => array(
  9607. 'type' => 'varchar',
  9608. 'length' => '255',
  9609. 'not NULL' => '',
  9610. ),
  9611. 'uniquename' => array(
  9612. 'type' => 'text',
  9613. 'not NULL' => '1',
  9614. ),
  9615. ),
  9616. 'primary key' => array(
  9617. 0 => 'stockcollection_id',
  9618. ),
  9619. 'unique keys' => array(
  9620. 'stockcollection_c1' => array(
  9621. 0 => 'uniquename',
  9622. 1 => 'type_id',
  9623. ),
  9624. ),
  9625. 'indexes' => array(
  9626. 'stockcollection_idx1' => array(
  9627. 0 => 'contact_id',
  9628. ),
  9629. 'stockcollection_idx2' => array(
  9630. 0 => 'type_id',
  9631. ),
  9632. 'stockcollection_idx3' => array(
  9633. 0 => 'uniquename',
  9634. ),
  9635. 'stockcollection_name_ind1' => array(
  9636. 0 => 'name',
  9637. ),
  9638. ),
  9639. 'foreign keys' => array(
  9640. 'cvterm' => array(
  9641. 'table' => 'cvterm',
  9642. 'columns' => array(
  9643. 'type_id' => 'cvterm_id',
  9644. ),
  9645. ),
  9646. 'contact' => array(
  9647. 'table' => 'contact',
  9648. 'columns' => array(
  9649. 'contact_id' => 'contact_id',
  9650. ),
  9651. ),
  9652. ),
  9653. );
  9654. return $description;
  9655. }
  9656. /**
  9657. * Implements hook_chado_schema_v1_11_stockcollection_stock()
  9658. * Purpose: To describe the structure of 'stockcollection_stock' to tripal
  9659. * @see tripal_core_chado_insert()
  9660. * @see tripal_core_chado_update()
  9661. * @see tripal_core_chado_select()
  9662. *
  9663. * @return
  9664. * An array describing the 'stockcollection_stock' table
  9665. *
  9666. * @ingroup tripal_chado_v1.11_schema_api
  9667. *
  9668. */
  9669. function tripal_core_chado_schema_v1_11_stockcollection_stock() {
  9670. $description = array(
  9671. 'table' => 'stockcollection_stock',
  9672. 'fields' => array(
  9673. 'stockcollection_stock_id' => array(
  9674. 'type' => 'serial',
  9675. 'not NULL' => '1',
  9676. ),
  9677. 'stockcollection_id' => array(
  9678. 'type' => 'int',
  9679. 'not NULL' => '1',
  9680. ),
  9681. 'stock_id' => array(
  9682. 'type' => 'int',
  9683. 'not NULL' => '1',
  9684. ),
  9685. ),
  9686. 'primary key' => array(
  9687. 0 => 'stockcollection_stock_id',
  9688. ),
  9689. 'unique keys' => array(
  9690. 'stockcollection_stock_c1' => array(
  9691. 0 => 'stockcollection_id',
  9692. 1 => 'stock_id',
  9693. ),
  9694. ),
  9695. 'indexes' => array(
  9696. 'stockcollection_stock_idx1' => array(
  9697. 0 => 'stockcollection_id',
  9698. ),
  9699. 'stockcollection_stock_idx2' => array(
  9700. 0 => 'stock_id',
  9701. ),
  9702. ),
  9703. 'foreign keys' => array(
  9704. 'stock' => array(
  9705. 'table' => 'stock',
  9706. 'columns' => array(
  9707. 'stock_id' => 'stock_id',
  9708. ),
  9709. ),
  9710. 'stockcollection' => array(
  9711. 'table' => 'stockcollection',
  9712. 'columns' => array(
  9713. 'stockcollection_id' => 'stockcollection_id',
  9714. ),
  9715. ),
  9716. ),
  9717. );
  9718. return $description;
  9719. }
  9720. /**
  9721. * Implements hook_chado_schema_v1_11_stockcollectionprop()
  9722. * Purpose: To describe the structure of 'stockcollectionprop' to tripal
  9723. * @see tripal_core_chado_insert()
  9724. * @see tripal_core_chado_update()
  9725. * @see tripal_core_chado_select()
  9726. *
  9727. * @return
  9728. * An array describing the 'stockcollectionprop' table
  9729. *
  9730. * @ingroup tripal_chado_v1.11_schema_api
  9731. *
  9732. */
  9733. function tripal_core_chado_schema_v1_11_stockcollectionprop() {
  9734. $description = array(
  9735. 'table' => 'stockcollectionprop',
  9736. 'fields' => array(
  9737. 'stockcollectionprop_id' => array(
  9738. 'type' => 'serial',
  9739. 'not NULL' => '1',
  9740. ),
  9741. 'stockcollection_id' => array(
  9742. 'type' => 'int',
  9743. 'not NULL' => '1',
  9744. ),
  9745. 'type_id' => array(
  9746. 'type' => 'int',
  9747. 'not NULL' => '1',
  9748. ),
  9749. 'value' => array(
  9750. 'type' => 'text',
  9751. 'not NULL' => '',
  9752. ),
  9753. 'rank' => array(
  9754. 'type' => 'int',
  9755. 'not NULL' => '1',
  9756. 'default' => '0',
  9757. ),
  9758. ),
  9759. 'primary key' => array(
  9760. 0 => 'stockcollectionprop_id',
  9761. ),
  9762. 'unique keys' => array(
  9763. 'stockcollectionprop_c1' => array(
  9764. 0 => 'stockcollection_id',
  9765. 1 => 'type_id',
  9766. 2 => 'rank',
  9767. ),
  9768. ),
  9769. 'indexes' => array(
  9770. 'stockcollectionprop_idx1' => array(
  9771. 0 => 'stockcollection_id',
  9772. ),
  9773. 'stockcollectionprop_idx2' => array(
  9774. 0 => 'type_id',
  9775. ),
  9776. ),
  9777. 'foreign keys' => array(
  9778. 'cvterm' => array(
  9779. 'table' => 'cvterm',
  9780. 'columns' => array(
  9781. 'type_id' => 'cvterm_id',
  9782. ),
  9783. ),
  9784. 'stockcollection' => array(
  9785. 'table' => 'stockcollection',
  9786. 'columns' => array(
  9787. 'stockcollection_id' => 'stockcollection_id',
  9788. ),
  9789. ),
  9790. ),
  9791. );
  9792. return $description;
  9793. }
  9794. /**
  9795. * Implements hook_chado_schema_v1_11_stockprop()
  9796. * Purpose: To describe the structure of 'stockprop' to tripal
  9797. * @see tripal_core_chado_insert()
  9798. * @see tripal_core_chado_update()
  9799. * @see tripal_core_chado_select()
  9800. *
  9801. * @return
  9802. * An array describing the 'stockprop' table
  9803. *
  9804. * @ingroup tripal_chado_v1.11_schema_api
  9805. *
  9806. */
  9807. function tripal_core_chado_schema_v1_11_stockprop() {
  9808. $description = array(
  9809. 'table' => 'stockprop',
  9810. 'fields' => array(
  9811. 'stockprop_id' => array(
  9812. 'type' => 'serial',
  9813. 'not NULL' => '1',
  9814. ),
  9815. 'stock_id' => array(
  9816. 'type' => 'int',
  9817. 'not NULL' => '1',
  9818. ),
  9819. 'type_id' => array(
  9820. 'type' => 'int',
  9821. 'not NULL' => '1',
  9822. ),
  9823. 'value' => array(
  9824. 'type' => 'text',
  9825. 'not NULL' => '',
  9826. ),
  9827. 'rank' => array(
  9828. 'type' => 'int',
  9829. 'not NULL' => '1',
  9830. 'default' => '0',
  9831. ),
  9832. ),
  9833. 'primary key' => array(
  9834. 0 => 'stockprop_id',
  9835. ),
  9836. 'unique keys' => array(
  9837. 'stockprop_c1' => array(
  9838. 0 => 'stock_id',
  9839. 1 => 'type_id',
  9840. 2 => 'rank',
  9841. ),
  9842. ),
  9843. 'indexes' => array(
  9844. 'stockprop_idx1' => array(
  9845. 0 => 'stock_id',
  9846. ),
  9847. 'stockprop_idx2' => array(
  9848. 0 => 'type_id',
  9849. ),
  9850. ),
  9851. 'foreign keys' => array(
  9852. 'cvterm' => array(
  9853. 'table' => 'cvterm',
  9854. 'columns' => array(
  9855. 'type_id' => 'cvterm_id',
  9856. ),
  9857. ),
  9858. 'stock' => array(
  9859. 'table' => 'stock',
  9860. 'columns' => array(
  9861. 'stock_id' => 'stock_id',
  9862. ),
  9863. ),
  9864. ),
  9865. );
  9866. return $description;
  9867. }
  9868. /**
  9869. * Implements hook_chado_schema_v1_11_stockprop_pub()
  9870. * Purpose: To describe the structure of 'stockprop_pub' to tripal
  9871. * @see tripal_core_chado_insert()
  9872. * @see tripal_core_chado_update()
  9873. * @see tripal_core_chado_select()
  9874. *
  9875. * @return
  9876. * An array describing the 'stockprop_pub' table
  9877. *
  9878. * @ingroup tripal_chado_v1.11_schema_api
  9879. *
  9880. */
  9881. function tripal_core_chado_schema_v1_11_stockprop_pub() {
  9882. $description = array(
  9883. 'table' => 'stockprop_pub',
  9884. 'fields' => array(
  9885. 'stockprop_pub_id' => array(
  9886. 'type' => 'serial',
  9887. 'not NULL' => '1',
  9888. ),
  9889. 'stockprop_id' => array(
  9890. 'type' => 'int',
  9891. 'not NULL' => '1',
  9892. ),
  9893. 'pub_id' => array(
  9894. 'type' => 'int',
  9895. 'not NULL' => '1',
  9896. ),
  9897. ),
  9898. 'primary key' => array(
  9899. 0 => 'stockprop_pub_id',
  9900. ),
  9901. 'unique keys' => array(
  9902. 'stockprop_pub_c1' => array(
  9903. 0 => 'stockprop_id',
  9904. 1 => 'pub_id',
  9905. ),
  9906. ),
  9907. 'indexes' => array(
  9908. 'stockprop_pub_idx1' => array(
  9909. 0 => 'stockprop_id',
  9910. ),
  9911. 'stockprop_pub_idx2' => array(
  9912. 0 => 'pub_id',
  9913. ),
  9914. ),
  9915. 'foreign keys' => array(
  9916. 'pub' => array(
  9917. 'table' => 'pub',
  9918. 'columns' => array(
  9919. 'pub_id' => 'pub_id',
  9920. ),
  9921. ),
  9922. 'stockprop' => array(
  9923. 'table' => 'stockprop',
  9924. 'columns' => array(
  9925. 'stockprop_id' => 'stockprop_id',
  9926. ),
  9927. ),
  9928. ),
  9929. );
  9930. return $description;
  9931. }
  9932. /**
  9933. * Implements hook_chado_schema_v1_11_study()
  9934. * Purpose: To describe the structure of 'study' to tripal
  9935. * @see tripal_core_chado_insert()
  9936. * @see tripal_core_chado_update()
  9937. * @see tripal_core_chado_select()
  9938. *
  9939. * @return
  9940. * An array describing the 'study' table
  9941. *
  9942. * @ingroup tripal_chado_v1.11_schema_api
  9943. *
  9944. */
  9945. function tripal_core_chado_schema_v1_11_study() {
  9946. $description = array(
  9947. 'table' => 'study',
  9948. 'fields' => array(
  9949. 'study_id' => array(
  9950. 'type' => 'serial',
  9951. 'not NULL' => '1',
  9952. ),
  9953. 'contact_id' => array(
  9954. 'type' => 'int',
  9955. 'not NULL' => '1',
  9956. ),
  9957. 'pub_id' => array(
  9958. 'type' => 'int',
  9959. 'not NULL' => '',
  9960. ),
  9961. 'dbxref_id' => array(
  9962. 'type' => 'int',
  9963. 'not NULL' => '',
  9964. ),
  9965. 'name' => array(
  9966. 'type' => 'text',
  9967. 'not NULL' => '1',
  9968. ),
  9969. 'description' => array(
  9970. 'type' => 'text',
  9971. 'not NULL' => '',
  9972. ),
  9973. ),
  9974. 'primary key' => array(
  9975. 0 => 'study_id',
  9976. ),
  9977. 'unique keys' => array(
  9978. 'study_c1' => array(
  9979. 0 => 'name',
  9980. ),
  9981. ),
  9982. 'indexes' => array(
  9983. 'study_idx1' => array(
  9984. 0 => 'contact_id',
  9985. ),
  9986. 'study_idx2' => array(
  9987. 0 => 'pub_id',
  9988. ),
  9989. 'study_idx3' => array(
  9990. 0 => 'dbxref_id',
  9991. ),
  9992. ),
  9993. 'foreign keys' => array(
  9994. 'dbxref' => array(
  9995. 'table' => 'dbxref',
  9996. 'columns' => array(
  9997. 'dbxref_id' => 'dbxref_id',
  9998. ),
  9999. ),
  10000. 'pub' => array(
  10001. 'table' => 'pub',
  10002. 'columns' => array(
  10003. 'pub_id' => 'pub_id',
  10004. ),
  10005. ),
  10006. 'contact' => array(
  10007. 'table' => 'contact',
  10008. 'columns' => array(
  10009. 'contact_id' => 'contact_id',
  10010. ),
  10011. ),
  10012. ),
  10013. );
  10014. return $description;
  10015. }
  10016. /**
  10017. * Implements hook_chado_schema_v1_11_study_assay()
  10018. * Purpose: To describe the structure of 'study_assay' to tripal
  10019. * @see tripal_core_chado_insert()
  10020. * @see tripal_core_chado_update()
  10021. * @see tripal_core_chado_select()
  10022. *
  10023. * @return
  10024. * An array describing the 'study_assay' table
  10025. *
  10026. * @ingroup tripal_chado_v1.11_schema_api
  10027. *
  10028. */
  10029. function tripal_core_chado_schema_v1_11_study_assay() {
  10030. $description = array(
  10031. 'table' => 'study_assay',
  10032. 'fields' => array(
  10033. 'study_assay_id' => array(
  10034. 'type' => 'serial',
  10035. 'not NULL' => '1',
  10036. ),
  10037. 'study_id' => array(
  10038. 'type' => 'int',
  10039. 'not NULL' => '1',
  10040. ),
  10041. 'assay_id' => array(
  10042. 'type' => 'int',
  10043. 'not NULL' => '1',
  10044. ),
  10045. ),
  10046. 'primary key' => array(
  10047. 0 => 'study_assay_id',
  10048. ),
  10049. 'unique keys' => array(
  10050. 'study_assay_c1' => array(
  10051. 0 => 'study_id',
  10052. 1 => 'assay_id',
  10053. ),
  10054. ),
  10055. 'indexes' => array(
  10056. 'study_assay_idx1' => array(
  10057. 0 => 'study_id',
  10058. ),
  10059. 'study_assay_idx2' => array(
  10060. 0 => 'assay_id',
  10061. ),
  10062. ),
  10063. 'foreign keys' => array(
  10064. 'assay' => array(
  10065. 'table' => 'assay',
  10066. 'columns' => array(
  10067. 'assay_id' => 'assay_id',
  10068. ),
  10069. ),
  10070. 'study' => array(
  10071. 'table' => 'study',
  10072. 'columns' => array(
  10073. 'study_id' => 'study_id',
  10074. ),
  10075. ),
  10076. ),
  10077. );
  10078. return $description;
  10079. }
  10080. /**
  10081. * Implements hook_chado_schema_v1_11_studydesign()
  10082. * Purpose: To describe the structure of 'studydesign' to tripal
  10083. * @see tripal_core_chado_insert()
  10084. * @see tripal_core_chado_update()
  10085. * @see tripal_core_chado_select()
  10086. *
  10087. * @return
  10088. * An array describing the 'studydesign' table
  10089. *
  10090. * @ingroup tripal_chado_v1.11_schema_api
  10091. *
  10092. */
  10093. function tripal_core_chado_schema_v1_11_studydesign() {
  10094. $description = array(
  10095. 'table' => 'studydesign',
  10096. 'fields' => array(
  10097. 'studydesign_id' => array(
  10098. 'type' => 'serial',
  10099. 'not NULL' => '1',
  10100. ),
  10101. 'study_id' => array(
  10102. 'type' => 'int',
  10103. 'not NULL' => '1',
  10104. ),
  10105. 'description' => array(
  10106. 'type' => 'text',
  10107. 'not NULL' => '',
  10108. ),
  10109. ),
  10110. 'primary key' => array(
  10111. 0 => 'studydesign_id',
  10112. ),
  10113. 'unique keys' => array(
  10114. ),
  10115. 'indexes' => array(
  10116. 'studydesign_idx1' => array(
  10117. 0 => 'study_id',
  10118. ),
  10119. ),
  10120. 'foreign keys' => array(
  10121. 'study' => array(
  10122. 'table' => 'study',
  10123. 'columns' => array(
  10124. 'study_id' => 'study_id',
  10125. ),
  10126. ),
  10127. ),
  10128. );
  10129. return $description;
  10130. }
  10131. /**
  10132. * Implements hook_chado_schema_v1_11_studydesignprop()
  10133. * Purpose: To describe the structure of 'studydesignprop' to tripal
  10134. * @see tripal_core_chado_insert()
  10135. * @see tripal_core_chado_update()
  10136. * @see tripal_core_chado_select()
  10137. *
  10138. * @return
  10139. * An array describing the 'studydesignprop' table
  10140. *
  10141. * @ingroup tripal_chado_v1.11_schema_api
  10142. *
  10143. */
  10144. function tripal_core_chado_schema_v1_11_studydesignprop() {
  10145. $description = array(
  10146. 'table' => 'studydesignprop',
  10147. 'fields' => array(
  10148. 'studydesignprop_id' => array(
  10149. 'type' => 'serial',
  10150. 'not NULL' => '1',
  10151. ),
  10152. 'studydesign_id' => array(
  10153. 'type' => 'int',
  10154. 'not NULL' => '1',
  10155. ),
  10156. 'type_id' => array(
  10157. 'type' => 'int',
  10158. 'not NULL' => '1',
  10159. ),
  10160. 'value' => array(
  10161. 'type' => 'text',
  10162. 'not NULL' => '',
  10163. ),
  10164. 'rank' => array(
  10165. 'type' => 'int',
  10166. 'not NULL' => '1',
  10167. 'default' => '0',
  10168. ),
  10169. ),
  10170. 'primary key' => array(
  10171. 0 => 'studydesignprop_id',
  10172. ),
  10173. 'unique keys' => array(
  10174. 'studydesignprop_c1' => array(
  10175. 0 => 'studydesign_id',
  10176. 1 => 'type_id',
  10177. 2 => 'rank',
  10178. ),
  10179. ),
  10180. 'indexes' => array(
  10181. 'studydesignprop_idx1' => array(
  10182. 0 => 'studydesign_id',
  10183. ),
  10184. 'studydesignprop_idx2' => array(
  10185. 0 => 'type_id',
  10186. ),
  10187. ),
  10188. 'foreign keys' => array(
  10189. 'cvterm' => array(
  10190. 'table' => 'cvterm',
  10191. 'columns' => array(
  10192. 'type_id' => 'cvterm_id',
  10193. ),
  10194. ),
  10195. 'studydesign' => array(
  10196. 'table' => 'studydesign',
  10197. 'columns' => array(
  10198. 'studydesign_id' => 'studydesign_id',
  10199. ),
  10200. ),
  10201. ),
  10202. );
  10203. return $description;
  10204. }
  10205. /**
  10206. * Implements hook_chado_schema_v1_11_studyfactor()
  10207. * Purpose: To describe the structure of 'studyfactor' to tripal
  10208. * @see tripal_core_chado_insert()
  10209. * @see tripal_core_chado_update()
  10210. * @see tripal_core_chado_select()
  10211. *
  10212. * @return
  10213. * An array describing the 'studyfactor' table
  10214. *
  10215. * @ingroup tripal_chado_v1.11_schema_api
  10216. *
  10217. */
  10218. function tripal_core_chado_schema_v1_11_studyfactor() {
  10219. $description = array(
  10220. 'table' => 'studyfactor',
  10221. 'fields' => array(
  10222. 'studyfactor_id' => array(
  10223. 'type' => 'serial',
  10224. 'not NULL' => '1',
  10225. ),
  10226. 'studydesign_id' => array(
  10227. 'type' => 'int',
  10228. 'not NULL' => '1',
  10229. ),
  10230. 'type_id' => array(
  10231. 'type' => 'int',
  10232. 'not NULL' => '',
  10233. ),
  10234. 'name' => array(
  10235. 'type' => 'text',
  10236. 'not NULL' => '1',
  10237. ),
  10238. 'description' => array(
  10239. 'type' => 'text',
  10240. 'not NULL' => '',
  10241. ),
  10242. ),
  10243. 'primary key' => array(
  10244. 0 => 'studyfactor_id',
  10245. ),
  10246. 'unique keys' => array(
  10247. ),
  10248. 'indexes' => array(
  10249. 'studyfactor_idx1' => array(
  10250. 0 => 'studydesign_id',
  10251. ),
  10252. 'studyfactor_idx2' => array(
  10253. 0 => 'type_id',
  10254. ),
  10255. ),
  10256. 'foreign keys' => array(
  10257. 'cvterm' => array(
  10258. 'table' => 'cvterm',
  10259. 'columns' => array(
  10260. 'type_id' => 'cvterm_id',
  10261. ),
  10262. ),
  10263. 'studydesign' => array(
  10264. 'table' => 'studydesign',
  10265. 'columns' => array(
  10266. 'studydesign_id' => 'studydesign_id',
  10267. ),
  10268. ),
  10269. ),
  10270. );
  10271. return $description;
  10272. }
  10273. /**
  10274. * Implements hook_chado_schema_v1_11_studyfactorvalue()
  10275. * Purpose: To describe the structure of 'studyfactorvalue' to tripal
  10276. * @see tripal_core_chado_insert()
  10277. * @see tripal_core_chado_update()
  10278. * @see tripal_core_chado_select()
  10279. *
  10280. * @return
  10281. * An array describing the 'studyfactorvalue' table
  10282. *
  10283. * @ingroup tripal_chado_v1.11_schema_api
  10284. *
  10285. */
  10286. function tripal_core_chado_schema_v1_11_studyfactorvalue() {
  10287. $description = array(
  10288. 'table' => 'studyfactorvalue',
  10289. 'fields' => array(
  10290. 'studyfactorvalue_id' => array(
  10291. 'type' => 'serial',
  10292. 'not NULL' => '1',
  10293. ),
  10294. 'studyfactor_id' => array(
  10295. 'type' => 'int',
  10296. 'not NULL' => '1',
  10297. ),
  10298. 'assay_id' => array(
  10299. 'type' => 'int',
  10300. 'not NULL' => '1',
  10301. ),
  10302. 'factorvalue' => array(
  10303. 'type' => 'text',
  10304. 'not NULL' => '',
  10305. ),
  10306. 'name' => array(
  10307. 'type' => 'text',
  10308. 'not NULL' => '',
  10309. ),
  10310. 'rank' => array(
  10311. 'type' => 'int',
  10312. 'not NULL' => '1',
  10313. 'default' => '0',
  10314. ),
  10315. ),
  10316. 'primary key' => array(
  10317. 0 => 'studyfactorvalue_id',
  10318. ),
  10319. 'unique keys' => array(
  10320. ),
  10321. 'indexes' => array(
  10322. 'studyfactorvalue_idx1' => array(
  10323. 0 => 'studyfactor_id',
  10324. ),
  10325. 'studyfactorvalue_idx2' => array(
  10326. 0 => 'assay_id',
  10327. ),
  10328. ),
  10329. 'foreign keys' => array(
  10330. 'assay' => array(
  10331. 'table' => 'assay',
  10332. 'columns' => array(
  10333. 'assay_id' => 'assay_id',
  10334. ),
  10335. ),
  10336. 'studyfactor' => array(
  10337. 'table' => 'studyfactor',
  10338. 'columns' => array(
  10339. 'studyfactor_id' => 'studyfactor_id',
  10340. ),
  10341. ),
  10342. ),
  10343. );
  10344. return $description;
  10345. }
  10346. /**
  10347. * Implements hook_chado_schema_v1_11_studyprop()
  10348. * Purpose: To describe the structure of 'studyprop' to tripal
  10349. * @see tripal_core_chado_insert()
  10350. * @see tripal_core_chado_update()
  10351. * @see tripal_core_chado_select()
  10352. *
  10353. * @return
  10354. * An array describing the 'studyprop' table
  10355. *
  10356. * @ingroup tripal_chado_v1.11_schema_api
  10357. *
  10358. */
  10359. function tripal_core_chado_schema_v1_11_studyprop() {
  10360. $description = array(
  10361. 'table' => 'studyprop',
  10362. 'fields' => array(
  10363. 'studyprop_id' => array(
  10364. 'type' => 'serial',
  10365. 'not NULL' => '1',
  10366. ),
  10367. 'study_id' => array(
  10368. 'type' => 'int',
  10369. 'not NULL' => '1',
  10370. ),
  10371. 'type_id' => array(
  10372. 'type' => 'int',
  10373. 'not NULL' => '1',
  10374. ),
  10375. 'value' => array(
  10376. 'type' => 'text',
  10377. 'not NULL' => '',
  10378. ),
  10379. 'rank' => array(
  10380. 'type' => 'int',
  10381. 'not NULL' => '1',
  10382. 'default' => '0',
  10383. ),
  10384. ),
  10385. 'primary key' => array(
  10386. 0 => 'studyprop_id',
  10387. ),
  10388. 'unique keys' => array(
  10389. 'study_id' => array(
  10390. 0 => 'study_id',
  10391. 1 => 'type_id',
  10392. 2 => 'rank',
  10393. ),
  10394. ),
  10395. 'indexes' => array(
  10396. 'studyprop_idx1' => array(
  10397. 0 => 'study_id',
  10398. ),
  10399. 'studyprop_idx2' => array(
  10400. 0 => 'type_id',
  10401. ),
  10402. ),
  10403. 'foreign keys' => array(
  10404. 'cvterm' => array(
  10405. 'table' => 'cvterm',
  10406. 'columns' => array(
  10407. 'type_id' => 'cvterm_id',
  10408. ),
  10409. ),
  10410. 'study' => array(
  10411. 'table' => 'study',
  10412. 'columns' => array(
  10413. 'study_id' => 'study_id',
  10414. ),
  10415. ),
  10416. ),
  10417. );
  10418. return $description;
  10419. }
  10420. /**
  10421. * Implements hook_chado_schema_v1_11_studyprop_feature()
  10422. * Purpose: To describe the structure of 'studyprop_feature' to tripal
  10423. * @see tripal_core_chado_insert()
  10424. * @see tripal_core_chado_update()
  10425. * @see tripal_core_chado_select()
  10426. *
  10427. * @return
  10428. * An array describing the 'studyprop_feature' table
  10429. *
  10430. * @ingroup tripal_chado_v1.11_schema_api
  10431. *
  10432. */
  10433. function tripal_core_chado_schema_v1_11_studyprop_feature() {
  10434. $description = array(
  10435. 'table' => 'studyprop_feature',
  10436. 'fields' => array(
  10437. 'studyprop_feature_id' => array(
  10438. 'type' => 'serial',
  10439. 'not NULL' => '1',
  10440. ),
  10441. 'studyprop_id' => array(
  10442. 'type' => 'int',
  10443. 'not NULL' => '1',
  10444. ),
  10445. 'feature_id' => array(
  10446. 'type' => 'int',
  10447. 'not NULL' => '1',
  10448. ),
  10449. 'type_id' => array(
  10450. 'type' => 'int',
  10451. 'not NULL' => '',
  10452. ),
  10453. ),
  10454. 'primary key' => array(
  10455. 0 => 'studyprop_feature_id',
  10456. ),
  10457. 'unique keys' => array(
  10458. 'studyprop_id' => array(
  10459. 0 => 'studyprop_id',
  10460. 1 => 'feature_id',
  10461. ),
  10462. ),
  10463. 'indexes' => array(
  10464. 'studyprop_feature_idx1' => array(
  10465. 0 => 'studyprop_id',
  10466. ),
  10467. 'studyprop_feature_idx2' => array(
  10468. 0 => 'feature_id',
  10469. ),
  10470. ),
  10471. 'foreign keys' => array(
  10472. 'cvterm' => array(
  10473. 'table' => 'cvterm',
  10474. 'columns' => array(
  10475. 'type_id' => 'cvterm_id',
  10476. ),
  10477. ),
  10478. 'feature' => array(
  10479. 'table' => 'feature',
  10480. 'columns' => array(
  10481. 'feature_id' => 'feature_id',
  10482. ),
  10483. ),
  10484. 'studyprop' => array(
  10485. 'table' => 'studyprop',
  10486. 'columns' => array(
  10487. 'studyprop_id' => 'studyprop_id',
  10488. ),
  10489. ),
  10490. ),
  10491. );
  10492. return $description;
  10493. }
  10494. /**
  10495. * Implements hook_chado_schema_v1_11_synonym()
  10496. * Purpose: To describe the structure of 'synonym' to tripal
  10497. * @see tripal_core_chado_insert()
  10498. * @see tripal_core_chado_update()
  10499. * @see tripal_core_chado_select()
  10500. *
  10501. * @return
  10502. * An array describing the 'synonym' table
  10503. *
  10504. * @ingroup tripal_chado_v1.11_schema_api
  10505. *
  10506. */
  10507. function tripal_core_chado_schema_v1_11_synonym() {
  10508. $description = array(
  10509. 'table' => 'synonym',
  10510. 'fields' => array(
  10511. 'synonym_id' => array(
  10512. 'type' => 'serial',
  10513. 'not NULL' => '1',
  10514. ),
  10515. 'name' => array(
  10516. 'type' => 'varchar',
  10517. 'length' => '255',
  10518. 'not NULL' => '1',
  10519. ),
  10520. 'type_id' => array(
  10521. 'type' => 'int',
  10522. 'not NULL' => '1',
  10523. ),
  10524. 'synonym_sgml' => array(
  10525. 'type' => 'varchar',
  10526. 'length' => '255',
  10527. 'not NULL' => '1',
  10528. ),
  10529. ),
  10530. 'primary key' => array(
  10531. 0 => 'synonym_id',
  10532. ),
  10533. 'unique keys' => array(
  10534. 'synonym_c1' => array(
  10535. 0 => 'name',
  10536. 1 => 'type_id',
  10537. ),
  10538. ),
  10539. 'indexes' => array(
  10540. 'synonym_idx1' => array(
  10541. 0 => 'type_id',
  10542. ),
  10543. ),
  10544. 'foreign keys' => array(
  10545. 'cvterm' => array(
  10546. 'table' => 'cvterm',
  10547. 'columns' => array(
  10548. 'type_id' => 'cvterm_id',
  10549. ),
  10550. ),
  10551. ),
  10552. );
  10553. return $description;
  10554. }
  10555. /**
  10556. * Implements hook_chado_schema_v1_11_tableinfo()
  10557. * Purpose: To describe the structure of 'tableinfo' to tripal
  10558. * @see tripal_core_chado_insert()
  10559. * @see tripal_core_chado_update()
  10560. * @see tripal_core_chado_select()
  10561. *
  10562. * @return
  10563. * An array describing the 'tableinfo' table
  10564. *
  10565. * @ingroup tripal_chado_v1.11_schema_api
  10566. *
  10567. */
  10568. function tripal_core_chado_schema_v1_11_tableinfo() {
  10569. $description = array(
  10570. 'table' => 'tableinfo',
  10571. 'fields' => array(
  10572. 'tableinfo_id' => array(
  10573. 'type' => 'serial',
  10574. 'not NULL' => '1',
  10575. ),
  10576. 'name' => array(
  10577. 'type' => 'varchar',
  10578. 'length' => '30',
  10579. 'not NULL' => '1',
  10580. ),
  10581. 'primary_key_column' => array(
  10582. 'type' => 'varchar',
  10583. 'length' => '30',
  10584. 'not NULL' => '',
  10585. ),
  10586. 'is_view' => array(
  10587. 'type' => 'int',
  10588. 'not NULL' => '1',
  10589. 'default' => '0',
  10590. ),
  10591. 'view_on_table_id' => array(
  10592. 'type' => 'int',
  10593. 'not NULL' => '',
  10594. ),
  10595. 'superclass_table_id' => array(
  10596. 'type' => 'int',
  10597. 'not NULL' => '',
  10598. ),
  10599. 'is_updateable' => array(
  10600. 'type' => 'int',
  10601. 'not NULL' => '1',
  10602. 'default' => '1',
  10603. ),
  10604. 'modification_date' => array(
  10605. 'type' => 'date',
  10606. 'not NULL' => '1',
  10607. 'default' => 'ow(',
  10608. ),
  10609. ),
  10610. 'primary key' => array(
  10611. 0 => 'tableinfo_id',
  10612. ),
  10613. 'unique keys' => array(
  10614. 'tableinfo_c1' => array(
  10615. 0 => 'name',
  10616. ),
  10617. ),
  10618. 'indexes' => array(
  10619. ),
  10620. 'foreign keys' => array(
  10621. ),
  10622. );
  10623. return $description;
  10624. }
  10625. /**
  10626. * Implements hook_chado_schema_v1_11_treatment()
  10627. * Purpose: To describe the structure of 'treatment' to tripal
  10628. * @see tripal_core_chado_insert()
  10629. * @see tripal_core_chado_update()
  10630. * @see tripal_core_chado_select()
  10631. *
  10632. * @return
  10633. * An array describing the 'treatment' table
  10634. *
  10635. * @ingroup tripal_chado_v1.11_schema_api
  10636. *
  10637. */
  10638. function tripal_core_chado_schema_v1_11_treatment() {
  10639. $description = array(
  10640. 'table' => 'treatment',
  10641. 'fields' => array(
  10642. 'treatment_id' => array(
  10643. 'type' => 'serial',
  10644. 'not NULL' => '1',
  10645. ),
  10646. 'rank' => array(
  10647. 'type' => 'int',
  10648. 'not NULL' => '1',
  10649. 'default' => '0',
  10650. ),
  10651. 'biomaterial_id' => array(
  10652. 'type' => 'int',
  10653. 'not NULL' => '1',
  10654. ),
  10655. 'type_id' => array(
  10656. 'type' => 'int',
  10657. 'not NULL' => '1',
  10658. ),
  10659. 'protocol_id' => array(
  10660. 'type' => 'int',
  10661. 'not NULL' => '',
  10662. ),
  10663. 'name' => array(
  10664. 'type' => 'text',
  10665. 'not NULL' => '',
  10666. ),
  10667. ),
  10668. 'primary key' => array(
  10669. 0 => 'treatment_id',
  10670. ),
  10671. 'unique keys' => array(
  10672. ),
  10673. 'indexes' => array(
  10674. 'treatment_idx1' => array(
  10675. 0 => 'biomaterial_id',
  10676. ),
  10677. 'treatment_idx2' => array(
  10678. 0 => 'type_id',
  10679. ),
  10680. 'treatment_idx3' => array(
  10681. 0 => 'protocol_id',
  10682. ),
  10683. ),
  10684. 'foreign keys' => array(
  10685. 'cvterm' => array(
  10686. 'table' => 'cvterm',
  10687. 'columns' => array(
  10688. 'type_id' => 'cvterm_id',
  10689. ),
  10690. ),
  10691. 'protocol' => array(
  10692. 'table' => 'protocol',
  10693. 'columns' => array(
  10694. 'protocol_id' => 'protocol_id',
  10695. ),
  10696. ),
  10697. 'biomaterial' => array(
  10698. 'table' => 'biomaterial',
  10699. 'columns' => array(
  10700. 'biomaterial_id' => 'biomaterial_id',
  10701. ),
  10702. ),
  10703. ),
  10704. );
  10705. return $description;
  10706. }
  10707. /**
  10708. * Lists the table names in the v1.11 chado schema
  10709. *
  10710. * @return
  10711. * An array containing all of the table names
  10712. *
  10713. * @ingroup tripal_chado_v1.2_schema_api
  10714. *
  10715. */
  10716. function tripal_core_chado_get_v1_11_tables() {
  10717. $tables = array(
  10718. 'acquisition',
  10719. 'acquisition_relationship',
  10720. 'acquisitionprop',
  10721. 'analysis',
  10722. 'analysisfeature',
  10723. 'analysisfeatureprop',
  10724. 'analysisprop',
  10725. 'arraydesign',
  10726. 'arraydesignprop',
  10727. 'assay',
  10728. 'assay_biomaterial',
  10729. 'assay_project',
  10730. 'assayprop',
  10731. 'biomaterial',
  10732. 'biomaterial_dbxref',
  10733. 'biomaterial_relationship',
  10734. 'biomaterial_treatment',
  10735. 'biomaterialprop',
  10736. 'cell_line',
  10737. 'cell_line_cvterm',
  10738. 'cell_line_cvtermprop',
  10739. 'cell_line_dbxref',
  10740. 'cell_line_feature',
  10741. 'cell_line_library',
  10742. 'cell_line_pub',
  10743. 'cell_line_relationship',
  10744. 'cell_line_synonym',
  10745. 'cell_lineprop',
  10746. 'cell_lineprop_pub',
  10747. 'channel',
  10748. 'contact',
  10749. 'contact_relationship',
  10750. 'control',
  10751. 'cv',
  10752. 'cvterm',
  10753. 'cvterm_dbxref',
  10754. 'cvterm_relationship',
  10755. 'cvtermpath',
  10756. 'cvtermprop',
  10757. 'cvtermsynonym',
  10758. 'db',
  10759. 'dbxref',
  10760. 'dbxrefprop',
  10761. 'eimage',
  10762. 'element',
  10763. 'element_relationship',
  10764. 'elementresult',
  10765. 'elementresult_relationship',
  10766. 'environment',
  10767. 'environment_cvterm',
  10768. 'expression',
  10769. 'expression_cvterm',
  10770. 'expression_cvtermprop',
  10771. 'expression_image',
  10772. 'expression_pub',
  10773. 'expressionprop',
  10774. 'feature',
  10775. 'feature_cvterm',
  10776. 'feature_cvterm_dbxref',
  10777. 'feature_cvterm_pub',
  10778. 'feature_cvtermprop',
  10779. 'feature_dbxref',
  10780. 'feature_expression',
  10781. 'feature_expressionprop',
  10782. 'feature_genotype',
  10783. 'feature_phenotype',
  10784. 'feature_pub',
  10785. 'feature_pubprop',
  10786. 'feature_relationship',
  10787. 'feature_relationship_pub',
  10788. 'feature_relationshipprop',
  10789. 'feature_relationshipprop_pub',
  10790. 'feature_synonym',
  10791. 'featureloc',
  10792. 'featureloc_pub',
  10793. 'featuremap',
  10794. 'featuremap_pub',
  10795. 'featurepos',
  10796. 'featureprop',
  10797. 'featureprop_pub',
  10798. 'featurerange',
  10799. 'genotype',
  10800. 'library',
  10801. 'library_cvterm',
  10802. 'library_dbxref',
  10803. 'library_feature',
  10804. 'library_pub',
  10805. 'library_synonym',
  10806. 'libraryprop',
  10807. 'libraryprop_pub',
  10808. 'magedocumentation',
  10809. 'mageml',
  10810. 'materialized_view',
  10811. 'organism',
  10812. 'organism_dbxref',
  10813. 'organismprop',
  10814. 'phendesc',
  10815. 'phenotype',
  10816. 'phenotype_comparison',
  10817. 'phenotype_comparison_cvterm',
  10818. 'phenotype_cvterm',
  10819. 'phenstatement',
  10820. 'phylonode',
  10821. 'phylonode_dbxref',
  10822. 'phylonode_organism',
  10823. 'phylonode_pub',
  10824. 'phylonode_relationship',
  10825. 'phylonodeprop',
  10826. 'phylotree',
  10827. 'phylotree_pub',
  10828. 'project',
  10829. 'protocol',
  10830. 'protocolparam',
  10831. 'pub',
  10832. 'pub_dbxref',
  10833. 'pub_relationship',
  10834. 'pubauthor',
  10835. 'pubprop',
  10836. 'quantification',
  10837. 'quantification_relationship',
  10838. 'quantificationprop',
  10839. 'stock',
  10840. 'stock_cvterm',
  10841. 'stock_dbxref',
  10842. 'stock_genotype',
  10843. 'stock_pub',
  10844. 'stock_relationship',
  10845. 'stock_relationship_pub',
  10846. 'stockcollection',
  10847. 'stockcollection_stock',
  10848. 'stockcollectionprop',
  10849. 'stockprop',
  10850. 'stockprop_pub',
  10851. 'study',
  10852. 'study_assay',
  10853. 'studydesign',
  10854. 'studydesignprop',
  10855. 'studyfactor',
  10856. 'studyfactorvalue',
  10857. 'studyprop',
  10858. 'studyprop_feature',
  10859. 'synonym',
  10860. 'tableinfo',
  10861. 'treatment'
  10862. );
  10863. return $tables;
  10864. }