tripal_core.schema_v1.11.api.inc 250 KB

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