tripal_core.schema_v1.11.api.inc 248 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753
  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_api Core Module Schema API
  12. * @{
  13. * Provides an application programming interface (API) for describing Chado tables.
  14. * This API consists of a set of functions, one for each table in Chado. Each
  15. * function simply returns a Drupal style array that defines the table.
  16. *
  17. * Because Drupal 6 does not handle foreign key (FK) relationships, however FK
  18. * relationships are needed to for Tripal Views. Therefore, FK relationships
  19. * have been added to the schema defintitions below.
  20. *
  21. * The functions provided in this documentation should not be called as is, but if you need
  22. * the Drupal-style array definition for any table, use the following function
  23. * call:
  24. *
  25. * $table_desc = tripal_core_get_chado_table_schema($table)
  26. *
  27. * where the variable $table contains the name of the table you want to
  28. * retireve. The tripal_core_get_chado_table_schema function determines the appropriate version of
  29. * Chado and uses the Drupal hook infrastructure to call the appropriate
  30. * hook function to retrieve the table schema.
  31. *
  32. * @}
  33. * @ingroup tripal_api
  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. 'fields' => array(
  6123. 'library_id' => array(
  6124. 'type' => 'serial',
  6125. 'not NULL' => '1',
  6126. ),
  6127. 'organism_id' => array(
  6128. 'type' => 'int',
  6129. 'not NULL' => '1',
  6130. ),
  6131. 'name' => array(
  6132. 'type' => 'varchar',
  6133. 'length' => '255',
  6134. 'not NULL' => '',
  6135. ),
  6136. 'uniquename' => array(
  6137. 'type' => 'text',
  6138. 'not NULL' => '1',
  6139. ),
  6140. 'type_id' => array(
  6141. 'type' => 'int',
  6142. 'not NULL' => '1',
  6143. ),
  6144. 'is_obsolete' => array(
  6145. 'type' => 'int',
  6146. 'not NULL' => '1',
  6147. 'default' => '0',
  6148. ),
  6149. 'timeaccessioned' => array(
  6150. 'type' => 'datetime',
  6151. 'not NULL' => '1',
  6152. 'default' => 'ow(',
  6153. ),
  6154. 'timelastmodified' => array(
  6155. 'type' => 'datetime',
  6156. 'not NULL' => '1',
  6157. 'default' => 'ow(',
  6158. ),
  6159. ),
  6160. 'primary key' => array(
  6161. 0 => 'library_id',
  6162. ),
  6163. 'unique keys' => array(
  6164. 'library_c1' => array(
  6165. 0 => 'organism_id',
  6166. 1 => 'uniquename',
  6167. 2 => 'type_id',
  6168. ),
  6169. ),
  6170. 'indexes' => array(
  6171. 'library_idx1' => array(
  6172. 0 => 'organism_id',
  6173. ),
  6174. 'library_idx2' => array(
  6175. 0 => 'type_id',
  6176. ),
  6177. 'library_idx3' => array(
  6178. 0 => 'uniquename',
  6179. ),
  6180. 'library_name_ind1' => array(
  6181. 0 => 'name',
  6182. ),
  6183. ),
  6184. 'foreign keys' => array(
  6185. 'cvterm' => array(
  6186. 'table' => 'cvterm',
  6187. 'columns' => array(
  6188. 'type_id' => 'cvterm_id',
  6189. ),
  6190. ),
  6191. 'organism' => array(
  6192. 'table' => 'organism',
  6193. 'columns' => array(
  6194. 'organism_id' => 'organism_id',
  6195. ),
  6196. ),
  6197. ),
  6198. );
  6199. return $description;
  6200. }
  6201. /**
  6202. * Implements hook_chado_schema_v1_11_library_cvterm()
  6203. * Purpose: To describe the structure of 'library_cvterm' to tripal
  6204. * @see tripal_core_chado_insert()
  6205. * @see tripal_core_chado_update()
  6206. * @see tripal_core_chado_select()
  6207. *
  6208. * @return
  6209. * An array describing the 'library_cvterm' table
  6210. *
  6211. * @ingroup tripal_chado_v1.11_schema_api
  6212. *
  6213. */
  6214. function tripal_core_chado_schema_v1_11_library_cvterm() {
  6215. $description = array(
  6216. 'table' => 'library_cvterm',
  6217. 'fields' => array(
  6218. 'library_cvterm_id' => array(
  6219. 'type' => 'serial',
  6220. 'not NULL' => '1',
  6221. ),
  6222. 'library_id' => array(
  6223. 'type' => 'int',
  6224. 'not NULL' => '1',
  6225. ),
  6226. 'cvterm_id' => array(
  6227. 'type' => 'int',
  6228. 'not NULL' => '1',
  6229. ),
  6230. 'pub_id' => array(
  6231. 'type' => 'int',
  6232. 'not NULL' => '1',
  6233. ),
  6234. ),
  6235. 'primary key' => array(
  6236. 0 => 'library_cvterm_id',
  6237. ),
  6238. 'unique keys' => array(
  6239. 'library_cvterm_c1' => array(
  6240. 0 => 'library_id',
  6241. 1 => 'cvterm_id',
  6242. 2 => 'pub_id',
  6243. ),
  6244. ),
  6245. 'indexes' => array(
  6246. 'library_cvterm_idx1' => array(
  6247. 0 => 'library_id',
  6248. ),
  6249. 'library_cvterm_idx2' => array(
  6250. 0 => 'cvterm_id',
  6251. ),
  6252. 'library_cvterm_idx3' => array(
  6253. 0 => 'pub_id',
  6254. ),
  6255. ),
  6256. 'foreign keys' => array(
  6257. 'cvterm' => array(
  6258. 'table' => 'cvterm',
  6259. 'columns' => array(
  6260. 'cvterm_id' => 'cvterm_id',
  6261. ),
  6262. ),
  6263. 'pub' => array(
  6264. 'table' => 'pub',
  6265. 'columns' => array(
  6266. 'pub_id' => 'pub_id',
  6267. ),
  6268. ),
  6269. 'library' => array(
  6270. 'table' => 'library',
  6271. 'columns' => array(
  6272. 'library_id' => 'library_id',
  6273. ),
  6274. ),
  6275. ),
  6276. );
  6277. return $description;
  6278. }
  6279. /**
  6280. * Implements hook_chado_schema_v1_11_library_dbxref()
  6281. * Purpose: To describe the structure of 'library_dbxref' to tripal
  6282. * @see tripal_core_chado_insert()
  6283. * @see tripal_core_chado_update()
  6284. * @see tripal_core_chado_select()
  6285. *
  6286. * @return
  6287. * An array describing the 'library_dbxref' table
  6288. *
  6289. * @ingroup tripal_chado_v1.11_schema_api
  6290. *
  6291. */
  6292. function tripal_core_chado_schema_v1_11_library_dbxref() {
  6293. $description = array(
  6294. 'table' => 'library_dbxref',
  6295. 'fields' => array(
  6296. 'library_dbxref_id' => array(
  6297. 'type' => 'serial',
  6298. 'not NULL' => '1',
  6299. ),
  6300. 'library_id' => array(
  6301. 'type' => 'int',
  6302. 'not NULL' => '1',
  6303. ),
  6304. 'dbxref_id' => array(
  6305. 'type' => 'int',
  6306. 'not NULL' => '1',
  6307. ),
  6308. 'is_current' => array(
  6309. 'type' => 'boolean',
  6310. 'not NULL' => '1',
  6311. 'default' => 'ru',
  6312. ),
  6313. ),
  6314. 'primary key' => array(
  6315. 0 => 'library_dbxref_id',
  6316. ),
  6317. 'unique keys' => array(
  6318. 'library_dbxref_c1' => array(
  6319. 0 => 'library_id',
  6320. 1 => 'dbxref_id',
  6321. ),
  6322. ),
  6323. 'indexes' => array(
  6324. 'library_dbxref_idx1' => array(
  6325. 0 => 'library_id',
  6326. ),
  6327. 'library_dbxref_idx2' => array(
  6328. 0 => 'dbxref_id',
  6329. ),
  6330. ),
  6331. 'foreign keys' => array(
  6332. 'dbxref' => array(
  6333. 'table' => 'dbxref',
  6334. 'columns' => array(
  6335. 'dbxref_id' => 'dbxref_id',
  6336. ),
  6337. ),
  6338. 'library' => array(
  6339. 'table' => 'library',
  6340. 'columns' => array(
  6341. 'library_id' => 'library_id',
  6342. ),
  6343. ),
  6344. ),
  6345. );
  6346. return $description;
  6347. }
  6348. /**
  6349. * Implements hook_chado_schema_v1_11_library_feature()
  6350. * Purpose: To describe the structure of 'library_feature' to tripal
  6351. * @see tripal_core_chado_insert()
  6352. * @see tripal_core_chado_update()
  6353. * @see tripal_core_chado_select()
  6354. *
  6355. * @return
  6356. * An array describing the 'library_feature' table
  6357. *
  6358. * @ingroup tripal_chado_v1.11_schema_api
  6359. *
  6360. */
  6361. function tripal_core_chado_schema_v1_11_library_feature() {
  6362. $description = array(
  6363. 'table' => 'library_feature',
  6364. 'fields' => array(
  6365. 'library_feature_id' => array(
  6366. 'type' => 'serial',
  6367. 'not NULL' => '1',
  6368. ),
  6369. 'library_id' => array(
  6370. 'type' => 'int',
  6371. 'not NULL' => '1',
  6372. ),
  6373. 'feature_id' => array(
  6374. 'type' => 'int',
  6375. 'not NULL' => '1',
  6376. ),
  6377. ),
  6378. 'primary key' => array(
  6379. 0 => 'library_feature_id',
  6380. ),
  6381. 'unique keys' => array(
  6382. 'library_feature_c1' => array(
  6383. 0 => 'library_id',
  6384. 1 => 'feature_id',
  6385. ),
  6386. ),
  6387. 'indexes' => array(
  6388. 'library_feature_idx1' => array(
  6389. 0 => 'library_id',
  6390. ),
  6391. 'library_feature_idx2' => array(
  6392. 0 => 'feature_id',
  6393. ),
  6394. ),
  6395. 'foreign keys' => array(
  6396. 'feature' => array(
  6397. 'table' => 'feature',
  6398. 'columns' => array(
  6399. 'feature_id' => 'feature_id',
  6400. ),
  6401. ),
  6402. 'library' => array(
  6403. 'table' => 'library',
  6404. 'columns' => array(
  6405. 'library_id' => 'library_id',
  6406. ),
  6407. ),
  6408. ),
  6409. );
  6410. return $description;
  6411. }
  6412. /**
  6413. * Implements hook_chado_schema_v1_11_library_pub()
  6414. * Purpose: To describe the structure of 'library_pub' to tripal
  6415. * @see tripal_core_chado_insert()
  6416. * @see tripal_core_chado_update()
  6417. * @see tripal_core_chado_select()
  6418. *
  6419. * @return
  6420. * An array describing the 'library_pub' table
  6421. *
  6422. * @ingroup tripal_chado_v1.11_schema_api
  6423. *
  6424. */
  6425. function tripal_core_chado_schema_v1_11_library_pub() {
  6426. $description = array(
  6427. 'table' => 'library_pub',
  6428. 'fields' => array(
  6429. 'library_pub_id' => array(
  6430. 'type' => 'serial',
  6431. 'not NULL' => '1',
  6432. ),
  6433. 'library_id' => array(
  6434. 'type' => 'int',
  6435. 'not NULL' => '1',
  6436. ),
  6437. 'pub_id' => array(
  6438. 'type' => 'int',
  6439. 'not NULL' => '1',
  6440. ),
  6441. ),
  6442. 'primary key' => array(
  6443. 0 => 'library_pub_id',
  6444. ),
  6445. 'unique keys' => array(
  6446. 'library_pub_c1' => array(
  6447. 0 => 'library_id',
  6448. 1 => 'pub_id',
  6449. ),
  6450. ),
  6451. 'indexes' => array(
  6452. 'library_pub_idx1' => array(
  6453. 0 => 'library_id',
  6454. ),
  6455. 'library_pub_idx2' => array(
  6456. 0 => 'pub_id',
  6457. ),
  6458. ),
  6459. 'foreign keys' => array(
  6460. 'pub' => array(
  6461. 'table' => 'pub',
  6462. 'columns' => array(
  6463. 'pub_id' => 'pub_id',
  6464. ),
  6465. ),
  6466. 'library' => array(
  6467. 'table' => 'library',
  6468. 'columns' => array(
  6469. 'library_id' => 'library_id',
  6470. ),
  6471. ),
  6472. ),
  6473. );
  6474. return $description;
  6475. }
  6476. /**
  6477. * Implements hook_chado_schema_v1_11_library_synonym()
  6478. * Purpose: To describe the structure of 'library_synonym' to tripal
  6479. * @see tripal_core_chado_insert()
  6480. * @see tripal_core_chado_update()
  6481. * @see tripal_core_chado_select()
  6482. *
  6483. * @return
  6484. * An array describing the 'library_synonym' table
  6485. *
  6486. * @ingroup tripal_chado_v1.11_schema_api
  6487. *
  6488. */
  6489. function tripal_core_chado_schema_v1_11_library_synonym() {
  6490. $description = array(
  6491. 'table' => 'library_synonym',
  6492. 'fields' => array(
  6493. 'library_synonym_id' => array(
  6494. 'type' => 'serial',
  6495. 'not NULL' => '1',
  6496. ),
  6497. 'synonym_id' => array(
  6498. 'type' => 'int',
  6499. 'not NULL' => '1',
  6500. ),
  6501. 'library_id' => array(
  6502. 'type' => 'int',
  6503. 'not NULL' => '1',
  6504. ),
  6505. 'pub_id' => array(
  6506. 'type' => 'int',
  6507. 'not NULL' => '1',
  6508. ),
  6509. 'is_current' => array(
  6510. 'type' => 'boolean',
  6511. 'not NULL' => '1',
  6512. 'default' => 'ru',
  6513. ),
  6514. 'is_internal' => array(
  6515. 'type' => 'boolean',
  6516. 'not NULL' => '1',
  6517. 'default' => 'als',
  6518. ),
  6519. ),
  6520. 'primary key' => array(
  6521. 0 => 'library_synonym_id',
  6522. ),
  6523. 'unique keys' => array(
  6524. 'library_synonym_c1' => array(
  6525. 0 => 'synonym_id',
  6526. 1 => 'library_id',
  6527. 2 => 'pub_id',
  6528. ),
  6529. ),
  6530. 'indexes' => array(
  6531. 'library_synonym_idx1' => array(
  6532. 0 => 'synonym_id',
  6533. ),
  6534. 'library_synonym_idx2' => array(
  6535. 0 => 'library_id',
  6536. ),
  6537. 'library_synonym_idx3' => array(
  6538. 0 => 'pub_id',
  6539. ),
  6540. ),
  6541. 'foreign keys' => array(
  6542. 'pub' => array(
  6543. 'table' => 'pub',
  6544. 'columns' => array(
  6545. 'pub_id' => 'pub_id',
  6546. ),
  6547. ),
  6548. 'synonym' => array(
  6549. 'table' => 'synonym',
  6550. 'columns' => array(
  6551. 'synonym_id' => 'synonym_id',
  6552. ),
  6553. ),
  6554. 'library' => array(
  6555. 'table' => 'library',
  6556. 'columns' => array(
  6557. 'library_id' => 'library_id',
  6558. ),
  6559. ),
  6560. ),
  6561. );
  6562. return $description;
  6563. }
  6564. /**
  6565. * Implements hook_chado_schema_v1_11_libraryprop()
  6566. * Purpose: To describe the structure of 'libraryprop' to tripal
  6567. * @see tripal_core_chado_insert()
  6568. * @see tripal_core_chado_update()
  6569. * @see tripal_core_chado_select()
  6570. *
  6571. * @return
  6572. * An array describing the 'libraryprop' table
  6573. *
  6574. * @ingroup tripal_chado_v1.11_schema_api
  6575. *
  6576. */
  6577. function tripal_core_chado_schema_v1_11_libraryprop() {
  6578. $description = array(
  6579. 'table' => 'libraryprop',
  6580. 'fields' => array(
  6581. 'libraryprop_id' => array(
  6582. 'type' => 'serial',
  6583. 'not NULL' => '1',
  6584. ),
  6585. 'library_id' => array(
  6586. 'type' => 'int',
  6587. 'not NULL' => '1',
  6588. ),
  6589. 'type_id' => array(
  6590. 'type' => 'int',
  6591. 'not NULL' => '1',
  6592. ),
  6593. 'value' => array(
  6594. 'type' => 'text',
  6595. 'not NULL' => '',
  6596. ),
  6597. 'rank' => array(
  6598. 'type' => 'int',
  6599. 'not NULL' => '1',
  6600. 'default' => '0',
  6601. ),
  6602. ),
  6603. 'primary key' => array(
  6604. 0 => 'libraryprop_id',
  6605. ),
  6606. 'unique keys' => array(
  6607. 'libraryprop_c1' => array(
  6608. 0 => 'library_id',
  6609. 1 => 'type_id',
  6610. 2 => 'rank',
  6611. ),
  6612. ),
  6613. 'indexes' => array(
  6614. 'libraryprop_idx1' => array(
  6615. 0 => 'library_id',
  6616. ),
  6617. 'libraryprop_idx2' => array(
  6618. 0 => 'type_id',
  6619. ),
  6620. ),
  6621. 'foreign keys' => array(
  6622. 'cvterm' => array(
  6623. 'table' => 'cvterm',
  6624. 'columns' => array(
  6625. 'type_id' => 'cvterm_id',
  6626. ),
  6627. ),
  6628. 'library' => array(
  6629. 'table' => 'library',
  6630. 'columns' => array(
  6631. 'library_id' => 'library_id',
  6632. ),
  6633. ),
  6634. ),
  6635. );
  6636. return $description;
  6637. }
  6638. /**
  6639. * Implements hook_chado_schema_v1_11_libraryprop_pub()
  6640. * Purpose: To describe the structure of 'libraryprop_pub' to tripal
  6641. * @see tripal_core_chado_insert()
  6642. * @see tripal_core_chado_update()
  6643. * @see tripal_core_chado_select()
  6644. *
  6645. * @return
  6646. * An array describing the 'libraryprop_pub' table
  6647. *
  6648. * @ingroup tripal_chado_v1.11_schema_api
  6649. *
  6650. */
  6651. function tripal_core_chado_schema_v1_11_libraryprop_pub() {
  6652. $description = array(
  6653. 'table' => 'libraryprop_pub',
  6654. 'fields' => array(
  6655. 'libraryprop_pub_id' => array(
  6656. 'type' => 'serial',
  6657. 'not NULL' => '1',
  6658. ),
  6659. 'libraryprop_id' => array(
  6660. 'type' => 'int',
  6661. 'not NULL' => '1',
  6662. ),
  6663. 'pub_id' => array(
  6664. 'type' => 'int',
  6665. 'not NULL' => '1',
  6666. ),
  6667. ),
  6668. 'primary key' => array(
  6669. 0 => 'libraryprop_pub_id',
  6670. ),
  6671. 'unique keys' => array(
  6672. 'libraryprop_pub_c1' => array(
  6673. 0 => 'libraryprop_id',
  6674. 1 => 'pub_id',
  6675. ),
  6676. ),
  6677. 'indexes' => array(
  6678. 'libraryprop_pub_idx1' => array(
  6679. 0 => 'libraryprop_id',
  6680. ),
  6681. 'libraryprop_pub_idx2' => array(
  6682. 0 => 'pub_id',
  6683. ),
  6684. ),
  6685. 'foreign keys' => array(
  6686. 'pub' => array(
  6687. 'table' => 'pub',
  6688. 'columns' => array(
  6689. 'pub_id' => 'pub_id',
  6690. ),
  6691. ),
  6692. 'libraryprop' => array(
  6693. 'table' => 'libraryprop',
  6694. 'columns' => array(
  6695. 'libraryprop_id' => 'libraryprop_id',
  6696. ),
  6697. ),
  6698. ),
  6699. );
  6700. return $description;
  6701. }
  6702. /**
  6703. * Implements hook_chado_schema_v1_11_magedocumentation()
  6704. * Purpose: To describe the structure of 'magedocumentation' to tripal
  6705. * @see tripal_core_chado_insert()
  6706. * @see tripal_core_chado_update()
  6707. * @see tripal_core_chado_select()
  6708. *
  6709. * @return
  6710. * An array describing the 'magedocumentation' table
  6711. *
  6712. * @ingroup tripal_chado_v1.11_schema_api
  6713. *
  6714. */
  6715. function tripal_core_chado_schema_v1_11_magedocumentation() {
  6716. $description = array(
  6717. 'table' => 'magedocumentation',
  6718. 'fields' => array(
  6719. 'magedocumentation_id' => array(
  6720. 'type' => 'serial',
  6721. 'not NULL' => '1',
  6722. ),
  6723. 'mageml_id' => array(
  6724. 'type' => 'int',
  6725. 'not NULL' => '1',
  6726. ),
  6727. 'tableinfo_id' => array(
  6728. 'type' => 'int',
  6729. 'not NULL' => '1',
  6730. ),
  6731. 'row_id' => array(
  6732. 'type' => 'int',
  6733. 'not NULL' => '1',
  6734. ),
  6735. 'mageidentifier' => array(
  6736. 'type' => 'text',
  6737. 'not NULL' => '1',
  6738. ),
  6739. ),
  6740. 'primary key' => array(
  6741. 0 => 'magedocumentation_id',
  6742. ),
  6743. 'unique keys' => array(
  6744. ),
  6745. 'indexes' => array(
  6746. 'magedocumentation_idx1' => array(
  6747. 0 => 'mageml_id',
  6748. ),
  6749. 'magedocumentation_idx2' => array(
  6750. 0 => 'tableinfo_id',
  6751. ),
  6752. 'magedocumentation_idx3' => array(
  6753. 0 => 'row_id',
  6754. ),
  6755. ),
  6756. 'foreign keys' => array(
  6757. 'tableinfo' => array(
  6758. 'table' => 'tableinfo',
  6759. 'columns' => array(
  6760. 'tableinfo_id' => 'tableinfo_id',
  6761. ),
  6762. ),
  6763. 'mageml' => array(
  6764. 'table' => 'mageml',
  6765. 'columns' => array(
  6766. 'mageml_id' => 'mageml_id',
  6767. ),
  6768. ),
  6769. ),
  6770. );
  6771. return $description;
  6772. }
  6773. /**
  6774. * Implements hook_chado_schema_v1_11_mageml()
  6775. * Purpose: To describe the structure of 'mageml' to tripal
  6776. * @see tripal_core_chado_insert()
  6777. * @see tripal_core_chado_update()
  6778. * @see tripal_core_chado_select()
  6779. *
  6780. * @return
  6781. * An array describing the 'mageml' table
  6782. *
  6783. * @ingroup tripal_chado_v1.11_schema_api
  6784. *
  6785. */
  6786. function tripal_core_chado_schema_v1_11_mageml() {
  6787. $description = array(
  6788. 'table' => 'mageml',
  6789. 'fields' => array(
  6790. 'mageml_id' => array(
  6791. 'type' => 'serial',
  6792. 'not NULL' => '1',
  6793. ),
  6794. 'mage_package' => array(
  6795. 'type' => 'text',
  6796. 'not NULL' => '1',
  6797. ),
  6798. 'mage_ml' => array(
  6799. 'type' => 'text',
  6800. 'not NULL' => '1',
  6801. ),
  6802. ),
  6803. 'primary key' => array(
  6804. 0 => 'mageml_id',
  6805. ),
  6806. 'unique keys' => array(
  6807. ),
  6808. 'indexes' => array(
  6809. ),
  6810. 'foreign keys' => array(
  6811. ),
  6812. );
  6813. return $description;
  6814. }
  6815. /**
  6816. * Implements hook_chado_schema_v1_11_materialized_view()
  6817. * Purpose: To describe the structure of 'materialized_view' to tripal
  6818. * @see tripal_core_chado_insert()
  6819. * @see tripal_core_chado_update()
  6820. * @see tripal_core_chado_select()
  6821. *
  6822. * @return
  6823. * An array describing the 'materialized_view' table
  6824. *
  6825. * @ingroup tripal_chado_v1.11_schema_api
  6826. *
  6827. */
  6828. function tripal_core_chado_schema_v1_11_materialized_view() {
  6829. $description = array(
  6830. 'table' => 'materialized_view',
  6831. 'fields' => array(
  6832. 'materialized_view_id' => array(
  6833. 'type' => 'serial',
  6834. 'not NULL' => '1',
  6835. ),
  6836. 'last_update' => array(
  6837. 'type' => 'datetime',
  6838. 'not NULL' => '',
  6839. ),
  6840. 'refresh_time' => array(
  6841. 'type' => 'int',
  6842. 'not NULL' => '',
  6843. ),
  6844. 'name' => array(
  6845. 'type' => 'varchar',
  6846. 'length' => '64',
  6847. 'not NULL' => '',
  6848. ),
  6849. 'mv_schema' => array(
  6850. 'type' => 'varchar',
  6851. 'length' => '64',
  6852. 'not NULL' => '',
  6853. ),
  6854. 'mv_table' => array(
  6855. 'type' => 'varchar',
  6856. 'length' => '128',
  6857. 'not NULL' => '',
  6858. ),
  6859. 'mv_specs' => array(
  6860. 'type' => 'text',
  6861. 'not NULL' => '',
  6862. ),
  6863. 'indexed' => array(
  6864. 'type' => 'text',
  6865. 'not NULL' => '',
  6866. ),
  6867. 'query' => array(
  6868. 'type' => 'text',
  6869. 'not NULL' => '',
  6870. ),
  6871. 'special_index' => array(
  6872. 'type' => 'text',
  6873. 'not NULL' => '',
  6874. ),
  6875. ),
  6876. 'primary key' => array(
  6877. ),
  6878. 'unique keys' => array(
  6879. 'name' => array(
  6880. 0 => 'name',
  6881. ),
  6882. ),
  6883. 'indexes' => array(
  6884. ),
  6885. 'foreign keys' => array(
  6886. ),
  6887. );
  6888. return $description;
  6889. }
  6890. /**
  6891. * Implements hook_chado_schema_v1_11_organism()
  6892. * Purpose: To describe the structure of 'organism' to tripal
  6893. * @see tripal_core_chado_insert()
  6894. * @see tripal_core_chado_update()
  6895. * @see tripal_core_chado_select()
  6896. *
  6897. * @return
  6898. * An array describing the 'organism' table
  6899. *
  6900. * @ingroup tripal_chado_v1.11_schema_api
  6901. *
  6902. */
  6903. function tripal_core_chado_schema_v1_11_organism() {
  6904. $description = array(
  6905. 'table' => 'organism',
  6906. 'fields' => array(
  6907. 'organism_id' => array(
  6908. 'type' => 'serial',
  6909. 'not NULL' => '1',
  6910. ),
  6911. 'abbreviation' => array(
  6912. 'type' => 'varchar',
  6913. 'length' => '255',
  6914. 'not NULL' => '',
  6915. ),
  6916. 'genus' => array(
  6917. 'type' => 'varchar',
  6918. 'length' => '255',
  6919. 'not NULL' => '1',
  6920. ),
  6921. 'species' => array(
  6922. 'type' => 'varchar',
  6923. 'length' => '255',
  6924. 'not NULL' => '1',
  6925. ),
  6926. 'common_name' => array(
  6927. 'type' => 'varchar',
  6928. 'length' => '255',
  6929. 'not NULL' => '',
  6930. ),
  6931. 'comment' => array(
  6932. 'type' => 'text',
  6933. 'not NULL' => '',
  6934. ),
  6935. ),
  6936. 'primary key' => array(
  6937. 0 => 'organism_id',
  6938. ),
  6939. 'unique keys' => array(
  6940. 'organism_c1' => array(
  6941. 0 => 'genus',
  6942. 1 => 'species',
  6943. ),
  6944. ),
  6945. 'indexes' => array(
  6946. ),
  6947. 'foreign keys' => array(
  6948. ),
  6949. 'referring_tables' => array(
  6950. 0 => 'biomaterial',
  6951. 1 => 'feature',
  6952. 2 => 'library',
  6953. 3 => 'organism_dbxref',
  6954. 4 => 'organismprop',
  6955. 5 => 'phylonode_organism',
  6956. 6 => 'stock',
  6957. 7 => 'wwwuser_organism',
  6958. ),
  6959. );
  6960. return $description;
  6961. }
  6962. /**
  6963. * Implements hook_chado_schema_v1_11_organism_dbxref()
  6964. * Purpose: To describe the structure of 'organism_dbxref' to tripal
  6965. * @see tripal_core_chado_insert()
  6966. * @see tripal_core_chado_update()
  6967. * @see tripal_core_chado_select()
  6968. *
  6969. * @return
  6970. * An array describing the 'organism_dbxref' table
  6971. *
  6972. * @ingroup tripal_chado_v1.11_schema_api
  6973. *
  6974. */
  6975. function tripal_core_chado_schema_v1_11_organism_dbxref() {
  6976. $description = array(
  6977. 'table' => 'organism_dbxref',
  6978. 'fields' => array(
  6979. 'organism_dbxref_id' => array(
  6980. 'type' => 'serial',
  6981. 'not NULL' => '1',
  6982. ),
  6983. 'organism_id' => array(
  6984. 'type' => 'int',
  6985. 'not NULL' => '1',
  6986. ),
  6987. 'dbxref_id' => array(
  6988. 'type' => 'int',
  6989. 'not NULL' => '1',
  6990. ),
  6991. ),
  6992. 'primary key' => array(
  6993. 0 => 'organism_dbxref_id',
  6994. ),
  6995. 'unique keys' => array(
  6996. 'organism_dbxref_c1' => array(
  6997. 0 => 'organism_id',
  6998. 1 => 'dbxref_id',
  6999. ),
  7000. ),
  7001. 'indexes' => array(
  7002. 'organism_dbxref_idx1' => array(
  7003. 0 => 'organism_id',
  7004. ),
  7005. 'organism_dbxref_idx2' => array(
  7006. 0 => 'dbxref_id',
  7007. ),
  7008. ),
  7009. 'foreign keys' => array(
  7010. 'dbxref' => array(
  7011. 'table' => 'dbxref',
  7012. 'columns' => array(
  7013. 'dbxref_id' => 'dbxref_id',
  7014. ),
  7015. ),
  7016. 'organism' => array(
  7017. 'table' => 'organism',
  7018. 'columns' => array(
  7019. 'organism_id' => 'organism_id',
  7020. ),
  7021. ),
  7022. ),
  7023. );
  7024. return $description;
  7025. }
  7026. /**
  7027. * Implements hook_chado_schema_v1_11_organismprop()
  7028. * Purpose: To describe the structure of 'organismprop' to tripal
  7029. * @see tripal_core_chado_insert()
  7030. * @see tripal_core_chado_update()
  7031. * @see tripal_core_chado_select()
  7032. *
  7033. * @return
  7034. * An array describing the 'organismprop' table
  7035. *
  7036. * @ingroup tripal_chado_v1.11_schema_api
  7037. *
  7038. */
  7039. function tripal_core_chado_schema_v1_11_organismprop() {
  7040. $description = array(
  7041. 'table' => 'organismprop',
  7042. 'fields' => array(
  7043. 'organismprop_id' => array(
  7044. 'type' => 'serial',
  7045. 'not NULL' => '1',
  7046. ),
  7047. 'organism_id' => array(
  7048. 'type' => 'int',
  7049. 'not NULL' => '1',
  7050. ),
  7051. 'type_id' => array(
  7052. 'type' => 'int',
  7053. 'not NULL' => '1',
  7054. ),
  7055. 'value' => array(
  7056. 'type' => 'text',
  7057. 'not NULL' => '',
  7058. ),
  7059. 'rank' => array(
  7060. 'type' => 'int',
  7061. 'not NULL' => '1',
  7062. 'default' => '0',
  7063. ),
  7064. ),
  7065. 'primary key' => array(
  7066. 0 => 'organismprop_id',
  7067. ),
  7068. 'unique keys' => array(
  7069. 'organismprop_c1' => array(
  7070. 0 => 'organism_id',
  7071. 1 => 'type_id',
  7072. 2 => 'rank',
  7073. ),
  7074. ),
  7075. 'indexes' => array(
  7076. 'organismprop_idx1' => array(
  7077. 0 => 'organism_id',
  7078. ),
  7079. 'organismprop_idx2' => array(
  7080. 0 => 'type_id',
  7081. ),
  7082. ),
  7083. 'foreign keys' => array(
  7084. 'cvterm' => array(
  7085. 'table' => 'cvterm',
  7086. 'columns' => array(
  7087. 'type_id' => 'cvterm_id',
  7088. ),
  7089. ),
  7090. 'organism' => array(
  7091. 'table' => 'organism',
  7092. 'columns' => array(
  7093. 'organism_id' => 'organism_id',
  7094. ),
  7095. ),
  7096. ),
  7097. );
  7098. return $description;
  7099. }
  7100. /**
  7101. * Implements hook_chado_schema_v1_11_phendesc()
  7102. * Purpose: To describe the structure of 'phendesc' to tripal
  7103. * @see tripal_core_chado_insert()
  7104. * @see tripal_core_chado_update()
  7105. * @see tripal_core_chado_select()
  7106. *
  7107. * @return
  7108. * An array describing the 'phendesc' table
  7109. *
  7110. * @ingroup tripal_chado_v1.11_schema_api
  7111. *
  7112. */
  7113. function tripal_core_chado_schema_v1_11_phendesc() {
  7114. $description = array(
  7115. 'table' => 'phendesc',
  7116. 'fields' => array(
  7117. 'phendesc_id' => array(
  7118. 'type' => 'serial',
  7119. 'not NULL' => '1',
  7120. ),
  7121. 'genotype_id' => array(
  7122. 'type' => 'int',
  7123. 'not NULL' => '1',
  7124. ),
  7125. 'environment_id' => array(
  7126. 'type' => 'int',
  7127. 'not NULL' => '1',
  7128. ),
  7129. 'description' => array(
  7130. 'type' => 'text',
  7131. 'not NULL' => '1',
  7132. ),
  7133. 'type_id' => array(
  7134. 'type' => 'int',
  7135. 'not NULL' => '1',
  7136. ),
  7137. 'pub_id' => array(
  7138. 'type' => 'int',
  7139. 'not NULL' => '1',
  7140. ),
  7141. ),
  7142. 'primary key' => array(
  7143. 0 => 'phendesc_id',
  7144. ),
  7145. 'unique keys' => array(
  7146. 'phendesc_c1' => array(
  7147. 0 => 'genotype_id',
  7148. 1 => 'environment_id',
  7149. 2 => 'type_id',
  7150. 3 => 'pub_id',
  7151. ),
  7152. ),
  7153. 'indexes' => array(
  7154. 'phendesc_idx1' => array(
  7155. 0 => 'genotype_id',
  7156. ),
  7157. 'phendesc_idx2' => array(
  7158. 0 => 'environment_id',
  7159. ),
  7160. 'phendesc_idx3' => array(
  7161. 0 => 'pub_id',
  7162. ),
  7163. ),
  7164. 'foreign keys' => array(
  7165. 'cvterm' => array(
  7166. 'table' => 'cvterm',
  7167. 'columns' => array(
  7168. 'type_id' => 'cvterm_id',
  7169. ),
  7170. ),
  7171. 'pub' => array(
  7172. 'table' => 'pub',
  7173. 'columns' => array(
  7174. 'pub_id' => 'pub_id',
  7175. ),
  7176. ),
  7177. 'genotype' => array(
  7178. 'table' => 'genotype',
  7179. 'columns' => array(
  7180. 'genotype_id' => 'genotype_id',
  7181. ),
  7182. ),
  7183. 'environment' => array(
  7184. 'table' => 'environment',
  7185. 'columns' => array(
  7186. 'environment_id' => 'environment_id',
  7187. ),
  7188. ),
  7189. ),
  7190. );
  7191. return $description;
  7192. }
  7193. /**
  7194. * Implements hook_chado_schema_v1_11_phenotype()
  7195. * Purpose: To describe the structure of 'phenotype' to tripal
  7196. * @see tripal_core_chado_insert()
  7197. * @see tripal_core_chado_update()
  7198. * @see tripal_core_chado_select()
  7199. *
  7200. * @return
  7201. * An array describing the 'phenotype' table
  7202. *
  7203. * @ingroup tripal_chado_v1.11_schema_api
  7204. *
  7205. */
  7206. function tripal_core_chado_schema_v1_11_phenotype() {
  7207. $description = array(
  7208. 'table' => 'phenotype',
  7209. 'fields' => array(
  7210. 'phenotype_id' => array(
  7211. 'type' => 'serial',
  7212. 'not NULL' => '1',
  7213. ),
  7214. 'uniquename' => array(
  7215. 'type' => 'text',
  7216. 'not NULL' => '1',
  7217. ),
  7218. 'observable_id' => array(
  7219. 'type' => 'int',
  7220. 'not NULL' => '',
  7221. ),
  7222. 'attr_id' => array(
  7223. 'type' => 'int',
  7224. 'not NULL' => '',
  7225. ),
  7226. 'value' => array(
  7227. 'type' => 'text',
  7228. 'not NULL' => '',
  7229. ),
  7230. 'cvalue_id' => array(
  7231. 'type' => 'int',
  7232. 'not NULL' => '',
  7233. ),
  7234. 'assay_id' => array(
  7235. 'type' => 'int',
  7236. 'not NULL' => '',
  7237. ),
  7238. ),
  7239. 'primary key' => array(
  7240. 0 => 'phenotype_id',
  7241. ),
  7242. 'unique keys' => array(
  7243. 'phenotype_c1' => array(
  7244. 0 => 'uniquename',
  7245. ),
  7246. ),
  7247. 'indexes' => array(
  7248. 'phenotype_idx1' => array(
  7249. 0 => 'cvalue_id',
  7250. ),
  7251. 'phenotype_idx2' => array(
  7252. 0 => 'observable_id',
  7253. ),
  7254. 'phenotype_idx3' => array(
  7255. 0 => 'attr_id',
  7256. ),
  7257. ),
  7258. 'foreign keys' => array(
  7259. 'cvterm' => array(
  7260. 'table' => 'cvterm',
  7261. 'columns' => array(
  7262. 'observable_id' => 'cvterm_id',
  7263. 'attr_id' => 'cvterm_id',
  7264. 'cvalue_id' => 'cvterm_id',
  7265. 'assay_id' => 'cvterm_id',
  7266. ),
  7267. ),
  7268. ),
  7269. );
  7270. return $description;
  7271. }
  7272. /**
  7273. * Implements hook_chado_schema_v1_11_phenotype_comparison()
  7274. * Purpose: To describe the structure of 'phenotype_comparison' to tripal
  7275. * @see tripal_core_chado_insert()
  7276. * @see tripal_core_chado_update()
  7277. * @see tripal_core_chado_select()
  7278. *
  7279. * @return
  7280. * An array describing the 'phenotype_comparison' table
  7281. *
  7282. * @ingroup tripal_chado_v1.11_schema_api
  7283. *
  7284. */
  7285. function tripal_core_chado_schema_v1_11_phenotype_comparison() {
  7286. $description = array(
  7287. 'table' => 'phenotype_comparison',
  7288. 'fields' => array(
  7289. 'phenotype_comparison_id' => array(
  7290. 'type' => 'serial',
  7291. 'not NULL' => '1',
  7292. ),
  7293. 'genotype1_id' => array(
  7294. 'type' => 'int',
  7295. 'not NULL' => '1',
  7296. ),
  7297. 'environment1_id' => array(
  7298. 'type' => 'int',
  7299. 'not NULL' => '1',
  7300. ),
  7301. 'genotype2_id' => array(
  7302. 'type' => 'int',
  7303. 'not NULL' => '1',
  7304. ),
  7305. 'environment2_id' => array(
  7306. 'type' => 'int',
  7307. 'not NULL' => '1',
  7308. ),
  7309. 'phenotype1_id' => array(
  7310. 'type' => 'int',
  7311. 'not NULL' => '1',
  7312. ),
  7313. 'phenotype2_id' => array(
  7314. 'type' => 'int',
  7315. 'not NULL' => '',
  7316. ),
  7317. 'pub_id' => array(
  7318. 'type' => 'int',
  7319. 'not NULL' => '1',
  7320. ),
  7321. 'organism_id' => array(
  7322. 'type' => 'int',
  7323. 'not NULL' => '1',
  7324. ),
  7325. ),
  7326. 'primary key' => array(
  7327. 0 => 'phenotype_comparison_id',
  7328. ),
  7329. 'unique keys' => array(
  7330. 'phenotype_comparison_c1' => array(
  7331. 0 => 'genotype1_id',
  7332. 1 => 'environment1_id',
  7333. 2 => 'genotype2_id',
  7334. 3 => 'environment2_id',
  7335. 4 => 'phenotype1_id',
  7336. 5 => 'pub_id',
  7337. ),
  7338. ),
  7339. 'indexes' => array(
  7340. 'phenotype_comparison_idx1' => array(
  7341. 0 => 'genotype1_id',
  7342. ),
  7343. 'phenotype_comparison_idx2' => array(
  7344. 0 => 'genotype2_id',
  7345. ),
  7346. 'phenotype_comparison_idx4' => array(
  7347. 0 => 'pub_id',
  7348. ),
  7349. ),
  7350. 'foreign keys' => array(
  7351. 'pub' => array(
  7352. 'table' => 'pub',
  7353. 'columns' => array(
  7354. 'pub_id' => 'pub_id',
  7355. ),
  7356. ),
  7357. 'organism' => array(
  7358. 'table' => 'organism',
  7359. 'columns' => array(
  7360. 'organism_id' => 'organism_id',
  7361. ),
  7362. ),
  7363. 'phenotype' => array(
  7364. 'table' => 'phenotype',
  7365. 'columns' => array(
  7366. 'phenotype1_id' => 'phenotype_id',
  7367. 'phenotype2_id' => 'phenotype_id',
  7368. ),
  7369. ),
  7370. 'genotype' => array(
  7371. 'table' => 'genotype',
  7372. 'columns' => array(
  7373. 'genotype1_id' => 'genotype_id',
  7374. 'genotype2_id' => 'genotype_id',
  7375. ),
  7376. ),
  7377. 'environment' => array(
  7378. 'table' => 'environment',
  7379. 'columns' => array(
  7380. 'environment1_id' => 'environment_id',
  7381. 'environment2_id' => 'environment_id',
  7382. ),
  7383. ),
  7384. ),
  7385. );
  7386. return $description;
  7387. }
  7388. /**
  7389. * Implements hook_chado_schema_v1_11_phenotype_comparison_cvterm()
  7390. * Purpose: To describe the structure of 'phenotype_comparison_cvterm' to tripal
  7391. * @see tripal_core_chado_insert()
  7392. * @see tripal_core_chado_update()
  7393. * @see tripal_core_chado_select()
  7394. *
  7395. * @return
  7396. * An array describing the 'phenotype_comparison_cvterm' table
  7397. *
  7398. * @ingroup tripal_chado_v1.11_schema_api
  7399. *
  7400. */
  7401. function tripal_core_chado_schema_v1_11_phenotype_comparison_cvterm() {
  7402. $description = array(
  7403. 'table' => 'phenotype_comparison_cvterm',
  7404. 'fields' => array(
  7405. 'phenotype_comparison_cvterm_id' => array(
  7406. 'type' => 'serial',
  7407. 'not NULL' => '1',
  7408. ),
  7409. 'phenotype_comparison_id' => array(
  7410. 'type' => 'int',
  7411. 'not NULL' => '1',
  7412. ),
  7413. 'cvterm_id' => array(
  7414. 'type' => 'int',
  7415. 'not NULL' => '1',
  7416. ),
  7417. 'pub_id' => array(
  7418. 'type' => 'int',
  7419. 'not NULL' => '1',
  7420. ),
  7421. 'rank' => array(
  7422. 'type' => 'int',
  7423. 'not NULL' => '1',
  7424. 'default' => '0',
  7425. ),
  7426. ),
  7427. 'primary key' => array(
  7428. 0 => 'phenotype_comparison_cvterm_id',
  7429. ),
  7430. 'unique keys' => array(
  7431. 'phenotype_comparison_cvterm_c1' => array(
  7432. 0 => 'phenotype_comparison_id',
  7433. 1 => 'cvterm_id',
  7434. ),
  7435. ),
  7436. 'indexes' => array(
  7437. 'phenotype_comparison_cvterm_idx1' => array(
  7438. 0 => 'phenotype_comparison_id',
  7439. ),
  7440. 'phenotype_comparison_cvterm_idx2' => array(
  7441. 0 => 'cvterm_id',
  7442. ),
  7443. ),
  7444. 'foreign keys' => array(
  7445. 'cvterm' => array(
  7446. 'table' => 'cvterm',
  7447. 'columns' => array(
  7448. 'cvterm_id' => 'cvterm_id',
  7449. ),
  7450. ),
  7451. 'pub' => array(
  7452. 'table' => 'pub',
  7453. 'columns' => array(
  7454. 'pub_id' => 'pub_id',
  7455. ),
  7456. ),
  7457. 'phenotype_comparison' => array(
  7458. 'table' => 'phenotype_comparison',
  7459. 'columns' => array(
  7460. 'phenotype_comparison_id' => 'phenotype_comparison_id',
  7461. ),
  7462. ),
  7463. ),
  7464. );
  7465. return $description;
  7466. }
  7467. /**
  7468. * Implements hook_chado_schema_v1_11_phenotype_cvterm()
  7469. * Purpose: To describe the structure of 'phenotype_cvterm' to tripal
  7470. * @see tripal_core_chado_insert()
  7471. * @see tripal_core_chado_update()
  7472. * @see tripal_core_chado_select()
  7473. *
  7474. * @return
  7475. * An array describing the 'phenotype_cvterm' table
  7476. *
  7477. * @ingroup tripal_chado_v1.11_schema_api
  7478. *
  7479. */
  7480. function tripal_core_chado_schema_v1_11_phenotype_cvterm() {
  7481. $description = array(
  7482. 'table' => 'phenotype_cvterm',
  7483. 'fields' => array(
  7484. 'phenotype_cvterm_id' => array(
  7485. 'type' => 'serial',
  7486. 'not NULL' => '1',
  7487. ),
  7488. 'phenotype_id' => array(
  7489. 'type' => 'int',
  7490. 'not NULL' => '1',
  7491. ),
  7492. 'cvterm_id' => array(
  7493. 'type' => 'int',
  7494. 'not NULL' => '1',
  7495. ),
  7496. 'rank' => array(
  7497. 'type' => 'int',
  7498. 'not NULL' => '1',
  7499. 'default' => '0',
  7500. ),
  7501. ),
  7502. 'primary key' => array(
  7503. 0 => 'phenotype_cvterm_id',
  7504. ),
  7505. 'unique keys' => array(
  7506. 'phenotype_cvterm_c1' => array(
  7507. 0 => 'phenotype_id',
  7508. 1 => 'cvterm_id',
  7509. 2 => 'rank',
  7510. ),
  7511. ),
  7512. 'indexes' => array(
  7513. 'phenotype_cvterm_idx1' => array(
  7514. 0 => 'phenotype_id',
  7515. ),
  7516. 'phenotype_cvterm_idx2' => array(
  7517. 0 => 'cvterm_id',
  7518. ),
  7519. ),
  7520. 'foreign keys' => array(
  7521. 'cvterm' => array(
  7522. 'table' => 'cvterm',
  7523. 'columns' => array(
  7524. 'cvterm_id' => 'cvterm_id',
  7525. ),
  7526. ),
  7527. 'phenotype' => array(
  7528. 'table' => 'phenotype',
  7529. 'columns' => array(
  7530. 'phenotype_id' => 'phenotype_id',
  7531. ),
  7532. ),
  7533. ),
  7534. );
  7535. return $description;
  7536. }
  7537. /**
  7538. * Implements hook_chado_schema_v1_11_phenstatement()
  7539. * Purpose: To describe the structure of 'phenstatement' to tripal
  7540. * @see tripal_core_chado_insert()
  7541. * @see tripal_core_chado_update()
  7542. * @see tripal_core_chado_select()
  7543. *
  7544. * @return
  7545. * An array describing the 'phenstatement' table
  7546. *
  7547. * @ingroup tripal_chado_v1.11_schema_api
  7548. *
  7549. */
  7550. function tripal_core_chado_schema_v1_11_phenstatement() {
  7551. $description = array(
  7552. 'table' => 'phenstatement',
  7553. 'fields' => array(
  7554. 'phenstatement_id' => array(
  7555. 'type' => 'serial',
  7556. 'not NULL' => '1',
  7557. ),
  7558. 'genotype_id' => array(
  7559. 'type' => 'int',
  7560. 'not NULL' => '1',
  7561. ),
  7562. 'environment_id' => array(
  7563. 'type' => 'int',
  7564. 'not NULL' => '1',
  7565. ),
  7566. 'phenotype_id' => array(
  7567. 'type' => 'int',
  7568. 'not NULL' => '1',
  7569. ),
  7570. 'type_id' => array(
  7571. 'type' => 'int',
  7572. 'not NULL' => '1',
  7573. ),
  7574. 'pub_id' => array(
  7575. 'type' => 'int',
  7576. 'not NULL' => '1',
  7577. ),
  7578. ),
  7579. 'primary key' => array(
  7580. 0 => 'phenstatement_id',
  7581. ),
  7582. 'unique keys' => array(
  7583. 'phenstatement_c1' => array(
  7584. 0 => 'genotype_id',
  7585. 1 => 'phenotype_id',
  7586. 2 => 'environment_id',
  7587. 3 => 'type_id',
  7588. 4 => 'pub_id',
  7589. ),
  7590. ),
  7591. 'indexes' => array(
  7592. 'phenstatement_idx1' => array(
  7593. 0 => 'genotype_id',
  7594. ),
  7595. 'phenstatement_idx2' => array(
  7596. 0 => 'phenotype_id',
  7597. ),
  7598. ),
  7599. 'foreign keys' => array(
  7600. 'cvterm' => array(
  7601. 'table' => 'cvterm',
  7602. 'columns' => array(
  7603. 'type_id' => 'cvterm_id',
  7604. ),
  7605. ),
  7606. 'pub' => array(
  7607. 'table' => 'pub',
  7608. 'columns' => array(
  7609. 'pub_id' => 'pub_id',
  7610. ),
  7611. ),
  7612. 'phenotype' => array(
  7613. 'table' => 'phenotype',
  7614. 'columns' => array(
  7615. 'phenotype_id' => 'phenotype_id',
  7616. ),
  7617. ),
  7618. 'genotype' => array(
  7619. 'table' => 'genotype',
  7620. 'columns' => array(
  7621. 'genotype_id' => 'genotype_id',
  7622. ),
  7623. ),
  7624. 'environment' => array(
  7625. 'table' => 'environment',
  7626. 'columns' => array(
  7627. 'environment_id' => 'environment_id',
  7628. ),
  7629. ),
  7630. ),
  7631. );
  7632. return $description;
  7633. }
  7634. /**
  7635. * Implements hook_chado_schema_v1_11_phylonode()
  7636. * Purpose: To describe the structure of 'phylonode' to tripal
  7637. * @see tripal_core_chado_insert()
  7638. * @see tripal_core_chado_update()
  7639. * @see tripal_core_chado_select()
  7640. *
  7641. * @return
  7642. * An array describing the 'phylonode' table
  7643. *
  7644. * @ingroup tripal_chado_v1.11_schema_api
  7645. *
  7646. */
  7647. function tripal_core_chado_schema_v1_11_phylonode() {
  7648. $description = array(
  7649. 'table' => 'phylonode',
  7650. 'fields' => array(
  7651. 'phylonode_id' => array(
  7652. 'type' => 'serial',
  7653. 'not NULL' => '1',
  7654. ),
  7655. 'phylotree_id' => array(
  7656. 'type' => 'int',
  7657. 'not NULL' => '1',
  7658. ),
  7659. 'parent_phylonode_id' => array(
  7660. 'type' => 'int',
  7661. 'not NULL' => '',
  7662. ),
  7663. 'left_idx' => array(
  7664. 'type' => 'int',
  7665. 'not NULL' => '1',
  7666. ),
  7667. 'right_idx' => array(
  7668. 'type' => 'int',
  7669. 'not NULL' => '1',
  7670. ),
  7671. 'type_id' => array(
  7672. 'type' => 'int',
  7673. 'not NULL' => '',
  7674. ),
  7675. 'feature_id' => array(
  7676. 'type' => 'int',
  7677. 'not NULL' => '',
  7678. ),
  7679. 'label' => array(
  7680. 'type' => 'varchar',
  7681. 'length' => '255',
  7682. 'not NULL' => '',
  7683. ),
  7684. 'distance' => array(
  7685. 'type' => 'float',
  7686. 'size' => 'big',
  7687. 'not NULL' => '',
  7688. ),
  7689. ),
  7690. 'primary key' => array(
  7691. 0 => 'phylonode_id',
  7692. ),
  7693. 'unique keys' => array(
  7694. 'phylotree_id' => array(
  7695. 0 => 'phylotree_id',
  7696. 1 => 'left_idx',
  7697. ),
  7698. 'phylonode_phylotree_id_key1' => array(
  7699. 0 => 'phylotree_id',
  7700. 1 => 'right_idx',
  7701. ),
  7702. ),
  7703. 'indexes' => array(
  7704. ),
  7705. 'foreign keys' => array(
  7706. 'cvterm' => array(
  7707. 'table' => 'cvterm',
  7708. 'columns' => array(
  7709. 'type_id' => 'cvterm_id',
  7710. ),
  7711. ),
  7712. 'feature' => array(
  7713. 'table' => 'feature',
  7714. 'columns' => array(
  7715. 'feature_id' => 'feature_id',
  7716. ),
  7717. ),
  7718. 'phylotree' => array(
  7719. 'table' => 'phylotree',
  7720. 'columns' => array(
  7721. 'phylotree_id' => 'phylotree_id',
  7722. ),
  7723. ),
  7724. 'phylonode' => array(
  7725. 'table' => 'phylonode',
  7726. 'columns' => array(
  7727. 'parent_phylonode_id' => 'phylonode_id',
  7728. ),
  7729. ),
  7730. ),
  7731. );
  7732. return $description;
  7733. }
  7734. /**
  7735. * Implements hook_chado_schema_v1_11_phylonode_dbxref()
  7736. * Purpose: To describe the structure of 'phylonode_dbxref' to tripal
  7737. * @see tripal_core_chado_insert()
  7738. * @see tripal_core_chado_update()
  7739. * @see tripal_core_chado_select()
  7740. *
  7741. * @return
  7742. * An array describing the 'phylonode_dbxref' table
  7743. *
  7744. * @ingroup tripal_chado_v1.11_schema_api
  7745. *
  7746. */
  7747. function tripal_core_chado_schema_v1_11_phylonode_dbxref() {
  7748. $description = array(
  7749. 'table' => 'phylonode_dbxref',
  7750. 'fields' => array(
  7751. 'phylonode_dbxref_id' => array(
  7752. 'type' => 'serial',
  7753. 'not NULL' => '1',
  7754. ),
  7755. 'phylonode_id' => array(
  7756. 'type' => 'int',
  7757. 'not NULL' => '1',
  7758. ),
  7759. 'dbxref_id' => array(
  7760. 'type' => 'int',
  7761. 'not NULL' => '1',
  7762. ),
  7763. ),
  7764. 'primary key' => array(
  7765. 0 => 'phylonode_dbxref_id',
  7766. ),
  7767. 'unique keys' => array(
  7768. 'phylonode_id' => array(
  7769. 0 => 'phylonode_id',
  7770. 1 => 'dbxref_id',
  7771. ),
  7772. ),
  7773. 'indexes' => array(
  7774. 'phylonode_dbxref_idx1' => array(
  7775. 0 => 'phylonode_id',
  7776. ),
  7777. 'phylonode_dbxref_idx2' => array(
  7778. 0 => 'dbxref_id',
  7779. ),
  7780. ),
  7781. 'foreign keys' => array(
  7782. 'dbxref' => array(
  7783. 'table' => 'dbxref',
  7784. 'columns' => array(
  7785. 'dbxref_id' => 'dbxref_id',
  7786. ),
  7787. ),
  7788. 'phylonode' => array(
  7789. 'table' => 'phylonode',
  7790. 'columns' => array(
  7791. 'phylonode_id' => 'phylonode_id',
  7792. ),
  7793. ),
  7794. ),
  7795. );
  7796. return $description;
  7797. }
  7798. /**
  7799. * Implements hook_chado_schema_v1_11_phylonode_organism()
  7800. * Purpose: To describe the structure of 'phylonode_organism' to tripal
  7801. * @see tripal_core_chado_insert()
  7802. * @see tripal_core_chado_update()
  7803. * @see tripal_core_chado_select()
  7804. *
  7805. * @return
  7806. * An array describing the 'phylonode_organism' table
  7807. *
  7808. * @ingroup tripal_chado_v1.11_schema_api
  7809. *
  7810. */
  7811. function tripal_core_chado_schema_v1_11_phylonode_organism() {
  7812. $description = array(
  7813. 'table' => 'phylonode_organism',
  7814. 'fields' => array(
  7815. 'phylonode_organism_id' => array(
  7816. 'type' => 'serial',
  7817. 'not NULL' => '1',
  7818. ),
  7819. 'phylonode_id' => array(
  7820. 'type' => 'int',
  7821. 'not NULL' => '1',
  7822. ),
  7823. 'organism_id' => array(
  7824. 'type' => 'int',
  7825. 'not NULL' => '1',
  7826. ),
  7827. ),
  7828. 'primary key' => array(
  7829. 0 => 'phylonode_organism_id',
  7830. ),
  7831. 'unique keys' => array(
  7832. 'phylonode_id' => array(
  7833. 0 => 'phylonode_id',
  7834. ),
  7835. ),
  7836. 'indexes' => array(
  7837. 'phylonode_organism_idx1' => array(
  7838. 0 => 'phylonode_id',
  7839. ),
  7840. 'phylonode_organism_idx2' => array(
  7841. 0 => 'organism_id',
  7842. ),
  7843. ),
  7844. 'foreign keys' => array(
  7845. 'organism' => array(
  7846. 'table' => 'organism',
  7847. 'columns' => array(
  7848. 'organism_id' => 'organism_id',
  7849. ),
  7850. ),
  7851. 'phylonode' => array(
  7852. 'table' => 'phylonode',
  7853. 'columns' => array(
  7854. 'phylonode_id' => 'phylonode_id',
  7855. ),
  7856. ),
  7857. ),
  7858. );
  7859. return $description;
  7860. }
  7861. /**
  7862. * Implements hook_chado_schema_v1_11_phylonode_pub()
  7863. * Purpose: To describe the structure of 'phylonode_pub' to tripal
  7864. * @see tripal_core_chado_insert()
  7865. * @see tripal_core_chado_update()
  7866. * @see tripal_core_chado_select()
  7867. *
  7868. * @return
  7869. * An array describing the 'phylonode_pub' table
  7870. *
  7871. * @ingroup tripal_chado_v1.11_schema_api
  7872. *
  7873. */
  7874. function tripal_core_chado_schema_v1_11_phylonode_pub() {
  7875. $description = array(
  7876. 'table' => 'phylonode_pub',
  7877. 'fields' => array(
  7878. 'phylonode_pub_id' => array(
  7879. 'type' => 'serial',
  7880. 'not NULL' => '1',
  7881. ),
  7882. 'phylonode_id' => array(
  7883. 'type' => 'int',
  7884. 'not NULL' => '1',
  7885. ),
  7886. 'pub_id' => array(
  7887. 'type' => 'int',
  7888. 'not NULL' => '1',
  7889. ),
  7890. ),
  7891. 'primary key' => array(
  7892. 0 => 'phylonode_pub_id',
  7893. ),
  7894. 'unique keys' => array(
  7895. 'phylonode_id' => array(
  7896. 0 => 'phylonode_id',
  7897. 1 => 'pub_id',
  7898. ),
  7899. ),
  7900. 'indexes' => array(
  7901. 'phylonode_pub_idx1' => array(
  7902. 0 => 'phylonode_id',
  7903. ),
  7904. 'phylonode_pub_idx2' => array(
  7905. 0 => 'pub_id',
  7906. ),
  7907. ),
  7908. 'foreign keys' => array(
  7909. 'pub' => array(
  7910. 'table' => 'pub',
  7911. 'columns' => array(
  7912. 'pub_id' => 'pub_id',
  7913. ),
  7914. ),
  7915. 'phylonode' => array(
  7916. 'table' => 'phylonode',
  7917. 'columns' => array(
  7918. 'phylonode_id' => 'phylonode_id',
  7919. ),
  7920. ),
  7921. ),
  7922. );
  7923. return $description;
  7924. }
  7925. /**
  7926. * Implements hook_chado_schema_v1_11_phylonode_relationship()
  7927. * Purpose: To describe the structure of 'phylonode_relationship' to tripal
  7928. * @see tripal_core_chado_insert()
  7929. * @see tripal_core_chado_update()
  7930. * @see tripal_core_chado_select()
  7931. *
  7932. * @return
  7933. * An array describing the 'phylonode_relationship' table
  7934. *
  7935. * @ingroup tripal_chado_v1.11_schema_api
  7936. *
  7937. */
  7938. function tripal_core_chado_schema_v1_11_phylonode_relationship() {
  7939. $description = array(
  7940. 'table' => 'phylonode_relationship',
  7941. 'fields' => array(
  7942. 'phylonode_relationship_id' => array(
  7943. 'type' => 'serial',
  7944. 'not NULL' => '1',
  7945. ),
  7946. 'subject_id' => array(
  7947. 'type' => 'int',
  7948. 'not NULL' => '1',
  7949. ),
  7950. 'object_id' => array(
  7951. 'type' => 'int',
  7952. 'not NULL' => '1',
  7953. ),
  7954. 'type_id' => array(
  7955. 'type' => 'int',
  7956. 'not NULL' => '1',
  7957. ),
  7958. 'rank' => array(
  7959. 'type' => 'int',
  7960. 'not NULL' => '',
  7961. ),
  7962. 'phylotree_id' => array(
  7963. 'type' => 'int',
  7964. 'not NULL' => '1',
  7965. ),
  7966. ),
  7967. 'primary key' => array(
  7968. 0 => 'phylonode_relationship_id',
  7969. ),
  7970. 'unique keys' => array(
  7971. 'subject_id' => array(
  7972. 0 => 'subject_id',
  7973. 1 => 'object_id',
  7974. 2 => 'type_id',
  7975. ),
  7976. ),
  7977. 'indexes' => array(
  7978. 'phylonode_relationship_idx1' => array(
  7979. 0 => 'subject_id',
  7980. ),
  7981. 'phylonode_relationship_idx2' => array(
  7982. 0 => 'object_id',
  7983. ),
  7984. 'phylonode_relationship_idx3' => array(
  7985. 0 => 'type_id',
  7986. ),
  7987. ),
  7988. 'foreign keys' => array(
  7989. 'cvterm' => array(
  7990. 'table' => 'cvterm',
  7991. 'columns' => array(
  7992. 'type_id' => 'cvterm_id',
  7993. ),
  7994. ),
  7995. 'phylotree' => array(
  7996. 'table' => 'phylotree',
  7997. 'columns' => array(
  7998. 'phylotree_id' => 'phylotree_id',
  7999. ),
  8000. ),
  8001. 'phylonode' => array(
  8002. 'table' => 'phylonode',
  8003. 'columns' => array(
  8004. 'subject_id' => 'phylonode_id',
  8005. 'object_id' => 'phylonode_id',
  8006. ),
  8007. ),
  8008. ),
  8009. );
  8010. return $description;
  8011. }
  8012. /**
  8013. * Implements hook_chado_schema_v1_11_phylonodeprop()
  8014. * Purpose: To describe the structure of 'phylonodeprop' to tripal
  8015. * @see tripal_core_chado_insert()
  8016. * @see tripal_core_chado_update()
  8017. * @see tripal_core_chado_select()
  8018. *
  8019. * @return
  8020. * An array describing the 'phylonodeprop' table
  8021. *
  8022. * @ingroup tripal_chado_v1.11_schema_api
  8023. *
  8024. */
  8025. function tripal_core_chado_schema_v1_11_phylonodeprop() {
  8026. $description = array(
  8027. 'table' => 'phylonodeprop',
  8028. 'fields' => array(
  8029. 'phylonodeprop_id' => array(
  8030. 'type' => 'serial',
  8031. 'not NULL' => '1',
  8032. ),
  8033. 'phylonode_id' => array(
  8034. 'type' => 'int',
  8035. 'not NULL' => '1',
  8036. ),
  8037. 'type_id' => array(
  8038. 'type' => 'int',
  8039. 'not NULL' => '1',
  8040. ),
  8041. 'value' => array(
  8042. 'type' => 'text',
  8043. 'not NULL' => '1',
  8044. 'default' => '',
  8045. ),
  8046. 'rank' => array(
  8047. 'type' => 'int',
  8048. 'not NULL' => '1',
  8049. 'default' => '0',
  8050. ),
  8051. ),
  8052. 'primary key' => array(
  8053. 0 => 'phylonodeprop_id',
  8054. ),
  8055. 'unique keys' => array(
  8056. 'phylonode_id' => array(
  8057. 0 => 'phylonode_id',
  8058. 1 => 'type_id',
  8059. 2 => 'value',
  8060. 3 => 'rank',
  8061. ),
  8062. ),
  8063. 'indexes' => array(
  8064. 'phylonodeprop_idx1' => array(
  8065. 0 => 'phylonode_id',
  8066. ),
  8067. 'phylonodeprop_idx2' => array(
  8068. 0 => 'type_id',
  8069. ),
  8070. ),
  8071. 'foreign keys' => array(
  8072. 'cvterm' => array(
  8073. 'table' => 'cvterm',
  8074. 'columns' => array(
  8075. 'type_id' => 'cvterm_id',
  8076. ),
  8077. ),
  8078. 'phylonode' => array(
  8079. 'table' => 'phylonode',
  8080. 'columns' => array(
  8081. 'phylonode_id' => 'phylonode_id',
  8082. ),
  8083. ),
  8084. ),
  8085. );
  8086. return $description;
  8087. }
  8088. /**
  8089. * Implements hook_chado_schema_v1_11_phylotree()
  8090. * Purpose: To describe the structure of 'phylotree' to tripal
  8091. * @see tripal_core_chado_insert()
  8092. * @see tripal_core_chado_update()
  8093. * @see tripal_core_chado_select()
  8094. *
  8095. * @return
  8096. * An array describing the 'phylotree' table
  8097. *
  8098. * @ingroup tripal_chado_v1.11_schema_api
  8099. *
  8100. */
  8101. function tripal_core_chado_schema_v1_11_phylotree() {
  8102. $description = array(
  8103. 'table' => 'phylotree',
  8104. 'fields' => array(
  8105. 'phylotree_id' => array(
  8106. 'type' => 'serial',
  8107. 'not NULL' => '1',
  8108. ),
  8109. 'dbxref_id' => array(
  8110. 'type' => 'int',
  8111. 'not NULL' => '1',
  8112. ),
  8113. 'name' => array(
  8114. 'type' => 'varchar',
  8115. 'length' => '255',
  8116. 'not NULL' => '',
  8117. ),
  8118. 'type_id' => array(
  8119. 'type' => 'int',
  8120. 'not NULL' => '',
  8121. ),
  8122. 'analysis_id' => array(
  8123. 'type' => 'int',
  8124. 'not NULL' => '',
  8125. ),
  8126. 'comment' => array(
  8127. 'type' => 'text',
  8128. 'not NULL' => '',
  8129. ),
  8130. ),
  8131. 'primary key' => array(
  8132. 0 => 'phylotree_id',
  8133. ),
  8134. 'unique keys' => array(
  8135. ),
  8136. 'indexes' => array(
  8137. 'phylotree_idx1' => array(
  8138. 0 => 'phylotree_id',
  8139. ),
  8140. ),
  8141. 'foreign keys' => array(
  8142. 'dbxref' => array(
  8143. 'table' => 'dbxref',
  8144. 'columns' => array(
  8145. 'dbxref_id' => 'dbxref_id',
  8146. ),
  8147. ),
  8148. 'cvterm' => array(
  8149. 'table' => 'cvterm',
  8150. 'columns' => array(
  8151. 'type_id' => 'cvterm_id',
  8152. ),
  8153. ),
  8154. 'analysis' => array(
  8155. 'table' => 'analysis',
  8156. 'columns' => array(
  8157. 'analysis_id' => 'analysis_id',
  8158. ),
  8159. ),
  8160. ),
  8161. );
  8162. return $description;
  8163. }
  8164. /**
  8165. * Implements hook_chado_schema_v1_11_phylotree_pub()
  8166. * Purpose: To describe the structure of 'phylotree_pub' to tripal
  8167. * @see tripal_core_chado_insert()
  8168. * @see tripal_core_chado_update()
  8169. * @see tripal_core_chado_select()
  8170. *
  8171. * @return
  8172. * An array describing the 'phylotree_pub' table
  8173. *
  8174. * @ingroup tripal_chado_v1.11_schema_api
  8175. *
  8176. */
  8177. function tripal_core_chado_schema_v1_11_phylotree_pub() {
  8178. $description = array(
  8179. 'table' => 'phylotree_pub',
  8180. 'fields' => array(
  8181. 'phylotree_pub_id' => array(
  8182. 'type' => 'serial',
  8183. 'not NULL' => '1',
  8184. ),
  8185. 'phylotree_id' => array(
  8186. 'type' => 'int',
  8187. 'not NULL' => '1',
  8188. ),
  8189. 'pub_id' => array(
  8190. 'type' => 'int',
  8191. 'not NULL' => '1',
  8192. ),
  8193. ),
  8194. 'primary key' => array(
  8195. 0 => 'phylotree_pub_id',
  8196. ),
  8197. 'unique keys' => array(
  8198. 'phylotree_id' => array(
  8199. 0 => 'phylotree_id',
  8200. 1 => 'pub_id',
  8201. ),
  8202. ),
  8203. 'indexes' => array(
  8204. 'phylotree_pub_idx1' => array(
  8205. 0 => 'phylotree_id',
  8206. ),
  8207. 'phylotree_pub_idx2' => array(
  8208. 0 => 'pub_id',
  8209. ),
  8210. ),
  8211. 'foreign keys' => array(
  8212. 'pub' => array(
  8213. 'table' => 'pub',
  8214. 'columns' => array(
  8215. 'pub_id' => 'pub_id',
  8216. ),
  8217. ),
  8218. 'phylotree' => array(
  8219. 'table' => 'phylotree',
  8220. 'columns' => array(
  8221. 'phylotree_id' => 'phylotree_id',
  8222. ),
  8223. ),
  8224. ),
  8225. );
  8226. return $description;
  8227. }
  8228. /**
  8229. * Implements hook_chado_schema_v1_11_project()
  8230. * Purpose: To describe the structure of 'project' to tripal
  8231. * @see tripal_core_chado_insert()
  8232. * @see tripal_core_chado_update()
  8233. * @see tripal_core_chado_select()
  8234. *
  8235. * @return
  8236. * An array describing the 'project' table
  8237. *
  8238. * @ingroup tripal_chado_v1.11_schema_api
  8239. *
  8240. */
  8241. function tripal_core_chado_schema_v1_11_project() {
  8242. $description = array(
  8243. 'table' => 'project',
  8244. 'fields' => array(
  8245. 'project_id' => array(
  8246. 'type' => 'serial',
  8247. 'not NULL' => '1',
  8248. ),
  8249. 'name' => array(
  8250. 'type' => 'varchar',
  8251. 'length' => '255',
  8252. 'not NULL' => '1',
  8253. ),
  8254. 'description' => array(
  8255. 'type' => 'varchar',
  8256. 'length' => '255',
  8257. 'not NULL' => '1',
  8258. ),
  8259. ),
  8260. 'primary key' => array(
  8261. 0 => 'project_id',
  8262. ),
  8263. 'unique keys' => array(
  8264. 'project_c1' => array(
  8265. 0 => 'name',
  8266. ),
  8267. ),
  8268. 'indexes' => array(
  8269. ),
  8270. 'foreign keys' => array(
  8271. ),
  8272. );
  8273. return $description;
  8274. }
  8275. /**
  8276. * Implements hook_chado_schema_v1_11_protocol()
  8277. * Purpose: To describe the structure of 'protocol' to tripal
  8278. * @see tripal_core_chado_insert()
  8279. * @see tripal_core_chado_update()
  8280. * @see tripal_core_chado_select()
  8281. *
  8282. * @return
  8283. * An array describing the 'protocol' table
  8284. *
  8285. * @ingroup tripal_chado_v1.11_schema_api
  8286. *
  8287. */
  8288. function tripal_core_chado_schema_v1_11_protocol() {
  8289. $description = array(
  8290. 'table' => 'protocol',
  8291. 'fields' => array(
  8292. 'protocol_id' => array(
  8293. 'type' => 'serial',
  8294. 'not NULL' => '1',
  8295. ),
  8296. 'type_id' => array(
  8297. 'type' => 'int',
  8298. 'not NULL' => '1',
  8299. ),
  8300. 'pub_id' => array(
  8301. 'type' => 'int',
  8302. 'not NULL' => '',
  8303. ),
  8304. 'dbxref_id' => array(
  8305. 'type' => 'int',
  8306. 'not NULL' => '',
  8307. ),
  8308. 'name' => array(
  8309. 'type' => 'text',
  8310. 'not NULL' => '1',
  8311. ),
  8312. 'uri' => array(
  8313. 'type' => 'text',
  8314. 'not NULL' => '',
  8315. ),
  8316. 'protocoldescription' => array(
  8317. 'type' => 'text',
  8318. 'not NULL' => '',
  8319. ),
  8320. 'hardwaredescription' => array(
  8321. 'type' => 'text',
  8322. 'not NULL' => '',
  8323. ),
  8324. 'softwaredescription' => array(
  8325. 'type' => 'text',
  8326. 'not NULL' => '',
  8327. ),
  8328. ),
  8329. 'primary key' => array(
  8330. 0 => 'protocol_id',
  8331. ),
  8332. 'unique keys' => array(
  8333. 'protocol_c1' => array(
  8334. 0 => 'name',
  8335. ),
  8336. ),
  8337. 'indexes' => array(
  8338. 'protocol_idx1' => array(
  8339. 0 => 'type_id',
  8340. ),
  8341. 'protocol_idx2' => array(
  8342. 0 => 'pub_id',
  8343. ),
  8344. 'protocol_idx3' => array(
  8345. 0 => 'dbxref_id',
  8346. ),
  8347. ),
  8348. 'foreign keys' => array(
  8349. 'dbxref' => array(
  8350. 'table' => 'dbxref',
  8351. 'columns' => array(
  8352. 'dbxref_id' => 'dbxref_id',
  8353. ),
  8354. ),
  8355. 'cvterm' => array(
  8356. 'table' => 'cvterm',
  8357. 'columns' => array(
  8358. 'type_id' => 'cvterm_id',
  8359. ),
  8360. ),
  8361. 'pub' => array(
  8362. 'table' => 'pub',
  8363. 'columns' => array(
  8364. 'pub_id' => 'pub_id',
  8365. ),
  8366. ),
  8367. ),
  8368. );
  8369. return $description;
  8370. }
  8371. /**
  8372. * Implements hook_chado_schema_v1_11_protocolparam()
  8373. * Purpose: To describe the structure of 'protocolparam' to tripal
  8374. * @see tripal_core_chado_insert()
  8375. * @see tripal_core_chado_update()
  8376. * @see tripal_core_chado_select()
  8377. *
  8378. * @return
  8379. * An array describing the 'protocolparam' table
  8380. *
  8381. * @ingroup tripal_chado_v1.11_schema_api
  8382. *
  8383. */
  8384. function tripal_core_chado_schema_v1_11_protocolparam() {
  8385. $description = array(
  8386. 'table' => 'protocolparam',
  8387. 'fields' => array(
  8388. 'protocolparam_id' => array(
  8389. 'type' => 'serial',
  8390. 'not NULL' => '1',
  8391. ),
  8392. 'protocol_id' => array(
  8393. 'type' => 'int',
  8394. 'not NULL' => '1',
  8395. ),
  8396. 'name' => array(
  8397. 'type' => 'text',
  8398. 'not NULL' => '1',
  8399. ),
  8400. 'datatype_id' => array(
  8401. 'type' => 'int',
  8402. 'not NULL' => '',
  8403. ),
  8404. 'unittype_id' => array(
  8405. 'type' => 'int',
  8406. 'not NULL' => '',
  8407. ),
  8408. 'value' => array(
  8409. 'type' => 'text',
  8410. 'not NULL' => '',
  8411. ),
  8412. 'rank' => array(
  8413. 'type' => 'int',
  8414. 'not NULL' => '1',
  8415. 'default' => '0',
  8416. ),
  8417. ),
  8418. 'primary key' => array(
  8419. 0 => 'protocolparam_id',
  8420. ),
  8421. 'unique keys' => array(
  8422. ),
  8423. 'indexes' => array(
  8424. 'protocolparam_idx1' => array(
  8425. 0 => 'protocol_id',
  8426. ),
  8427. 'protocolparam_idx2' => array(
  8428. 0 => 'datatype_id',
  8429. ),
  8430. 'protocolparam_idx3' => array(
  8431. 0 => 'unittype_id',
  8432. ),
  8433. ),
  8434. 'foreign keys' => array(
  8435. 'cvterm' => array(
  8436. 'table' => 'cvterm',
  8437. 'columns' => array(
  8438. 'datatype_id' => 'cvterm_id',
  8439. 'unittype_id' => 'cvterm_id',
  8440. ),
  8441. ),
  8442. 'protocol' => array(
  8443. 'table' => 'protocol',
  8444. 'columns' => array(
  8445. 'protocol_id' => 'protocol_id',
  8446. ),
  8447. ),
  8448. ),
  8449. );
  8450. return $description;
  8451. }
  8452. /**
  8453. * Implements hook_chado_schema_v1_11_pub()
  8454. * Purpose: To describe the structure of 'pub' to tripal
  8455. * @see tripal_core_chado_insert()
  8456. * @see tripal_core_chado_update()
  8457. * @see tripal_core_chado_select()
  8458. *
  8459. * @return
  8460. * An array describing the 'pub' table
  8461. *
  8462. * @ingroup tripal_chado_v1.11_schema_api
  8463. *
  8464. */
  8465. function tripal_core_chado_schema_v1_11_pub() {
  8466. $description = array(
  8467. 'table' => 'pub',
  8468. 'fields' => array(
  8469. 'pub_id' => array(
  8470. 'type' => 'serial',
  8471. 'not NULL' => '1',
  8472. ),
  8473. 'title' => array(
  8474. 'type' => 'text',
  8475. 'not NULL' => '',
  8476. ),
  8477. 'volumetitle' => array(
  8478. 'type' => 'text',
  8479. 'not NULL' => '',
  8480. ),
  8481. 'volume' => array(
  8482. 'type' => 'varchar',
  8483. 'length' => '255',
  8484. 'not NULL' => '',
  8485. ),
  8486. 'series_name' => array(
  8487. 'type' => 'varchar',
  8488. 'length' => '255',
  8489. 'not NULL' => '',
  8490. ),
  8491. 'issue' => array(
  8492. 'type' => 'varchar',
  8493. 'length' => '255',
  8494. 'not NULL' => '',
  8495. ),
  8496. 'pyear' => array(
  8497. 'type' => 'varchar',
  8498. 'length' => '255',
  8499. 'not NULL' => '',
  8500. ),
  8501. 'pages' => array(
  8502. 'type' => 'varchar',
  8503. 'length' => '255',
  8504. 'not NULL' => '',
  8505. ),
  8506. 'miniref' => array(
  8507. 'type' => 'varchar',
  8508. 'length' => '255',
  8509. 'not NULL' => '',
  8510. ),
  8511. 'uniquename' => array(
  8512. 'type' => 'text',
  8513. 'not NULL' => '1',
  8514. ),
  8515. 'type_id' => array(
  8516. 'type' => 'int',
  8517. 'not NULL' => '1',
  8518. ),
  8519. 'is_obsolete' => array(
  8520. 'type' => 'boolean',
  8521. 'not NULL' => '',
  8522. 'default' => 'als',
  8523. ),
  8524. 'publisher' => array(
  8525. 'type' => 'varchar',
  8526. 'length' => '255',
  8527. 'not NULL' => '',
  8528. ),
  8529. 'pubplace' => array(
  8530. 'type' => 'varchar',
  8531. 'length' => '255',
  8532. 'not NULL' => '',
  8533. ),
  8534. ),
  8535. 'primary key' => array(
  8536. 0 => 'pub_id',
  8537. ),
  8538. 'unique keys' => array(
  8539. 'pub_c1' => array(
  8540. 0 => 'uniquename',
  8541. ),
  8542. ),
  8543. 'indexes' => array(
  8544. 'pub_idx1' => array(
  8545. 0 => 'type_id',
  8546. ),
  8547. ),
  8548. 'foreign keys' => array(
  8549. 'cvterm' => array(
  8550. 'table' => 'cvterm',
  8551. 'columns' => array(
  8552. 'type_id' => 'cvterm_id',
  8553. ),
  8554. ),
  8555. ),
  8556. );
  8557. return $description;
  8558. }
  8559. /**
  8560. * Implements hook_chado_schema_v1_11_pub_dbxref()
  8561. * Purpose: To describe the structure of 'pub_dbxref' to tripal
  8562. * @see tripal_core_chado_insert()
  8563. * @see tripal_core_chado_update()
  8564. * @see tripal_core_chado_select()
  8565. *
  8566. * @return
  8567. * An array describing the 'pub_dbxref' table
  8568. *
  8569. * @ingroup tripal_chado_v1.11_schema_api
  8570. *
  8571. */
  8572. function tripal_core_chado_schema_v1_11_pub_dbxref() {
  8573. $description = array(
  8574. 'table' => 'pub_dbxref',
  8575. 'fields' => array(
  8576. 'pub_dbxref_id' => array(
  8577. 'type' => 'serial',
  8578. 'not NULL' => '1',
  8579. ),
  8580. 'pub_id' => array(
  8581. 'type' => 'int',
  8582. 'not NULL' => '1',
  8583. ),
  8584. 'dbxref_id' => array(
  8585. 'type' => 'int',
  8586. 'not NULL' => '1',
  8587. ),
  8588. 'is_current' => array(
  8589. 'type' => 'boolean',
  8590. 'not NULL' => '1',
  8591. 'default' => 'ru',
  8592. ),
  8593. ),
  8594. 'primary key' => array(
  8595. 0 => 'pub_dbxref_id',
  8596. ),
  8597. 'unique keys' => array(
  8598. 'pub_dbxref_c1' => array(
  8599. 0 => 'pub_id',
  8600. 1 => 'dbxref_id',
  8601. ),
  8602. ),
  8603. 'indexes' => array(
  8604. 'pub_dbxref_idx1' => array(
  8605. 0 => 'pub_id',
  8606. ),
  8607. 'pub_dbxref_idx2' => array(
  8608. 0 => 'dbxref_id',
  8609. ),
  8610. ),
  8611. 'foreign keys' => array(
  8612. 'dbxref' => array(
  8613. 'table' => 'dbxref',
  8614. 'columns' => array(
  8615. 'dbxref_id' => 'dbxref_id',
  8616. ),
  8617. ),
  8618. 'pub' => array(
  8619. 'table' => 'pub',
  8620. 'columns' => array(
  8621. 'pub_id' => 'pub_id',
  8622. ),
  8623. ),
  8624. ),
  8625. );
  8626. return $description;
  8627. }
  8628. /**
  8629. * Implements hook_chado_schema_v1_11_pub_relationship()
  8630. * Purpose: To describe the structure of 'pub_relationship' to tripal
  8631. * @see tripal_core_chado_insert()
  8632. * @see tripal_core_chado_update()
  8633. * @see tripal_core_chado_select()
  8634. *
  8635. * @return
  8636. * An array describing the 'pub_relationship' table
  8637. *
  8638. * @ingroup tripal_chado_v1.11_schema_api
  8639. *
  8640. */
  8641. function tripal_core_chado_schema_v1_11_pub_relationship() {
  8642. $description = array(
  8643. 'table' => 'pub_relationship',
  8644. 'fields' => array(
  8645. 'pub_relationship_id' => array(
  8646. 'type' => 'serial',
  8647. 'not NULL' => '1',
  8648. ),
  8649. 'subject_id' => array(
  8650. 'type' => 'int',
  8651. 'not NULL' => '1',
  8652. ),
  8653. 'object_id' => array(
  8654. 'type' => 'int',
  8655. 'not NULL' => '1',
  8656. ),
  8657. 'type_id' => array(
  8658. 'type' => 'int',
  8659. 'not NULL' => '1',
  8660. ),
  8661. ),
  8662. 'primary key' => array(
  8663. 0 => 'pub_relationship_id',
  8664. ),
  8665. 'unique keys' => array(
  8666. 'pub_relationship_c1' => array(
  8667. 0 => 'subject_id',
  8668. 1 => 'object_id',
  8669. 2 => 'type_id',
  8670. ),
  8671. ),
  8672. 'indexes' => array(
  8673. 'pub_relationship_idx1' => array(
  8674. 0 => 'subject_id',
  8675. ),
  8676. 'pub_relationship_idx2' => array(
  8677. 0 => 'object_id',
  8678. ),
  8679. 'pub_relationship_idx3' => array(
  8680. 0 => 'type_id',
  8681. ),
  8682. ),
  8683. 'foreign keys' => array(
  8684. 'cvterm' => array(
  8685. 'table' => 'cvterm',
  8686. 'columns' => array(
  8687. 'type_id' => 'cvterm_id',
  8688. ),
  8689. ),
  8690. 'pub' => array(
  8691. 'table' => 'pub',
  8692. 'columns' => array(
  8693. 'subject_id' => 'pub_id',
  8694. 'object_id' => 'pub_id',
  8695. ),
  8696. ),
  8697. ),
  8698. );
  8699. return $description;
  8700. }
  8701. /**
  8702. * Implements hook_chado_schema_v1_11_pubauthor()
  8703. * Purpose: To describe the structure of 'pubauthor' to tripal
  8704. * @see tripal_core_chado_insert()
  8705. * @see tripal_core_chado_update()
  8706. * @see tripal_core_chado_select()
  8707. *
  8708. * @return
  8709. * An array describing the 'pubauthor' table
  8710. *
  8711. * @ingroup tripal_chado_v1.11_schema_api
  8712. *
  8713. */
  8714. function tripal_core_chado_schema_v1_11_pubauthor() {
  8715. $description = array(
  8716. 'table' => 'pubauthor',
  8717. 'fields' => array(
  8718. 'pubauthor_id' => array(
  8719. 'type' => 'serial',
  8720. 'not NULL' => '1',
  8721. ),
  8722. 'pub_id' => array(
  8723. 'type' => 'int',
  8724. 'not NULL' => '1',
  8725. ),
  8726. 'rank' => array(
  8727. 'type' => 'int',
  8728. 'not NULL' => '1',
  8729. ),
  8730. 'editor' => array(
  8731. 'type' => 'boolean',
  8732. 'not NULL' => '',
  8733. 'default' => 'als',
  8734. ),
  8735. 'surname' => array(
  8736. 'type' => 'varchar',
  8737. 'length' => '100',
  8738. 'not NULL' => '1',
  8739. ),
  8740. 'givennames' => array(
  8741. 'type' => 'varchar',
  8742. 'length' => '100',
  8743. 'not NULL' => '',
  8744. ),
  8745. 'suffix' => array(
  8746. 'type' => 'varchar',
  8747. 'length' => '100',
  8748. 'not NULL' => '',
  8749. ),
  8750. ),
  8751. 'primary key' => array(
  8752. 0 => 'pubauthor_id',
  8753. ),
  8754. 'unique keys' => array(
  8755. 'pubauthor_c1' => array(
  8756. 0 => 'pub_id',
  8757. 1 => 'rank',
  8758. ),
  8759. ),
  8760. 'indexes' => array(
  8761. 'pubauthor_idx2' => array(
  8762. 0 => 'pub_id',
  8763. ),
  8764. ),
  8765. 'foreign keys' => array(
  8766. 'pub' => array(
  8767. 'table' => 'pub',
  8768. 'columns' => array(
  8769. 'pub_id' => 'pub_id',
  8770. ),
  8771. ),
  8772. ),
  8773. );
  8774. return $description;
  8775. }
  8776. /**
  8777. * Implements hook_chado_schema_v1_11_pubprop()
  8778. * Purpose: To describe the structure of 'pubprop' to tripal
  8779. * @see tripal_core_chado_insert()
  8780. * @see tripal_core_chado_update()
  8781. * @see tripal_core_chado_select()
  8782. *
  8783. * @return
  8784. * An array describing the 'pubprop' table
  8785. *
  8786. * @ingroup tripal_chado_v1.11_schema_api
  8787. *
  8788. */
  8789. function tripal_core_chado_schema_v1_11_pubprop() {
  8790. $description = array(
  8791. 'table' => 'pubprop',
  8792. 'fields' => array(
  8793. 'pubprop_id' => array(
  8794. 'type' => 'serial',
  8795. 'not NULL' => '1',
  8796. ),
  8797. 'pub_id' => array(
  8798. 'type' => 'int',
  8799. 'not NULL' => '1',
  8800. ),
  8801. 'type_id' => array(
  8802. 'type' => 'int',
  8803. 'not NULL' => '1',
  8804. ),
  8805. 'value' => array(
  8806. 'type' => 'text',
  8807. 'not NULL' => '1',
  8808. ),
  8809. 'rank' => array(
  8810. 'type' => 'int',
  8811. 'not NULL' => '',
  8812. ),
  8813. ),
  8814. 'primary key' => array(
  8815. 0 => 'pubprop_id',
  8816. ),
  8817. 'unique keys' => array(
  8818. 'pubprop_c1' => array(
  8819. 0 => 'pub_id',
  8820. 1 => 'type_id',
  8821. 2 => 'rank',
  8822. ),
  8823. ),
  8824. 'indexes' => array(
  8825. 'pubprop_idx1' => array(
  8826. 0 => 'pub_id',
  8827. ),
  8828. 'pubprop_idx2' => array(
  8829. 0 => 'type_id',
  8830. ),
  8831. ),
  8832. 'foreign keys' => array(
  8833. 'cvterm' => array(
  8834. 'table' => 'cvterm',
  8835. 'columns' => array(
  8836. 'type_id' => 'cvterm_id',
  8837. ),
  8838. ),
  8839. 'pub' => array(
  8840. 'table' => 'pub',
  8841. 'columns' => array(
  8842. 'pub_id' => 'pub_id',
  8843. ),
  8844. ),
  8845. ),
  8846. );
  8847. return $description;
  8848. }
  8849. /**
  8850. * Implements hook_chado_schema_v1_11_quantification()
  8851. * Purpose: To describe the structure of 'quantification' to tripal
  8852. * @see tripal_core_chado_insert()
  8853. * @see tripal_core_chado_update()
  8854. * @see tripal_core_chado_select()
  8855. *
  8856. * @return
  8857. * An array describing the 'quantification' table
  8858. *
  8859. * @ingroup tripal_chado_v1.11_schema_api
  8860. *
  8861. */
  8862. function tripal_core_chado_schema_v1_11_quantification() {
  8863. $description = array(
  8864. 'table' => 'quantification',
  8865. 'fields' => array(
  8866. 'quantification_id' => array(
  8867. 'type' => 'serial',
  8868. 'not NULL' => '1',
  8869. ),
  8870. 'acquisition_id' => array(
  8871. 'type' => 'int',
  8872. 'not NULL' => '1',
  8873. ),
  8874. 'operator_id' => array(
  8875. 'type' => 'int',
  8876. 'not NULL' => '',
  8877. ),
  8878. 'protocol_id' => array(
  8879. 'type' => 'int',
  8880. 'not NULL' => '',
  8881. ),
  8882. 'analysis_id' => array(
  8883. 'type' => 'int',
  8884. 'not NULL' => '1',
  8885. ),
  8886. 'quantificationdate' => array(
  8887. 'type' => 'datetime',
  8888. 'not NULL' => '',
  8889. 'default' => 'ow(',
  8890. ),
  8891. 'name' => array(
  8892. 'type' => 'text',
  8893. 'not NULL' => '',
  8894. ),
  8895. 'uri' => array(
  8896. 'type' => 'text',
  8897. 'not NULL' => '',
  8898. ),
  8899. ),
  8900. 'primary key' => array(
  8901. 0 => 'quantification_id',
  8902. ),
  8903. 'unique keys' => array(
  8904. 'quantification_c1' => array(
  8905. 0 => 'name',
  8906. 1 => 'analysis_id',
  8907. ),
  8908. ),
  8909. 'indexes' => array(
  8910. 'quantification_idx1' => array(
  8911. 0 => 'acquisition_id',
  8912. ),
  8913. 'quantification_idx2' => array(
  8914. 0 => 'operator_id',
  8915. ),
  8916. 'quantification_idx3' => array(
  8917. 0 => 'protocol_id',
  8918. ),
  8919. 'quantification_idx4' => array(
  8920. 0 => 'analysis_id',
  8921. ),
  8922. ),
  8923. 'foreign keys' => array(
  8924. 'analysis' => array(
  8925. 'table' => 'analysis',
  8926. 'columns' => array(
  8927. 'analysis_id' => 'analysis_id',
  8928. ),
  8929. ),
  8930. 'contact' => array(
  8931. 'table' => 'contact',
  8932. 'columns' => array(
  8933. 'operator_id' => 'contact_id',
  8934. ),
  8935. ),
  8936. 'protocol' => array(
  8937. 'table' => 'protocol',
  8938. 'columns' => array(
  8939. 'protocol_id' => 'protocol_id',
  8940. ),
  8941. ),
  8942. 'acquisition' => array(
  8943. 'table' => 'acquisition',
  8944. 'columns' => array(
  8945. 'acquisition_id' => 'acquisition_id',
  8946. ),
  8947. ),
  8948. ),
  8949. );
  8950. return $description;
  8951. }
  8952. /**
  8953. * Implements hook_chado_schema_v1_11_quantification_relationship()
  8954. * Purpose: To describe the structure of 'quantification_relationship' to tripal
  8955. * @see tripal_core_chado_insert()
  8956. * @see tripal_core_chado_update()
  8957. * @see tripal_core_chado_select()
  8958. *
  8959. * @return
  8960. * An array describing the 'quantification_relationship' table
  8961. *
  8962. * @ingroup tripal_chado_v1.11_schema_api
  8963. *
  8964. */
  8965. function tripal_core_chado_schema_v1_11_quantification_relationship() {
  8966. $description = array(
  8967. 'table' => 'quantification_relationship',
  8968. 'fields' => array(
  8969. 'quantification_relationship_id' => array(
  8970. 'type' => 'serial',
  8971. 'not NULL' => '1',
  8972. ),
  8973. 'subject_id' => array(
  8974. 'type' => 'int',
  8975. 'not NULL' => '1',
  8976. ),
  8977. 'type_id' => array(
  8978. 'type' => 'int',
  8979. 'not NULL' => '1',
  8980. ),
  8981. 'object_id' => array(
  8982. 'type' => 'int',
  8983. 'not NULL' => '1',
  8984. ),
  8985. ),
  8986. 'primary key' => array(
  8987. 0 => 'quantification_relationship_id',
  8988. ),
  8989. 'unique keys' => array(
  8990. 'quantification_relationship_c1' => array(
  8991. 0 => 'subject_id',
  8992. 1 => 'object_id',
  8993. 2 => 'type_id',
  8994. ),
  8995. ),
  8996. 'indexes' => array(
  8997. 'quantification_relationship_idx1' => array(
  8998. 0 => 'subject_id',
  8999. ),
  9000. 'quantification_relationship_idx2' => array(
  9001. 0 => 'type_id',
  9002. ),
  9003. 'quantification_relationship_idx3' => array(
  9004. 0 => 'object_id',
  9005. ),
  9006. ),
  9007. 'foreign keys' => array(
  9008. 'cvterm' => array(
  9009. 'table' => 'cvterm',
  9010. 'columns' => array(
  9011. 'type_id' => 'cvterm_id',
  9012. ),
  9013. ),
  9014. 'quantification' => array(
  9015. 'table' => 'quantification',
  9016. 'columns' => array(
  9017. 'subject_id' => 'quantification_id',
  9018. 'object_id' => 'quantification_id',
  9019. ),
  9020. ),
  9021. ),
  9022. );
  9023. return $description;
  9024. }
  9025. /**
  9026. * Implements hook_chado_schema_v1_11_quantificationprop()
  9027. * Purpose: To describe the structure of 'quantificationprop' to tripal
  9028. * @see tripal_core_chado_insert()
  9029. * @see tripal_core_chado_update()
  9030. * @see tripal_core_chado_select()
  9031. *
  9032. * @return
  9033. * An array describing the 'quantificationprop' table
  9034. *
  9035. * @ingroup tripal_chado_v1.11_schema_api
  9036. *
  9037. */
  9038. function tripal_core_chado_schema_v1_11_quantificationprop() {
  9039. $description = array(
  9040. 'table' => 'quantificationprop',
  9041. 'fields' => array(
  9042. 'quantificationprop_id' => array(
  9043. 'type' => 'serial',
  9044. 'not NULL' => '1',
  9045. ),
  9046. 'quantification_id' => array(
  9047. 'type' => 'int',
  9048. 'not NULL' => '1',
  9049. ),
  9050. 'type_id' => array(
  9051. 'type' => 'int',
  9052. 'not NULL' => '1',
  9053. ),
  9054. 'value' => array(
  9055. 'type' => 'text',
  9056. 'not NULL' => '',
  9057. ),
  9058. 'rank' => array(
  9059. 'type' => 'int',
  9060. 'not NULL' => '1',
  9061. 'default' => '0',
  9062. ),
  9063. ),
  9064. 'primary key' => array(
  9065. 0 => 'quantificationprop_id',
  9066. ),
  9067. 'unique keys' => array(
  9068. 'quantificationprop_c1' => array(
  9069. 0 => 'quantification_id',
  9070. 1 => 'type_id',
  9071. 2 => 'rank',
  9072. ),
  9073. ),
  9074. 'indexes' => array(
  9075. 'quantificationprop_idx1' => array(
  9076. 0 => 'quantification_id',
  9077. ),
  9078. 'quantificationprop_idx2' => array(
  9079. 0 => 'type_id',
  9080. ),
  9081. ),
  9082. 'foreign keys' => array(
  9083. 'cvterm' => array(
  9084. 'table' => 'cvterm',
  9085. 'columns' => array(
  9086. 'type_id' => 'cvterm_id',
  9087. ),
  9088. ),
  9089. 'quantification' => array(
  9090. 'table' => 'quantification',
  9091. 'columns' => array(
  9092. 'quantification_id' => 'quantification_id',
  9093. ),
  9094. ),
  9095. ),
  9096. );
  9097. return $description;
  9098. }
  9099. /**
  9100. * Implements hook_chado_schema_v1_11_stock()
  9101. * Purpose: To describe the structure of 'stock' to tripal
  9102. * @see tripal_core_chado_insert()
  9103. * @see tripal_core_chado_update()
  9104. * @see tripal_core_chado_select()
  9105. *
  9106. * @return
  9107. * An array describing the 'stock' table
  9108. *
  9109. * @ingroup tripal_chado_v1.11_schema_api
  9110. *
  9111. */
  9112. function tripal_core_chado_schema_v1_11_stock() {
  9113. $description = array(
  9114. 'table' => 'stock',
  9115. 'fields' => array(
  9116. 'stock_id' => array(
  9117. 'type' => 'serial',
  9118. 'not NULL' => '1',
  9119. ),
  9120. 'dbxref_id' => array(
  9121. 'type' => 'int',
  9122. 'not NULL' => '',
  9123. ),
  9124. 'organism_id' => array(
  9125. 'type' => 'int',
  9126. 'not NULL' => '1',
  9127. ),
  9128. 'name' => array(
  9129. 'type' => 'varchar',
  9130. 'length' => '255',
  9131. 'not NULL' => '',
  9132. ),
  9133. 'uniquename' => array(
  9134. 'type' => 'text',
  9135. 'not NULL' => '1',
  9136. ),
  9137. 'description' => array(
  9138. 'type' => 'text',
  9139. 'not NULL' => '',
  9140. ),
  9141. 'type_id' => array(
  9142. 'type' => 'int',
  9143. 'not NULL' => '1',
  9144. ),
  9145. 'is_obsolete' => array(
  9146. 'type' => 'boolean',
  9147. 'not NULL' => '1',
  9148. 'default' => 'als',
  9149. ),
  9150. ),
  9151. 'primary key' => array(
  9152. 0 => 'stock_id',
  9153. ),
  9154. 'unique keys' => array(
  9155. 'stock_c1' => array(
  9156. 0 => 'organism_id',
  9157. 1 => 'uniquename',
  9158. 2 => 'type_id',
  9159. ),
  9160. ),
  9161. 'indexes' => array(
  9162. 'stock_idx1' => array(
  9163. 0 => 'dbxref_id',
  9164. ),
  9165. 'stock_idx2' => array(
  9166. 0 => 'organism_id',
  9167. ),
  9168. 'stock_idx3' => array(
  9169. 0 => 'type_id',
  9170. ),
  9171. 'stock_idx4' => array(
  9172. 0 => 'uniquename',
  9173. ),
  9174. 'stock_name_ind1' => array(
  9175. 0 => 'name',
  9176. ),
  9177. ),
  9178. 'foreign keys' => array(
  9179. 'dbxref' => array(
  9180. 'table' => 'dbxref',
  9181. 'columns' => array(
  9182. 'dbxref_id' => 'dbxref_id',
  9183. ),
  9184. ),
  9185. 'cvterm' => array(
  9186. 'table' => 'cvterm',
  9187. 'columns' => array(
  9188. 'type_id' => 'cvterm_id',
  9189. ),
  9190. ),
  9191. 'organism' => array(
  9192. 'table' => 'organism',
  9193. 'columns' => array(
  9194. 'organism_id' => 'organism_id',
  9195. ),
  9196. ),
  9197. ),
  9198. );
  9199. return $description;
  9200. }
  9201. /**
  9202. * Implements hook_chado_schema_v1_11_stock_cvterm()
  9203. * Purpose: To describe the structure of 'stock_cvterm' to tripal
  9204. * @see tripal_core_chado_insert()
  9205. * @see tripal_core_chado_update()
  9206. * @see tripal_core_chado_select()
  9207. *
  9208. * @return
  9209. * An array describing the 'stock_cvterm' table
  9210. *
  9211. * @ingroup tripal_chado_v1.11_schema_api
  9212. *
  9213. */
  9214. function tripal_core_chado_schema_v1_11_stock_cvterm() {
  9215. $description = array(
  9216. 'table' => 'stock_cvterm',
  9217. 'fields' => array(
  9218. 'stock_cvterm_id' => array(
  9219. 'type' => 'serial',
  9220. 'not NULL' => '1',
  9221. ),
  9222. 'stock_id' => array(
  9223. 'type' => 'int',
  9224. 'not NULL' => '1',
  9225. ),
  9226. 'cvterm_id' => array(
  9227. 'type' => 'int',
  9228. 'not NULL' => '1',
  9229. ),
  9230. 'pub_id' => array(
  9231. 'type' => 'int',
  9232. 'not NULL' => '1',
  9233. ),
  9234. ),
  9235. 'primary key' => array(
  9236. 0 => 'stock_cvterm_id',
  9237. ),
  9238. 'unique keys' => array(
  9239. 'stock_cvterm_c1' => array(
  9240. 0 => 'stock_id',
  9241. 1 => 'cvterm_id',
  9242. 2 => 'pub_id',
  9243. ),
  9244. ),
  9245. 'indexes' => array(
  9246. 'stock_cvterm_idx1' => array(
  9247. 0 => 'stock_id',
  9248. ),
  9249. 'stock_cvterm_idx2' => array(
  9250. 0 => 'cvterm_id',
  9251. ),
  9252. 'stock_cvterm_idx3' => array(
  9253. 0 => 'pub_id',
  9254. ),
  9255. ),
  9256. 'foreign keys' => array(
  9257. 'cvterm' => array(
  9258. 'table' => 'cvterm',
  9259. 'columns' => array(
  9260. 'cvterm_id' => 'cvterm_id',
  9261. ),
  9262. ),
  9263. 'pub' => array(
  9264. 'table' => 'pub',
  9265. 'columns' => array(
  9266. 'pub_id' => 'pub_id',
  9267. ),
  9268. ),
  9269. 'stock' => array(
  9270. 'table' => 'stock',
  9271. 'columns' => array(
  9272. 'stock_id' => 'stock_id',
  9273. ),
  9274. ),
  9275. ),
  9276. );
  9277. return $description;
  9278. }
  9279. /**
  9280. * Implements hook_chado_schema_v1_11_stock_dbxref()
  9281. * Purpose: To describe the structure of 'stock_dbxref' to tripal
  9282. * @see tripal_core_chado_insert()
  9283. * @see tripal_core_chado_update()
  9284. * @see tripal_core_chado_select()
  9285. *
  9286. * @return
  9287. * An array describing the 'stock_dbxref' table
  9288. *
  9289. * @ingroup tripal_chado_v1.11_schema_api
  9290. *
  9291. */
  9292. function tripal_core_chado_schema_v1_11_stock_dbxref() {
  9293. $description = array(
  9294. 'table' => 'stock_dbxref',
  9295. 'fields' => array(
  9296. 'stock_dbxref_id' => array(
  9297. 'type' => 'serial',
  9298. 'not NULL' => '1',
  9299. ),
  9300. 'stock_id' => array(
  9301. 'type' => 'int',
  9302. 'not NULL' => '1',
  9303. ),
  9304. 'dbxref_id' => array(
  9305. 'type' => 'int',
  9306. 'not NULL' => '1',
  9307. ),
  9308. 'is_current' => array(
  9309. 'type' => 'boolean',
  9310. 'not NULL' => '1',
  9311. 'default' => 'ru',
  9312. ),
  9313. ),
  9314. 'primary key' => array(
  9315. 0 => 'stock_dbxref_id',
  9316. ),
  9317. 'unique keys' => array(
  9318. 'stock_dbxref_c1' => array(
  9319. 0 => 'stock_id',
  9320. 1 => 'dbxref_id',
  9321. ),
  9322. ),
  9323. 'indexes' => array(
  9324. 'stock_dbxref_idx1' => array(
  9325. 0 => 'stock_id',
  9326. ),
  9327. 'stock_dbxref_idx2' => array(
  9328. 0 => 'dbxref_id',
  9329. ),
  9330. ),
  9331. 'foreign keys' => array(
  9332. 'dbxref' => array(
  9333. 'table' => 'dbxref',
  9334. 'columns' => array(
  9335. 'dbxref_id' => 'dbxref_id',
  9336. ),
  9337. ),
  9338. 'stock' => array(
  9339. 'table' => 'stock',
  9340. 'columns' => array(
  9341. 'stock_id' => 'stock_id',
  9342. ),
  9343. ),
  9344. ),
  9345. );
  9346. return $description;
  9347. }
  9348. /**
  9349. * Implements hook_chado_schema_v1_11_stock_genotype()
  9350. * Purpose: To describe the structure of 'stock_genotype' to tripal
  9351. * @see tripal_core_chado_insert()
  9352. * @see tripal_core_chado_update()
  9353. * @see tripal_core_chado_select()
  9354. *
  9355. * @return
  9356. * An array describing the 'stock_genotype' table
  9357. *
  9358. * @ingroup tripal_chado_v1.11_schema_api
  9359. *
  9360. */
  9361. function tripal_core_chado_schema_v1_11_stock_genotype() {
  9362. $description = array(
  9363. 'table' => 'stock_genotype',
  9364. 'fields' => array(
  9365. 'stock_genotype_id' => array(
  9366. 'type' => 'serial',
  9367. 'not NULL' => '1',
  9368. ),
  9369. 'stock_id' => array(
  9370. 'type' => 'int',
  9371. 'not NULL' => '1',
  9372. ),
  9373. 'genotype_id' => array(
  9374. 'type' => 'int',
  9375. 'not NULL' => '1',
  9376. ),
  9377. ),
  9378. 'primary key' => array(
  9379. 0 => 'stock_genotype_id',
  9380. ),
  9381. 'unique keys' => array(
  9382. 'stock_genotype_c1' => array(
  9383. 0 => 'stock_id',
  9384. 1 => 'genotype_id',
  9385. ),
  9386. ),
  9387. 'indexes' => array(
  9388. 'stock_genotype_idx1' => array(
  9389. 0 => 'stock_id',
  9390. ),
  9391. 'stock_genotype_idx2' => array(
  9392. 0 => 'genotype_id',
  9393. ),
  9394. ),
  9395. 'foreign keys' => array(
  9396. 'genotype' => array(
  9397. 'table' => 'genotype',
  9398. 'columns' => array(
  9399. 'genotype_id' => 'genotype_id',
  9400. ),
  9401. ),
  9402. 'stock' => array(
  9403. 'table' => 'stock',
  9404. 'columns' => array(
  9405. 'stock_id' => 'stock_id',
  9406. ),
  9407. ),
  9408. ),
  9409. );
  9410. return $description;
  9411. }
  9412. /**
  9413. * Implements hook_chado_schema_v1_11_stock_pub()
  9414. * Purpose: To describe the structure of 'stock_pub' to tripal
  9415. * @see tripal_core_chado_insert()
  9416. * @see tripal_core_chado_update()
  9417. * @see tripal_core_chado_select()
  9418. *
  9419. * @return
  9420. * An array describing the 'stock_pub' table
  9421. *
  9422. * @ingroup tripal_chado_v1.11_schema_api
  9423. *
  9424. */
  9425. function tripal_core_chado_schema_v1_11_stock_pub() {
  9426. $description = array(
  9427. 'table' => 'stock_pub',
  9428. 'fields' => array(
  9429. 'stock_pub_id' => array(
  9430. 'type' => 'serial',
  9431. 'not NULL' => '1',
  9432. ),
  9433. 'stock_id' => array(
  9434. 'type' => 'int',
  9435. 'not NULL' => '1',
  9436. ),
  9437. 'pub_id' => array(
  9438. 'type' => 'int',
  9439. 'not NULL' => '1',
  9440. ),
  9441. ),
  9442. 'primary key' => array(
  9443. 0 => 'stock_pub_id',
  9444. ),
  9445. 'unique keys' => array(
  9446. 'stock_pub_c1' => array(
  9447. 0 => 'stock_id',
  9448. 1 => 'pub_id',
  9449. ),
  9450. ),
  9451. 'indexes' => array(
  9452. 'stock_pub_idx1' => array(
  9453. 0 => 'stock_id',
  9454. ),
  9455. 'stock_pub_idx2' => array(
  9456. 0 => 'pub_id',
  9457. ),
  9458. ),
  9459. 'foreign keys' => array(
  9460. 'pub' => array(
  9461. 'table' => 'pub',
  9462. 'columns' => array(
  9463. 'pub_id' => 'pub_id',
  9464. ),
  9465. ),
  9466. 'stock' => array(
  9467. 'table' => 'stock',
  9468. 'columns' => array(
  9469. 'stock_id' => 'stock_id',
  9470. ),
  9471. ),
  9472. ),
  9473. );
  9474. return $description;
  9475. }
  9476. /**
  9477. * Implements hook_chado_schema_v1_11_stock_relationship()
  9478. * Purpose: To describe the structure of 'stock_relationship' to tripal
  9479. * @see tripal_core_chado_insert()
  9480. * @see tripal_core_chado_update()
  9481. * @see tripal_core_chado_select()
  9482. *
  9483. * @return
  9484. * An array describing the 'stock_relationship' table
  9485. *
  9486. * @ingroup tripal_chado_v1.11_schema_api
  9487. *
  9488. */
  9489. function tripal_core_chado_schema_v1_11_stock_relationship() {
  9490. $description = array(
  9491. 'table' => 'stock_relationship',
  9492. 'fields' => array(
  9493. 'stock_relationship_id' => array(
  9494. 'type' => 'serial',
  9495. 'not NULL' => '1',
  9496. ),
  9497. 'subject_id' => array(
  9498. 'type' => 'int',
  9499. 'not NULL' => '1',
  9500. ),
  9501. 'object_id' => array(
  9502. 'type' => 'int',
  9503. 'not NULL' => '1',
  9504. ),
  9505. 'type_id' => array(
  9506. 'type' => 'int',
  9507. 'not NULL' => '1',
  9508. ),
  9509. 'value' => array(
  9510. 'type' => 'text',
  9511. 'not NULL' => '',
  9512. ),
  9513. 'rank' => array(
  9514. 'type' => 'int',
  9515. 'not NULL' => '1',
  9516. 'default' => '0',
  9517. ),
  9518. ),
  9519. 'primary key' => array(
  9520. 0 => 'stock_relationship_id',
  9521. ),
  9522. 'unique keys' => array(
  9523. 'stock_relationship_c1' => array(
  9524. 0 => 'subject_id',
  9525. 1 => 'object_id',
  9526. 2 => 'type_id',
  9527. 3 => 'rank',
  9528. ),
  9529. ),
  9530. 'indexes' => array(
  9531. 'stock_relationship_idx1' => array(
  9532. 0 => 'subject_id',
  9533. ),
  9534. 'stock_relationship_idx2' => array(
  9535. 0 => 'object_id',
  9536. ),
  9537. 'stock_relationship_idx3' => array(
  9538. 0 => 'type_id',
  9539. ),
  9540. ),
  9541. 'foreign keys' => array(
  9542. 'cvterm' => array(
  9543. 'table' => 'cvterm',
  9544. 'columns' => array(
  9545. 'type_id' => 'cvterm_id',
  9546. ),
  9547. ),
  9548. 'stock' => array(
  9549. 'table' => 'stock',
  9550. 'columns' => array(
  9551. 'subject_id' => 'stock_id',
  9552. 'object_id' => 'stock_id',
  9553. ),
  9554. ),
  9555. ),
  9556. );
  9557. return $description;
  9558. }
  9559. /**
  9560. * Implements hook_chado_schema_v1_11_stock_relationship_pub()
  9561. * Purpose: To describe the structure of 'stock_relationship_pub' to tripal
  9562. * @see tripal_core_chado_insert()
  9563. * @see tripal_core_chado_update()
  9564. * @see tripal_core_chado_select()
  9565. *
  9566. * @return
  9567. * An array describing the 'stock_relationship_pub' table
  9568. *
  9569. * @ingroup tripal_chado_v1.11_schema_api
  9570. *
  9571. */
  9572. function tripal_core_chado_schema_v1_11_stock_relationship_pub() {
  9573. $description = array(
  9574. 'table' => 'stock_relationship_pub',
  9575. 'fields' => array(
  9576. 'stock_relationship_pub_id' => array(
  9577. 'type' => 'serial',
  9578. 'not NULL' => '1',
  9579. ),
  9580. 'stock_relationship_id' => array(
  9581. 'type' => 'int',
  9582. 'not NULL' => '1',
  9583. ),
  9584. 'pub_id' => array(
  9585. 'type' => 'int',
  9586. 'not NULL' => '1',
  9587. ),
  9588. ),
  9589. 'primary key' => array(
  9590. 0 => 'stock_relationship_pub_id',
  9591. ),
  9592. 'unique keys' => array(
  9593. 'stock_relationship_pub_c1' => array(
  9594. 0 => 'stock_relationship_id',
  9595. 1 => 'pub_id',
  9596. ),
  9597. ),
  9598. 'indexes' => array(
  9599. 'stock_relationship_pub_idx1' => array(
  9600. 0 => 'stock_relationship_id',
  9601. ),
  9602. 'stock_relationship_pub_idx2' => array(
  9603. 0 => 'pub_id',
  9604. ),
  9605. ),
  9606. 'foreign keys' => array(
  9607. 'pub' => array(
  9608. 'table' => 'pub',
  9609. 'columns' => array(
  9610. 'pub_id' => 'pub_id',
  9611. ),
  9612. ),
  9613. 'stock_relationship' => array(
  9614. 'table' => 'stock_relationship',
  9615. 'columns' => array(
  9616. 'stock_relationship_id' => 'stock_relationship_id',
  9617. ),
  9618. ),
  9619. ),
  9620. );
  9621. return $description;
  9622. }
  9623. /**
  9624. * Implements hook_chado_schema_v1_11_stockcollection()
  9625. * Purpose: To describe the structure of 'stockcollection' to tripal
  9626. * @see tripal_core_chado_insert()
  9627. * @see tripal_core_chado_update()
  9628. * @see tripal_core_chado_select()
  9629. *
  9630. * @return
  9631. * An array describing the 'stockcollection' table
  9632. *
  9633. * @ingroup tripal_chado_v1.11_schema_api
  9634. *
  9635. */
  9636. function tripal_core_chado_schema_v1_11_stockcollection() {
  9637. $description = array(
  9638. 'table' => 'stockcollection',
  9639. 'fields' => array(
  9640. 'stockcollection_id' => array(
  9641. 'type' => 'serial',
  9642. 'not NULL' => '1',
  9643. ),
  9644. 'type_id' => array(
  9645. 'type' => 'int',
  9646. 'not NULL' => '1',
  9647. ),
  9648. 'contact_id' => array(
  9649. 'type' => 'int',
  9650. 'not NULL' => '',
  9651. ),
  9652. 'name' => array(
  9653. 'type' => 'varchar',
  9654. 'length' => '255',
  9655. 'not NULL' => '',
  9656. ),
  9657. 'uniquename' => array(
  9658. 'type' => 'text',
  9659. 'not NULL' => '1',
  9660. ),
  9661. ),
  9662. 'primary key' => array(
  9663. 0 => 'stockcollection_id',
  9664. ),
  9665. 'unique keys' => array(
  9666. 'stockcollection_c1' => array(
  9667. 0 => 'uniquename',
  9668. 1 => 'type_id',
  9669. ),
  9670. ),
  9671. 'indexes' => array(
  9672. 'stockcollection_idx1' => array(
  9673. 0 => 'contact_id',
  9674. ),
  9675. 'stockcollection_idx2' => array(
  9676. 0 => 'type_id',
  9677. ),
  9678. 'stockcollection_idx3' => array(
  9679. 0 => 'uniquename',
  9680. ),
  9681. 'stockcollection_name_ind1' => array(
  9682. 0 => 'name',
  9683. ),
  9684. ),
  9685. 'foreign keys' => array(
  9686. 'cvterm' => array(
  9687. 'table' => 'cvterm',
  9688. 'columns' => array(
  9689. 'type_id' => 'cvterm_id',
  9690. ),
  9691. ),
  9692. 'contact' => array(
  9693. 'table' => 'contact',
  9694. 'columns' => array(
  9695. 'contact_id' => 'contact_id',
  9696. ),
  9697. ),
  9698. ),
  9699. );
  9700. return $description;
  9701. }
  9702. /**
  9703. * Implements hook_chado_schema_v1_11_stockcollection_stock()
  9704. * Purpose: To describe the structure of 'stockcollection_stock' to tripal
  9705. * @see tripal_core_chado_insert()
  9706. * @see tripal_core_chado_update()
  9707. * @see tripal_core_chado_select()
  9708. *
  9709. * @return
  9710. * An array describing the 'stockcollection_stock' table
  9711. *
  9712. * @ingroup tripal_chado_v1.11_schema_api
  9713. *
  9714. */
  9715. function tripal_core_chado_schema_v1_11_stockcollection_stock() {
  9716. $description = array(
  9717. 'table' => 'stockcollection_stock',
  9718. 'fields' => array(
  9719. 'stockcollection_stock_id' => array(
  9720. 'type' => 'serial',
  9721. 'not NULL' => '1',
  9722. ),
  9723. 'stockcollection_id' => array(
  9724. 'type' => 'int',
  9725. 'not NULL' => '1',
  9726. ),
  9727. 'stock_id' => array(
  9728. 'type' => 'int',
  9729. 'not NULL' => '1',
  9730. ),
  9731. ),
  9732. 'primary key' => array(
  9733. 0 => 'stockcollection_stock_id',
  9734. ),
  9735. 'unique keys' => array(
  9736. 'stockcollection_stock_c1' => array(
  9737. 0 => 'stockcollection_id',
  9738. 1 => 'stock_id',
  9739. ),
  9740. ),
  9741. 'indexes' => array(
  9742. 'stockcollection_stock_idx1' => array(
  9743. 0 => 'stockcollection_id',
  9744. ),
  9745. 'stockcollection_stock_idx2' => array(
  9746. 0 => 'stock_id',
  9747. ),
  9748. ),
  9749. 'foreign keys' => array(
  9750. 'stock' => array(
  9751. 'table' => 'stock',
  9752. 'columns' => array(
  9753. 'stock_id' => 'stock_id',
  9754. ),
  9755. ),
  9756. 'stockcollection' => array(
  9757. 'table' => 'stockcollection',
  9758. 'columns' => array(
  9759. 'stockcollection_id' => 'stockcollection_id',
  9760. ),
  9761. ),
  9762. ),
  9763. );
  9764. return $description;
  9765. }
  9766. /**
  9767. * Implements hook_chado_schema_v1_11_stockcollectionprop()
  9768. * Purpose: To describe the structure of 'stockcollectionprop' to tripal
  9769. * @see tripal_core_chado_insert()
  9770. * @see tripal_core_chado_update()
  9771. * @see tripal_core_chado_select()
  9772. *
  9773. * @return
  9774. * An array describing the 'stockcollectionprop' table
  9775. *
  9776. * @ingroup tripal_chado_v1.11_schema_api
  9777. *
  9778. */
  9779. function tripal_core_chado_schema_v1_11_stockcollectionprop() {
  9780. $description = array(
  9781. 'table' => 'stockcollectionprop',
  9782. 'fields' => array(
  9783. 'stockcollectionprop_id' => array(
  9784. 'type' => 'serial',
  9785. 'not NULL' => '1',
  9786. ),
  9787. 'stockcollection_id' => array(
  9788. 'type' => 'int',
  9789. 'not NULL' => '1',
  9790. ),
  9791. 'type_id' => array(
  9792. 'type' => 'int',
  9793. 'not NULL' => '1',
  9794. ),
  9795. 'value' => array(
  9796. 'type' => 'text',
  9797. 'not NULL' => '',
  9798. ),
  9799. 'rank' => array(
  9800. 'type' => 'int',
  9801. 'not NULL' => '1',
  9802. 'default' => '0',
  9803. ),
  9804. ),
  9805. 'primary key' => array(
  9806. 0 => 'stockcollectionprop_id',
  9807. ),
  9808. 'unique keys' => array(
  9809. 'stockcollectionprop_c1' => array(
  9810. 0 => 'stockcollection_id',
  9811. 1 => 'type_id',
  9812. 2 => 'rank',
  9813. ),
  9814. ),
  9815. 'indexes' => array(
  9816. 'stockcollectionprop_idx1' => array(
  9817. 0 => 'stockcollection_id',
  9818. ),
  9819. 'stockcollectionprop_idx2' => array(
  9820. 0 => 'type_id',
  9821. ),
  9822. ),
  9823. 'foreign keys' => array(
  9824. 'cvterm' => array(
  9825. 'table' => 'cvterm',
  9826. 'columns' => array(
  9827. 'type_id' => 'cvterm_id',
  9828. ),
  9829. ),
  9830. 'stockcollection' => array(
  9831. 'table' => 'stockcollection',
  9832. 'columns' => array(
  9833. 'stockcollection_id' => 'stockcollection_id',
  9834. ),
  9835. ),
  9836. ),
  9837. );
  9838. return $description;
  9839. }
  9840. /**
  9841. * Implements hook_chado_schema_v1_11_stockprop()
  9842. * Purpose: To describe the structure of 'stockprop' to tripal
  9843. * @see tripal_core_chado_insert()
  9844. * @see tripal_core_chado_update()
  9845. * @see tripal_core_chado_select()
  9846. *
  9847. * @return
  9848. * An array describing the 'stockprop' table
  9849. *
  9850. * @ingroup tripal_chado_v1.11_schema_api
  9851. *
  9852. */
  9853. function tripal_core_chado_schema_v1_11_stockprop() {
  9854. $description = array(
  9855. 'table' => 'stockprop',
  9856. 'fields' => array(
  9857. 'stockprop_id' => array(
  9858. 'type' => 'serial',
  9859. 'not NULL' => '1',
  9860. ),
  9861. 'stock_id' => array(
  9862. 'type' => 'int',
  9863. 'not NULL' => '1',
  9864. ),
  9865. 'type_id' => array(
  9866. 'type' => 'int',
  9867. 'not NULL' => '1',
  9868. ),
  9869. 'value' => array(
  9870. 'type' => 'text',
  9871. 'not NULL' => '',
  9872. ),
  9873. 'rank' => array(
  9874. 'type' => 'int',
  9875. 'not NULL' => '1',
  9876. 'default' => '0',
  9877. ),
  9878. ),
  9879. 'primary key' => array(
  9880. 0 => 'stockprop_id',
  9881. ),
  9882. 'unique keys' => array(
  9883. 'stockprop_c1' => array(
  9884. 0 => 'stock_id',
  9885. 1 => 'type_id',
  9886. 2 => 'rank',
  9887. ),
  9888. ),
  9889. 'indexes' => array(
  9890. 'stockprop_idx1' => array(
  9891. 0 => 'stock_id',
  9892. ),
  9893. 'stockprop_idx2' => array(
  9894. 0 => 'type_id',
  9895. ),
  9896. ),
  9897. 'foreign keys' => array(
  9898. 'cvterm' => array(
  9899. 'table' => 'cvterm',
  9900. 'columns' => array(
  9901. 'type_id' => 'cvterm_id',
  9902. ),
  9903. ),
  9904. 'stock' => array(
  9905. 'table' => 'stock',
  9906. 'columns' => array(
  9907. 'stock_id' => 'stock_id',
  9908. ),
  9909. ),
  9910. ),
  9911. );
  9912. return $description;
  9913. }
  9914. /**
  9915. * Implements hook_chado_schema_v1_11_stockprop_pub()
  9916. * Purpose: To describe the structure of 'stockprop_pub' to tripal
  9917. * @see tripal_core_chado_insert()
  9918. * @see tripal_core_chado_update()
  9919. * @see tripal_core_chado_select()
  9920. *
  9921. * @return
  9922. * An array describing the 'stockprop_pub' table
  9923. *
  9924. * @ingroup tripal_chado_v1.11_schema_api
  9925. *
  9926. */
  9927. function tripal_core_chado_schema_v1_11_stockprop_pub() {
  9928. $description = array(
  9929. 'table' => 'stockprop_pub',
  9930. 'fields' => array(
  9931. 'stockprop_pub_id' => array(
  9932. 'type' => 'serial',
  9933. 'not NULL' => '1',
  9934. ),
  9935. 'stockprop_id' => array(
  9936. 'type' => 'int',
  9937. 'not NULL' => '1',
  9938. ),
  9939. 'pub_id' => array(
  9940. 'type' => 'int',
  9941. 'not NULL' => '1',
  9942. ),
  9943. ),
  9944. 'primary key' => array(
  9945. 0 => 'stockprop_pub_id',
  9946. ),
  9947. 'unique keys' => array(
  9948. 'stockprop_pub_c1' => array(
  9949. 0 => 'stockprop_id',
  9950. 1 => 'pub_id',
  9951. ),
  9952. ),
  9953. 'indexes' => array(
  9954. 'stockprop_pub_idx1' => array(
  9955. 0 => 'stockprop_id',
  9956. ),
  9957. 'stockprop_pub_idx2' => array(
  9958. 0 => 'pub_id',
  9959. ),
  9960. ),
  9961. 'foreign keys' => array(
  9962. 'pub' => array(
  9963. 'table' => 'pub',
  9964. 'columns' => array(
  9965. 'pub_id' => 'pub_id',
  9966. ),
  9967. ),
  9968. 'stockprop' => array(
  9969. 'table' => 'stockprop',
  9970. 'columns' => array(
  9971. 'stockprop_id' => 'stockprop_id',
  9972. ),
  9973. ),
  9974. ),
  9975. );
  9976. return $description;
  9977. }
  9978. /**
  9979. * Implements hook_chado_schema_v1_11_study()
  9980. * Purpose: To describe the structure of 'study' to tripal
  9981. * @see tripal_core_chado_insert()
  9982. * @see tripal_core_chado_update()
  9983. * @see tripal_core_chado_select()
  9984. *
  9985. * @return
  9986. * An array describing the 'study' table
  9987. *
  9988. * @ingroup tripal_chado_v1.11_schema_api
  9989. *
  9990. */
  9991. function tripal_core_chado_schema_v1_11_study() {
  9992. $description = array(
  9993. 'table' => 'study',
  9994. 'fields' => array(
  9995. 'study_id' => array(
  9996. 'type' => 'serial',
  9997. 'not NULL' => '1',
  9998. ),
  9999. 'contact_id' => array(
  10000. 'type' => 'int',
  10001. 'not NULL' => '1',
  10002. ),
  10003. 'pub_id' => array(
  10004. 'type' => 'int',
  10005. 'not NULL' => '',
  10006. ),
  10007. 'dbxref_id' => array(
  10008. 'type' => 'int',
  10009. 'not NULL' => '',
  10010. ),
  10011. 'name' => array(
  10012. 'type' => 'text',
  10013. 'not NULL' => '1',
  10014. ),
  10015. 'description' => array(
  10016. 'type' => 'text',
  10017. 'not NULL' => '',
  10018. ),
  10019. ),
  10020. 'primary key' => array(
  10021. 0 => 'study_id',
  10022. ),
  10023. 'unique keys' => array(
  10024. 'study_c1' => array(
  10025. 0 => 'name',
  10026. ),
  10027. ),
  10028. 'indexes' => array(
  10029. 'study_idx1' => array(
  10030. 0 => 'contact_id',
  10031. ),
  10032. 'study_idx2' => array(
  10033. 0 => 'pub_id',
  10034. ),
  10035. 'study_idx3' => array(
  10036. 0 => 'dbxref_id',
  10037. ),
  10038. ),
  10039. 'foreign keys' => array(
  10040. 'dbxref' => array(
  10041. 'table' => 'dbxref',
  10042. 'columns' => array(
  10043. 'dbxref_id' => 'dbxref_id',
  10044. ),
  10045. ),
  10046. 'pub' => array(
  10047. 'table' => 'pub',
  10048. 'columns' => array(
  10049. 'pub_id' => 'pub_id',
  10050. ),
  10051. ),
  10052. 'contact' => array(
  10053. 'table' => 'contact',
  10054. 'columns' => array(
  10055. 'contact_id' => 'contact_id',
  10056. ),
  10057. ),
  10058. ),
  10059. );
  10060. return $description;
  10061. }
  10062. /**
  10063. * Implements hook_chado_schema_v1_11_study_assay()
  10064. * Purpose: To describe the structure of 'study_assay' to tripal
  10065. * @see tripal_core_chado_insert()
  10066. * @see tripal_core_chado_update()
  10067. * @see tripal_core_chado_select()
  10068. *
  10069. * @return
  10070. * An array describing the 'study_assay' table
  10071. *
  10072. * @ingroup tripal_chado_v1.11_schema_api
  10073. *
  10074. */
  10075. function tripal_core_chado_schema_v1_11_study_assay() {
  10076. $description = array(
  10077. 'table' => 'study_assay',
  10078. 'fields' => array(
  10079. 'study_assay_id' => array(
  10080. 'type' => 'serial',
  10081. 'not NULL' => '1',
  10082. ),
  10083. 'study_id' => array(
  10084. 'type' => 'int',
  10085. 'not NULL' => '1',
  10086. ),
  10087. 'assay_id' => array(
  10088. 'type' => 'int',
  10089. 'not NULL' => '1',
  10090. ),
  10091. ),
  10092. 'primary key' => array(
  10093. 0 => 'study_assay_id',
  10094. ),
  10095. 'unique keys' => array(
  10096. 'study_assay_c1' => array(
  10097. 0 => 'study_id',
  10098. 1 => 'assay_id',
  10099. ),
  10100. ),
  10101. 'indexes' => array(
  10102. 'study_assay_idx1' => array(
  10103. 0 => 'study_id',
  10104. ),
  10105. 'study_assay_idx2' => array(
  10106. 0 => 'assay_id',
  10107. ),
  10108. ),
  10109. 'foreign keys' => array(
  10110. 'assay' => array(
  10111. 'table' => 'assay',
  10112. 'columns' => array(
  10113. 'assay_id' => 'assay_id',
  10114. ),
  10115. ),
  10116. 'study' => array(
  10117. 'table' => 'study',
  10118. 'columns' => array(
  10119. 'study_id' => 'study_id',
  10120. ),
  10121. ),
  10122. ),
  10123. );
  10124. return $description;
  10125. }
  10126. /**
  10127. * Implements hook_chado_schema_v1_11_studydesign()
  10128. * Purpose: To describe the structure of 'studydesign' to tripal
  10129. * @see tripal_core_chado_insert()
  10130. * @see tripal_core_chado_update()
  10131. * @see tripal_core_chado_select()
  10132. *
  10133. * @return
  10134. * An array describing the 'studydesign' table
  10135. *
  10136. * @ingroup tripal_chado_v1.11_schema_api
  10137. *
  10138. */
  10139. function tripal_core_chado_schema_v1_11_studydesign() {
  10140. $description = array(
  10141. 'table' => 'studydesign',
  10142. 'fields' => array(
  10143. 'studydesign_id' => array(
  10144. 'type' => 'serial',
  10145. 'not NULL' => '1',
  10146. ),
  10147. 'study_id' => array(
  10148. 'type' => 'int',
  10149. 'not NULL' => '1',
  10150. ),
  10151. 'description' => array(
  10152. 'type' => 'text',
  10153. 'not NULL' => '',
  10154. ),
  10155. ),
  10156. 'primary key' => array(
  10157. 0 => 'studydesign_id',
  10158. ),
  10159. 'unique keys' => array(
  10160. ),
  10161. 'indexes' => array(
  10162. 'studydesign_idx1' => array(
  10163. 0 => 'study_id',
  10164. ),
  10165. ),
  10166. 'foreign keys' => array(
  10167. 'study' => array(
  10168. 'table' => 'study',
  10169. 'columns' => array(
  10170. 'study_id' => 'study_id',
  10171. ),
  10172. ),
  10173. ),
  10174. );
  10175. return $description;
  10176. }
  10177. /**
  10178. * Implements hook_chado_schema_v1_11_studydesignprop()
  10179. * Purpose: To describe the structure of 'studydesignprop' to tripal
  10180. * @see tripal_core_chado_insert()
  10181. * @see tripal_core_chado_update()
  10182. * @see tripal_core_chado_select()
  10183. *
  10184. * @return
  10185. * An array describing the 'studydesignprop' table
  10186. *
  10187. * @ingroup tripal_chado_v1.11_schema_api
  10188. *
  10189. */
  10190. function tripal_core_chado_schema_v1_11_studydesignprop() {
  10191. $description = array(
  10192. 'table' => 'studydesignprop',
  10193. 'fields' => array(
  10194. 'studydesignprop_id' => array(
  10195. 'type' => 'serial',
  10196. 'not NULL' => '1',
  10197. ),
  10198. 'studydesign_id' => array(
  10199. 'type' => 'int',
  10200. 'not NULL' => '1',
  10201. ),
  10202. 'type_id' => array(
  10203. 'type' => 'int',
  10204. 'not NULL' => '1',
  10205. ),
  10206. 'value' => array(
  10207. 'type' => 'text',
  10208. 'not NULL' => '',
  10209. ),
  10210. 'rank' => array(
  10211. 'type' => 'int',
  10212. 'not NULL' => '1',
  10213. 'default' => '0',
  10214. ),
  10215. ),
  10216. 'primary key' => array(
  10217. 0 => 'studydesignprop_id',
  10218. ),
  10219. 'unique keys' => array(
  10220. 'studydesignprop_c1' => array(
  10221. 0 => 'studydesign_id',
  10222. 1 => 'type_id',
  10223. 2 => 'rank',
  10224. ),
  10225. ),
  10226. 'indexes' => array(
  10227. 'studydesignprop_idx1' => array(
  10228. 0 => 'studydesign_id',
  10229. ),
  10230. 'studydesignprop_idx2' => array(
  10231. 0 => 'type_id',
  10232. ),
  10233. ),
  10234. 'foreign keys' => array(
  10235. 'cvterm' => array(
  10236. 'table' => 'cvterm',
  10237. 'columns' => array(
  10238. 'type_id' => 'cvterm_id',
  10239. ),
  10240. ),
  10241. 'studydesign' => array(
  10242. 'table' => 'studydesign',
  10243. 'columns' => array(
  10244. 'studydesign_id' => 'studydesign_id',
  10245. ),
  10246. ),
  10247. ),
  10248. );
  10249. return $description;
  10250. }
  10251. /**
  10252. * Implements hook_chado_schema_v1_11_studyfactor()
  10253. * Purpose: To describe the structure of 'studyfactor' to tripal
  10254. * @see tripal_core_chado_insert()
  10255. * @see tripal_core_chado_update()
  10256. * @see tripal_core_chado_select()
  10257. *
  10258. * @return
  10259. * An array describing the 'studyfactor' table
  10260. *
  10261. * @ingroup tripal_chado_v1.11_schema_api
  10262. *
  10263. */
  10264. function tripal_core_chado_schema_v1_11_studyfactor() {
  10265. $description = array(
  10266. 'table' => 'studyfactor',
  10267. 'fields' => array(
  10268. 'studyfactor_id' => array(
  10269. 'type' => 'serial',
  10270. 'not NULL' => '1',
  10271. ),
  10272. 'studydesign_id' => array(
  10273. 'type' => 'int',
  10274. 'not NULL' => '1',
  10275. ),
  10276. 'type_id' => array(
  10277. 'type' => 'int',
  10278. 'not NULL' => '',
  10279. ),
  10280. 'name' => array(
  10281. 'type' => 'text',
  10282. 'not NULL' => '1',
  10283. ),
  10284. 'description' => array(
  10285. 'type' => 'text',
  10286. 'not NULL' => '',
  10287. ),
  10288. ),
  10289. 'primary key' => array(
  10290. 0 => 'studyfactor_id',
  10291. ),
  10292. 'unique keys' => array(
  10293. ),
  10294. 'indexes' => array(
  10295. 'studyfactor_idx1' => array(
  10296. 0 => 'studydesign_id',
  10297. ),
  10298. 'studyfactor_idx2' => array(
  10299. 0 => 'type_id',
  10300. ),
  10301. ),
  10302. 'foreign keys' => array(
  10303. 'cvterm' => array(
  10304. 'table' => 'cvterm',
  10305. 'columns' => array(
  10306. 'type_id' => 'cvterm_id',
  10307. ),
  10308. ),
  10309. 'studydesign' => array(
  10310. 'table' => 'studydesign',
  10311. 'columns' => array(
  10312. 'studydesign_id' => 'studydesign_id',
  10313. ),
  10314. ),
  10315. ),
  10316. );
  10317. return $description;
  10318. }
  10319. /**
  10320. * Implements hook_chado_schema_v1_11_studyfactorvalue()
  10321. * Purpose: To describe the structure of 'studyfactorvalue' to tripal
  10322. * @see tripal_core_chado_insert()
  10323. * @see tripal_core_chado_update()
  10324. * @see tripal_core_chado_select()
  10325. *
  10326. * @return
  10327. * An array describing the 'studyfactorvalue' table
  10328. *
  10329. * @ingroup tripal_chado_v1.11_schema_api
  10330. *
  10331. */
  10332. function tripal_core_chado_schema_v1_11_studyfactorvalue() {
  10333. $description = array(
  10334. 'table' => 'studyfactorvalue',
  10335. 'fields' => array(
  10336. 'studyfactorvalue_id' => array(
  10337. 'type' => 'serial',
  10338. 'not NULL' => '1',
  10339. ),
  10340. 'studyfactor_id' => array(
  10341. 'type' => 'int',
  10342. 'not NULL' => '1',
  10343. ),
  10344. 'assay_id' => array(
  10345. 'type' => 'int',
  10346. 'not NULL' => '1',
  10347. ),
  10348. 'factorvalue' => array(
  10349. 'type' => 'text',
  10350. 'not NULL' => '',
  10351. ),
  10352. 'name' => array(
  10353. 'type' => 'text',
  10354. 'not NULL' => '',
  10355. ),
  10356. 'rank' => array(
  10357. 'type' => 'int',
  10358. 'not NULL' => '1',
  10359. 'default' => '0',
  10360. ),
  10361. ),
  10362. 'primary key' => array(
  10363. 0 => 'studyfactorvalue_id',
  10364. ),
  10365. 'unique keys' => array(
  10366. ),
  10367. 'indexes' => array(
  10368. 'studyfactorvalue_idx1' => array(
  10369. 0 => 'studyfactor_id',
  10370. ),
  10371. 'studyfactorvalue_idx2' => array(
  10372. 0 => 'assay_id',
  10373. ),
  10374. ),
  10375. 'foreign keys' => array(
  10376. 'assay' => array(
  10377. 'table' => 'assay',
  10378. 'columns' => array(
  10379. 'assay_id' => 'assay_id',
  10380. ),
  10381. ),
  10382. 'studyfactor' => array(
  10383. 'table' => 'studyfactor',
  10384. 'columns' => array(
  10385. 'studyfactor_id' => 'studyfactor_id',
  10386. ),
  10387. ),
  10388. ),
  10389. );
  10390. return $description;
  10391. }
  10392. /**
  10393. * Implements hook_chado_schema_v1_11_studyprop()
  10394. * Purpose: To describe the structure of 'studyprop' to tripal
  10395. * @see tripal_core_chado_insert()
  10396. * @see tripal_core_chado_update()
  10397. * @see tripal_core_chado_select()
  10398. *
  10399. * @return
  10400. * An array describing the 'studyprop' table
  10401. *
  10402. * @ingroup tripal_chado_v1.11_schema_api
  10403. *
  10404. */
  10405. function tripal_core_chado_schema_v1_11_studyprop() {
  10406. $description = array(
  10407. 'table' => 'studyprop',
  10408. 'fields' => array(
  10409. 'studyprop_id' => array(
  10410. 'type' => 'serial',
  10411. 'not NULL' => '1',
  10412. ),
  10413. 'study_id' => array(
  10414. 'type' => 'int',
  10415. 'not NULL' => '1',
  10416. ),
  10417. 'type_id' => array(
  10418. 'type' => 'int',
  10419. 'not NULL' => '1',
  10420. ),
  10421. 'value' => array(
  10422. 'type' => 'text',
  10423. 'not NULL' => '',
  10424. ),
  10425. 'rank' => array(
  10426. 'type' => 'int',
  10427. 'not NULL' => '1',
  10428. 'default' => '0',
  10429. ),
  10430. ),
  10431. 'primary key' => array(
  10432. 0 => 'studyprop_id',
  10433. ),
  10434. 'unique keys' => array(
  10435. 'study_id' => array(
  10436. 0 => 'study_id',
  10437. 1 => 'type_id',
  10438. 2 => 'rank',
  10439. ),
  10440. ),
  10441. 'indexes' => array(
  10442. 'studyprop_idx1' => array(
  10443. 0 => 'study_id',
  10444. ),
  10445. 'studyprop_idx2' => array(
  10446. 0 => 'type_id',
  10447. ),
  10448. ),
  10449. 'foreign keys' => array(
  10450. 'cvterm' => array(
  10451. 'table' => 'cvterm',
  10452. 'columns' => array(
  10453. 'type_id' => 'cvterm_id',
  10454. ),
  10455. ),
  10456. 'study' => array(
  10457. 'table' => 'study',
  10458. 'columns' => array(
  10459. 'study_id' => 'study_id',
  10460. ),
  10461. ),
  10462. ),
  10463. );
  10464. return $description;
  10465. }
  10466. /**
  10467. * Implements hook_chado_schema_v1_11_studyprop_feature()
  10468. * Purpose: To describe the structure of 'studyprop_feature' to tripal
  10469. * @see tripal_core_chado_insert()
  10470. * @see tripal_core_chado_update()
  10471. * @see tripal_core_chado_select()
  10472. *
  10473. * @return
  10474. * An array describing the 'studyprop_feature' table
  10475. *
  10476. * @ingroup tripal_chado_v1.11_schema_api
  10477. *
  10478. */
  10479. function tripal_core_chado_schema_v1_11_studyprop_feature() {
  10480. $description = array(
  10481. 'table' => 'studyprop_feature',
  10482. 'fields' => array(
  10483. 'studyprop_feature_id' => array(
  10484. 'type' => 'serial',
  10485. 'not NULL' => '1',
  10486. ),
  10487. 'studyprop_id' => array(
  10488. 'type' => 'int',
  10489. 'not NULL' => '1',
  10490. ),
  10491. 'feature_id' => array(
  10492. 'type' => 'int',
  10493. 'not NULL' => '1',
  10494. ),
  10495. 'type_id' => array(
  10496. 'type' => 'int',
  10497. 'not NULL' => '',
  10498. ),
  10499. ),
  10500. 'primary key' => array(
  10501. 0 => 'studyprop_feature_id',
  10502. ),
  10503. 'unique keys' => array(
  10504. 'studyprop_id' => array(
  10505. 0 => 'studyprop_id',
  10506. 1 => 'feature_id',
  10507. ),
  10508. ),
  10509. 'indexes' => array(
  10510. 'studyprop_feature_idx1' => array(
  10511. 0 => 'studyprop_id',
  10512. ),
  10513. 'studyprop_feature_idx2' => array(
  10514. 0 => 'feature_id',
  10515. ),
  10516. ),
  10517. 'foreign keys' => array(
  10518. 'cvterm' => array(
  10519. 'table' => 'cvterm',
  10520. 'columns' => array(
  10521. 'type_id' => 'cvterm_id',
  10522. ),
  10523. ),
  10524. 'feature' => array(
  10525. 'table' => 'feature',
  10526. 'columns' => array(
  10527. 'feature_id' => 'feature_id',
  10528. ),
  10529. ),
  10530. 'studyprop' => array(
  10531. 'table' => 'studyprop',
  10532. 'columns' => array(
  10533. 'studyprop_id' => 'studyprop_id',
  10534. ),
  10535. ),
  10536. ),
  10537. );
  10538. return $description;
  10539. }
  10540. /**
  10541. * Implements hook_chado_schema_v1_11_synonym()
  10542. * Purpose: To describe the structure of 'synonym' to tripal
  10543. * @see tripal_core_chado_insert()
  10544. * @see tripal_core_chado_update()
  10545. * @see tripal_core_chado_select()
  10546. *
  10547. * @return
  10548. * An array describing the 'synonym' table
  10549. *
  10550. * @ingroup tripal_chado_v1.11_schema_api
  10551. *
  10552. */
  10553. function tripal_core_chado_schema_v1_11_synonym() {
  10554. $description = array(
  10555. 'table' => 'synonym',
  10556. 'fields' => array(
  10557. 'synonym_id' => array(
  10558. 'type' => 'serial',
  10559. 'not NULL' => '1',
  10560. ),
  10561. 'name' => array(
  10562. 'type' => 'varchar',
  10563. 'length' => '255',
  10564. 'not NULL' => '1',
  10565. ),
  10566. 'type_id' => array(
  10567. 'type' => 'int',
  10568. 'not NULL' => '1',
  10569. ),
  10570. 'synonym_sgml' => array(
  10571. 'type' => 'varchar',
  10572. 'length' => '255',
  10573. 'not NULL' => '1',
  10574. ),
  10575. ),
  10576. 'primary key' => array(
  10577. 0 => 'synonym_id',
  10578. ),
  10579. 'unique keys' => array(
  10580. 'synonym_c1' => array(
  10581. 0 => 'name',
  10582. 1 => 'type_id',
  10583. ),
  10584. ),
  10585. 'indexes' => array(
  10586. 'synonym_idx1' => array(
  10587. 0 => 'type_id',
  10588. ),
  10589. ),
  10590. 'foreign keys' => array(
  10591. 'cvterm' => array(
  10592. 'table' => 'cvterm',
  10593. 'columns' => array(
  10594. 'type_id' => 'cvterm_id',
  10595. ),
  10596. ),
  10597. ),
  10598. );
  10599. return $description;
  10600. }
  10601. /**
  10602. * Implements hook_chado_schema_v1_11_tableinfo()
  10603. * Purpose: To describe the structure of 'tableinfo' to tripal
  10604. * @see tripal_core_chado_insert()
  10605. * @see tripal_core_chado_update()
  10606. * @see tripal_core_chado_select()
  10607. *
  10608. * @return
  10609. * An array describing the 'tableinfo' table
  10610. *
  10611. * @ingroup tripal_chado_v1.11_schema_api
  10612. *
  10613. */
  10614. function tripal_core_chado_schema_v1_11_tableinfo() {
  10615. $description = array(
  10616. 'table' => 'tableinfo',
  10617. 'fields' => array(
  10618. 'tableinfo_id' => array(
  10619. 'type' => 'serial',
  10620. 'not NULL' => '1',
  10621. ),
  10622. 'name' => array(
  10623. 'type' => 'varchar',
  10624. 'length' => '30',
  10625. 'not NULL' => '1',
  10626. ),
  10627. 'primary_key_column' => array(
  10628. 'type' => 'varchar',
  10629. 'length' => '30',
  10630. 'not NULL' => '',
  10631. ),
  10632. 'is_view' => array(
  10633. 'type' => 'int',
  10634. 'not NULL' => '1',
  10635. 'default' => '0',
  10636. ),
  10637. 'view_on_table_id' => array(
  10638. 'type' => 'int',
  10639. 'not NULL' => '',
  10640. ),
  10641. 'superclass_table_id' => array(
  10642. 'type' => 'int',
  10643. 'not NULL' => '',
  10644. ),
  10645. 'is_updateable' => array(
  10646. 'type' => 'int',
  10647. 'not NULL' => '1',
  10648. 'default' => '1',
  10649. ),
  10650. 'modification_date' => array(
  10651. 'type' => 'date',
  10652. 'not NULL' => '1',
  10653. 'default' => 'ow(',
  10654. ),
  10655. ),
  10656. 'primary key' => array(
  10657. 0 => 'tableinfo_id',
  10658. ),
  10659. 'unique keys' => array(
  10660. 'tableinfo_c1' => array(
  10661. 0 => 'name',
  10662. ),
  10663. ),
  10664. 'indexes' => array(
  10665. ),
  10666. 'foreign keys' => array(
  10667. ),
  10668. );
  10669. return $description;
  10670. }
  10671. /**
  10672. * Implements hook_chado_schema_v1_11_treatment()
  10673. * Purpose: To describe the structure of 'treatment' to tripal
  10674. * @see tripal_core_chado_insert()
  10675. * @see tripal_core_chado_update()
  10676. * @see tripal_core_chado_select()
  10677. *
  10678. * @return
  10679. * An array describing the 'treatment' table
  10680. *
  10681. * @ingroup tripal_chado_v1.11_schema_api
  10682. *
  10683. */
  10684. function tripal_core_chado_schema_v1_11_treatment() {
  10685. $description = array(
  10686. 'table' => 'treatment',
  10687. 'fields' => array(
  10688. 'treatment_id' => array(
  10689. 'type' => 'serial',
  10690. 'not NULL' => '1',
  10691. ),
  10692. 'rank' => array(
  10693. 'type' => 'int',
  10694. 'not NULL' => '1',
  10695. 'default' => '0',
  10696. ),
  10697. 'biomaterial_id' => array(
  10698. 'type' => 'int',
  10699. 'not NULL' => '1',
  10700. ),
  10701. 'type_id' => array(
  10702. 'type' => 'int',
  10703. 'not NULL' => '1',
  10704. ),
  10705. 'protocol_id' => array(
  10706. 'type' => 'int',
  10707. 'not NULL' => '',
  10708. ),
  10709. 'name' => array(
  10710. 'type' => 'text',
  10711. 'not NULL' => '',
  10712. ),
  10713. ),
  10714. 'primary key' => array(
  10715. 0 => 'treatment_id',
  10716. ),
  10717. 'unique keys' => array(
  10718. ),
  10719. 'indexes' => array(
  10720. 'treatment_idx1' => array(
  10721. 0 => 'biomaterial_id',
  10722. ),
  10723. 'treatment_idx2' => array(
  10724. 0 => 'type_id',
  10725. ),
  10726. 'treatment_idx3' => array(
  10727. 0 => 'protocol_id',
  10728. ),
  10729. ),
  10730. 'foreign keys' => array(
  10731. 'cvterm' => array(
  10732. 'table' => 'cvterm',
  10733. 'columns' => array(
  10734. 'type_id' => 'cvterm_id',
  10735. ),
  10736. ),
  10737. 'protocol' => array(
  10738. 'table' => 'protocol',
  10739. 'columns' => array(
  10740. 'protocol_id' => 'protocol_id',
  10741. ),
  10742. ),
  10743. 'biomaterial' => array(
  10744. 'table' => 'biomaterial',
  10745. 'columns' => array(
  10746. 'biomaterial_id' => 'biomaterial_id',
  10747. ),
  10748. ),
  10749. ),
  10750. );
  10751. return $description;
  10752. }