tripal_core.schema_v1.11.api.inc 252 KB

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