tripal_chado.schema_v1.2.api.inc 320 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551
  1. <?php
  2. /**
  3. * @file
  4. * Describes the chado tables in version 1.2
  5. */
  6. /**
  7. * @defgroup tripal_schema_v1_2_api Chado v1.2 Schema
  8. * @ingroup tripal_chado_schema_api
  9. * @{
  10. * Provides an application programming interface (API) for describing Chado
  11. * tables. This API consists of a set of functions, one for each table in
  12. * Chado. Each function simply returns a Drupal style array that defines the
  13. * table.
  14. *
  15. * Because Drupal 6 does not handle foreign key (FK) relationships, which are
  16. * needed to for Tripal Views, they have been added to the schema
  17. * defintitions below.
  18. *
  19. * The functions provided in this documentation should not be called as is, but
  20. * if you need the Drupal-style array definition for any table, use the
  21. * following function call:
  22. *
  23. * $table_desc = chado_get_schema($table)
  24. *
  25. * where the variable $table contains the name of the table you want to
  26. * retireve. The chado_get_schema function determines the appropriate version
  27. * of Chado and uses the Drupal hook infrastructure to call the appropriate
  28. * hook function to retrieve the table schema.
  29. *
  30. * If you need to augment these schema definitions within your own module, you
  31. * need to implement the hook_chado_schema_v1_2_[table name]() hook where
  32. * [table name] is the name of the chado table whose schema definition you
  33. * want to augment.
  34. * @}
  35. */
  36. /**
  37. * Implements hook_chado_schema_v1_2_acquisition()
  38. * Purpose: To describe the structure of 'acquisition' to tripal
  39. *
  40. * @see chado_insert_record()
  41. * @see chado_update_record()
  42. * @see chado_select_record()
  43. *
  44. * @return
  45. * An array describing the 'acquisition' table
  46. *
  47. * @ingroup tripal_chado_v1.2_schema_api
  48. *
  49. */
  50. function tripal_chado_chado_schema_v1_2_acquisition() {
  51. $description = [
  52. 'description' => '',
  53. 'fields' => [
  54. 'acquisition_id' => [
  55. 'description' => '',
  56. 'type' => 'serial',
  57. 'not null' => TRUE,
  58. ],
  59. 'assay_id' => [
  60. 'description' => '',
  61. 'type' => 'int',
  62. 'not null' => TRUE,
  63. ],
  64. 'protocol_id' => [
  65. 'description' => '',
  66. 'type' => 'int',
  67. 'not null' => FALSE,
  68. ],
  69. 'channel_id' => [
  70. 'description' => '',
  71. 'type' => 'int',
  72. 'not null' => FALSE,
  73. ],
  74. 'acquisitiondate' => [
  75. 'description' => '',
  76. 'type' => 'datetime',
  77. 'not null' => FALSE,
  78. 'default' => 'now()',
  79. ],
  80. 'name' => [
  81. 'description' => '',
  82. 'type' => 'text',
  83. 'not null' => FALSE,
  84. ],
  85. 'uri' => [
  86. 'description' => '',
  87. 'type' => 'text',
  88. 'not null' => FALSE,
  89. ],
  90. ],
  91. 'primary key' => [
  92. 0 => 'acquisition_id',
  93. ],
  94. 'unique keys' => [
  95. 'acquisition_c1' => [
  96. 0 => 'name',
  97. ],
  98. ],
  99. 'indexes' => [
  100. 'acquisition_idx1' => [
  101. 0 => 'assay_id',
  102. ],
  103. 'acquisition_idx2' => [
  104. 0 => 'protocol_id',
  105. ],
  106. 'acquisition_idx3' => [
  107. 0 => 'channel_id',
  108. ],
  109. ],
  110. 'foreign keys' => [
  111. 'protocol' => [
  112. 'table' => 'protocol',
  113. 'columns' => [
  114. 'protocol_id' => 'protocol_id',
  115. ],
  116. ],
  117. 'assay' => [
  118. 'table' => 'assay',
  119. 'columns' => [
  120. 'assay_id' => 'assay_id',
  121. ],
  122. ],
  123. 'channel' => [
  124. 'table' => 'channel',
  125. 'columns' => [
  126. 'channel_id' => 'channel_id',
  127. ],
  128. ],
  129. ],
  130. 'table' => 'acquisition',
  131. 'referring_tables' => [
  132. 0 => 'acquisition_relationship',
  133. 2 => 'acquisitionprop',
  134. 3 => 'quantification',
  135. ],
  136. ];
  137. return $description;
  138. }
  139. /**
  140. * Implements hook_chado_schema_v1_2_acquisition_relationship()
  141. * Purpose: To describe the structure of 'acquisition_relationship' to tripal
  142. *
  143. * @see chado_insert_record()
  144. * @see chado_update_record()
  145. * @see chado_select_record()
  146. *
  147. * @return
  148. * An array describing the 'acquisition_relationship' table
  149. *
  150. * @ingroup tripal_chado_v1.2_schema_api
  151. *
  152. */
  153. function tripal_chado_chado_schema_v1_2_acquisition_relationship() {
  154. $description = [
  155. 'description' => '',
  156. 'fields' => [
  157. 'acquisition_relationship_id' => [
  158. 'description' => '',
  159. 'type' => 'serial',
  160. 'not null' => TRUE,
  161. ],
  162. 'subject_id' => [
  163. 'description' => '',
  164. 'type' => 'int',
  165. 'not null' => TRUE,
  166. ],
  167. 'type_id' => [
  168. 'description' => '',
  169. 'type' => 'int',
  170. 'not null' => TRUE,
  171. ],
  172. 'object_id' => [
  173. 'description' => '',
  174. 'type' => 'int',
  175. 'not null' => TRUE,
  176. ],
  177. 'value' => [
  178. 'description' => '',
  179. 'type' => 'text',
  180. 'not null' => FALSE,
  181. ],
  182. 'rank' => [
  183. 'description' => '',
  184. 'type' => 'int',
  185. 'not null' => TRUE,
  186. 'default' => 0,
  187. ],
  188. ],
  189. 'primary key' => [
  190. 0 => 'acquisition_relationship_id',
  191. ],
  192. 'unique keys' => [
  193. 'acquisition_relationship_c1' => [
  194. 0 => 'subject_id',
  195. 1 => 'object_id',
  196. 2 => 'type_id',
  197. 3 => 'rank',
  198. ],
  199. ],
  200. 'indexes' => [
  201. 'acquisition_relationship_idx1' => [
  202. 0 => 'subject_id',
  203. ],
  204. 'acquisition_relationship_idx2' => [
  205. 0 => 'type_id',
  206. ],
  207. 'acquisition_relationship_idx3' => [
  208. 0 => 'object_id',
  209. ],
  210. ],
  211. 'foreign keys' => [
  212. 'cvterm' => [
  213. 'table' => 'cvterm',
  214. 'columns' => [
  215. 'type_id' => 'cvterm_id',
  216. ],
  217. ],
  218. 'acquisition' => [
  219. 'table' => 'acquisition',
  220. 'columns' => [
  221. 'subject_id' => 'acquisition_id',
  222. 'object_id' => 'acquisition_id',
  223. ],
  224. ],
  225. ],
  226. 'table' => 'acquisition_relationship',
  227. 'referring_tables' => NULL,
  228. ];
  229. return $description;
  230. }
  231. /**
  232. * Implements hook_chado_schema_v1_2_acquisitionprop()
  233. * Purpose: To describe the structure of 'acquisitionprop' to tripal
  234. *
  235. * @see chado_insert_record()
  236. * @see chado_update_record()
  237. * @see chado_select_record()
  238. *
  239. * @return
  240. * An array describing the 'acquisitionprop' table
  241. *
  242. * @ingroup tripal_chado_v1.2_schema_api
  243. *
  244. */
  245. function tripal_chado_chado_schema_v1_2_acquisitionprop() {
  246. $description = [
  247. 'description' => '',
  248. 'fields' => [
  249. 'acquisitionprop_id' => [
  250. 'description' => '',
  251. 'type' => 'serial',
  252. 'not null' => TRUE,
  253. ],
  254. 'acquisition_id' => [
  255. 'description' => '',
  256. 'type' => 'int',
  257. 'not null' => TRUE,
  258. ],
  259. 'type_id' => [
  260. 'description' => '',
  261. 'type' => 'int',
  262. 'not null' => TRUE,
  263. ],
  264. 'value' => [
  265. 'description' => '',
  266. 'type' => 'text',
  267. 'not null' => FALSE,
  268. ],
  269. 'rank' => [
  270. 'description' => '',
  271. 'type' => 'int',
  272. 'not null' => TRUE,
  273. 'default' => 0,
  274. ],
  275. ],
  276. 'primary key' => [
  277. 0 => 'acquisitionprop_id',
  278. ],
  279. 'unique keys' => [
  280. 'acquisitionprop_c1' => [
  281. 0 => 'acquisition_id',
  282. 1 => 'type_id',
  283. 2 => 'rank',
  284. ],
  285. ],
  286. 'indexes' => [
  287. 'acquisitionprop_idx1' => [
  288. 0 => 'acquisition_id',
  289. ],
  290. 'acquisitionprop_idx2' => [
  291. 0 => 'type_id',
  292. ],
  293. ],
  294. 'foreign keys' => [
  295. 'cvterm' => [
  296. 'table' => 'cvterm',
  297. 'columns' => [
  298. 'type_id' => 'cvterm_id',
  299. ],
  300. ],
  301. 'acquisition' => [
  302. 'table' => 'acquisition',
  303. 'columns' => [
  304. 'acquisition_id' => 'acquisition_id',
  305. ],
  306. ],
  307. ],
  308. 'table' => 'acquisitionprop',
  309. 'referring_tables' => NULL,
  310. ];
  311. return $description;
  312. }
  313. /**
  314. * Implements hook_chado_schema_v1_2_analysis()
  315. * Purpose: To describe the structure of 'analysis' to tripal
  316. *
  317. * @see chado_insert_record()
  318. * @see chado_update_record()
  319. * @see chado_select_record()
  320. *
  321. * @return
  322. * An array describing the 'analysis' table
  323. *
  324. * @ingroup tripal_chado_v1.2_schema_api
  325. *
  326. */
  327. function tripal_chado_chado_schema_v1_2_analysis() {
  328. $description = [
  329. 'referring_tables' => [
  330. 0 => 'analysisfeature',
  331. 1 => 'analysisprop',
  332. 2 => 'phylotree',
  333. 3 => 'quantification',
  334. ],
  335. 'description' => '',
  336. 'fields' => [
  337. 'analysis_id' => [
  338. 'description' => '',
  339. 'type' => 'serial',
  340. 'not null' => TRUE,
  341. ],
  342. 'name' => [
  343. 'description' => '',
  344. 'type' => 'varchar',
  345. 'length' => '255',
  346. 'not null' => FALSE,
  347. ],
  348. 'description' => [
  349. 'description' => '',
  350. 'type' => 'text',
  351. 'not null' => FALSE,
  352. ],
  353. 'program' => [
  354. 'description' => '',
  355. 'type' => 'varchar',
  356. 'length' => '255',
  357. 'not null' => TRUE,
  358. ],
  359. 'programversion' => [
  360. 'description' => '',
  361. 'type' => 'varchar',
  362. 'length' => '255',
  363. 'not null' => TRUE,
  364. ],
  365. 'algorithm' => [
  366. 'description' => '',
  367. 'type' => 'varchar',
  368. 'length' => '255',
  369. 'not null' => FALSE,
  370. ],
  371. 'sourcename' => [
  372. 'description' => '',
  373. 'type' => 'varchar',
  374. 'length' => '255',
  375. 'not null' => FALSE,
  376. ],
  377. 'sourceversion' => [
  378. 'description' => '',
  379. 'type' => 'varchar',
  380. 'length' => '255',
  381. 'not null' => FALSE,
  382. ],
  383. 'sourceuri' => [
  384. 'description' => '',
  385. 'type' => 'text',
  386. 'not null' => FALSE,
  387. ],
  388. 'timeexecuted' => [
  389. 'description' => '',
  390. 'type' => 'datetime',
  391. 'not null' => TRUE,
  392. 'default' => 'now()',
  393. ],
  394. ],
  395. 'primary key' => [
  396. 0 => 'analysis_id',
  397. ],
  398. 'unique keys' => [
  399. 'analysis_c1' => [
  400. 0 => 'program',
  401. 1 => 'programversion',
  402. 2 => 'sourcename',
  403. ],
  404. ],
  405. 'foreign keys' => [
  406. ],
  407. 'table' => 'analysis',
  408. ];
  409. return $description;
  410. }
  411. /**
  412. * Implements hook_chado_schema_v1_2_analysisfeature()
  413. * Purpose: To describe the structure of 'analysisfeature' to tripal
  414. *
  415. * @see chado_insert_record()
  416. * @see chado_update_record()
  417. * @see chado_select_record()
  418. *
  419. * @return
  420. * An array describing the 'analysisfeature' table
  421. *
  422. * @ingroup tripal_chado_v1.2_schema_api
  423. *
  424. */
  425. function tripal_chado_chado_schema_v1_2_analysisfeature() {
  426. $description = [
  427. 'description' => '',
  428. 'fields' => [
  429. 'analysisfeature_id' => [
  430. 'description' => '',
  431. 'type' => 'serial',
  432. 'not null' => TRUE,
  433. ],
  434. 'feature_id' => [
  435. 'description' => '',
  436. 'type' => 'int',
  437. 'not null' => TRUE,
  438. ],
  439. 'analysis_id' => [
  440. 'description' => '',
  441. 'type' => 'int',
  442. 'not null' => TRUE,
  443. ],
  444. 'rawscore' => [
  445. 'description' => '',
  446. 'type' => 'float',
  447. 'size' => 'big',
  448. 'not null' => FALSE,
  449. ],
  450. 'normscore' => [
  451. 'description' => '',
  452. 'type' => 'float',
  453. 'size' => 'big',
  454. 'not null' => FALSE,
  455. ],
  456. 'significance' => [
  457. 'description' => '',
  458. 'type' => 'float',
  459. 'size' => 'big',
  460. 'not null' => FALSE,
  461. ],
  462. 'identity' => [
  463. 'description' => '',
  464. 'type' => 'float',
  465. 'size' => 'big',
  466. 'not null' => FALSE,
  467. ],
  468. ],
  469. 'primary key' => [
  470. 0 => 'analysisfeature_id',
  471. ],
  472. 'unique keys' => [
  473. 'analysisfeature_c1' => [
  474. 0 => 'feature_id',
  475. 1 => 'analysis_id',
  476. ],
  477. ],
  478. 'indexes' => [
  479. 'analysisfeature_idx1' => [
  480. 0 => 'feature_id',
  481. ],
  482. 'analysisfeature_idx2' => [
  483. 0 => 'analysis_id',
  484. ],
  485. ],
  486. 'foreign keys' => [
  487. 'analysis' => [
  488. 'table' => 'analysis',
  489. 'columns' => [
  490. 'analysis_id' => 'analysis_id',
  491. ],
  492. ],
  493. 'feature' => [
  494. 'table' => 'feature',
  495. 'columns' => [
  496. 'feature_id' => 'feature_id',
  497. ],
  498. ],
  499. ],
  500. 'table' => 'analysisfeature',
  501. 'referring_tables' => [
  502. 0 => 'analysisfeatureprop',
  503. ],
  504. ];
  505. return $description;
  506. }
  507. /**
  508. * Implements hook_chado_schema_v1_2_analysisfeatureprop()
  509. * Purpose: To describe the structure of 'analysisfeatureprop' to tripal
  510. *
  511. * @see chado_insert_record()
  512. * @see chado_update_record()
  513. * @see chado_select_record()
  514. *
  515. * @return
  516. * An array describing the 'analysisfeatureprop' table
  517. *
  518. * @ingroup tripal_chado_v1.2_schema_api
  519. *
  520. */
  521. function tripal_chado_chado_schema_v1_2_analysisfeatureprop() {
  522. $description = [
  523. 'description' => '',
  524. 'fields' => [
  525. 'analysisfeatureprop_id' => [
  526. 'description' => '',
  527. 'type' => 'serial',
  528. 'not null' => TRUE,
  529. ],
  530. 'analysisfeature_id' => [
  531. 'description' => '',
  532. 'type' => 'int',
  533. 'not null' => TRUE,
  534. ],
  535. 'type_id' => [
  536. 'description' => '',
  537. 'type' => 'int',
  538. 'not null' => TRUE,
  539. ],
  540. 'value' => [
  541. 'description' => '',
  542. 'type' => 'text',
  543. 'not null' => FALSE,
  544. ],
  545. 'rank' => [
  546. 'description' => '',
  547. 'type' => 'int',
  548. 'not null' => TRUE,
  549. ],
  550. ],
  551. 'primary key' => [
  552. 0 => 'analysisfeatureprop_id',
  553. ],
  554. 'unique keys' => [
  555. 'analysisfeature_id_type_id_rank' => [
  556. 0 => 'analysisfeature_id',
  557. 1 => 'type_id',
  558. 2 => 'rank',
  559. ],
  560. ],
  561. 'foreign keys' => [
  562. 'cvterm' => [
  563. 'table' => 'cvterm',
  564. 'columns' => [
  565. 'type_id' => 'cvterm_id',
  566. ],
  567. ],
  568. 'analysisfeature' => [
  569. 'table' => 'analysisfeature',
  570. 'columns' => [
  571. 'analysisfeature_id' => 'analysisfeature_id',
  572. ],
  573. ],
  574. ],
  575. 'table' => 'analysisfeatureprop',
  576. 'referring_tables' => NULL,
  577. ];
  578. return $description;
  579. }
  580. /**
  581. * Implements hook_chado_schema_v1_2_analysisprop()
  582. * Purpose: To describe the structure of 'analysisprop' to tripal
  583. *
  584. * @see chado_insert_record()
  585. * @see chado_update_record()
  586. * @see chado_select_record()
  587. *
  588. * @return
  589. * An array describing the 'analysisprop' table
  590. *
  591. * @ingroup tripal_chado_v1.2_schema_api
  592. *
  593. */
  594. function tripal_chado_chado_schema_v1_2_analysisprop() {
  595. $description = [
  596. 'description' => '',
  597. 'fields' => [
  598. 'analysisprop_id' => [
  599. 'description' => '',
  600. 'type' => 'serial',
  601. 'not null' => TRUE,
  602. ],
  603. 'analysis_id' => [
  604. 'description' => '',
  605. 'type' => 'int',
  606. 'not null' => TRUE,
  607. ],
  608. 'type_id' => [
  609. 'description' => '',
  610. 'type' => 'int',
  611. 'not null' => TRUE,
  612. ],
  613. 'value' => [
  614. 'description' => '',
  615. 'type' => 'text',
  616. 'not null' => FALSE,
  617. ],
  618. 'rank' => [
  619. 'description' => '',
  620. 'type' => 'int',
  621. 'not null' => TRUE,
  622. 'default' => 0,
  623. ],
  624. ],
  625. 'primary key' => [
  626. 0 => 'analysisprop_id',
  627. ],
  628. 'unique keys' => [
  629. 'analysisprop_c1' => [
  630. 0 => 'analysis_id',
  631. 1 => 'type_id',
  632. 2 => 'rank',
  633. ],
  634. ],
  635. 'indexes' => [
  636. 'analysisprop_idx1' => [
  637. 0 => 'analysis_id',
  638. ],
  639. 'analysisprop_idx2' => [
  640. 0 => 'type_id',
  641. ],
  642. ],
  643. 'foreign keys' => [
  644. 'cvterm' => [
  645. 'table' => 'cvterm',
  646. 'columns' => [
  647. 'type_id' => 'cvterm_id',
  648. ],
  649. ],
  650. 'analysis' => [
  651. 'table' => 'analysis',
  652. 'columns' => [
  653. 'analysis_id' => 'analysis_id',
  654. ],
  655. ],
  656. ],
  657. 'table' => 'analysisprop',
  658. 'referring_tables' => NULL,
  659. ];
  660. return $description;
  661. }
  662. /**
  663. * Implements hook_chado_schema_v1_2_arraydesign()
  664. * Purpose: To describe the structure of 'arraydesign' to tripal
  665. *
  666. * @see chado_insert_record()
  667. * @see chado_update_record()
  668. * @see chado_select_record()
  669. *
  670. * @return
  671. * An array describing the 'arraydesign' table
  672. *
  673. * @ingroup tripal_chado_v1.2_schema_api
  674. *
  675. */
  676. function tripal_chado_chado_schema_v1_2_arraydesign() {
  677. $description = [
  678. 'description' => '',
  679. 'fields' => [
  680. 'arraydesign_id' => [
  681. 'description' => '',
  682. 'type' => 'serial',
  683. 'not null' => TRUE,
  684. ],
  685. 'manufacturer_id' => [
  686. 'description' => '',
  687. 'type' => 'int',
  688. 'not null' => TRUE,
  689. ],
  690. 'platformtype_id' => [
  691. 'description' => '',
  692. 'type' => 'int',
  693. 'not null' => TRUE,
  694. ],
  695. 'substratetype_id' => [
  696. 'description' => '',
  697. 'type' => 'int',
  698. 'not null' => FALSE,
  699. ],
  700. 'protocol_id' => [
  701. 'description' => '',
  702. 'type' => 'int',
  703. 'not null' => FALSE,
  704. ],
  705. 'dbxref_id' => [
  706. 'description' => '',
  707. 'type' => 'int',
  708. 'not null' => FALSE,
  709. ],
  710. 'name' => [
  711. 'description' => '',
  712. 'type' => 'text',
  713. 'not null' => TRUE,
  714. ],
  715. 'version' => [
  716. 'description' => '',
  717. 'type' => 'text',
  718. 'not null' => FALSE,
  719. ],
  720. 'description' => [
  721. 'description' => '',
  722. 'type' => 'text',
  723. 'not null' => FALSE,
  724. ],
  725. 'array_dimensions' => [
  726. 'description' => '',
  727. 'type' => 'text',
  728. 'not null' => FALSE,
  729. ],
  730. 'element_dimensions' => [
  731. 'description' => '',
  732. 'type' => 'text',
  733. 'not null' => FALSE,
  734. ],
  735. 'num_of_elements' => [
  736. 'description' => '',
  737. 'type' => 'int',
  738. 'not null' => FALSE,
  739. ],
  740. 'num_array_columns' => [
  741. 'description' => '',
  742. 'type' => 'int',
  743. 'not null' => FALSE,
  744. ],
  745. 'num_array_rows' => [
  746. 'description' => '',
  747. 'type' => 'int',
  748. 'not null' => FALSE,
  749. ],
  750. 'num_grid_columns' => [
  751. 'description' => '',
  752. 'type' => 'int',
  753. 'not null' => FALSE,
  754. ],
  755. 'num_grid_rows' => [
  756. 'description' => '',
  757. 'type' => 'int',
  758. 'not null' => FALSE,
  759. ],
  760. 'num_sub_columns' => [
  761. 'description' => '',
  762. 'type' => 'int',
  763. 'not null' => FALSE,
  764. ],
  765. 'num_sub_rows' => [
  766. 'description' => '',
  767. 'type' => 'int',
  768. 'not null' => FALSE,
  769. ],
  770. ],
  771. 'primary key' => [
  772. 0 => 'arraydesign_id',
  773. ],
  774. 'unique keys' => [
  775. 'arraydesign_c1' => [
  776. 0 => 'name',
  777. ],
  778. ],
  779. 'indexes' => [
  780. 'arraydesign_idx1' => [
  781. 0 => 'manufacturer_id',
  782. ],
  783. 'arraydesign_idx2' => [
  784. 0 => 'platformtype_id',
  785. ],
  786. 'arraydesign_idx3' => [
  787. 0 => 'substratetype_id',
  788. ],
  789. 'arraydesign_idx4' => [
  790. 0 => 'protocol_id',
  791. ],
  792. 'arraydesign_idx5' => [
  793. 0 => 'dbxref_id',
  794. ],
  795. ],
  796. 'foreign keys' => [
  797. 'cvterm' => [
  798. 'table' => 'cvterm',
  799. 'columns' => [
  800. 'platformtype_id' => 'cvterm_id',
  801. 'substratetype_id' => 'cvterm_id',
  802. ],
  803. ],
  804. 'dbxref' => [
  805. 'table' => 'dbxref',
  806. 'columns' => [
  807. 'dbxref_id' => 'dbxref_id',
  808. ],
  809. ],
  810. 'contact' => [
  811. 'table' => 'contact',
  812. 'columns' => [
  813. 'manufacturer_id' => 'contact_id',
  814. ],
  815. ],
  816. 'protocol' => [
  817. 'table' => 'protocol',
  818. 'columns' => [
  819. 'protocol_id' => 'protocol_id',
  820. ],
  821. ],
  822. ],
  823. 'table' => 'arraydesign',
  824. 'referring_tables' => [
  825. 0 => 'arraydesignprop',
  826. 1 => 'assay',
  827. 2 => 'element',
  828. ],
  829. ];
  830. return $description;
  831. }
  832. /**
  833. * Implements hook_chado_schema_v1_2_arraydesignprop()
  834. * Purpose: To describe the structure of 'arraydesignprop' to tripal
  835. *
  836. * @see chado_insert_record()
  837. * @see chado_update_record()
  838. * @see chado_select_record()
  839. *
  840. * @return
  841. * An array describing the 'arraydesignprop' table
  842. *
  843. * @ingroup tripal_chado_v1.2_schema_api
  844. *
  845. */
  846. function tripal_chado_chado_schema_v1_2_arraydesignprop() {
  847. $description = [
  848. 'description' => '',
  849. 'fields' => [
  850. 'arraydesignprop_id' => [
  851. 'description' => '',
  852. 'type' => 'serial',
  853. 'not null' => TRUE,
  854. ],
  855. 'arraydesign_id' => [
  856. 'description' => '',
  857. 'type' => 'int',
  858. 'not null' => TRUE,
  859. ],
  860. 'type_id' => [
  861. 'description' => '',
  862. 'type' => 'int',
  863. 'not null' => TRUE,
  864. ],
  865. 'value' => [
  866. 'description' => '',
  867. 'type' => 'text',
  868. 'not null' => FALSE,
  869. ],
  870. 'rank' => [
  871. 'description' => '',
  872. 'type' => 'int',
  873. 'not null' => TRUE,
  874. 'default' => 0,
  875. ],
  876. ],
  877. 'primary key' => [
  878. 0 => 'arraydesignprop_id',
  879. ],
  880. 'unique keys' => [
  881. 'arraydesignprop_c1' => [
  882. 0 => 'arraydesign_id',
  883. 1 => 'type_id',
  884. 2 => 'rank',
  885. ],
  886. ],
  887. 'indexes' => [
  888. 'arraydesignprop_idx1' => [
  889. 0 => 'arraydesign_id',
  890. ],
  891. 'arraydesignprop_idx2' => [
  892. 0 => 'type_id',
  893. ],
  894. ],
  895. 'foreign keys' => [
  896. 'cvterm' => [
  897. 'table' => 'cvterm',
  898. 'columns' => [
  899. 'type_id' => 'cvterm_id',
  900. ],
  901. ],
  902. 'arraydesign' => [
  903. 'table' => 'arraydesign',
  904. 'columns' => [
  905. 'arraydesign_id' => 'arraydesign_id',
  906. ],
  907. ],
  908. ],
  909. 'table' => 'arraydesignprop',
  910. 'referring_tables' => NULL,
  911. ];
  912. return $description;
  913. }
  914. /**
  915. * Implements hook_chado_schema_v1_2_assay()
  916. * Purpose: To describe the structure of 'assay' to tripal
  917. *
  918. * @see chado_insert_record()
  919. * @see chado_update_record()
  920. * @see chado_select_record()
  921. *
  922. * @return
  923. * An array describing the 'assay' table
  924. *
  925. * @ingroup tripal_chado_v1.2_schema_api
  926. *
  927. */
  928. function tripal_chado_chado_schema_v1_2_assay() {
  929. $description = [
  930. 'description' => '',
  931. 'fields' => [
  932. 'assay_id' => [
  933. 'description' => '',
  934. 'type' => 'serial',
  935. 'not null' => TRUE,
  936. ],
  937. 'arraydesign_id' => [
  938. 'description' => '',
  939. 'type' => 'int',
  940. 'not null' => TRUE,
  941. ],
  942. 'protocol_id' => [
  943. 'description' => '',
  944. 'type' => 'int',
  945. 'not null' => FALSE,
  946. ],
  947. 'assaydate' => [
  948. 'description' => '',
  949. 'type' => 'datetime',
  950. 'not null' => FALSE,
  951. 'default' => 'now()',
  952. ],
  953. 'arrayidentifier' => [
  954. 'description' => '',
  955. 'type' => 'text',
  956. 'not null' => FALSE,
  957. ],
  958. 'arraybatchidentifier' => [
  959. 'description' => '',
  960. 'type' => 'text',
  961. 'not null' => FALSE,
  962. ],
  963. 'operator_id' => [
  964. 'description' => '',
  965. 'type' => 'int',
  966. 'not null' => TRUE,
  967. ],
  968. 'dbxref_id' => [
  969. 'description' => '',
  970. 'type' => 'int',
  971. 'not null' => FALSE,
  972. ],
  973. 'name' => [
  974. 'description' => '',
  975. 'type' => 'text',
  976. 'not null' => FALSE,
  977. ],
  978. 'description' => [
  979. 'description' => '',
  980. 'type' => 'text',
  981. 'not null' => FALSE,
  982. ],
  983. ],
  984. 'primary key' => [
  985. 0 => 'assay_id',
  986. ],
  987. 'unique keys' => [
  988. 'assay_c1' => [
  989. 0 => 'name',
  990. ],
  991. ],
  992. 'indexes' => [
  993. 'assay_idx1' => [
  994. 0 => 'arraydesign_id',
  995. ],
  996. 'assay_idx2' => [
  997. 0 => 'protocol_id',
  998. ],
  999. 'assay_idx3' => [
  1000. 0 => 'operator_id',
  1001. ],
  1002. 'assay_idx4' => [
  1003. 0 => 'dbxref_id',
  1004. ],
  1005. ],
  1006. 'foreign keys' => [
  1007. 'dbxref' => [
  1008. 'table' => 'dbxref',
  1009. 'columns' => [
  1010. 'dbxref_id' => 'dbxref_id',
  1011. ],
  1012. ],
  1013. 'contact' => [
  1014. 'table' => 'contact',
  1015. 'columns' => [
  1016. 'operator_id' => 'contact_id',
  1017. ],
  1018. ],
  1019. 'arraydesign' => [
  1020. 'table' => 'arraydesign',
  1021. 'columns' => [
  1022. 'arraydesign_id' => 'arraydesign_id',
  1023. ],
  1024. ],
  1025. 'protocol' => [
  1026. 'table' => 'protocol',
  1027. 'columns' => [
  1028. 'protocol_id' => 'protocol_id',
  1029. ],
  1030. ],
  1031. ],
  1032. 'table' => 'assay',
  1033. 'referring_tables' => [
  1034. 0 => 'acquisition',
  1035. 1 => 'assay_biomaterial',
  1036. 2 => 'assay_project',
  1037. 3 => 'assayprop',
  1038. 4 => 'control',
  1039. 5 => 'study_assay',
  1040. 6 => 'studyfactorvalue',
  1041. ],
  1042. ];
  1043. return $description;
  1044. }
  1045. /**
  1046. * Implements hook_chado_schema_v1_2_assay_biomaterial()
  1047. * Purpose: To describe the structure of 'assay_biomaterial' to tripal
  1048. *
  1049. * @see chado_insert_record()
  1050. * @see chado_update_record()
  1051. * @see chado_select_record()
  1052. *
  1053. * @return
  1054. * An array describing the 'assay_biomaterial' table
  1055. *
  1056. * @ingroup tripal_chado_v1.2_schema_api
  1057. *
  1058. */
  1059. function tripal_chado_chado_schema_v1_2_assay_biomaterial() {
  1060. $description = [
  1061. 'description' => '',
  1062. 'fields' => [
  1063. 'assay_biomaterial_id' => [
  1064. 'description' => '',
  1065. 'type' => 'serial',
  1066. 'not null' => TRUE,
  1067. ],
  1068. 'assay_id' => [
  1069. 'description' => '',
  1070. 'type' => 'int',
  1071. 'not null' => TRUE,
  1072. ],
  1073. 'biomaterial_id' => [
  1074. 'description' => '',
  1075. 'type' => 'int',
  1076. 'not null' => TRUE,
  1077. ],
  1078. 'channel_id' => [
  1079. 'description' => '',
  1080. 'type' => 'int',
  1081. 'not null' => FALSE,
  1082. ],
  1083. 'rank' => [
  1084. 'description' => '',
  1085. 'type' => 'int',
  1086. 'not null' => TRUE,
  1087. 'default' => 0,
  1088. ],
  1089. ],
  1090. 'primary key' => [
  1091. 0 => 'assay_biomaterial_id',
  1092. ],
  1093. 'unique keys' => [
  1094. 'assay_biomaterial_c1' => [
  1095. 0 => 'assay_id',
  1096. 1 => 'biomaterial_id',
  1097. 2 => 'channel_id',
  1098. 3 => 'rank',
  1099. ],
  1100. ],
  1101. 'indexes' => [
  1102. 'assay_biomaterial_idx1' => [
  1103. 0 => 'assay_id',
  1104. ],
  1105. 'assay_biomaterial_idx2' => [
  1106. 0 => 'biomaterial_id',
  1107. ],
  1108. 'assay_biomaterial_idx3' => [
  1109. 0 => 'channel_id',
  1110. ],
  1111. ],
  1112. 'foreign keys' => [
  1113. 'assay' => [
  1114. 'table' => 'assay',
  1115. 'columns' => [
  1116. 'assay_id' => 'assay_id',
  1117. ],
  1118. ],
  1119. 'biomaterial' => [
  1120. 'table' => 'biomaterial',
  1121. 'columns' => [
  1122. 'biomaterial_id' => 'biomaterial_id',
  1123. ],
  1124. ],
  1125. 'channel' => [
  1126. 'table' => 'channel',
  1127. 'columns' => [
  1128. 'channel_id' => 'channel_id',
  1129. ],
  1130. ],
  1131. ],
  1132. 'table' => 'assay_biomaterial',
  1133. 'referring_tables' => NULL,
  1134. ];
  1135. return $description;
  1136. }
  1137. /**
  1138. * Implements hook_chado_schema_v1_2_assay_project()
  1139. * Purpose: To describe the structure of 'assay_project' to tripal
  1140. *
  1141. * @see chado_insert_record()
  1142. * @see chado_update_record()
  1143. * @see chado_select_record()
  1144. *
  1145. * @return
  1146. * An array describing the 'assay_project' table
  1147. *
  1148. * @ingroup tripal_chado_v1.2_schema_api
  1149. *
  1150. */
  1151. function tripal_chado_chado_schema_v1_2_assay_project() {
  1152. $description = [
  1153. 'description' => '',
  1154. 'fields' => [
  1155. 'assay_project_id' => [
  1156. 'description' => '',
  1157. 'type' => 'serial',
  1158. 'not null' => TRUE,
  1159. ],
  1160. 'assay_id' => [
  1161. 'description' => '',
  1162. 'type' => 'int',
  1163. 'not null' => TRUE,
  1164. ],
  1165. 'project_id' => [
  1166. 'description' => '',
  1167. 'type' => 'int',
  1168. 'not null' => TRUE,
  1169. ],
  1170. ],
  1171. 'primary key' => [
  1172. 0 => 'assay_project_id',
  1173. ],
  1174. 'unique keys' => [
  1175. 'assay_project_c1' => [
  1176. 0 => 'assay_id',
  1177. 1 => 'project_id',
  1178. ],
  1179. ],
  1180. 'indexes' => [
  1181. 'assay_project_idx1' => [
  1182. 0 => 'assay_id',
  1183. ],
  1184. 'assay_project_idx2' => [
  1185. 0 => 'project_id',
  1186. ],
  1187. ],
  1188. 'foreign keys' => [
  1189. 'project' => [
  1190. 'table' => 'project',
  1191. 'columns' => [
  1192. 'project_id' => 'project_id',
  1193. ],
  1194. ],
  1195. 'assay' => [
  1196. 'table' => 'assay',
  1197. 'columns' => [
  1198. 'assay_id' => 'assay_id',
  1199. ],
  1200. ],
  1201. ],
  1202. 'table' => 'assay_project',
  1203. 'referring_tables' => NULL,
  1204. ];
  1205. return $description;
  1206. }
  1207. /**
  1208. * Implements hook_chado_schema_v1_2_assayprop()
  1209. * Purpose: To describe the structure of 'assayprop' to tripal
  1210. *
  1211. * @see chado_insert_record()
  1212. * @see chado_update_record()
  1213. * @see chado_select_record()
  1214. *
  1215. * @return
  1216. * An array describing the 'assayprop' table
  1217. *
  1218. * @ingroup tripal_chado_v1.2_schema_api
  1219. *
  1220. */
  1221. function tripal_chado_chado_schema_v1_2_assayprop() {
  1222. $description = [
  1223. 'description' => '',
  1224. 'fields' => [
  1225. 'assayprop_id' => [
  1226. 'description' => '',
  1227. 'type' => 'serial',
  1228. 'not null' => TRUE,
  1229. ],
  1230. 'assay_id' => [
  1231. 'description' => '',
  1232. 'type' => 'int',
  1233. 'not null' => TRUE,
  1234. ],
  1235. 'type_id' => [
  1236. 'description' => '',
  1237. 'type' => 'int',
  1238. 'not null' => TRUE,
  1239. ],
  1240. 'value' => [
  1241. 'description' => '',
  1242. 'type' => 'text',
  1243. 'not null' => FALSE,
  1244. ],
  1245. 'rank' => [
  1246. 'description' => '',
  1247. 'type' => 'int',
  1248. 'not null' => TRUE,
  1249. 'default' => 0,
  1250. ],
  1251. ],
  1252. 'primary key' => [
  1253. 0 => 'assayprop_id',
  1254. ],
  1255. 'unique keys' => [
  1256. 'assayprop_c1' => [
  1257. 0 => 'assay_id',
  1258. 1 => 'type_id',
  1259. 2 => 'rank',
  1260. ],
  1261. ],
  1262. 'indexes' => [
  1263. 'assayprop_idx1' => [
  1264. 0 => 'assay_id',
  1265. ],
  1266. 'assayprop_idx2' => [
  1267. 0 => 'type_id',
  1268. ],
  1269. ],
  1270. 'foreign keys' => [
  1271. 'cvterm' => [
  1272. 'table' => 'cvterm',
  1273. 'columns' => [
  1274. 'type_id' => 'cvterm_id',
  1275. ],
  1276. ],
  1277. 'assay' => [
  1278. 'table' => 'assay',
  1279. 'columns' => [
  1280. 'assay_id' => 'assay_id',
  1281. ],
  1282. ],
  1283. ],
  1284. 'table' => 'assayprop',
  1285. 'referring_tables' => NULL,
  1286. ];
  1287. return $description;
  1288. }
  1289. /**
  1290. * Implements hook_chado_schema_v1_2_biomaterial()
  1291. * Purpose: To describe the structure of 'biomaterial' to tripal
  1292. *
  1293. * @see chado_insert_record()
  1294. * @see chado_update_record()
  1295. * @see chado_select_record()
  1296. *
  1297. * @return
  1298. * An array describing the 'biomaterial' table
  1299. *
  1300. * @ingroup tripal_chado_v1.2_schema_api
  1301. *
  1302. */
  1303. function tripal_chado_chado_schema_v1_2_biomaterial() {
  1304. $description = [
  1305. 'description' => '',
  1306. 'fields' => [
  1307. 'biomaterial_id' => [
  1308. 'description' => '',
  1309. 'type' => 'serial',
  1310. 'not null' => TRUE,
  1311. ],
  1312. 'taxon_id' => [
  1313. 'description' => '',
  1314. 'type' => 'int',
  1315. 'not null' => FALSE,
  1316. ],
  1317. 'biosourceprovider_id' => [
  1318. 'description' => '',
  1319. 'type' => 'int',
  1320. 'not null' => FALSE,
  1321. ],
  1322. 'dbxref_id' => [
  1323. 'description' => '',
  1324. 'type' => 'int',
  1325. 'not null' => FALSE,
  1326. ],
  1327. 'name' => [
  1328. 'description' => '',
  1329. 'type' => 'text',
  1330. 'not null' => FALSE,
  1331. ],
  1332. 'description' => [
  1333. 'description' => '',
  1334. 'type' => 'text',
  1335. 'not null' => FALSE,
  1336. ],
  1337. ],
  1338. 'primary key' => [
  1339. 0 => 'biomaterial_id',
  1340. ],
  1341. 'unique keys' => [
  1342. 'biomaterial_c1' => [
  1343. 0 => 'name',
  1344. ],
  1345. ],
  1346. 'indexes' => [
  1347. 'biomaterial_idx1' => [
  1348. 0 => 'taxon_id',
  1349. ],
  1350. 'biomaterial_idx2' => [
  1351. 0 => 'biosourceprovider_id',
  1352. ],
  1353. 'biomaterial_idx3' => [
  1354. 0 => 'dbxref_id',
  1355. ],
  1356. ],
  1357. 'foreign keys' => [
  1358. 'organism' => [
  1359. 'table' => 'organism',
  1360. 'columns' => [
  1361. 'taxon_id' => 'organism_id',
  1362. ],
  1363. ],
  1364. 'dbxref' => [
  1365. 'table' => 'dbxref',
  1366. 'columns' => [
  1367. 'dbxref_id' => 'dbxref_id',
  1368. ],
  1369. ],
  1370. 'contact' => [
  1371. 'table' => 'contact',
  1372. 'columns' => [
  1373. 'biosourceprovider_id' => 'contact_id',
  1374. ],
  1375. ],
  1376. ],
  1377. 'table' => 'biomaterial',
  1378. 'referring_tables' => [
  1379. 0 => 'assay_biomaterial',
  1380. 1 => 'biomaterial_dbxref',
  1381. 2 => 'biomaterial_relationship',
  1382. 4 => 'biomaterial_treatment',
  1383. 5 => 'biomaterialprop',
  1384. 6 => 'treatment',
  1385. ],
  1386. ];
  1387. return $description;
  1388. }
  1389. /**
  1390. * Implements hook_chado_schema_v1_2_biomaterial_dbxref()
  1391. * Purpose: To describe the structure of 'biomaterial_dbxref' to tripal
  1392. *
  1393. * @see chado_insert_record()
  1394. * @see chado_update_record()
  1395. * @see chado_select_record()
  1396. *
  1397. * @return
  1398. * An array describing the 'biomaterial_dbxref' table
  1399. *
  1400. * @ingroup tripal_chado_v1.2_schema_api
  1401. *
  1402. */
  1403. function tripal_chado_chado_schema_v1_2_biomaterial_dbxref() {
  1404. $description = [
  1405. 'description' => '',
  1406. 'fields' => [
  1407. 'biomaterial_dbxref_id' => [
  1408. 'description' => '',
  1409. 'type' => 'serial',
  1410. 'not null' => TRUE,
  1411. ],
  1412. 'biomaterial_id' => [
  1413. 'description' => '',
  1414. 'type' => 'int',
  1415. 'not null' => TRUE,
  1416. ],
  1417. 'dbxref_id' => [
  1418. 'description' => '',
  1419. 'type' => 'int',
  1420. 'not null' => TRUE,
  1421. ],
  1422. ],
  1423. 'primary key' => [
  1424. 0 => 'biomaterial_dbxref_id',
  1425. ],
  1426. 'unique keys' => [
  1427. 'biomaterial_dbxref_c1' => [
  1428. 0 => 'biomaterial_id',
  1429. 1 => 'dbxref_id',
  1430. ],
  1431. ],
  1432. 'indexes' => [
  1433. 'biomaterial_dbxref_idx1' => [
  1434. 0 => 'biomaterial_id',
  1435. ],
  1436. 'biomaterial_dbxref_idx2' => [
  1437. 0 => 'dbxref_id',
  1438. ],
  1439. ],
  1440. 'foreign keys' => [
  1441. 'dbxref' => [
  1442. 'table' => 'dbxref',
  1443. 'columns' => [
  1444. 'dbxref_id' => 'dbxref_id',
  1445. ],
  1446. ],
  1447. 'biomaterial' => [
  1448. 'table' => 'biomaterial',
  1449. 'columns' => [
  1450. 'biomaterial_id' => 'biomaterial_id',
  1451. ],
  1452. ],
  1453. ],
  1454. 'table' => 'biomaterial_dbxref',
  1455. 'referring_tables' => NULL,
  1456. ];
  1457. return $description;
  1458. }
  1459. /**
  1460. * Implements hook_chado_schema_v1_2_biomaterial_relationship()
  1461. * Purpose: To describe the structure of 'biomaterial_relationship' to tripal
  1462. *
  1463. * @see chado_insert_record()
  1464. * @see chado_update_record()
  1465. * @see chado_select_record()
  1466. *
  1467. * @return
  1468. * An array describing the 'biomaterial_relationship' table
  1469. *
  1470. * @ingroup tripal_chado_v1.2_schema_api
  1471. *
  1472. */
  1473. function tripal_chado_chado_schema_v1_2_biomaterial_relationship() {
  1474. $description = [
  1475. 'description' => '',
  1476. 'fields' => [
  1477. 'biomaterial_relationship_id' => [
  1478. 'description' => '',
  1479. 'type' => 'serial',
  1480. 'not null' => TRUE,
  1481. ],
  1482. 'subject_id' => [
  1483. 'description' => '',
  1484. 'type' => 'int',
  1485. 'not null' => TRUE,
  1486. ],
  1487. 'type_id' => [
  1488. 'description' => '',
  1489. 'type' => 'int',
  1490. 'not null' => TRUE,
  1491. ],
  1492. 'object_id' => [
  1493. 'description' => '',
  1494. 'type' => 'int',
  1495. 'not null' => TRUE,
  1496. ],
  1497. ],
  1498. 'primary key' => [
  1499. 0 => 'biomaterial_relationship_id',
  1500. ],
  1501. 'unique keys' => [
  1502. 'biomaterial_relationship_c1' => [
  1503. 0 => 'subject_id',
  1504. 1 => 'object_id',
  1505. 2 => 'type_id',
  1506. ],
  1507. ],
  1508. 'indexes' => [
  1509. 'biomaterial_relationship_idx1' => [
  1510. 0 => 'subject_id',
  1511. ],
  1512. 'biomaterial_relationship_idx2' => [
  1513. 0 => 'object_id',
  1514. ],
  1515. 'biomaterial_relationship_idx3' => [
  1516. 0 => 'type_id',
  1517. ],
  1518. ],
  1519. 'foreign keys' => [
  1520. 'cvterm' => [
  1521. 'table' => 'cvterm',
  1522. 'columns' => [
  1523. 'type_id' => 'cvterm_id',
  1524. ],
  1525. ],
  1526. 'biomaterial' => [
  1527. 'table' => 'biomaterial',
  1528. 'columns' => [
  1529. 'subject_id' => 'biomaterial_id',
  1530. 'object_id' => 'biomaterial_id',
  1531. ],
  1532. ],
  1533. ],
  1534. 'table' => 'biomaterial_relationship',
  1535. 'referring_tables' => NULL,
  1536. ];
  1537. return $description;
  1538. }
  1539. /**
  1540. * Implements hook_chado_schema_v1_2_biomaterial_treatment()
  1541. * Purpose: To describe the structure of 'biomaterial_treatment' to tripal
  1542. *
  1543. * @see chado_insert_record()
  1544. * @see chado_update_record()
  1545. * @see chado_select_record()
  1546. *
  1547. * @return
  1548. * An array describing the 'biomaterial_treatment' table
  1549. *
  1550. * @ingroup tripal_chado_v1.2_schema_api
  1551. *
  1552. */
  1553. function tripal_chado_chado_schema_v1_2_biomaterial_treatment() {
  1554. $description = [
  1555. 'description' => '',
  1556. 'fields' => [
  1557. 'biomaterial_treatment_id' => [
  1558. 'description' => '',
  1559. 'type' => 'serial',
  1560. 'not null' => TRUE,
  1561. ],
  1562. 'biomaterial_id' => [
  1563. 'description' => '',
  1564. 'type' => 'int',
  1565. 'not null' => TRUE,
  1566. ],
  1567. 'treatment_id' => [
  1568. 'description' => '',
  1569. 'type' => 'int',
  1570. 'not null' => TRUE,
  1571. ],
  1572. 'unittype_id' => [
  1573. 'description' => '',
  1574. 'type' => 'int',
  1575. 'not null' => FALSE,
  1576. ],
  1577. 'value' => [
  1578. 'description' => '',
  1579. 'type' => 'float',
  1580. 'not null' => FALSE,
  1581. ],
  1582. 'rank' => [
  1583. 'description' => '',
  1584. 'type' => 'int',
  1585. 'not null' => TRUE,
  1586. 'default' => 0,
  1587. ],
  1588. ],
  1589. 'primary key' => [
  1590. 0 => 'biomaterial_treatment_id',
  1591. ],
  1592. 'unique keys' => [
  1593. 'biomaterial_treatment_c1' => [
  1594. 0 => 'biomaterial_id',
  1595. 1 => 'treatment_id',
  1596. ],
  1597. ],
  1598. 'indexes' => [
  1599. 'biomaterial_treatment_idx1' => [
  1600. 0 => 'biomaterial_id',
  1601. ],
  1602. 'biomaterial_treatment_idx2' => [
  1603. 0 => 'treatment_id',
  1604. ],
  1605. 'biomaterial_treatment_idx3' => [
  1606. 0 => 'unittype_id',
  1607. ],
  1608. ],
  1609. 'foreign keys' => [
  1610. 'cvterm' => [
  1611. 'table' => 'cvterm',
  1612. 'columns' => [
  1613. 'unittype_id' => 'cvterm_id',
  1614. ],
  1615. ],
  1616. 'biomaterial' => [
  1617. 'table' => 'biomaterial',
  1618. 'columns' => [
  1619. 'biomaterial_id' => 'biomaterial_id',
  1620. ],
  1621. ],
  1622. 'treatment' => [
  1623. 'table' => 'treatment',
  1624. 'columns' => [
  1625. 'treatment_id' => 'treatment_id',
  1626. ],
  1627. ],
  1628. ],
  1629. 'table' => 'biomaterial_treatment',
  1630. 'referring_tables' => NULL,
  1631. ];
  1632. return $description;
  1633. }
  1634. /**
  1635. * Implements hook_chado_schema_v1_2_biomaterialprop()
  1636. * Purpose: To describe the structure of 'biomaterialprop' to tripal
  1637. *
  1638. * @see chado_insert_record()
  1639. * @see chado_update_record()
  1640. * @see chado_select_record()
  1641. *
  1642. * @return
  1643. * An array describing the 'biomaterialprop' table
  1644. *
  1645. * @ingroup tripal_chado_v1.2_schema_api
  1646. *
  1647. */
  1648. function tripal_chado_chado_schema_v1_2_biomaterialprop() {
  1649. $description = [
  1650. 'description' => '',
  1651. 'fields' => [
  1652. 'biomaterialprop_id' => [
  1653. 'description' => '',
  1654. 'type' => 'serial',
  1655. 'not null' => TRUE,
  1656. ],
  1657. 'biomaterial_id' => [
  1658. 'description' => '',
  1659. 'type' => 'int',
  1660. 'not null' => TRUE,
  1661. ],
  1662. 'type_id' => [
  1663. 'description' => '',
  1664. 'type' => 'int',
  1665. 'not null' => TRUE,
  1666. ],
  1667. 'value' => [
  1668. 'description' => '',
  1669. 'type' => 'text',
  1670. 'not null' => FALSE,
  1671. ],
  1672. 'rank' => [
  1673. 'description' => '',
  1674. 'type' => 'int',
  1675. 'not null' => TRUE,
  1676. 'default' => 0,
  1677. ],
  1678. ],
  1679. 'primary key' => [
  1680. 0 => 'biomaterialprop_id',
  1681. ],
  1682. 'unique keys' => [
  1683. 'biomaterialprop_c1' => [
  1684. 0 => 'biomaterial_id',
  1685. 1 => 'type_id',
  1686. 2 => 'rank',
  1687. ],
  1688. ],
  1689. 'indexes' => [
  1690. 'biomaterialprop_idx1' => [
  1691. 0 => 'biomaterial_id',
  1692. ],
  1693. 'biomaterialprop_idx2' => [
  1694. 0 => 'type_id',
  1695. ],
  1696. ],
  1697. 'foreign keys' => [
  1698. 'cvterm' => [
  1699. 'table' => 'cvterm',
  1700. 'columns' => [
  1701. 'type_id' => 'cvterm_id',
  1702. ],
  1703. ],
  1704. 'biomaterial' => [
  1705. 'table' => 'biomaterial',
  1706. 'columns' => [
  1707. 'biomaterial_id' => 'biomaterial_id',
  1708. ],
  1709. ],
  1710. ],
  1711. 'table' => 'biomaterialprop',
  1712. 'referring_tables' => NULL,
  1713. ];
  1714. return $description;
  1715. }
  1716. /**
  1717. * Implements hook_chado_schema_v1_2_cell_line()
  1718. * Purpose: To describe the structure of 'cell_line' to tripal
  1719. *
  1720. * @see chado_insert_record()
  1721. * @see chado_update_record()
  1722. * @see chado_select_record()
  1723. *
  1724. * @return
  1725. * An array describing the 'cell_line' table
  1726. *
  1727. * @ingroup tripal_chado_v1.2_schema_api
  1728. *
  1729. */
  1730. function tripal_chado_chado_schema_v1_2_cell_line() {
  1731. $description = [
  1732. 'description' => '',
  1733. 'fields' => [
  1734. 'cell_line_id' => [
  1735. 'description' => '',
  1736. 'type' => 'serial',
  1737. 'not null' => TRUE,
  1738. ],
  1739. 'name' => [
  1740. 'description' => '',
  1741. 'type' => 'varchar',
  1742. 'length' => '255',
  1743. 'not null' => FALSE,
  1744. ],
  1745. 'uniquename' => [
  1746. 'description' => '',
  1747. 'type' => 'varchar',
  1748. 'length' => '255',
  1749. 'not null' => TRUE,
  1750. ],
  1751. 'organism_id' => [
  1752. 'description' => '',
  1753. 'type' => 'int',
  1754. 'not null' => TRUE,
  1755. ],
  1756. 'timeaccessioned' => [
  1757. 'description' => '',
  1758. 'type' => 'datetime',
  1759. 'not null' => TRUE,
  1760. 'default' => 'now()',
  1761. ],
  1762. 'timelastmodified' => [
  1763. 'description' => '',
  1764. 'type' => 'datetime',
  1765. 'not null' => TRUE,
  1766. 'default' => 'now()',
  1767. ],
  1768. ],
  1769. 'primary key' => [
  1770. 0 => 'cell_line_id',
  1771. ],
  1772. 'unique keys' => [
  1773. 'cell_line_c1' => [
  1774. 0 => 'uniquename',
  1775. 1 => 'organism_id',
  1776. ],
  1777. ],
  1778. 'foreign keys' => [
  1779. 'organism' => [
  1780. 'table' => 'organism',
  1781. 'columns' => [
  1782. 'organism_id' => 'organism_id',
  1783. ],
  1784. ],
  1785. ],
  1786. 'table' => 'cell_line',
  1787. 'referring_tables' => [
  1788. 0 => 'cell_line_cvterm',
  1789. 1 => 'cell_line_dbxref',
  1790. 2 => 'cell_line_feature',
  1791. 3 => 'cell_line_library',
  1792. 4 => 'cell_line_pub',
  1793. 5 => 'cell_line_relationship',
  1794. 7 => 'cell_line_synonym',
  1795. 8 => 'cell_lineprop',
  1796. ],
  1797. ];
  1798. return $description;
  1799. }
  1800. /**
  1801. * Implements hook_chado_schema_v1_2_cell_line_cvterm()
  1802. * Purpose: To describe the structure of 'cell_line_cvterm' to tripal
  1803. *
  1804. * @see chado_insert_record()
  1805. * @see chado_update_record()
  1806. * @see chado_select_record()
  1807. *
  1808. * @return
  1809. * An array describing the 'cell_line_cvterm' table
  1810. *
  1811. * @ingroup tripal_chado_v1.2_schema_api
  1812. *
  1813. */
  1814. function tripal_chado_chado_schema_v1_2_cell_line_cvterm() {
  1815. $description = [
  1816. 'description' => '',
  1817. 'fields' => [
  1818. 'cell_line_cvterm_id' => [
  1819. 'description' => '',
  1820. 'type' => 'serial',
  1821. 'not null' => TRUE,
  1822. ],
  1823. 'cell_line_id' => [
  1824. 'description' => '',
  1825. 'type' => 'int',
  1826. 'not null' => TRUE,
  1827. ],
  1828. 'cvterm_id' => [
  1829. 'description' => '',
  1830. 'type' => 'int',
  1831. 'not null' => TRUE,
  1832. ],
  1833. 'pub_id' => [
  1834. 'description' => '',
  1835. 'type' => 'int',
  1836. 'not null' => TRUE,
  1837. ],
  1838. 'rank' => [
  1839. 'description' => '',
  1840. 'type' => 'int',
  1841. 'not null' => TRUE,
  1842. 'default' => 0,
  1843. ],
  1844. ],
  1845. 'primary key' => [
  1846. 0 => 'cell_line_cvterm_id',
  1847. ],
  1848. 'unique keys' => [
  1849. 'cell_line_cvterm_c1' => [
  1850. 0 => 'cell_line_id',
  1851. 1 => 'cvterm_id',
  1852. 2 => 'pub_id',
  1853. 3 => 'rank',
  1854. ],
  1855. ],
  1856. 'foreign keys' => [
  1857. 'cvterm' => [
  1858. 'table' => 'cvterm',
  1859. 'columns' => [
  1860. 'cvterm_id' => 'cvterm_id',
  1861. ],
  1862. ],
  1863. 'pub' => [
  1864. 'table' => 'pub',
  1865. 'columns' => [
  1866. 'pub_id' => 'pub_id',
  1867. ],
  1868. ],
  1869. 'cell_line' => [
  1870. 'table' => 'cell_line',
  1871. 'columns' => [
  1872. 'cell_line_id' => 'cell_line_id',
  1873. ],
  1874. ],
  1875. ],
  1876. 'table' => 'cell_line_cvterm',
  1877. 'referring_tables' => [
  1878. 0 => 'cell_line_cvtermprop',
  1879. ],
  1880. ];
  1881. return $description;
  1882. }
  1883. /**
  1884. * Implements hook_chado_schema_v1_2_cell_line_cvtermprop()
  1885. * Purpose: To describe the structure of 'cell_line_cvtermprop' to tripal
  1886. *
  1887. * @see chado_insert_record()
  1888. * @see chado_update_record()
  1889. * @see chado_select_record()
  1890. *
  1891. * @return
  1892. * An array describing the 'cell_line_cvtermprop' table
  1893. *
  1894. * @ingroup tripal_chado_v1.2_schema_api
  1895. *
  1896. */
  1897. function tripal_chado_chado_schema_v1_2_cell_line_cvtermprop() {
  1898. $description = [
  1899. 'description' => '',
  1900. 'fields' => [
  1901. 'cell_line_cvtermprop_id' => [
  1902. 'description' => '',
  1903. 'type' => 'serial',
  1904. 'not null' => TRUE,
  1905. ],
  1906. 'cell_line_cvterm_id' => [
  1907. 'description' => '',
  1908. 'type' => 'int',
  1909. 'not null' => TRUE,
  1910. ],
  1911. 'type_id' => [
  1912. 'description' => '',
  1913. 'type' => 'int',
  1914. 'not null' => TRUE,
  1915. ],
  1916. 'value' => [
  1917. 'description' => '',
  1918. 'type' => 'text',
  1919. 'not null' => FALSE,
  1920. ],
  1921. 'rank' => [
  1922. 'description' => '',
  1923. 'type' => 'int',
  1924. 'not null' => TRUE,
  1925. 'default' => 0,
  1926. ],
  1927. ],
  1928. 'primary key' => [
  1929. 0 => 'cell_line_cvtermprop_id',
  1930. ],
  1931. 'unique keys' => [
  1932. 'cell_line_cvtermprop_c1' => [
  1933. 0 => 'cell_line_cvterm_id',
  1934. 1 => 'type_id',
  1935. 2 => 'rank',
  1936. ],
  1937. ],
  1938. 'foreign keys' => [
  1939. 'cvterm' => [
  1940. 'table' => 'cvterm',
  1941. 'columns' => [
  1942. 'type_id' => 'cvterm_id',
  1943. ],
  1944. ],
  1945. 'cell_line_cvterm' => [
  1946. 'table' => 'cell_line_cvterm',
  1947. 'columns' => [
  1948. 'cell_line_cvterm_id' => 'cell_line_cvterm_id',
  1949. ],
  1950. ],
  1951. ],
  1952. 'table' => 'cell_line_cvtermprop',
  1953. 'referring_tables' => NULL,
  1954. ];
  1955. return $description;
  1956. }
  1957. /**
  1958. * Implements hook_chado_schema_v1_2_cell_line_dbxref()
  1959. * Purpose: To describe the structure of 'cell_line_dbxref' to tripal
  1960. *
  1961. * @see chado_insert_record()
  1962. * @see chado_update_record()
  1963. * @see chado_select_record()
  1964. *
  1965. * @return
  1966. * An array describing the 'cell_line_dbxref' table
  1967. *
  1968. * @ingroup tripal_chado_v1.2_schema_api
  1969. *
  1970. */
  1971. function tripal_chado_chado_schema_v1_2_cell_line_dbxref() {
  1972. $description = [
  1973. 'description' => '',
  1974. 'fields' => [
  1975. 'cell_line_dbxref_id' => [
  1976. 'description' => '',
  1977. 'type' => 'serial',
  1978. 'not null' => TRUE,
  1979. ],
  1980. 'cell_line_id' => [
  1981. 'description' => '',
  1982. 'type' => 'int',
  1983. 'not null' => TRUE,
  1984. ],
  1985. 'dbxref_id' => [
  1986. 'description' => '',
  1987. 'type' => 'int',
  1988. 'not null' => TRUE,
  1989. ],
  1990. 'is_current' => [
  1991. 'description' => '',
  1992. 'type' => 'boolean',
  1993. 'not null' => TRUE,
  1994. 'default' => 'true',
  1995. ],
  1996. ],
  1997. 'primary key' => [
  1998. 0 => 'cell_line_dbxref_id',
  1999. ],
  2000. 'unique keys' => [
  2001. 'cell_line_dbxref_c1' => [
  2002. 0 => 'cell_line_id',
  2003. 1 => 'dbxref_id',
  2004. ],
  2005. ],
  2006. 'foreign keys' => [
  2007. 'dbxref' => [
  2008. 'table' => 'dbxref',
  2009. 'columns' => [
  2010. 'dbxref_id' => 'dbxref_id',
  2011. ],
  2012. ],
  2013. 'cell_line' => [
  2014. 'table' => 'cell_line',
  2015. 'columns' => [
  2016. 'cell_line_id' => 'cell_line_id',
  2017. ],
  2018. ],
  2019. ],
  2020. 'table' => 'cell_line_dbxref',
  2021. 'referring_tables' => NULL,
  2022. ];
  2023. return $description;
  2024. }
  2025. /**
  2026. * Implements hook_chado_schema_v1_2_cell_line_feature()
  2027. * Purpose: To describe the structure of 'cell_line_feature' to tripal
  2028. *
  2029. * @see chado_insert_record()
  2030. * @see chado_update_record()
  2031. * @see chado_select_record()
  2032. *
  2033. * @return
  2034. * An array describing the 'cell_line_feature' table
  2035. *
  2036. * @ingroup tripal_chado_v1.2_schema_api
  2037. *
  2038. */
  2039. function tripal_chado_chado_schema_v1_2_cell_line_feature() {
  2040. $description = [
  2041. 'description' => '',
  2042. 'fields' => [
  2043. 'cell_line_feature_id' => [
  2044. 'description' => '',
  2045. 'type' => 'serial',
  2046. 'not null' => TRUE,
  2047. ],
  2048. 'cell_line_id' => [
  2049. 'description' => '',
  2050. 'type' => 'int',
  2051. 'not null' => TRUE,
  2052. ],
  2053. 'feature_id' => [
  2054. 'description' => '',
  2055. 'type' => 'int',
  2056. 'not null' => TRUE,
  2057. ],
  2058. 'pub_id' => [
  2059. 'description' => '',
  2060. 'type' => 'int',
  2061. 'not null' => TRUE,
  2062. ],
  2063. ],
  2064. 'primary key' => [
  2065. 0 => 'cell_line_feature_id',
  2066. ],
  2067. 'unique keys' => [
  2068. 'cell_line_feature_c1' => [
  2069. 0 => 'cell_line_id',
  2070. 1 => 'feature_id',
  2071. 2 => 'pub_id',
  2072. ],
  2073. ],
  2074. 'foreign keys' => [
  2075. 'pub' => [
  2076. 'table' => 'pub',
  2077. 'columns' => [
  2078. 'pub_id' => 'pub_id',
  2079. ],
  2080. ],
  2081. 'feature' => [
  2082. 'table' => 'feature',
  2083. 'columns' => [
  2084. 'feature_id' => 'feature_id',
  2085. ],
  2086. ],
  2087. 'cell_line' => [
  2088. 'table' => 'cell_line',
  2089. 'columns' => [
  2090. 'cell_line_id' => 'cell_line_id',
  2091. ],
  2092. ],
  2093. ],
  2094. 'table' => 'cell_line_feature',
  2095. 'referring_tables' => NULL,
  2096. ];
  2097. return $description;
  2098. }
  2099. /**
  2100. * Implements hook_chado_schema_v1_2_cell_line_library()
  2101. * Purpose: To describe the structure of 'cell_line_library' to tripal
  2102. *
  2103. * @see chado_insert_record()
  2104. * @see chado_update_record()
  2105. * @see chado_select_record()
  2106. *
  2107. * @return
  2108. * An array describing the 'cell_line_library' table
  2109. *
  2110. * @ingroup tripal_chado_v1.2_schema_api
  2111. *
  2112. */
  2113. function tripal_chado_chado_schema_v1_2_cell_line_library() {
  2114. $description = [
  2115. 'description' => '',
  2116. 'fields' => [
  2117. 'cell_line_library_id' => [
  2118. 'description' => '',
  2119. 'type' => 'serial',
  2120. 'not null' => TRUE,
  2121. ],
  2122. 'cell_line_id' => [
  2123. 'description' => '',
  2124. 'type' => 'int',
  2125. 'not null' => TRUE,
  2126. ],
  2127. 'library_id' => [
  2128. 'description' => '',
  2129. 'type' => 'int',
  2130. 'not null' => TRUE,
  2131. ],
  2132. 'pub_id' => [
  2133. 'description' => '',
  2134. 'type' => 'int',
  2135. 'not null' => TRUE,
  2136. ],
  2137. ],
  2138. 'primary key' => [
  2139. 0 => 'cell_line_library_id',
  2140. ],
  2141. 'unique keys' => [
  2142. 'cell_line_library_c1' => [
  2143. 0 => 'cell_line_id',
  2144. 1 => 'library_id',
  2145. 2 => 'pub_id',
  2146. ],
  2147. ],
  2148. 'foreign keys' => [
  2149. 'pub' => [
  2150. 'table' => 'pub',
  2151. 'columns' => [
  2152. 'pub_id' => 'pub_id',
  2153. ],
  2154. ],
  2155. 'library' => [
  2156. 'table' => 'library',
  2157. 'columns' => [
  2158. 'library_id' => 'library_id',
  2159. ],
  2160. ],
  2161. 'cell_line' => [
  2162. 'table' => 'cell_line',
  2163. 'columns' => [
  2164. 'cell_line_id' => 'cell_line_id',
  2165. ],
  2166. ],
  2167. ],
  2168. 'table' => 'cell_line_library',
  2169. 'referring_tables' => NULL,
  2170. ];
  2171. return $description;
  2172. }
  2173. /**
  2174. * Implements hook_chado_schema_v1_2_cell_line_pub()
  2175. * Purpose: To describe the structure of 'cell_line_pub' to tripal
  2176. *
  2177. * @see chado_insert_record()
  2178. * @see chado_update_record()
  2179. * @see chado_select_record()
  2180. *
  2181. * @return
  2182. * An array describing the 'cell_line_pub' table
  2183. *
  2184. * @ingroup tripal_chado_v1.2_schema_api
  2185. *
  2186. */
  2187. function tripal_chado_chado_schema_v1_2_cell_line_pub() {
  2188. $description = [
  2189. 'description' => '',
  2190. 'fields' => [
  2191. 'cell_line_pub_id' => [
  2192. 'description' => '',
  2193. 'type' => 'serial',
  2194. 'not null' => TRUE,
  2195. ],
  2196. 'cell_line_id' => [
  2197. 'description' => '',
  2198. 'type' => 'int',
  2199. 'not null' => TRUE,
  2200. ],
  2201. 'pub_id' => [
  2202. 'description' => '',
  2203. 'type' => 'int',
  2204. 'not null' => TRUE,
  2205. ],
  2206. ],
  2207. 'primary key' => [
  2208. 0 => 'cell_line_pub_id',
  2209. ],
  2210. 'unique keys' => [
  2211. 'cell_line_pub_c1' => [
  2212. 0 => 'cell_line_id',
  2213. 1 => 'pub_id',
  2214. ],
  2215. ],
  2216. 'foreign keys' => [
  2217. 'pub' => [
  2218. 'table' => 'pub',
  2219. 'columns' => [
  2220. 'pub_id' => 'pub_id',
  2221. ],
  2222. ],
  2223. 'cell_line' => [
  2224. 'table' => 'cell_line',
  2225. 'columns' => [
  2226. 'cell_line_id' => 'cell_line_id',
  2227. ],
  2228. ],
  2229. ],
  2230. 'table' => 'cell_line_pub',
  2231. 'referring_tables' => NULL,
  2232. ];
  2233. return $description;
  2234. }
  2235. /**
  2236. * Implements hook_chado_schema_v1_2_cell_line_relationship()
  2237. * Purpose: To describe the structure of 'cell_line_relationship' to tripal
  2238. *
  2239. * @see chado_insert_record()
  2240. * @see chado_update_record()
  2241. * @see chado_select_record()
  2242. *
  2243. * @return
  2244. * An array describing the 'cell_line_relationship' table
  2245. *
  2246. * @ingroup tripal_chado_v1.2_schema_api
  2247. *
  2248. */
  2249. function tripal_chado_chado_schema_v1_2_cell_line_relationship() {
  2250. $description = [
  2251. 'description' => '',
  2252. 'fields' => [
  2253. 'cell_line_relationship_id' => [
  2254. 'description' => '',
  2255. 'type' => 'serial',
  2256. 'not null' => TRUE,
  2257. ],
  2258. 'subject_id' => [
  2259. 'description' => '',
  2260. 'type' => 'int',
  2261. 'not null' => TRUE,
  2262. ],
  2263. 'object_id' => [
  2264. 'description' => '',
  2265. 'type' => 'int',
  2266. 'not null' => TRUE,
  2267. ],
  2268. 'type_id' => [
  2269. 'description' => '',
  2270. 'type' => 'int',
  2271. 'not null' => TRUE,
  2272. ],
  2273. ],
  2274. 'primary key' => [
  2275. 0 => 'cell_line_relationship_id',
  2276. ],
  2277. 'unique keys' => [
  2278. 'cell_line_relationship_c1' => [
  2279. 0 => 'subject_id',
  2280. 1 => 'object_id',
  2281. 2 => 'type_id',
  2282. ],
  2283. ],
  2284. 'foreign keys' => [
  2285. 'cvterm' => [
  2286. 'table' => 'cvterm',
  2287. 'columns' => [
  2288. 'type_id' => 'cvterm_id',
  2289. ],
  2290. ],
  2291. 'cell_line' => [
  2292. 'table' => 'cell_line',
  2293. 'columns' => [
  2294. 'subject_id' => 'cell_line_id',
  2295. 'object_id' => 'cell_line_id',
  2296. ],
  2297. ],
  2298. ],
  2299. 'table' => 'cell_line_relationship',
  2300. 'referring_tables' => NULL,
  2301. ];
  2302. return $description;
  2303. }
  2304. /**
  2305. * Implements hook_chado_schema_v1_2_cell_line_synonym()
  2306. * Purpose: To describe the structure of 'cell_line_synonym' to tripal
  2307. *
  2308. * @see chado_insert_record()
  2309. * @see chado_update_record()
  2310. * @see chado_select_record()
  2311. *
  2312. * @return
  2313. * An array describing the 'cell_line_synonym' table
  2314. *
  2315. * @ingroup tripal_chado_v1.2_schema_api
  2316. *
  2317. */
  2318. function tripal_chado_chado_schema_v1_2_cell_line_synonym() {
  2319. $description = [
  2320. 'description' => '',
  2321. 'fields' => [
  2322. 'cell_line_synonym_id' => [
  2323. 'description' => '',
  2324. 'type' => 'serial',
  2325. 'not null' => TRUE,
  2326. ],
  2327. 'cell_line_id' => [
  2328. 'description' => '',
  2329. 'type' => 'int',
  2330. 'not null' => TRUE,
  2331. ],
  2332. 'synonym_id' => [
  2333. 'description' => '',
  2334. 'type' => 'int',
  2335. 'not null' => TRUE,
  2336. ],
  2337. 'pub_id' => [
  2338. 'description' => '',
  2339. 'type' => 'int',
  2340. 'not null' => TRUE,
  2341. ],
  2342. 'is_current' => [
  2343. 'description' => '',
  2344. 'type' => 'boolean',
  2345. 'not null' => TRUE,
  2346. 'default' => 'false',
  2347. ],
  2348. 'is_internal' => [
  2349. 'description' => '',
  2350. 'type' => 'boolean',
  2351. 'not null' => TRUE,
  2352. 'default' => 'false',
  2353. ],
  2354. ],
  2355. 'primary key' => [
  2356. 0 => 'cell_line_synonym_id',
  2357. ],
  2358. 'unique keys' => [
  2359. 'cell_line_synonym_c1' => [
  2360. 0 => 'synonym_id',
  2361. 1 => 'cell_line_id',
  2362. 2 => 'pub_id',
  2363. ],
  2364. ],
  2365. 'foreign keys' => [
  2366. 'pub' => [
  2367. 'table' => 'pub',
  2368. 'columns' => [
  2369. 'pub_id' => 'pub_id',
  2370. ],
  2371. ],
  2372. 'synonym' => [
  2373. 'table' => 'synonym',
  2374. 'columns' => [
  2375. 'synonym_id' => 'synonym_id',
  2376. ],
  2377. ],
  2378. 'cell_line' => [
  2379. 'table' => 'cell_line',
  2380. 'columns' => [
  2381. 'cell_line_id' => 'cell_line_id',
  2382. ],
  2383. ],
  2384. ],
  2385. 'table' => 'cell_line_synonym',
  2386. 'referring_tables' => NULL,
  2387. ];
  2388. return $description;
  2389. }
  2390. /**
  2391. * Implements hook_chado_schema_v1_2_cell_lineprop()
  2392. * Purpose: To describe the structure of 'cell_lineprop' to tripal
  2393. *
  2394. * @see chado_insert_record()
  2395. * @see chado_update_record()
  2396. * @see chado_select_record()
  2397. *
  2398. * @return
  2399. * An array describing the 'cell_lineprop' table
  2400. *
  2401. * @ingroup tripal_chado_v1.2_schema_api
  2402. *
  2403. */
  2404. function tripal_chado_chado_schema_v1_2_cell_lineprop() {
  2405. $description = [
  2406. 'description' => '',
  2407. 'fields' => [
  2408. 'cell_lineprop_id' => [
  2409. 'description' => '',
  2410. 'type' => 'serial',
  2411. 'not null' => TRUE,
  2412. ],
  2413. 'cell_line_id' => [
  2414. 'description' => '',
  2415. 'type' => 'int',
  2416. 'not null' => TRUE,
  2417. ],
  2418. 'type_id' => [
  2419. 'description' => '',
  2420. 'type' => 'int',
  2421. 'not null' => TRUE,
  2422. ],
  2423. 'value' => [
  2424. 'description' => '',
  2425. 'type' => 'text',
  2426. 'not null' => FALSE,
  2427. ],
  2428. 'rank' => [
  2429. 'description' => '',
  2430. 'type' => 'int',
  2431. 'not null' => TRUE,
  2432. 'default' => 0,
  2433. ],
  2434. ],
  2435. 'primary key' => [
  2436. 0 => 'cell_lineprop_id',
  2437. ],
  2438. 'unique keys' => [
  2439. 'cell_lineprop_c1' => [
  2440. 0 => 'cell_line_id',
  2441. 1 => 'type_id',
  2442. 2 => 'rank',
  2443. ],
  2444. ],
  2445. 'foreign keys' => [
  2446. 'cvterm' => [
  2447. 'table' => 'cvterm',
  2448. 'columns' => [
  2449. 'type_id' => 'cvterm_id',
  2450. ],
  2451. ],
  2452. 'cell_line' => [
  2453. 'table' => 'cell_line',
  2454. 'columns' => [
  2455. 'cell_line_id' => 'cell_line_id',
  2456. ],
  2457. ],
  2458. ],
  2459. 'table' => 'cell_lineprop',
  2460. 'referring_tables' => [
  2461. 0 => 'cell_lineprop_pub',
  2462. ],
  2463. ];
  2464. return $description;
  2465. }
  2466. /**
  2467. * Implements hook_chado_schema_v1_2_cell_lineprop_pub()
  2468. * Purpose: To describe the structure of 'cell_lineprop_pub' to tripal
  2469. *
  2470. * @see chado_insert_record()
  2471. * @see chado_update_record()
  2472. * @see chado_select_record()
  2473. *
  2474. * @return
  2475. * An array describing the 'cell_lineprop_pub' table
  2476. *
  2477. * @ingroup tripal_chado_v1.2_schema_api
  2478. *
  2479. */
  2480. function tripal_chado_chado_schema_v1_2_cell_lineprop_pub() {
  2481. $description = [
  2482. 'description' => '',
  2483. 'fields' => [
  2484. 'cell_lineprop_pub_id' => [
  2485. 'description' => '',
  2486. 'type' => 'serial',
  2487. 'not null' => TRUE,
  2488. ],
  2489. 'cell_lineprop_id' => [
  2490. 'description' => '',
  2491. 'type' => 'int',
  2492. 'not null' => TRUE,
  2493. ],
  2494. 'pub_id' => [
  2495. 'description' => '',
  2496. 'type' => 'int',
  2497. 'not null' => TRUE,
  2498. ],
  2499. ],
  2500. 'primary key' => [
  2501. 0 => 'cell_lineprop_pub_id',
  2502. ],
  2503. 'unique keys' => [
  2504. 'cell_lineprop_pub_c1' => [
  2505. 0 => 'cell_lineprop_id',
  2506. 1 => 'pub_id',
  2507. ],
  2508. ],
  2509. 'foreign keys' => [
  2510. 'pub' => [
  2511. 'table' => 'pub',
  2512. 'columns' => [
  2513. 'pub_id' => 'pub_id',
  2514. ],
  2515. ],
  2516. 'cell_lineprop' => [
  2517. 'table' => 'cell_lineprop',
  2518. 'columns' => [
  2519. 'cell_lineprop_id' => 'cell_lineprop_id',
  2520. ],
  2521. ],
  2522. ],
  2523. 'table' => 'cell_lineprop_pub',
  2524. 'referring_tables' => NULL,
  2525. ];
  2526. return $description;
  2527. }
  2528. /**
  2529. * Implements hook_chado_schema_v1_2_chadoprop()
  2530. * Purpose: To describe the structure of 'chadoprop' to tripal
  2531. *
  2532. * @see chado_insert_record()
  2533. * @see chado_update_record()
  2534. * @see chado_select_record()
  2535. *
  2536. * @return
  2537. * An array describing the 'chadoprop' table
  2538. *
  2539. * @ingroup tripal_chado_v1.2_schema_api
  2540. *
  2541. */
  2542. function tripal_chado_chado_schema_v1_2_chadoprop() {
  2543. $description = [
  2544. 'description' => '',
  2545. 'fields' => [
  2546. 'chadoprop_id' => [
  2547. 'description' => '',
  2548. 'type' => 'serial',
  2549. 'not null' => TRUE,
  2550. ],
  2551. 'type_id' => [
  2552. 'description' => '',
  2553. 'type' => 'int',
  2554. 'not null' => TRUE,
  2555. ],
  2556. 'value' => [
  2557. 'description' => '',
  2558. 'type' => 'text',
  2559. 'not null' => FALSE,
  2560. ],
  2561. 'rank' => [
  2562. 'description' => '',
  2563. 'type' => 'int',
  2564. 'not null' => TRUE,
  2565. 'default' => 0,
  2566. ],
  2567. ],
  2568. 'primary key' => [
  2569. 0 => 'chadoprop_id',
  2570. ],
  2571. 'unique keys' => [
  2572. 'chadoprop_c1' => [
  2573. 0 => 'type_id',
  2574. 1 => 'rank',
  2575. ],
  2576. ],
  2577. 'foreign keys' => [
  2578. 'cvterm' => [
  2579. 'table' => 'cvterm',
  2580. 'columns' => [
  2581. 'type_id' => 'cvterm_id',
  2582. ],
  2583. ],
  2584. ],
  2585. 'table' => 'chadoprop',
  2586. 'referring_tables' => NULL,
  2587. ];
  2588. return $description;
  2589. }
  2590. /**
  2591. * Implements hook_chado_schema_v1_2_channel()
  2592. * Purpose: To describe the structure of 'channel' to tripal
  2593. *
  2594. * @see chado_insert_record()
  2595. * @see chado_update_record()
  2596. * @see chado_select_record()
  2597. *
  2598. * @return
  2599. * An array describing the 'channel' table
  2600. *
  2601. * @ingroup tripal_chado_v1.2_schema_api
  2602. *
  2603. */
  2604. function tripal_chado_chado_schema_v1_2_channel() {
  2605. $description = [
  2606. 'description' => '',
  2607. 'fields' => [
  2608. 'channel_id' => [
  2609. 'description' => '',
  2610. 'type' => 'serial',
  2611. 'not null' => TRUE,
  2612. ],
  2613. 'name' => [
  2614. 'description' => '',
  2615. 'type' => 'text',
  2616. 'not null' => TRUE,
  2617. ],
  2618. 'definition' => [
  2619. 'description' => '',
  2620. 'type' => 'text',
  2621. 'not null' => TRUE,
  2622. ],
  2623. ],
  2624. 'primary key' => [
  2625. 0 => 'channel_id',
  2626. ],
  2627. 'unique keys' => [
  2628. 'channel_c1' => [
  2629. 0 => 'name',
  2630. ],
  2631. ],
  2632. 'foreign keys' => [
  2633. ],
  2634. 'table' => 'channel',
  2635. 'referring_tables' => [
  2636. 0 => 'acquisition',
  2637. 1 => 'assay_biomaterial',
  2638. ],
  2639. ];
  2640. return $description;
  2641. }
  2642. /**
  2643. * Implements hook_chado_schema_v1_2_contact()
  2644. * Purpose: To describe the structure of 'contact' to tripal
  2645. *
  2646. * @see chado_insert_record()
  2647. * @see chado_update_record()
  2648. * @see chado_select_record()
  2649. *
  2650. * @return
  2651. * An array describing the 'contact' table
  2652. *
  2653. * @ingroup tripal_chado_v1.2_schema_api
  2654. *
  2655. */
  2656. function tripal_chado_chado_schema_v1_2_contact() {
  2657. $description = [
  2658. 'description' => '',
  2659. 'fields' => [
  2660. 'contact_id' => [
  2661. 'description' => '',
  2662. 'type' => 'serial',
  2663. 'not null' => TRUE,
  2664. ],
  2665. 'type_id' => [
  2666. 'description' => '',
  2667. 'type' => 'int',
  2668. 'not null' => FALSE,
  2669. ],
  2670. 'name' => [
  2671. 'description' => '',
  2672. 'type' => 'varchar',
  2673. 'length' => '255',
  2674. 'not null' => TRUE,
  2675. ],
  2676. 'description' => [
  2677. 'description' => '',
  2678. 'type' => 'varchar',
  2679. 'length' => '255',
  2680. 'not null' => FALSE,
  2681. ],
  2682. ],
  2683. 'primary key' => [
  2684. 0 => 'contact_id',
  2685. ],
  2686. 'unique keys' => [
  2687. 'contact_c1' => [
  2688. 0 => 'name',
  2689. ],
  2690. ],
  2691. 'foreign keys' => [
  2692. 'cvterm' => [
  2693. 'table' => 'cvterm',
  2694. 'columns' => [
  2695. 'type_id' => 'cvterm_id',
  2696. ],
  2697. ],
  2698. ],
  2699. 'table' => 'contact',
  2700. 'referring_tables' => [
  2701. 0 => 'arraydesign',
  2702. 1 => 'assay',
  2703. 2 => 'biomaterial',
  2704. 3 => 'contact_relationship',
  2705. 5 => 'nd_experiment_contact',
  2706. 6 => 'project_contact',
  2707. 14 => 'quantification',
  2708. 15 => 'stockcollection',
  2709. 16 => 'study',
  2710. ],
  2711. ];
  2712. return $description;
  2713. }
  2714. /**
  2715. * Implements hook_chado_schema_v1_2_contact_relationship()
  2716. * Purpose: To describe the structure of 'contact_relationship' to tripal
  2717. *
  2718. * @see chado_insert_record()
  2719. * @see chado_update_record()
  2720. * @see chado_select_record()
  2721. *
  2722. * @return
  2723. * An array describing the 'contact_relationship' table
  2724. *
  2725. * @ingroup tripal_chado_v1.2_schema_api
  2726. *
  2727. */
  2728. function tripal_chado_chado_schema_v1_2_contact_relationship() {
  2729. $description = [
  2730. 'description' => '',
  2731. 'fields' => [
  2732. 'contact_relationship_id' => [
  2733. 'description' => '',
  2734. 'type' => 'serial',
  2735. 'not null' => TRUE,
  2736. ],
  2737. 'type_id' => [
  2738. 'description' => '',
  2739. 'type' => 'int',
  2740. 'not null' => TRUE,
  2741. ],
  2742. 'subject_id' => [
  2743. 'description' => '',
  2744. 'type' => 'int',
  2745. 'not null' => TRUE,
  2746. ],
  2747. 'object_id' => [
  2748. 'description' => '',
  2749. 'type' => 'int',
  2750. 'not null' => TRUE,
  2751. ],
  2752. ],
  2753. 'primary key' => [
  2754. 0 => 'contact_relationship_id',
  2755. ],
  2756. 'unique keys' => [
  2757. 'contact_relationship_c1' => [
  2758. 0 => 'subject_id',
  2759. 1 => 'object_id',
  2760. 2 => 'type_id',
  2761. ],
  2762. ],
  2763. 'indexes' => [
  2764. 'contact_relationship_idx1' => [
  2765. 0 => 'type_id',
  2766. ],
  2767. 'contact_relationship_idx2' => [
  2768. 0 => 'subject_id',
  2769. ],
  2770. 'contact_relationship_idx3' => [
  2771. 0 => 'object_id',
  2772. ],
  2773. ],
  2774. 'foreign keys' => [
  2775. 'cvterm' => [
  2776. 'table' => 'cvterm',
  2777. 'columns' => [
  2778. 'type_id' => 'cvterm_id',
  2779. ],
  2780. ],
  2781. 'contact' => [
  2782. 'table' => 'contact',
  2783. 'columns' => [
  2784. 'subject_id' => 'contact_id',
  2785. 'object_id' => 'contact_id',
  2786. ],
  2787. ],
  2788. ],
  2789. 'table' => 'contact_relationship',
  2790. 'referring_tables' => NULL,
  2791. ];
  2792. return $description;
  2793. }
  2794. /**
  2795. * Implements hook_chado_schema_v1_2_control()
  2796. * Purpose: To describe the structure of 'control' to tripal
  2797. *
  2798. * @see chado_insert_record()
  2799. * @see chado_update_record()
  2800. * @see chado_select_record()
  2801. *
  2802. * @return
  2803. * An array describing the 'control' table
  2804. *
  2805. * @ingroup tripal_chado_v1.2_schema_api
  2806. *
  2807. */
  2808. function tripal_chado_chado_schema_v1_2_control() {
  2809. $description = [
  2810. 'description' => '',
  2811. 'fields' => [
  2812. 'control_id' => [
  2813. 'description' => '',
  2814. 'type' => 'serial',
  2815. 'not null' => TRUE,
  2816. ],
  2817. 'type_id' => [
  2818. 'description' => '',
  2819. 'type' => 'int',
  2820. 'not null' => TRUE,
  2821. ],
  2822. 'assay_id' => [
  2823. 'description' => '',
  2824. 'type' => 'int',
  2825. 'not null' => TRUE,
  2826. ],
  2827. 'tableinfo_id' => [
  2828. 'description' => '',
  2829. 'type' => 'int',
  2830. 'not null' => TRUE,
  2831. ],
  2832. 'row_id' => [
  2833. 'description' => '',
  2834. 'type' => 'int',
  2835. 'not null' => TRUE,
  2836. ],
  2837. 'name' => [
  2838. 'description' => '',
  2839. 'type' => 'text',
  2840. 'not null' => FALSE,
  2841. ],
  2842. 'value' => [
  2843. 'description' => '',
  2844. 'type' => 'text',
  2845. 'not null' => FALSE,
  2846. ],
  2847. 'rank' => [
  2848. 'description' => '',
  2849. 'type' => 'int',
  2850. 'not null' => TRUE,
  2851. 'default' => 0,
  2852. ],
  2853. ],
  2854. 'primary key' => [
  2855. 0 => 'control_id',
  2856. ],
  2857. 'unique keys' => [],
  2858. 'indexes' => [
  2859. 'control_idx1' => [
  2860. 0 => 'type_id',
  2861. ],
  2862. 'control_idx2' => [
  2863. 0 => 'assay_id',
  2864. ],
  2865. 'control_idx3' => [
  2866. 0 => 'tableinfo_id',
  2867. ],
  2868. 'control_idx4' => [
  2869. 0 => 'row_id',
  2870. ],
  2871. ],
  2872. 'foreign keys' => [
  2873. 'cvterm' => [
  2874. 'table' => 'cvterm',
  2875. 'columns' => [
  2876. 'type_id' => 'cvterm_id',
  2877. ],
  2878. ],
  2879. 'tableinfo' => [
  2880. 'table' => 'tableinfo',
  2881. 'columns' => [
  2882. 'tableinfo_id' => 'tableinfo_id',
  2883. ],
  2884. ],
  2885. 'assay' => [
  2886. 'table' => 'assay',
  2887. 'columns' => [
  2888. 'assay_id' => 'assay_id',
  2889. ],
  2890. ],
  2891. ],
  2892. 'table' => 'control',
  2893. 'referring_tables' => NULL,
  2894. ];
  2895. return $description;
  2896. }
  2897. /**
  2898. * Implements hook_chado_schema_v1_2_cv()
  2899. * Purpose: To describe the structure of 'cv' to tripal
  2900. *
  2901. * @see chado_insert_record()
  2902. * @see chado_update_record()
  2903. * @see chado_select_record()
  2904. *
  2905. * @return
  2906. * An array describing the 'cv' table
  2907. *
  2908. * @ingroup tripal_chado_v1.2_schema_api
  2909. *
  2910. */
  2911. function tripal_chado_chado_schema_v1_2_cv() {
  2912. $description = [
  2913. 'description' => '',
  2914. 'fields' => [
  2915. 'cv_id' => [
  2916. 'description' => '',
  2917. 'type' => 'serial',
  2918. 'not null' => TRUE,
  2919. ],
  2920. 'name' => [
  2921. 'description' => '',
  2922. 'type' => 'varchar',
  2923. 'length' => '255',
  2924. 'not null' => TRUE,
  2925. ],
  2926. 'definition' => [
  2927. 'description' => '',
  2928. 'type' => 'text',
  2929. 'not null' => FALSE,
  2930. ],
  2931. ],
  2932. 'primary key' => [
  2933. 0 => 'cv_id',
  2934. ],
  2935. 'unique keys' => [
  2936. 'cv_c1' => [
  2937. 0 => 'name',
  2938. ],
  2939. ],
  2940. 'foreign keys' => [
  2941. ],
  2942. 'table' => 'cv',
  2943. 'referring_tables' => [
  2944. 0 => 'cvprop',
  2945. 1 => 'cvterm',
  2946. 2 => 'cvtermpath',
  2947. ],
  2948. ];
  2949. return $description;
  2950. }
  2951. /**
  2952. * Implements hook_chado_schema_v1_2_cvprop()
  2953. * Purpose: To describe the structure of 'cvprop' to tripal
  2954. *
  2955. * @see chado_insert_record()
  2956. * @see chado_update_record()
  2957. * @see chado_select_record()
  2958. *
  2959. * @return
  2960. * An array describing the 'cvprop' table
  2961. *
  2962. * @ingroup tripal_chado_v1.2_schema_api
  2963. *
  2964. */
  2965. function tripal_chado_chado_schema_v1_2_cvprop() {
  2966. $description = [
  2967. 'description' => '',
  2968. 'fields' => [
  2969. 'cvprop_id' => [
  2970. 'description' => '',
  2971. 'type' => 'serial',
  2972. 'not null' => TRUE,
  2973. ],
  2974. 'cv_id' => [
  2975. 'description' => '',
  2976. 'type' => 'int',
  2977. 'not null' => TRUE,
  2978. ],
  2979. 'type_id' => [
  2980. 'description' => '',
  2981. 'type' => 'int',
  2982. 'not null' => TRUE,
  2983. ],
  2984. 'value' => [
  2985. 'description' => '',
  2986. 'type' => 'text',
  2987. 'not null' => FALSE,
  2988. ],
  2989. 'rank' => [
  2990. 'description' => '',
  2991. 'type' => 'int',
  2992. 'not null' => TRUE,
  2993. 'default' => 0,
  2994. ],
  2995. ],
  2996. 'primary key' => [
  2997. 0 => 'cvprop_id',
  2998. ],
  2999. 'unique keys' => [
  3000. 'cvprop_c1' => [
  3001. 0 => 'cv_id',
  3002. 1 => 'type_id',
  3003. 2 => 'rank',
  3004. ],
  3005. ],
  3006. 'foreign keys' => [
  3007. 'cvterm' => [
  3008. 'table' => 'cvterm',
  3009. 'columns' => [
  3010. 'type_id' => 'cvterm_id',
  3011. ],
  3012. ],
  3013. 'cv' => [
  3014. 'table' => 'cv',
  3015. 'columns' => [
  3016. 'cv_id' => 'cv_id',
  3017. ],
  3018. ],
  3019. ],
  3020. 'table' => 'cvprop',
  3021. 'referring_tables' => NULL,
  3022. ];
  3023. return $description;
  3024. }
  3025. /**
  3026. * Implements hook_chado_schema_v1_2_cvterm()
  3027. * Purpose: To describe the structure of 'cvterm' to tripal
  3028. *
  3029. * @see chado_insert_record()
  3030. * @see chado_update_record()
  3031. * @see chado_select_record()
  3032. *
  3033. * @return
  3034. * An array describing the 'cvterm' table
  3035. *
  3036. * @ingroup tripal_chado_v1.2_schema_api
  3037. *
  3038. */
  3039. function tripal_chado_chado_schema_v1_2_cvterm() {
  3040. $description = [
  3041. 'description' => '',
  3042. 'fields' => [
  3043. 'cvterm_id' => [
  3044. 'description' => '',
  3045. 'type' => 'serial',
  3046. 'not null' => TRUE,
  3047. ],
  3048. 'cv_id' => [
  3049. 'description' => '',
  3050. 'type' => 'int',
  3051. 'not null' => TRUE,
  3052. ],
  3053. 'name' => [
  3054. 'description' => '',
  3055. 'type' => 'varchar',
  3056. 'length' => '1024',
  3057. 'not null' => TRUE,
  3058. ],
  3059. 'definition' => [
  3060. 'description' => '',
  3061. 'type' => 'text',
  3062. 'not null' => FALSE,
  3063. ],
  3064. 'dbxref_id' => [
  3065. 'description' => '',
  3066. 'type' => 'int',
  3067. 'not null' => TRUE,
  3068. ],
  3069. 'is_obsolete' => [
  3070. 'description' => '',
  3071. 'type' => 'int',
  3072. 'not null' => TRUE,
  3073. 'default' => 0,
  3074. ],
  3075. 'is_relationshiptype' => [
  3076. 'description' => '',
  3077. 'type' => 'int',
  3078. 'not null' => TRUE,
  3079. 'default' => 0,
  3080. ],
  3081. ],
  3082. 'primary key' => [
  3083. 0 => 'cvterm_id',
  3084. ],
  3085. 'unique keys' => [
  3086. 'cvterm_c1' => [
  3087. 0 => 'name',
  3088. 1 => 'cv_id',
  3089. 2 => 'is_obsolete',
  3090. ],
  3091. 'cvterm_c2' => [
  3092. 0 => 'dbxref_id',
  3093. ],
  3094. ],
  3095. 'indexes' => [
  3096. 'cvterm_idx1' => [
  3097. 0 => 'cv_id',
  3098. ],
  3099. 'cvterm_idx2' => [
  3100. 0 => 'name',
  3101. ],
  3102. 'cvterm_idx3' => [
  3103. 0 => 'dbxref_id',
  3104. ],
  3105. ],
  3106. 'foreign keys' => [
  3107. 'cv' => [
  3108. 'table' => 'cv',
  3109. 'columns' => [
  3110. 'cv_id' => 'cv_id',
  3111. ],
  3112. ],
  3113. 'dbxref' => [
  3114. 'table' => 'dbxref',
  3115. 'columns' => [
  3116. 'dbxref_id' => 'dbxref_id',
  3117. ],
  3118. ],
  3119. ],
  3120. 'table' => 'cvterm',
  3121. 'referring_tables' => [
  3122. 0 => 'acquisition_relationship',
  3123. 1 => 'acquisitionprop',
  3124. 2 => 'analysisfeatureprop',
  3125. 3 => 'analysisprop',
  3126. 4 => 'arraydesign',
  3127. 6 => 'arraydesignprop',
  3128. 7 => 'assayprop',
  3129. 8 => 'biomaterial_relationship',
  3130. 9 => 'biomaterial_treatment',
  3131. 10 => 'biomaterialprop',
  3132. 11 => 'cell_line_cvterm',
  3133. 12 => 'cell_line_cvtermprop',
  3134. 13 => 'cell_line_relationship',
  3135. 14 => 'cell_lineprop',
  3136. 15 => 'chadoprop',
  3137. 23 => 'contact',
  3138. 24 => 'contact_relationship',
  3139. 25 => 'control',
  3140. 26 => 'cvprop',
  3141. 27 => 'cvterm_dbxref',
  3142. 28 => 'cvterm_relationship',
  3143. 31 => 'cvtermpath',
  3144. 34 => 'cvtermprop',
  3145. 36 => 'cvtermsynonym',
  3146. 38 => 'dbxrefprop',
  3147. 39 => 'element',
  3148. 40 => 'element_relationship',
  3149. 41 => 'elementresult_relationship',
  3150. 42 => 'environment_cvterm',
  3151. 43 => 'expression_cvterm',
  3152. 45 => 'expression_cvtermprop',
  3153. 46 => 'expressionprop',
  3154. 47 => 'feature',
  3155. 48 => 'feature_cvterm',
  3156. 49 => 'feature_cvtermprop',
  3157. 50 => 'feature_expressionprop',
  3158. 51 => 'feature_genotype',
  3159. 52 => 'feature_pubprop',
  3160. 53 => 'feature_relationship',
  3161. 54 => 'feature_relationshipprop',
  3162. 55 => 'featuremap',
  3163. 56 => 'featureprop',
  3164. 57 => 'genotype',
  3165. 58 => 'genotypeprop',
  3166. 66 => 'library',
  3167. 67 => 'library_cvterm',
  3168. 68 => 'libraryprop',
  3169. 69 => 'nd_experiment',
  3170. 70 => 'nd_experiment_stock',
  3171. 71 => 'nd_experiment_stockprop',
  3172. 72 => 'nd_experimentprop',
  3173. 73 => 'nd_geolocationprop',
  3174. 74 => 'nd_protocol',
  3175. 75 => 'nd_protocol_reagent',
  3176. 76 => 'nd_protocolprop',
  3177. 77 => 'nd_reagent',
  3178. 78 => 'nd_reagent_relationship',
  3179. 79 => 'nd_reagentprop',
  3180. 80 => 'organismprop',
  3181. 81 => 'phendesc',
  3182. 82 => 'phenotype',
  3183. 86 => 'phenotype_comparison_cvterm',
  3184. 87 => 'phenotype_cvterm',
  3185. 88 => 'phenstatement',
  3186. 89 => 'phylonode',
  3187. 90 => 'phylonode_relationship',
  3188. 91 => 'phylonodeprop',
  3189. 92 => 'phylotree',
  3190. 93 => 'project_relationship',
  3191. 101 => 'projectprop',
  3192. 109 => 'protocol',
  3193. 110 => 'protocolparam',
  3194. 112 => 'pub',
  3195. 113 => 'pub_relationship',
  3196. 114 => 'pubprop',
  3197. 115 => 'quantification_relationship',
  3198. 116 => 'quantificationprop',
  3199. 117 => 'stock',
  3200. 118 => 'stock_cvterm',
  3201. 119 => 'stock_cvtermprop',
  3202. 127 => 'stock_dbxrefprop',
  3203. 135 => 'stock_relationship',
  3204. 136 => 'stock_relationship_cvterm',
  3205. 144 => 'stockcollection',
  3206. 145 => 'stockcollectionprop',
  3207. 146 => 'stockprop',
  3208. 147 => 'studydesignprop',
  3209. 148 => 'studyfactor',
  3210. 149 => 'studyprop',
  3211. 150 => 'studyprop_feature',
  3212. 151 => 'synonym',
  3213. 152 => 'treatment',
  3214. ],
  3215. ];
  3216. return $description;
  3217. }
  3218. /**
  3219. * Implements hook_chado_schema_v1_2_cvterm_dbxref()
  3220. * Purpose: To describe the structure of 'cvterm_dbxref' to tripal
  3221. *
  3222. * @see chado_insert_record()
  3223. * @see chado_update_record()
  3224. * @see chado_select_record()
  3225. *
  3226. * @return
  3227. * An array describing the 'cvterm_dbxref' table
  3228. *
  3229. * @ingroup tripal_chado_v1.2_schema_api
  3230. *
  3231. */
  3232. function tripal_chado_chado_schema_v1_2_cvterm_dbxref() {
  3233. $description = [
  3234. 'description' => '',
  3235. 'fields' => [
  3236. 'cvterm_dbxref_id' => [
  3237. 'description' => '',
  3238. 'type' => 'serial',
  3239. 'not null' => TRUE,
  3240. ],
  3241. 'cvterm_id' => [
  3242. 'description' => '',
  3243. 'type' => 'int',
  3244. 'not null' => TRUE,
  3245. ],
  3246. 'dbxref_id' => [
  3247. 'description' => '',
  3248. 'type' => 'int',
  3249. 'not null' => TRUE,
  3250. ],
  3251. 'is_for_definition' => [
  3252. 'description' => '',
  3253. 'type' => 'int',
  3254. 'not null' => TRUE,
  3255. 'default' => 0,
  3256. ],
  3257. ],
  3258. 'primary key' => [
  3259. 0 => 'cvterm_dbxref_id',
  3260. ],
  3261. 'unique keys' => [
  3262. 'cvterm_dbxref_c1' => [
  3263. 0 => 'cvterm_id',
  3264. 1 => 'dbxref_id',
  3265. ],
  3266. ],
  3267. 'indexes' => [
  3268. 'cvterm_dbxref_idx1' => [
  3269. 0 => 'cvterm_id',
  3270. ],
  3271. 'cvterm_dbxref_idx2' => [
  3272. 0 => 'dbxref_id',
  3273. ],
  3274. ],
  3275. 'foreign keys' => [
  3276. 'cvterm' => [
  3277. 'table' => 'cvterm',
  3278. 'columns' => [
  3279. 'cvterm_id' => 'cvterm_id',
  3280. ],
  3281. ],
  3282. 'dbxref' => [
  3283. 'table' => 'dbxref',
  3284. 'columns' => [
  3285. 'dbxref_id' => 'dbxref_id',
  3286. ],
  3287. ],
  3288. ],
  3289. 'table' => 'cvterm_dbxref',
  3290. 'referring_tables' => NULL,
  3291. ];
  3292. return $description;
  3293. }
  3294. /**
  3295. * Implements hook_chado_schema_v1_2_cvterm_relationship()
  3296. * Purpose: To describe the structure of 'cvterm_relationship' to tripal
  3297. *
  3298. * @see chado_insert_record()
  3299. * @see chado_update_record()
  3300. * @see chado_select_record()
  3301. *
  3302. * @return
  3303. * An array describing the 'cvterm_relationship' table
  3304. *
  3305. * @ingroup tripal_chado_v1.2_schema_api
  3306. *
  3307. */
  3308. function tripal_chado_chado_schema_v1_2_cvterm_relationship() {
  3309. $description = [
  3310. 'description' => '',
  3311. 'fields' => [
  3312. 'cvterm_relationship_id' => [
  3313. 'description' => '',
  3314. 'type' => 'serial',
  3315. 'not null' => TRUE,
  3316. ],
  3317. 'type_id' => [
  3318. 'description' => '',
  3319. 'type' => 'int',
  3320. 'not null' => TRUE,
  3321. ],
  3322. 'subject_id' => [
  3323. 'description' => '',
  3324. 'type' => 'int',
  3325. 'not null' => TRUE,
  3326. ],
  3327. 'object_id' => [
  3328. 'description' => '',
  3329. 'type' => 'int',
  3330. 'not null' => TRUE,
  3331. ],
  3332. ],
  3333. 'primary key' => [
  3334. 0 => 'cvterm_relationship_id',
  3335. ],
  3336. 'unique keys' => [
  3337. 'cvterm_relationship_c1' => [
  3338. 0 => 'subject_id',
  3339. 1 => 'object_id',
  3340. 2 => 'type_id',
  3341. ],
  3342. ],
  3343. 'indexes' => [
  3344. 'cvterm_relationship_idx1' => [
  3345. 0 => 'type_id',
  3346. ],
  3347. 'cvterm_relationship_idx2' => [
  3348. 0 => 'subject_id',
  3349. ],
  3350. 'cvterm_relationship_idx3' => [
  3351. 0 => 'object_id',
  3352. ],
  3353. ],
  3354. 'foreign keys' => [
  3355. 'cvterm' => [
  3356. 'table' => 'cvterm',
  3357. 'columns' => [
  3358. 'type_id' => 'cvterm_id',
  3359. 'subject_id' => 'cvterm_id',
  3360. 'object_id' => 'cvterm_id',
  3361. ],
  3362. ],
  3363. ],
  3364. 'table' => 'cvterm_relationship',
  3365. 'referring_tables' => NULL,
  3366. ];
  3367. return $description;
  3368. }
  3369. /**
  3370. * Implements hook_chado_schema_v1_2_cvtermpath()
  3371. * Purpose: To describe the structure of 'cvtermpath' to tripal
  3372. *
  3373. * @see chado_insert_record()
  3374. * @see chado_update_record()
  3375. * @see chado_select_record()
  3376. *
  3377. * @return
  3378. * An array describing the 'cvtermpath' table
  3379. *
  3380. * @ingroup tripal_chado_v1.2_schema_api
  3381. *
  3382. */
  3383. function tripal_chado_chado_schema_v1_2_cvtermpath() {
  3384. $description = [
  3385. 'description' => '',
  3386. 'fields' => [
  3387. 'cvtermpath_id' => [
  3388. 'description' => '',
  3389. 'type' => 'serial',
  3390. 'not null' => TRUE,
  3391. ],
  3392. 'type_id' => [
  3393. 'description' => '',
  3394. 'type' => 'int',
  3395. 'not null' => FALSE,
  3396. ],
  3397. 'subject_id' => [
  3398. 'description' => '',
  3399. 'type' => 'int',
  3400. 'not null' => TRUE,
  3401. ],
  3402. 'object_id' => [
  3403. 'description' => '',
  3404. 'type' => 'int',
  3405. 'not null' => TRUE,
  3406. ],
  3407. 'cv_id' => [
  3408. 'description' => '',
  3409. 'type' => 'int',
  3410. 'not null' => TRUE,
  3411. ],
  3412. 'pathdistance' => [
  3413. 'description' => '',
  3414. 'type' => 'int',
  3415. 'not null' => FALSE,
  3416. ],
  3417. ],
  3418. 'primary key' => [
  3419. 0 => 'cvtermpath_id',
  3420. ],
  3421. 'unique keys' => [
  3422. 'cvtermpath_c1' => [
  3423. 0 => 'subject_id',
  3424. 1 => 'object_id',
  3425. 2 => 'type_id',
  3426. 3 => 'pathdistance',
  3427. ],
  3428. ],
  3429. 'indexes' => [
  3430. 'cvtermpath_idx1' => [
  3431. 0 => 'type_id',
  3432. ],
  3433. 'cvtermpath_idx2' => [
  3434. 0 => 'subject_id',
  3435. ],
  3436. 'cvtermpath_idx3' => [
  3437. 0 => 'object_id',
  3438. ],
  3439. 'cvtermpath_idx4' => [
  3440. 0 => 'cv_id',
  3441. ],
  3442. ],
  3443. 'foreign keys' => [
  3444. 'cvterm' => [
  3445. 'table' => 'cvterm',
  3446. 'columns' => [
  3447. 'type_id' => 'cvterm_id',
  3448. 'subject_id' => 'cvterm_id',
  3449. 'object_id' => 'cvterm_id',
  3450. ],
  3451. ],
  3452. 'cv' => [
  3453. 'table' => 'cv',
  3454. 'columns' => [
  3455. 'cv_id' => 'cv_id',
  3456. ],
  3457. ],
  3458. ],
  3459. 'table' => 'cvtermpath',
  3460. 'referring_tables' => NULL,
  3461. ];
  3462. return $description;
  3463. }
  3464. /**
  3465. * Implements hook_chado_schema_v1_2_cvtermprop()
  3466. * Purpose: To describe the structure of 'cvtermprop' to tripal
  3467. *
  3468. * @see chado_insert_record()
  3469. * @see chado_update_record()
  3470. * @see chado_select_record()
  3471. *
  3472. * @return
  3473. * An array describing the 'cvtermprop' table
  3474. *
  3475. * @ingroup tripal_chado_v1.2_schema_api
  3476. *
  3477. */
  3478. function tripal_chado_chado_schema_v1_2_cvtermprop() {
  3479. $description = [
  3480. 'description' => '',
  3481. 'fields' => [
  3482. 'cvtermprop_id' => [
  3483. 'description' => '',
  3484. 'type' => 'serial',
  3485. 'not null' => TRUE,
  3486. ],
  3487. 'cvterm_id' => [
  3488. 'description' => '',
  3489. 'type' => 'int',
  3490. 'not null' => TRUE,
  3491. ],
  3492. 'type_id' => [
  3493. 'description' => '',
  3494. 'type' => 'int',
  3495. 'not null' => TRUE,
  3496. ],
  3497. 'value' => [
  3498. 'description' => '',
  3499. 'type' => 'text',
  3500. 'not null' => TRUE,
  3501. 'default' => '',
  3502. ],
  3503. 'rank' => [
  3504. 'description' => '',
  3505. 'type' => 'int',
  3506. 'not null' => TRUE,
  3507. 'default' => 0,
  3508. ],
  3509. ],
  3510. 'primary key' => [
  3511. 0 => 'cvtermprop_id',
  3512. ],
  3513. 'unique keys' => [
  3514. 'cvterm_id' => [
  3515. 0 => 'cvterm_id',
  3516. 1 => 'type_id',
  3517. 2 => 'value',
  3518. 3 => 'rank',
  3519. ],
  3520. ],
  3521. 'indexes' => [
  3522. 'cvtermprop_idx1' => [
  3523. 0 => 'cvterm_id',
  3524. ],
  3525. 'cvtermprop_idx2' => [
  3526. 0 => 'type_id',
  3527. ],
  3528. ],
  3529. 'foreign keys' => [
  3530. 'cvterm' => [
  3531. 'table' => 'cvterm',
  3532. 'columns' => [
  3533. 'cvterm_id' => 'cvterm_id',
  3534. 'type_id' => 'cvterm_id',
  3535. ],
  3536. ],
  3537. ],
  3538. 'table' => 'cvtermprop',
  3539. 'referring_tables' => NULL,
  3540. ];
  3541. return $description;
  3542. }
  3543. /**
  3544. * Implements hook_chado_schema_v1_2_cvtermsynonym()
  3545. * Purpose: To describe the structure of 'cvtermsynonym' to tripal
  3546. *
  3547. * @see chado_insert_record()
  3548. * @see chado_update_record()
  3549. * @see chado_select_record()
  3550. *
  3551. * @return
  3552. * An array describing the 'cvtermsynonym' table
  3553. *
  3554. * @ingroup tripal_chado_v1.2_schema_api
  3555. *
  3556. */
  3557. function tripal_chado_chado_schema_v1_2_cvtermsynonym() {
  3558. $description = [
  3559. 'description' => '',
  3560. 'fields' => [
  3561. 'cvtermsynonym_id' => [
  3562. 'description' => '',
  3563. 'type' => 'serial',
  3564. 'not null' => TRUE,
  3565. ],
  3566. 'cvterm_id' => [
  3567. 'description' => '',
  3568. 'type' => 'int',
  3569. 'not null' => TRUE,
  3570. ],
  3571. 'synonym' => [
  3572. 'description' => '',
  3573. 'type' => 'varchar',
  3574. 'length' => '1024',
  3575. 'not null' => TRUE,
  3576. ],
  3577. 'type_id' => [
  3578. 'description' => '',
  3579. 'type' => 'int',
  3580. 'not null' => FALSE,
  3581. ],
  3582. ],
  3583. 'primary key' => [
  3584. 0 => 'cvtermsynonym_id',
  3585. ],
  3586. 'unique keys' => [
  3587. 'cvtermsynonym_c1' => [
  3588. 0 => 'cvterm_id',
  3589. 1 => 'synonym',
  3590. ],
  3591. ],
  3592. 'indexes' => [
  3593. 'cvtermsynonym_idx1' => [
  3594. 0 => 'cvterm_id',
  3595. ],
  3596. ],
  3597. 'foreign keys' => [
  3598. 'cvterm' => [
  3599. 'table' => 'cvterm',
  3600. 'columns' => [
  3601. 'cvterm_id' => 'cvterm_id',
  3602. 'type_id' => 'cvterm_id',
  3603. ],
  3604. ],
  3605. ],
  3606. 'table' => 'cvtermsynonym',
  3607. 'referring_tables' => NULL,
  3608. ];
  3609. return $description;
  3610. }
  3611. /**
  3612. * Implements hook_chado_schema_v1_2_db()
  3613. * Purpose: To describe the structure of 'db' to tripal
  3614. *
  3615. * @see chado_insert_record()
  3616. * @see chado_update_record()
  3617. * @see chado_select_record()
  3618. *
  3619. * @return
  3620. * An array describing the 'db' table
  3621. *
  3622. * @ingroup tripal_chado_v1.2_schema_api
  3623. *
  3624. */
  3625. function tripal_chado_chado_schema_v1_2_db() {
  3626. $description = [
  3627. 'description' => '',
  3628. 'fields' => [
  3629. 'db_id' => [
  3630. 'description' => '',
  3631. 'type' => 'serial',
  3632. 'not null' => TRUE,
  3633. ],
  3634. 'name' => [
  3635. 'description' => '',
  3636. 'type' => 'varchar',
  3637. 'length' => '255',
  3638. 'not null' => TRUE,
  3639. ],
  3640. 'description' => [
  3641. 'description' => '',
  3642. 'type' => 'varchar',
  3643. 'length' => '255',
  3644. 'not null' => FALSE,
  3645. ],
  3646. 'urlprefix' => [
  3647. 'description' => '',
  3648. 'type' => 'varchar',
  3649. 'length' => '255',
  3650. 'not null' => FALSE,
  3651. ],
  3652. 'url' => [
  3653. 'description' => '',
  3654. 'type' => 'varchar',
  3655. 'length' => '255',
  3656. 'not null' => FALSE,
  3657. ],
  3658. ],
  3659. 'primary key' => [
  3660. 0 => 'db_id',
  3661. ],
  3662. 'unique keys' => [
  3663. 'db_c1' => [
  3664. 0 => 'name',
  3665. ],
  3666. ],
  3667. 'foreign keys' => [
  3668. ],
  3669. 'table' => 'db',
  3670. 'referring_tables' => [
  3671. 0 => 'dbxref',
  3672. ],
  3673. ];
  3674. return $description;
  3675. }
  3676. /**
  3677. * Implements hook_chado_schema_v1_2_dbxref()
  3678. * Purpose: To describe the structure of 'dbxref' to tripal
  3679. *
  3680. * @see chado_insert_record()
  3681. * @see chado_update_record()
  3682. * @see chado_select_record()
  3683. *
  3684. * @return
  3685. * An array describing the 'dbxref' table
  3686. *
  3687. * @ingroup tripal_chado_v1.2_schema_api
  3688. *
  3689. */
  3690. function tripal_chado_chado_schema_v1_2_dbxref() {
  3691. $description = [
  3692. 'description' => '',
  3693. 'fields' => [
  3694. 'dbxref_id' => [
  3695. 'description' => '',
  3696. 'type' => 'serial',
  3697. 'not null' => TRUE,
  3698. ],
  3699. 'db_id' => [
  3700. 'description' => '',
  3701. 'type' => 'int',
  3702. 'not null' => TRUE,
  3703. ],
  3704. 'accession' => [
  3705. 'description' => '',
  3706. 'type' => 'varchar',
  3707. 'length' => '255',
  3708. 'not null' => TRUE,
  3709. ],
  3710. 'version' => [
  3711. 'description' => '',
  3712. 'type' => 'varchar',
  3713. 'length' => '255',
  3714. 'not null' => TRUE,
  3715. 'default' => '',
  3716. ],
  3717. 'description' => [
  3718. 'description' => '',
  3719. 'type' => 'text',
  3720. 'not null' => FALSE,
  3721. ],
  3722. ],
  3723. 'primary key' => [
  3724. 0 => 'dbxref_id',
  3725. ],
  3726. 'unique keys' => [
  3727. 'dbxref_c1' => [
  3728. 0 => 'db_id',
  3729. 1 => 'accession',
  3730. 2 => 'version',
  3731. ],
  3732. ],
  3733. 'indexes' => [
  3734. 'dbxref_idx1' => [
  3735. 0 => 'db_id',
  3736. ],
  3737. 'dbxref_idx2' => [
  3738. 0 => 'accession',
  3739. ],
  3740. 'dbxref_idx3' => [
  3741. 0 => 'version',
  3742. ],
  3743. ],
  3744. 'foreign keys' => [
  3745. 'db' => [
  3746. 'table' => 'db',
  3747. 'columns' => [
  3748. 'db_id' => 'db_id',
  3749. ],
  3750. ],
  3751. ],
  3752. 'table' => 'dbxref',
  3753. 'referring_tables' => [
  3754. 0 => 'arraydesign',
  3755. 1 => 'assay',
  3756. 2 => 'biomaterial',
  3757. 3 => 'biomaterial_dbxref',
  3758. 4 => 'cell_line_dbxref',
  3759. 5 => 'cvterm',
  3760. 6 => 'cvterm_dbxref',
  3761. 7 => 'dbxrefprop',
  3762. 8 => 'element',
  3763. 9 => 'feature',
  3764. 10 => 'feature_cvterm_dbxref',
  3765. 11 => 'feature_dbxref',
  3766. 12 => 'library_dbxref',
  3767. 13 => 'nd_experiment_dbxref',
  3768. 14 => 'nd_experiment_stock_dbxref',
  3769. 15 => 'organism_dbxref',
  3770. 16 => 'phylonode_dbxref',
  3771. 17 => 'phylotree',
  3772. 18 => 'protocol',
  3773. 19 => 'pub_dbxref',
  3774. 20 => 'stock',
  3775. 21 => 'stock_dbxref',
  3776. 22 => 'study',
  3777. ],
  3778. ];
  3779. return $description;
  3780. }
  3781. /**
  3782. * Implements hook_chado_schema_v1_2_dbxrefprop()
  3783. * Purpose: To describe the structure of 'dbxrefprop' to tripal
  3784. *
  3785. * @see chado_insert_record()
  3786. * @see chado_update_record()
  3787. * @see chado_select_record()
  3788. *
  3789. * @return
  3790. * An array describing the 'dbxrefprop' table
  3791. *
  3792. * @ingroup tripal_chado_v1.2_schema_api
  3793. *
  3794. */
  3795. function tripal_chado_chado_schema_v1_2_dbxrefprop() {
  3796. $description = [
  3797. 'description' => '',
  3798. 'fields' => [
  3799. 'dbxrefprop_id' => [
  3800. 'description' => '',
  3801. 'type' => 'serial',
  3802. 'not null' => TRUE,
  3803. ],
  3804. 'dbxref_id' => [
  3805. 'description' => '',
  3806. 'type' => 'int',
  3807. 'not null' => TRUE,
  3808. ],
  3809. 'type_id' => [
  3810. 'description' => '',
  3811. 'type' => 'int',
  3812. 'not null' => TRUE,
  3813. ],
  3814. 'value' => [
  3815. 'description' => '',
  3816. 'type' => 'text',
  3817. 'not null' => TRUE,
  3818. 'default' => '',
  3819. ],
  3820. 'rank' => [
  3821. 'description' => '',
  3822. 'type' => 'int',
  3823. 'not null' => TRUE,
  3824. 'default' => 0,
  3825. ],
  3826. ],
  3827. 'primary key' => [
  3828. 0 => 'dbxrefprop_id',
  3829. ],
  3830. 'unique keys' => [
  3831. 'dbxrefprop_c1' => [
  3832. 0 => 'dbxref_id',
  3833. 1 => 'type_id',
  3834. 2 => 'rank',
  3835. ],
  3836. ],
  3837. 'indexes' => [
  3838. 'dbxrefprop_idx1' => [
  3839. 0 => 'dbxref_id',
  3840. ],
  3841. 'dbxrefprop_idx2' => [
  3842. 0 => 'type_id',
  3843. ],
  3844. ],
  3845. 'foreign keys' => [
  3846. 'cvterm' => [
  3847. 'table' => 'cvterm',
  3848. 'columns' => [
  3849. 'type_id' => 'cvterm_id',
  3850. ],
  3851. ],
  3852. 'dbxref' => [
  3853. 'table' => 'dbxref',
  3854. 'columns' => [
  3855. 'dbxref_id' => 'dbxref_id',
  3856. ],
  3857. ],
  3858. ],
  3859. 'table' => 'dbxrefprop',
  3860. 'referring_tables' => NULL,
  3861. ];
  3862. return $description;
  3863. }
  3864. /**
  3865. * Implements hook_chado_schema_v1_2_eimage()
  3866. * Purpose: To describe the structure of 'eimage' to tripal
  3867. *
  3868. * @see chado_insert_record()
  3869. * @see chado_update_record()
  3870. * @see chado_select_record()
  3871. *
  3872. * @return
  3873. * An array describing the 'eimage' table
  3874. *
  3875. * @ingroup tripal_chado_v1.2_schema_api
  3876. *
  3877. */
  3878. function tripal_chado_chado_schema_v1_2_eimage() {
  3879. $description = [
  3880. 'description' => '',
  3881. 'fields' => [
  3882. 'eimage_id' => [
  3883. 'description' => '',
  3884. 'type' => 'serial',
  3885. 'not null' => TRUE,
  3886. ],
  3887. 'eimage_data' => [
  3888. 'description' => '',
  3889. 'type' => 'text',
  3890. 'not null' => FALSE,
  3891. ],
  3892. 'eimage_type' => [
  3893. 'description' => '',
  3894. 'type' => 'varchar',
  3895. 'length' => '255',
  3896. 'not null' => TRUE,
  3897. ],
  3898. 'image_uri' => [
  3899. 'description' => '',
  3900. 'type' => 'varchar',
  3901. 'length' => '255',
  3902. 'not null' => FALSE,
  3903. ],
  3904. ],
  3905. 'primary key' => [
  3906. 0 => 'eimage_id',
  3907. ],
  3908. 'unique keys' => [],
  3909. 'foreign keys' => [
  3910. ],
  3911. 'table' => 'eimage',
  3912. 'referring_tables' => [
  3913. 0 => 'expression_image',
  3914. ],
  3915. ];
  3916. return $description;
  3917. }
  3918. /**
  3919. * Implements hook_chado_schema_v1_2_element()
  3920. * Purpose: To describe the structure of 'element' to tripal
  3921. *
  3922. * @see chado_insert_record()
  3923. * @see chado_update_record()
  3924. * @see chado_select_record()
  3925. *
  3926. * @return
  3927. * An array describing the 'element' table
  3928. *
  3929. * @ingroup tripal_chado_v1.2_schema_api
  3930. *
  3931. */
  3932. function tripal_chado_chado_schema_v1_2_element() {
  3933. $description = [
  3934. 'description' => '',
  3935. 'fields' => [
  3936. 'element_id' => [
  3937. 'description' => '',
  3938. 'type' => 'serial',
  3939. 'not null' => TRUE,
  3940. ],
  3941. 'feature_id' => [
  3942. 'description' => '',
  3943. 'type' => 'int',
  3944. 'not null' => FALSE,
  3945. ],
  3946. 'arraydesign_id' => [
  3947. 'description' => '',
  3948. 'type' => 'int',
  3949. 'not null' => TRUE,
  3950. ],
  3951. 'type_id' => [
  3952. 'description' => '',
  3953. 'type' => 'int',
  3954. 'not null' => FALSE,
  3955. ],
  3956. 'dbxref_id' => [
  3957. 'description' => '',
  3958. 'type' => 'int',
  3959. 'not null' => FALSE,
  3960. ],
  3961. ],
  3962. 'primary key' => [
  3963. 0 => 'element_id',
  3964. ],
  3965. 'unique keys' => [
  3966. 'element_c1' => [
  3967. 0 => 'feature_id',
  3968. 1 => 'arraydesign_id',
  3969. ],
  3970. ],
  3971. 'indexes' => [
  3972. 'element_idx1' => [
  3973. 0 => 'feature_id',
  3974. ],
  3975. 'element_idx2' => [
  3976. 0 => 'arraydesign_id',
  3977. ],
  3978. 'element_idx3' => [
  3979. 0 => 'type_id',
  3980. ],
  3981. 'element_idx4' => [
  3982. 0 => 'dbxref_id',
  3983. ],
  3984. ],
  3985. 'foreign keys' => [
  3986. 'cvterm' => [
  3987. 'table' => 'cvterm',
  3988. 'columns' => [
  3989. 'type_id' => 'cvterm_id',
  3990. ],
  3991. ],
  3992. 'dbxref' => [
  3993. 'table' => 'dbxref',
  3994. 'columns' => [
  3995. 'dbxref_id' => 'dbxref_id',
  3996. ],
  3997. ],
  3998. 'feature' => [
  3999. 'table' => 'feature',
  4000. 'columns' => [
  4001. 'feature_id' => 'feature_id',
  4002. ],
  4003. ],
  4004. 'arraydesign' => [
  4005. 'table' => 'arraydesign',
  4006. 'columns' => [
  4007. 'arraydesign_id' => 'arraydesign_id',
  4008. ],
  4009. ],
  4010. ],
  4011. 'table' => 'element',
  4012. 'referring_tables' => [
  4013. 0 => 'element_relationship',
  4014. 2 => 'elementresult',
  4015. ],
  4016. ];
  4017. return $description;
  4018. }
  4019. /**
  4020. * Implements hook_chado_schema_v1_2_element_relationship()
  4021. * Purpose: To describe the structure of 'element_relationship' to tripal
  4022. *
  4023. * @see chado_insert_record()
  4024. * @see chado_update_record()
  4025. * @see chado_select_record()
  4026. *
  4027. * @return
  4028. * An array describing the 'element_relationship' table
  4029. *
  4030. * @ingroup tripal_chado_v1.2_schema_api
  4031. *
  4032. */
  4033. function tripal_chado_chado_schema_v1_2_element_relationship() {
  4034. $description = [
  4035. 'description' => '',
  4036. 'fields' => [
  4037. 'element_relationship_id' => [
  4038. 'description' => '',
  4039. 'type' => 'serial',
  4040. 'not null' => TRUE,
  4041. ],
  4042. 'subject_id' => [
  4043. 'description' => '',
  4044. 'type' => 'int',
  4045. 'not null' => TRUE,
  4046. ],
  4047. 'type_id' => [
  4048. 'description' => '',
  4049. 'type' => 'int',
  4050. 'not null' => TRUE,
  4051. ],
  4052. 'object_id' => [
  4053. 'description' => '',
  4054. 'type' => 'int',
  4055. 'not null' => TRUE,
  4056. ],
  4057. 'value' => [
  4058. 'description' => '',
  4059. 'type' => 'text',
  4060. 'not null' => FALSE,
  4061. ],
  4062. 'rank' => [
  4063. 'description' => '',
  4064. 'type' => 'int',
  4065. 'not null' => TRUE,
  4066. 'default' => 0,
  4067. ],
  4068. ],
  4069. 'primary key' => [
  4070. 0 => 'element_relationship_id',
  4071. ],
  4072. 'unique keys' => [
  4073. 'element_relationship_c1' => [
  4074. 0 => 'subject_id',
  4075. 1 => 'object_id',
  4076. 2 => 'type_id',
  4077. 3 => 'rank',
  4078. ],
  4079. ],
  4080. 'indexes' => [
  4081. 'element_relationship_idx1' => [
  4082. 0 => 'subject_id',
  4083. ],
  4084. 'element_relationship_idx2' => [
  4085. 0 => 'type_id',
  4086. ],
  4087. 'element_relationship_idx3' => [
  4088. 0 => 'object_id',
  4089. ],
  4090. 'element_relationship_idx4' => [
  4091. 0 => 'value',
  4092. ],
  4093. ],
  4094. 'foreign keys' => [
  4095. 'cvterm' => [
  4096. 'table' => 'cvterm',
  4097. 'columns' => [
  4098. 'type_id' => 'cvterm_id',
  4099. ],
  4100. ],
  4101. 'element' => [
  4102. 'table' => 'element',
  4103. 'columns' => [
  4104. 'subject_id' => 'element_id',
  4105. 'object_id' => 'element_id',
  4106. ],
  4107. ],
  4108. ],
  4109. 'table' => 'element_relationship',
  4110. 'referring_tables' => NULL,
  4111. ];
  4112. return $description;
  4113. }
  4114. /**
  4115. * Implements hook_chado_schema_v1_2_elementresult()
  4116. * Purpose: To describe the structure of 'elementresult' to tripal
  4117. *
  4118. * @see chado_insert_record()
  4119. * @see chado_update_record()
  4120. * @see chado_select_record()
  4121. *
  4122. * @return
  4123. * An array describing the 'elementresult' table
  4124. *
  4125. * @ingroup tripal_chado_v1.2_schema_api
  4126. *
  4127. */
  4128. function tripal_chado_chado_schema_v1_2_elementresult() {
  4129. $description = [
  4130. 'description' => '',
  4131. 'fields' => [
  4132. 'elementresult_id' => [
  4133. 'description' => '',
  4134. 'type' => 'serial',
  4135. 'not null' => TRUE,
  4136. ],
  4137. 'element_id' => [
  4138. 'description' => '',
  4139. 'type' => 'int',
  4140. 'not null' => TRUE,
  4141. ],
  4142. 'quantification_id' => [
  4143. 'description' => '',
  4144. 'type' => 'int',
  4145. 'not null' => TRUE,
  4146. ],
  4147. 'signal' => [
  4148. 'description' => '',
  4149. 'type' => 'float',
  4150. 'size' => 'big',
  4151. 'not null' => TRUE,
  4152. ],
  4153. ],
  4154. 'primary key' => [
  4155. 0 => 'elementresult_id',
  4156. ],
  4157. 'unique keys' => [
  4158. 'elementresult_c1' => [
  4159. 0 => 'element_id',
  4160. 1 => 'quantification_id',
  4161. ],
  4162. ],
  4163. 'indexes' => [
  4164. 'elementresult_idx1' => [
  4165. 0 => 'element_id',
  4166. ],
  4167. 'elementresult_idx2' => [
  4168. 0 => 'quantification_id',
  4169. ],
  4170. 'elementresult_idx3' => [
  4171. 0 => 'signal',
  4172. ],
  4173. ],
  4174. 'foreign keys' => [
  4175. 'quantification' => [
  4176. 'table' => 'quantification',
  4177. 'columns' => [
  4178. 'quantification_id' => 'quantification_id',
  4179. ],
  4180. ],
  4181. 'element' => [
  4182. 'table' => 'element',
  4183. 'columns' => [
  4184. 'element_id' => 'element_id',
  4185. ],
  4186. ],
  4187. ],
  4188. 'table' => 'elementresult',
  4189. 'referring_tables' => [
  4190. 0 => 'elementresult_relationship',
  4191. ],
  4192. ];
  4193. return $description;
  4194. }
  4195. /**
  4196. * Implements hook_chado_schema_v1_2_elementresult_relationship()
  4197. * Purpose: To describe the structure of 'elementresult_relationship' to tripal
  4198. *
  4199. * @see chado_insert_record()
  4200. * @see chado_update_record()
  4201. * @see chado_select_record()
  4202. *
  4203. * @return
  4204. * An array describing the 'elementresult_relationship' table
  4205. *
  4206. * @ingroup tripal_chado_v1.2_schema_api
  4207. *
  4208. */
  4209. function tripal_chado_chado_schema_v1_2_elementresult_relationship() {
  4210. $description = [
  4211. 'description' => '',
  4212. 'fields' => [
  4213. 'elementresult_relationship_id' => [
  4214. 'description' => '',
  4215. 'type' => 'serial',
  4216. 'not null' => TRUE,
  4217. ],
  4218. 'subject_id' => [
  4219. 'description' => '',
  4220. 'type' => 'int',
  4221. 'not null' => TRUE,
  4222. ],
  4223. 'type_id' => [
  4224. 'description' => '',
  4225. 'type' => 'int',
  4226. 'not null' => TRUE,
  4227. ],
  4228. 'object_id' => [
  4229. 'description' => '',
  4230. 'type' => 'int',
  4231. 'not null' => TRUE,
  4232. ],
  4233. 'value' => [
  4234. 'description' => '',
  4235. 'type' => 'text',
  4236. 'not null' => FALSE,
  4237. ],
  4238. 'rank' => [
  4239. 'description' => '',
  4240. 'type' => 'int',
  4241. 'not null' => TRUE,
  4242. 'default' => 0,
  4243. ],
  4244. ],
  4245. 'primary key' => [
  4246. 0 => 'elementresult_relationship_id',
  4247. ],
  4248. 'unique keys' => [
  4249. 'elementresult_relationship_c1' => [
  4250. 0 => 'subject_id',
  4251. 1 => 'object_id',
  4252. 2 => 'type_id',
  4253. 3 => 'rank',
  4254. ],
  4255. ],
  4256. 'indexes' => [
  4257. 'elementresult_relationship_idx1' => [
  4258. 0 => 'subject_id',
  4259. ],
  4260. 'elementresult_relationship_idx2' => [
  4261. 0 => 'type_id',
  4262. ],
  4263. 'elementresult_relationship_idx3' => [
  4264. 0 => 'object_id',
  4265. ],
  4266. 'elementresult_relationship_idx4' => [
  4267. 0 => 'value',
  4268. ],
  4269. ],
  4270. 'foreign keys' => [
  4271. 'cvterm' => [
  4272. 'table' => 'cvterm',
  4273. 'columns' => [
  4274. 'type_id' => 'cvterm_id',
  4275. ],
  4276. ],
  4277. 'elementresult' => [
  4278. 'table' => 'elementresult',
  4279. 'columns' => [
  4280. 'subject_id' => 'elementresult_id',
  4281. 'object_id' => 'elementresult_id',
  4282. ],
  4283. ],
  4284. ],
  4285. 'table' => 'elementresult_relationship',
  4286. 'referring_tables' => NULL,
  4287. ];
  4288. return $description;
  4289. }
  4290. /**
  4291. * Implements hook_chado_schema_v1_2_environment()
  4292. * Purpose: To describe the structure of 'environment' to tripal
  4293. *
  4294. * @see chado_insert_record()
  4295. * @see chado_update_record()
  4296. * @see chado_select_record()
  4297. *
  4298. * @return
  4299. * An array describing the 'environment' table
  4300. *
  4301. * @ingroup tripal_chado_v1.2_schema_api
  4302. *
  4303. */
  4304. function tripal_chado_chado_schema_v1_2_environment() {
  4305. $description = [
  4306. 'description' => '',
  4307. 'fields' => [
  4308. 'environment_id' => [
  4309. 'description' => '',
  4310. 'type' => 'serial',
  4311. 'not null' => TRUE,
  4312. ],
  4313. 'uniquename' => [
  4314. 'description' => '',
  4315. 'type' => 'text',
  4316. 'not null' => TRUE,
  4317. ],
  4318. 'description' => [
  4319. 'description' => '',
  4320. 'type' => 'text',
  4321. 'not null' => FALSE,
  4322. ],
  4323. ],
  4324. 'primary key' => [
  4325. 0 => 'environment_id',
  4326. ],
  4327. 'unique keys' => [
  4328. 'environment_c1' => [
  4329. 0 => 'uniquename',
  4330. ],
  4331. ],
  4332. 'indexes' => [
  4333. 'environment_idx1' => [
  4334. 0 => 'uniquename',
  4335. ],
  4336. ],
  4337. 'foreign keys' => [
  4338. ],
  4339. 'table' => 'environment',
  4340. 'referring_tables' => [
  4341. 0 => 'environment_cvterm',
  4342. 1 => 'phendesc',
  4343. 2 => 'phenotype_comparison',
  4344. 4 => 'phenstatement',
  4345. ],
  4346. ];
  4347. return $description;
  4348. }
  4349. /**
  4350. * Implements hook_chado_schema_v1_2_environment_cvterm()
  4351. * Purpose: To describe the structure of 'environment_cvterm' to tripal
  4352. *
  4353. * @see chado_insert_record()
  4354. * @see chado_update_record()
  4355. * @see chado_select_record()
  4356. *
  4357. * @return
  4358. * An array describing the 'environment_cvterm' table
  4359. *
  4360. * @ingroup tripal_chado_v1.2_schema_api
  4361. *
  4362. */
  4363. function tripal_chado_chado_schema_v1_2_environment_cvterm() {
  4364. $description = [
  4365. 'description' => '',
  4366. 'fields' => [
  4367. 'environment_cvterm_id' => [
  4368. 'description' => '',
  4369. 'type' => 'serial',
  4370. 'not null' => TRUE,
  4371. ],
  4372. 'environment_id' => [
  4373. 'description' => '',
  4374. 'type' => 'int',
  4375. 'not null' => TRUE,
  4376. ],
  4377. 'cvterm_id' => [
  4378. 'description' => '',
  4379. 'type' => 'int',
  4380. 'not null' => TRUE,
  4381. ],
  4382. ],
  4383. 'primary key' => [
  4384. 0 => 'environment_cvterm_id',
  4385. ],
  4386. 'unique keys' => [
  4387. 'environment_cvterm_c1' => [
  4388. 0 => 'environment_id',
  4389. 1 => 'cvterm_id',
  4390. ],
  4391. ],
  4392. 'indexes' => [
  4393. 'environment_cvterm_idx1' => [
  4394. 0 => 'environment_id',
  4395. ],
  4396. 'environment_cvterm_idx2' => [
  4397. 0 => 'cvterm_id',
  4398. ],
  4399. ],
  4400. 'foreign keys' => [
  4401. 'cvterm' => [
  4402. 'table' => 'cvterm',
  4403. 'columns' => [
  4404. 'cvterm_id' => 'cvterm_id',
  4405. ],
  4406. ],
  4407. 'environment' => [
  4408. 'table' => 'environment',
  4409. 'columns' => [
  4410. 'environment_id' => 'environment_id',
  4411. ],
  4412. ],
  4413. ],
  4414. 'table' => 'environment_cvterm',
  4415. 'referring_tables' => NULL,
  4416. ];
  4417. return $description;
  4418. }
  4419. /**
  4420. * Implements hook_chado_schema_v1_2_expression()
  4421. * Purpose: To describe the structure of 'expression' to tripal
  4422. *
  4423. * @see chado_insert_record()
  4424. * @see chado_update_record()
  4425. * @see chado_select_record()
  4426. *
  4427. * @return
  4428. * An array describing the 'expression' table
  4429. *
  4430. * @ingroup tripal_chado_v1.2_schema_api
  4431. *
  4432. */
  4433. function tripal_chado_chado_schema_v1_2_expression() {
  4434. $description = [
  4435. 'description' => '',
  4436. 'fields' => [
  4437. 'expression_id' => [
  4438. 'description' => '',
  4439. 'type' => 'serial',
  4440. 'not null' => TRUE,
  4441. ],
  4442. 'uniquename' => [
  4443. 'description' => '',
  4444. 'type' => 'text',
  4445. 'not null' => TRUE,
  4446. ],
  4447. 'md5checksum' => [
  4448. 'description' => '',
  4449. 'type' => 'char',
  4450. 'length' => '32',
  4451. 'not null' => FALSE,
  4452. ],
  4453. 'description' => [
  4454. 'description' => '',
  4455. 'type' => 'text',
  4456. 'not null' => FALSE,
  4457. ],
  4458. ],
  4459. 'primary key' => [
  4460. 0 => 'expression_id',
  4461. ],
  4462. 'unique keys' => [
  4463. 'expression_c1' => [
  4464. 0 => 'uniquename',
  4465. ],
  4466. ],
  4467. 'foreign keys' => [
  4468. ],
  4469. 'table' => 'expression',
  4470. 'referring_tables' => [
  4471. 0 => 'expression_cvterm',
  4472. 1 => 'expression_image',
  4473. 2 => 'expression_pub',
  4474. 3 => 'expressionprop',
  4475. 4 => 'feature_expression',
  4476. ],
  4477. ];
  4478. return $description;
  4479. }
  4480. /**
  4481. * Implements hook_chado_schema_v1_2_expression_cvterm()
  4482. * Purpose: To describe the structure of 'expression_cvterm' to tripal
  4483. *
  4484. * @see chado_insert_record()
  4485. * @see chado_update_record()
  4486. * @see chado_select_record()
  4487. *
  4488. * @return
  4489. * An array describing the 'expression_cvterm' table
  4490. *
  4491. * @ingroup tripal_chado_v1.2_schema_api
  4492. *
  4493. */
  4494. function tripal_chado_chado_schema_v1_2_expression_cvterm() {
  4495. $description = [
  4496. 'description' => '',
  4497. 'fields' => [
  4498. 'expression_cvterm_id' => [
  4499. 'description' => '',
  4500. 'type' => 'serial',
  4501. 'not null' => TRUE,
  4502. ],
  4503. 'expression_id' => [
  4504. 'description' => '',
  4505. 'type' => 'int',
  4506. 'not null' => TRUE,
  4507. ],
  4508. 'cvterm_id' => [
  4509. 'description' => '',
  4510. 'type' => 'int',
  4511. 'not null' => TRUE,
  4512. ],
  4513. 'rank' => [
  4514. 'description' => '',
  4515. 'type' => 'int',
  4516. 'not null' => TRUE,
  4517. 'default' => 0,
  4518. ],
  4519. 'cvterm_type_id' => [
  4520. 'description' => '',
  4521. 'type' => 'int',
  4522. 'not null' => TRUE,
  4523. ],
  4524. ],
  4525. 'primary key' => [
  4526. 0 => 'expression_cvterm_id',
  4527. ],
  4528. 'unique keys' => [
  4529. 'expression_cvterm_c1' => [
  4530. 0 => 'expression_id',
  4531. 1 => 'cvterm_id',
  4532. 2 => 'cvterm_type_id',
  4533. ],
  4534. ],
  4535. 'indexes' => [
  4536. 'expression_cvterm_idx1' => [
  4537. 0 => 'expression_id',
  4538. ],
  4539. 'expression_cvterm_idx2' => [
  4540. 0 => 'cvterm_id',
  4541. ],
  4542. 'expression_cvterm_idx3' => [
  4543. 0 => 'cvterm_type_id',
  4544. ],
  4545. ],
  4546. 'foreign keys' => [
  4547. 'cvterm' => [
  4548. 'table' => 'cvterm',
  4549. 'columns' => [
  4550. 'cvterm_id' => 'cvterm_id',
  4551. 'cvterm_type_id' => 'cvterm_id',
  4552. ],
  4553. ],
  4554. 'expression' => [
  4555. 'table' => 'expression',
  4556. 'columns' => [
  4557. 'expression_id' => 'expression_id',
  4558. ],
  4559. ],
  4560. ],
  4561. 'table' => 'expression_cvterm',
  4562. 'referring_tables' => [
  4563. 0 => 'expression_cvtermprop',
  4564. ],
  4565. ];
  4566. return $description;
  4567. }
  4568. /**
  4569. * Implements hook_chado_schema_v1_2_expression_cvtermprop()
  4570. * Purpose: To describe the structure of 'expression_cvtermprop' to tripal
  4571. *
  4572. * @see chado_insert_record()
  4573. * @see chado_update_record()
  4574. * @see chado_select_record()
  4575. *
  4576. * @return
  4577. * An array describing the 'expression_cvtermprop' table
  4578. *
  4579. * @ingroup tripal_chado_v1.2_schema_api
  4580. *
  4581. */
  4582. function tripal_chado_chado_schema_v1_2_expression_cvtermprop() {
  4583. $description = [
  4584. 'description' => '',
  4585. 'fields' => [
  4586. 'expression_cvtermprop_id' => [
  4587. 'description' => '',
  4588. 'type' => 'serial',
  4589. 'not null' => TRUE,
  4590. ],
  4591. 'expression_cvterm_id' => [
  4592. 'description' => '',
  4593. 'type' => 'int',
  4594. 'not null' => TRUE,
  4595. ],
  4596. 'type_id' => [
  4597. 'description' => '',
  4598. 'type' => 'int',
  4599. 'not null' => TRUE,
  4600. ],
  4601. 'value' => [
  4602. 'description' => '',
  4603. 'type' => 'text',
  4604. 'not null' => FALSE,
  4605. ],
  4606. 'rank' => [
  4607. 'description' => '',
  4608. 'type' => 'int',
  4609. 'not null' => TRUE,
  4610. 'default' => 0,
  4611. ],
  4612. ],
  4613. 'primary key' => [
  4614. 0 => 'expression_cvtermprop_id',
  4615. ],
  4616. 'unique keys' => [
  4617. 'expression_cvtermprop_c1' => [
  4618. 0 => 'expression_cvterm_id',
  4619. 1 => 'type_id',
  4620. 2 => 'rank',
  4621. ],
  4622. ],
  4623. 'indexes' => [
  4624. 'expression_cvtermprop_idx1' => [
  4625. 0 => 'expression_cvterm_id',
  4626. ],
  4627. 'expression_cvtermprop_idx2' => [
  4628. 0 => 'type_id',
  4629. ],
  4630. ],
  4631. 'foreign keys' => [
  4632. 'cvterm' => [
  4633. 'table' => 'cvterm',
  4634. 'columns' => [
  4635. 'type_id' => 'cvterm_id',
  4636. ],
  4637. ],
  4638. 'expression_cvterm' => [
  4639. 'table' => 'expression_cvterm',
  4640. 'columns' => [
  4641. 'expression_cvterm_id' => 'expression_cvterm_id',
  4642. ],
  4643. ],
  4644. ],
  4645. 'table' => 'expression_cvtermprop',
  4646. 'referring_tables' => NULL,
  4647. ];
  4648. return $description;
  4649. }
  4650. /**
  4651. * Implements hook_chado_schema_v1_2_expression_image()
  4652. * Purpose: To describe the structure of 'expression_image' to tripal
  4653. *
  4654. * @see chado_insert_record()
  4655. * @see chado_update_record()
  4656. * @see chado_select_record()
  4657. *
  4658. * @return
  4659. * An array describing the 'expression_image' table
  4660. *
  4661. * @ingroup tripal_chado_v1.2_schema_api
  4662. *
  4663. */
  4664. function tripal_chado_chado_schema_v1_2_expression_image() {
  4665. $description = [
  4666. 'description' => '',
  4667. 'fields' => [
  4668. 'expression_image_id' => [
  4669. 'description' => '',
  4670. 'type' => 'serial',
  4671. 'not null' => TRUE,
  4672. ],
  4673. 'expression_id' => [
  4674. 'description' => '',
  4675. 'type' => 'int',
  4676. 'not null' => TRUE,
  4677. ],
  4678. 'eimage_id' => [
  4679. 'description' => '',
  4680. 'type' => 'int',
  4681. 'not null' => TRUE,
  4682. ],
  4683. ],
  4684. 'primary key' => [
  4685. 0 => 'expression_image_id',
  4686. ],
  4687. 'unique keys' => [
  4688. 'expression_image_c1' => [
  4689. 0 => 'expression_id',
  4690. 1 => 'eimage_id',
  4691. ],
  4692. ],
  4693. 'indexes' => [
  4694. 'expression_image_idx1' => [
  4695. 0 => 'expression_id',
  4696. ],
  4697. 'expression_image_idx2' => [
  4698. 0 => 'eimage_id',
  4699. ],
  4700. ],
  4701. 'foreign keys' => [
  4702. 'expression' => [
  4703. 'table' => 'expression',
  4704. 'columns' => [
  4705. 'expression_id' => 'expression_id',
  4706. ],
  4707. ],
  4708. 'eimage' => [
  4709. 'table' => 'eimage',
  4710. 'columns' => [
  4711. 'eimage_id' => 'eimage_id',
  4712. ],
  4713. ],
  4714. ],
  4715. 'table' => 'expression_image',
  4716. 'referring_tables' => NULL,
  4717. ];
  4718. return $description;
  4719. }
  4720. /**
  4721. * Implements hook_chado_schema_v1_2_expression_pub()
  4722. * Purpose: To describe the structure of 'expression_pub' to tripal
  4723. *
  4724. * @see chado_insert_record()
  4725. * @see chado_update_record()
  4726. * @see chado_select_record()
  4727. *
  4728. * @return
  4729. * An array describing the 'expression_pub' table
  4730. *
  4731. * @ingroup tripal_chado_v1.2_schema_api
  4732. *
  4733. */
  4734. function tripal_chado_chado_schema_v1_2_expression_pub() {
  4735. $description = [
  4736. 'description' => '',
  4737. 'fields' => [
  4738. 'expression_pub_id' => [
  4739. 'description' => '',
  4740. 'type' => 'serial',
  4741. 'not null' => TRUE,
  4742. ],
  4743. 'expression_id' => [
  4744. 'description' => '',
  4745. 'type' => 'int',
  4746. 'not null' => TRUE,
  4747. ],
  4748. 'pub_id' => [
  4749. 'description' => '',
  4750. 'type' => 'int',
  4751. 'not null' => TRUE,
  4752. ],
  4753. ],
  4754. 'primary key' => [
  4755. 0 => 'expression_pub_id',
  4756. ],
  4757. 'unique keys' => [
  4758. 'expression_pub_c1' => [
  4759. 0 => 'expression_id',
  4760. 1 => 'pub_id',
  4761. ],
  4762. ],
  4763. 'indexes' => [
  4764. 'expression_pub_idx1' => [
  4765. 0 => 'expression_id',
  4766. ],
  4767. 'expression_pub_idx2' => [
  4768. 0 => 'pub_id',
  4769. ],
  4770. ],
  4771. 'foreign keys' => [
  4772. 'pub' => [
  4773. 'table' => 'pub',
  4774. 'columns' => [
  4775. 'pub_id' => 'pub_id',
  4776. ],
  4777. ],
  4778. 'expression' => [
  4779. 'table' => 'expression',
  4780. 'columns' => [
  4781. 'expression_id' => 'expression_id',
  4782. ],
  4783. ],
  4784. ],
  4785. 'table' => 'expression_pub',
  4786. 'referring_tables' => NULL,
  4787. ];
  4788. return $description;
  4789. }
  4790. /**
  4791. * Implements hook_chado_schema_v1_2_expressionprop()
  4792. * Purpose: To describe the structure of 'expressionprop' to tripal
  4793. *
  4794. * @see chado_insert_record()
  4795. * @see chado_update_record()
  4796. * @see chado_select_record()
  4797. *
  4798. * @return
  4799. * An array describing the 'expressionprop' table
  4800. *
  4801. * @ingroup tripal_chado_v1.2_schema_api
  4802. *
  4803. */
  4804. function tripal_chado_chado_schema_v1_2_expressionprop() {
  4805. $description = [
  4806. 'description' => '',
  4807. 'fields' => [
  4808. 'expressionprop_id' => [
  4809. 'description' => '',
  4810. 'type' => 'serial',
  4811. 'not null' => TRUE,
  4812. ],
  4813. 'expression_id' => [
  4814. 'description' => '',
  4815. 'type' => 'int',
  4816. 'not null' => TRUE,
  4817. ],
  4818. 'type_id' => [
  4819. 'description' => '',
  4820. 'type' => 'int',
  4821. 'not null' => TRUE,
  4822. ],
  4823. 'value' => [
  4824. 'description' => '',
  4825. 'type' => 'text',
  4826. 'not null' => FALSE,
  4827. ],
  4828. 'rank' => [
  4829. 'description' => '',
  4830. 'type' => 'int',
  4831. 'not null' => TRUE,
  4832. 'default' => 0,
  4833. ],
  4834. ],
  4835. 'primary key' => [
  4836. 0 => 'expressionprop_id',
  4837. ],
  4838. 'unique keys' => [
  4839. 'expressionprop_c1' => [
  4840. 0 => 'expression_id',
  4841. 1 => 'type_id',
  4842. 2 => 'rank',
  4843. ],
  4844. ],
  4845. 'indexes' => [
  4846. 'expressionprop_idx1' => [
  4847. 0 => 'expression_id',
  4848. ],
  4849. 'expressionprop_idx2' => [
  4850. 0 => 'type_id',
  4851. ],
  4852. ],
  4853. 'foreign keys' => [
  4854. 'cvterm' => [
  4855. 'table' => 'cvterm',
  4856. 'columns' => [
  4857. 'type_id' => 'cvterm_id',
  4858. ],
  4859. ],
  4860. 'expression' => [
  4861. 'table' => 'expression',
  4862. 'columns' => [
  4863. 'expression_id' => 'expression_id',
  4864. ],
  4865. ],
  4866. ],
  4867. 'table' => 'expressionprop',
  4868. 'referring_tables' => NULL,
  4869. ];
  4870. return $description;
  4871. }
  4872. /**
  4873. * Implements hook_chado_schema_v1_2_feature()
  4874. * Purpose: To describe the structure of 'feature' to tripal
  4875. *
  4876. * @see chado_insert_record()
  4877. * @see chado_update_record()
  4878. * @see chado_select_record()
  4879. *
  4880. * @return
  4881. * An array describing the 'feature' table
  4882. *
  4883. * @ingroup tripal_chado_v1.2_schema_api
  4884. *
  4885. */
  4886. function tripal_chado_chado_schema_v1_2_feature() {
  4887. $description = [
  4888. 'description' => '',
  4889. 'fields' => [
  4890. 'feature_id' => [
  4891. 'description' => '',
  4892. 'type' => 'serial',
  4893. 'not null' => TRUE,
  4894. ],
  4895. 'dbxref_id' => [
  4896. 'description' => '',
  4897. 'type' => 'int',
  4898. 'not null' => FALSE,
  4899. ],
  4900. 'organism_id' => [
  4901. 'description' => '',
  4902. 'type' => 'int',
  4903. 'not null' => TRUE,
  4904. ],
  4905. 'name' => [
  4906. 'description' => '',
  4907. 'type' => 'varchar',
  4908. 'length' => '255',
  4909. 'not null' => FALSE,
  4910. ],
  4911. 'uniquename' => [
  4912. 'description' => '',
  4913. 'type' => 'text',
  4914. 'not null' => TRUE,
  4915. ],
  4916. 'residues' => [
  4917. 'description' => '',
  4918. 'type' => 'text',
  4919. 'not null' => FALSE,
  4920. ],
  4921. 'seqlen' => [
  4922. 'description' => '',
  4923. 'type' => 'int',
  4924. 'not null' => FALSE,
  4925. ],
  4926. 'md5checksum' => [
  4927. 'description' => '',
  4928. 'type' => 'char',
  4929. 'length' => '32',
  4930. 'not null' => FALSE,
  4931. ],
  4932. 'type_id' => [
  4933. 'description' => '',
  4934. 'type' => 'int',
  4935. 'not null' => TRUE,
  4936. ],
  4937. 'is_analysis' => [
  4938. 'description' => '',
  4939. 'type' => 'boolean',
  4940. 'not null' => TRUE,
  4941. 'default' => 'false',
  4942. ],
  4943. 'is_obsolete' => [
  4944. 'description' => '',
  4945. 'type' => 'boolean',
  4946. 'not null' => TRUE,
  4947. 'default' => 'false',
  4948. ],
  4949. 'timeaccessioned' => [
  4950. 'description' => '',
  4951. 'type' => 'datetime',
  4952. 'not null' => TRUE,
  4953. 'default' => 'now()',
  4954. ],
  4955. 'timelastmodified' => [
  4956. 'description' => '',
  4957. 'type' => 'datetime',
  4958. 'not null' => TRUE,
  4959. 'default' => 'now()',
  4960. ],
  4961. ],
  4962. 'primary key' => [
  4963. 0 => 'feature_id',
  4964. ],
  4965. 'unique keys' => [
  4966. 'feature_c1' => [
  4967. 0 => 'organism_id',
  4968. 1 => 'uniquename',
  4969. 2 => 'type_id',
  4970. ],
  4971. ],
  4972. 'indexes' => [
  4973. 'feature_idx1' => [
  4974. 0 => 'dbxref_id',
  4975. ],
  4976. 'feature_idx2' => [
  4977. 0 => 'organism_id',
  4978. ],
  4979. 'feature_idx3' => [
  4980. 0 => 'type_id',
  4981. ],
  4982. 'feature_idx4' => [
  4983. 0 => 'uniquename',
  4984. ],
  4985. 'feature_name_ind1' => [
  4986. 0 => 'name',
  4987. ],
  4988. ],
  4989. 'foreign keys' => [
  4990. 'organism' => [
  4991. 'table' => 'organism',
  4992. 'columns' => [
  4993. 'organism_id' => 'organism_id',
  4994. ],
  4995. ],
  4996. 'cvterm' => [
  4997. 'table' => 'cvterm',
  4998. 'columns' => [
  4999. 'type_id' => 'cvterm_id',
  5000. ],
  5001. ],
  5002. 'dbxref' => [
  5003. 'table' => 'dbxref',
  5004. 'columns' => [
  5005. 'dbxref_id' => 'dbxref_id',
  5006. ],
  5007. ],
  5008. ],
  5009. 'table' => 'feature',
  5010. 'referring_tables' => [
  5011. 0 => 'analysisfeature',
  5012. 1 => 'cell_line_feature',
  5013. 2 => 'element',
  5014. 3 => 'feature_cvterm',
  5015. 4 => 'feature_dbxref',
  5016. 5 => 'feature_expression',
  5017. 6 => 'feature_genotype',
  5018. 8 => 'feature_phenotype',
  5019. 9 => 'feature_pub',
  5020. 10 => 'feature_relationship',
  5021. 12 => 'feature_synonym',
  5022. 13 => 'featureloc',
  5023. 15 => 'featurepos',
  5024. 17 => 'featureprop',
  5025. 18 => 'featurerange',
  5026. 23 => 'library_feature',
  5027. 24 => 'phylonode',
  5028. 25 => 'studyprop_feature',
  5029. ],
  5030. ];
  5031. return $description;
  5032. }
  5033. /**
  5034. * Implements hook_chado_schema_v1_2_feature_cvterm()
  5035. * Purpose: To describe the structure of 'feature_cvterm' to tripal
  5036. *
  5037. * @see chado_insert_record()
  5038. * @see chado_update_record()
  5039. * @see chado_select_record()
  5040. *
  5041. * @return
  5042. * An array describing the 'feature_cvterm' table
  5043. *
  5044. * @ingroup tripal_chado_v1.2_schema_api
  5045. *
  5046. */
  5047. function tripal_chado_chado_schema_v1_2_feature_cvterm() {
  5048. $description = [
  5049. 'description' => '',
  5050. 'fields' => [
  5051. 'feature_cvterm_id' => [
  5052. 'description' => '',
  5053. 'type' => 'serial',
  5054. 'not null' => TRUE,
  5055. ],
  5056. 'feature_id' => [
  5057. 'description' => '',
  5058. 'type' => 'int',
  5059. 'not null' => TRUE,
  5060. ],
  5061. 'cvterm_id' => [
  5062. 'description' => '',
  5063. 'type' => 'int',
  5064. 'not null' => TRUE,
  5065. ],
  5066. 'pub_id' => [
  5067. 'description' => '',
  5068. 'type' => 'int',
  5069. 'not null' => TRUE,
  5070. ],
  5071. 'is_not' => [
  5072. 'description' => '',
  5073. 'type' => 'boolean',
  5074. 'not null' => TRUE,
  5075. 'default' => 'false',
  5076. ],
  5077. 'rank' => [
  5078. 'description' => '',
  5079. 'type' => 'int',
  5080. 'not null' => TRUE,
  5081. 'default' => 0,
  5082. ],
  5083. ],
  5084. 'primary key' => [
  5085. 0 => 'feature_cvterm_id',
  5086. ],
  5087. 'unique keys' => [
  5088. 'feature_cvterm_c1' => [
  5089. 0 => 'feature_id',
  5090. 1 => 'cvterm_id',
  5091. 2 => 'pub_id',
  5092. 3 => 'rank',
  5093. ],
  5094. ],
  5095. 'indexes' => [
  5096. 'feature_cvterm_idx1' => [
  5097. 0 => 'feature_id',
  5098. ],
  5099. 'feature_cvterm_idx2' => [
  5100. 0 => 'cvterm_id',
  5101. ],
  5102. 'feature_cvterm_idx3' => [
  5103. 0 => 'pub_id',
  5104. ],
  5105. ],
  5106. 'foreign keys' => [
  5107. 'cvterm' => [
  5108. 'table' => 'cvterm',
  5109. 'columns' => [
  5110. 'cvterm_id' => 'cvterm_id',
  5111. ],
  5112. ],
  5113. 'pub' => [
  5114. 'table' => 'pub',
  5115. 'columns' => [
  5116. 'pub_id' => 'pub_id',
  5117. ],
  5118. ],
  5119. 'feature' => [
  5120. 'table' => 'feature',
  5121. 'columns' => [
  5122. 'feature_id' => 'feature_id',
  5123. ],
  5124. ],
  5125. ],
  5126. 'table' => 'feature_cvterm',
  5127. 'referring_tables' => [
  5128. 0 => 'feature_cvterm_dbxref',
  5129. 1 => 'feature_cvterm_pub',
  5130. 2 => 'feature_cvtermprop',
  5131. ],
  5132. ];
  5133. return $description;
  5134. }
  5135. /**
  5136. * Implements hook_chado_schema_v1_2_feature_cvterm_dbxref()
  5137. * Purpose: To describe the structure of 'feature_cvterm_dbxref' to tripal
  5138. *
  5139. * @see chado_insert_record()
  5140. * @see chado_update_record()
  5141. * @see chado_select_record()
  5142. *
  5143. * @return
  5144. * An array describing the 'feature_cvterm_dbxref' table
  5145. *
  5146. * @ingroup tripal_chado_v1.2_schema_api
  5147. *
  5148. */
  5149. function tripal_chado_chado_schema_v1_2_feature_cvterm_dbxref() {
  5150. $description = [
  5151. 'description' => '',
  5152. 'fields' => [
  5153. 'feature_cvterm_dbxref_id' => [
  5154. 'description' => '',
  5155. 'type' => 'serial',
  5156. 'not null' => TRUE,
  5157. ],
  5158. 'feature_cvterm_id' => [
  5159. 'description' => '',
  5160. 'type' => 'int',
  5161. 'not null' => TRUE,
  5162. ],
  5163. 'dbxref_id' => [
  5164. 'description' => '',
  5165. 'type' => 'int',
  5166. 'not null' => TRUE,
  5167. ],
  5168. ],
  5169. 'primary key' => [
  5170. 0 => 'feature_cvterm_dbxref_id',
  5171. ],
  5172. 'unique keys' => [
  5173. 'feature_cvterm_dbxref_c1' => [
  5174. 0 => 'feature_cvterm_id',
  5175. 1 => 'dbxref_id',
  5176. ],
  5177. ],
  5178. 'indexes' => [
  5179. 'feature_cvterm_dbxref_idx1' => [
  5180. 0 => 'feature_cvterm_id',
  5181. ],
  5182. 'feature_cvterm_dbxref_idx2' => [
  5183. 0 => 'dbxref_id',
  5184. ],
  5185. ],
  5186. 'foreign keys' => [
  5187. 'feature_cvterm' => [
  5188. 'table' => 'feature_cvterm',
  5189. 'columns' => [
  5190. 'feature_cvterm_id' => 'feature_cvterm_id',
  5191. ],
  5192. ],
  5193. 'dbxref' => [
  5194. 'table' => 'dbxref',
  5195. 'columns' => [
  5196. 'dbxref_id' => 'dbxref_id',
  5197. ],
  5198. ],
  5199. ],
  5200. 'table' => 'feature_cvterm_dbxref',
  5201. 'referring_tables' => NULL,
  5202. ];
  5203. return $description;
  5204. }
  5205. /**
  5206. * Implements hook_chado_schema_v1_2_feature_cvterm_pub()
  5207. * Purpose: To describe the structure of 'feature_cvterm_pub' to tripal
  5208. *
  5209. * @see chado_insert_record()
  5210. * @see chado_update_record()
  5211. * @see chado_select_record()
  5212. *
  5213. * @return
  5214. * An array describing the 'feature_cvterm_pub' table
  5215. *
  5216. * @ingroup tripal_chado_v1.2_schema_api
  5217. *
  5218. */
  5219. function tripal_chado_chado_schema_v1_2_feature_cvterm_pub() {
  5220. $description = [
  5221. 'description' => '',
  5222. 'fields' => [
  5223. 'feature_cvterm_pub_id' => [
  5224. 'description' => '',
  5225. 'type' => 'serial',
  5226. 'not null' => TRUE,
  5227. ],
  5228. 'feature_cvterm_id' => [
  5229. 'description' => '',
  5230. 'type' => 'int',
  5231. 'not null' => TRUE,
  5232. ],
  5233. 'pub_id' => [
  5234. 'description' => '',
  5235. 'type' => 'int',
  5236. 'not null' => TRUE,
  5237. ],
  5238. ],
  5239. 'primary key' => [
  5240. 0 => 'feature_cvterm_pub_id',
  5241. ],
  5242. 'unique keys' => [
  5243. 'feature_cvterm_pub_c1' => [
  5244. 0 => 'feature_cvterm_id',
  5245. 1 => 'pub_id',
  5246. ],
  5247. ],
  5248. 'indexes' => [
  5249. 'feature_cvterm_pub_idx1' => [
  5250. 0 => 'feature_cvterm_id',
  5251. ],
  5252. 'feature_cvterm_pub_idx2' => [
  5253. 0 => 'pub_id',
  5254. ],
  5255. ],
  5256. 'foreign keys' => [
  5257. 'feature_cvterm' => [
  5258. 'table' => 'feature_cvterm',
  5259. 'columns' => [
  5260. 'feature_cvterm_id' => 'feature_cvterm_id',
  5261. ],
  5262. ],
  5263. 'pub' => [
  5264. 'table' => 'pub',
  5265. 'columns' => [
  5266. 'pub_id' => 'pub_id',
  5267. ],
  5268. ],
  5269. ],
  5270. 'table' => 'feature_cvterm_pub',
  5271. 'referring_tables' => NULL,
  5272. ];
  5273. return $description;
  5274. }
  5275. /**
  5276. * Implements hook_chado_schema_v1_2_feature_cvtermprop()
  5277. * Purpose: To describe the structure of 'feature_cvtermprop' to tripal
  5278. *
  5279. * @see chado_insert_record()
  5280. * @see chado_update_record()
  5281. * @see chado_select_record()
  5282. *
  5283. * @return
  5284. * An array describing the 'feature_cvtermprop' table
  5285. *
  5286. * @ingroup tripal_chado_v1.2_schema_api
  5287. *
  5288. */
  5289. function tripal_chado_chado_schema_v1_2_feature_cvtermprop() {
  5290. $description = [
  5291. 'description' => '',
  5292. 'fields' => [
  5293. 'feature_cvtermprop_id' => [
  5294. 'description' => '',
  5295. 'type' => 'serial',
  5296. 'not null' => TRUE,
  5297. ],
  5298. 'feature_cvterm_id' => [
  5299. 'description' => '',
  5300. 'type' => 'int',
  5301. 'not null' => TRUE,
  5302. ],
  5303. 'type_id' => [
  5304. 'description' => '',
  5305. 'type' => 'int',
  5306. 'not null' => TRUE,
  5307. ],
  5308. 'value' => [
  5309. 'description' => '',
  5310. 'type' => 'text',
  5311. 'not null' => FALSE,
  5312. ],
  5313. 'rank' => [
  5314. 'description' => '',
  5315. 'type' => 'int',
  5316. 'not null' => TRUE,
  5317. 'default' => 0,
  5318. ],
  5319. ],
  5320. 'primary key' => [
  5321. 0 => 'feature_cvtermprop_id',
  5322. ],
  5323. 'unique keys' => [
  5324. 'feature_cvtermprop_c1' => [
  5325. 0 => 'feature_cvterm_id',
  5326. 1 => 'type_id',
  5327. 2 => 'rank',
  5328. ],
  5329. ],
  5330. 'indexes' => [
  5331. 'feature_cvtermprop_idx1' => [
  5332. 0 => 'feature_cvterm_id',
  5333. ],
  5334. 'feature_cvtermprop_idx2' => [
  5335. 0 => 'type_id',
  5336. ],
  5337. ],
  5338. 'foreign keys' => [
  5339. 'cvterm' => [
  5340. 'table' => 'cvterm',
  5341. 'columns' => [
  5342. 'type_id' => 'cvterm_id',
  5343. ],
  5344. ],
  5345. 'feature_cvterm' => [
  5346. 'table' => 'feature_cvterm',
  5347. 'columns' => [
  5348. 'feature_cvterm_id' => 'feature_cvterm_id',
  5349. ],
  5350. ],
  5351. ],
  5352. 'table' => 'feature_cvtermprop',
  5353. 'referring_tables' => NULL,
  5354. ];
  5355. return $description;
  5356. }
  5357. /**
  5358. * Implements hook_chado_schema_v1_2_feature_dbxref()
  5359. * Purpose: To describe the structure of 'feature_dbxref' to tripal
  5360. *
  5361. * @see chado_insert_record()
  5362. * @see chado_update_record()
  5363. * @see chado_select_record()
  5364. *
  5365. * @return
  5366. * An array describing the 'feature_dbxref' table
  5367. *
  5368. * @ingroup tripal_chado_v1.2_schema_api
  5369. *
  5370. */
  5371. function tripal_chado_chado_schema_v1_2_feature_dbxref() {
  5372. $description = [
  5373. 'description' => '',
  5374. 'fields' => [
  5375. 'feature_dbxref_id' => [
  5376. 'description' => '',
  5377. 'type' => 'serial',
  5378. 'not null' => TRUE,
  5379. ],
  5380. 'feature_id' => [
  5381. 'description' => '',
  5382. 'type' => 'int',
  5383. 'not null' => TRUE,
  5384. ],
  5385. 'dbxref_id' => [
  5386. 'description' => '',
  5387. 'type' => 'int',
  5388. 'not null' => TRUE,
  5389. ],
  5390. 'is_current' => [
  5391. 'description' => '',
  5392. 'type' => 'boolean',
  5393. 'not null' => TRUE,
  5394. 'default' => 'true',
  5395. ],
  5396. ],
  5397. 'primary key' => [
  5398. 0 => 'feature_dbxref_id',
  5399. ],
  5400. 'unique keys' => [
  5401. 'feature_dbxref_c1' => [
  5402. 0 => 'feature_id',
  5403. 1 => 'dbxref_id',
  5404. ],
  5405. ],
  5406. 'indexes' => [
  5407. 'feature_dbxref_idx1' => [
  5408. 0 => 'feature_id',
  5409. ],
  5410. 'feature_dbxref_idx2' => [
  5411. 0 => 'dbxref_id',
  5412. ],
  5413. ],
  5414. 'foreign keys' => [
  5415. 'dbxref' => [
  5416. 'table' => 'dbxref',
  5417. 'columns' => [
  5418. 'dbxref_id' => 'dbxref_id',
  5419. ],
  5420. ],
  5421. 'feature' => [
  5422. 'table' => 'feature',
  5423. 'columns' => [
  5424. 'feature_id' => 'feature_id',
  5425. ],
  5426. ],
  5427. ],
  5428. 'table' => 'feature_dbxref',
  5429. 'referring_tables' => NULL,
  5430. ];
  5431. return $description;
  5432. }
  5433. /**
  5434. * Implements hook_chado_schema_v1_2_feature_expression()
  5435. * Purpose: To describe the structure of 'feature_expression' to tripal
  5436. *
  5437. * @see chado_insert_record()
  5438. * @see chado_update_record()
  5439. * @see chado_select_record()
  5440. *
  5441. * @return
  5442. * An array describing the 'feature_expression' table
  5443. *
  5444. * @ingroup tripal_chado_v1.2_schema_api
  5445. *
  5446. */
  5447. function tripal_chado_chado_schema_v1_2_feature_expression() {
  5448. $description = [
  5449. 'description' => '',
  5450. 'fields' => [
  5451. 'feature_expression_id' => [
  5452. 'description' => '',
  5453. 'type' => 'serial',
  5454. 'not null' => TRUE,
  5455. ],
  5456. 'expression_id' => [
  5457. 'description' => '',
  5458. 'type' => 'int',
  5459. 'not null' => TRUE,
  5460. ],
  5461. 'feature_id' => [
  5462. 'description' => '',
  5463. 'type' => 'int',
  5464. 'not null' => TRUE,
  5465. ],
  5466. 'pub_id' => [
  5467. 'description' => '',
  5468. 'type' => 'int',
  5469. 'not null' => TRUE,
  5470. ],
  5471. ],
  5472. 'primary key' => [
  5473. 0 => 'feature_expression_id',
  5474. ],
  5475. 'unique keys' => [
  5476. 'feature_expression_c1' => [
  5477. 0 => 'expression_id',
  5478. 1 => 'feature_id',
  5479. 2 => 'pub_id',
  5480. ],
  5481. ],
  5482. 'indexes' => [
  5483. 'feature_expression_idx1' => [
  5484. 0 => 'expression_id',
  5485. ],
  5486. 'feature_expression_idx2' => [
  5487. 0 => 'feature_id',
  5488. ],
  5489. 'feature_expression_idx3' => [
  5490. 0 => 'pub_id',
  5491. ],
  5492. ],
  5493. 'foreign keys' => [
  5494. 'pub' => [
  5495. 'table' => 'pub',
  5496. 'columns' => [
  5497. 'pub_id' => 'pub_id',
  5498. ],
  5499. ],
  5500. 'feature' => [
  5501. 'table' => 'feature',
  5502. 'columns' => [
  5503. 'feature_id' => 'feature_id',
  5504. ],
  5505. ],
  5506. 'expression' => [
  5507. 'table' => 'expression',
  5508. 'columns' => [
  5509. 'expression_id' => 'expression_id',
  5510. ],
  5511. ],
  5512. ],
  5513. 'table' => 'feature_expression',
  5514. 'referring_tables' => [
  5515. 0 => 'feature_expressionprop',
  5516. ],
  5517. ];
  5518. return $description;
  5519. }
  5520. /**
  5521. * Implements hook_chado_schema_v1_2_feature_expressionprop()
  5522. * Purpose: To describe the structure of 'feature_expressionprop' to tripal
  5523. *
  5524. * @see chado_insert_record()
  5525. * @see chado_update_record()
  5526. * @see chado_select_record()
  5527. *
  5528. * @return
  5529. * An array describing the 'feature_expressionprop' table
  5530. *
  5531. * @ingroup tripal_chado_v1.2_schema_api
  5532. *
  5533. */
  5534. function tripal_chado_chado_schema_v1_2_feature_expressionprop() {
  5535. $description = [
  5536. 'description' => '',
  5537. 'fields' => [
  5538. 'feature_expressionprop_id' => [
  5539. 'description' => '',
  5540. 'type' => 'serial',
  5541. 'not null' => TRUE,
  5542. ],
  5543. 'feature_expression_id' => [
  5544. 'description' => '',
  5545. 'type' => 'int',
  5546. 'not null' => TRUE,
  5547. ],
  5548. 'type_id' => [
  5549. 'description' => '',
  5550. 'type' => 'int',
  5551. 'not null' => TRUE,
  5552. ],
  5553. 'value' => [
  5554. 'description' => '',
  5555. 'type' => 'text',
  5556. 'not null' => FALSE,
  5557. ],
  5558. 'rank' => [
  5559. 'description' => '',
  5560. 'type' => 'int',
  5561. 'not null' => TRUE,
  5562. 'default' => 0,
  5563. ],
  5564. ],
  5565. 'primary key' => [
  5566. 0 => 'feature_expressionprop_id',
  5567. ],
  5568. 'unique keys' => [
  5569. 'feature_expressionprop_c1' => [
  5570. 0 => 'feature_expression_id',
  5571. 1 => 'type_id',
  5572. 2 => 'rank',
  5573. ],
  5574. ],
  5575. 'indexes' => [
  5576. 'feature_expressionprop_idx1' => [
  5577. 0 => 'feature_expression_id',
  5578. ],
  5579. 'feature_expressionprop_idx2' => [
  5580. 0 => 'type_id',
  5581. ],
  5582. ],
  5583. 'foreign keys' => [
  5584. 'cvterm' => [
  5585. 'table' => 'cvterm',
  5586. 'columns' => [
  5587. 'type_id' => 'cvterm_id',
  5588. ],
  5589. ],
  5590. 'feature_expression' => [
  5591. 'table' => 'feature_expression',
  5592. 'columns' => [
  5593. 'feature_expression_id' => 'feature_expression_id',
  5594. ],
  5595. ],
  5596. ],
  5597. 'table' => 'feature_expressionprop',
  5598. 'referring_tables' => NULL,
  5599. ];
  5600. return $description;
  5601. }
  5602. /**
  5603. * Implements hook_chado_schema_v1_2_feature_genotype()
  5604. * Purpose: To describe the structure of 'feature_genotype' to tripal
  5605. *
  5606. * @see chado_insert_record()
  5607. * @see chado_update_record()
  5608. * @see chado_select_record()
  5609. *
  5610. * @return
  5611. * An array describing the 'feature_genotype' table
  5612. *
  5613. * @ingroup tripal_chado_v1.2_schema_api
  5614. *
  5615. */
  5616. function tripal_chado_chado_schema_v1_2_feature_genotype() {
  5617. $description = [
  5618. 'description' => '',
  5619. 'fields' => [
  5620. 'feature_genotype_id' => [
  5621. 'description' => '',
  5622. 'type' => 'serial',
  5623. 'not null' => TRUE,
  5624. ],
  5625. 'feature_id' => [
  5626. 'description' => '',
  5627. 'type' => 'int',
  5628. 'not null' => TRUE,
  5629. ],
  5630. 'genotype_id' => [
  5631. 'description' => '',
  5632. 'type' => 'int',
  5633. 'not null' => TRUE,
  5634. ],
  5635. 'chromosome_id' => [
  5636. 'description' => '',
  5637. 'type' => 'int',
  5638. 'not null' => FALSE,
  5639. ],
  5640. 'rank' => [
  5641. 'description' => '',
  5642. 'type' => 'int',
  5643. 'not null' => TRUE,
  5644. ],
  5645. 'cgroup' => [
  5646. 'description' => '',
  5647. 'type' => 'int',
  5648. 'not null' => TRUE,
  5649. ],
  5650. 'cvterm_id' => [
  5651. 'description' => '',
  5652. 'type' => 'int',
  5653. 'not null' => TRUE,
  5654. ],
  5655. ],
  5656. 'primary key' => [
  5657. 0 => 'feature_genotype_id',
  5658. ],
  5659. 'unique keys' => [
  5660. 'feature_genotype_c1' => [
  5661. 0 => 'feature_id',
  5662. 1 => 'genotype_id',
  5663. 2 => 'cvterm_id',
  5664. 3 => 'chromosome_id',
  5665. 4 => 'rank',
  5666. 5 => 'cgroup',
  5667. ],
  5668. ],
  5669. 'indexes' => [
  5670. 'feature_genotype_idx1' => [
  5671. 0 => 'feature_id',
  5672. ],
  5673. 'feature_genotype_idx2' => [
  5674. 0 => 'genotype_id',
  5675. ],
  5676. ],
  5677. 'foreign keys' => [
  5678. 'cvterm' => [
  5679. 'table' => 'cvterm',
  5680. 'columns' => [
  5681. 'cvterm_id' => 'cvterm_id',
  5682. ],
  5683. ],
  5684. 'feature' => [
  5685. 'table' => 'feature',
  5686. 'columns' => [
  5687. 'feature_id' => 'feature_id',
  5688. 'chromosome_id' => 'feature_id',
  5689. ],
  5690. ],
  5691. 'genotype' => [
  5692. 'table' => 'genotype',
  5693. 'columns' => [
  5694. 'genotype_id' => 'genotype_id',
  5695. ],
  5696. ],
  5697. ],
  5698. 'table' => 'feature_genotype',
  5699. 'referring_tables' => NULL,
  5700. ];
  5701. return $description;
  5702. }
  5703. /**
  5704. * Implements hook_chado_schema_v1_2_feature_phenotype()
  5705. * Purpose: To describe the structure of 'feature_phenotype' to tripal
  5706. *
  5707. * @see chado_insert_record()
  5708. * @see chado_update_record()
  5709. * @see chado_select_record()
  5710. *
  5711. * @return
  5712. * An array describing the 'feature_phenotype' table
  5713. *
  5714. * @ingroup tripal_chado_v1.2_schema_api
  5715. *
  5716. */
  5717. function tripal_chado_chado_schema_v1_2_feature_phenotype() {
  5718. $description = [
  5719. 'description' => '',
  5720. 'fields' => [
  5721. 'feature_phenotype_id' => [
  5722. 'description' => '',
  5723. 'type' => 'serial',
  5724. 'not null' => TRUE,
  5725. ],
  5726. 'feature_id' => [
  5727. 'description' => '',
  5728. 'type' => 'int',
  5729. 'not null' => TRUE,
  5730. ],
  5731. 'phenotype_id' => [
  5732. 'description' => '',
  5733. 'type' => 'int',
  5734. 'not null' => TRUE,
  5735. ],
  5736. ],
  5737. 'primary key' => [
  5738. 0 => 'feature_phenotype_id',
  5739. ],
  5740. 'unique keys' => [
  5741. 'feature_phenotype_c1' => [
  5742. 0 => 'feature_id',
  5743. 1 => 'phenotype_id',
  5744. ],
  5745. ],
  5746. 'indexes' => [
  5747. 'feature_phenotype_idx1' => [
  5748. 0 => 'feature_id',
  5749. ],
  5750. 'feature_phenotype_idx2' => [
  5751. 0 => 'phenotype_id',
  5752. ],
  5753. ],
  5754. 'foreign keys' => [
  5755. 'feature' => [
  5756. 'table' => 'feature',
  5757. 'columns' => [
  5758. 'feature_id' => 'feature_id',
  5759. ],
  5760. ],
  5761. 'phenotype' => [
  5762. 'table' => 'phenotype',
  5763. 'columns' => [
  5764. 'phenotype_id' => 'phenotype_id',
  5765. ],
  5766. ],
  5767. ],
  5768. 'table' => 'feature_phenotype',
  5769. 'referring_tables' => NULL,
  5770. ];
  5771. return $description;
  5772. }
  5773. /**
  5774. * Implements hook_chado_schema_v1_2_feature_pub()
  5775. * Purpose: To describe the structure of 'feature_pub' to tripal
  5776. *
  5777. * @see chado_insert_record()
  5778. * @see chado_update_record()
  5779. * @see chado_select_record()
  5780. *
  5781. * @return
  5782. * An array describing the 'feature_pub' table
  5783. *
  5784. * @ingroup tripal_chado_v1.2_schema_api
  5785. *
  5786. */
  5787. function tripal_chado_chado_schema_v1_2_feature_pub() {
  5788. $description = [
  5789. 'description' => '',
  5790. 'fields' => [
  5791. 'feature_pub_id' => [
  5792. 'description' => '',
  5793. 'type' => 'serial',
  5794. 'not null' => TRUE,
  5795. ],
  5796. 'feature_id' => [
  5797. 'description' => '',
  5798. 'type' => 'int',
  5799. 'not null' => TRUE,
  5800. ],
  5801. 'pub_id' => [
  5802. 'description' => '',
  5803. 'type' => 'int',
  5804. 'not null' => TRUE,
  5805. ],
  5806. ],
  5807. 'primary key' => [
  5808. 0 => 'feature_pub_id',
  5809. ],
  5810. 'unique keys' => [
  5811. 'feature_pub_c1' => [
  5812. 0 => 'feature_id',
  5813. 1 => 'pub_id',
  5814. ],
  5815. ],
  5816. 'indexes' => [
  5817. 'feature_pub_idx1' => [
  5818. 0 => 'feature_id',
  5819. ],
  5820. 'feature_pub_idx2' => [
  5821. 0 => 'pub_id',
  5822. ],
  5823. ],
  5824. 'foreign keys' => [
  5825. 'pub' => [
  5826. 'table' => 'pub',
  5827. 'columns' => [
  5828. 'pub_id' => 'pub_id',
  5829. ],
  5830. ],
  5831. 'feature' => [
  5832. 'table' => 'feature',
  5833. 'columns' => [
  5834. 'feature_id' => 'feature_id',
  5835. ],
  5836. ],
  5837. ],
  5838. 'table' => 'feature_pub',
  5839. 'referring_tables' => [
  5840. 0 => 'feature_pubprop',
  5841. ],
  5842. ];
  5843. return $description;
  5844. }
  5845. /**
  5846. * Implements hook_chado_schema_v1_2_feature_pubprop()
  5847. * Purpose: To describe the structure of 'feature_pubprop' to tripal
  5848. *
  5849. * @see chado_insert_record()
  5850. * @see chado_update_record()
  5851. * @see chado_select_record()
  5852. *
  5853. * @return
  5854. * An array describing the 'feature_pubprop' table
  5855. *
  5856. * @ingroup tripal_chado_v1.2_schema_api
  5857. *
  5858. */
  5859. function tripal_chado_chado_schema_v1_2_feature_pubprop() {
  5860. $description = [
  5861. 'description' => '',
  5862. 'fields' => [
  5863. 'feature_pubprop_id' => [
  5864. 'description' => '',
  5865. 'type' => 'serial',
  5866. 'not null' => TRUE,
  5867. ],
  5868. 'feature_pub_id' => [
  5869. 'description' => '',
  5870. 'type' => 'int',
  5871. 'not null' => TRUE,
  5872. ],
  5873. 'type_id' => [
  5874. 'description' => '',
  5875. 'type' => 'int',
  5876. 'not null' => TRUE,
  5877. ],
  5878. 'value' => [
  5879. 'description' => '',
  5880. 'type' => 'text',
  5881. 'not null' => FALSE,
  5882. ],
  5883. 'rank' => [
  5884. 'description' => '',
  5885. 'type' => 'int',
  5886. 'not null' => TRUE,
  5887. 'default' => 0,
  5888. ],
  5889. ],
  5890. 'primary key' => [
  5891. 0 => 'feature_pubprop_id',
  5892. ],
  5893. 'unique keys' => [
  5894. 'feature_pubprop_c1' => [
  5895. 0 => 'feature_pub_id',
  5896. 1 => 'type_id',
  5897. 2 => 'rank',
  5898. ],
  5899. ],
  5900. 'indexes' => [
  5901. 'feature_pubprop_idx1' => [
  5902. 0 => 'feature_pub_id',
  5903. ],
  5904. ],
  5905. 'foreign keys' => [
  5906. 'cvterm' => [
  5907. 'table' => 'cvterm',
  5908. 'columns' => [
  5909. 'type_id' => 'cvterm_id',
  5910. ],
  5911. ],
  5912. 'feature_pub' => [
  5913. 'table' => 'feature_pub',
  5914. 'columns' => [
  5915. 'feature_pub_id' => 'feature_pub_id',
  5916. ],
  5917. ],
  5918. ],
  5919. 'table' => 'feature_pubprop',
  5920. 'referring_tables' => NULL,
  5921. ];
  5922. return $description;
  5923. }
  5924. /**
  5925. * Implements hook_chado_schema_v1_2_feature_relationship()
  5926. * Purpose: To describe the structure of 'feature_relationship' to tripal
  5927. *
  5928. * @see chado_insert_record()
  5929. * @see chado_update_record()
  5930. * @see chado_select_record()
  5931. *
  5932. * @return
  5933. * An array describing the 'feature_relationship' table
  5934. *
  5935. * @ingroup tripal_chado_v1.2_schema_api
  5936. *
  5937. */
  5938. function tripal_chado_chado_schema_v1_2_feature_relationship() {
  5939. $description = [
  5940. 'description' => '',
  5941. 'fields' => [
  5942. 'feature_relationship_id' => [
  5943. 'description' => '',
  5944. 'type' => 'serial',
  5945. 'not null' => TRUE,
  5946. ],
  5947. 'subject_id' => [
  5948. 'description' => '',
  5949. 'type' => 'int',
  5950. 'not null' => TRUE,
  5951. ],
  5952. 'object_id' => [
  5953. 'description' => '',
  5954. 'type' => 'int',
  5955. 'not null' => TRUE,
  5956. ],
  5957. 'type_id' => [
  5958. 'description' => '',
  5959. 'type' => 'int',
  5960. 'not null' => TRUE,
  5961. ],
  5962. 'value' => [
  5963. 'description' => '',
  5964. 'type' => 'text',
  5965. 'not null' => FALSE,
  5966. ],
  5967. 'rank' => [
  5968. 'description' => '',
  5969. 'type' => 'int',
  5970. 'not null' => TRUE,
  5971. 'default' => 0,
  5972. ],
  5973. ],
  5974. 'primary key' => [
  5975. 0 => 'feature_relationship_id',
  5976. ],
  5977. 'unique keys' => [
  5978. 'feature_relationship_c1' => [
  5979. 0 => 'subject_id',
  5980. 1 => 'object_id',
  5981. 2 => 'type_id',
  5982. 3 => 'rank',
  5983. ],
  5984. ],
  5985. 'indexes' => [
  5986. 'feature_relationship_idx1' => [
  5987. 0 => 'subject_id',
  5988. ],
  5989. 'feature_relationship_idx2' => [
  5990. 0 => 'object_id',
  5991. ],
  5992. 'feature_relationship_idx3' => [
  5993. 0 => 'type_id',
  5994. ],
  5995. ],
  5996. 'foreign keys' => [
  5997. 'cvterm' => [
  5998. 'table' => 'cvterm',
  5999. 'columns' => [
  6000. 'type_id' => 'cvterm_id',
  6001. ],
  6002. ],
  6003. 'feature' => [
  6004. 'table' => 'feature',
  6005. 'columns' => [
  6006. 'subject_id' => 'feature_id',
  6007. 'object_id' => 'feature_id',
  6008. ],
  6009. ],
  6010. ],
  6011. 'table' => 'feature_relationship',
  6012. 'referring_tables' => [
  6013. 0 => 'feature_relationship_pub',
  6014. 1 => 'feature_relationshipprop',
  6015. ],
  6016. ];
  6017. return $description;
  6018. }
  6019. /**
  6020. * Implements hook_chado_schema_v1_2_feature_relationship_pub()
  6021. * Purpose: To describe the structure of 'feature_relationship_pub' to tripal
  6022. *
  6023. * @see chado_insert_record()
  6024. * @see chado_update_record()
  6025. * @see chado_select_record()
  6026. *
  6027. * @return
  6028. * An array describing the 'feature_relationship_pub' table
  6029. *
  6030. * @ingroup tripal_chado_v1.2_schema_api
  6031. *
  6032. */
  6033. function tripal_chado_chado_schema_v1_2_feature_relationship_pub() {
  6034. $description = [
  6035. 'description' => '',
  6036. 'fields' => [
  6037. 'feature_relationship_pub_id' => [
  6038. 'description' => '',
  6039. 'type' => 'serial',
  6040. 'not null' => TRUE,
  6041. ],
  6042. 'feature_relationship_id' => [
  6043. 'description' => '',
  6044. 'type' => 'int',
  6045. 'not null' => TRUE,
  6046. ],
  6047. 'pub_id' => [
  6048. 'description' => '',
  6049. 'type' => 'int',
  6050. 'not null' => TRUE,
  6051. ],
  6052. ],
  6053. 'primary key' => [
  6054. 0 => 'feature_relationship_pub_id',
  6055. ],
  6056. 'unique keys' => [
  6057. 'feature_relationship_pub_c1' => [
  6058. 0 => 'feature_relationship_id',
  6059. 1 => 'pub_id',
  6060. ],
  6061. ],
  6062. 'indexes' => [
  6063. 'feature_relationship_pub_idx1' => [
  6064. 0 => 'feature_relationship_id',
  6065. ],
  6066. 'feature_relationship_pub_idx2' => [
  6067. 0 => 'pub_id',
  6068. ],
  6069. ],
  6070. 'foreign keys' => [
  6071. 'feature_relationship' => [
  6072. 'table' => 'feature_relationship',
  6073. 'columns' => [
  6074. 'feature_relationship_id' => 'feature_relationship_id',
  6075. ],
  6076. ],
  6077. 'pub' => [
  6078. 'table' => 'pub',
  6079. 'columns' => [
  6080. 'pub_id' => 'pub_id',
  6081. ],
  6082. ],
  6083. ],
  6084. 'table' => 'feature_relationship_pub',
  6085. 'referring_tables' => NULL,
  6086. ];
  6087. return $description;
  6088. }
  6089. /**
  6090. * Implements hook_chado_schema_v1_2_feature_relationshipprop()
  6091. * Purpose: To describe the structure of 'feature_relationshipprop' to tripal
  6092. *
  6093. * @see chado_insert_record()
  6094. * @see chado_update_record()
  6095. * @see chado_select_record()
  6096. *
  6097. * @return
  6098. * An array describing the 'feature_relationshipprop' table
  6099. *
  6100. * @ingroup tripal_chado_v1.2_schema_api
  6101. *
  6102. */
  6103. function tripal_chado_chado_schema_v1_2_feature_relationshipprop() {
  6104. $description = [
  6105. 'description' => '',
  6106. 'fields' => [
  6107. 'feature_relationshipprop_id' => [
  6108. 'description' => '',
  6109. 'type' => 'serial',
  6110. 'not null' => TRUE,
  6111. ],
  6112. 'feature_relationship_id' => [
  6113. 'description' => '',
  6114. 'type' => 'int',
  6115. 'not null' => TRUE,
  6116. ],
  6117. 'type_id' => [
  6118. 'description' => '',
  6119. 'type' => 'int',
  6120. 'not null' => TRUE,
  6121. ],
  6122. 'value' => [
  6123. 'description' => '',
  6124. 'type' => 'text',
  6125. 'not null' => FALSE,
  6126. ],
  6127. 'rank' => [
  6128. 'description' => '',
  6129. 'type' => 'int',
  6130. 'not null' => TRUE,
  6131. 'default' => 0,
  6132. ],
  6133. ],
  6134. 'primary key' => [
  6135. 0 => 'feature_relationshipprop_id',
  6136. ],
  6137. 'unique keys' => [
  6138. 'feature_relationshipprop_c1' => [
  6139. 0 => 'feature_relationship_id',
  6140. 1 => 'type_id',
  6141. 2 => 'rank',
  6142. ],
  6143. ],
  6144. 'indexes' => [
  6145. 'feature_relationshipprop_idx1' => [
  6146. 0 => 'feature_relationship_id',
  6147. ],
  6148. 'feature_relationshipprop_idx2' => [
  6149. 0 => 'type_id',
  6150. ],
  6151. ],
  6152. 'foreign keys' => [
  6153. 'cvterm' => [
  6154. 'table' => 'cvterm',
  6155. 'columns' => [
  6156. 'type_id' => 'cvterm_id',
  6157. ],
  6158. ],
  6159. 'feature_relationship' => [
  6160. 'table' => 'feature_relationship',
  6161. 'columns' => [
  6162. 'feature_relationship_id' => 'feature_relationship_id',
  6163. ],
  6164. ],
  6165. ],
  6166. 'table' => 'feature_relationshipprop',
  6167. 'referring_tables' => [
  6168. 0 => 'feature_relationshipprop_pub',
  6169. ],
  6170. ];
  6171. return $description;
  6172. }
  6173. /**
  6174. * Implements hook_chado_schema_v1_2_feature_relationshipprop_pub()
  6175. * Purpose: To describe the structure of 'feature_relationshipprop_pub' to
  6176. * tripal
  6177. *
  6178. * @see chado_insert_record()
  6179. * @see chado_update_record()
  6180. * @see chado_select_record()
  6181. *
  6182. * @return
  6183. * An array describing the 'feature_relationshipprop_pub' table
  6184. *
  6185. * @ingroup tripal_chado_v1.2_schema_api
  6186. *
  6187. */
  6188. function tripal_chado_chado_schema_v1_2_feature_relationshipprop_pub() {
  6189. $description = [
  6190. 'description' => '',
  6191. 'fields' => [
  6192. 'feature_relationshipprop_pub_id' => [
  6193. 'description' => '',
  6194. 'type' => 'serial',
  6195. 'not null' => TRUE,
  6196. ],
  6197. 'feature_relationshipprop_id' => [
  6198. 'description' => '',
  6199. 'type' => 'int',
  6200. 'not null' => TRUE,
  6201. ],
  6202. 'pub_id' => [
  6203. 'description' => '',
  6204. 'type' => 'int',
  6205. 'not null' => TRUE,
  6206. ],
  6207. ],
  6208. 'primary key' => [
  6209. 0 => 'feature_relationshipprop_pub_id',
  6210. ],
  6211. 'unique keys' => [
  6212. 'feature_relationshipprop_pub_c1' => [
  6213. 0 => 'feature_relationshipprop_id',
  6214. 1 => 'pub_id',
  6215. ],
  6216. ],
  6217. 'indexes' => [
  6218. 'feature_relationshipprop_pub_idx1' => [
  6219. 0 => 'feature_relationshipprop_id',
  6220. ],
  6221. 'feature_relationshipprop_pub_idx2' => [
  6222. 0 => 'pub_id',
  6223. ],
  6224. ],
  6225. 'foreign keys' => [
  6226. 'feature_relationshipprop' => [
  6227. 'table' => 'feature_relationshipprop',
  6228. 'columns' => [
  6229. 'feature_relationshipprop_id' => 'feature_relationshipprop_id',
  6230. ],
  6231. ],
  6232. 'pub' => [
  6233. 'table' => 'pub',
  6234. 'columns' => [
  6235. 'pub_id' => 'pub_id',
  6236. ],
  6237. ],
  6238. ],
  6239. 'table' => 'feature_relationshipprop_pub',
  6240. 'referring_tables' => NULL,
  6241. ];
  6242. return $description;
  6243. }
  6244. /**
  6245. * Implements hook_chado_schema_v1_2_feature_synonym()
  6246. * Purpose: To describe the structure of 'feature_synonym' to tripal
  6247. *
  6248. * @see chado_insert_record()
  6249. * @see chado_update_record()
  6250. * @see chado_select_record()
  6251. *
  6252. * @return
  6253. * An array describing the 'feature_synonym' table
  6254. *
  6255. * @ingroup tripal_chado_v1.2_schema_api
  6256. *
  6257. */
  6258. function tripal_chado_chado_schema_v1_2_feature_synonym() {
  6259. $description = [
  6260. 'description' => '',
  6261. 'fields' => [
  6262. 'feature_synonym_id' => [
  6263. 'description' => '',
  6264. 'type' => 'serial',
  6265. 'not null' => TRUE,
  6266. ],
  6267. 'synonym_id' => [
  6268. 'description' => '',
  6269. 'type' => 'int',
  6270. 'not null' => TRUE,
  6271. ],
  6272. 'feature_id' => [
  6273. 'description' => '',
  6274. 'type' => 'int',
  6275. 'not null' => TRUE,
  6276. ],
  6277. 'pub_id' => [
  6278. 'description' => '',
  6279. 'type' => 'int',
  6280. 'not null' => TRUE,
  6281. ],
  6282. 'is_current' => [
  6283. 'description' => '',
  6284. 'type' => 'boolean',
  6285. 'not null' => TRUE,
  6286. 'default' => 'false',
  6287. ],
  6288. 'is_internal' => [
  6289. 'description' => '',
  6290. 'type' => 'boolean',
  6291. 'not null' => TRUE,
  6292. 'default' => 'false',
  6293. ],
  6294. ],
  6295. 'primary key' => [
  6296. 0 => 'feature_synonym_id',
  6297. ],
  6298. 'unique keys' => [
  6299. 'feature_synonym_c1' => [
  6300. 0 => 'synonym_id',
  6301. 1 => 'feature_id',
  6302. 2 => 'pub_id',
  6303. ],
  6304. ],
  6305. 'indexes' => [
  6306. 'feature_synonym_idx1' => [
  6307. 0 => 'synonym_id',
  6308. ],
  6309. 'feature_synonym_idx2' => [
  6310. 0 => 'feature_id',
  6311. ],
  6312. 'feature_synonym_idx3' => [
  6313. 0 => 'pub_id',
  6314. ],
  6315. ],
  6316. 'foreign keys' => [
  6317. 'pub' => [
  6318. 'table' => 'pub',
  6319. 'columns' => [
  6320. 'pub_id' => 'pub_id',
  6321. ],
  6322. ],
  6323. 'feature' => [
  6324. 'table' => 'feature',
  6325. 'columns' => [
  6326. 'feature_id' => 'feature_id',
  6327. ],
  6328. ],
  6329. 'synonym' => [
  6330. 'table' => 'synonym',
  6331. 'columns' => [
  6332. 'synonym_id' => 'synonym_id',
  6333. ],
  6334. ],
  6335. ],
  6336. 'table' => 'feature_synonym',
  6337. 'referring_tables' => NULL,
  6338. ];
  6339. return $description;
  6340. }
  6341. /**
  6342. * Implements hook_chado_schema_v1_2_featureloc()
  6343. * Purpose: To describe the structure of 'featureloc' to tripal
  6344. *
  6345. * @see chado_insert_record()
  6346. * @see chado_update_record()
  6347. * @see chado_select_record()
  6348. *
  6349. * @return
  6350. * An array describing the 'featureloc' table
  6351. *
  6352. * @ingroup tripal_chado_v1.2_schema_api
  6353. *
  6354. */
  6355. function tripal_chado_chado_schema_v1_2_featureloc() {
  6356. $description = [
  6357. 'description' => '',
  6358. 'fields' => [
  6359. 'featureloc_id' => [
  6360. 'description' => '',
  6361. 'type' => 'serial',
  6362. 'not null' => TRUE,
  6363. ],
  6364. 'feature_id' => [
  6365. 'description' => '',
  6366. 'type' => 'int',
  6367. 'not null' => TRUE,
  6368. ],
  6369. 'srcfeature_id' => [
  6370. 'description' => '',
  6371. 'type' => 'int',
  6372. 'not null' => FALSE,
  6373. ],
  6374. 'fmin' => [
  6375. 'description' => '',
  6376. 'type' => 'int',
  6377. 'not null' => FALSE,
  6378. ],
  6379. 'is_fmin_partial' => [
  6380. 'description' => '',
  6381. 'type' => 'boolean',
  6382. 'not null' => TRUE,
  6383. 'default' => 'false',
  6384. ],
  6385. 'fmax' => [
  6386. 'description' => '',
  6387. 'type' => 'int',
  6388. 'not null' => FALSE,
  6389. ],
  6390. 'is_fmax_partial' => [
  6391. 'description' => '',
  6392. 'type' => 'boolean',
  6393. 'not null' => TRUE,
  6394. 'default' => 'false',
  6395. ],
  6396. 'strand' => [
  6397. 'description' => '',
  6398. 'type' => 'int',
  6399. 'size' => 'small',
  6400. 'not null' => FALSE,
  6401. ],
  6402. 'phase' => [
  6403. 'description' => '',
  6404. 'type' => 'int',
  6405. 'not null' => FALSE,
  6406. ],
  6407. 'residue_info' => [
  6408. 'description' => '',
  6409. 'type' => 'text',
  6410. 'not null' => FALSE,
  6411. ],
  6412. 'locgroup' => [
  6413. 'description' => '',
  6414. 'type' => 'int',
  6415. 'not null' => TRUE,
  6416. 'default' => 0,
  6417. ],
  6418. 'rank' => [
  6419. 'description' => '',
  6420. 'type' => 'int',
  6421. 'not null' => TRUE,
  6422. 'default' => 0,
  6423. ],
  6424. ],
  6425. 'primary key' => [
  6426. 0 => 'featureloc_id',
  6427. ],
  6428. 'unique keys' => [
  6429. 'featureloc_c1' => [
  6430. 0 => 'feature_id',
  6431. 1 => 'locgroup',
  6432. 2 => 'rank',
  6433. ],
  6434. ],
  6435. 'indexes' => [
  6436. 'binloc_boxrange' => [
  6437. 0 => 'fmin',
  6438. ],
  6439. 'binloc_boxrange_src' => [
  6440. 0 => 'srcfeature_id',
  6441. 1 => 'fmin',
  6442. ],
  6443. 'featureloc_idx1' => [
  6444. 0 => 'feature_id',
  6445. ],
  6446. 'featureloc_idx2' => [
  6447. 0 => 'srcfeature_id',
  6448. ],
  6449. 'featureloc_idx3' => [
  6450. 0 => 'srcfeature_id',
  6451. 1 => 'fmin',
  6452. 2 => 'fmax',
  6453. ],
  6454. ],
  6455. 'foreign keys' => [
  6456. 'feature' => [
  6457. 'table' => 'feature',
  6458. 'columns' => [
  6459. 'feature_id' => 'feature_id',
  6460. 'srcfeature_id' => 'feature_id',
  6461. ],
  6462. ],
  6463. ],
  6464. 'referring_tables' => [
  6465. 0 => 'featureloc_pub',
  6466. ],
  6467. 'table' => 'featureloc',
  6468. ];
  6469. return $description;
  6470. }
  6471. /**
  6472. * Implements hook_chado_schema_v1_2_featureloc_pub()
  6473. * Purpose: To describe the structure of 'featureloc_pub' to tripal
  6474. *
  6475. * @see chado_insert_record()
  6476. * @see chado_update_record()
  6477. * @see chado_select_record()
  6478. *
  6479. * @return
  6480. * An array describing the 'featureloc_pub' table
  6481. *
  6482. * @ingroup tripal_chado_v1.2_schema_api
  6483. *
  6484. */
  6485. function tripal_chado_chado_schema_v1_2_featureloc_pub() {
  6486. $description = [
  6487. 'description' => '',
  6488. 'fields' => [
  6489. 'featureloc_pub_id' => [
  6490. 'description' => '',
  6491. 'type' => 'serial',
  6492. 'not null' => TRUE,
  6493. ],
  6494. 'featureloc_id' => [
  6495. 'description' => '',
  6496. 'type' => 'int',
  6497. 'not null' => TRUE,
  6498. ],
  6499. 'pub_id' => [
  6500. 'description' => '',
  6501. 'type' => 'int',
  6502. 'not null' => TRUE,
  6503. ],
  6504. ],
  6505. 'primary key' => [
  6506. 0 => 'featureloc_pub_id',
  6507. ],
  6508. 'unique keys' => [
  6509. 'featureloc_pub_c1' => [
  6510. 0 => 'featureloc_id',
  6511. 1 => 'pub_id',
  6512. ],
  6513. ],
  6514. 'indexes' => [
  6515. 'featureloc_pub_idx1' => [
  6516. 0 => 'featureloc_id',
  6517. ],
  6518. 'featureloc_pub_idx2' => [
  6519. 0 => 'pub_id',
  6520. ],
  6521. ],
  6522. 'foreign keys' => [
  6523. 'featureloc' => [
  6524. 'table' => 'featureloc',
  6525. 'columns' => [
  6526. 'featureloc_id' => 'featureloc_id',
  6527. ],
  6528. ],
  6529. 'pub' => [
  6530. 'table' => 'pub',
  6531. 'columns' => [
  6532. 'pub_id' => 'pub_id',
  6533. ],
  6534. ],
  6535. ],
  6536. 'table' => 'featureloc_pub',
  6537. 'referring_tables' => NULL,
  6538. ];
  6539. return $description;
  6540. }
  6541. /**
  6542. * Implements hook_chado_schema_v1_2_featuremap()
  6543. * Purpose: To describe the structure of 'featuremap' to tripal
  6544. *
  6545. * @see chado_insert_record()
  6546. * @see chado_update_record()
  6547. * @see chado_select_record()
  6548. *
  6549. * @return
  6550. * An array describing the 'featuremap' table
  6551. *
  6552. * @ingroup tripal_chado_v1.2_schema_api
  6553. *
  6554. */
  6555. function tripal_chado_chado_schema_v1_2_featuremap() {
  6556. $description = [
  6557. 'description' => '',
  6558. 'fields' => [
  6559. 'featuremap_id' => [
  6560. 'description' => '',
  6561. 'type' => 'serial',
  6562. 'not null' => TRUE,
  6563. ],
  6564. 'name' => [
  6565. 'description' => '',
  6566. 'type' => 'varchar',
  6567. 'length' => '255',
  6568. 'not null' => FALSE,
  6569. ],
  6570. 'description' => [
  6571. 'description' => '',
  6572. 'type' => 'text',
  6573. 'not null' => FALSE,
  6574. ],
  6575. 'unittype_id' => [
  6576. 'description' => '',
  6577. 'type' => 'int',
  6578. 'not null' => FALSE,
  6579. ],
  6580. ],
  6581. 'primary key' => [
  6582. 0 => 'featuremap_id',
  6583. ],
  6584. 'unique keys' => [
  6585. 'featuremap_c1' => [
  6586. 0 => 'name',
  6587. ],
  6588. ],
  6589. 'foreign keys' => [
  6590. 'cvterm' => [
  6591. 'table' => 'cvterm',
  6592. 'columns' => [
  6593. 'unittype_id' => 'cvterm_id',
  6594. ],
  6595. ],
  6596. ],
  6597. 'table' => 'featuremap',
  6598. 'referring_tables' => [
  6599. 0 => 'featuremap_pub',
  6600. 1 => 'featurepos',
  6601. 2 => 'featurerange',
  6602. ],
  6603. ];
  6604. return $description;
  6605. }
  6606. /**
  6607. * Implements hook_chado_schema_v1_2_featuremap_pub()
  6608. * Purpose: To describe the structure of 'featuremap_pub' to tripal
  6609. *
  6610. * @see chado_insert_record()
  6611. * @see chado_update_record()
  6612. * @see chado_select_record()
  6613. *
  6614. * @return
  6615. * An array describing the 'featuremap_pub' table
  6616. *
  6617. * @ingroup tripal_chado_v1.2_schema_api
  6618. *
  6619. */
  6620. function tripal_chado_chado_schema_v1_2_featuremap_pub() {
  6621. $description = [
  6622. 'description' => '',
  6623. 'fields' => [
  6624. 'featuremap_pub_id' => [
  6625. 'description' => '',
  6626. 'type' => 'serial',
  6627. 'not null' => TRUE,
  6628. ],
  6629. 'featuremap_id' => [
  6630. 'description' => '',
  6631. 'type' => 'int',
  6632. 'not null' => TRUE,
  6633. ],
  6634. 'pub_id' => [
  6635. 'description' => '',
  6636. 'type' => 'int',
  6637. 'not null' => TRUE,
  6638. ],
  6639. ],
  6640. 'primary key' => [
  6641. 0 => 'featuremap_pub_id',
  6642. ],
  6643. 'unique keys' => [],
  6644. 'indexes' => [
  6645. 'featuremap_pub_idx1' => [
  6646. 0 => 'featuremap_id',
  6647. ],
  6648. 'featuremap_pub_idx2' => [
  6649. 0 => 'pub_id',
  6650. ],
  6651. ],
  6652. 'foreign keys' => [
  6653. 'pub' => [
  6654. 'table' => 'pub',
  6655. 'columns' => [
  6656. 'pub_id' => 'pub_id',
  6657. ],
  6658. ],
  6659. 'featuremap' => [
  6660. 'table' => 'featuremap',
  6661. 'columns' => [
  6662. 'featuremap_id' => 'featuremap_id',
  6663. ],
  6664. ],
  6665. ],
  6666. 'table' => 'featuremap_pub',
  6667. 'referring_tables' => NULL,
  6668. ];
  6669. return $description;
  6670. }
  6671. /**
  6672. * Implements hook_chado_schema_v1_2_featurepos()
  6673. * Purpose: To describe the structure of 'featurepos' to tripal
  6674. *
  6675. * @see chado_insert_record()
  6676. * @see chado_update_record()
  6677. * @see chado_select_record()
  6678. *
  6679. * @return
  6680. * An array describing the 'featurepos' table
  6681. *
  6682. * @ingroup tripal_chado_v1.2_schema_api
  6683. *
  6684. */
  6685. function tripal_chado_chado_schema_v1_2_featurepos() {
  6686. $description = [
  6687. 'description' => '',
  6688. 'fields' => [
  6689. 'featurepos_id' => [
  6690. 'description' => '',
  6691. 'type' => 'serial',
  6692. 'not null' => TRUE,
  6693. ],
  6694. 'featuremap_id' => [
  6695. 'description' => '',
  6696. 'type' => 'serial',
  6697. 'not null' => TRUE,
  6698. ],
  6699. 'feature_id' => [
  6700. 'description' => '',
  6701. 'type' => 'int',
  6702. 'not null' => TRUE,
  6703. ],
  6704. 'map_feature_id' => [
  6705. 'description' => '',
  6706. 'type' => 'int',
  6707. 'not null' => TRUE,
  6708. ],
  6709. 'mappos' => [
  6710. 'description' => '',
  6711. 'type' => 'float',
  6712. 'size' => 'big',
  6713. 'not null' => TRUE,
  6714. ],
  6715. ],
  6716. 'primary key' => [
  6717. 0 => 'featurepos_id',
  6718. ],
  6719. 'unique keys' => [],
  6720. 'indexes' => [
  6721. 'featurepos_idx1' => [
  6722. 0 => 'featuremap_id',
  6723. ],
  6724. 'featurepos_idx2' => [
  6725. 0 => 'feature_id',
  6726. ],
  6727. 'featurepos_idx3' => [
  6728. 0 => 'map_feature_id',
  6729. ],
  6730. ],
  6731. 'foreign keys' => [
  6732. 'feature' => [
  6733. 'table' => 'feature',
  6734. 'columns' => [
  6735. 'feature_id' => 'feature_id',
  6736. 'map_feature_id' => 'feature_id',
  6737. ],
  6738. ],
  6739. 'featuremap' => [
  6740. 'table' => 'featuremap',
  6741. 'columns' => [
  6742. 'featuremap_id' => 'featuremap_id',
  6743. ],
  6744. ],
  6745. ],
  6746. 'table' => 'featurepos',
  6747. 'referring_tables' => NULL,
  6748. ];
  6749. return $description;
  6750. }
  6751. /**
  6752. * Implements hook_chado_schema_v1_2_featureprop()
  6753. * Purpose: To describe the structure of 'featureprop' to tripal
  6754. *
  6755. * @see chado_insert_record()
  6756. * @see chado_update_record()
  6757. * @see chado_select_record()
  6758. *
  6759. * @return
  6760. * An array describing the 'featureprop' table
  6761. *
  6762. * @ingroup tripal_chado_v1.2_schema_api
  6763. *
  6764. */
  6765. function tripal_chado_chado_schema_v1_2_featureprop() {
  6766. $description = [
  6767. 'description' => '',
  6768. 'fields' => [
  6769. 'featureprop_id' => [
  6770. 'description' => '',
  6771. 'type' => 'serial',
  6772. 'not null' => TRUE,
  6773. ],
  6774. 'feature_id' => [
  6775. 'description' => '',
  6776. 'type' => 'int',
  6777. 'not null' => TRUE,
  6778. ],
  6779. 'type_id' => [
  6780. 'description' => '',
  6781. 'type' => 'int',
  6782. 'not null' => TRUE,
  6783. ],
  6784. 'value' => [
  6785. 'description' => '',
  6786. 'type' => 'text',
  6787. 'not null' => FALSE,
  6788. ],
  6789. 'rank' => [
  6790. 'description' => '',
  6791. 'type' => 'int',
  6792. 'not null' => TRUE,
  6793. 'default' => 0,
  6794. ],
  6795. ],
  6796. 'primary key' => [
  6797. 0 => 'featureprop_id',
  6798. ],
  6799. 'unique keys' => [
  6800. 'featureprop_c1' => [
  6801. 0 => 'feature_id',
  6802. 1 => 'type_id',
  6803. 2 => 'rank',
  6804. ],
  6805. ],
  6806. 'indexes' => [
  6807. 'featureprop_idx1' => [
  6808. 0 => 'feature_id',
  6809. ],
  6810. 'featureprop_idx2' => [
  6811. 0 => 'type_id',
  6812. ],
  6813. ],
  6814. 'foreign keys' => [
  6815. 'cvterm' => [
  6816. 'table' => 'cvterm',
  6817. 'columns' => [
  6818. 'type_id' => 'cvterm_id',
  6819. ],
  6820. ],
  6821. 'feature' => [
  6822. 'table' => 'feature',
  6823. 'columns' => [
  6824. 'feature_id' => 'feature_id',
  6825. ],
  6826. ],
  6827. ],
  6828. 'table' => 'featureprop',
  6829. 'referring_tables' => [
  6830. 0 => 'featureprop_pub',
  6831. ],
  6832. ];
  6833. return $description;
  6834. }
  6835. /**
  6836. * Implements hook_chado_schema_v1_2_featureprop_pub()
  6837. * Purpose: To describe the structure of 'featureprop_pub' to tripal
  6838. *
  6839. * @see chado_insert_record()
  6840. * @see chado_update_record()
  6841. * @see chado_select_record()
  6842. *
  6843. * @return
  6844. * An array describing the 'featureprop_pub' table
  6845. *
  6846. * @ingroup tripal_chado_v1.2_schema_api
  6847. *
  6848. */
  6849. function tripal_chado_chado_schema_v1_2_featureprop_pub() {
  6850. $description = [
  6851. 'description' => '',
  6852. 'fields' => [
  6853. 'featureprop_pub_id' => [
  6854. 'description' => '',
  6855. 'type' => 'serial',
  6856. 'not null' => TRUE,
  6857. ],
  6858. 'featureprop_id' => [
  6859. 'description' => '',
  6860. 'type' => 'int',
  6861. 'not null' => TRUE,
  6862. ],
  6863. 'pub_id' => [
  6864. 'description' => '',
  6865. 'type' => 'int',
  6866. 'not null' => TRUE,
  6867. ],
  6868. ],
  6869. 'primary key' => [
  6870. 0 => 'featureprop_pub_id',
  6871. ],
  6872. 'unique keys' => [
  6873. 'featureprop_pub_c1' => [
  6874. 0 => 'featureprop_id',
  6875. 1 => 'pub_id',
  6876. ],
  6877. ],
  6878. 'indexes' => [
  6879. 'featureprop_pub_idx1' => [
  6880. 0 => 'featureprop_id',
  6881. ],
  6882. 'featureprop_pub_idx2' => [
  6883. 0 => 'pub_id',
  6884. ],
  6885. ],
  6886. 'foreign keys' => [
  6887. 'featureprop' => [
  6888. 'table' => 'featureprop',
  6889. 'columns' => [
  6890. 'featureprop_id' => 'featureprop_id',
  6891. ],
  6892. ],
  6893. 'pub' => [
  6894. 'table' => 'pub',
  6895. 'columns' => [
  6896. 'pub_id' => 'pub_id',
  6897. ],
  6898. ],
  6899. ],
  6900. 'table' => 'featureprop_pub',
  6901. 'referring_tables' => NULL,
  6902. ];
  6903. return $description;
  6904. }
  6905. /**
  6906. * Implements hook_chado_schema_v1_2_featurerange()
  6907. * Purpose: To describe the structure of 'featurerange' to tripal
  6908. *
  6909. * @see chado_insert_record()
  6910. * @see chado_update_record()
  6911. * @see chado_select_record()
  6912. *
  6913. * @return
  6914. * An array describing the 'featurerange' table
  6915. *
  6916. * @ingroup tripal_chado_v1.2_schema_api
  6917. *
  6918. */
  6919. function tripal_chado_chado_schema_v1_2_featurerange() {
  6920. $description = [
  6921. 'description' => '',
  6922. 'fields' => [
  6923. 'featurerange_id' => [
  6924. 'description' => '',
  6925. 'type' => 'serial',
  6926. 'not null' => TRUE,
  6927. ],
  6928. 'featuremap_id' => [
  6929. 'description' => '',
  6930. 'type' => 'int',
  6931. 'not null' => TRUE,
  6932. ],
  6933. 'feature_id' => [
  6934. 'description' => '',
  6935. 'type' => 'int',
  6936. 'not null' => TRUE,
  6937. ],
  6938. 'leftstartf_id' => [
  6939. 'description' => '',
  6940. 'type' => 'int',
  6941. 'not null' => TRUE,
  6942. ],
  6943. 'leftendf_id' => [
  6944. 'description' => '',
  6945. 'type' => 'int',
  6946. 'not null' => FALSE,
  6947. ],
  6948. 'rightstartf_id' => [
  6949. 'description' => '',
  6950. 'type' => 'int',
  6951. 'not null' => FALSE,
  6952. ],
  6953. 'rightendf_id' => [
  6954. 'description' => '',
  6955. 'type' => 'int',
  6956. 'not null' => TRUE,
  6957. ],
  6958. 'rangestr' => [
  6959. 'description' => '',
  6960. 'type' => 'varchar',
  6961. 'length' => '255',
  6962. 'not null' => FALSE,
  6963. ],
  6964. ],
  6965. 'primary key' => [
  6966. 0 => 'featurerange_id',
  6967. ],
  6968. 'unique keys' => [],
  6969. 'indexes' => [
  6970. 'featurerange_idx1' => [
  6971. 0 => 'featuremap_id',
  6972. ],
  6973. 'featurerange_idx2' => [
  6974. 0 => 'feature_id',
  6975. ],
  6976. 'featurerange_idx3' => [
  6977. 0 => 'leftstartf_id',
  6978. ],
  6979. 'featurerange_idx4' => [
  6980. 0 => 'leftendf_id',
  6981. ],
  6982. 'featurerange_idx5' => [
  6983. 0 => 'rightstartf_id',
  6984. ],
  6985. 'featurerange_idx6' => [
  6986. 0 => 'rightendf_id',
  6987. ],
  6988. ],
  6989. 'foreign keys' => [
  6990. 'feature' => [
  6991. 'table' => 'feature',
  6992. 'columns' => [
  6993. 'feature_id' => 'feature_id',
  6994. 'leftstartf_id' => 'feature_id',
  6995. 'leftendf_id' => 'feature_id',
  6996. 'rightstartf_id' => 'feature_id',
  6997. 'rightendf_id' => 'feature_id',
  6998. ],
  6999. ],
  7000. 'featuremap' => [
  7001. 'table' => 'featuremap',
  7002. 'columns' => [
  7003. 'featuremap_id' => 'featuremap_id',
  7004. ],
  7005. ],
  7006. ],
  7007. 'table' => 'featurerange',
  7008. 'referring_tables' => NULL,
  7009. ];
  7010. return $description;
  7011. }
  7012. /**
  7013. * Implements hook_chado_schema_v1_2_genotype()
  7014. * Purpose: To describe the structure of 'genotype' to tripal
  7015. *
  7016. * @see chado_insert_record()
  7017. * @see chado_update_record()
  7018. * @see chado_select_record()
  7019. *
  7020. * @return
  7021. * An array describing the 'genotype' table
  7022. *
  7023. * @ingroup tripal_chado_v1.2_schema_api
  7024. *
  7025. */
  7026. function tripal_chado_chado_schema_v1_2_genotype() {
  7027. $description = [
  7028. 'description' => '',
  7029. 'fields' => [
  7030. 'genotype_id' => [
  7031. 'description' => '',
  7032. 'type' => 'serial',
  7033. 'not null' => TRUE,
  7034. ],
  7035. 'name' => [
  7036. 'description' => '',
  7037. 'type' => 'text',
  7038. 'not null' => FALSE,
  7039. ],
  7040. 'uniquename' => [
  7041. 'description' => '',
  7042. 'type' => 'text',
  7043. 'not null' => TRUE,
  7044. ],
  7045. 'description' => [
  7046. 'description' => '',
  7047. 'type' => 'varchar',
  7048. 'length' => '255',
  7049. 'not null' => FALSE,
  7050. ],
  7051. 'type_id' => [
  7052. 'description' => '',
  7053. 'type' => 'int',
  7054. 'not null' => TRUE,
  7055. ],
  7056. ],
  7057. 'primary key' => [
  7058. 0 => 'genotype_id',
  7059. ],
  7060. 'unique keys' => [
  7061. 'genotype_c1' => [
  7062. 0 => 'uniquename',
  7063. ],
  7064. ],
  7065. 'indexes' => [
  7066. 'genotype_idx1' => [
  7067. 0 => 'uniquename',
  7068. ],
  7069. 'genotype_idx2' => [
  7070. 0 => 'name',
  7071. ],
  7072. ],
  7073. 'foreign keys' => [
  7074. 'cvterm' => [
  7075. 'table' => 'cvterm',
  7076. 'columns' => [
  7077. 'type_id' => 'cvterm_id',
  7078. ],
  7079. ],
  7080. ],
  7081. 'table' => 'genotype',
  7082. 'referring_tables' => [
  7083. 0 => 'feature_genotype',
  7084. 1 => 'genotypeprop',
  7085. 9 => 'nd_experiment_genotype',
  7086. 10 => 'phendesc',
  7087. 11 => 'phenotype_comparison',
  7088. 13 => 'phenstatement',
  7089. 14 => 'stock_genotype',
  7090. ],
  7091. ];
  7092. return $description;
  7093. }
  7094. /**
  7095. * Implements hook_chado_schema_v1_2_genotypeprop()
  7096. * Purpose: To describe the structure of 'genotypeprop' to tripal
  7097. *
  7098. * @see chado_insert_record()
  7099. * @see chado_update_record()
  7100. * @see chado_select_record()
  7101. *
  7102. * @return
  7103. * An array describing the 'genotypeprop' table
  7104. *
  7105. * @ingroup tripal_chado_v1.2_schema_api
  7106. *
  7107. */
  7108. function tripal_chado_chado_schema_v1_2_genotypeprop() {
  7109. $description = [
  7110. 'description' => '',
  7111. 'fields' => [
  7112. 'genotypeprop_id' => [
  7113. 'description' => '',
  7114. 'type' => 'serial',
  7115. 'not null' => TRUE,
  7116. ],
  7117. 'genotype_id' => [
  7118. 'description' => '',
  7119. 'type' => 'int',
  7120. 'not null' => TRUE,
  7121. ],
  7122. 'type_id' => [
  7123. 'description' => '',
  7124. 'type' => 'int',
  7125. 'not null' => TRUE,
  7126. ],
  7127. 'value' => [
  7128. 'description' => '',
  7129. 'type' => 'text',
  7130. 'not null' => FALSE,
  7131. ],
  7132. 'rank' => [
  7133. 'description' => '',
  7134. 'type' => 'int',
  7135. 'not null' => TRUE,
  7136. 'default' => 0,
  7137. ],
  7138. ],
  7139. 'primary key' => [
  7140. 0 => 'genotypeprop_id',
  7141. ],
  7142. 'unique keys' => [
  7143. 'genotypeprop_c1' => [
  7144. 0 => 'genotype_id',
  7145. 1 => 'type_id',
  7146. 2 => 'rank',
  7147. ],
  7148. ],
  7149. 'indexes' => [
  7150. 'genotypeprop_idx1' => [
  7151. 0 => 'genotype_id',
  7152. ],
  7153. 'genotypeprop_idx2' => [
  7154. 0 => 'type_id',
  7155. ],
  7156. ],
  7157. 'foreign keys' => [
  7158. 'cvterm' => [
  7159. 'table' => 'cvterm',
  7160. 'columns' => [
  7161. 'type_id' => 'cvterm_id',
  7162. ],
  7163. ],
  7164. 'genotype' => [
  7165. 'table' => 'genotype',
  7166. 'columns' => [
  7167. 'genotype_id' => 'genotype_id',
  7168. ],
  7169. ],
  7170. ],
  7171. 'table' => 'genotypeprop',
  7172. 'referring_tables' => NULL,
  7173. ];
  7174. return $description;
  7175. }
  7176. /**
  7177. * Implements hook_chado_schema_v1_2_library()
  7178. * Purpose: To describe the structure of 'library' to tripal
  7179. *
  7180. * @see chado_insert_record()
  7181. * @see chado_update_record()
  7182. * @see chado_select_record()
  7183. *
  7184. * @return
  7185. * An array describing the 'library' table
  7186. *
  7187. * @ingroup tripal_chado_v1.2_schema_api
  7188. *
  7189. */
  7190. function tripal_chado_chado_schema_v1_2_library() {
  7191. $description = [
  7192. 'description' => '',
  7193. 'fields' => [
  7194. 'library_id' => [
  7195. 'description' => '',
  7196. 'type' => 'serial',
  7197. 'not null' => TRUE,
  7198. ],
  7199. 'organism_id' => [
  7200. 'description' => '',
  7201. 'type' => 'int',
  7202. 'not null' => TRUE,
  7203. ],
  7204. 'name' => [
  7205. 'description' => '',
  7206. 'type' => 'varchar',
  7207. 'length' => '255',
  7208. 'not null' => FALSE,
  7209. ],
  7210. 'uniquename' => [
  7211. 'description' => '',
  7212. 'type' => 'text',
  7213. 'not null' => TRUE,
  7214. ],
  7215. 'type_id' => [
  7216. 'description' => '',
  7217. 'type' => 'int',
  7218. 'not null' => TRUE,
  7219. ],
  7220. 'is_obsolete' => [
  7221. 'description' => '',
  7222. 'type' => 'int',
  7223. 'not null' => TRUE,
  7224. 'default' => 0,
  7225. ],
  7226. 'timeaccessioned' => [
  7227. 'description' => '',
  7228. 'type' => 'datetime',
  7229. 'not null' => TRUE,
  7230. 'default' => 'now()',
  7231. ],
  7232. 'timelastmodified' => [
  7233. 'description' => '',
  7234. 'type' => 'datetime',
  7235. 'not null' => TRUE,
  7236. 'default' => 'now()',
  7237. ],
  7238. ],
  7239. 'primary key' => [
  7240. 0 => 'library_id',
  7241. ],
  7242. 'unique keys' => [
  7243. 'library_c1' => [
  7244. 0 => 'organism_id',
  7245. 1 => 'uniquename',
  7246. 2 => 'type_id',
  7247. ],
  7248. ],
  7249. 'indexes' => [
  7250. 'library_idx1' => [
  7251. 0 => 'organism_id',
  7252. ],
  7253. 'library_idx2' => [
  7254. 0 => 'type_id',
  7255. ],
  7256. 'library_idx3' => [
  7257. 0 => 'uniquename',
  7258. ],
  7259. 'library_name_ind1' => [
  7260. 0 => 'name',
  7261. ],
  7262. ],
  7263. 'foreign keys' => [
  7264. 'organism' => [
  7265. 'table' => 'organism',
  7266. 'columns' => [
  7267. 'organism_id' => 'organism_id',
  7268. ],
  7269. ],
  7270. 'cvterm' => [
  7271. 'table' => 'cvterm',
  7272. 'columns' => [
  7273. 'type_id' => 'cvterm_id',
  7274. ],
  7275. ],
  7276. ],
  7277. 'referring_tables' => [
  7278. 0 => 'cell_line_library',
  7279. 1 => 'library_cvterm',
  7280. 2 => 'library_dbxref',
  7281. 3 => 'library_feature',
  7282. 4 => 'library_pub',
  7283. 5 => 'library_synonym',
  7284. 6 => 'libraryprop',
  7285. ],
  7286. 'table' => 'library',
  7287. ];
  7288. return $description;
  7289. }
  7290. /**
  7291. * Implements hook_chado_schema_v1_2_library_cvterm()
  7292. * Purpose: To describe the structure of 'library_cvterm' to tripal
  7293. *
  7294. * @see chado_insert_record()
  7295. * @see chado_update_record()
  7296. * @see chado_select_record()
  7297. *
  7298. * @return
  7299. * An array describing the 'library_cvterm' table
  7300. *
  7301. * @ingroup tripal_chado_v1.2_schema_api
  7302. *
  7303. */
  7304. function tripal_chado_chado_schema_v1_2_library_cvterm() {
  7305. $description = [
  7306. 'description' => '',
  7307. 'fields' => [
  7308. 'library_cvterm_id' => [
  7309. 'description' => '',
  7310. 'type' => 'serial',
  7311. 'not null' => TRUE,
  7312. ],
  7313. 'library_id' => [
  7314. 'description' => '',
  7315. 'type' => 'int',
  7316. 'not null' => TRUE,
  7317. ],
  7318. 'cvterm_id' => [
  7319. 'description' => '',
  7320. 'type' => 'int',
  7321. 'not null' => TRUE,
  7322. ],
  7323. 'pub_id' => [
  7324. 'description' => '',
  7325. 'type' => 'int',
  7326. 'not null' => TRUE,
  7327. ],
  7328. ],
  7329. 'primary key' => [
  7330. 0 => 'library_cvterm_id',
  7331. ],
  7332. 'unique keys' => [
  7333. 'library_cvterm_c1' => [
  7334. 0 => 'library_id',
  7335. 1 => 'cvterm_id',
  7336. 2 => 'pub_id',
  7337. ],
  7338. ],
  7339. 'indexes' => [
  7340. 'library_cvterm_idx1' => [
  7341. 0 => 'library_id',
  7342. ],
  7343. 'library_cvterm_idx2' => [
  7344. 0 => 'cvterm_id',
  7345. ],
  7346. 'library_cvterm_idx3' => [
  7347. 0 => 'pub_id',
  7348. ],
  7349. ],
  7350. 'foreign keys' => [
  7351. 'cvterm' => [
  7352. 'table' => 'cvterm',
  7353. 'columns' => [
  7354. 'cvterm_id' => 'cvterm_id',
  7355. ],
  7356. ],
  7357. 'pub' => [
  7358. 'table' => 'pub',
  7359. 'columns' => [
  7360. 'pub_id' => 'pub_id',
  7361. ],
  7362. ],
  7363. 'library' => [
  7364. 'table' => 'library',
  7365. 'columns' => [
  7366. 'library_id' => 'library_id',
  7367. ],
  7368. ],
  7369. ],
  7370. 'table' => 'library_cvterm',
  7371. 'referring_tables' => NULL,
  7372. ];
  7373. return $description;
  7374. }
  7375. /**
  7376. * Implements hook_chado_schema_v1_2_library_dbxref()
  7377. * Purpose: To describe the structure of 'library_dbxref' to tripal
  7378. *
  7379. * @see chado_insert_record()
  7380. * @see chado_update_record()
  7381. * @see chado_select_record()
  7382. *
  7383. * @return
  7384. * An array describing the 'library_dbxref' table
  7385. *
  7386. * @ingroup tripal_chado_v1.2_schema_api
  7387. *
  7388. */
  7389. function tripal_chado_chado_schema_v1_2_library_dbxref() {
  7390. $description = [
  7391. 'description' => '',
  7392. 'fields' => [
  7393. 'library_dbxref_id' => [
  7394. 'description' => '',
  7395. 'type' => 'serial',
  7396. 'not null' => TRUE,
  7397. ],
  7398. 'library_id' => [
  7399. 'description' => '',
  7400. 'type' => 'int',
  7401. 'not null' => TRUE,
  7402. ],
  7403. 'dbxref_id' => [
  7404. 'description' => '',
  7405. 'type' => 'int',
  7406. 'not null' => TRUE,
  7407. ],
  7408. 'is_current' => [
  7409. 'description' => '',
  7410. 'type' => 'boolean',
  7411. 'not null' => TRUE,
  7412. 'default' => 'true',
  7413. ],
  7414. ],
  7415. 'primary key' => [
  7416. 0 => 'library_dbxref_id',
  7417. ],
  7418. 'unique keys' => [
  7419. 'library_dbxref_c1' => [
  7420. 0 => 'library_id',
  7421. 1 => 'dbxref_id',
  7422. ],
  7423. ],
  7424. 'indexes' => [
  7425. 'library_dbxref_idx1' => [
  7426. 0 => 'library_id',
  7427. ],
  7428. 'library_dbxref_idx2' => [
  7429. 0 => 'dbxref_id',
  7430. ],
  7431. ],
  7432. 'foreign keys' => [
  7433. 'dbxref' => [
  7434. 'table' => 'dbxref',
  7435. 'columns' => [
  7436. 'dbxref_id' => 'dbxref_id',
  7437. ],
  7438. ],
  7439. 'library' => [
  7440. 'table' => 'library',
  7441. 'columns' => [
  7442. 'library_id' => 'library_id',
  7443. ],
  7444. ],
  7445. ],
  7446. 'table' => 'library_dbxref',
  7447. 'referring_tables' => NULL,
  7448. ];
  7449. return $description;
  7450. }
  7451. /**
  7452. * Implements hook_chado_schema_v1_2_library_feature()
  7453. * Purpose: To describe the structure of 'library_feature' to tripal
  7454. *
  7455. * @see chado_insert_record()
  7456. * @see chado_update_record()
  7457. * @see chado_select_record()
  7458. *
  7459. * @return
  7460. * An array describing the 'library_feature' table
  7461. *
  7462. * @ingroup tripal_chado_v1.2_schema_api
  7463. *
  7464. */
  7465. function tripal_chado_chado_schema_v1_2_library_feature() {
  7466. $description = [
  7467. 'description' => '',
  7468. 'fields' => [
  7469. 'library_feature_id' => [
  7470. 'description' => '',
  7471. 'type' => 'serial',
  7472. 'not null' => TRUE,
  7473. ],
  7474. 'library_id' => [
  7475. 'description' => '',
  7476. 'type' => 'int',
  7477. 'not null' => TRUE,
  7478. ],
  7479. 'feature_id' => [
  7480. 'description' => '',
  7481. 'type' => 'int',
  7482. 'not null' => TRUE,
  7483. ],
  7484. ],
  7485. 'primary key' => [
  7486. 0 => 'library_feature_id',
  7487. ],
  7488. 'unique keys' => [
  7489. 'library_feature_c1' => [
  7490. 0 => 'library_id',
  7491. 1 => 'feature_id',
  7492. ],
  7493. ],
  7494. 'indexes' => [
  7495. 'library_feature_idx1' => [
  7496. 0 => 'library_id',
  7497. ],
  7498. 'library_feature_idx2' => [
  7499. 0 => 'feature_id',
  7500. ],
  7501. ],
  7502. 'foreign keys' => [
  7503. 'feature' => [
  7504. 'table' => 'feature',
  7505. 'columns' => [
  7506. 'feature_id' => 'feature_id',
  7507. ],
  7508. ],
  7509. 'library' => [
  7510. 'table' => 'library',
  7511. 'columns' => [
  7512. 'library_id' => 'library_id',
  7513. ],
  7514. ],
  7515. ],
  7516. 'table' => 'library_feature',
  7517. 'referring_tables' => NULL,
  7518. ];
  7519. return $description;
  7520. }
  7521. /**
  7522. * Implements hook_chado_schema_v1_2_library_pub()
  7523. * Purpose: To describe the structure of 'library_pub' to tripal
  7524. *
  7525. * @see chado_insert_record()
  7526. * @see chado_update_record()
  7527. * @see chado_select_record()
  7528. *
  7529. * @return
  7530. * An array describing the 'library_pub' table
  7531. *
  7532. * @ingroup tripal_chado_v1.2_schema_api
  7533. *
  7534. */
  7535. function tripal_chado_chado_schema_v1_2_library_pub() {
  7536. $description = [
  7537. 'description' => '',
  7538. 'fields' => [
  7539. 'library_pub_id' => [
  7540. 'description' => '',
  7541. 'type' => 'serial',
  7542. 'not null' => TRUE,
  7543. ],
  7544. 'library_id' => [
  7545. 'description' => '',
  7546. 'type' => 'int',
  7547. 'not null' => TRUE,
  7548. ],
  7549. 'pub_id' => [
  7550. 'description' => '',
  7551. 'type' => 'int',
  7552. 'not null' => TRUE,
  7553. ],
  7554. ],
  7555. 'primary key' => [
  7556. 0 => 'library_pub_id',
  7557. ],
  7558. 'unique keys' => [
  7559. 'library_pub_c1' => [
  7560. 0 => 'library_id',
  7561. 1 => 'pub_id',
  7562. ],
  7563. ],
  7564. 'indexes' => [
  7565. 'library_pub_idx1' => [
  7566. 0 => 'library_id',
  7567. ],
  7568. 'library_pub_idx2' => [
  7569. 0 => 'pub_id',
  7570. ],
  7571. ],
  7572. 'foreign keys' => [
  7573. 'pub' => [
  7574. 'table' => 'pub',
  7575. 'columns' => [
  7576. 'pub_id' => 'pub_id',
  7577. ],
  7578. ],
  7579. 'library' => [
  7580. 'table' => 'library',
  7581. 'columns' => [
  7582. 'library_id' => 'library_id',
  7583. ],
  7584. ],
  7585. ],
  7586. 'table' => 'library_pub',
  7587. 'referring_tables' => NULL,
  7588. ];
  7589. return $description;
  7590. }
  7591. /**
  7592. * Implements hook_chado_schema_v1_2_library_synonym()
  7593. * Purpose: To describe the structure of 'library_synonym' to tripal
  7594. *
  7595. * @see chado_insert_record()
  7596. * @see chado_update_record()
  7597. * @see chado_select_record()
  7598. *
  7599. * @return
  7600. * An array describing the 'library_synonym' table
  7601. *
  7602. * @ingroup tripal_chado_v1.2_schema_api
  7603. *
  7604. */
  7605. function tripal_chado_chado_schema_v1_2_library_synonym() {
  7606. $description = [
  7607. 'description' => '',
  7608. 'fields' => [
  7609. 'library_synonym_id' => [
  7610. 'description' => '',
  7611. 'type' => 'serial',
  7612. 'not null' => TRUE,
  7613. ],
  7614. 'synonym_id' => [
  7615. 'description' => '',
  7616. 'type' => 'int',
  7617. 'not null' => TRUE,
  7618. ],
  7619. 'library_id' => [
  7620. 'description' => '',
  7621. 'type' => 'int',
  7622. 'not null' => TRUE,
  7623. ],
  7624. 'pub_id' => [
  7625. 'description' => '',
  7626. 'type' => 'int',
  7627. 'not null' => TRUE,
  7628. ],
  7629. 'is_current' => [
  7630. 'description' => '',
  7631. 'type' => 'boolean',
  7632. 'not null' => TRUE,
  7633. 'default' => 'true',
  7634. ],
  7635. 'is_internal' => [
  7636. 'description' => '',
  7637. 'type' => 'boolean',
  7638. 'not null' => TRUE,
  7639. 'default' => 'false',
  7640. ],
  7641. ],
  7642. 'primary key' => [
  7643. 0 => 'library_synonym_id',
  7644. ],
  7645. 'unique keys' => [
  7646. 'library_synonym_c1' => [
  7647. 0 => 'synonym_id',
  7648. 1 => 'library_id',
  7649. 2 => 'pub_id',
  7650. ],
  7651. ],
  7652. 'indexes' => [
  7653. 'library_synonym_idx1' => [
  7654. 0 => 'synonym_id',
  7655. ],
  7656. 'library_synonym_idx2' => [
  7657. 0 => 'library_id',
  7658. ],
  7659. 'library_synonym_idx3' => [
  7660. 0 => 'pub_id',
  7661. ],
  7662. ],
  7663. 'foreign keys' => [
  7664. 'pub' => [
  7665. 'table' => 'pub',
  7666. 'columns' => [
  7667. 'pub_id' => 'pub_id',
  7668. ],
  7669. ],
  7670. 'synonym' => [
  7671. 'table' => 'synonym',
  7672. 'columns' => [
  7673. 'synonym_id' => 'synonym_id',
  7674. ],
  7675. ],
  7676. 'library' => [
  7677. 'table' => 'library',
  7678. 'columns' => [
  7679. 'library_id' => 'library_id',
  7680. ],
  7681. ],
  7682. ],
  7683. 'table' => 'library_synonym',
  7684. 'referring_tables' => NULL,
  7685. ];
  7686. return $description;
  7687. }
  7688. /**
  7689. * Implements hook_chado_schema_v1_2_libraryprop()
  7690. * Purpose: To describe the structure of 'libraryprop' to tripal
  7691. *
  7692. * @see chado_insert_record()
  7693. * @see chado_update_record()
  7694. * @see chado_select_record()
  7695. *
  7696. * @return
  7697. * An array describing the 'libraryprop' table
  7698. *
  7699. * @ingroup tripal_chado_v1.2_schema_api
  7700. *
  7701. */
  7702. function tripal_chado_chado_schema_v1_2_libraryprop() {
  7703. $description = [
  7704. 'description' => '',
  7705. 'fields' => [
  7706. 'libraryprop_id' => [
  7707. 'description' => '',
  7708. 'type' => 'serial',
  7709. 'not null' => TRUE,
  7710. ],
  7711. 'library_id' => [
  7712. 'description' => '',
  7713. 'type' => 'int',
  7714. 'not null' => TRUE,
  7715. ],
  7716. 'type_id' => [
  7717. 'description' => '',
  7718. 'type' => 'int',
  7719. 'not null' => TRUE,
  7720. ],
  7721. 'value' => [
  7722. 'description' => '',
  7723. 'type' => 'text',
  7724. 'not null' => FALSE,
  7725. ],
  7726. 'rank' => [
  7727. 'description' => '',
  7728. 'type' => 'int',
  7729. 'not null' => TRUE,
  7730. 'default' => 0,
  7731. ],
  7732. ],
  7733. 'primary key' => [
  7734. 0 => 'libraryprop_id',
  7735. ],
  7736. 'unique keys' => [
  7737. 'libraryprop_c1' => [
  7738. 0 => 'library_id',
  7739. 1 => 'type_id',
  7740. 2 => 'rank',
  7741. ],
  7742. ],
  7743. 'indexes' => [
  7744. 'libraryprop_idx1' => [
  7745. 0 => 'library_id',
  7746. ],
  7747. 'libraryprop_idx2' => [
  7748. 0 => 'type_id',
  7749. ],
  7750. ],
  7751. 'foreign keys' => [
  7752. 'cvterm' => [
  7753. 'table' => 'cvterm',
  7754. 'columns' => [
  7755. 'type_id' => 'cvterm_id',
  7756. ],
  7757. ],
  7758. 'library' => [
  7759. 'table' => 'library',
  7760. 'columns' => [
  7761. 'library_id' => 'library_id',
  7762. ],
  7763. ],
  7764. ],
  7765. 'table' => 'libraryprop',
  7766. 'referring_tables' => [
  7767. 0 => 'libraryprop_pub',
  7768. ],
  7769. ];
  7770. return $description;
  7771. }
  7772. /**
  7773. * Implements hook_chado_schema_v1_2_libraryprop_pub()
  7774. * Purpose: To describe the structure of 'libraryprop_pub' to tripal
  7775. *
  7776. * @see chado_insert_record()
  7777. * @see chado_update_record()
  7778. * @see chado_select_record()
  7779. *
  7780. * @return
  7781. * An array describing the 'libraryprop_pub' table
  7782. *
  7783. * @ingroup tripal_chado_v1.2_schema_api
  7784. *
  7785. */
  7786. function tripal_chado_chado_schema_v1_2_libraryprop_pub() {
  7787. $description = [
  7788. 'description' => '',
  7789. 'fields' => [
  7790. 'libraryprop_pub_id' => [
  7791. 'description' => '',
  7792. 'type' => 'serial',
  7793. 'not null' => TRUE,
  7794. ],
  7795. 'libraryprop_id' => [
  7796. 'description' => '',
  7797. 'type' => 'int',
  7798. 'not null' => TRUE,
  7799. ],
  7800. 'pub_id' => [
  7801. 'description' => '',
  7802. 'type' => 'int',
  7803. 'not null' => TRUE,
  7804. ],
  7805. ],
  7806. 'primary key' => [
  7807. 0 => 'libraryprop_pub_id',
  7808. ],
  7809. 'unique keys' => [
  7810. 'libraryprop_pub_c1' => [
  7811. 0 => 'libraryprop_id',
  7812. 1 => 'pub_id',
  7813. ],
  7814. ],
  7815. 'indexes' => [
  7816. 'libraryprop_pub_idx1' => [
  7817. 0 => 'libraryprop_id',
  7818. ],
  7819. 'libraryprop_pub_idx2' => [
  7820. 0 => 'pub_id',
  7821. ],
  7822. ],
  7823. 'foreign keys' => [
  7824. 'pub' => [
  7825. 'table' => 'pub',
  7826. 'columns' => [
  7827. 'pub_id' => 'pub_id',
  7828. ],
  7829. ],
  7830. 'libraryprop' => [
  7831. 'table' => 'libraryprop',
  7832. 'columns' => [
  7833. 'libraryprop_id' => 'libraryprop_id',
  7834. ],
  7835. ],
  7836. ],
  7837. 'table' => 'libraryprop_pub',
  7838. 'referring_tables' => NULL,
  7839. ];
  7840. return $description;
  7841. }
  7842. /**
  7843. * Implements hook_chado_schema_v1_2_magedocumentation()
  7844. * Purpose: To describe the structure of 'magedocumentation' to tripal
  7845. *
  7846. * @see chado_insert_record()
  7847. * @see chado_update_record()
  7848. * @see chado_select_record()
  7849. *
  7850. * @return
  7851. * An array describing the 'magedocumentation' table
  7852. *
  7853. * @ingroup tripal_chado_v1.2_schema_api
  7854. *
  7855. */
  7856. function tripal_chado_chado_schema_v1_2_magedocumentation() {
  7857. $description = [
  7858. 'description' => '',
  7859. 'fields' => [
  7860. 'magedocumentation_id' => [
  7861. 'description' => '',
  7862. 'type' => 'serial',
  7863. 'not null' => TRUE,
  7864. ],
  7865. 'mageml_id' => [
  7866. 'description' => '',
  7867. 'type' => 'int',
  7868. 'not null' => TRUE,
  7869. ],
  7870. 'tableinfo_id' => [
  7871. 'description' => '',
  7872. 'type' => 'int',
  7873. 'not null' => TRUE,
  7874. ],
  7875. 'row_id' => [
  7876. 'description' => '',
  7877. 'type' => 'int',
  7878. 'not null' => TRUE,
  7879. ],
  7880. 'mageidentifier' => [
  7881. 'description' => '',
  7882. 'type' => 'text',
  7883. 'not null' => TRUE,
  7884. ],
  7885. ],
  7886. 'primary key' => [
  7887. 0 => 'magedocumentation_id',
  7888. ],
  7889. 'unique keys' => [],
  7890. 'indexes' => [
  7891. 'magedocumentation_idx1' => [
  7892. 0 => 'mageml_id',
  7893. ],
  7894. 'magedocumentation_idx2' => [
  7895. 0 => 'tableinfo_id',
  7896. ],
  7897. 'magedocumentation_idx3' => [
  7898. 0 => 'row_id',
  7899. ],
  7900. ],
  7901. 'foreign keys' => [
  7902. 'tableinfo' => [
  7903. 'table' => 'tableinfo',
  7904. 'columns' => [
  7905. 'tableinfo_id' => 'tableinfo_id',
  7906. ],
  7907. ],
  7908. 'mageml' => [
  7909. 'table' => 'mageml',
  7910. 'columns' => [
  7911. 'mageml_id' => 'mageml_id',
  7912. ],
  7913. ],
  7914. ],
  7915. 'table' => 'magedocumentation',
  7916. 'referring_tables' => NULL,
  7917. ];
  7918. return $description;
  7919. }
  7920. /**
  7921. * Implements hook_chado_schema_v1_2_mageml()
  7922. * Purpose: To describe the structure of 'mageml' to tripal
  7923. *
  7924. * @see chado_insert_record()
  7925. * @see chado_update_record()
  7926. * @see chado_select_record()
  7927. *
  7928. * @return
  7929. * An array describing the 'mageml' table
  7930. *
  7931. * @ingroup tripal_chado_v1.2_schema_api
  7932. *
  7933. */
  7934. function tripal_chado_chado_schema_v1_2_mageml() {
  7935. $description = [
  7936. 'description' => '',
  7937. 'fields' => [
  7938. 'mageml_id' => [
  7939. 'description' => '',
  7940. 'type' => 'serial',
  7941. 'not null' => TRUE,
  7942. ],
  7943. 'mage_package' => [
  7944. 'description' => '',
  7945. 'type' => 'text',
  7946. 'not null' => TRUE,
  7947. ],
  7948. 'mage_ml' => [
  7949. 'description' => '',
  7950. 'type' => 'text',
  7951. 'not null' => TRUE,
  7952. ],
  7953. ],
  7954. 'primary key' => [
  7955. 0 => 'mageml_id',
  7956. ],
  7957. 'unique keys' => [],
  7958. 'foreign keys' => [
  7959. ],
  7960. 'table' => 'mageml',
  7961. 'referring_tables' => [
  7962. 0 => 'magedocumentation',
  7963. ],
  7964. ];
  7965. return $description;
  7966. }
  7967. /**
  7968. * Implements hook_chado_schema_v1_2_nd_experiment()
  7969. * Purpose: To describe the structure of 'nd_experiment' to tripal
  7970. *
  7971. * @see chado_insert_record()
  7972. * @see chado_update_record()
  7973. * @see chado_select_record()
  7974. *
  7975. * @return
  7976. * An array describing the 'nd_experiment' table
  7977. *
  7978. * @ingroup tripal_chado_v1.2_schema_api
  7979. *
  7980. */
  7981. function tripal_chado_chado_schema_v1_2_nd_experiment() {
  7982. $description = [
  7983. 'description' => '',
  7984. 'fields' => [
  7985. 'nd_experiment_id' => [
  7986. 'description' => '',
  7987. 'type' => 'serial',
  7988. 'not null' => TRUE,
  7989. ],
  7990. 'nd_geolocation_id' => [
  7991. 'description' => '',
  7992. 'type' => 'int',
  7993. 'not null' => TRUE,
  7994. ],
  7995. 'type_id' => [
  7996. 'description' => '',
  7997. 'type' => 'int',
  7998. 'not null' => TRUE,
  7999. ],
  8000. ],
  8001. 'primary key' => [
  8002. 0 => 'nd_experiment_id',
  8003. ],
  8004. 'unique keys' => [],
  8005. 'foreign keys' => [
  8006. 'cvterm' => [
  8007. 'table' => 'cvterm',
  8008. 'columns' => [
  8009. 'type_id' => 'cvterm_id',
  8010. ],
  8011. ],
  8012. 'nd_geolocation' => [
  8013. 'table' => 'nd_geolocation',
  8014. 'columns' => [
  8015. 'nd_geolocation_id' => 'nd_geolocation_id',
  8016. ],
  8017. ],
  8018. ],
  8019. 'table' => 'nd_experiment',
  8020. 'referring_tables' => [
  8021. 0 => 'nd_experiment_contact',
  8022. 1 => 'nd_experiment_dbxref',
  8023. 2 => 'nd_experiment_genotype',
  8024. 3 => 'nd_experiment_phenotype',
  8025. 4 => 'nd_experiment_project',
  8026. 5 => 'nd_experiment_protocol',
  8027. 6 => 'nd_experiment_pub',
  8028. 7 => 'nd_experiment_stock',
  8029. 8 => 'nd_experimentprop',
  8030. ],
  8031. ];
  8032. return $description;
  8033. }
  8034. /**
  8035. * Implements hook_chado_schema_v1_2_nd_experiment_contact()
  8036. * Purpose: To describe the structure of 'nd_experiment_contact' to tripal
  8037. *
  8038. * @see chado_insert_record()
  8039. * @see chado_update_record()
  8040. * @see chado_select_record()
  8041. *
  8042. * @return
  8043. * An array describing the 'nd_experiment_contact' table
  8044. *
  8045. * @ingroup tripal_chado_v1.2_schema_api
  8046. *
  8047. */
  8048. function tripal_chado_chado_schema_v1_2_nd_experiment_contact() {
  8049. $description = [
  8050. 'description' => '',
  8051. 'fields' => [
  8052. 'nd_experiment_contact_id' => [
  8053. 'description' => '',
  8054. 'type' => 'serial',
  8055. 'not null' => TRUE,
  8056. ],
  8057. 'nd_experiment_id' => [
  8058. 'description' => '',
  8059. 'type' => 'int',
  8060. 'not null' => TRUE,
  8061. ],
  8062. 'contact_id' => [
  8063. 'description' => '',
  8064. 'type' => 'int',
  8065. 'not null' => TRUE,
  8066. ],
  8067. ],
  8068. 'primary key' => [
  8069. 0 => 'nd_experiment_contact_id',
  8070. ],
  8071. 'unique keys' => [],
  8072. 'foreign keys' => [
  8073. 'contact' => [
  8074. 'table' => 'contact',
  8075. 'columns' => [
  8076. 'contact_id' => 'contact_id',
  8077. ],
  8078. ],
  8079. 'nd_experiment' => [
  8080. 'table' => 'nd_experiment',
  8081. 'columns' => [
  8082. 'nd_experiment_id' => 'nd_experiment_id',
  8083. ],
  8084. ],
  8085. ],
  8086. 'table' => 'nd_experiment_contact',
  8087. 'referring_tables' => NULL,
  8088. ];
  8089. return $description;
  8090. }
  8091. /**
  8092. * Implements hook_chado_schema_v1_2_nd_experiment_dbxref()
  8093. * Purpose: To describe the structure of 'nd_experiment_dbxref' to tripal
  8094. *
  8095. * @see chado_insert_record()
  8096. * @see chado_update_record()
  8097. * @see chado_select_record()
  8098. *
  8099. * @return
  8100. * An array describing the 'nd_experiment_dbxref' table
  8101. *
  8102. * @ingroup tripal_chado_v1.2_schema_api
  8103. *
  8104. */
  8105. function tripal_chado_chado_schema_v1_2_nd_experiment_dbxref() {
  8106. $description = [
  8107. 'description' => '',
  8108. 'fields' => [
  8109. 'nd_experiment_dbxref_id' => [
  8110. 'description' => '',
  8111. 'type' => 'serial',
  8112. 'not null' => TRUE,
  8113. ],
  8114. 'nd_experiment_id' => [
  8115. 'description' => '',
  8116. 'type' => 'int',
  8117. 'not null' => TRUE,
  8118. ],
  8119. 'dbxref_id' => [
  8120. 'description' => '',
  8121. 'type' => 'int',
  8122. 'not null' => TRUE,
  8123. ],
  8124. ],
  8125. 'primary key' => [
  8126. 0 => 'nd_experiment_dbxref_id',
  8127. ],
  8128. 'unique keys' => [],
  8129. 'foreign keys' => [
  8130. 'dbxref' => [
  8131. 'table' => 'dbxref',
  8132. 'columns' => [
  8133. 'dbxref_id' => 'dbxref_id',
  8134. ],
  8135. ],
  8136. 'nd_experiment' => [
  8137. 'table' => 'nd_experiment',
  8138. 'columns' => [
  8139. 'nd_experiment_id' => 'nd_experiment_id',
  8140. ],
  8141. ],
  8142. ],
  8143. 'table' => 'nd_experiment_dbxref',
  8144. 'referring_tables' => NULL,
  8145. ];
  8146. return $description;
  8147. }
  8148. /**
  8149. * Implements hook_chado_schema_v1_2_nd_experiment_genotype()
  8150. * Purpose: To describe the structure of 'nd_experiment_genotype' to tripal
  8151. *
  8152. * @see chado_insert_record()
  8153. * @see chado_update_record()
  8154. * @see chado_select_record()
  8155. *
  8156. * @return
  8157. * An array describing the 'nd_experiment_genotype' table
  8158. *
  8159. * @ingroup tripal_chado_v1.2_schema_api
  8160. *
  8161. */
  8162. function tripal_chado_chado_schema_v1_2_nd_experiment_genotype() {
  8163. $description = [
  8164. 'description' => '',
  8165. 'fields' => [
  8166. 'nd_experiment_genotype_id' => [
  8167. 'description' => '',
  8168. 'type' => 'serial',
  8169. 'not null' => TRUE,
  8170. ],
  8171. 'nd_experiment_id' => [
  8172. 'description' => '',
  8173. 'type' => 'int',
  8174. 'not null' => TRUE,
  8175. ],
  8176. 'genotype_id' => [
  8177. 'description' => '',
  8178. 'type' => 'int',
  8179. 'not null' => TRUE,
  8180. ],
  8181. ],
  8182. 'primary key' => [
  8183. 0 => 'nd_experiment_genotype_id',
  8184. ],
  8185. 'unique keys' => [
  8186. 'nd_experiment_genotype_c1' => [
  8187. 0 => 'nd_experiment_id',
  8188. 1 => 'genotype_id',
  8189. ],
  8190. ],
  8191. 'foreign keys' => [
  8192. 'genotype' => [
  8193. 'table' => 'genotype',
  8194. 'columns' => [
  8195. 'genotype_id' => 'genotype_id',
  8196. ],
  8197. ],
  8198. 'nd_experiment' => [
  8199. 'table' => 'nd_experiment',
  8200. 'columns' => [
  8201. 'nd_experiment_id' => 'nd_experiment_id',
  8202. ],
  8203. ],
  8204. ],
  8205. 'table' => 'nd_experiment_genotype',
  8206. 'referring_tables' => NULL,
  8207. ];
  8208. return $description;
  8209. }
  8210. /**
  8211. * Implements hook_chado_schema_v1_2_nd_experiment_phenotype()
  8212. * Purpose: To describe the structure of 'nd_experiment_phenotype' to tripal
  8213. *
  8214. * @see chado_insert_record()
  8215. * @see chado_update_record()
  8216. * @see chado_select_record()
  8217. *
  8218. * @return
  8219. * An array describing the 'nd_experiment_phenotype' table
  8220. *
  8221. * @ingroup tripal_chado_v1.2_schema_api
  8222. *
  8223. */
  8224. function tripal_chado_chado_schema_v1_2_nd_experiment_phenotype() {
  8225. $description = [
  8226. 'description' => '',
  8227. 'fields' => [
  8228. 'nd_experiment_phenotype_id' => [
  8229. 'description' => '',
  8230. 'type' => 'serial',
  8231. 'not null' => TRUE,
  8232. ],
  8233. 'nd_experiment_id' => [
  8234. 'description' => '',
  8235. 'type' => 'int',
  8236. 'not null' => TRUE,
  8237. ],
  8238. 'phenotype_id' => [
  8239. 'description' => '',
  8240. 'type' => 'int',
  8241. 'not null' => TRUE,
  8242. ],
  8243. ],
  8244. 'primary key' => [
  8245. 0 => 'nd_experiment_phenotype_id',
  8246. ],
  8247. 'unique keys' => [
  8248. 'nd_experiment_phenotype_c1' => [
  8249. 0 => 'nd_experiment_id',
  8250. 1 => 'phenotype_id',
  8251. ],
  8252. ],
  8253. 'foreign keys' => [
  8254. 'phenotype' => [
  8255. 'table' => 'phenotype',
  8256. 'columns' => [
  8257. 'phenotype_id' => 'phenotype_id',
  8258. ],
  8259. ],
  8260. 'nd_experiment' => [
  8261. 'table' => 'nd_experiment',
  8262. 'columns' => [
  8263. 'nd_experiment_id' => 'nd_experiment_id',
  8264. ],
  8265. ],
  8266. ],
  8267. 'table' => 'nd_experiment_phenotype',
  8268. 'referring_tables' => NULL,
  8269. ];
  8270. return $description;
  8271. }
  8272. /**
  8273. * Implements hook_chado_schema_v1_2_nd_experiment_project()
  8274. * Purpose: To describe the structure of 'nd_experiment_project' to tripal
  8275. *
  8276. * @see chado_insert_record()
  8277. * @see chado_update_record()
  8278. * @see chado_select_record()
  8279. *
  8280. * @return
  8281. * An array describing the 'nd_experiment_project' table
  8282. *
  8283. * @ingroup tripal_chado_v1.2_schema_api
  8284. *
  8285. */
  8286. function tripal_chado_chado_schema_v1_2_nd_experiment_project() {
  8287. $description = [
  8288. 'description' => '',
  8289. 'fields' => [
  8290. 'nd_experiment_project_id' => [
  8291. 'description' => '',
  8292. 'type' => 'serial',
  8293. 'not null' => TRUE,
  8294. ],
  8295. 'project_id' => [
  8296. 'description' => '',
  8297. 'type' => 'int',
  8298. 'not null' => TRUE,
  8299. ],
  8300. 'nd_experiment_id' => [
  8301. 'description' => '',
  8302. 'type' => 'int',
  8303. 'not null' => TRUE,
  8304. ],
  8305. ],
  8306. 'primary key' => [
  8307. 0 => 'nd_experiment_project_id',
  8308. ],
  8309. 'unique keys' => [],
  8310. 'foreign keys' => [
  8311. 'project' => [
  8312. 'table' => 'project',
  8313. 'columns' => [
  8314. 'project_id' => 'project_id',
  8315. ],
  8316. ],
  8317. 'nd_experiment' => [
  8318. 'table' => 'nd_experiment',
  8319. 'columns' => [
  8320. 'nd_experiment_id' => 'nd_experiment_id',
  8321. ],
  8322. ],
  8323. ],
  8324. 'table' => 'nd_experiment_project',
  8325. 'referring_tables' => NULL,
  8326. ];
  8327. return $description;
  8328. }
  8329. /**
  8330. * Implements hook_chado_schema_v1_2_nd_experiment_protocol()
  8331. * Purpose: To describe the structure of 'nd_experiment_protocol' to tripal
  8332. *
  8333. * @see chado_insert_record()
  8334. * @see chado_update_record()
  8335. * @see chado_select_record()
  8336. *
  8337. * @return
  8338. * An array describing the 'nd_experiment_protocol' table
  8339. *
  8340. * @ingroup tripal_chado_v1.2_schema_api
  8341. *
  8342. */
  8343. function tripal_chado_chado_schema_v1_2_nd_experiment_protocol() {
  8344. $description = [
  8345. 'description' => '',
  8346. 'fields' => [
  8347. 'nd_experiment_protocol_id' => [
  8348. 'description' => '',
  8349. 'type' => 'serial',
  8350. 'not null' => TRUE,
  8351. ],
  8352. 'nd_experiment_id' => [
  8353. 'description' => '',
  8354. 'type' => 'int',
  8355. 'not null' => TRUE,
  8356. ],
  8357. 'nd_protocol_id' => [
  8358. 'description' => '',
  8359. 'type' => 'int',
  8360. 'not null' => TRUE,
  8361. ],
  8362. ],
  8363. 'primary key' => [
  8364. 0 => 'nd_experiment_protocol_id',
  8365. ],
  8366. 'unique keys' => [],
  8367. 'foreign keys' => [
  8368. 'nd_experiment' => [
  8369. 'table' => 'nd_experiment',
  8370. 'columns' => [
  8371. 'nd_experiment_id' => 'nd_experiment_id',
  8372. ],
  8373. ],
  8374. 'nd_protocol' => [
  8375. 'table' => 'nd_protocol',
  8376. 'columns' => [
  8377. 'nd_protocol_id' => 'nd_protocol_id',
  8378. ],
  8379. ],
  8380. ],
  8381. 'table' => 'nd_experiment_protocol',
  8382. 'referring_tables' => NULL,
  8383. ];
  8384. return $description;
  8385. }
  8386. /**
  8387. * Implements hook_chado_schema_v1_2_nd_experiment_pub()
  8388. * Purpose: To describe the structure of 'nd_experiment_pub' to tripal
  8389. *
  8390. * @see chado_insert_record()
  8391. * @see chado_update_record()
  8392. * @see chado_select_record()
  8393. *
  8394. * @return
  8395. * An array describing the 'nd_experiment_pub' table
  8396. *
  8397. * @ingroup tripal_chado_v1.2_schema_api
  8398. *
  8399. */
  8400. function tripal_chado_chado_schema_v1_2_nd_experiment_pub() {
  8401. $description = [
  8402. 'description' => '',
  8403. 'fields' => [
  8404. 'nd_experiment_pub_id' => [
  8405. 'description' => '',
  8406. 'type' => 'serial',
  8407. 'not null' => TRUE,
  8408. ],
  8409. 'nd_experiment_id' => [
  8410. 'description' => '',
  8411. 'type' => 'int',
  8412. 'not null' => TRUE,
  8413. ],
  8414. 'pub_id' => [
  8415. 'description' => '',
  8416. 'type' => 'int',
  8417. 'not null' => TRUE,
  8418. ],
  8419. ],
  8420. 'primary key' => [
  8421. 0 => 'nd_experiment_pub_id',
  8422. ],
  8423. 'unique keys' => [
  8424. 'nd_experiment_pub_c1' => [
  8425. 0 => 'nd_experiment_id',
  8426. 1 => 'pub_id',
  8427. ],
  8428. ],
  8429. 'indexes' => [
  8430. 'nd_experiment_pub_idx1' => [
  8431. 0 => 'nd_experiment_id',
  8432. ],
  8433. 'nd_experiment_pub_idx2' => [
  8434. 0 => 'pub_id',
  8435. ],
  8436. ],
  8437. 'foreign keys' => [
  8438. 'pub' => [
  8439. 'table' => 'pub',
  8440. 'columns' => [
  8441. 'pub_id' => 'pub_id',
  8442. ],
  8443. ],
  8444. 'nd_experiment' => [
  8445. 'table' => 'nd_experiment',
  8446. 'columns' => [
  8447. 'nd_experiment_id' => 'nd_experiment_id',
  8448. ],
  8449. ],
  8450. ],
  8451. 'table' => 'nd_experiment_pub',
  8452. 'referring_tables' => NULL,
  8453. ];
  8454. return $description;
  8455. }
  8456. /**
  8457. * Implements hook_chado_schema_v1_2_nd_experiment_stock()
  8458. * Purpose: To describe the structure of 'nd_experiment_stock' to tripal
  8459. *
  8460. * @see chado_insert_record()
  8461. * @see chado_update_record()
  8462. * @see chado_select_record()
  8463. *
  8464. * @return
  8465. * An array describing the 'nd_experiment_stock' table
  8466. *
  8467. * @ingroup tripal_chado_v1.2_schema_api
  8468. *
  8469. */
  8470. function tripal_chado_chado_schema_v1_2_nd_experiment_stock() {
  8471. $description = [
  8472. 'description' => '',
  8473. 'fields' => [
  8474. 'nd_experiment_stock_id' => [
  8475. 'description' => '',
  8476. 'type' => 'serial',
  8477. 'not null' => TRUE,
  8478. ],
  8479. 'nd_experiment_id' => [
  8480. 'description' => '',
  8481. 'type' => 'int',
  8482. 'not null' => TRUE,
  8483. ],
  8484. 'stock_id' => [
  8485. 'description' => '',
  8486. 'type' => 'int',
  8487. 'not null' => TRUE,
  8488. ],
  8489. 'type_id' => [
  8490. 'description' => '',
  8491. 'type' => 'int',
  8492. 'not null' => TRUE,
  8493. ],
  8494. ],
  8495. 'primary key' => [
  8496. 0 => 'nd_experiment_stock_id',
  8497. ],
  8498. 'unique keys' => [],
  8499. 'foreign keys' => [
  8500. 'cvterm' => [
  8501. 'table' => 'cvterm',
  8502. 'columns' => [
  8503. 'type_id' => 'cvterm_id',
  8504. ],
  8505. ],
  8506. 'stock' => [
  8507. 'table' => 'stock',
  8508. 'columns' => [
  8509. 'stock_id' => 'stock_id',
  8510. ],
  8511. ],
  8512. 'nd_experiment' => [
  8513. 'table' => 'nd_experiment',
  8514. 'columns' => [
  8515. 'nd_experiment_id' => 'nd_experiment_id',
  8516. ],
  8517. ],
  8518. ],
  8519. 'table' => 'nd_experiment_stock',
  8520. 'referring_tables' => [
  8521. 0 => 'nd_experiment_stock_dbxref',
  8522. 1 => 'nd_experiment_stockprop',
  8523. ],
  8524. ];
  8525. return $description;
  8526. }
  8527. /**
  8528. * Implements hook_chado_schema_v1_2_nd_experiment_stock_dbxref()
  8529. * Purpose: To describe the structure of 'nd_experiment_stock_dbxref' to tripal
  8530. *
  8531. * @see chado_insert_record()
  8532. * @see chado_update_record()
  8533. * @see chado_select_record()
  8534. *
  8535. * @return
  8536. * An array describing the 'nd_experiment_stock_dbxref' table
  8537. *
  8538. * @ingroup tripal_chado_v1.2_schema_api
  8539. *
  8540. */
  8541. function tripal_chado_chado_schema_v1_2_nd_experiment_stock_dbxref() {
  8542. $description = [
  8543. 'description' => '',
  8544. 'fields' => [
  8545. 'nd_experiment_stock_dbxref_id' => [
  8546. 'description' => '',
  8547. 'type' => 'serial',
  8548. 'not null' => TRUE,
  8549. ],
  8550. 'nd_experiment_stock_id' => [
  8551. 'description' => '',
  8552. 'type' => 'int',
  8553. 'not null' => TRUE,
  8554. ],
  8555. 'dbxref_id' => [
  8556. 'description' => '',
  8557. 'type' => 'int',
  8558. 'not null' => TRUE,
  8559. ],
  8560. ],
  8561. 'primary key' => [
  8562. 0 => 'nd_experiment_stock_dbxref_id',
  8563. ],
  8564. 'unique keys' => [],
  8565. 'foreign keys' => [
  8566. 'dbxref' => [
  8567. 'table' => 'dbxref',
  8568. 'columns' => [
  8569. 'dbxref_id' => 'dbxref_id',
  8570. ],
  8571. ],
  8572. 'nd_experiment_stock' => [
  8573. 'table' => 'nd_experiment_stock',
  8574. 'columns' => [
  8575. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  8576. ],
  8577. ],
  8578. ],
  8579. 'table' => 'nd_experiment_stock_dbxref',
  8580. 'referring_tables' => NULL,
  8581. ];
  8582. return $description;
  8583. }
  8584. /**
  8585. * Implements hook_chado_schema_v1_2_nd_experiment_stockprop()
  8586. * Purpose: To describe the structure of 'nd_experiment_stockprop' to tripal
  8587. *
  8588. * @see chado_insert_record()
  8589. * @see chado_update_record()
  8590. * @see chado_select_record()
  8591. *
  8592. * @return
  8593. * An array describing the 'nd_experiment_stockprop' table
  8594. *
  8595. * @ingroup tripal_chado_v1.2_schema_api
  8596. *
  8597. */
  8598. function tripal_chado_chado_schema_v1_2_nd_experiment_stockprop() {
  8599. $description = [
  8600. 'description' => '',
  8601. 'fields' => [
  8602. 'nd_experiment_stockprop_id' => [
  8603. 'description' => '',
  8604. 'type' => 'serial',
  8605. 'not null' => TRUE,
  8606. ],
  8607. 'nd_experiment_stock_id' => [
  8608. 'description' => '',
  8609. 'type' => 'int',
  8610. 'not null' => TRUE,
  8611. ],
  8612. 'type_id' => [
  8613. 'description' => '',
  8614. 'type' => 'int',
  8615. 'not null' => TRUE,
  8616. ],
  8617. 'value' => [
  8618. 'description' => '',
  8619. 'type' => 'text',
  8620. 'not null' => FALSE,
  8621. ],
  8622. 'rank' => [
  8623. 'description' => '',
  8624. 'type' => 'int',
  8625. 'not null' => TRUE,
  8626. 'default' => 0,
  8627. ],
  8628. ],
  8629. 'primary key' => [
  8630. 0 => 'nd_experiment_stockprop_id',
  8631. ],
  8632. 'unique keys' => [
  8633. 'nd_experiment_stockprop_c1' => [
  8634. 0 => 'nd_experiment_stock_id',
  8635. 1 => 'type_id',
  8636. 2 => 'rank',
  8637. ],
  8638. ],
  8639. 'foreign keys' => [
  8640. 'cvterm' => [
  8641. 'table' => 'cvterm',
  8642. 'columns' => [
  8643. 'type_id' => 'cvterm_id',
  8644. ],
  8645. ],
  8646. 'nd_experiment_stock' => [
  8647. 'table' => 'nd_experiment_stock',
  8648. 'columns' => [
  8649. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  8650. ],
  8651. ],
  8652. ],
  8653. 'table' => 'nd_experiment_stockprop',
  8654. 'referring_tables' => NULL,
  8655. ];
  8656. return $description;
  8657. }
  8658. /**
  8659. * Implements hook_chado_schema_v1_2_nd_experimentprop()
  8660. * Purpose: To describe the structure of 'nd_experimentprop' to tripal
  8661. *
  8662. * @see chado_insert_record()
  8663. * @see chado_update_record()
  8664. * @see chado_select_record()
  8665. *
  8666. * @return
  8667. * An array describing the 'nd_experimentprop' table
  8668. *
  8669. * @ingroup tripal_chado_v1.2_schema_api
  8670. *
  8671. */
  8672. function tripal_chado_chado_schema_v1_2_nd_experimentprop() {
  8673. $description = [
  8674. 'description' => '',
  8675. 'fields' => [
  8676. 'nd_experimentprop_id' => [
  8677. 'description' => '',
  8678. 'type' => 'serial',
  8679. 'not null' => TRUE,
  8680. ],
  8681. 'nd_experiment_id' => [
  8682. 'description' => '',
  8683. 'type' => 'int',
  8684. 'not null' => TRUE,
  8685. ],
  8686. 'type_id' => [
  8687. 'description' => '',
  8688. 'type' => 'int',
  8689. 'not null' => TRUE,
  8690. ],
  8691. 'value' => [
  8692. 'description' => '',
  8693. 'type' => 'text',
  8694. 'not null' => FALSE,
  8695. ],
  8696. 'rank' => [
  8697. 'description' => '',
  8698. 'type' => 'int',
  8699. 'not null' => TRUE,
  8700. 'default' => 0,
  8701. ],
  8702. ],
  8703. 'primary key' => [
  8704. 0 => 'nd_experimentprop_id',
  8705. ],
  8706. 'unique keys' => [
  8707. 'nd_experimentprop_c1' => [
  8708. 0 => 'nd_experiment_id',
  8709. 1 => 'type_id',
  8710. 2 => 'rank',
  8711. ],
  8712. ],
  8713. 'foreign keys' => [
  8714. 'cvterm' => [
  8715. 'table' => 'cvterm',
  8716. 'columns' => [
  8717. 'type_id' => 'cvterm_id',
  8718. ],
  8719. ],
  8720. 'nd_experiment' => [
  8721. 'table' => 'nd_experiment',
  8722. 'columns' => [
  8723. 'nd_experiment_id' => 'nd_experiment_id',
  8724. ],
  8725. ],
  8726. ],
  8727. 'table' => 'nd_experimentprop',
  8728. 'referring_tables' => NULL,
  8729. ];
  8730. return $description;
  8731. }
  8732. /**
  8733. * Implements hook_chado_schema_v1_2_nd_geolocation()
  8734. * Purpose: To describe the structure of 'nd_geolocation' to tripal
  8735. *
  8736. * @see chado_insert_record()
  8737. * @see chado_update_record()
  8738. * @see chado_select_record()
  8739. *
  8740. * @return
  8741. * An array describing the 'nd_geolocation' table
  8742. *
  8743. * @ingroup tripal_chado_v1.2_schema_api
  8744. *
  8745. */
  8746. function tripal_chado_chado_schema_v1_2_nd_geolocation() {
  8747. $description = [
  8748. 'description' => '',
  8749. 'fields' => [
  8750. 'nd_geolocation_id' => [
  8751. 'description' => '',
  8752. 'type' => 'serial',
  8753. 'not null' => TRUE,
  8754. ],
  8755. 'description' => [
  8756. 'description' => '',
  8757. 'type' => 'varchar',
  8758. 'length' => '255',
  8759. 'not null' => FALSE,
  8760. ],
  8761. 'latitude' => [
  8762. 'description' => '',
  8763. 'type' => 'float',
  8764. 'not null' => FALSE,
  8765. ],
  8766. 'longitude' => [
  8767. 'description' => '',
  8768. 'type' => 'float',
  8769. 'not null' => FALSE,
  8770. ],
  8771. 'geodetic_datum' => [
  8772. 'description' => '',
  8773. 'type' => 'varchar',
  8774. 'length' => '32',
  8775. 'not null' => FALSE,
  8776. ],
  8777. 'altitude' => [
  8778. 'description' => '',
  8779. 'type' => 'float',
  8780. 'not null' => FALSE,
  8781. ],
  8782. ],
  8783. 'primary key' => [
  8784. 0 => 'nd_geolocation_id',
  8785. ],
  8786. 'unique keys' => [],
  8787. 'foreign keys' => [],
  8788. 'table' => 'nd_geolocation',
  8789. 'referring_tables' => [
  8790. 0 => 'nd_experiment',
  8791. 1 => 'nd_geolocationprop',
  8792. ],
  8793. ];
  8794. return $description;
  8795. }
  8796. /**
  8797. * Implements hook_chado_schema_v1_2_nd_geolocationprop()
  8798. * Purpose: To describe the structure of 'nd_geolocationprop' to tripal
  8799. *
  8800. * @see chado_insert_record()
  8801. * @see chado_update_record()
  8802. * @see chado_select_record()
  8803. *
  8804. * @return
  8805. * An array describing the 'nd_geolocationprop' table
  8806. *
  8807. * @ingroup tripal_chado_v1.2_schema_api
  8808. *
  8809. */
  8810. function tripal_chado_chado_schema_v1_2_nd_geolocationprop() {
  8811. $description = [
  8812. 'description' => '',
  8813. 'fields' => [
  8814. 'nd_geolocationprop_id' => [
  8815. 'description' => '',
  8816. 'type' => 'serial',
  8817. 'not null' => TRUE,
  8818. ],
  8819. 'nd_geolocation_id' => [
  8820. 'description' => '',
  8821. 'type' => 'int',
  8822. 'not null' => TRUE,
  8823. ],
  8824. 'type_id' => [
  8825. 'description' => '',
  8826. 'type' => 'int',
  8827. 'not null' => TRUE,
  8828. ],
  8829. 'value' => [
  8830. 'description' => '',
  8831. 'type' => 'text',
  8832. 'not null' => FALSE,
  8833. ],
  8834. 'rank' => [
  8835. 'description' => '',
  8836. 'type' => 'int',
  8837. 'not null' => TRUE,
  8838. 'default' => 0,
  8839. ],
  8840. ],
  8841. 'primary key' => [
  8842. 0 => 'nd_geolocationprop_id',
  8843. ],
  8844. 'unique keys' => [
  8845. 'nd_geolocationprop_c1' => [
  8846. 0 => 'nd_geolocation_id',
  8847. 1 => 'type_id',
  8848. 2 => 'rank',
  8849. ],
  8850. ],
  8851. 'foreign keys' => [
  8852. 'cvterm' => [
  8853. 'table' => 'cvterm',
  8854. 'columns' => [
  8855. 'type_id' => 'cvterm_id',
  8856. ],
  8857. ],
  8858. 'nd_geolocation' => [
  8859. 'table' => 'nd_geolocation',
  8860. 'columns' => [
  8861. 'nd_geolocation_id' => 'nd_geolocation_id',
  8862. ],
  8863. ],
  8864. ],
  8865. 'table' => 'nd_geolocationprop',
  8866. 'referring_tables' => NULL,
  8867. ];
  8868. return $description;
  8869. }
  8870. /**
  8871. * Implements hook_chado_schema_v1_2_nd_protocol()
  8872. * Purpose: To describe the structure of 'nd_protocol' to tripal
  8873. *
  8874. * @see chado_insert_record()
  8875. * @see chado_update_record()
  8876. * @see chado_select_record()
  8877. *
  8878. * @return
  8879. * An array describing the 'nd_protocol' table
  8880. *
  8881. * @ingroup tripal_chado_v1.2_schema_api
  8882. *
  8883. */
  8884. function tripal_chado_chado_schema_v1_2_nd_protocol() {
  8885. $description = [
  8886. 'description' => '',
  8887. 'fields' => [
  8888. 'nd_protocol_id' => [
  8889. 'description' => '',
  8890. 'type' => 'serial',
  8891. 'not null' => TRUE,
  8892. ],
  8893. 'name' => [
  8894. 'description' => '',
  8895. 'type' => 'varchar',
  8896. 'length' => '255',
  8897. 'not null' => TRUE,
  8898. ],
  8899. 'type_id' => [
  8900. 'description' => '',
  8901. 'type' => 'int',
  8902. 'not null' => TRUE,
  8903. ],
  8904. ],
  8905. 'primary key' => [
  8906. 0 => 'nd_protocol_id',
  8907. ],
  8908. 'unique keys' => [
  8909. 'name' => [
  8910. 0 => 'name',
  8911. ],
  8912. ],
  8913. 'foreign keys' => [
  8914. 'cvterm' => [
  8915. 'table' => 'cvterm',
  8916. 'columns' => [
  8917. 'type_id' => 'cvterm_id',
  8918. ],
  8919. ],
  8920. ],
  8921. 'table' => 'nd_protocol',
  8922. 'referring_tables' => [
  8923. 0 => 'nd_experiment_protocol',
  8924. 1 => 'nd_protocol_reagent',
  8925. 2 => 'nd_protocolprop',
  8926. ],
  8927. ];
  8928. return $description;
  8929. }
  8930. /**
  8931. * Implements hook_chado_schema_v1_2_nd_protocol_reagent()
  8932. * Purpose: To describe the structure of 'nd_protocol_reagent' to tripal
  8933. *
  8934. * @see chado_insert_record()
  8935. * @see chado_update_record()
  8936. * @see chado_select_record()
  8937. *
  8938. * @return
  8939. * An array describing the 'nd_protocol_reagent' table
  8940. *
  8941. * @ingroup tripal_chado_v1.2_schema_api
  8942. *
  8943. */
  8944. function tripal_chado_chado_schema_v1_2_nd_protocol_reagent() {
  8945. $description = [
  8946. 'description' => '',
  8947. 'fields' => [
  8948. 'nd_protocol_reagent_id' => [
  8949. 'description' => '',
  8950. 'type' => 'serial',
  8951. 'not null' => TRUE,
  8952. ],
  8953. 'nd_protocol_id' => [
  8954. 'description' => '',
  8955. 'type' => 'int',
  8956. 'not null' => TRUE,
  8957. ],
  8958. 'reagent_id' => [
  8959. 'description' => '',
  8960. 'type' => 'int',
  8961. 'not null' => TRUE,
  8962. ],
  8963. 'type_id' => [
  8964. 'description' => '',
  8965. 'type' => 'int',
  8966. 'not null' => TRUE,
  8967. ],
  8968. ],
  8969. 'primary key' => [
  8970. 0 => 'nd_protocol_reagent_id',
  8971. ],
  8972. 'unique keys' => [],
  8973. 'foreign keys' => [
  8974. 'cvterm' => [
  8975. 'table' => 'cvterm',
  8976. 'columns' => [
  8977. 'type_id' => 'cvterm_id',
  8978. ],
  8979. ],
  8980. 'nd_protocol' => [
  8981. 'table' => 'nd_protocol',
  8982. 'columns' => [
  8983. 'nd_protocol_id' => 'nd_protocol_id',
  8984. ],
  8985. ],
  8986. 'nd_reagent' => [
  8987. 'table' => 'nd_reagent',
  8988. 'columns' => [
  8989. 'reagent_id' => 'nd_reagent_id',
  8990. ],
  8991. ],
  8992. ],
  8993. 'table' => 'nd_protocol_reagent',
  8994. 'referring_tables' => NULL,
  8995. ];
  8996. return $description;
  8997. }
  8998. /**
  8999. * Implements hook_chado_schema_v1_2_nd_protocolprop()
  9000. * Purpose: To describe the structure of 'nd_protocolprop' to tripal
  9001. *
  9002. * @see chado_insert_record()
  9003. * @see chado_update_record()
  9004. * @see chado_select_record()
  9005. *
  9006. * @return
  9007. * An array describing the 'nd_protocolprop' table
  9008. *
  9009. * @ingroup tripal_chado_v1.2_schema_api
  9010. *
  9011. */
  9012. function tripal_chado_chado_schema_v1_2_nd_protocolprop() {
  9013. $description = [
  9014. 'description' => '',
  9015. 'fields' => [
  9016. 'nd_protocolprop_id' => [
  9017. 'description' => '',
  9018. 'type' => 'serial',
  9019. 'not null' => TRUE,
  9020. ],
  9021. 'nd_protocol_id' => [
  9022. 'description' => '',
  9023. 'type' => 'int',
  9024. 'not null' => TRUE,
  9025. ],
  9026. 'type_id' => [
  9027. 'description' => '',
  9028. 'type' => 'int',
  9029. 'not null' => TRUE,
  9030. ],
  9031. 'value' => [
  9032. 'description' => '',
  9033. 'type' => 'text',
  9034. 'not null' => FALSE,
  9035. ],
  9036. 'rank' => [
  9037. 'description' => '',
  9038. 'type' => 'int',
  9039. 'not null' => TRUE,
  9040. 'default' => 0,
  9041. ],
  9042. ],
  9043. 'primary key' => [
  9044. 0 => 'nd_protocolprop_id',
  9045. ],
  9046. 'unique keys' => [
  9047. 'nd_protocolprop_c1' => [
  9048. 0 => 'nd_protocol_id',
  9049. 1 => 'type_id',
  9050. 2 => 'rank',
  9051. ],
  9052. ],
  9053. 'foreign keys' => [
  9054. 'cvterm' => [
  9055. 'table' => 'cvterm',
  9056. 'columns' => [
  9057. 'type_id' => 'cvterm_id',
  9058. ],
  9059. ],
  9060. 'nd_protocol' => [
  9061. 'table' => 'nd_protocol',
  9062. 'columns' => [
  9063. 'nd_protocol_id' => 'nd_protocol_id',
  9064. ],
  9065. ],
  9066. ],
  9067. 'table' => 'nd_protocolprop',
  9068. 'referring_tables' => NULL,
  9069. ];
  9070. return $description;
  9071. }
  9072. /**
  9073. * Implements hook_chado_schema_v1_2_nd_reagent()
  9074. * Purpose: To describe the structure of 'nd_reagent' to tripal
  9075. *
  9076. * @see chado_insert_record()
  9077. * @see chado_update_record()
  9078. * @see chado_select_record()
  9079. *
  9080. * @return
  9081. * An array describing the 'nd_reagent' table
  9082. *
  9083. * @ingroup tripal_chado_v1.2_schema_api
  9084. *
  9085. */
  9086. function tripal_chado_chado_schema_v1_2_nd_reagent() {
  9087. $description = [
  9088. 'description' => '',
  9089. 'fields' => [
  9090. 'nd_reagent_id' => [
  9091. 'description' => '',
  9092. 'type' => 'serial',
  9093. 'not null' => TRUE,
  9094. ],
  9095. 'name' => [
  9096. 'description' => '',
  9097. 'type' => 'varchar',
  9098. 'length' => '80',
  9099. 'not null' => TRUE,
  9100. ],
  9101. 'type_id' => [
  9102. 'description' => '',
  9103. 'type' => 'int',
  9104. 'not null' => TRUE,
  9105. ],
  9106. 'feature_id' => [
  9107. 'description' => '',
  9108. 'type' => 'int',
  9109. 'not null' => FALSE,
  9110. ],
  9111. ],
  9112. 'primary key' => [
  9113. 0 => 'nd_reagent_id',
  9114. ],
  9115. 'unique keys' => [],
  9116. 'foreign keys' => [
  9117. 'cvterm' => [
  9118. 'table' => 'cvterm',
  9119. 'columns' => [
  9120. 'type_id' => 'cvterm_id',
  9121. ],
  9122. ],
  9123. ],
  9124. 'table' => 'nd_reagent',
  9125. 'referring_tables' => [
  9126. 0 => 'nd_protocol_reagent',
  9127. 1 => 'nd_reagent_relationship',
  9128. 3 => 'nd_reagentprop',
  9129. ],
  9130. ];
  9131. return $description;
  9132. }
  9133. /**
  9134. * Implements hook_chado_schema_v1_2_nd_reagent_relationship()
  9135. * Purpose: To describe the structure of 'nd_reagent_relationship' to tripal
  9136. *
  9137. * @see chado_insert_record()
  9138. * @see chado_update_record()
  9139. * @see chado_select_record()
  9140. *
  9141. * @return
  9142. * An array describing the 'nd_reagent_relationship' table
  9143. *
  9144. * @ingroup tripal_chado_v1.2_schema_api
  9145. *
  9146. */
  9147. function tripal_chado_chado_schema_v1_2_nd_reagent_relationship() {
  9148. $description = [
  9149. 'description' => '',
  9150. 'fields' => [
  9151. 'nd_reagent_relationship_id' => [
  9152. 'description' => '',
  9153. 'type' => 'serial',
  9154. 'not null' => TRUE,
  9155. ],
  9156. 'subject_reagent_id' => [
  9157. 'description' => '',
  9158. 'type' => 'int',
  9159. 'not null' => TRUE,
  9160. ],
  9161. 'object_reagent_id' => [
  9162. 'description' => '',
  9163. 'type' => 'int',
  9164. 'not null' => TRUE,
  9165. ],
  9166. 'type_id' => [
  9167. 'description' => '',
  9168. 'type' => 'int',
  9169. 'not null' => TRUE,
  9170. ],
  9171. ],
  9172. 'primary key' => [
  9173. 0 => 'nd_reagent_relationship_id',
  9174. ],
  9175. 'unique keys' => [],
  9176. 'foreign keys' => [
  9177. 'cvterm' => [
  9178. 'table' => 'cvterm',
  9179. 'columns' => [
  9180. 'type_id' => 'cvterm_id',
  9181. ],
  9182. ],
  9183. 'nd_reagent' => [
  9184. 'table' => 'nd_reagent',
  9185. 'columns' => [
  9186. 'subject_reagent_id' => 'nd_reagent_id',
  9187. 'object_reagent_id' => 'nd_reagent_id',
  9188. ],
  9189. ],
  9190. ],
  9191. 'table' => 'nd_reagent_relationship',
  9192. 'referring_tables' => NULL,
  9193. ];
  9194. return $description;
  9195. }
  9196. /**
  9197. * Implements hook_chado_schema_v1_2_nd_reagentprop()
  9198. * Purpose: To describe the structure of 'nd_reagentprop' to tripal
  9199. *
  9200. * @see chado_insert_record()
  9201. * @see chado_update_record()
  9202. * @see chado_select_record()
  9203. *
  9204. * @return
  9205. * An array describing the 'nd_reagentprop' table
  9206. *
  9207. * @ingroup tripal_chado_v1.2_schema_api
  9208. *
  9209. */
  9210. function tripal_chado_chado_schema_v1_2_nd_reagentprop() {
  9211. $description = [
  9212. 'description' => '',
  9213. 'fields' => [
  9214. 'nd_reagentprop_id' => [
  9215. 'description' => '',
  9216. 'type' => 'serial',
  9217. 'not null' => TRUE,
  9218. ],
  9219. 'nd_reagent_id' => [
  9220. 'description' => '',
  9221. 'type' => 'int',
  9222. 'not null' => TRUE,
  9223. ],
  9224. 'type_id' => [
  9225. 'description' => '',
  9226. 'type' => 'int',
  9227. 'not null' => TRUE,
  9228. ],
  9229. 'value' => [
  9230. 'description' => '',
  9231. 'type' => 'text',
  9232. 'not null' => FALSE,
  9233. ],
  9234. 'rank' => [
  9235. 'description' => '',
  9236. 'type' => 'int',
  9237. 'not null' => TRUE,
  9238. 'default' => 0,
  9239. ],
  9240. ],
  9241. 'primary key' => [
  9242. 0 => 'nd_reagentprop_id',
  9243. ],
  9244. 'unique keys' => [
  9245. 'nd_reagentprop_c1' => [
  9246. 0 => 'nd_reagent_id',
  9247. 1 => 'type_id',
  9248. 2 => 'rank',
  9249. ],
  9250. ],
  9251. 'foreign keys' => [
  9252. 'cvterm' => [
  9253. 'table' => 'cvterm',
  9254. 'columns' => [
  9255. 'type_id' => 'cvterm_id',
  9256. ],
  9257. ],
  9258. 'nd_reagent' => [
  9259. 'table' => 'nd_reagent',
  9260. 'columns' => [
  9261. 'nd_reagent_id' => 'nd_reagent_id',
  9262. ],
  9263. ],
  9264. ],
  9265. 'table' => 'nd_reagentprop',
  9266. 'referring_tables' => NULL,
  9267. ];
  9268. return $description;
  9269. }
  9270. /**
  9271. * Implements hook_chado_schema_v1_2_organism()
  9272. * Purpose: To describe the structure of 'organism' to tripal
  9273. *
  9274. * @see chado_insert_record()
  9275. * @see chado_update_record()
  9276. * @see chado_select_record()
  9277. *
  9278. * @return
  9279. * An array describing the 'organism' table
  9280. *
  9281. * @ingroup tripal_chado_v1.2_schema_api
  9282. *
  9283. */
  9284. function tripal_chado_chado_schema_v1_2_organism() {
  9285. $description = [
  9286. 'description' => '',
  9287. 'fields' => [
  9288. 'organism_id' => [
  9289. 'description' => '',
  9290. 'type' => 'serial',
  9291. 'not null' => TRUE,
  9292. ],
  9293. 'abbreviation' => [
  9294. 'description' => '',
  9295. 'type' => 'varchar',
  9296. 'length' => '255',
  9297. 'not null' => FALSE,
  9298. ],
  9299. 'genus' => [
  9300. 'description' => '',
  9301. 'type' => 'varchar',
  9302. 'length' => '255',
  9303. 'not null' => TRUE,
  9304. ],
  9305. 'species' => [
  9306. 'description' => '',
  9307. 'type' => 'varchar',
  9308. 'length' => '255',
  9309. 'not null' => TRUE,
  9310. ],
  9311. 'common_name' => [
  9312. 'description' => '',
  9313. 'type' => 'varchar',
  9314. 'length' => '255',
  9315. 'not null' => FALSE,
  9316. ],
  9317. 'comment' => [
  9318. 'description' => '',
  9319. 'type' => 'text',
  9320. 'not null' => FALSE,
  9321. ],
  9322. ],
  9323. 'primary key' => [
  9324. 0 => 'organism_id',
  9325. ],
  9326. 'unique keys' => [
  9327. 'organism_c1' => [
  9328. 0 => 'genus',
  9329. 1 => 'species',
  9330. ],
  9331. ],
  9332. 'foreign keys' => [
  9333. ],
  9334. 'referring_tables' => [
  9335. 0 => 'biomaterial',
  9336. 1 => 'cell_line',
  9337. 2 => 'feature',
  9338. 3 => 'library',
  9339. 4 => 'organism_dbxref',
  9340. 5 => 'organismprop',
  9341. 6 => 'phenotype_comparison',
  9342. 7 => 'phylonode_organism',
  9343. 8 => 'stock',
  9344. ],
  9345. 'table' => 'organism',
  9346. ];
  9347. return $description;
  9348. }
  9349. /**
  9350. * Implements hook_chado_schema_v1_2_organism_dbxref()
  9351. * Purpose: To describe the structure of 'organism_dbxref' to tripal
  9352. *
  9353. * @see chado_insert_record()
  9354. * @see chado_update_record()
  9355. * @see chado_select_record()
  9356. *
  9357. * @return
  9358. * An array describing the 'organism_dbxref' table
  9359. *
  9360. * @ingroup tripal_chado_v1.2_schema_api
  9361. *
  9362. */
  9363. function tripal_chado_chado_schema_v1_2_organism_dbxref() {
  9364. $description = [
  9365. 'description' => '',
  9366. 'fields' => [
  9367. 'organism_dbxref_id' => [
  9368. 'description' => '',
  9369. 'type' => 'serial',
  9370. 'not null' => TRUE,
  9371. ],
  9372. 'organism_id' => [
  9373. 'description' => '',
  9374. 'type' => 'int',
  9375. 'not null' => TRUE,
  9376. ],
  9377. 'dbxref_id' => [
  9378. 'description' => '',
  9379. 'type' => 'int',
  9380. 'not null' => TRUE,
  9381. ],
  9382. ],
  9383. 'primary key' => [
  9384. 0 => 'organism_dbxref_id',
  9385. ],
  9386. 'unique keys' => [
  9387. 'organism_dbxref_c1' => [
  9388. 0 => 'organism_id',
  9389. 1 => 'dbxref_id',
  9390. ],
  9391. ],
  9392. 'indexes' => [
  9393. 'organism_dbxref_idx1' => [
  9394. 0 => 'organism_id',
  9395. ],
  9396. 'organism_dbxref_idx2' => [
  9397. 0 => 'dbxref_id',
  9398. ],
  9399. ],
  9400. 'foreign keys' => [
  9401. 'organism' => [
  9402. 'table' => 'organism',
  9403. 'columns' => [
  9404. 'organism_id' => 'organism_id',
  9405. ],
  9406. ],
  9407. 'dbxref' => [
  9408. 'table' => 'dbxref',
  9409. 'columns' => [
  9410. 'dbxref_id' => 'dbxref_id',
  9411. ],
  9412. ],
  9413. ],
  9414. 'table' => 'organism_dbxref',
  9415. 'referring_tables' => NULL,
  9416. ];
  9417. return $description;
  9418. }
  9419. /**
  9420. * Implements hook_chado_schema_v1_2_organismprop()
  9421. * Purpose: To describe the structure of 'organismprop' to tripal
  9422. *
  9423. * @see chado_insert_record()
  9424. * @see chado_update_record()
  9425. * @see chado_select_record()
  9426. *
  9427. * @return
  9428. * An array describing the 'organismprop' table
  9429. *
  9430. * @ingroup tripal_chado_v1.2_schema_api
  9431. *
  9432. */
  9433. function tripal_chado_chado_schema_v1_2_organismprop() {
  9434. $description = [
  9435. 'description' => '',
  9436. 'fields' => [
  9437. 'organismprop_id' => [
  9438. 'description' => '',
  9439. 'type' => 'serial',
  9440. 'not null' => TRUE,
  9441. ],
  9442. 'organism_id' => [
  9443. 'description' => '',
  9444. 'type' => 'int',
  9445. 'not null' => TRUE,
  9446. ],
  9447. 'type_id' => [
  9448. 'description' => '',
  9449. 'type' => 'int',
  9450. 'not null' => TRUE,
  9451. ],
  9452. 'value' => [
  9453. 'description' => '',
  9454. 'type' => 'text',
  9455. 'not null' => FALSE,
  9456. ],
  9457. 'rank' => [
  9458. 'description' => '',
  9459. 'type' => 'int',
  9460. 'not null' => TRUE,
  9461. 'default' => 0,
  9462. ],
  9463. ],
  9464. 'primary key' => [
  9465. 0 => 'organismprop_id',
  9466. ],
  9467. 'unique keys' => [
  9468. 'organismprop_c1' => [
  9469. 0 => 'organism_id',
  9470. 1 => 'type_id',
  9471. 2 => 'rank',
  9472. ],
  9473. ],
  9474. 'indexes' => [
  9475. 'organismprop_idx1' => [
  9476. 0 => 'organism_id',
  9477. ],
  9478. 'organismprop_idx2' => [
  9479. 0 => 'type_id',
  9480. ],
  9481. ],
  9482. 'foreign keys' => [
  9483. 'organism' => [
  9484. 'table' => 'organism',
  9485. 'columns' => [
  9486. 'organism_id' => 'organism_id',
  9487. ],
  9488. ],
  9489. 'cvterm' => [
  9490. 'table' => 'cvterm',
  9491. 'columns' => [
  9492. 'type_id' => 'cvterm_id',
  9493. ],
  9494. ],
  9495. ],
  9496. 'table' => 'organismprop',
  9497. 'referring_tables' => NULL,
  9498. ];
  9499. return $description;
  9500. }
  9501. /**
  9502. * Implements hook_chado_schema_v1_2_phendesc()
  9503. * Purpose: To describe the structure of 'phendesc' to tripal
  9504. *
  9505. * @see chado_insert_record()
  9506. * @see chado_update_record()
  9507. * @see chado_select_record()
  9508. *
  9509. * @return
  9510. * An array describing the 'phendesc' table
  9511. *
  9512. * @ingroup tripal_chado_v1.2_schema_api
  9513. *
  9514. */
  9515. function tripal_chado_chado_schema_v1_2_phendesc() {
  9516. $description = [
  9517. 'description' => '',
  9518. 'fields' => [
  9519. 'phendesc_id' => [
  9520. 'description' => '',
  9521. 'type' => 'serial',
  9522. 'not null' => TRUE,
  9523. ],
  9524. 'genotype_id' => [
  9525. 'description' => '',
  9526. 'type' => 'int',
  9527. 'not null' => TRUE,
  9528. ],
  9529. 'environment_id' => [
  9530. 'description' => '',
  9531. 'type' => 'int',
  9532. 'not null' => TRUE,
  9533. ],
  9534. 'description' => [
  9535. 'description' => '',
  9536. 'type' => 'text',
  9537. 'not null' => TRUE,
  9538. ],
  9539. 'type_id' => [
  9540. 'description' => '',
  9541. 'type' => 'int',
  9542. 'not null' => TRUE,
  9543. ],
  9544. 'pub_id' => [
  9545. 'description' => '',
  9546. 'type' => 'int',
  9547. 'not null' => TRUE,
  9548. ],
  9549. ],
  9550. 'primary key' => [
  9551. 0 => 'phendesc_id',
  9552. ],
  9553. 'unique keys' => [
  9554. 'phendesc_c1' => [
  9555. 0 => 'genotype_id',
  9556. 1 => 'environment_id',
  9557. 2 => 'type_id',
  9558. 3 => 'pub_id',
  9559. ],
  9560. ],
  9561. 'indexes' => [
  9562. 'phendesc_idx1' => [
  9563. 0 => 'genotype_id',
  9564. ],
  9565. 'phendesc_idx2' => [
  9566. 0 => 'environment_id',
  9567. ],
  9568. 'phendesc_idx3' => [
  9569. 0 => 'pub_id',
  9570. ],
  9571. ],
  9572. 'foreign keys' => [
  9573. 'cvterm' => [
  9574. 'table' => 'cvterm',
  9575. 'columns' => [
  9576. 'type_id' => 'cvterm_id',
  9577. ],
  9578. ],
  9579. 'pub' => [
  9580. 'table' => 'pub',
  9581. 'columns' => [
  9582. 'pub_id' => 'pub_id',
  9583. ],
  9584. ],
  9585. 'genotype' => [
  9586. 'table' => 'genotype',
  9587. 'columns' => [
  9588. 'genotype_id' => 'genotype_id',
  9589. ],
  9590. ],
  9591. 'environment' => [
  9592. 'table' => 'environment',
  9593. 'columns' => [
  9594. 'environment_id' => 'environment_id',
  9595. ],
  9596. ],
  9597. ],
  9598. 'table' => 'phendesc',
  9599. 'referring_tables' => NULL,
  9600. ];
  9601. return $description;
  9602. }
  9603. /**
  9604. * Implements hook_chado_schema_v1_2_phenotype()
  9605. * Purpose: To describe the structure of 'phenotype' to tripal
  9606. *
  9607. * @see chado_insert_record()
  9608. * @see chado_update_record()
  9609. * @see chado_select_record()
  9610. *
  9611. * @return
  9612. * An array describing the 'phenotype' table
  9613. *
  9614. * @ingroup tripal_chado_v1.2_schema_api
  9615. *
  9616. */
  9617. function tripal_chado_chado_schema_v1_2_phenotype() {
  9618. $description = [
  9619. 'description' => '',
  9620. 'fields' => [
  9621. 'phenotype_id' => [
  9622. 'description' => '',
  9623. 'type' => 'serial',
  9624. 'not null' => TRUE,
  9625. ],
  9626. 'uniquename' => [
  9627. 'description' => '',
  9628. 'type' => 'text',
  9629. 'not null' => TRUE,
  9630. ],
  9631. 'name' => [
  9632. 'description' => '',
  9633. 'type' => 'text',
  9634. 'not null' => FALSE,
  9635. ],
  9636. 'observable_id' => [
  9637. 'description' => '',
  9638. 'type' => 'int',
  9639. 'not null' => FALSE,
  9640. ],
  9641. 'attr_id' => [
  9642. 'description' => '',
  9643. 'type' => 'int',
  9644. 'not null' => FALSE,
  9645. ],
  9646. 'value' => [
  9647. 'description' => '',
  9648. 'type' => 'text',
  9649. 'not null' => FALSE,
  9650. ],
  9651. 'cvalue_id' => [
  9652. 'description' => '',
  9653. 'type' => 'int',
  9654. 'not null' => FALSE,
  9655. ],
  9656. 'assay_id' => [
  9657. 'description' => '',
  9658. 'type' => 'int',
  9659. 'not null' => FALSE,
  9660. ],
  9661. ],
  9662. 'primary key' => [
  9663. 0 => 'phenotype_id',
  9664. ],
  9665. 'unique keys' => [
  9666. 'phenotype_c1' => [
  9667. 0 => 'uniquename',
  9668. ],
  9669. ],
  9670. 'indexes' => [
  9671. 'phenotype_idx1' => [
  9672. 0 => 'cvalue_id',
  9673. ],
  9674. 'phenotype_idx2' => [
  9675. 0 => 'observable_id',
  9676. ],
  9677. 'phenotype_idx3' => [
  9678. 0 => 'attr_id',
  9679. ],
  9680. ],
  9681. 'foreign keys' => [
  9682. 'cvterm' => [
  9683. 'table' => 'cvterm',
  9684. 'columns' => [
  9685. 'observable_id' => 'cvterm_id',
  9686. 'attr_id' => 'cvterm_id',
  9687. 'cvalue_id' => 'cvterm_id',
  9688. 'assay_id' => 'cvterm_id',
  9689. ],
  9690. ],
  9691. ],
  9692. 'table' => 'phenotype',
  9693. 'referring_tables' => [
  9694. 0 => 'feature_phenotype',
  9695. 1 => 'nd_experiment_phenotype',
  9696. 2 => 'phenotype_comparison',
  9697. 4 => 'phenotype_cvterm',
  9698. 5 => 'phenstatement',
  9699. ],
  9700. ];
  9701. return $description;
  9702. }
  9703. /**
  9704. * Implements hook_chado_schema_v1_2_phenotype_comparison()
  9705. * Purpose: To describe the structure of 'phenotype_comparison' to tripal
  9706. *
  9707. * @see chado_insert_record()
  9708. * @see chado_update_record()
  9709. * @see chado_select_record()
  9710. *
  9711. * @return
  9712. * An array describing the 'phenotype_comparison' table
  9713. *
  9714. * @ingroup tripal_chado_v1.2_schema_api
  9715. *
  9716. */
  9717. function tripal_chado_chado_schema_v1_2_phenotype_comparison() {
  9718. $description = [
  9719. 'description' => '',
  9720. 'fields' => [
  9721. 'phenotype_comparison_id' => [
  9722. 'description' => '',
  9723. 'type' => 'serial',
  9724. 'not null' => TRUE,
  9725. ],
  9726. 'genotype1_id' => [
  9727. 'description' => '',
  9728. 'type' => 'int',
  9729. 'not null' => TRUE,
  9730. ],
  9731. 'environment1_id' => [
  9732. 'description' => '',
  9733. 'type' => 'int',
  9734. 'not null' => TRUE,
  9735. ],
  9736. 'genotype2_id' => [
  9737. 'description' => '',
  9738. 'type' => 'int',
  9739. 'not null' => TRUE,
  9740. ],
  9741. 'environment2_id' => [
  9742. 'description' => '',
  9743. 'type' => 'int',
  9744. 'not null' => TRUE,
  9745. ],
  9746. 'phenotype1_id' => [
  9747. 'description' => '',
  9748. 'type' => 'int',
  9749. 'not null' => TRUE,
  9750. ],
  9751. 'phenotype2_id' => [
  9752. 'description' => '',
  9753. 'type' => 'int',
  9754. 'not null' => FALSE,
  9755. ],
  9756. 'pub_id' => [
  9757. 'description' => '',
  9758. 'type' => 'int',
  9759. 'not null' => TRUE,
  9760. ],
  9761. 'organism_id' => [
  9762. 'description' => '',
  9763. 'type' => 'int',
  9764. 'not null' => TRUE,
  9765. ],
  9766. ],
  9767. 'primary key' => [
  9768. 0 => 'phenotype_comparison_id',
  9769. ],
  9770. 'unique keys' => [
  9771. 'phenotype_comparison_c1' => [
  9772. 0 => 'genotype1_id',
  9773. 1 => 'environment1_id',
  9774. 2 => 'genotype2_id',
  9775. 3 => 'environment2_id',
  9776. 4 => 'phenotype1_id',
  9777. 5 => 'pub_id',
  9778. ],
  9779. ],
  9780. 'indexes' => [
  9781. 'phenotype_comparison_idx1' => [
  9782. 0 => 'genotype1_id',
  9783. ],
  9784. 'phenotype_comparison_idx2' => [
  9785. 0 => 'genotype2_id',
  9786. ],
  9787. 'phenotype_comparison_idx4' => [
  9788. 0 => 'pub_id',
  9789. ],
  9790. ],
  9791. 'foreign keys' => [
  9792. 'organism' => [
  9793. 'table' => 'organism',
  9794. 'columns' => [
  9795. 'organism_id' => 'organism_id',
  9796. ],
  9797. ],
  9798. 'pub' => [
  9799. 'table' => 'pub',
  9800. 'columns' => [
  9801. 'pub_id' => 'pub_id',
  9802. ],
  9803. ],
  9804. 'genotype' => [
  9805. 'table' => 'genotype',
  9806. 'columns' => [
  9807. 'genotype1_id' => 'genotype_id',
  9808. 'genotype2_id' => 'genotype_id',
  9809. ],
  9810. ],
  9811. 'environment' => [
  9812. 'table' => 'environment',
  9813. 'columns' => [
  9814. 'environment1_id' => 'environment_id',
  9815. 'environment2_id' => 'environment_id',
  9816. ],
  9817. ],
  9818. 'phenotype' => [
  9819. 'table' => 'phenotype',
  9820. 'columns' => [
  9821. 'phenotype1_id' => 'phenotype_id',
  9822. 'phenotype2_id' => 'phenotype_id',
  9823. ],
  9824. ],
  9825. ],
  9826. 'table' => 'phenotype_comparison',
  9827. 'referring_tables' => [
  9828. 0 => 'phenotype_comparison_cvterm',
  9829. ],
  9830. ];
  9831. return $description;
  9832. }
  9833. /**
  9834. * Implements hook_chado_schema_v1_2_phenotype_comparison_cvterm()
  9835. * Purpose: To describe the structure of 'phenotype_comparison_cvterm' to tripal
  9836. *
  9837. * @see chado_insert_record()
  9838. * @see chado_update_record()
  9839. * @see chado_select_record()
  9840. *
  9841. * @return
  9842. * An array describing the 'phenotype_comparison_cvterm' table
  9843. *
  9844. * @ingroup tripal_chado_v1.2_schema_api
  9845. *
  9846. */
  9847. function tripal_chado_chado_schema_v1_2_phenotype_comparison_cvterm() {
  9848. $description = [
  9849. 'description' => '',
  9850. 'fields' => [
  9851. 'phenotype_comparison_cvterm_id' => [
  9852. 'description' => '',
  9853. 'type' => 'serial',
  9854. 'not null' => TRUE,
  9855. ],
  9856. 'phenotype_comparison_id' => [
  9857. 'description' => '',
  9858. 'type' => 'int',
  9859. 'not null' => TRUE,
  9860. ],
  9861. 'cvterm_id' => [
  9862. 'description' => '',
  9863. 'type' => 'int',
  9864. 'not null' => TRUE,
  9865. ],
  9866. 'pub_id' => [
  9867. 'description' => '',
  9868. 'type' => 'int',
  9869. 'not null' => TRUE,
  9870. ],
  9871. 'rank' => [
  9872. 'description' => '',
  9873. 'type' => 'int',
  9874. 'not null' => TRUE,
  9875. 'default' => 0,
  9876. ],
  9877. ],
  9878. 'primary key' => [
  9879. 0 => 'phenotype_comparison_cvterm_id',
  9880. ],
  9881. 'unique keys' => [
  9882. 'phenotype_comparison_cvterm_c1' => [
  9883. 0 => 'phenotype_comparison_id',
  9884. 1 => 'cvterm_id',
  9885. ],
  9886. ],
  9887. 'indexes' => [
  9888. 'phenotype_comparison_cvterm_idx1' => [
  9889. 0 => 'phenotype_comparison_id',
  9890. ],
  9891. 'phenotype_comparison_cvterm_idx2' => [
  9892. 0 => 'cvterm_id',
  9893. ],
  9894. ],
  9895. 'foreign keys' => [
  9896. 'cvterm' => [
  9897. 'table' => 'cvterm',
  9898. 'columns' => [
  9899. 'cvterm_id' => 'cvterm_id',
  9900. ],
  9901. ],
  9902. 'pub' => [
  9903. 'table' => 'pub',
  9904. 'columns' => [
  9905. 'pub_id' => 'pub_id',
  9906. ],
  9907. ],
  9908. 'phenotype_comparison' => [
  9909. 'table' => 'phenotype_comparison',
  9910. 'columns' => [
  9911. 'phenotype_comparison_id' => 'phenotype_comparison_id',
  9912. ],
  9913. ],
  9914. ],
  9915. 'table' => 'phenotype_comparison_cvterm',
  9916. 'referring_tables' => NULL,
  9917. ];
  9918. return $description;
  9919. }
  9920. /**
  9921. * Implements hook_chado_schema_v1_2_phenotype_cvterm()
  9922. * Purpose: To describe the structure of 'phenotype_cvterm' to tripal
  9923. *
  9924. * @see chado_insert_record()
  9925. * @see chado_update_record()
  9926. * @see chado_select_record()
  9927. *
  9928. * @return
  9929. * An array describing the 'phenotype_cvterm' table
  9930. *
  9931. * @ingroup tripal_chado_v1.2_schema_api
  9932. *
  9933. */
  9934. function tripal_chado_chado_schema_v1_2_phenotype_cvterm() {
  9935. $description = [
  9936. 'description' => '',
  9937. 'fields' => [
  9938. 'phenotype_cvterm_id' => [
  9939. 'description' => '',
  9940. 'type' => 'serial',
  9941. 'not null' => TRUE,
  9942. ],
  9943. 'phenotype_id' => [
  9944. 'description' => '',
  9945. 'type' => 'int',
  9946. 'not null' => TRUE,
  9947. ],
  9948. 'cvterm_id' => [
  9949. 'description' => '',
  9950. 'type' => 'int',
  9951. 'not null' => TRUE,
  9952. ],
  9953. 'rank' => [
  9954. 'description' => '',
  9955. 'type' => 'int',
  9956. 'not null' => TRUE,
  9957. 'default' => 0,
  9958. ],
  9959. ],
  9960. 'primary key' => [
  9961. 0 => 'phenotype_cvterm_id',
  9962. ],
  9963. 'unique keys' => [
  9964. 'phenotype_cvterm_c1' => [
  9965. 0 => 'phenotype_id',
  9966. 1 => 'cvterm_id',
  9967. 2 => 'rank',
  9968. ],
  9969. ],
  9970. 'indexes' => [
  9971. 'phenotype_cvterm_idx1' => [
  9972. 0 => 'phenotype_id',
  9973. ],
  9974. 'phenotype_cvterm_idx2' => [
  9975. 0 => 'cvterm_id',
  9976. ],
  9977. ],
  9978. 'foreign keys' => [
  9979. 'cvterm' => [
  9980. 'table' => 'cvterm',
  9981. 'columns' => [
  9982. 'cvterm_id' => 'cvterm_id',
  9983. ],
  9984. ],
  9985. 'phenotype' => [
  9986. 'table' => 'phenotype',
  9987. 'columns' => [
  9988. 'phenotype_id' => 'phenotype_id',
  9989. ],
  9990. ],
  9991. ],
  9992. 'table' => 'phenotype_cvterm',
  9993. 'referring_tables' => NULL,
  9994. ];
  9995. return $description;
  9996. }
  9997. /**
  9998. * Implements hook_chado_schema_v1_2_phenstatement()
  9999. * Purpose: To describe the structure of 'phenstatement' to tripal
  10000. *
  10001. * @see chado_insert_record()
  10002. * @see chado_update_record()
  10003. * @see chado_select_record()
  10004. *
  10005. * @return
  10006. * An array describing the 'phenstatement' table
  10007. *
  10008. * @ingroup tripal_chado_v1.2_schema_api
  10009. *
  10010. */
  10011. function tripal_chado_chado_schema_v1_2_phenstatement() {
  10012. $description = [
  10013. 'description' => '',
  10014. 'fields' => [
  10015. 'phenstatement_id' => [
  10016. 'description' => '',
  10017. 'type' => 'serial',
  10018. 'not null' => TRUE,
  10019. ],
  10020. 'genotype_id' => [
  10021. 'description' => '',
  10022. 'type' => 'int',
  10023. 'not null' => TRUE,
  10024. ],
  10025. 'environment_id' => [
  10026. 'description' => '',
  10027. 'type' => 'int',
  10028. 'not null' => TRUE,
  10029. ],
  10030. 'phenotype_id' => [
  10031. 'description' => '',
  10032. 'type' => 'int',
  10033. 'not null' => TRUE,
  10034. ],
  10035. 'type_id' => [
  10036. 'description' => '',
  10037. 'type' => 'int',
  10038. 'not null' => TRUE,
  10039. ],
  10040. 'pub_id' => [
  10041. 'description' => '',
  10042. 'type' => 'int',
  10043. 'not null' => TRUE,
  10044. ],
  10045. ],
  10046. 'primary key' => [
  10047. 0 => 'phenstatement_id',
  10048. ],
  10049. 'unique keys' => [
  10050. 'phenstatement_c1' => [
  10051. 0 => 'genotype_id',
  10052. 1 => 'phenotype_id',
  10053. 2 => 'environment_id',
  10054. 3 => 'type_id',
  10055. 4 => 'pub_id',
  10056. ],
  10057. ],
  10058. 'indexes' => [
  10059. 'phenstatement_idx1' => [
  10060. 0 => 'genotype_id',
  10061. ],
  10062. 'phenstatement_idx2' => [
  10063. 0 => 'phenotype_id',
  10064. ],
  10065. ],
  10066. 'foreign keys' => [
  10067. 'cvterm' => [
  10068. 'table' => 'cvterm',
  10069. 'columns' => [
  10070. 'type_id' => 'cvterm_id',
  10071. ],
  10072. ],
  10073. 'pub' => [
  10074. 'table' => 'pub',
  10075. 'columns' => [
  10076. 'pub_id' => 'pub_id',
  10077. ],
  10078. ],
  10079. 'genotype' => [
  10080. 'table' => 'genotype',
  10081. 'columns' => [
  10082. 'genotype_id' => 'genotype_id',
  10083. ],
  10084. ],
  10085. 'environment' => [
  10086. 'table' => 'environment',
  10087. 'columns' => [
  10088. 'environment_id' => 'environment_id',
  10089. ],
  10090. ],
  10091. 'phenotype' => [
  10092. 'table' => 'phenotype',
  10093. 'columns' => [
  10094. 'phenotype_id' => 'phenotype_id',
  10095. ],
  10096. ],
  10097. ],
  10098. 'table' => 'phenstatement',
  10099. 'referring_tables' => NULL,
  10100. ];
  10101. return $description;
  10102. }
  10103. /**
  10104. * Implements hook_chado_schema_v1_2_phylonode()
  10105. * Purpose: To describe the structure of 'phylonode' to tripal
  10106. *
  10107. * @see chado_insert_record()
  10108. * @see chado_update_record()
  10109. * @see chado_select_record()
  10110. *
  10111. * @return
  10112. * An array describing the 'phylonode' table
  10113. *
  10114. * @ingroup tripal_chado_v1.2_schema_api
  10115. *
  10116. */
  10117. function tripal_chado_chado_schema_v1_2_phylonode() {
  10118. $description = [
  10119. 'description' => '',
  10120. 'fields' => [
  10121. 'phylonode_id' => [
  10122. 'description' => '',
  10123. 'type' => 'serial',
  10124. 'not null' => TRUE,
  10125. ],
  10126. 'phylotree_id' => [
  10127. 'description' => '',
  10128. 'type' => 'int',
  10129. 'not null' => TRUE,
  10130. ],
  10131. 'parent_phylonode_id' => [
  10132. 'description' => '',
  10133. 'type' => 'int',
  10134. 'not null' => FALSE,
  10135. ],
  10136. 'left_idx' => [
  10137. 'description' => '',
  10138. 'type' => 'int',
  10139. 'not null' => TRUE,
  10140. ],
  10141. 'right_idx' => [
  10142. 'description' => '',
  10143. 'type' => 'int',
  10144. 'not null' => TRUE,
  10145. ],
  10146. 'type_id' => [
  10147. 'description' => '',
  10148. 'type' => 'int',
  10149. 'not null' => FALSE,
  10150. ],
  10151. 'feature_id' => [
  10152. 'description' => '',
  10153. 'type' => 'int',
  10154. 'not null' => FALSE,
  10155. ],
  10156. 'label' => [
  10157. 'description' => '',
  10158. 'type' => 'varchar',
  10159. 'length' => '255',
  10160. 'not null' => FALSE,
  10161. ],
  10162. 'distance' => [
  10163. 'description' => '',
  10164. 'type' => 'float',
  10165. 'size' => 'big',
  10166. 'not null' => FALSE,
  10167. ],
  10168. ],
  10169. 'primary key' => [
  10170. 0 => 'phylonode_id',
  10171. ],
  10172. 'unique keys' => [
  10173. 'phylotree_id' => [
  10174. 0 => 'phylotree_id',
  10175. 1 => 'left_idx',
  10176. ],
  10177. 'phylonode_phylotree_id_key1' => [
  10178. 0 => 'phylotree_id',
  10179. 1 => 'right_idx',
  10180. ],
  10181. ],
  10182. 'foreign keys' => [
  10183. 'cvterm' => [
  10184. 'table' => 'cvterm',
  10185. 'columns' => [
  10186. 'type_id' => 'cvterm_id',
  10187. ],
  10188. ],
  10189. 'feature' => [
  10190. 'table' => 'feature',
  10191. 'columns' => [
  10192. 'feature_id' => 'feature_id',
  10193. ],
  10194. ],
  10195. 'phylonode' => [
  10196. 'table' => 'phylonode',
  10197. 'columns' => [
  10198. 'parent_phylonode_id' => 'phylonode_id',
  10199. ],
  10200. ],
  10201. 'phylotree' => [
  10202. 'table' => 'phylotree',
  10203. 'columns' => [
  10204. 'phylotree_id' => 'phylotree_id',
  10205. ],
  10206. ],
  10207. ],
  10208. 'table' => 'phylonode',
  10209. 'referring_tables' => [
  10210. 0 => 'phylonode',
  10211. 1 => 'phylonode_dbxref',
  10212. 2 => 'phylonode_organism',
  10213. 3 => 'phylonode_pub',
  10214. 4 => 'phylonode_relationship',
  10215. 6 => 'phylonodeprop',
  10216. ],
  10217. ];
  10218. return $description;
  10219. }
  10220. /**
  10221. * Implements hook_chado_schema_v1_2_phylonode_dbxref()
  10222. * Purpose: To describe the structure of 'phylonode_dbxref' to tripal
  10223. *
  10224. * @see chado_insert_record()
  10225. * @see chado_update_record()
  10226. * @see chado_select_record()
  10227. *
  10228. * @return
  10229. * An array describing the 'phylonode_dbxref' table
  10230. *
  10231. * @ingroup tripal_chado_v1.2_schema_api
  10232. *
  10233. */
  10234. function tripal_chado_chado_schema_v1_2_phylonode_dbxref() {
  10235. $description = [
  10236. 'description' => '',
  10237. 'fields' => [
  10238. 'phylonode_dbxref_id' => [
  10239. 'description' => '',
  10240. 'type' => 'serial',
  10241. 'not null' => TRUE,
  10242. ],
  10243. 'phylonode_id' => [
  10244. 'description' => '',
  10245. 'type' => 'int',
  10246. 'not null' => TRUE,
  10247. ],
  10248. 'dbxref_id' => [
  10249. 'description' => '',
  10250. 'type' => 'int',
  10251. 'not null' => TRUE,
  10252. ],
  10253. ],
  10254. 'primary key' => [
  10255. 0 => 'phylonode_dbxref_id',
  10256. ],
  10257. 'unique keys' => [
  10258. 'phylonode_id' => [
  10259. 0 => 'phylonode_id',
  10260. 1 => 'dbxref_id',
  10261. ],
  10262. ],
  10263. 'indexes' => [
  10264. 'phylonode_dbxref_idx1' => [
  10265. 0 => 'phylonode_id',
  10266. ],
  10267. 'phylonode_dbxref_idx2' => [
  10268. 0 => 'dbxref_id',
  10269. ],
  10270. ],
  10271. 'foreign keys' => [
  10272. 'dbxref' => [
  10273. 'table' => 'dbxref',
  10274. 'columns' => [
  10275. 'dbxref_id' => 'dbxref_id',
  10276. ],
  10277. ],
  10278. 'phylonode' => [
  10279. 'table' => 'phylonode',
  10280. 'columns' => [
  10281. 'phylonode_id' => 'phylonode_id',
  10282. ],
  10283. ],
  10284. ],
  10285. 'table' => 'phylonode_dbxref',
  10286. 'referring_tables' => NULL,
  10287. ];
  10288. return $description;
  10289. }
  10290. /**
  10291. * Implements hook_chado_schema_v1_2_phylonode_organism()
  10292. * Purpose: To describe the structure of 'phylonode_organism' to tripal
  10293. *
  10294. * @see chado_insert_record()
  10295. * @see chado_update_record()
  10296. * @see chado_select_record()
  10297. *
  10298. * @return
  10299. * An array describing the 'phylonode_organism' table
  10300. *
  10301. * @ingroup tripal_chado_v1.2_schema_api
  10302. *
  10303. */
  10304. function tripal_chado_chado_schema_v1_2_phylonode_organism() {
  10305. $description = [
  10306. 'description' => '',
  10307. 'fields' => [
  10308. 'phylonode_organism_id' => [
  10309. 'description' => '',
  10310. 'type' => 'serial',
  10311. 'not null' => TRUE,
  10312. ],
  10313. 'phylonode_id' => [
  10314. 'description' => '',
  10315. 'type' => 'int',
  10316. 'not null' => TRUE,
  10317. ],
  10318. 'organism_id' => [
  10319. 'description' => '',
  10320. 'type' => 'int',
  10321. 'not null' => TRUE,
  10322. ],
  10323. ],
  10324. 'primary key' => [
  10325. 0 => 'phylonode_organism_id',
  10326. ],
  10327. 'unique keys' => [
  10328. 'phylonode_id' => [
  10329. 0 => 'phylonode_id',
  10330. ],
  10331. ],
  10332. 'indexes' => [
  10333. 'phylonode_organism_idx1' => [
  10334. 0 => 'phylonode_id',
  10335. ],
  10336. 'phylonode_organism_idx2' => [
  10337. 0 => 'organism_id',
  10338. ],
  10339. ],
  10340. 'foreign keys' => [
  10341. 'organism' => [
  10342. 'table' => 'organism',
  10343. 'columns' => [
  10344. 'organism_id' => 'organism_id',
  10345. ],
  10346. ],
  10347. 'phylonode' => [
  10348. 'table' => 'phylonode',
  10349. 'columns' => [
  10350. 'phylonode_id' => 'phylonode_id',
  10351. ],
  10352. ],
  10353. ],
  10354. 'table' => 'phylonode_organism',
  10355. 'referring_tables' => NULL,
  10356. ];
  10357. return $description;
  10358. }
  10359. /**
  10360. * Implements hook_chado_schema_v1_2_phylonode_pub()
  10361. * Purpose: To describe the structure of 'phylonode_pub' to tripal
  10362. *
  10363. * @see chado_insert_record()
  10364. * @see chado_update_record()
  10365. * @see chado_select_record()
  10366. *
  10367. * @return
  10368. * An array describing the 'phylonode_pub' table
  10369. *
  10370. * @ingroup tripal_chado_v1.2_schema_api
  10371. *
  10372. */
  10373. function tripal_chado_chado_schema_v1_2_phylonode_pub() {
  10374. $description = [
  10375. 'description' => '',
  10376. 'fields' => [
  10377. 'phylonode_pub_id' => [
  10378. 'description' => '',
  10379. 'type' => 'serial',
  10380. 'not null' => TRUE,
  10381. ],
  10382. 'phylonode_id' => [
  10383. 'description' => '',
  10384. 'type' => 'int',
  10385. 'not null' => TRUE,
  10386. ],
  10387. 'pub_id' => [
  10388. 'description' => '',
  10389. 'type' => 'int',
  10390. 'not null' => TRUE,
  10391. ],
  10392. ],
  10393. 'primary key' => [
  10394. 0 => 'phylonode_pub_id',
  10395. ],
  10396. 'unique keys' => [
  10397. 'phylonode_id' => [
  10398. 0 => 'phylonode_id',
  10399. 1 => 'pub_id',
  10400. ],
  10401. ],
  10402. 'indexes' => [
  10403. 'phylonode_pub_idx1' => [
  10404. 0 => 'phylonode_id',
  10405. ],
  10406. 'phylonode_pub_idx2' => [
  10407. 0 => 'pub_id',
  10408. ],
  10409. ],
  10410. 'foreign keys' => [
  10411. 'pub' => [
  10412. 'table' => 'pub',
  10413. 'columns' => [
  10414. 'pub_id' => 'pub_id',
  10415. ],
  10416. ],
  10417. 'phylonode' => [
  10418. 'table' => 'phylonode',
  10419. 'columns' => [
  10420. 'phylonode_id' => 'phylonode_id',
  10421. ],
  10422. ],
  10423. ],
  10424. 'table' => 'phylonode_pub',
  10425. 'referring_tables' => NULL,
  10426. ];
  10427. return $description;
  10428. }
  10429. /**
  10430. * Implements hook_chado_schema_v1_2_phylonode_relationship()
  10431. * Purpose: To describe the structure of 'phylonode_relationship' to tripal
  10432. *
  10433. * @see chado_insert_record()
  10434. * @see chado_update_record()
  10435. * @see chado_select_record()
  10436. *
  10437. * @return
  10438. * An array describing the 'phylonode_relationship' table
  10439. *
  10440. * @ingroup tripal_chado_v1.2_schema_api
  10441. *
  10442. */
  10443. function tripal_chado_chado_schema_v1_2_phylonode_relationship() {
  10444. $description = [
  10445. 'description' => '',
  10446. 'fields' => [
  10447. 'phylonode_relationship_id' => [
  10448. 'description' => '',
  10449. 'type' => 'serial',
  10450. 'not null' => TRUE,
  10451. ],
  10452. 'subject_id' => [
  10453. 'description' => '',
  10454. 'type' => 'int',
  10455. 'not null' => TRUE,
  10456. ],
  10457. 'object_id' => [
  10458. 'description' => '',
  10459. 'type' => 'int',
  10460. 'not null' => TRUE,
  10461. ],
  10462. 'type_id' => [
  10463. 'description' => '',
  10464. 'type' => 'int',
  10465. 'not null' => TRUE,
  10466. ],
  10467. 'rank' => [
  10468. 'description' => '',
  10469. 'type' => 'int',
  10470. 'not null' => FALSE,
  10471. ],
  10472. 'phylotree_id' => [
  10473. 'description' => '',
  10474. 'type' => 'int',
  10475. 'not null' => TRUE,
  10476. ],
  10477. ],
  10478. 'primary key' => [
  10479. 0 => 'phylonode_relationship_id',
  10480. ],
  10481. 'unique keys' => [
  10482. 'subject_id' => [
  10483. 0 => 'subject_id',
  10484. 1 => 'object_id',
  10485. 2 => 'type_id',
  10486. ],
  10487. ],
  10488. 'indexes' => [
  10489. 'phylonode_relationship_idx1' => [
  10490. 0 => 'subject_id',
  10491. ],
  10492. 'phylonode_relationship_idx2' => [
  10493. 0 => 'object_id',
  10494. ],
  10495. 'phylonode_relationship_idx3' => [
  10496. 0 => 'type_id',
  10497. ],
  10498. ],
  10499. 'foreign keys' => [
  10500. 'cvterm' => [
  10501. 'table' => 'cvterm',
  10502. 'columns' => [
  10503. 'type_id' => 'cvterm_id',
  10504. ],
  10505. ],
  10506. 'phylonode' => [
  10507. 'table' => 'phylonode',
  10508. 'columns' => [
  10509. 'subject_id' => 'phylonode_id',
  10510. 'object_id' => 'phylonode_id',
  10511. ],
  10512. ],
  10513. 'phylotree' => [
  10514. 'table' => 'phylotree',
  10515. 'columns' => [
  10516. 'phylotree_id' => 'phylotree_id',
  10517. ],
  10518. ],
  10519. ],
  10520. 'table' => 'phylonode_relationship',
  10521. 'referring_tables' => NULL,
  10522. ];
  10523. return $description;
  10524. }
  10525. /**
  10526. * Implements hook_chado_schema_v1_2_phylonodeprop()
  10527. * Purpose: To describe the structure of 'phylonodeprop' to tripal
  10528. *
  10529. * @see chado_insert_record()
  10530. * @see chado_update_record()
  10531. * @see chado_select_record()
  10532. *
  10533. * @return
  10534. * An array describing the 'phylonodeprop' table
  10535. *
  10536. * @ingroup tripal_chado_v1.2_schema_api
  10537. *
  10538. */
  10539. function tripal_chado_chado_schema_v1_2_phylonodeprop() {
  10540. $description = [
  10541. 'description' => '',
  10542. 'fields' => [
  10543. 'phylonodeprop_id' => [
  10544. 'description' => '',
  10545. 'type' => 'serial',
  10546. 'not null' => TRUE,
  10547. ],
  10548. 'phylonode_id' => [
  10549. 'description' => '',
  10550. 'type' => 'int',
  10551. 'not null' => TRUE,
  10552. ],
  10553. 'type_id' => [
  10554. 'description' => '',
  10555. 'type' => 'int',
  10556. 'not null' => TRUE,
  10557. ],
  10558. 'value' => [
  10559. 'description' => '',
  10560. 'type' => 'text',
  10561. 'not null' => TRUE,
  10562. 'default' => '',
  10563. ],
  10564. 'rank' => [
  10565. 'description' => '',
  10566. 'type' => 'int',
  10567. 'not null' => TRUE,
  10568. 'default' => 0,
  10569. ],
  10570. ],
  10571. 'primary key' => [
  10572. 0 => 'phylonodeprop_id',
  10573. ],
  10574. 'unique keys' => [
  10575. 'phylonode_id' => [
  10576. 0 => 'phylonode_id',
  10577. 1 => 'type_id',
  10578. 2 => 'value',
  10579. 3 => 'rank',
  10580. ],
  10581. ],
  10582. 'indexes' => [
  10583. 'phylonodeprop_idx1' => [
  10584. 0 => 'phylonode_id',
  10585. ],
  10586. 'phylonodeprop_idx2' => [
  10587. 0 => 'type_id',
  10588. ],
  10589. ],
  10590. 'foreign keys' => [
  10591. 'cvterm' => [
  10592. 'table' => 'cvterm',
  10593. 'columns' => [
  10594. 'type_id' => 'cvterm_id',
  10595. ],
  10596. ],
  10597. 'phylonode' => [
  10598. 'table' => 'phylonode',
  10599. 'columns' => [
  10600. 'phylonode_id' => 'phylonode_id',
  10601. ],
  10602. ],
  10603. ],
  10604. 'table' => 'phylonodeprop',
  10605. 'referring_tables' => NULL,
  10606. ];
  10607. return $description;
  10608. }
  10609. /**
  10610. * Implements hook_chado_schema_v1_2_phylotree()
  10611. * Purpose: To describe the structure of 'phylotree' to tripal
  10612. *
  10613. * @see chado_insert_record()
  10614. * @see chado_update_record()
  10615. * @see chado_select_record()
  10616. *
  10617. * @return
  10618. * An array describing the 'phylotree' table
  10619. *
  10620. * @ingroup tripal_chado_v1.2_schema_api
  10621. *
  10622. */
  10623. function tripal_chado_chado_schema_v1_2_phylotree() {
  10624. $description = [
  10625. 'description' => '',
  10626. 'fields' => [
  10627. 'phylotree_id' => [
  10628. 'description' => '',
  10629. 'type' => 'serial',
  10630. 'not null' => TRUE,
  10631. ],
  10632. 'dbxref_id' => [
  10633. 'description' => '',
  10634. 'type' => 'int',
  10635. 'not null' => TRUE,
  10636. ],
  10637. 'name' => [
  10638. 'description' => '',
  10639. 'type' => 'varchar',
  10640. 'length' => '255',
  10641. 'not null' => FALSE,
  10642. ],
  10643. 'type_id' => [
  10644. 'description' => '',
  10645. 'type' => 'int',
  10646. 'not null' => FALSE,
  10647. ],
  10648. 'analysis_id' => [
  10649. 'description' => '',
  10650. 'type' => 'int',
  10651. 'not null' => FALSE,
  10652. ],
  10653. 'comment' => [
  10654. 'description' => '',
  10655. 'type' => 'text',
  10656. 'not null' => FALSE,
  10657. ],
  10658. ],
  10659. 'primary key' => [
  10660. 0 => 'phylotree_id',
  10661. ],
  10662. 'unique keys' => [],
  10663. 'indexes' => [
  10664. 'phylotree_idx1' => [
  10665. 0 => 'phylotree_id',
  10666. ],
  10667. ],
  10668. 'foreign keys' => [
  10669. 'cvterm' => [
  10670. 'table' => 'cvterm',
  10671. 'columns' => [
  10672. 'type_id' => 'cvterm_id',
  10673. ],
  10674. ],
  10675. 'dbxref' => [
  10676. 'table' => 'dbxref',
  10677. 'columns' => [
  10678. 'dbxref_id' => 'dbxref_id',
  10679. ],
  10680. ],
  10681. 'analysis' => [
  10682. 'table' => 'analysis',
  10683. 'columns' => [
  10684. 'analysis_id' => 'analysis_id',
  10685. ],
  10686. ],
  10687. ],
  10688. 'table' => 'phylotree',
  10689. 'referring_tables' => [
  10690. 0 => 'phylonode',
  10691. 1 => 'phylonode_relationship',
  10692. 2 => 'phylotree_pub',
  10693. ],
  10694. ];
  10695. return $description;
  10696. }
  10697. /**
  10698. * Implements hook_chado_schema_v1_2_phylotree_pub()
  10699. * Purpose: To describe the structure of 'phylotree_pub' to tripal
  10700. *
  10701. * @see chado_insert_record()
  10702. * @see chado_update_record()
  10703. * @see chado_select_record()
  10704. *
  10705. * @return
  10706. * An array describing the 'phylotree_pub' table
  10707. *
  10708. * @ingroup tripal_chado_v1.2_schema_api
  10709. *
  10710. */
  10711. function tripal_chado_chado_schema_v1_2_phylotree_pub() {
  10712. $description = [
  10713. 'description' => '',
  10714. 'fields' => [
  10715. 'phylotree_pub_id' => [
  10716. 'description' => '',
  10717. 'type' => 'serial',
  10718. 'not null' => TRUE,
  10719. ],
  10720. 'phylotree_id' => [
  10721. 'description' => '',
  10722. 'type' => 'int',
  10723. 'not null' => TRUE,
  10724. ],
  10725. 'pub_id' => [
  10726. 'description' => '',
  10727. 'type' => 'int',
  10728. 'not null' => TRUE,
  10729. ],
  10730. ],
  10731. 'primary key' => [
  10732. 0 => 'phylotree_pub_id',
  10733. ],
  10734. 'unique keys' => [
  10735. 'phylotree_id' => [
  10736. 0 => 'phylotree_id',
  10737. 1 => 'pub_id',
  10738. ],
  10739. ],
  10740. 'indexes' => [
  10741. 'phylotree_pub_idx1' => [
  10742. 0 => 'phylotree_id',
  10743. ],
  10744. 'phylotree_pub_idx2' => [
  10745. 0 => 'pub_id',
  10746. ],
  10747. ],
  10748. 'foreign keys' => [
  10749. 'pub' => [
  10750. 'table' => 'pub',
  10751. 'columns' => [
  10752. 'pub_id' => 'pub_id',
  10753. ],
  10754. ],
  10755. 'phylotree' => [
  10756. 'table' => 'phylotree',
  10757. 'columns' => [
  10758. 'phylotree_id' => 'phylotree_id',
  10759. ],
  10760. ],
  10761. ],
  10762. 'table' => 'phylotree_pub',
  10763. 'referring_tables' => NULL,
  10764. ];
  10765. return $description;
  10766. }
  10767. /**
  10768. * Implements hook_chado_schema_v1_2_project()
  10769. * Purpose: To describe the structure of 'project' to tripal
  10770. *
  10771. * @see chado_insert_record()
  10772. * @see chado_update_record()
  10773. * @see chado_select_record()
  10774. *
  10775. * @return
  10776. * An array describing the 'project' table
  10777. *
  10778. * @ingroup tripal_chado_v1.2_schema_api
  10779. *
  10780. */
  10781. function tripal_chado_chado_schema_v1_2_project() {
  10782. $description = [
  10783. 'description' => '',
  10784. 'fields' => [
  10785. 'project_id' => [
  10786. 'description' => '',
  10787. 'type' => 'serial',
  10788. 'not null' => TRUE,
  10789. ],
  10790. 'name' => [
  10791. 'description' => '',
  10792. 'type' => 'varchar',
  10793. 'length' => '255',
  10794. 'not null' => TRUE,
  10795. ],
  10796. 'description' => [
  10797. 'description' => '',
  10798. 'type' => 'varchar',
  10799. 'length' => '255',
  10800. 'not null' => TRUE,
  10801. ],
  10802. ],
  10803. 'primary key' => [
  10804. 0 => 'project_id',
  10805. ],
  10806. 'unique keys' => [
  10807. 'project_c1' => [
  10808. 0 => 'name',
  10809. ],
  10810. ],
  10811. 'foreign keys' => [
  10812. ],
  10813. 'table' => 'project',
  10814. 'referring_tables' => [
  10815. 0 => 'assay_project',
  10816. 1 => 'nd_experiment_project',
  10817. 2 => 'project_contact',
  10818. 10 => 'project_pub',
  10819. 18 => 'project_relationship',
  10820. 34 => 'projectprop',
  10821. ],
  10822. ];
  10823. return $description;
  10824. }
  10825. /**
  10826. * Implements hook_chado_schema_v1_2_project_contact()
  10827. * Purpose: To describe the structure of 'project_contact' to tripal
  10828. *
  10829. * @see chado_insert_record()
  10830. * @see chado_update_record()
  10831. * @see chado_select_record()
  10832. *
  10833. * @return
  10834. * An array describing the 'project_contact' table
  10835. *
  10836. * @ingroup tripal_chado_v1.2_schema_api
  10837. *
  10838. */
  10839. function tripal_chado_chado_schema_v1_2_project_contact() {
  10840. $description = [
  10841. 'description' => '',
  10842. 'fields' => [
  10843. 'project_contact_id' => [
  10844. 'description' => '',
  10845. 'type' => 'serial',
  10846. 'not null' => TRUE,
  10847. ],
  10848. 'project_id' => [
  10849. 'description' => '',
  10850. 'type' => 'int',
  10851. 'not null' => TRUE,
  10852. ],
  10853. 'contact_id' => [
  10854. 'description' => '',
  10855. 'type' => 'int',
  10856. 'not null' => TRUE,
  10857. ],
  10858. ],
  10859. 'primary key' => [
  10860. 0 => 'project_contact_id',
  10861. ],
  10862. 'unique keys' => [
  10863. 'project_contact_c1' => [
  10864. 0 => 'project_id',
  10865. 1 => 'contact_id',
  10866. ],
  10867. ],
  10868. 'indexes' => [
  10869. 'project_contact_idx1' => [
  10870. 0 => 'project_id',
  10871. ],
  10872. 'project_contact_idx2' => [
  10873. 0 => 'contact_id',
  10874. ],
  10875. ],
  10876. 'foreign keys' => [
  10877. 'contact' => [
  10878. 'table' => 'contact',
  10879. 'columns' => [
  10880. 'contact_id' => 'contact_id',
  10881. ],
  10882. ],
  10883. 'project' => [
  10884. 'table' => 'project',
  10885. 'columns' => [
  10886. 'project_id' => 'project_id',
  10887. ],
  10888. ],
  10889. ],
  10890. 'table' => 'project_contact',
  10891. 'referring_tables' => NULL,
  10892. ];
  10893. return $description;
  10894. }
  10895. /**
  10896. * Implements hook_chado_schema_v1_2_project_pub()
  10897. * Purpose: To describe the structure of 'project_pub' to tripal
  10898. *
  10899. * @see chado_insert_record()
  10900. * @see chado_update_record()
  10901. * @see chado_select_record()
  10902. *
  10903. * @return
  10904. * An array describing the 'project_pub' table
  10905. *
  10906. * @ingroup tripal_chado_v1.2_schema_api
  10907. *
  10908. */
  10909. function tripal_chado_chado_schema_v1_2_project_pub() {
  10910. $description = [
  10911. 'description' => '',
  10912. 'fields' => [
  10913. 'project_pub_id' => [
  10914. 'description' => '',
  10915. 'type' => 'serial',
  10916. 'not null' => TRUE,
  10917. ],
  10918. 'project_id' => [
  10919. 'description' => '',
  10920. 'type' => 'int',
  10921. 'not null' => TRUE,
  10922. ],
  10923. 'pub_id' => [
  10924. 'description' => '',
  10925. 'type' => 'int',
  10926. 'not null' => TRUE,
  10927. ],
  10928. ],
  10929. 'primary key' => [
  10930. 0 => 'project_pub_id',
  10931. ],
  10932. 'unique keys' => [
  10933. 'project_pub_c1' => [
  10934. 0 => 'project_id',
  10935. 1 => 'pub_id',
  10936. ],
  10937. ],
  10938. 'indexes' => [
  10939. 'project_pub_idx1' => [
  10940. 0 => 'project_id',
  10941. ],
  10942. 'project_pub_idx2' => [
  10943. 0 => 'pub_id',
  10944. ],
  10945. ],
  10946. 'foreign keys' => [
  10947. 'pub' => [
  10948. 'table' => 'pub',
  10949. 'columns' => [
  10950. 'pub_id' => 'pub_id',
  10951. ],
  10952. ],
  10953. 'project' => [
  10954. 'table' => 'project',
  10955. 'columns' => [
  10956. 'project_id' => 'project_id',
  10957. ],
  10958. ],
  10959. ],
  10960. 'table' => 'project_pub',
  10961. 'referring_tables' => NULL,
  10962. ];
  10963. return $description;
  10964. }
  10965. /**
  10966. * Implements hook_chado_schema_v1_2_project_relationship()
  10967. * Purpose: To describe the structure of 'project_relationship' to tripal
  10968. *
  10969. * @see chado_insert_record()
  10970. * @see chado_update_record()
  10971. * @see chado_select_record()
  10972. *
  10973. * @return
  10974. * An array describing the 'project_relationship' table
  10975. *
  10976. * @ingroup tripal_chado_v1.2_schema_api
  10977. *
  10978. */
  10979. function tripal_chado_chado_schema_v1_2_project_relationship() {
  10980. $description = [
  10981. 'description' => '',
  10982. 'fields' => [
  10983. 'project_relationship_id' => [
  10984. 'description' => '',
  10985. 'type' => 'serial',
  10986. 'not null' => TRUE,
  10987. ],
  10988. 'subject_project_id' => [
  10989. 'description' => '',
  10990. 'type' => 'int',
  10991. 'not null' => TRUE,
  10992. ],
  10993. 'object_project_id' => [
  10994. 'description' => '',
  10995. 'type' => 'int',
  10996. 'not null' => TRUE,
  10997. ],
  10998. 'type_id' => [
  10999. 'description' => '',
  11000. 'type' => 'int',
  11001. 'not null' => TRUE,
  11002. ],
  11003. ],
  11004. 'primary key' => [
  11005. 0 => 'project_relationship_id',
  11006. ],
  11007. 'unique keys' => [
  11008. 'project_relationship_c1' => [
  11009. 0 => 'subject_project_id',
  11010. 1 => 'object_project_id',
  11011. 2 => 'type_id',
  11012. ],
  11013. ],
  11014. 'foreign keys' => [
  11015. 'cvterm' => [
  11016. 'table' => 'cvterm',
  11017. 'columns' => [
  11018. 'type_id' => 'cvterm_id',
  11019. ],
  11020. ],
  11021. 'project' => [
  11022. 'table' => 'project',
  11023. 'columns' => [
  11024. 'subject_project_id' => 'project_id',
  11025. 'object_project_id' => 'project_id',
  11026. ],
  11027. ],
  11028. ],
  11029. 'table' => 'project_relationship',
  11030. 'referring_tables' => NULL,
  11031. ];
  11032. return $description;
  11033. }
  11034. /**
  11035. * Implements hook_chado_schema_v1_2_projectprop()
  11036. * Purpose: To describe the structure of 'projectprop' to tripal
  11037. *
  11038. * @see chado_insert_record()
  11039. * @see chado_update_record()
  11040. * @see chado_select_record()
  11041. *
  11042. * @return
  11043. * An array describing the 'projectprop' table
  11044. *
  11045. * @ingroup tripal_chado_v1.2_schema_api
  11046. *
  11047. */
  11048. function tripal_chado_chado_schema_v1_2_projectprop() {
  11049. $description = [
  11050. 'description' => '',
  11051. 'fields' => [
  11052. 'projectprop_id' => [
  11053. 'description' => '',
  11054. 'type' => 'serial',
  11055. 'not null' => TRUE,
  11056. ],
  11057. 'project_id' => [
  11058. 'description' => '',
  11059. 'type' => 'int',
  11060. 'not null' => TRUE,
  11061. ],
  11062. 'type_id' => [
  11063. 'description' => '',
  11064. 'type' => 'int',
  11065. 'not null' => TRUE,
  11066. ],
  11067. 'value' => [
  11068. 'description' => '',
  11069. 'type' => 'text',
  11070. 'not null' => FALSE,
  11071. ],
  11072. 'rank' => [
  11073. 'description' => '',
  11074. 'type' => 'int',
  11075. 'not null' => TRUE,
  11076. 'default' => 0,
  11077. ],
  11078. ],
  11079. 'primary key' => [
  11080. 0 => 'projectprop_id',
  11081. ],
  11082. 'unique keys' => [
  11083. 'projectprop_c1' => [
  11084. 0 => 'project_id',
  11085. 1 => 'type_id',
  11086. 2 => 'rank',
  11087. ],
  11088. ],
  11089. 'foreign keys' => [
  11090. 'cvterm' => [
  11091. 'table' => 'cvterm',
  11092. 'columns' => [
  11093. 'type_id' => 'cvterm_id',
  11094. ],
  11095. ],
  11096. 'project' => [
  11097. 'table' => 'project',
  11098. 'columns' => [
  11099. 'project_id' => 'project_id',
  11100. ],
  11101. ],
  11102. ],
  11103. 'table' => 'projectprop',
  11104. 'referring_tables' => NULL,
  11105. ];
  11106. return $description;
  11107. }
  11108. /**
  11109. * Implements hook_chado_schema_v1_2_protocol()
  11110. * Purpose: To describe the structure of 'protocol' to tripal
  11111. *
  11112. * @see chado_insert_record()
  11113. * @see chado_update_record()
  11114. * @see chado_select_record()
  11115. *
  11116. * @return
  11117. * An array describing the 'protocol' table
  11118. *
  11119. * @ingroup tripal_chado_v1.2_schema_api
  11120. *
  11121. */
  11122. function tripal_chado_chado_schema_v1_2_protocol() {
  11123. $description = [
  11124. 'description' => '',
  11125. 'fields' => [
  11126. 'protocol_id' => [
  11127. 'description' => '',
  11128. 'type' => 'serial',
  11129. 'not null' => TRUE,
  11130. ],
  11131. 'type_id' => [
  11132. 'description' => '',
  11133. 'type' => 'int',
  11134. 'not null' => TRUE,
  11135. ],
  11136. 'pub_id' => [
  11137. 'description' => '',
  11138. 'type' => 'int',
  11139. 'not null' => FALSE,
  11140. ],
  11141. 'dbxref_id' => [
  11142. 'description' => '',
  11143. 'type' => 'int',
  11144. 'not null' => FALSE,
  11145. ],
  11146. 'name' => [
  11147. 'description' => '',
  11148. 'type' => 'text',
  11149. 'not null' => TRUE,
  11150. ],
  11151. 'uri' => [
  11152. 'description' => '',
  11153. 'type' => 'text',
  11154. 'not null' => FALSE,
  11155. ],
  11156. 'protocoldescription' => [
  11157. 'description' => '',
  11158. 'type' => 'text',
  11159. 'not null' => FALSE,
  11160. ],
  11161. 'hardwaredescription' => [
  11162. 'description' => '',
  11163. 'type' => 'text',
  11164. 'not null' => FALSE,
  11165. ],
  11166. 'softwaredescription' => [
  11167. 'description' => '',
  11168. 'type' => 'text',
  11169. 'not null' => FALSE,
  11170. ],
  11171. ],
  11172. 'primary key' => [
  11173. 0 => 'protocol_id',
  11174. ],
  11175. 'unique keys' => [
  11176. 'protocol_c1' => [
  11177. 0 => 'name',
  11178. ],
  11179. ],
  11180. 'indexes' => [
  11181. 'protocol_idx1' => [
  11182. 0 => 'type_id',
  11183. ],
  11184. 'protocol_idx2' => [
  11185. 0 => 'pub_id',
  11186. ],
  11187. 'protocol_idx3' => [
  11188. 0 => 'dbxref_id',
  11189. ],
  11190. ],
  11191. 'foreign keys' => [
  11192. 'cvterm' => [
  11193. 'table' => 'cvterm',
  11194. 'columns' => [
  11195. 'type_id' => 'cvterm_id',
  11196. ],
  11197. ],
  11198. 'dbxref' => [
  11199. 'table' => 'dbxref',
  11200. 'columns' => [
  11201. 'dbxref_id' => 'dbxref_id',
  11202. ],
  11203. ],
  11204. 'pub' => [
  11205. 'table' => 'pub',
  11206. 'columns' => [
  11207. 'pub_id' => 'pub_id',
  11208. ],
  11209. ],
  11210. ],
  11211. 'table' => 'protocol',
  11212. 'referring_tables' => [
  11213. 0 => 'acquisition',
  11214. 1 => 'arraydesign',
  11215. 2 => 'assay',
  11216. 3 => 'protocolparam',
  11217. 4 => 'quantification',
  11218. 5 => 'treatment',
  11219. ],
  11220. ];
  11221. return $description;
  11222. }
  11223. /**
  11224. * Implements hook_chado_schema_v1_2_protocolparam()
  11225. * Purpose: To describe the structure of 'protocolparam' to tripal
  11226. *
  11227. * @see chado_insert_record()
  11228. * @see chado_update_record()
  11229. * @see chado_select_record()
  11230. *
  11231. * @return
  11232. * An array describing the 'protocolparam' table
  11233. *
  11234. * @ingroup tripal_chado_v1.2_schema_api
  11235. *
  11236. */
  11237. function tripal_chado_chado_schema_v1_2_protocolparam() {
  11238. $description = [
  11239. 'description' => '',
  11240. 'fields' => [
  11241. 'protocolparam_id' => [
  11242. 'description' => '',
  11243. 'type' => 'serial',
  11244. 'not null' => TRUE,
  11245. ],
  11246. 'protocol_id' => [
  11247. 'description' => '',
  11248. 'type' => 'int',
  11249. 'not null' => TRUE,
  11250. ],
  11251. 'name' => [
  11252. 'description' => '',
  11253. 'type' => 'text',
  11254. 'not null' => TRUE,
  11255. ],
  11256. 'datatype_id' => [
  11257. 'description' => '',
  11258. 'type' => 'int',
  11259. 'not null' => FALSE,
  11260. ],
  11261. 'unittype_id' => [
  11262. 'description' => '',
  11263. 'type' => 'int',
  11264. 'not null' => FALSE,
  11265. ],
  11266. 'value' => [
  11267. 'description' => '',
  11268. 'type' => 'text',
  11269. 'not null' => FALSE,
  11270. ],
  11271. 'rank' => [
  11272. 'description' => '',
  11273. 'type' => 'int',
  11274. 'not null' => TRUE,
  11275. 'default' => 0,
  11276. ],
  11277. ],
  11278. 'primary key' => [
  11279. 0 => 'protocolparam_id',
  11280. ],
  11281. 'unique keys' => [],
  11282. 'indexes' => [
  11283. 'protocolparam_idx1' => [
  11284. 0 => 'protocol_id',
  11285. ],
  11286. 'protocolparam_idx2' => [
  11287. 0 => 'datatype_id',
  11288. ],
  11289. 'protocolparam_idx3' => [
  11290. 0 => 'unittype_id',
  11291. ],
  11292. ],
  11293. 'foreign keys' => [
  11294. 'cvterm' => [
  11295. 'table' => 'cvterm',
  11296. 'columns' => [
  11297. 'datatype_id' => 'cvterm_id',
  11298. 'unittype_id' => 'cvterm_id',
  11299. ],
  11300. ],
  11301. 'protocol' => [
  11302. 'table' => 'protocol',
  11303. 'columns' => [
  11304. 'protocol_id' => 'protocol_id',
  11305. ],
  11306. ],
  11307. ],
  11308. 'table' => 'protocolparam',
  11309. 'referring_tables' => NULL,
  11310. ];
  11311. return $description;
  11312. }
  11313. /**
  11314. * Implements hook_chado_schema_v1_2_pub()
  11315. * Purpose: To describe the structure of 'pub' to tripal
  11316. *
  11317. * @see chado_insert_record()
  11318. * @see chado_update_record()
  11319. * @see chado_select_record()
  11320. *
  11321. * @return
  11322. * An array describing the 'pub' table
  11323. *
  11324. * @ingroup tripal_chado_v1.2_schema_api
  11325. *
  11326. */
  11327. function tripal_chado_chado_schema_v1_2_pub() {
  11328. $description = [
  11329. 'description' => '',
  11330. 'fields' => [
  11331. 'pub_id' => [
  11332. 'description' => '',
  11333. 'type' => 'serial',
  11334. 'not null' => TRUE,
  11335. ],
  11336. 'title' => [
  11337. 'description' => '',
  11338. 'type' => 'text',
  11339. 'not null' => FALSE,
  11340. ],
  11341. 'volumetitle' => [
  11342. 'description' => '',
  11343. 'type' => 'text',
  11344. 'not null' => FALSE,
  11345. ],
  11346. 'volume' => [
  11347. 'description' => '',
  11348. 'type' => 'varchar',
  11349. 'length' => '255',
  11350. 'not null' => FALSE,
  11351. ],
  11352. 'series_name' => [
  11353. 'description' => '',
  11354. 'type' => 'varchar',
  11355. 'length' => '255',
  11356. 'not null' => FALSE,
  11357. ],
  11358. 'issue' => [
  11359. 'description' => '',
  11360. 'type' => 'varchar',
  11361. 'length' => '255',
  11362. 'not null' => FALSE,
  11363. ],
  11364. 'pyear' => [
  11365. 'description' => '',
  11366. 'type' => 'varchar',
  11367. 'length' => '255',
  11368. 'not null' => FALSE,
  11369. ],
  11370. 'pages' => [
  11371. 'description' => '',
  11372. 'type' => 'varchar',
  11373. 'length' => '255',
  11374. 'not null' => FALSE,
  11375. ],
  11376. 'miniref' => [
  11377. 'description' => '',
  11378. 'type' => 'varchar',
  11379. 'length' => '255',
  11380. 'not null' => FALSE,
  11381. ],
  11382. 'uniquename' => [
  11383. 'description' => '',
  11384. 'type' => 'text',
  11385. 'not null' => TRUE,
  11386. ],
  11387. 'type_id' => [
  11388. 'description' => '',
  11389. 'type' => 'int',
  11390. 'not null' => TRUE,
  11391. ],
  11392. 'is_obsolete' => [
  11393. 'description' => '',
  11394. 'type' => 'boolean',
  11395. 'not null' => FALSE,
  11396. 'default' => 'false',
  11397. ],
  11398. 'publisher' => [
  11399. 'description' => '',
  11400. 'type' => 'varchar',
  11401. 'length' => '255',
  11402. 'not null' => FALSE,
  11403. ],
  11404. 'pubplace' => [
  11405. 'description' => '',
  11406. 'type' => 'varchar',
  11407. 'length' => '255',
  11408. 'not null' => FALSE,
  11409. ],
  11410. ],
  11411. 'primary key' => [
  11412. 0 => 'pub_id',
  11413. ],
  11414. 'unique keys' => [
  11415. 'pub_c1' => [
  11416. 0 => 'uniquename',
  11417. ],
  11418. ],
  11419. 'indexes' => [
  11420. 'pub_idx1' => [
  11421. 0 => 'type_id',
  11422. ],
  11423. ],
  11424. 'foreign keys' => [
  11425. 'cvterm' => [
  11426. 'table' => 'cvterm',
  11427. 'columns' => [
  11428. 'type_id' => 'cvterm_id',
  11429. ],
  11430. ],
  11431. ],
  11432. 'table' => 'pub',
  11433. 'referring_tables' => [
  11434. 0 => 'cell_line_cvterm',
  11435. 1 => 'cell_line_feature',
  11436. 2 => 'cell_line_library',
  11437. 3 => 'cell_line_pub',
  11438. 4 => 'cell_line_synonym',
  11439. 5 => 'cell_lineprop_pub',
  11440. 6 => 'expression_pub',
  11441. 7 => 'feature_cvterm',
  11442. 8 => 'feature_cvterm_pub',
  11443. 9 => 'feature_expression',
  11444. 10 => 'feature_pub',
  11445. 11 => 'feature_relationship_pub',
  11446. 12 => 'feature_relationshipprop_pub',
  11447. 13 => 'feature_synonym',
  11448. 14 => 'featureloc_pub',
  11449. 15 => 'featuremap_pub',
  11450. 16 => 'featureprop_pub',
  11451. 17 => 'library_cvterm',
  11452. 18 => 'library_pub',
  11453. 19 => 'library_synonym',
  11454. 20 => 'libraryprop_pub',
  11455. 21 => 'nd_experiment_pub',
  11456. 22 => 'phendesc',
  11457. 23 => 'phenotype_comparison',
  11458. 24 => 'phenotype_comparison_cvterm',
  11459. 25 => 'phenstatement',
  11460. 26 => 'phylonode_pub',
  11461. 27 => 'phylotree_pub',
  11462. 28 => 'project_pub',
  11463. 36 => 'protocol',
  11464. 37 => 'pub_dbxref',
  11465. 38 => 'pub_relationship',
  11466. 40 => 'pubauthor',
  11467. 41 => 'pubprop',
  11468. 42 => 'stock_cvterm',
  11469. 43 => 'stock_pub',
  11470. 44 => 'stock_relationship_cvterm',
  11471. 52 => 'stock_relationship_pub',
  11472. 53 => 'stockprop_pub',
  11473. 54 => 'study',
  11474. ],
  11475. ];
  11476. return $description;
  11477. }
  11478. /**
  11479. * Implements hook_chado_schema_v1_2_pub_dbxref()
  11480. * Purpose: To describe the structure of 'pub_dbxref' to tripal
  11481. *
  11482. * @see chado_insert_record()
  11483. * @see chado_update_record()
  11484. * @see chado_select_record()
  11485. *
  11486. * @return
  11487. * An array describing the 'pub_dbxref' table
  11488. *
  11489. * @ingroup tripal_chado_v1.2_schema_api
  11490. *
  11491. */
  11492. function tripal_chado_chado_schema_v1_2_pub_dbxref() {
  11493. $description = [
  11494. 'description' => '',
  11495. 'fields' => [
  11496. 'pub_dbxref_id' => [
  11497. 'description' => '',
  11498. 'type' => 'serial',
  11499. 'not null' => TRUE,
  11500. ],
  11501. 'pub_id' => [
  11502. 'description' => '',
  11503. 'type' => 'int',
  11504. 'not null' => TRUE,
  11505. ],
  11506. 'dbxref_id' => [
  11507. 'description' => '',
  11508. 'type' => 'int',
  11509. 'not null' => TRUE,
  11510. ],
  11511. 'is_current' => [
  11512. 'description' => '',
  11513. 'type' => 'boolean',
  11514. 'not null' => TRUE,
  11515. 'default' => 'true',
  11516. ],
  11517. ],
  11518. 'primary key' => [
  11519. 0 => 'pub_dbxref_id',
  11520. ],
  11521. 'unique keys' => [
  11522. 'pub_dbxref_c1' => [
  11523. 0 => 'pub_id',
  11524. 1 => 'dbxref_id',
  11525. ],
  11526. ],
  11527. 'indexes' => [
  11528. 'pub_dbxref_idx1' => [
  11529. 0 => 'pub_id',
  11530. ],
  11531. 'pub_dbxref_idx2' => [
  11532. 0 => 'dbxref_id',
  11533. ],
  11534. ],
  11535. 'foreign keys' => [
  11536. 'dbxref' => [
  11537. 'table' => 'dbxref',
  11538. 'columns' => [
  11539. 'dbxref_id' => 'dbxref_id',
  11540. ],
  11541. ],
  11542. 'pub' => [
  11543. 'table' => 'pub',
  11544. 'columns' => [
  11545. 'pub_id' => 'pub_id',
  11546. ],
  11547. ],
  11548. ],
  11549. 'table' => 'pub_dbxref',
  11550. 'referring_tables' => NULL,
  11551. ];
  11552. return $description;
  11553. }
  11554. /**
  11555. * Implements hook_chado_schema_v1_2_pub_relationship()
  11556. * Purpose: To describe the structure of 'pub_relationship' to tripal
  11557. *
  11558. * @see chado_insert_record()
  11559. * @see chado_update_record()
  11560. * @see chado_select_record()
  11561. *
  11562. * @return
  11563. * An array describing the 'pub_relationship' table
  11564. *
  11565. * @ingroup tripal_chado_v1.2_schema_api
  11566. *
  11567. */
  11568. function tripal_chado_chado_schema_v1_2_pub_relationship() {
  11569. $description = [
  11570. 'description' => '',
  11571. 'fields' => [
  11572. 'pub_relationship_id' => [
  11573. 'description' => '',
  11574. 'type' => 'serial',
  11575. 'not null' => TRUE,
  11576. ],
  11577. 'subject_id' => [
  11578. 'description' => '',
  11579. 'type' => 'int',
  11580. 'not null' => TRUE,
  11581. ],
  11582. 'object_id' => [
  11583. 'description' => '',
  11584. 'type' => 'int',
  11585. 'not null' => TRUE,
  11586. ],
  11587. 'type_id' => [
  11588. 'description' => '',
  11589. 'type' => 'int',
  11590. 'not null' => TRUE,
  11591. ],
  11592. ],
  11593. 'primary key' => [
  11594. 0 => 'pub_relationship_id',
  11595. ],
  11596. 'unique keys' => [
  11597. 'pub_relationship_c1' => [
  11598. 0 => 'subject_id',
  11599. 1 => 'object_id',
  11600. 2 => 'type_id',
  11601. ],
  11602. ],
  11603. 'indexes' => [
  11604. 'pub_relationship_idx1' => [
  11605. 0 => 'subject_id',
  11606. ],
  11607. 'pub_relationship_idx2' => [
  11608. 0 => 'object_id',
  11609. ],
  11610. 'pub_relationship_idx3' => [
  11611. 0 => 'type_id',
  11612. ],
  11613. ],
  11614. 'foreign keys' => [
  11615. 'cvterm' => [
  11616. 'table' => 'cvterm',
  11617. 'columns' => [
  11618. 'type_id' => 'cvterm_id',
  11619. ],
  11620. ],
  11621. 'pub' => [
  11622. 'table' => 'pub',
  11623. 'columns' => [
  11624. 'subject_id' => 'pub_id',
  11625. 'object_id' => 'pub_id',
  11626. ],
  11627. ],
  11628. ],
  11629. 'table' => 'pub_relationship',
  11630. 'referring_tables' => NULL,
  11631. ];
  11632. return $description;
  11633. }
  11634. /**
  11635. * Implements hook_chado_schema_v1_2_pubauthor()
  11636. * Purpose: To describe the structure of 'pubauthor' to tripal
  11637. *
  11638. * @see chado_insert_record()
  11639. * @see chado_update_record()
  11640. * @see chado_select_record()
  11641. *
  11642. * @return
  11643. * An array describing the 'pubauthor' table
  11644. *
  11645. * @ingroup tripal_chado_v1.2_schema_api
  11646. *
  11647. */
  11648. function tripal_chado_chado_schema_v1_2_pubauthor() {
  11649. $description = [
  11650. 'description' => '',
  11651. 'fields' => [
  11652. 'pubauthor_id' => [
  11653. 'description' => '',
  11654. 'type' => 'serial',
  11655. 'not null' => TRUE,
  11656. ],
  11657. 'pub_id' => [
  11658. 'description' => '',
  11659. 'type' => 'int',
  11660. 'not null' => TRUE,
  11661. ],
  11662. 'rank' => [
  11663. 'description' => '',
  11664. 'type' => 'int',
  11665. 'not null' => TRUE,
  11666. ],
  11667. 'editor' => [
  11668. 'description' => '',
  11669. 'type' => 'boolean',
  11670. 'not null' => FALSE,
  11671. 'default' => 'false',
  11672. ],
  11673. 'surname' => [
  11674. 'description' => '',
  11675. 'type' => 'varchar',
  11676. 'length' => '100',
  11677. 'not null' => TRUE,
  11678. ],
  11679. 'givennames' => [
  11680. 'description' => '',
  11681. 'type' => 'varchar',
  11682. 'length' => '100',
  11683. 'not null' => FALSE,
  11684. ],
  11685. 'suffix' => [
  11686. 'description' => '',
  11687. 'type' => 'varchar',
  11688. 'length' => '100',
  11689. 'not null' => FALSE,
  11690. ],
  11691. ],
  11692. 'primary key' => [
  11693. 0 => 'pubauthor_id',
  11694. ],
  11695. 'unique keys' => [
  11696. 'pubauthor_c1' => [
  11697. 0 => 'pub_id',
  11698. 1 => 'rank',
  11699. ],
  11700. ],
  11701. 'indexes' => [
  11702. 'pubauthor_idx2' => [
  11703. 0 => 'pub_id',
  11704. ],
  11705. ],
  11706. 'foreign keys' => [
  11707. 'pub' => [
  11708. 'table' => 'pub',
  11709. 'columns' => [
  11710. 'pub_id' => 'pub_id',
  11711. ],
  11712. ],
  11713. ],
  11714. 'table' => 'pubauthor',
  11715. 'referring_tables' => NULL,
  11716. ];
  11717. return $description;
  11718. }
  11719. /**
  11720. * Implements hook_chado_schema_v1_2_pubprop()
  11721. * Purpose: To describe the structure of 'pubprop' to tripal
  11722. *
  11723. * @see chado_insert_record()
  11724. * @see chado_update_record()
  11725. * @see chado_select_record()
  11726. *
  11727. * @return
  11728. * An array describing the 'pubprop' table
  11729. *
  11730. * @ingroup tripal_chado_v1.2_schema_api
  11731. *
  11732. */
  11733. function tripal_chado_chado_schema_v1_2_pubprop() {
  11734. $description = [
  11735. 'description' => '',
  11736. 'fields' => [
  11737. 'pubprop_id' => [
  11738. 'description' => '',
  11739. 'type' => 'serial',
  11740. 'not null' => TRUE,
  11741. ],
  11742. 'pub_id' => [
  11743. 'description' => '',
  11744. 'type' => 'int',
  11745. 'not null' => TRUE,
  11746. ],
  11747. 'type_id' => [
  11748. 'description' => '',
  11749. 'type' => 'int',
  11750. 'not null' => TRUE,
  11751. ],
  11752. 'value' => [
  11753. 'description' => '',
  11754. 'type' => 'text',
  11755. 'not null' => TRUE,
  11756. ],
  11757. 'rank' => [
  11758. 'description' => '',
  11759. 'type' => 'int',
  11760. 'not null' => FALSE,
  11761. ],
  11762. ],
  11763. 'primary key' => [
  11764. 0 => 'pubprop_id',
  11765. ],
  11766. 'unique keys' => [
  11767. 'pubprop_c1' => [
  11768. 0 => 'pub_id',
  11769. 1 => 'type_id',
  11770. 2 => 'rank',
  11771. ],
  11772. ],
  11773. 'indexes' => [
  11774. 'pubprop_idx1' => [
  11775. 0 => 'pub_id',
  11776. ],
  11777. 'pubprop_idx2' => [
  11778. 0 => 'type_id',
  11779. ],
  11780. ],
  11781. 'foreign keys' => [
  11782. 'cvterm' => [
  11783. 'table' => 'cvterm',
  11784. 'columns' => [
  11785. 'type_id' => 'cvterm_id',
  11786. ],
  11787. ],
  11788. 'pub' => [
  11789. 'table' => 'pub',
  11790. 'columns' => [
  11791. 'pub_id' => 'pub_id',
  11792. ],
  11793. ],
  11794. ],
  11795. 'table' => 'pubprop',
  11796. 'referring_tables' => NULL,
  11797. ];
  11798. return $description;
  11799. }
  11800. /**
  11801. * Implements hook_chado_schema_v1_2_quantification()
  11802. * Purpose: To describe the structure of 'quantification' to tripal
  11803. *
  11804. * @see chado_insert_record()
  11805. * @see chado_update_record()
  11806. * @see chado_select_record()
  11807. *
  11808. * @return
  11809. * An array describing the 'quantification' table
  11810. *
  11811. * @ingroup tripal_chado_v1.2_schema_api
  11812. *
  11813. */
  11814. function tripal_chado_chado_schema_v1_2_quantification() {
  11815. $description = [
  11816. 'description' => '',
  11817. 'fields' => [
  11818. 'quantification_id' => [
  11819. 'description' => '',
  11820. 'type' => 'serial',
  11821. 'not null' => TRUE,
  11822. ],
  11823. 'acquisition_id' => [
  11824. 'description' => '',
  11825. 'type' => 'int',
  11826. 'not null' => TRUE,
  11827. ],
  11828. 'operator_id' => [
  11829. 'description' => '',
  11830. 'type' => 'int',
  11831. 'not null' => FALSE,
  11832. ],
  11833. 'protocol_id' => [
  11834. 'description' => '',
  11835. 'type' => 'int',
  11836. 'not null' => FALSE,
  11837. ],
  11838. 'analysis_id' => [
  11839. 'description' => '',
  11840. 'type' => 'int',
  11841. 'not null' => TRUE,
  11842. ],
  11843. 'quantificationdate' => [
  11844. 'description' => '',
  11845. 'type' => 'datetime',
  11846. 'not null' => FALSE,
  11847. 'default' => 'now()',
  11848. ],
  11849. 'name' => [
  11850. 'description' => '',
  11851. 'type' => 'text',
  11852. 'not null' => FALSE,
  11853. ],
  11854. 'uri' => [
  11855. 'description' => '',
  11856. 'type' => 'text',
  11857. 'not null' => FALSE,
  11858. ],
  11859. ],
  11860. 'primary key' => [
  11861. 0 => 'quantification_id',
  11862. ],
  11863. 'unique keys' => [
  11864. 'quantification_c1' => [
  11865. 0 => 'name',
  11866. 1 => 'analysis_id',
  11867. ],
  11868. ],
  11869. 'indexes' => [
  11870. 'quantification_idx1' => [
  11871. 0 => 'acquisition_id',
  11872. ],
  11873. 'quantification_idx2' => [
  11874. 0 => 'operator_id',
  11875. ],
  11876. 'quantification_idx3' => [
  11877. 0 => 'protocol_id',
  11878. ],
  11879. 'quantification_idx4' => [
  11880. 0 => 'analysis_id',
  11881. ],
  11882. ],
  11883. 'foreign keys' => [
  11884. 'analysis' => [
  11885. 'table' => 'analysis',
  11886. 'columns' => [
  11887. 'analysis_id' => 'analysis_id',
  11888. ],
  11889. ],
  11890. 'contact' => [
  11891. 'table' => 'contact',
  11892. 'columns' => [
  11893. 'operator_id' => 'contact_id',
  11894. ],
  11895. ],
  11896. 'protocol' => [
  11897. 'table' => 'protocol',
  11898. 'columns' => [
  11899. 'protocol_id' => 'protocol_id',
  11900. ],
  11901. ],
  11902. 'acquisition' => [
  11903. 'table' => 'acquisition',
  11904. 'columns' => [
  11905. 'acquisition_id' => 'acquisition_id',
  11906. ],
  11907. ],
  11908. ],
  11909. 'table' => 'quantification',
  11910. 'referring_tables' => [
  11911. 0 => 'elementresult',
  11912. 1 => 'quantification_relationship',
  11913. 3 => 'quantificationprop',
  11914. ],
  11915. ];
  11916. return $description;
  11917. }
  11918. /**
  11919. * Implements hook_chado_schema_v1_2_quantification_relationship()
  11920. * Purpose: To describe the structure of 'quantification_relationship' to tripal
  11921. *
  11922. * @see chado_insert_record()
  11923. * @see chado_update_record()
  11924. * @see chado_select_record()
  11925. *
  11926. * @return
  11927. * An array describing the 'quantification_relationship' table
  11928. *
  11929. * @ingroup tripal_chado_v1.2_schema_api
  11930. *
  11931. */
  11932. function tripal_chado_chado_schema_v1_2_quantification_relationship() {
  11933. $description = [
  11934. 'description' => '',
  11935. 'fields' => [
  11936. 'quantification_relationship_id' => [
  11937. 'description' => '',
  11938. 'type' => 'serial',
  11939. 'not null' => TRUE,
  11940. ],
  11941. 'subject_id' => [
  11942. 'description' => '',
  11943. 'type' => 'int',
  11944. 'not null' => TRUE,
  11945. ],
  11946. 'type_id' => [
  11947. 'description' => '',
  11948. 'type' => 'int',
  11949. 'not null' => TRUE,
  11950. ],
  11951. 'object_id' => [
  11952. 'description' => '',
  11953. 'type' => 'int',
  11954. 'not null' => TRUE,
  11955. ],
  11956. ],
  11957. 'primary key' => [
  11958. 0 => 'quantification_relationship_id',
  11959. ],
  11960. 'unique keys' => [
  11961. 'quantification_relationship_c1' => [
  11962. 0 => 'subject_id',
  11963. 1 => 'object_id',
  11964. 2 => 'type_id',
  11965. ],
  11966. ],
  11967. 'indexes' => [
  11968. 'quantification_relationship_idx1' => [
  11969. 0 => 'subject_id',
  11970. ],
  11971. 'quantification_relationship_idx2' => [
  11972. 0 => 'type_id',
  11973. ],
  11974. 'quantification_relationship_idx3' => [
  11975. 0 => 'object_id',
  11976. ],
  11977. ],
  11978. 'foreign keys' => [
  11979. 'cvterm' => [
  11980. 'table' => 'cvterm',
  11981. 'columns' => [
  11982. 'type_id' => 'cvterm_id',
  11983. ],
  11984. ],
  11985. 'quantification' => [
  11986. 'table' => 'quantification',
  11987. 'columns' => [
  11988. 'subject_id' => 'quantification_id',
  11989. 'object_id' => 'quantification_id',
  11990. ],
  11991. ],
  11992. ],
  11993. 'table' => 'quantification_relationship',
  11994. 'referring_tables' => NULL,
  11995. ];
  11996. return $description;
  11997. }
  11998. /**
  11999. * Implements hook_chado_schema_v1_2_quantificationprop()
  12000. * Purpose: To describe the structure of 'quantificationprop' to tripal
  12001. *
  12002. * @see chado_insert_record()
  12003. * @see chado_update_record()
  12004. * @see chado_select_record()
  12005. *
  12006. * @return
  12007. * An array describing the 'quantificationprop' table
  12008. *
  12009. * @ingroup tripal_chado_v1.2_schema_api
  12010. *
  12011. */
  12012. function tripal_chado_chado_schema_v1_2_quantificationprop() {
  12013. $description = [
  12014. 'description' => '',
  12015. 'fields' => [
  12016. 'quantificationprop_id' => [
  12017. 'description' => '',
  12018. 'type' => 'serial',
  12019. 'not null' => TRUE,
  12020. ],
  12021. 'quantification_id' => [
  12022. 'description' => '',
  12023. 'type' => 'int',
  12024. 'not null' => TRUE,
  12025. ],
  12026. 'type_id' => [
  12027. 'description' => '',
  12028. 'type' => 'int',
  12029. 'not null' => TRUE,
  12030. ],
  12031. 'value' => [
  12032. 'description' => '',
  12033. 'type' => 'text',
  12034. 'not null' => FALSE,
  12035. ],
  12036. 'rank' => [
  12037. 'description' => '',
  12038. 'type' => 'int',
  12039. 'not null' => TRUE,
  12040. 'default' => 0,
  12041. ],
  12042. ],
  12043. 'primary key' => [
  12044. 0 => 'quantificationprop_id',
  12045. ],
  12046. 'unique keys' => [
  12047. 'quantificationprop_c1' => [
  12048. 0 => 'quantification_id',
  12049. 1 => 'type_id',
  12050. 2 => 'rank',
  12051. ],
  12052. ],
  12053. 'indexes' => [
  12054. 'quantificationprop_idx1' => [
  12055. 0 => 'quantification_id',
  12056. ],
  12057. 'quantificationprop_idx2' => [
  12058. 0 => 'type_id',
  12059. ],
  12060. ],
  12061. 'foreign keys' => [
  12062. 'cvterm' => [
  12063. 'table' => 'cvterm',
  12064. 'columns' => [
  12065. 'type_id' => 'cvterm_id',
  12066. ],
  12067. ],
  12068. 'quantification' => [
  12069. 'table' => 'quantification',
  12070. 'columns' => [
  12071. 'quantification_id' => 'quantification_id',
  12072. ],
  12073. ],
  12074. ],
  12075. 'table' => 'quantificationprop',
  12076. 'referring_tables' => NULL,
  12077. ];
  12078. return $description;
  12079. }
  12080. /**
  12081. * Implements hook_chado_schema_v1_2_stock()
  12082. * Purpose: To describe the structure of 'stock' to tripal
  12083. *
  12084. * @see chado_insert_record()
  12085. * @see chado_update_record()
  12086. * @see chado_select_record()
  12087. *
  12088. * @return
  12089. * An array describing the 'stock' table
  12090. *
  12091. * @ingroup tripal_chado_v1.2_schema_api
  12092. *
  12093. */
  12094. function tripal_chado_chado_schema_v1_2_stock() {
  12095. $description = [
  12096. 'description' => 'Any stock can be globally identified by the combination of organism, uniquename and stock type. A stock is the physical entities, either living or preserved, held by collections. Stocks belong to a collection; they have IDs, type, organism, description and may have a genotype.',
  12097. 'fields' => [
  12098. 'stock_id' => [
  12099. 'description' => '',
  12100. 'type' => 'serial',
  12101. 'not null' => TRUE,
  12102. ],
  12103. 'dbxref_id' => [
  12104. 'description' => '',
  12105. 'type' => 'int',
  12106. 'not null' => FALSE,
  12107. ],
  12108. 'organism_id' => [
  12109. 'description' => '',
  12110. 'type' => 'int',
  12111. 'not null' => FALSE,
  12112. ],
  12113. 'name' => [
  12114. 'description' => '',
  12115. 'type' => 'varchar',
  12116. 'length' => '255',
  12117. 'not null' => FALSE,
  12118. ],
  12119. 'uniquename' => [
  12120. 'description' => '',
  12121. 'type' => 'text',
  12122. 'not null' => TRUE,
  12123. ],
  12124. 'description' => [
  12125. 'description' => '',
  12126. 'type' => 'text',
  12127. 'not null' => FALSE,
  12128. ],
  12129. 'type_id' => [
  12130. 'description' => '',
  12131. 'type' => 'int',
  12132. 'not null' => TRUE,
  12133. ],
  12134. 'is_obsolete' => [
  12135. 'description' => '',
  12136. 'type' => 'boolean',
  12137. 'not null' => TRUE,
  12138. 'default' => 'false',
  12139. ],
  12140. ],
  12141. 'primary key' => [
  12142. 0 => 'stock_id',
  12143. ],
  12144. 'unique keys' => [
  12145. 'stock_c1' => [
  12146. 0 => 'organism_id',
  12147. 1 => 'uniquename',
  12148. 2 => 'type_id',
  12149. ],
  12150. ],
  12151. 'indexes' => [
  12152. 'stock_idx1' => [
  12153. 0 => 'dbxref_id',
  12154. ],
  12155. 'stock_idx2' => [
  12156. 0 => 'organism_id',
  12157. ],
  12158. 'stock_idx3' => [
  12159. 0 => 'type_id',
  12160. ],
  12161. 'stock_idx4' => [
  12162. 0 => 'uniquename',
  12163. ],
  12164. 'stock_name_ind1' => [
  12165. 0 => 'name',
  12166. ],
  12167. ],
  12168. 'foreign keys' => [
  12169. 'organism' => [
  12170. 'table' => 'organism',
  12171. 'columns' => [
  12172. 'organism_id' => 'organism_id',
  12173. ],
  12174. ],
  12175. 'cvterm' => [
  12176. 'table' => 'cvterm',
  12177. 'columns' => [
  12178. 'type_id' => 'cvterm_id',
  12179. ],
  12180. ],
  12181. 'dbxref' => [
  12182. 'table' => 'dbxref',
  12183. 'columns' => [
  12184. 'dbxref_id' => 'dbxref_id',
  12185. ],
  12186. ],
  12187. ],
  12188. 'referring_tables' => [
  12189. 0 => 'nd_experiment_stock',
  12190. 1 => 'stock_cvterm',
  12191. 2 => 'stock_dbxref',
  12192. 3 => 'stock_genotype',
  12193. 4 => 'stock_pub',
  12194. 5 => 'stock_relationship',
  12195. 7 => 'stockcollection_stock',
  12196. 8 => 'stockprop',
  12197. ],
  12198. 'table' => 'stock',
  12199. ];
  12200. return $description;
  12201. }
  12202. /**
  12203. * Implements hook_chado_schema_v1_2_stock_cvterm()
  12204. * Purpose: To describe the structure of 'stock_cvterm' to tripal
  12205. *
  12206. * @see chado_insert_record()
  12207. * @see chado_update_record()
  12208. * @see chado_select_record()
  12209. *
  12210. * @return
  12211. * An array describing the 'stock_cvterm' table
  12212. *
  12213. * @ingroup tripal_chado_v1.2_schema_api
  12214. *
  12215. */
  12216. function tripal_chado_chado_schema_v1_2_stock_cvterm() {
  12217. $description = [
  12218. 'description' => '',
  12219. 'fields' => [
  12220. 'stock_cvterm_id' => [
  12221. 'description' => '',
  12222. 'type' => 'serial',
  12223. 'not null' => TRUE,
  12224. ],
  12225. 'stock_id' => [
  12226. 'description' => '',
  12227. 'type' => 'int',
  12228. 'not null' => TRUE,
  12229. ],
  12230. 'cvterm_id' => [
  12231. 'description' => '',
  12232. 'type' => 'int',
  12233. 'not null' => TRUE,
  12234. ],
  12235. 'pub_id' => [
  12236. 'description' => '',
  12237. 'type' => 'int',
  12238. 'not null' => TRUE,
  12239. ],
  12240. 'is_not' => [
  12241. 'description' => '',
  12242. 'type' => 'boolean',
  12243. 'not null' => TRUE,
  12244. 'default' => 'false',
  12245. ],
  12246. 'rank' => [
  12247. 'description' => '',
  12248. 'type' => 'int',
  12249. 'not null' => TRUE,
  12250. 'default' => 0,
  12251. ],
  12252. ],
  12253. 'primary key' => [
  12254. 0 => 'stock_cvterm_id',
  12255. ],
  12256. 'unique keys' => [
  12257. 'stock_cvterm_c1' => [
  12258. 0 => 'stock_id',
  12259. 1 => 'cvterm_id',
  12260. 2 => 'pub_id',
  12261. 3 => 'rank',
  12262. ],
  12263. ],
  12264. 'indexes' => [
  12265. 'stock_cvterm_idx1' => [
  12266. 0 => 'stock_id',
  12267. ],
  12268. 'stock_cvterm_idx2' => [
  12269. 0 => 'cvterm_id',
  12270. ],
  12271. 'stock_cvterm_idx3' => [
  12272. 0 => 'pub_id',
  12273. ],
  12274. ],
  12275. 'foreign keys' => [
  12276. 'cvterm' => [
  12277. 'table' => 'cvterm',
  12278. 'columns' => [
  12279. 'cvterm_id' => 'cvterm_id',
  12280. ],
  12281. ],
  12282. 'pub' => [
  12283. 'table' => 'pub',
  12284. 'columns' => [
  12285. 'pub_id' => 'pub_id',
  12286. ],
  12287. ],
  12288. 'stock' => [
  12289. 'table' => 'stock',
  12290. 'columns' => [
  12291. 'stock_id' => 'stock_id',
  12292. ],
  12293. ],
  12294. ],
  12295. 'table' => 'stock_cvterm',
  12296. 'referring_tables' => [
  12297. 0 => 'stock_cvtermprop',
  12298. ],
  12299. ];
  12300. return $description;
  12301. }
  12302. /**
  12303. * Implements hook_chado_schema_v1_2_stock_cvtermprop()
  12304. * Purpose: To describe the structure of 'stock_cvtermprop' to tripal
  12305. *
  12306. * @see chado_insert_record()
  12307. * @see chado_update_record()
  12308. * @see chado_select_record()
  12309. *
  12310. * @return
  12311. * An array describing the 'stock_cvtermprop' table
  12312. *
  12313. * @ingroup tripal_chado_v1.2_schema_api
  12314. *
  12315. */
  12316. function tripal_chado_chado_schema_v1_2_stock_cvtermprop() {
  12317. $description = [
  12318. 'description' => '',
  12319. 'fields' => [
  12320. 'stock_cvtermprop_id' => [
  12321. 'description' => '',
  12322. 'type' => 'serial',
  12323. 'not null' => TRUE,
  12324. ],
  12325. 'stock_cvterm_id' => [
  12326. 'description' => '',
  12327. 'type' => 'int',
  12328. 'not null' => TRUE,
  12329. ],
  12330. 'type_id' => [
  12331. 'description' => '',
  12332. 'type' => 'int',
  12333. 'not null' => TRUE,
  12334. ],
  12335. 'value' => [
  12336. 'description' => '',
  12337. 'type' => 'text',
  12338. 'not null' => FALSE,
  12339. ],
  12340. 'rank' => [
  12341. 'description' => '',
  12342. 'type' => 'int',
  12343. 'not null' => TRUE,
  12344. 'default' => 0,
  12345. ],
  12346. ],
  12347. 'primary key' => [
  12348. 0 => 'stock_cvtermprop_id',
  12349. ],
  12350. 'unique keys' => [
  12351. 'stock_cvtermprop_c1' => [
  12352. 0 => 'stock_cvterm_id',
  12353. 1 => 'type_id',
  12354. 2 => 'rank',
  12355. ],
  12356. ],
  12357. 'indexes' => [
  12358. 'stock_cvtermprop_idx1' => [
  12359. 0 => 'stock_cvterm_id',
  12360. ],
  12361. 'stock_cvtermprop_idx2' => [
  12362. 0 => 'type_id',
  12363. ],
  12364. ],
  12365. 'foreign keys' => [
  12366. 'cvterm' => [
  12367. 'table' => 'cvterm',
  12368. 'columns' => [
  12369. 'type_id' => 'cvterm_id',
  12370. ],
  12371. ],
  12372. 'stock_cvterm' => [
  12373. 'table' => 'stock_cvterm',
  12374. 'columns' => [
  12375. 'stock_cvterm_id' => 'stock_cvterm_id',
  12376. ],
  12377. ],
  12378. ],
  12379. 'table' => 'stock_cvtermprop',
  12380. 'referring_tables' => NULL,
  12381. ];
  12382. return $description;
  12383. }
  12384. /**
  12385. * Implements hook_chado_schema_v1_2_stock_dbxref()
  12386. * Purpose: To describe the structure of 'stock_dbxref' to tripal
  12387. *
  12388. * @see chado_insert_record()
  12389. * @see chado_update_record()
  12390. * @see chado_select_record()
  12391. *
  12392. * @return
  12393. * An array describing the 'stock_dbxref' table
  12394. *
  12395. * @ingroup tripal_chado_v1.2_schema_api
  12396. *
  12397. */
  12398. function tripal_chado_chado_schema_v1_2_stock_dbxref() {
  12399. $description = [
  12400. 'description' => '',
  12401. 'fields' => [
  12402. 'stock_dbxref_id' => [
  12403. 'description' => '',
  12404. 'type' => 'serial',
  12405. 'not null' => TRUE,
  12406. ],
  12407. 'stock_id' => [
  12408. 'description' => '',
  12409. 'type' => 'int',
  12410. 'not null' => TRUE,
  12411. ],
  12412. 'dbxref_id' => [
  12413. 'description' => '',
  12414. 'type' => 'int',
  12415. 'not null' => TRUE,
  12416. ],
  12417. 'is_current' => [
  12418. 'description' => '',
  12419. 'type' => 'boolean',
  12420. 'not null' => TRUE,
  12421. 'default' => 'true',
  12422. ],
  12423. ],
  12424. 'primary key' => [
  12425. 0 => 'stock_dbxref_id',
  12426. ],
  12427. 'unique keys' => [
  12428. 'stock_dbxref_c1' => [
  12429. 0 => 'stock_id',
  12430. 1 => 'dbxref_id',
  12431. ],
  12432. ],
  12433. 'indexes' => [
  12434. 'stock_dbxref_idx1' => [
  12435. 0 => 'stock_id',
  12436. ],
  12437. 'stock_dbxref_idx2' => [
  12438. 0 => 'dbxref_id',
  12439. ],
  12440. ],
  12441. 'foreign keys' => [
  12442. 'dbxref' => [
  12443. 'table' => 'dbxref',
  12444. 'columns' => [
  12445. 'dbxref_id' => 'dbxref_id',
  12446. ],
  12447. ],
  12448. 'stock' => [
  12449. 'table' => 'stock',
  12450. 'columns' => [
  12451. 'stock_id' => 'stock_id',
  12452. ],
  12453. ],
  12454. ],
  12455. 'table' => 'stock_dbxref',
  12456. 'referring_tables' => [
  12457. 0 => 'stock_dbxrefprop',
  12458. ],
  12459. ];
  12460. return $description;
  12461. }
  12462. /**
  12463. * Implements hook_chado_schema_v1_2_stock_dbxrefprop()
  12464. * Purpose: To describe the structure of 'stock_dbxrefprop' to tripal
  12465. *
  12466. * @see chado_insert_record()
  12467. * @see chado_update_record()
  12468. * @see chado_select_record()
  12469. *
  12470. * @return
  12471. * An array describing the 'stock_dbxrefprop' table
  12472. *
  12473. * @ingroup tripal_chado_v1.2_schema_api
  12474. *
  12475. */
  12476. function tripal_chado_chado_schema_v1_2_stock_dbxrefprop() {
  12477. $description = [
  12478. 'description' => '',
  12479. 'fields' => [
  12480. 'stock_dbxrefprop_id' => [
  12481. 'description' => '',
  12482. 'type' => 'serial',
  12483. 'not null' => TRUE,
  12484. ],
  12485. 'stock_dbxref_id' => [
  12486. 'description' => '',
  12487. 'type' => 'int',
  12488. 'not null' => TRUE,
  12489. ],
  12490. 'type_id' => [
  12491. 'description' => '',
  12492. 'type' => 'int',
  12493. 'not null' => TRUE,
  12494. ],
  12495. 'value' => [
  12496. 'description' => '',
  12497. 'type' => 'text',
  12498. 'not null' => FALSE,
  12499. ],
  12500. 'rank' => [
  12501. 'description' => '',
  12502. 'type' => 'int',
  12503. 'not null' => TRUE,
  12504. 'default' => 0,
  12505. ],
  12506. ],
  12507. 'primary key' => [
  12508. 0 => 'stock_dbxrefprop_id',
  12509. ],
  12510. 'unique keys' => [
  12511. 'stock_dbxrefprop_c1' => [
  12512. 0 => 'stock_dbxref_id',
  12513. 1 => 'type_id',
  12514. 2 => 'rank',
  12515. ],
  12516. ],
  12517. 'indexes' => [
  12518. 'stock_dbxrefprop_idx1' => [
  12519. 0 => 'stock_dbxref_id',
  12520. ],
  12521. 'stock_dbxrefprop_idx2' => [
  12522. 0 => 'type_id',
  12523. ],
  12524. ],
  12525. 'foreign keys' => [
  12526. 'cvterm' => [
  12527. 'table' => 'cvterm',
  12528. 'columns' => [
  12529. 'type_id' => 'cvterm_id',
  12530. ],
  12531. ],
  12532. 'stock_dbxref' => [
  12533. 'table' => 'stock_dbxref',
  12534. 'columns' => [
  12535. 'stock_dbxref_id' => 'stock_dbxref_id',
  12536. ],
  12537. ],
  12538. ],
  12539. 'table' => 'stock_dbxrefprop',
  12540. 'referring_tables' => NULL,
  12541. ];
  12542. return $description;
  12543. }
  12544. /**
  12545. * Implements hook_chado_schema_v1_2_stock_genotype()
  12546. * Purpose: To describe the structure of 'stock_genotype' to tripal
  12547. *
  12548. * @see chado_insert_record()
  12549. * @see chado_update_record()
  12550. * @see chado_select_record()
  12551. *
  12552. * @return
  12553. * An array describing the 'stock_genotype' table
  12554. *
  12555. * @ingroup tripal_chado_v1.2_schema_api
  12556. *
  12557. */
  12558. function tripal_chado_chado_schema_v1_2_stock_genotype() {
  12559. $description = [
  12560. 'description' => '',
  12561. 'fields' => [
  12562. 'stock_genotype_id' => [
  12563. 'description' => '',
  12564. 'type' => 'serial',
  12565. 'not null' => TRUE,
  12566. ],
  12567. 'stock_id' => [
  12568. 'description' => '',
  12569. 'type' => 'int',
  12570. 'not null' => TRUE,
  12571. ],
  12572. 'genotype_id' => [
  12573. 'description' => '',
  12574. 'type' => 'int',
  12575. 'not null' => TRUE,
  12576. ],
  12577. ],
  12578. 'primary key' => [
  12579. 0 => 'stock_genotype_id',
  12580. ],
  12581. 'unique keys' => [
  12582. 'stock_genotype_c1' => [
  12583. 0 => 'stock_id',
  12584. 1 => 'genotype_id',
  12585. ],
  12586. ],
  12587. 'indexes' => [
  12588. 'stock_genotype_idx1' => [
  12589. 0 => 'stock_id',
  12590. ],
  12591. 'stock_genotype_idx2' => [
  12592. 0 => 'genotype_id',
  12593. ],
  12594. ],
  12595. 'foreign keys' => [
  12596. 'genotype' => [
  12597. 'table' => 'genotype',
  12598. 'columns' => [
  12599. 'genotype_id' => 'genotype_id',
  12600. ],
  12601. ],
  12602. 'stock' => [
  12603. 'table' => 'stock',
  12604. 'columns' => [
  12605. 'stock_id' => 'stock_id',
  12606. ],
  12607. ],
  12608. ],
  12609. 'table' => 'stock_genotype',
  12610. 'referring_tables' => NULL,
  12611. ];
  12612. return $description;
  12613. }
  12614. /**
  12615. * Implements hook_chado_schema_v1_2_stock_pub()
  12616. * Purpose: To describe the structure of 'stock_pub' to tripal
  12617. *
  12618. * @see chado_insert_record()
  12619. * @see chado_update_record()
  12620. * @see chado_select_record()
  12621. *
  12622. * @return
  12623. * An array describing the 'stock_pub' table
  12624. *
  12625. * @ingroup tripal_chado_v1.2_schema_api
  12626. *
  12627. */
  12628. function tripal_chado_chado_schema_v1_2_stock_pub() {
  12629. $description = [
  12630. 'description' => '',
  12631. 'fields' => [
  12632. 'stock_pub_id' => [
  12633. 'description' => '',
  12634. 'type' => 'serial',
  12635. 'not null' => TRUE,
  12636. ],
  12637. 'stock_id' => [
  12638. 'description' => '',
  12639. 'type' => 'int',
  12640. 'not null' => TRUE,
  12641. ],
  12642. 'pub_id' => [
  12643. 'description' => '',
  12644. 'type' => 'int',
  12645. 'not null' => TRUE,
  12646. ],
  12647. ],
  12648. 'primary key' => [
  12649. 0 => 'stock_pub_id',
  12650. ],
  12651. 'unique keys' => [
  12652. 'stock_pub_c1' => [
  12653. 0 => 'stock_id',
  12654. 1 => 'pub_id',
  12655. ],
  12656. ],
  12657. 'indexes' => [
  12658. 'stock_pub_idx1' => [
  12659. 0 => 'stock_id',
  12660. ],
  12661. 'stock_pub_idx2' => [
  12662. 0 => 'pub_id',
  12663. ],
  12664. ],
  12665. 'foreign keys' => [
  12666. 'pub' => [
  12667. 'table' => 'pub',
  12668. 'columns' => [
  12669. 'pub_id' => 'pub_id',
  12670. ],
  12671. ],
  12672. 'stock' => [
  12673. 'table' => 'stock',
  12674. 'columns' => [
  12675. 'stock_id' => 'stock_id',
  12676. ],
  12677. ],
  12678. ],
  12679. 'table' => 'stock_pub',
  12680. 'referring_tables' => NULL,
  12681. ];
  12682. return $description;
  12683. }
  12684. /**
  12685. * Implements hook_chado_schema_v1_2_stock_relationship()
  12686. * Purpose: To describe the structure of 'stock_relationship' to tripal
  12687. *
  12688. * @see chado_insert_record()
  12689. * @see chado_update_record()
  12690. * @see chado_select_record()
  12691. *
  12692. * @return
  12693. * An array describing the 'stock_relationship' table
  12694. *
  12695. * @ingroup tripal_chado_v1.2_schema_api
  12696. *
  12697. */
  12698. function tripal_chado_chado_schema_v1_2_stock_relationship() {
  12699. $description = [
  12700. 'description' => '',
  12701. 'fields' => [
  12702. 'stock_relationship_id' => [
  12703. 'description' => '',
  12704. 'type' => 'serial',
  12705. 'not null' => TRUE,
  12706. ],
  12707. 'subject_id' => [
  12708. 'description' => '',
  12709. 'type' => 'int',
  12710. 'not null' => TRUE,
  12711. ],
  12712. 'object_id' => [
  12713. 'description' => '',
  12714. 'type' => 'int',
  12715. 'not null' => TRUE,
  12716. ],
  12717. 'type_id' => [
  12718. 'description' => '',
  12719. 'type' => 'int',
  12720. 'not null' => TRUE,
  12721. ],
  12722. 'value' => [
  12723. 'description' => '',
  12724. 'type' => 'text',
  12725. 'not null' => FALSE,
  12726. ],
  12727. 'rank' => [
  12728. 'description' => '',
  12729. 'type' => 'int',
  12730. 'not null' => TRUE,
  12731. 'default' => 0,
  12732. ],
  12733. ],
  12734. 'primary key' => [
  12735. 0 => 'stock_relationship_id',
  12736. ],
  12737. 'unique keys' => [
  12738. 'stock_relationship_c1' => [
  12739. 0 => 'subject_id',
  12740. 1 => 'object_id',
  12741. 2 => 'type_id',
  12742. 3 => 'rank',
  12743. ],
  12744. ],
  12745. 'indexes' => [
  12746. 'stock_relationship_idx1' => [
  12747. 0 => 'subject_id',
  12748. ],
  12749. 'stock_relationship_idx2' => [
  12750. 0 => 'object_id',
  12751. ],
  12752. 'stock_relationship_idx3' => [
  12753. 0 => 'type_id',
  12754. ],
  12755. ],
  12756. 'foreign keys' => [
  12757. 'cvterm' => [
  12758. 'table' => 'cvterm',
  12759. 'columns' => [
  12760. 'type_id' => 'cvterm_id',
  12761. ],
  12762. ],
  12763. 'stock' => [
  12764. 'table' => 'stock',
  12765. 'columns' => [
  12766. 'subject_id' => 'stock_id',
  12767. 'object_id' => 'stock_id',
  12768. ],
  12769. ],
  12770. ],
  12771. 'table' => 'stock_relationship',
  12772. 'referring_tables' => [
  12773. 0 => 'stock_relationship_cvterm',
  12774. 8 => 'stock_relationship_pub',
  12775. ],
  12776. ];
  12777. return $description;
  12778. }
  12779. /**
  12780. * Implements hook_chado_schema_v1_2_stock_relationship_cvterm()
  12781. * Purpose: To describe the structure of 'stock_relationship_cvterm' to tripal
  12782. *
  12783. * @see chado_insert_record()
  12784. * @see chado_update_record()
  12785. * @see chado_select_record()
  12786. *
  12787. * @return
  12788. * An array describing the 'stock_relationship_cvterm' table
  12789. *
  12790. * @ingroup tripal_chado_v1.2_schema_api
  12791. *
  12792. */
  12793. function tripal_chado_chado_schema_v1_2_stock_relationship_cvterm() {
  12794. $description = [
  12795. 'description' => '',
  12796. 'fields' => [
  12797. 'stock_relationship_cvterm_id' => [
  12798. 'description' => '',
  12799. 'type' => 'serial',
  12800. 'not null' => TRUE,
  12801. ],
  12802. 'stock_relationship_id' => [
  12803. 'description' => '',
  12804. 'type' => 'int',
  12805. 'not null' => TRUE,
  12806. ],
  12807. 'cvterm_id' => [
  12808. 'description' => '',
  12809. 'type' => 'int',
  12810. 'not null' => TRUE,
  12811. ],
  12812. 'pub_id' => [
  12813. 'description' => '',
  12814. 'type' => 'int',
  12815. 'not null' => FALSE,
  12816. ],
  12817. ],
  12818. 'primary key' => [
  12819. 0 => 'stock_relationship_cvterm_id',
  12820. ],
  12821. 'unique keys' => [],
  12822. 'foreign keys' => [
  12823. 'cvterm' => [
  12824. 'table' => 'cvterm',
  12825. 'columns' => [
  12826. 'cvterm_id' => 'cvterm_id',
  12827. ],
  12828. ],
  12829. 'pub' => [
  12830. 'table' => 'pub',
  12831. 'columns' => [
  12832. 'pub_id' => 'pub_id',
  12833. ],
  12834. ],
  12835. 'stock_relationship' => [
  12836. 'table' => 'stock_relationship',
  12837. 'columns' => [
  12838. 'stock_relationship_id' => 'stock_relationship_id',
  12839. ],
  12840. ],
  12841. ],
  12842. 'table' => 'stock_relationship_cvterm',
  12843. 'referring_tables' => NULL,
  12844. ];
  12845. return $description;
  12846. }
  12847. /**
  12848. * Implements hook_chado_schema_v1_2_stock_relationship_pub()
  12849. * Purpose: To describe the structure of 'stock_relationship_pub' to tripal
  12850. *
  12851. * @see chado_insert_record()
  12852. * @see chado_update_record()
  12853. * @see chado_select_record()
  12854. *
  12855. * @return
  12856. * An array describing the 'stock_relationship_pub' table
  12857. *
  12858. * @ingroup tripal_chado_v1.2_schema_api
  12859. *
  12860. */
  12861. function tripal_chado_chado_schema_v1_2_stock_relationship_pub() {
  12862. $description = [
  12863. 'description' => '',
  12864. 'fields' => [
  12865. 'stock_relationship_pub_id' => [
  12866. 'description' => '',
  12867. 'type' => 'serial',
  12868. 'not null' => TRUE,
  12869. ],
  12870. 'stock_relationship_id' => [
  12871. 'description' => '',
  12872. 'type' => 'int',
  12873. 'not null' => TRUE,
  12874. ],
  12875. 'pub_id' => [
  12876. 'description' => '',
  12877. 'type' => 'int',
  12878. 'not null' => TRUE,
  12879. ],
  12880. ],
  12881. 'primary key' => [
  12882. 0 => 'stock_relationship_pub_id',
  12883. ],
  12884. 'unique keys' => [
  12885. 'stock_relationship_pub_c1' => [
  12886. 0 => 'stock_relationship_id',
  12887. 1 => 'pub_id',
  12888. ],
  12889. ],
  12890. 'indexes' => [
  12891. 'stock_relationship_pub_idx1' => [
  12892. 0 => 'stock_relationship_id',
  12893. ],
  12894. 'stock_relationship_pub_idx2' => [
  12895. 0 => 'pub_id',
  12896. ],
  12897. ],
  12898. 'foreign keys' => [
  12899. 'pub' => [
  12900. 'table' => 'pub',
  12901. 'columns' => [
  12902. 'pub_id' => 'pub_id',
  12903. ],
  12904. ],
  12905. 'stock_relationship' => [
  12906. 'table' => 'stock_relationship',
  12907. 'columns' => [
  12908. 'stock_relationship_id' => 'stock_relationship_id',
  12909. ],
  12910. ],
  12911. ],
  12912. 'table' => 'stock_relationship_pub',
  12913. 'referring_tables' => NULL,
  12914. ];
  12915. return $description;
  12916. }
  12917. /**
  12918. * Implements hook_chado_schema_v1_2_stockcollection()
  12919. * Purpose: To describe the structure of 'stockcollection' to tripal
  12920. *
  12921. * @see chado_insert_record()
  12922. * @see chado_update_record()
  12923. * @see chado_select_record()
  12924. *
  12925. * @return
  12926. * An array describing the 'stockcollection' table
  12927. *
  12928. * @ingroup tripal_chado_v1.2_schema_api
  12929. *
  12930. */
  12931. function tripal_chado_chado_schema_v1_2_stockcollection() {
  12932. $description = [
  12933. 'description' => '',
  12934. 'fields' => [
  12935. 'stockcollection_id' => [
  12936. 'description' => '',
  12937. 'type' => 'serial',
  12938. 'not null' => TRUE,
  12939. ],
  12940. 'type_id' => [
  12941. 'description' => '',
  12942. 'type' => 'int',
  12943. 'not null' => TRUE,
  12944. ],
  12945. 'contact_id' => [
  12946. 'description' => '',
  12947. 'type' => 'int',
  12948. 'not null' => FALSE,
  12949. ],
  12950. 'name' => [
  12951. 'description' => '',
  12952. 'type' => 'varchar',
  12953. 'length' => '255',
  12954. 'not null' => FALSE,
  12955. ],
  12956. 'uniquename' => [
  12957. 'description' => '',
  12958. 'type' => 'text',
  12959. 'not null' => TRUE,
  12960. ],
  12961. ],
  12962. 'primary key' => [
  12963. 0 => 'stockcollection_id',
  12964. ],
  12965. 'unique keys' => [
  12966. 'stockcollection_c1' => [
  12967. 0 => 'uniquename',
  12968. 1 => 'type_id',
  12969. ],
  12970. ],
  12971. 'indexes' => [
  12972. 'stockcollection_idx1' => [
  12973. 0 => 'contact_id',
  12974. ],
  12975. 'stockcollection_idx2' => [
  12976. 0 => 'type_id',
  12977. ],
  12978. 'stockcollection_idx3' => [
  12979. 0 => 'uniquename',
  12980. ],
  12981. 'stockcollection_name_ind1' => [
  12982. 0 => 'name',
  12983. ],
  12984. ],
  12985. 'foreign keys' => [
  12986. 'cvterm' => [
  12987. 'table' => 'cvterm',
  12988. 'columns' => [
  12989. 'type_id' => 'cvterm_id',
  12990. ],
  12991. ],
  12992. 'contact' => [
  12993. 'table' => 'contact',
  12994. 'columns' => [
  12995. 'contact_id' => 'contact_id',
  12996. ],
  12997. ],
  12998. ],
  12999. 'table' => 'stockcollection',
  13000. 'referring_tables' => [
  13001. 0 => 'stockcollection_stock',
  13002. 1 => 'stockcollectionprop',
  13003. ],
  13004. ];
  13005. return $description;
  13006. }
  13007. /**
  13008. * Implements hook_chado_schema_v1_2_stockcollection_stock()
  13009. * Purpose: To describe the structure of 'stockcollection_stock' to tripal
  13010. *
  13011. * @see chado_insert_record()
  13012. * @see chado_update_record()
  13013. * @see chado_select_record()
  13014. *
  13015. * @return
  13016. * An array describing the 'stockcollection_stock' table
  13017. *
  13018. * @ingroup tripal_chado_v1.2_schema_api
  13019. *
  13020. */
  13021. function tripal_chado_chado_schema_v1_2_stockcollection_stock() {
  13022. $description = [
  13023. 'description' => '',
  13024. 'fields' => [
  13025. 'stockcollection_stock_id' => [
  13026. 'description' => '',
  13027. 'type' => 'serial',
  13028. 'not null' => TRUE,
  13029. ],
  13030. 'stockcollection_id' => [
  13031. 'description' => '',
  13032. 'type' => 'int',
  13033. 'not null' => TRUE,
  13034. ],
  13035. 'stock_id' => [
  13036. 'description' => '',
  13037. 'type' => 'int',
  13038. 'not null' => TRUE,
  13039. ],
  13040. ],
  13041. 'primary key' => [
  13042. 0 => 'stockcollection_stock_id',
  13043. ],
  13044. 'unique keys' => [
  13045. 'stockcollection_stock_c1' => [
  13046. 0 => 'stockcollection_id',
  13047. 1 => 'stock_id',
  13048. ],
  13049. ],
  13050. 'indexes' => [
  13051. 'stockcollection_stock_idx1' => [
  13052. 0 => 'stockcollection_id',
  13053. ],
  13054. 'stockcollection_stock_idx2' => [
  13055. 0 => 'stock_id',
  13056. ],
  13057. ],
  13058. 'foreign keys' => [
  13059. 'stock' => [
  13060. 'table' => 'stock',
  13061. 'columns' => [
  13062. 'stock_id' => 'stock_id',
  13063. ],
  13064. ],
  13065. 'stockcollection' => [
  13066. 'table' => 'stockcollection',
  13067. 'columns' => [
  13068. 'stockcollection_id' => 'stockcollection_id',
  13069. ],
  13070. ],
  13071. ],
  13072. 'table' => 'stockcollection_stock',
  13073. 'referring_tables' => NULL,
  13074. ];
  13075. return $description;
  13076. }
  13077. /**
  13078. * Implements hook_chado_schema_v1_2_stockcollectionprop()
  13079. * Purpose: To describe the structure of 'stockcollectionprop' to tripal
  13080. *
  13081. * @see chado_insert_record()
  13082. * @see chado_update_record()
  13083. * @see chado_select_record()
  13084. *
  13085. * @return
  13086. * An array describing the 'stockcollectionprop' table
  13087. *
  13088. * @ingroup tripal_chado_v1.2_schema_api
  13089. *
  13090. */
  13091. function tripal_chado_chado_schema_v1_2_stockcollectionprop() {
  13092. $description = [
  13093. 'description' => '',
  13094. 'fields' => [
  13095. 'stockcollectionprop_id' => [
  13096. 'description' => '',
  13097. 'type' => 'serial',
  13098. 'not null' => TRUE,
  13099. ],
  13100. 'stockcollection_id' => [
  13101. 'description' => '',
  13102. 'type' => 'int',
  13103. 'not null' => TRUE,
  13104. ],
  13105. 'type_id' => [
  13106. 'description' => '',
  13107. 'type' => 'int',
  13108. 'not null' => TRUE,
  13109. ],
  13110. 'value' => [
  13111. 'description' => '',
  13112. 'type' => 'text',
  13113. 'not null' => FALSE,
  13114. ],
  13115. 'rank' => [
  13116. 'description' => '',
  13117. 'type' => 'int',
  13118. 'not null' => TRUE,
  13119. 'default' => 0,
  13120. ],
  13121. ],
  13122. 'primary key' => [
  13123. 0 => 'stockcollectionprop_id',
  13124. ],
  13125. 'unique keys' => [
  13126. 'stockcollectionprop_c1' => [
  13127. 0 => 'stockcollection_id',
  13128. 1 => 'type_id',
  13129. 2 => 'rank',
  13130. ],
  13131. ],
  13132. 'indexes' => [
  13133. 'stockcollectionprop_idx1' => [
  13134. 0 => 'stockcollection_id',
  13135. ],
  13136. 'stockcollectionprop_idx2' => [
  13137. 0 => 'type_id',
  13138. ],
  13139. ],
  13140. 'foreign keys' => [
  13141. 'cvterm' => [
  13142. 'table' => 'cvterm',
  13143. 'columns' => [
  13144. 'type_id' => 'cvterm_id',
  13145. ],
  13146. ],
  13147. 'stockcollection' => [
  13148. 'table' => 'stockcollection',
  13149. 'columns' => [
  13150. 'stockcollection_id' => 'stockcollection_id',
  13151. ],
  13152. ],
  13153. ],
  13154. 'table' => 'stockcollectionprop',
  13155. 'referring_tables' => NULL,
  13156. ];
  13157. return $description;
  13158. }
  13159. /**
  13160. * Implements hook_chado_schema_v1_2_stockprop()
  13161. * Purpose: To describe the structure of 'stockprop' to tripal
  13162. *
  13163. * @see chado_insert_record()
  13164. * @see chado_update_record()
  13165. * @see chado_select_record()
  13166. *
  13167. * @return
  13168. * An array describing the 'stockprop' table
  13169. *
  13170. * @ingroup tripal_chado_v1.2_schema_api
  13171. *
  13172. */
  13173. function tripal_chado_chado_schema_v1_2_stockprop() {
  13174. $description = [
  13175. 'description' => '',
  13176. 'fields' => [
  13177. 'stockprop_id' => [
  13178. 'description' => '',
  13179. 'type' => 'serial',
  13180. 'not null' => TRUE,
  13181. ],
  13182. 'stock_id' => [
  13183. 'description' => '',
  13184. 'type' => 'int',
  13185. 'not null' => TRUE,
  13186. ],
  13187. 'type_id' => [
  13188. 'description' => '',
  13189. 'type' => 'int',
  13190. 'not null' => TRUE,
  13191. ],
  13192. 'value' => [
  13193. 'description' => '',
  13194. 'type' => 'text',
  13195. 'not null' => FALSE,
  13196. ],
  13197. 'rank' => [
  13198. 'description' => '',
  13199. 'type' => 'int',
  13200. 'not null' => TRUE,
  13201. 'default' => 0,
  13202. ],
  13203. ],
  13204. 'primary key' => [
  13205. 0 => 'stockprop_id',
  13206. ],
  13207. 'unique keys' => [
  13208. 'stockprop_c1' => [
  13209. 0 => 'stock_id',
  13210. 1 => 'type_id',
  13211. 2 => 'rank',
  13212. ],
  13213. ],
  13214. 'indexes' => [
  13215. 'stockprop_idx1' => [
  13216. 0 => 'stock_id',
  13217. ],
  13218. 'stockprop_idx2' => [
  13219. 0 => 'type_id',
  13220. ],
  13221. ],
  13222. 'foreign keys' => [
  13223. 'cvterm' => [
  13224. 'table' => 'cvterm',
  13225. 'columns' => [
  13226. 'type_id' => 'cvterm_id',
  13227. ],
  13228. ],
  13229. 'stock' => [
  13230. 'table' => 'stock',
  13231. 'columns' => [
  13232. 'stock_id' => 'stock_id',
  13233. ],
  13234. ],
  13235. ],
  13236. 'table' => 'stockprop',
  13237. 'referring_tables' => [
  13238. 0 => 'stockprop_pub',
  13239. ],
  13240. ];
  13241. return $description;
  13242. }
  13243. /**
  13244. * Implements hook_chado_schema_v1_2_stockprop_pub()
  13245. * Purpose: To describe the structure of 'stockprop_pub' to tripal
  13246. *
  13247. * @see chado_insert_record()
  13248. * @see chado_update_record()
  13249. * @see chado_select_record()
  13250. *
  13251. * @return
  13252. * An array describing the 'stockprop_pub' table
  13253. *
  13254. * @ingroup tripal_chado_v1.2_schema_api
  13255. *
  13256. */
  13257. function tripal_chado_chado_schema_v1_2_stockprop_pub() {
  13258. $description = [
  13259. 'description' => '',
  13260. 'fields' => [
  13261. 'stockprop_pub_id' => [
  13262. 'description' => '',
  13263. 'type' => 'serial',
  13264. 'not null' => TRUE,
  13265. ],
  13266. 'stockprop_id' => [
  13267. 'description' => '',
  13268. 'type' => 'int',
  13269. 'not null' => TRUE,
  13270. ],
  13271. 'pub_id' => [
  13272. 'description' => '',
  13273. 'type' => 'int',
  13274. 'not null' => TRUE,
  13275. ],
  13276. ],
  13277. 'primary key' => [
  13278. 0 => 'stockprop_pub_id',
  13279. ],
  13280. 'unique keys' => [
  13281. 'stockprop_pub_c1' => [
  13282. 0 => 'stockprop_id',
  13283. 1 => 'pub_id',
  13284. ],
  13285. ],
  13286. 'indexes' => [
  13287. 'stockprop_pub_idx1' => [
  13288. 0 => 'stockprop_id',
  13289. ],
  13290. 'stockprop_pub_idx2' => [
  13291. 0 => 'pub_id',
  13292. ],
  13293. ],
  13294. 'foreign keys' => [
  13295. 'pub' => [
  13296. 'table' => 'pub',
  13297. 'columns' => [
  13298. 'pub_id' => 'pub_id',
  13299. ],
  13300. ],
  13301. 'stockprop' => [
  13302. 'table' => 'stockprop',
  13303. 'columns' => [
  13304. 'stockprop_id' => 'stockprop_id',
  13305. ],
  13306. ],
  13307. ],
  13308. 'table' => 'stockprop_pub',
  13309. 'referring_tables' => NULL,
  13310. ];
  13311. return $description;
  13312. }
  13313. /**
  13314. * Implements hook_chado_schema_v1_2_study()
  13315. * Purpose: To describe the structure of 'study' to tripal
  13316. *
  13317. * @see chado_insert_record()
  13318. * @see chado_update_record()
  13319. * @see chado_select_record()
  13320. *
  13321. * @return
  13322. * An array describing the 'study' table
  13323. *
  13324. * @ingroup tripal_chado_v1.2_schema_api
  13325. *
  13326. */
  13327. function tripal_chado_chado_schema_v1_2_study() {
  13328. $description = [
  13329. 'description' => '',
  13330. 'fields' => [
  13331. 'study_id' => [
  13332. 'description' => '',
  13333. 'type' => 'serial',
  13334. 'not null' => TRUE,
  13335. ],
  13336. 'contact_id' => [
  13337. 'description' => '',
  13338. 'type' => 'int',
  13339. 'not null' => TRUE,
  13340. ],
  13341. 'pub_id' => [
  13342. 'description' => '',
  13343. 'type' => 'int',
  13344. 'not null' => FALSE,
  13345. ],
  13346. 'dbxref_id' => [
  13347. 'description' => '',
  13348. 'type' => 'int',
  13349. 'not null' => FALSE,
  13350. ],
  13351. 'name' => [
  13352. 'description' => '',
  13353. 'type' => 'text',
  13354. 'not null' => TRUE,
  13355. ],
  13356. 'description' => [
  13357. 'description' => '',
  13358. 'type' => 'text',
  13359. 'not null' => FALSE,
  13360. ],
  13361. ],
  13362. 'primary key' => [
  13363. 0 => 'study_id',
  13364. ],
  13365. 'unique keys' => [
  13366. 'study_c1' => [
  13367. 0 => 'name',
  13368. ],
  13369. ],
  13370. 'indexes' => [
  13371. 'study_idx1' => [
  13372. 0 => 'contact_id',
  13373. ],
  13374. 'study_idx2' => [
  13375. 0 => 'pub_id',
  13376. ],
  13377. 'study_idx3' => [
  13378. 0 => 'dbxref_id',
  13379. ],
  13380. ],
  13381. 'foreign keys' => [
  13382. 'dbxref' => [
  13383. 'table' => 'dbxref',
  13384. 'columns' => [
  13385. 'dbxref_id' => 'dbxref_id',
  13386. ],
  13387. ],
  13388. 'pub' => [
  13389. 'table' => 'pub',
  13390. 'columns' => [
  13391. 'pub_id' => 'pub_id',
  13392. ],
  13393. ],
  13394. 'contact' => [
  13395. 'table' => 'contact',
  13396. 'columns' => [
  13397. 'contact_id' => 'contact_id',
  13398. ],
  13399. ],
  13400. ],
  13401. 'table' => 'study',
  13402. 'referring_tables' => [
  13403. 0 => 'study_assay',
  13404. 1 => 'studydesign',
  13405. 2 => 'studyprop',
  13406. ],
  13407. ];
  13408. return $description;
  13409. }
  13410. /**
  13411. * Implements hook_chado_schema_v1_2_study_assay()
  13412. * Purpose: To describe the structure of 'study_assay' to tripal
  13413. *
  13414. * @see chado_insert_record()
  13415. * @see chado_update_record()
  13416. * @see chado_select_record()
  13417. *
  13418. * @return
  13419. * An array describing the 'study_assay' table
  13420. *
  13421. * @ingroup tripal_chado_v1.2_schema_api
  13422. *
  13423. */
  13424. function tripal_chado_chado_schema_v1_2_study_assay() {
  13425. $description = [
  13426. 'description' => '',
  13427. 'fields' => [
  13428. 'study_assay_id' => [
  13429. 'description' => '',
  13430. 'type' => 'serial',
  13431. 'not null' => TRUE,
  13432. ],
  13433. 'study_id' => [
  13434. 'description' => '',
  13435. 'type' => 'int',
  13436. 'not null' => TRUE,
  13437. ],
  13438. 'assay_id' => [
  13439. 'description' => '',
  13440. 'type' => 'int',
  13441. 'not null' => TRUE,
  13442. ],
  13443. ],
  13444. 'primary key' => [
  13445. 0 => 'study_assay_id',
  13446. ],
  13447. 'unique keys' => [
  13448. 'study_assay_c1' => [
  13449. 0 => 'study_id',
  13450. 1 => 'assay_id',
  13451. ],
  13452. ],
  13453. 'indexes' => [
  13454. 'study_assay_idx1' => [
  13455. 0 => 'study_id',
  13456. ],
  13457. 'study_assay_idx2' => [
  13458. 0 => 'assay_id',
  13459. ],
  13460. ],
  13461. 'foreign keys' => [
  13462. 'assay' => [
  13463. 'table' => 'assay',
  13464. 'columns' => [
  13465. 'assay_id' => 'assay_id',
  13466. ],
  13467. ],
  13468. 'study' => [
  13469. 'table' => 'study',
  13470. 'columns' => [
  13471. 'study_id' => 'study_id',
  13472. ],
  13473. ],
  13474. ],
  13475. 'table' => 'study_assay',
  13476. 'referring_tables' => NULL,
  13477. ];
  13478. return $description;
  13479. }
  13480. /**
  13481. * Implements hook_chado_schema_v1_2_studydesign()
  13482. * Purpose: To describe the structure of 'studydesign' to tripal
  13483. *
  13484. * @see chado_insert_record()
  13485. * @see chado_update_record()
  13486. * @see chado_select_record()
  13487. *
  13488. * @return
  13489. * An array describing the 'studydesign' table
  13490. *
  13491. * @ingroup tripal_chado_v1.2_schema_api
  13492. *
  13493. */
  13494. function tripal_chado_chado_schema_v1_2_studydesign() {
  13495. $description = [
  13496. 'description' => '',
  13497. 'fields' => [
  13498. 'studydesign_id' => [
  13499. 'description' => '',
  13500. 'type' => 'serial',
  13501. 'not null' => TRUE,
  13502. ],
  13503. 'study_id' => [
  13504. 'description' => '',
  13505. 'type' => 'int',
  13506. 'not null' => TRUE,
  13507. ],
  13508. 'description' => [
  13509. 'description' => '',
  13510. 'type' => 'text',
  13511. 'not null' => FALSE,
  13512. ],
  13513. ],
  13514. 'primary key' => [
  13515. 0 => 'studydesign_id',
  13516. ],
  13517. 'unique keys' => [],
  13518. 'indexes' => [
  13519. 'studydesign_idx1' => [
  13520. 0 => 'study_id',
  13521. ],
  13522. ],
  13523. 'foreign keys' => [
  13524. 'study' => [
  13525. 'table' => 'study',
  13526. 'columns' => [
  13527. 'study_id' => 'study_id',
  13528. ],
  13529. ],
  13530. ],
  13531. 'table' => 'studydesign',
  13532. 'referring_tables' => [
  13533. 0 => 'studydesignprop',
  13534. 1 => 'studyfactor',
  13535. ],
  13536. ];
  13537. return $description;
  13538. }
  13539. /**
  13540. * Implements hook_chado_schema_v1_2_studydesignprop()
  13541. * Purpose: To describe the structure of 'studydesignprop' to tripal
  13542. *
  13543. * @see chado_insert_record()
  13544. * @see chado_update_record()
  13545. * @see chado_select_record()
  13546. *
  13547. * @return
  13548. * An array describing the 'studydesignprop' table
  13549. *
  13550. * @ingroup tripal_chado_v1.2_schema_api
  13551. *
  13552. */
  13553. function tripal_chado_chado_schema_v1_2_studydesignprop() {
  13554. $description = [
  13555. 'description' => '',
  13556. 'fields' => [
  13557. 'studydesignprop_id' => [
  13558. 'description' => '',
  13559. 'type' => 'serial',
  13560. 'not null' => TRUE,
  13561. ],
  13562. 'studydesign_id' => [
  13563. 'description' => '',
  13564. 'type' => 'int',
  13565. 'not null' => TRUE,
  13566. ],
  13567. 'type_id' => [
  13568. 'description' => '',
  13569. 'type' => 'int',
  13570. 'not null' => TRUE,
  13571. ],
  13572. 'value' => [
  13573. 'description' => '',
  13574. 'type' => 'text',
  13575. 'not null' => FALSE,
  13576. ],
  13577. 'rank' => [
  13578. 'description' => '',
  13579. 'type' => 'int',
  13580. 'not null' => TRUE,
  13581. 'default' => 0,
  13582. ],
  13583. ],
  13584. 'primary key' => [
  13585. 0 => 'studydesignprop_id',
  13586. ],
  13587. 'unique keys' => [
  13588. 'studydesignprop_c1' => [
  13589. 0 => 'studydesign_id',
  13590. 1 => 'type_id',
  13591. 2 => 'rank',
  13592. ],
  13593. ],
  13594. 'indexes' => [
  13595. 'studydesignprop_idx1' => [
  13596. 0 => 'studydesign_id',
  13597. ],
  13598. 'studydesignprop_idx2' => [
  13599. 0 => 'type_id',
  13600. ],
  13601. ],
  13602. 'foreign keys' => [
  13603. 'cvterm' => [
  13604. 'table' => 'cvterm',
  13605. 'columns' => [
  13606. 'type_id' => 'cvterm_id',
  13607. ],
  13608. ],
  13609. 'studydesign' => [
  13610. 'table' => 'studydesign',
  13611. 'columns' => [
  13612. 'studydesign_id' => 'studydesign_id',
  13613. ],
  13614. ],
  13615. ],
  13616. 'table' => 'studydesignprop',
  13617. 'referring_tables' => NULL,
  13618. ];
  13619. return $description;
  13620. }
  13621. /**
  13622. * Implements hook_chado_schema_v1_2_studyfactor()
  13623. * Purpose: To describe the structure of 'studyfactor' to tripal
  13624. *
  13625. * @see chado_insert_record()
  13626. * @see chado_update_record()
  13627. * @see chado_select_record()
  13628. *
  13629. * @return
  13630. * An array describing the 'studyfactor' table
  13631. *
  13632. * @ingroup tripal_chado_v1.2_schema_api
  13633. *
  13634. */
  13635. function tripal_chado_chado_schema_v1_2_studyfactor() {
  13636. $description = [
  13637. 'description' => '',
  13638. 'fields' => [
  13639. 'studyfactor_id' => [
  13640. 'description' => '',
  13641. 'type' => 'serial',
  13642. 'not null' => TRUE,
  13643. ],
  13644. 'studydesign_id' => [
  13645. 'description' => '',
  13646. 'type' => 'int',
  13647. 'not null' => TRUE,
  13648. ],
  13649. 'type_id' => [
  13650. 'description' => '',
  13651. 'type' => 'int',
  13652. 'not null' => FALSE,
  13653. ],
  13654. 'name' => [
  13655. 'description' => '',
  13656. 'type' => 'text',
  13657. 'not null' => TRUE,
  13658. ],
  13659. 'description' => [
  13660. 'description' => '',
  13661. 'type' => 'text',
  13662. 'not null' => FALSE,
  13663. ],
  13664. ],
  13665. 'primary key' => [
  13666. 0 => 'studyfactor_id',
  13667. ],
  13668. 'unique keys' => [],
  13669. 'indexes' => [
  13670. 'studyfactor_idx1' => [
  13671. 0 => 'studydesign_id',
  13672. ],
  13673. 'studyfactor_idx2' => [
  13674. 0 => 'type_id',
  13675. ],
  13676. ],
  13677. 'foreign keys' => [
  13678. 'cvterm' => [
  13679. 'table' => 'cvterm',
  13680. 'columns' => [
  13681. 'type_id' => 'cvterm_id',
  13682. ],
  13683. ],
  13684. 'studydesign' => [
  13685. 'table' => 'studydesign',
  13686. 'columns' => [
  13687. 'studydesign_id' => 'studydesign_id',
  13688. ],
  13689. ],
  13690. ],
  13691. 'table' => 'studyfactor',
  13692. 'referring_tables' => [
  13693. 0 => 'studyfactorvalue',
  13694. ],
  13695. ];
  13696. return $description;
  13697. }
  13698. /**
  13699. * Implements hook_chado_schema_v1_2_studyfactorvalue()
  13700. * Purpose: To describe the structure of 'studyfactorvalue' to tripal
  13701. *
  13702. * @see chado_insert_record()
  13703. * @see chado_update_record()
  13704. * @see chado_select_record()
  13705. *
  13706. * @return
  13707. * An array describing the 'studyfactorvalue' table
  13708. *
  13709. * @ingroup tripal_chado_v1.2_schema_api
  13710. *
  13711. */
  13712. function tripal_chado_chado_schema_v1_2_studyfactorvalue() {
  13713. $description = [
  13714. 'description' => '',
  13715. 'fields' => [
  13716. 'studyfactorvalue_id' => [
  13717. 'description' => '',
  13718. 'type' => 'serial',
  13719. 'not null' => TRUE,
  13720. ],
  13721. 'studyfactor_id' => [
  13722. 'description' => '',
  13723. 'type' => 'int',
  13724. 'not null' => TRUE,
  13725. ],
  13726. 'assay_id' => [
  13727. 'description' => '',
  13728. 'type' => 'int',
  13729. 'not null' => TRUE,
  13730. ],
  13731. 'factorvalue' => [
  13732. 'description' => '',
  13733. 'type' => 'text',
  13734. 'not null' => FALSE,
  13735. ],
  13736. 'name' => [
  13737. 'description' => '',
  13738. 'type' => 'text',
  13739. 'not null' => FALSE,
  13740. ],
  13741. 'rank' => [
  13742. 'description' => '',
  13743. 'type' => 'int',
  13744. 'not null' => TRUE,
  13745. 'default' => 0,
  13746. ],
  13747. ],
  13748. 'primary key' => [
  13749. 0 => 'studyfactorvalue_id',
  13750. ],
  13751. 'unique keys' => [],
  13752. 'indexes' => [
  13753. 'studyfactorvalue_idx1' => [
  13754. 0 => 'studyfactor_id',
  13755. ],
  13756. 'studyfactorvalue_idx2' => [
  13757. 0 => 'assay_id',
  13758. ],
  13759. ],
  13760. 'foreign keys' => [
  13761. 'assay' => [
  13762. 'table' => 'assay',
  13763. 'columns' => [
  13764. 'assay_id' => 'assay_id',
  13765. ],
  13766. ],
  13767. 'studyfactor' => [
  13768. 'table' => 'studyfactor',
  13769. 'columns' => [
  13770. 'studyfactor_id' => 'studyfactor_id',
  13771. ],
  13772. ],
  13773. ],
  13774. 'table' => 'studyfactorvalue',
  13775. 'referring_tables' => NULL,
  13776. ];
  13777. return $description;
  13778. }
  13779. /**
  13780. * Implements hook_chado_schema_v1_2_studyprop()
  13781. * Purpose: To describe the structure of 'studyprop' to tripal
  13782. *
  13783. * @see chado_insert_record()
  13784. * @see chado_update_record()
  13785. * @see chado_select_record()
  13786. *
  13787. * @return
  13788. * An array describing the 'studyprop' table
  13789. *
  13790. * @ingroup tripal_chado_v1.2_schema_api
  13791. *
  13792. */
  13793. function tripal_chado_chado_schema_v1_2_studyprop() {
  13794. $description = [
  13795. 'description' => '',
  13796. 'fields' => [
  13797. 'studyprop_id' => [
  13798. 'description' => '',
  13799. 'type' => 'serial',
  13800. 'not null' => TRUE,
  13801. ],
  13802. 'study_id' => [
  13803. 'description' => '',
  13804. 'type' => 'int',
  13805. 'not null' => TRUE,
  13806. ],
  13807. 'type_id' => [
  13808. 'description' => '',
  13809. 'type' => 'int',
  13810. 'not null' => TRUE,
  13811. ],
  13812. 'value' => [
  13813. 'description' => '',
  13814. 'type' => 'text',
  13815. 'not null' => FALSE,
  13816. ],
  13817. 'rank' => [
  13818. 'description' => '',
  13819. 'type' => 'int',
  13820. 'not null' => TRUE,
  13821. 'default' => 0,
  13822. ],
  13823. ],
  13824. 'primary key' => [
  13825. 0 => 'studyprop_id',
  13826. ],
  13827. 'unique keys' => [
  13828. 'study_id' => [
  13829. 0 => 'study_id',
  13830. 1 => 'type_id',
  13831. 2 => 'rank',
  13832. ],
  13833. ],
  13834. 'indexes' => [
  13835. 'studyprop_idx1' => [
  13836. 0 => 'study_id',
  13837. ],
  13838. 'studyprop_idx2' => [
  13839. 0 => 'type_id',
  13840. ],
  13841. ],
  13842. 'foreign keys' => [
  13843. 'cvterm' => [
  13844. 'table' => 'cvterm',
  13845. 'columns' => [
  13846. 'type_id' => 'cvterm_id',
  13847. ],
  13848. ],
  13849. 'study' => [
  13850. 'table' => 'study',
  13851. 'columns' => [
  13852. 'study_id' => 'study_id',
  13853. ],
  13854. ],
  13855. ],
  13856. 'table' => 'studyprop',
  13857. 'referring_tables' => [
  13858. 0 => 'studyprop_feature',
  13859. ],
  13860. ];
  13861. return $description;
  13862. }
  13863. /**
  13864. * Implements hook_chado_schema_v1_2_studyprop_feature()
  13865. * Purpose: To describe the structure of 'studyprop_feature' to tripal
  13866. *
  13867. * @see chado_insert_record()
  13868. * @see chado_update_record()
  13869. * @see chado_select_record()
  13870. *
  13871. * @return
  13872. * An array describing the 'studyprop_feature' table
  13873. *
  13874. * @ingroup tripal_chado_v1.2_schema_api
  13875. *
  13876. */
  13877. function tripal_chado_chado_schema_v1_2_studyprop_feature() {
  13878. $description = [
  13879. 'description' => '',
  13880. 'fields' => [
  13881. 'studyprop_feature_id' => [
  13882. 'description' => '',
  13883. 'type' => 'serial',
  13884. 'not null' => TRUE,
  13885. ],
  13886. 'studyprop_id' => [
  13887. 'description' => '',
  13888. 'type' => 'int',
  13889. 'not null' => TRUE,
  13890. ],
  13891. 'feature_id' => [
  13892. 'description' => '',
  13893. 'type' => 'int',
  13894. 'not null' => TRUE,
  13895. ],
  13896. 'type_id' => [
  13897. 'description' => '',
  13898. 'type' => 'int',
  13899. 'not null' => FALSE,
  13900. ],
  13901. ],
  13902. 'primary key' => [
  13903. 0 => 'studyprop_feature_id',
  13904. ],
  13905. 'unique keys' => [
  13906. 'studyprop_id' => [
  13907. 0 => 'studyprop_id',
  13908. 1 => 'feature_id',
  13909. ],
  13910. ],
  13911. 'indexes' => [
  13912. 'studyprop_feature_idx1' => [
  13913. 0 => 'studyprop_id',
  13914. ],
  13915. 'studyprop_feature_idx2' => [
  13916. 0 => 'feature_id',
  13917. ],
  13918. ],
  13919. 'foreign keys' => [
  13920. 'cvterm' => [
  13921. 'table' => 'cvterm',
  13922. 'columns' => [
  13923. 'type_id' => 'cvterm_id',
  13924. ],
  13925. ],
  13926. 'feature' => [
  13927. 'table' => 'feature',
  13928. 'columns' => [
  13929. 'feature_id' => 'feature_id',
  13930. ],
  13931. ],
  13932. 'studyprop' => [
  13933. 'table' => 'studyprop',
  13934. 'columns' => [
  13935. 'studyprop_id' => 'studyprop_id',
  13936. ],
  13937. ],
  13938. ],
  13939. 'table' => 'studyprop_feature',
  13940. 'referring_tables' => NULL,
  13941. ];
  13942. return $description;
  13943. }
  13944. /**
  13945. * Implements hook_chado_schema_v1_2_synonym()
  13946. * Purpose: To describe the structure of 'synonym' to tripal
  13947. *
  13948. * @see chado_insert_record()
  13949. * @see chado_update_record()
  13950. * @see chado_select_record()
  13951. *
  13952. * @return
  13953. * An array describing the 'synonym' table
  13954. *
  13955. * @ingroup tripal_chado_v1.2_schema_api
  13956. *
  13957. */
  13958. function tripal_chado_chado_schema_v1_2_synonym() {
  13959. $description = [
  13960. 'description' => '',
  13961. 'fields' => [
  13962. 'synonym_id' => [
  13963. 'description' => '',
  13964. 'type' => 'serial',
  13965. 'not null' => TRUE,
  13966. ],
  13967. 'name' => [
  13968. 'description' => '',
  13969. 'type' => 'varchar',
  13970. 'length' => '255',
  13971. 'not null' => TRUE,
  13972. ],
  13973. 'type_id' => [
  13974. 'description' => '',
  13975. 'type' => 'int',
  13976. 'not null' => TRUE,
  13977. ],
  13978. 'synonym_sgml' => [
  13979. 'description' => '',
  13980. 'type' => 'varchar',
  13981. 'length' => '255',
  13982. 'not null' => TRUE,
  13983. ],
  13984. ],
  13985. 'primary key' => [
  13986. 0 => 'synonym_id',
  13987. ],
  13988. 'unique keys' => [
  13989. 'synonym_c1' => [
  13990. 0 => 'name',
  13991. 1 => 'type_id',
  13992. ],
  13993. ],
  13994. 'indexes' => [
  13995. 'synonym_idx1' => [
  13996. 0 => 'type_id',
  13997. ],
  13998. ],
  13999. 'foreign keys' => [
  14000. 'cvterm' => [
  14001. 'table' => 'cvterm',
  14002. 'columns' => [
  14003. 'type_id' => 'cvterm_id',
  14004. ],
  14005. ],
  14006. ],
  14007. 'table' => 'synonym',
  14008. 'referring_tables' => [
  14009. 0 => 'cell_line_synonym',
  14010. 1 => 'feature_synonym',
  14011. 2 => 'library_synonym',
  14012. ],
  14013. ];
  14014. return $description;
  14015. }
  14016. /**
  14017. * Implements hook_chado_schema_v1_2_tableinfo()
  14018. * Purpose: To describe the structure of 'tableinfo' to tripal
  14019. *
  14020. * @see chado_insert_record()
  14021. * @see chado_update_record()
  14022. * @see chado_select_record()
  14023. *
  14024. * @return
  14025. * An array describing the 'tableinfo' table
  14026. *
  14027. * @ingroup tripal_chado_v1.2_schema_api
  14028. *
  14029. */
  14030. function tripal_chado_chado_schema_v1_2_tableinfo() {
  14031. $description = [
  14032. 'description' => '',
  14033. 'fields' => [
  14034. 'tableinfo_id' => [
  14035. 'description' => '',
  14036. 'type' => 'serial',
  14037. 'not null' => TRUE,
  14038. ],
  14039. 'name' => [
  14040. 'description' => '',
  14041. 'type' => 'varchar',
  14042. 'length' => '30',
  14043. 'not null' => TRUE,
  14044. ],
  14045. 'primary_key_column' => [
  14046. 'description' => '',
  14047. 'type' => 'varchar',
  14048. 'length' => '30',
  14049. 'not null' => FALSE,
  14050. ],
  14051. 'is_view' => [
  14052. 'description' => '',
  14053. 'type' => 'int',
  14054. 'not null' => TRUE,
  14055. 'default' => 0,
  14056. ],
  14057. 'view_on_table_id' => [
  14058. 'description' => '',
  14059. 'type' => 'int',
  14060. 'not null' => FALSE,
  14061. ],
  14062. 'superclass_table_id' => [
  14063. 'description' => '',
  14064. 'type' => 'int',
  14065. 'not null' => FALSE,
  14066. ],
  14067. 'is_updateable' => [
  14068. 'description' => '',
  14069. 'type' => 'int',
  14070. 'not null' => TRUE,
  14071. 'default' => 1,
  14072. ],
  14073. 'modification_date' => [
  14074. 'description' => '',
  14075. 'type' => 'date',
  14076. 'not null' => TRUE,
  14077. 'default' => 'now()',
  14078. ],
  14079. ],
  14080. 'primary key' => [
  14081. 0 => 'tableinfo_id',
  14082. ],
  14083. 'unique keys' => [
  14084. 'tableinfo_c1' => [
  14085. 0 => 'name',
  14086. ],
  14087. ],
  14088. 'foreign keys' => [
  14089. ],
  14090. 'table' => 'tableinfo',
  14091. 'referring_tables' => [
  14092. 0 => 'control',
  14093. 1 => 'magedocumentation',
  14094. ],
  14095. ];
  14096. return $description;
  14097. }
  14098. /**
  14099. * Implements hook_chado_schema_v1_2_treatment()
  14100. * Purpose: To describe the structure of 'treatment' to tripal
  14101. *
  14102. * @see chado_insert_record()
  14103. * @see chado_update_record()
  14104. * @see chado_select_record()
  14105. *
  14106. * @return
  14107. * An array describing the 'treatment' table
  14108. *
  14109. * @ingroup tripal_chado_v1.2_schema_api
  14110. *
  14111. */
  14112. function tripal_chado_chado_schema_v1_2_treatment() {
  14113. $description = [
  14114. 'description' => '',
  14115. 'fields' => [
  14116. 'treatment_id' => [
  14117. 'description' => '',
  14118. 'type' => 'serial',
  14119. 'not null' => TRUE,
  14120. ],
  14121. 'rank' => [
  14122. 'description' => '',
  14123. 'type' => 'int',
  14124. 'not null' => TRUE,
  14125. 'default' => 0,
  14126. ],
  14127. 'biomaterial_id' => [
  14128. 'description' => '',
  14129. 'type' => 'int',
  14130. 'not null' => TRUE,
  14131. ],
  14132. 'type_id' => [
  14133. 'description' => '',
  14134. 'type' => 'int',
  14135. 'not null' => TRUE,
  14136. ],
  14137. 'protocol_id' => [
  14138. 'description' => '',
  14139. 'type' => 'int',
  14140. 'not null' => FALSE,
  14141. ],
  14142. 'name' => [
  14143. 'description' => '',
  14144. 'type' => 'text',
  14145. 'not null' => FALSE,
  14146. ],
  14147. ],
  14148. 'primary key' => [
  14149. 0 => 'treatment_id',
  14150. ],
  14151. 'unique keys' => [],
  14152. 'indexes' => [
  14153. 'treatment_idx1' => [
  14154. 0 => 'biomaterial_id',
  14155. ],
  14156. 'treatment_idx2' => [
  14157. 0 => 'type_id',
  14158. ],
  14159. 'treatment_idx3' => [
  14160. 0 => 'protocol_id',
  14161. ],
  14162. ],
  14163. 'foreign keys' => [
  14164. 'cvterm' => [
  14165. 'table' => 'cvterm',
  14166. 'columns' => [
  14167. 'type_id' => 'cvterm_id',
  14168. ],
  14169. ],
  14170. 'protocol' => [
  14171. 'table' => 'protocol',
  14172. 'columns' => [
  14173. 'protocol_id' => 'protocol_id',
  14174. ],
  14175. ],
  14176. 'biomaterial' => [
  14177. 'table' => 'biomaterial',
  14178. 'columns' => [
  14179. 'biomaterial_id' => 'biomaterial_id',
  14180. ],
  14181. ],
  14182. ],
  14183. 'table' => 'treatment',
  14184. 'referring_tables' => [
  14185. 0 => 'biomaterial_treatment',
  14186. ],
  14187. ];
  14188. return $description;
  14189. }
  14190. /**
  14191. * Lists the table names in the v1.2 chado schema
  14192. *
  14193. * @return
  14194. * An array containing all of the table names
  14195. *
  14196. * @ingroup tripal_chado_v1.2_schema_api
  14197. *
  14198. */
  14199. function tripal_chado_chado_get_v1_2_tables() {
  14200. $tables = [
  14201. 'acquisition',
  14202. 'acquisition_relationship',
  14203. 'acquisitionprop',
  14204. 'analysis',
  14205. 'analysisfeature',
  14206. 'analysisfeatureprop',
  14207. 'analysisprop',
  14208. 'arraydesign',
  14209. 'arraydesignprop',
  14210. 'assay',
  14211. 'assay_biomaterial',
  14212. 'assay_project',
  14213. 'assayprop',
  14214. 'biomaterial',
  14215. 'biomaterial_dbxref',
  14216. 'biomaterial_relationship',
  14217. 'biomaterial_treatment',
  14218. 'biomaterialprop',
  14219. 'cell_line',
  14220. 'cell_line_cvterm',
  14221. 'cell_line_cvtermprop',
  14222. 'cell_line_dbxref',
  14223. 'cell_line_feature',
  14224. 'cell_line_library',
  14225. 'cell_line_pub',
  14226. 'cell_line_relationship',
  14227. 'cell_line_synonym',
  14228. 'cell_lineprop',
  14229. 'cell_lineprop_pub',
  14230. 'chadoprop',
  14231. 'channel',
  14232. 'contact',
  14233. 'contact_relationship',
  14234. 'control',
  14235. 'cv',
  14236. 'cvprop',
  14237. 'cvterm',
  14238. 'cvterm_dbxref',
  14239. 'cvterm_relationship',
  14240. 'cvtermpath',
  14241. 'cvtermprop',
  14242. 'cvtermsynonym',
  14243. 'db',
  14244. 'dbxref',
  14245. 'dbxrefprop',
  14246. 'eimage',
  14247. 'element',
  14248. 'element_relationship',
  14249. 'elementresult',
  14250. 'elementresult_relationship',
  14251. 'environment',
  14252. 'environment_cvterm',
  14253. 'expression',
  14254. 'expression_cvterm',
  14255. 'expression_cvtermprop',
  14256. 'expression_image',
  14257. 'expression_pub',
  14258. 'expressionprop',
  14259. 'feature',
  14260. 'feature_cvterm',
  14261. 'feature_cvterm_dbxref',
  14262. 'feature_cvterm_pub',
  14263. 'feature_cvtermprop',
  14264. 'feature_dbxref',
  14265. 'feature_expression',
  14266. 'feature_expressionprop',
  14267. 'feature_genotype',
  14268. 'feature_phenotype',
  14269. 'feature_pub',
  14270. 'feature_pubprop',
  14271. 'feature_relationship',
  14272. 'feature_relationship_pub',
  14273. 'feature_relationshipprop',
  14274. 'feature_relationshipprop_pub',
  14275. 'feature_synonym',
  14276. 'featureloc',
  14277. 'featureloc_pub',
  14278. 'featuremap',
  14279. 'featuremap_pub',
  14280. 'featurepos',
  14281. 'featureprop',
  14282. 'featureprop_pub',
  14283. 'featurerange',
  14284. 'genotype',
  14285. 'genotypeprop',
  14286. 'library',
  14287. 'library_cvterm',
  14288. 'library_dbxref',
  14289. 'library_feature',
  14290. 'library_pub',
  14291. 'library_synonym',
  14292. 'libraryprop',
  14293. 'libraryprop_pub',
  14294. 'magedocumentation',
  14295. 'mageml',
  14296. 'nd_experiment',
  14297. 'nd_experiment_contact',
  14298. 'nd_experiment_dbxref',
  14299. 'nd_experiment_genotype',
  14300. 'nd_experiment_phenotype',
  14301. 'nd_experiment_project',
  14302. 'nd_experiment_protocol',
  14303. 'nd_experiment_pub',
  14304. 'nd_experiment_stock',
  14305. 'nd_experiment_stock_dbxref',
  14306. 'nd_experiment_stockprop',
  14307. 'nd_experimentprop',
  14308. 'nd_geolocation',
  14309. 'nd_geolocationprop',
  14310. 'nd_protocol',
  14311. 'nd_protocol_reagent',
  14312. 'nd_protocolprop',
  14313. 'nd_reagent',
  14314. 'nd_reagent_relationship',
  14315. 'nd_reagentprop',
  14316. 'organism',
  14317. 'organism_dbxref',
  14318. 'organismprop',
  14319. 'phendesc',
  14320. 'phenotype',
  14321. 'phenotype_comparison',
  14322. 'phenotype_comparison_cvterm',
  14323. 'phenotype_cvterm',
  14324. 'phenstatement',
  14325. 'phylonode',
  14326. 'phylonode_dbxref',
  14327. 'phylonode_organism',
  14328. 'phylonode_pub',
  14329. 'phylonode_relationship',
  14330. 'phylonodeprop',
  14331. 'phylotree',
  14332. 'phylotree_pub',
  14333. 'project',
  14334. 'project_contact',
  14335. 'project_pub',
  14336. 'project_relationship',
  14337. 'projectprop',
  14338. 'protocol',
  14339. 'protocolparam',
  14340. 'pub',
  14341. 'pub_dbxref',
  14342. 'pub_relationship',
  14343. 'pubauthor',
  14344. 'pubprop',
  14345. 'quantification',
  14346. 'quantification_relationship',
  14347. 'quantificationprop',
  14348. 'stock',
  14349. 'stock_cvterm',
  14350. 'stock_cvtermprop',
  14351. 'stock_dbxref',
  14352. 'stock_dbxrefprop',
  14353. 'stock_genotype',
  14354. 'stock_pub',
  14355. 'stock_relationship',
  14356. 'stock_relationship_cvterm',
  14357. 'stock_relationship_pub',
  14358. 'stockcollection',
  14359. 'stockcollection_stock',
  14360. 'stockcollectionprop',
  14361. 'stockprop',
  14362. 'stockprop_pub',
  14363. 'study',
  14364. 'study_assay',
  14365. 'studydesign',
  14366. 'studydesignprop',
  14367. 'studyfactor',
  14368. 'studyfactorvalue',
  14369. 'studyprop',
  14370. 'studyprop_feature',
  14371. 'synonym',
  14372. 'tableinfo',
  14373. 'treatment',
  14374. ];
  14375. return $tables;
  14376. }