tripal_chado.schema_v1.3.api.inc 404 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692
  1. <?php
  2. /**
  3. * @file
  4. * Describes the chado tables in version 1.3
  5. */
  6. /**
  7. * @defgroup tripal_schema_v1_3_api Chado v1.3 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 Chado.
  12. * Each function simply returns a Drupal style array that defines the table.
  13. *
  14. * Because Drupal does not handle foreign key (FK) relationships, which are
  15. * needed to for Tripal Views, they have been added to the schema defintitions
  16. * below.
  17. *
  18. * The functions provided in this documentation should not be called as is,
  19. * but if you need the Drupal-style array definition for any table, use the
  20. * following function call:
  21. *
  22. * $table_desc = chado_get_schema($table)
  23. *
  24. * where the variable $table contains the name of the table you want to
  25. * retireve. The chado_get_schema function determines the appropriate version
  26. * of Chado and uses the Drupal hook infrastructure to call the appropriate
  27. * hook function to retrieve the table schema.
  28. *
  29. * If you need to augment these schema definitions within your own module,
  30. * you need to implement the hook_chado_schema_v1_3_[table name]() hook where
  31. * [table name] is the name of the chado table whose schema definition you
  32. * want to augment.
  33. * @}
  34. */
  35. /**
  36. * Implements hook_chado_schema_v1_3_acquisition()
  37. *
  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. * @see chado_generate_var()
  44. * @see chado_expan_var()
  45. *
  46. * @return
  47. * An array describing the 'acquisition' table
  48. *
  49. * @ingroup tripal_chado_v1.3_schema_api
  50. *
  51. */
  52. function tripal_chado_chado_schema_v1_3_acquisition() {
  53. $description = [
  54. 'description' => '',
  55. 'table' => 'acquisition',
  56. 'fields' => [
  57. 'acquisition_id' => [
  58. 'size' => 'big',
  59. 'type' => 'serial',
  60. 'not null' => TRUE,
  61. ],
  62. 'assay_id' => [
  63. 'size' => 'big',
  64. 'type' => 'int',
  65. 'not null' => TRUE,
  66. ],
  67. 'protocol_id' => [
  68. 'size' => 'big',
  69. 'type' => 'int',
  70. 'not null' => FALSE,
  71. ],
  72. 'channel_id' => [
  73. 'size' => 'big',
  74. 'type' => 'int',
  75. 'not null' => FALSE,
  76. ],
  77. 'acquisitiondate' => [
  78. 'size' => 'normal',
  79. 'type' => 'datetime',
  80. 'not null' => FALSE,
  81. 'default' => 'now()',
  82. ],
  83. 'name' => [
  84. 'size' => 'normal',
  85. 'type' => 'text',
  86. 'not null' => FALSE,
  87. ],
  88. 'uri' => [
  89. 'size' => 'normal',
  90. 'type' => 'text',
  91. 'not null' => FALSE,
  92. ],
  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. 'primary key' => [
  111. 0 => 'acquisition_id',
  112. ],
  113. 'foreign keys' => [
  114. 'assay' => [
  115. 'table' => 'assay',
  116. 'columns' => [
  117. 'assay_id' => 'assay_id',
  118. ],
  119. ],
  120. 'protocol' => [
  121. 'table' => 'protocol',
  122. 'columns' => [
  123. 'protocol_id' => 'protocol_id',
  124. ],
  125. ],
  126. 'channel' => [
  127. 'table' => 'channel',
  128. 'columns' => [
  129. 'channel_id' => 'channel_id',
  130. ],
  131. ],
  132. ],
  133. 'referring_tables' => [
  134. 0 => 'acquisitionprop',
  135. 1 => 'acquisition_relationship',
  136. 3 => 'quantification',
  137. ],
  138. ];
  139. return $description;
  140. }
  141. /**
  142. * Implements hook_chado_schema_v1_3_acquisitionprop()
  143. *
  144. * Purpose: To describe the structure of 'acquisitionprop' to tripal
  145. *
  146. * @see chado_insert_record()
  147. * @see chado_update_record()
  148. * @see chado_select_record()
  149. * @see chado_generate_var()
  150. * @see chado_expan_var()
  151. *
  152. * @return
  153. * An array describing the 'acquisitionprop' table
  154. *
  155. * @ingroup tripal_chado_v1.3_schema_api
  156. *
  157. */
  158. function tripal_chado_chado_schema_v1_3_acquisitionprop() {
  159. $description = [
  160. 'description' => '',
  161. 'table' => 'acquisitionprop',
  162. 'fields' => [
  163. 'acquisitionprop_id' => [
  164. 'size' => 'big',
  165. 'type' => 'serial',
  166. 'not null' => TRUE,
  167. ],
  168. 'acquisition_id' => [
  169. 'size' => 'big',
  170. 'type' => 'int',
  171. 'not null' => TRUE,
  172. ],
  173. 'type_id' => [
  174. 'size' => 'big',
  175. 'type' => 'int',
  176. 'not null' => TRUE,
  177. ],
  178. 'value' => [
  179. 'size' => 'normal',
  180. 'type' => 'text',
  181. 'not null' => FALSE,
  182. ],
  183. 'rank' => [
  184. 'size' => 'normal',
  185. 'type' => 'int',
  186. 'not null' => TRUE,
  187. 'default' => 0,
  188. ],
  189. ],
  190. 'unique keys' => [
  191. 'acquisitionprop_c1' => [
  192. 0 => 'acquisition_id',
  193. 1 => 'type_id',
  194. 2 => 'rank',
  195. ],
  196. ],
  197. 'indexes' => [
  198. 'acquisitionprop_idx1' => [
  199. 0 => 'acquisition_id',
  200. ],
  201. 'acquisitionprop_idx2' => [
  202. 0 => 'type_id',
  203. ],
  204. ],
  205. 'primary key' => [
  206. 0 => 'acquisitionprop_id',
  207. ],
  208. 'foreign keys' => [
  209. 'acquisition' => [
  210. 'table' => 'acquisition',
  211. 'columns' => [
  212. 'acquisition_id' => 'acquisition_id',
  213. ],
  214. ],
  215. 'cvterm' => [
  216. 'table' => 'cvterm',
  217. 'columns' => [
  218. 'type_id' => 'cvterm_id',
  219. ],
  220. ],
  221. ],
  222. 'referring_tables' => [
  223. ],
  224. ];
  225. return $description;
  226. }
  227. /**
  228. * Implements hook_chado_schema_v1_3_acquisition_relationship()
  229. *
  230. * Purpose: To describe the structure of 'acquisition_relationship' to tripal
  231. *
  232. * @see chado_insert_record()
  233. * @see chado_update_record()
  234. * @see chado_select_record()
  235. * @see chado_generate_var()
  236. * @see chado_expan_var()
  237. *
  238. * @return
  239. * An array describing the 'acquisition_relationship' table
  240. *
  241. * @ingroup tripal_chado_v1.3_schema_api
  242. *
  243. */
  244. function tripal_chado_chado_schema_v1_3_acquisition_relationship() {
  245. $description = [
  246. 'description' => '',
  247. 'table' => 'acquisition_relationship',
  248. 'fields' => [
  249. 'acquisition_relationship_id' => [
  250. 'size' => 'big',
  251. 'type' => 'serial',
  252. 'not null' => TRUE,
  253. ],
  254. 'subject_id' => [
  255. 'size' => 'big',
  256. 'type' => 'int',
  257. 'not null' => TRUE,
  258. ],
  259. 'type_id' => [
  260. 'size' => 'big',
  261. 'type' => 'int',
  262. 'not null' => TRUE,
  263. ],
  264. 'object_id' => [
  265. 'size' => 'big',
  266. 'type' => 'int',
  267. 'not null' => TRUE,
  268. ],
  269. 'value' => [
  270. 'size' => 'normal',
  271. 'type' => 'text',
  272. 'not null' => FALSE,
  273. ],
  274. 'rank' => [
  275. 'size' => 'normal',
  276. 'type' => 'int',
  277. 'not null' => TRUE,
  278. 'default' => 0,
  279. ],
  280. ],
  281. 'unique keys' => [
  282. 'acquisition_relationship_c1' => [
  283. 0 => 'subject_id',
  284. 1 => 'object_id',
  285. 2 => 'type_id',
  286. 3 => 'rank',
  287. ],
  288. ],
  289. 'indexes' => [
  290. 'acquisition_relationship_idx1' => [
  291. 0 => 'subject_id',
  292. ],
  293. 'acquisition_relationship_idx2' => [
  294. 0 => 'type_id',
  295. ],
  296. 'acquisition_relationship_idx3' => [
  297. 0 => 'object_id',
  298. ],
  299. ],
  300. 'primary key' => [
  301. 0 => 'acquisition_relationship_id',
  302. ],
  303. 'foreign keys' => [
  304. 'acquisition' => [
  305. 'table' => 'acquisition',
  306. 'columns' => [
  307. 'subject_id' => 'acquisition_id',
  308. 'object_id' => 'acquisition_id',
  309. ],
  310. ],
  311. 'cvterm' => [
  312. 'table' => 'cvterm',
  313. 'columns' => [
  314. 'type_id' => 'cvterm_id',
  315. ],
  316. ],
  317. ],
  318. 'referring_tables' => [
  319. ],
  320. ];
  321. return $description;
  322. }
  323. /**
  324. * Implements hook_chado_schema_v1_3_analysis()
  325. *
  326. * Purpose: To describe the structure of 'analysis' to tripal
  327. *
  328. * @see chado_insert_record()
  329. * @see chado_update_record()
  330. * @see chado_select_record()
  331. * @see chado_generate_var()
  332. * @see chado_expan_var()
  333. *
  334. * @return
  335. * An array describing the 'analysis' table
  336. *
  337. * @ingroup tripal_chado_v1.3_schema_api
  338. *
  339. */
  340. function tripal_chado_chado_schema_v1_3_analysis() {
  341. $description = [
  342. 'description' => '',
  343. 'table' => 'analysis',
  344. 'fields' => [
  345. 'analysis_id' => [
  346. 'size' => 'big',
  347. 'type' => 'serial',
  348. 'not null' => TRUE,
  349. ],
  350. 'name' => [
  351. 'size' => 'normal',
  352. 'type' => 'varchar',
  353. 'length' => '255',
  354. 'not null' => FALSE,
  355. ],
  356. 'description' => [
  357. 'size' => 'normal',
  358. 'type' => 'text',
  359. 'not null' => FALSE,
  360. ],
  361. 'program' => [
  362. 'size' => 'normal',
  363. 'type' => 'varchar',
  364. 'length' => '255',
  365. 'not null' => TRUE,
  366. ],
  367. 'programversion' => [
  368. 'size' => 'normal',
  369. 'type' => 'varchar',
  370. 'length' => '255',
  371. 'not null' => TRUE,
  372. ],
  373. 'algorithm' => [
  374. 'size' => 'normal',
  375. 'type' => 'varchar',
  376. 'length' => '255',
  377. 'not null' => FALSE,
  378. ],
  379. 'sourcename' => [
  380. 'size' => 'normal',
  381. 'type' => 'varchar',
  382. 'length' => '255',
  383. 'not null' => FALSE,
  384. ],
  385. 'sourceversion' => [
  386. 'size' => 'normal',
  387. 'type' => 'varchar',
  388. 'length' => '255',
  389. 'not null' => FALSE,
  390. ],
  391. 'sourceuri' => [
  392. 'size' => 'normal',
  393. 'type' => 'text',
  394. 'not null' => FALSE,
  395. ],
  396. 'timeexecuted' => [
  397. 'size' => 'normal',
  398. 'type' => 'datetime',
  399. 'not null' => TRUE,
  400. 'default' => 'now()',
  401. ],
  402. ],
  403. 'unique keys' => [
  404. 'analysis_c1' => [
  405. 0 => 'program',
  406. 1 => 'programversion',
  407. 2 => 'sourcename',
  408. ],
  409. ],
  410. 'primary key' => [
  411. 0 => 'analysis_id',
  412. ],
  413. 'foreign keys' => [
  414. ],
  415. 'referring_tables' => [
  416. 0 => 'analysis_cvterm',
  417. 1 => 'analysis_dbxref',
  418. 2 => 'analysisfeature',
  419. 3 => 'analysis_organism',
  420. 4 => 'analysisprop',
  421. 5 => 'analysis_pub',
  422. 6 => 'analysis_relationship',
  423. 8 => 'nd_experiment_analysis',
  424. 9 => 'phylotree',
  425. 10 => 'project_analysis',
  426. 11 => 'quantification',
  427. ],
  428. ];
  429. return $description;
  430. }
  431. /**
  432. * Implements hook_chado_schema_v1_3_analysis_cvterm()
  433. *
  434. * Purpose: To describe the structure of 'analysis_cvterm' to tripal
  435. *
  436. * @see chado_insert_record()
  437. * @see chado_update_record()
  438. * @see chado_select_record()
  439. * @see chado_generate_var()
  440. * @see chado_expan_var()
  441. *
  442. * @return
  443. * An array describing the 'analysis_cvterm' table
  444. *
  445. * @ingroup tripal_chado_v1.3_schema_api
  446. *
  447. */
  448. function tripal_chado_chado_schema_v1_3_analysis_cvterm() {
  449. $description = [
  450. 'description' => '',
  451. 'table' => 'analysis_cvterm',
  452. 'fields' => [
  453. 'analysis_cvterm_id' => [
  454. 'size' => 'big',
  455. 'type' => 'serial',
  456. 'not null' => TRUE,
  457. ],
  458. 'analysis_id' => [
  459. 'size' => 'big',
  460. 'type' => 'int',
  461. 'not null' => TRUE,
  462. ],
  463. 'cvterm_id' => [
  464. 'size' => 'big',
  465. 'type' => 'int',
  466. 'not null' => TRUE,
  467. ],
  468. 'is_not' => [
  469. 'size' => 'normal',
  470. 'type' => 'boolean',
  471. 'not null' => TRUE,
  472. 'default' => FALSE,
  473. ],
  474. 'rank' => [
  475. 'size' => 'normal',
  476. 'type' => 'int',
  477. 'not null' => TRUE,
  478. 'default' => 0,
  479. ],
  480. ],
  481. 'unique keys' => [
  482. 'analysis_cvterm_c1' => [
  483. 0 => 'analysis_id',
  484. 1 => 'cvterm_id',
  485. 2 => 'rank',
  486. ],
  487. ],
  488. 'indexes' => [
  489. 'analysis_cvterm_idx1' => [
  490. 0 => 'analysis_id',
  491. ],
  492. 'analysis_cvterm_idx2' => [
  493. 0 => 'cvterm_id',
  494. ],
  495. ],
  496. 'primary key' => [
  497. 0 => 'analysis_cvterm_id',
  498. ],
  499. 'foreign keys' => [
  500. 'analysis' => [
  501. 'table' => 'analysis',
  502. 'columns' => [
  503. 'analysis_id' => 'analysis_id',
  504. ],
  505. ],
  506. 'cvterm' => [
  507. 'table' => 'cvterm',
  508. 'columns' => [
  509. 'cvterm_id' => 'cvterm_id',
  510. ],
  511. ],
  512. ],
  513. 'referring_tables' => [
  514. ],
  515. ];
  516. return $description;
  517. }
  518. /**
  519. * Implements hook_chado_schema_v1_3_analysis_dbxref()
  520. *
  521. * Purpose: To describe the structure of 'analysis_dbxref' to tripal
  522. *
  523. * @see chado_insert_record()
  524. * @see chado_update_record()
  525. * @see chado_select_record()
  526. * @see chado_generate_var()
  527. * @see chado_expan_var()
  528. *
  529. * @return
  530. * An array describing the 'analysis_dbxref' table
  531. *
  532. * @ingroup tripal_chado_v1.3_schema_api
  533. *
  534. */
  535. function tripal_chado_chado_schema_v1_3_analysis_dbxref() {
  536. $description = [
  537. 'description' => '',
  538. 'table' => 'analysis_dbxref',
  539. 'fields' => [
  540. 'analysis_dbxref_id' => [
  541. 'size' => 'big',
  542. 'type' => 'serial',
  543. 'not null' => TRUE,
  544. ],
  545. 'analysis_id' => [
  546. 'size' => 'big',
  547. 'type' => 'int',
  548. 'not null' => TRUE,
  549. ],
  550. 'dbxref_id' => [
  551. 'size' => 'big',
  552. 'type' => 'int',
  553. 'not null' => TRUE,
  554. ],
  555. 'is_current' => [
  556. 'size' => 'normal',
  557. 'type' => 'boolean',
  558. 'not null' => TRUE,
  559. 'default' => 'true',
  560. ],
  561. ],
  562. 'unique keys' => [
  563. 'analysis_dbxref_c1' => [
  564. 0 => 'analysis_id',
  565. 1 => 'dbxref_id',
  566. ],
  567. ],
  568. 'indexes' => [
  569. 'analysis_dbxref_idx1' => [
  570. 0 => 'analysis_id',
  571. ],
  572. 'analysis_dbxref_idx2' => [
  573. 0 => 'dbxref_id',
  574. ],
  575. ],
  576. 'primary key' => [
  577. 0 => 'analysis_dbxref_id',
  578. ],
  579. 'foreign keys' => [
  580. 'analysis' => [
  581. 'table' => 'analysis',
  582. 'columns' => [
  583. 'analysis_id' => 'analysis_id',
  584. ],
  585. ],
  586. 'dbxref' => [
  587. 'table' => 'dbxref',
  588. 'columns' => [
  589. 'dbxref_id' => 'dbxref_id',
  590. ],
  591. ],
  592. ],
  593. 'referring_tables' => [
  594. ],
  595. ];
  596. return $description;
  597. }
  598. /**
  599. * Implements hook_chado_schema_v1_3_analysisfeature()
  600. *
  601. * Purpose: To describe the structure of 'analysisfeature' to tripal
  602. *
  603. * @see chado_insert_record()
  604. * @see chado_update_record()
  605. * @see chado_select_record()
  606. * @see chado_generate_var()
  607. * @see chado_expan_var()
  608. *
  609. * @return
  610. * An array describing the 'analysisfeature' table
  611. *
  612. * @ingroup tripal_chado_v1.3_schema_api
  613. *
  614. */
  615. function tripal_chado_chado_schema_v1_3_analysisfeature() {
  616. $description = [
  617. 'description' => '',
  618. 'table' => 'analysisfeature',
  619. 'fields' => [
  620. 'analysisfeature_id' => [
  621. 'size' => 'big',
  622. 'type' => 'serial',
  623. 'not null' => TRUE,
  624. ],
  625. 'feature_id' => [
  626. 'size' => 'big',
  627. 'type' => 'int',
  628. 'not null' => TRUE,
  629. ],
  630. 'analysis_id' => [
  631. 'size' => 'big',
  632. 'type' => 'int',
  633. 'not null' => TRUE,
  634. ],
  635. 'rawscore' => [
  636. 'size' => 'big',
  637. 'type' => 'float',
  638. 'not null' => FALSE,
  639. ],
  640. 'normscore' => [
  641. 'size' => 'big',
  642. 'type' => 'float',
  643. 'not null' => FALSE,
  644. ],
  645. 'significance' => [
  646. 'size' => 'big',
  647. 'type' => 'float',
  648. 'not null' => FALSE,
  649. ],
  650. 'identity' => [
  651. 'size' => 'big',
  652. 'type' => 'float',
  653. 'not null' => FALSE,
  654. ],
  655. ],
  656. 'unique keys' => [
  657. 'analysisfeature_c1' => [
  658. 0 => 'feature_id',
  659. 1 => 'analysis_id',
  660. ],
  661. ],
  662. 'indexes' => [
  663. 'analysisfeature_idx1' => [
  664. 0 => 'feature_id',
  665. ],
  666. 'analysisfeature_idx2' => [
  667. 0 => 'analysis_id',
  668. ],
  669. ],
  670. 'primary key' => [
  671. 0 => 'analysisfeature_id',
  672. ],
  673. 'foreign keys' => [
  674. 'feature' => [
  675. 'table' => 'feature',
  676. 'columns' => [
  677. 'feature_id' => 'feature_id',
  678. ],
  679. ],
  680. 'analysis' => [
  681. 'table' => 'analysis',
  682. 'columns' => [
  683. 'analysis_id' => 'analysis_id',
  684. ],
  685. ],
  686. ],
  687. 'referring_tables' => [
  688. 0 => 'analysisfeatureprop',
  689. ],
  690. ];
  691. return $description;
  692. }
  693. /**
  694. * Implements hook_chado_schema_v1_3_analysisfeatureprop()
  695. *
  696. * Purpose: To describe the structure of 'analysisfeatureprop' to tripal
  697. *
  698. * @see chado_insert_record()
  699. * @see chado_update_record()
  700. * @see chado_select_record()
  701. * @see chado_generate_var()
  702. * @see chado_expan_var()
  703. *
  704. * @return
  705. * An array describing the 'analysisfeatureprop' table
  706. *
  707. * @ingroup tripal_chado_v1.3_schema_api
  708. *
  709. */
  710. function tripal_chado_chado_schema_v1_3_analysisfeatureprop() {
  711. $description = [
  712. 'description' => '',
  713. 'table' => 'analysisfeatureprop',
  714. 'fields' => [
  715. 'analysisfeatureprop_id' => [
  716. 'size' => 'big',
  717. 'type' => 'serial',
  718. 'not null' => TRUE,
  719. ],
  720. 'analysisfeature_id' => [
  721. 'size' => 'big',
  722. 'type' => 'int',
  723. 'not null' => TRUE,
  724. ],
  725. 'type_id' => [
  726. 'size' => 'big',
  727. 'type' => 'int',
  728. 'not null' => TRUE,
  729. ],
  730. 'value' => [
  731. 'size' => 'normal',
  732. 'type' => 'text',
  733. 'not null' => FALSE,
  734. ],
  735. 'rank' => [
  736. 'size' => 'normal',
  737. 'type' => 'int',
  738. 'not null' => TRUE,
  739. ],
  740. ],
  741. 'unique keys' => [
  742. 'analysisfeature_id_type_id_rank' => [
  743. 0 => 'analysisfeature_id',
  744. 1 => 'type_id',
  745. 2 => 'rank',
  746. ],
  747. ],
  748. 'indexes' => [
  749. 'analysisfeatureprop_idx1' => [
  750. 0 => 'analysisfeature_id',
  751. ],
  752. 'analysisfeatureprop_idx2' => [
  753. 0 => 'type_id',
  754. ],
  755. ],
  756. 'primary key' => [
  757. 0 => 'analysisfeatureprop_id',
  758. ],
  759. 'foreign keys' => [
  760. 'analysisfeature' => [
  761. 'table' => 'analysisfeature',
  762. 'columns' => [
  763. 'analysisfeature_id' => 'analysisfeature_id',
  764. ],
  765. ],
  766. 'cvterm' => [
  767. 'table' => 'cvterm',
  768. 'columns' => [
  769. 'type_id' => 'cvterm_id',
  770. ],
  771. ],
  772. ],
  773. 'referring_tables' => [
  774. ],
  775. ];
  776. return $description;
  777. }
  778. /**
  779. * Implements hook_chado_schema_v1_3_analysis_organism()
  780. *
  781. * Purpose: To describe the structure of 'analysis_organism' to tripal
  782. *
  783. * @see chado_insert_record()
  784. * @see chado_update_record()
  785. * @see chado_select_record()
  786. * @see chado_generate_var()
  787. * @see chado_expan_var()
  788. *
  789. * @return
  790. * An array describing the 'analysis_organism' table
  791. *
  792. * @ingroup tripal_chado_v1.3_schema_api
  793. *
  794. */
  795. function tripal_chado_chado_schema_v1_3_analysis_organism() {
  796. $description = [
  797. 'description' => '',
  798. 'table' => 'analysis_organism',
  799. 'fields' => [
  800. 'analysis_id' => [
  801. 'size' => 'normal',
  802. 'type' => 'int',
  803. 'not null' => TRUE,
  804. ],
  805. 'organism_id' => [
  806. 'size' => 'normal',
  807. 'type' => 'int',
  808. 'not null' => TRUE,
  809. ],
  810. ],
  811. 'indexes' => [
  812. 'networkmod_qtl_indx0' => [
  813. 0 => 'analysis_id',
  814. ],
  815. 'networkmod_qtl_indx1' => [
  816. 0 => 'organism_id',
  817. ],
  818. ],
  819. 'foreign keys' => [
  820. 'analysis' => [
  821. 'table' => 'analysis',
  822. 'columns' => [
  823. 'analysis_id' => 'analysis_id',
  824. ],
  825. ],
  826. 'organism' => [
  827. 'table' => 'organism',
  828. 'columns' => [
  829. 'organism_id' => 'organism_id',
  830. ],
  831. ],
  832. ],
  833. 'referring_tables' => [
  834. ],
  835. ];
  836. return $description;
  837. }
  838. /**
  839. * Implements hook_chado_schema_v1_3_analysisprop()
  840. *
  841. * Purpose: To describe the structure of 'analysisprop' to tripal
  842. *
  843. * @see chado_insert_record()
  844. * @see chado_update_record()
  845. * @see chado_select_record()
  846. * @see chado_generate_var()
  847. * @see chado_expan_var()
  848. *
  849. * @return
  850. * An array describing the 'analysisprop' table
  851. *
  852. * @ingroup tripal_chado_v1.3_schema_api
  853. *
  854. */
  855. function tripal_chado_chado_schema_v1_3_analysisprop() {
  856. $description = [
  857. 'description' => '',
  858. 'table' => 'analysisprop',
  859. 'fields' => [
  860. 'analysisprop_id' => [
  861. 'size' => 'big',
  862. 'type' => 'serial',
  863. 'not null' => TRUE,
  864. ],
  865. 'analysis_id' => [
  866. 'size' => 'big',
  867. 'type' => 'int',
  868. 'not null' => TRUE,
  869. ],
  870. 'type_id' => [
  871. 'size' => 'big',
  872. 'type' => 'int',
  873. 'not null' => TRUE,
  874. ],
  875. 'value' => [
  876. 'size' => 'normal',
  877. 'type' => 'text',
  878. 'not null' => FALSE,
  879. ],
  880. 'rank' => [
  881. 'size' => 'normal',
  882. 'type' => 'int',
  883. 'not null' => TRUE,
  884. 'default' => 0,
  885. ],
  886. ],
  887. 'unique keys' => [
  888. 'analysisprop_c1' => [
  889. 0 => 'analysis_id',
  890. 1 => 'type_id',
  891. 2 => 'rank',
  892. ],
  893. ],
  894. 'indexes' => [
  895. 'analysisprop_idx1' => [
  896. 0 => 'analysis_id',
  897. ],
  898. 'analysisprop_idx2' => [
  899. 0 => 'type_id',
  900. ],
  901. ],
  902. 'primary key' => [
  903. 0 => 'analysisprop_id',
  904. ],
  905. 'foreign keys' => [
  906. 'analysis' => [
  907. 'table' => 'analysis',
  908. 'columns' => [
  909. 'analysis_id' => 'analysis_id',
  910. ],
  911. ],
  912. 'cvterm' => [
  913. 'table' => 'cvterm',
  914. 'columns' => [
  915. 'type_id' => 'cvterm_id',
  916. ],
  917. ],
  918. ],
  919. 'referring_tables' => [
  920. ],
  921. ];
  922. return $description;
  923. }
  924. /**
  925. * Implements hook_chado_schema_v1_3_analysis_pub()
  926. *
  927. * Purpose: To describe the structure of 'analysis_pub' to tripal
  928. *
  929. * @see chado_insert_record()
  930. * @see chado_update_record()
  931. * @see chado_select_record()
  932. * @see chado_generate_var()
  933. * @see chado_expan_var()
  934. *
  935. * @return
  936. * An array describing the 'analysis_pub' table
  937. *
  938. * @ingroup tripal_chado_v1.3_schema_api
  939. *
  940. */
  941. function tripal_chado_chado_schema_v1_3_analysis_pub() {
  942. $description = [
  943. 'description' => '',
  944. 'table' => 'analysis_pub',
  945. 'fields' => [
  946. 'analysis_pub_id' => [
  947. 'size' => 'big',
  948. 'type' => 'serial',
  949. 'not null' => TRUE,
  950. ],
  951. 'analysis_id' => [
  952. 'size' => 'big',
  953. 'type' => 'int',
  954. 'not null' => TRUE,
  955. ],
  956. 'pub_id' => [
  957. 'size' => 'big',
  958. 'type' => 'int',
  959. 'not null' => TRUE,
  960. ],
  961. ],
  962. 'unique keys' => [
  963. 'analysis_pub_c1' => [
  964. 0 => 'analysis_id',
  965. 1 => 'pub_id',
  966. ],
  967. ],
  968. 'indexes' => [
  969. 'analysis_pub_idx1' => [
  970. 0 => 'analysis_id',
  971. ],
  972. 'analysis_pub_idx2' => [
  973. 0 => 'pub_id',
  974. ],
  975. ],
  976. 'primary key' => [
  977. 0 => 'analysis_pub_id',
  978. ],
  979. 'foreign keys' => [
  980. 'analysis' => [
  981. 'table' => 'analysis',
  982. 'columns' => [
  983. 'analysis_id' => 'analysis_id',
  984. ],
  985. ],
  986. 'pub' => [
  987. 'table' => 'pub',
  988. 'columns' => [
  989. 'pub_id' => 'pub_id',
  990. ],
  991. ],
  992. ],
  993. 'referring_tables' => [
  994. ],
  995. ];
  996. return $description;
  997. }
  998. /**
  999. * Implements hook_chado_schema_v1_3_analysis_relationship()
  1000. *
  1001. * Purpose: To describe the structure of 'analysis_relationship' to tripal
  1002. *
  1003. * @see chado_insert_record()
  1004. * @see chado_update_record()
  1005. * @see chado_select_record()
  1006. * @see chado_generate_var()
  1007. * @see chado_expan_var()
  1008. *
  1009. * @return
  1010. * An array describing the 'analysis_relationship' table
  1011. *
  1012. * @ingroup tripal_chado_v1.3_schema_api
  1013. *
  1014. */
  1015. function tripal_chado_chado_schema_v1_3_analysis_relationship() {
  1016. $description = [
  1017. 'description' => '',
  1018. 'table' => 'analysis_relationship',
  1019. 'fields' => [
  1020. 'analysis_relationship_id' => [
  1021. 'size' => 'big',
  1022. 'type' => 'serial',
  1023. 'not null' => TRUE,
  1024. ],
  1025. 'subject_id' => [
  1026. 'size' => 'big',
  1027. 'type' => 'int',
  1028. 'not null' => TRUE,
  1029. ],
  1030. 'object_id' => [
  1031. 'size' => 'big',
  1032. 'type' => 'int',
  1033. 'not null' => TRUE,
  1034. ],
  1035. 'type_id' => [
  1036. 'size' => 'big',
  1037. 'type' => 'int',
  1038. 'not null' => TRUE,
  1039. ],
  1040. 'value' => [
  1041. 'size' => 'normal',
  1042. 'type' => 'text',
  1043. 'not null' => FALSE,
  1044. ],
  1045. 'rank' => [
  1046. 'size' => 'normal',
  1047. 'type' => 'int',
  1048. 'not null' => TRUE,
  1049. 'default' => 0,
  1050. ],
  1051. ],
  1052. 'unique keys' => [
  1053. 'analysis_relationship_c1' => [
  1054. 0 => 'subject_id',
  1055. 1 => 'object_id',
  1056. 2 => 'type_id',
  1057. 3 => 'rank',
  1058. ],
  1059. ],
  1060. 'indexes' => [
  1061. 'analysis_relationship_idx1' => [
  1062. 0 => 'subject_id',
  1063. ],
  1064. 'analysis_relationship_idx2' => [
  1065. 0 => 'object_id',
  1066. ],
  1067. 'analysis_relationship_idx3' => [
  1068. 0 => 'type_id',
  1069. ],
  1070. ],
  1071. 'primary key' => [
  1072. 0 => 'analysis_relationship_id',
  1073. ],
  1074. 'foreign keys' => [
  1075. 'analysis' => [
  1076. 'table' => 'analysis',
  1077. 'columns' => [
  1078. 'subject_id' => 'analysis_id',
  1079. 'object_id' => 'analysis_id',
  1080. ],
  1081. ],
  1082. 'cvterm' => [
  1083. 'table' => 'cvterm',
  1084. 'columns' => [
  1085. 'type_id' => 'cvterm_id',
  1086. ],
  1087. ],
  1088. ],
  1089. 'referring_tables' => [
  1090. ],
  1091. ];
  1092. return $description;
  1093. }
  1094. /**
  1095. * Implements hook_chado_schema_v1_3_arraydesign()
  1096. *
  1097. * Purpose: To describe the structure of 'arraydesign' to tripal
  1098. *
  1099. * @see chado_insert_record()
  1100. * @see chado_update_record()
  1101. * @see chado_select_record()
  1102. * @see chado_generate_var()
  1103. * @see chado_expan_var()
  1104. *
  1105. * @return
  1106. * An array describing the 'arraydesign' table
  1107. *
  1108. * @ingroup tripal_chado_v1.3_schema_api
  1109. *
  1110. */
  1111. function tripal_chado_chado_schema_v1_3_arraydesign() {
  1112. $description = [
  1113. 'description' => '',
  1114. 'table' => 'arraydesign',
  1115. 'fields' => [
  1116. 'arraydesign_id' => [
  1117. 'size' => 'big',
  1118. 'type' => 'serial',
  1119. 'not null' => TRUE,
  1120. ],
  1121. 'manufacturer_id' => [
  1122. 'size' => 'big',
  1123. 'type' => 'int',
  1124. 'not null' => TRUE,
  1125. ],
  1126. 'platformtype_id' => [
  1127. 'size' => 'big',
  1128. 'type' => 'int',
  1129. 'not null' => TRUE,
  1130. ],
  1131. 'substratetype_id' => [
  1132. 'size' => 'big',
  1133. 'type' => 'int',
  1134. 'not null' => FALSE,
  1135. ],
  1136. 'protocol_id' => [
  1137. 'size' => 'big',
  1138. 'type' => 'int',
  1139. 'not null' => FALSE,
  1140. ],
  1141. 'dbxref_id' => [
  1142. 'size' => 'big',
  1143. 'type' => 'int',
  1144. 'not null' => FALSE,
  1145. ],
  1146. 'name' => [
  1147. 'size' => 'normal',
  1148. 'type' => 'text',
  1149. 'not null' => TRUE,
  1150. ],
  1151. 'version' => [
  1152. 'size' => 'normal',
  1153. 'type' => 'text',
  1154. 'not null' => FALSE,
  1155. ],
  1156. 'description' => [
  1157. 'size' => 'normal',
  1158. 'type' => 'text',
  1159. 'not null' => FALSE,
  1160. ],
  1161. 'array_dimensions' => [
  1162. 'size' => 'normal',
  1163. 'type' => 'text',
  1164. 'not null' => FALSE,
  1165. ],
  1166. 'element_dimensions' => [
  1167. 'size' => 'normal',
  1168. 'type' => 'text',
  1169. 'not null' => FALSE,
  1170. ],
  1171. 'num_of_elements' => [
  1172. 'size' => 'normal',
  1173. 'type' => 'int',
  1174. 'not null' => FALSE,
  1175. ],
  1176. 'num_array_columns' => [
  1177. 'size' => 'normal',
  1178. 'type' => 'int',
  1179. 'not null' => FALSE,
  1180. ],
  1181. 'num_array_rows' => [
  1182. 'size' => 'normal',
  1183. 'type' => 'int',
  1184. 'not null' => FALSE,
  1185. ],
  1186. 'num_grid_columns' => [
  1187. 'size' => 'normal',
  1188. 'type' => 'int',
  1189. 'not null' => FALSE,
  1190. ],
  1191. 'num_grid_rows' => [
  1192. 'size' => 'normal',
  1193. 'type' => 'int',
  1194. 'not null' => FALSE,
  1195. ],
  1196. 'num_sub_columns' => [
  1197. 'size' => 'normal',
  1198. 'type' => 'int',
  1199. 'not null' => FALSE,
  1200. ],
  1201. 'num_sub_rows' => [
  1202. 'size' => 'normal',
  1203. 'type' => 'int',
  1204. 'not null' => FALSE,
  1205. ],
  1206. ],
  1207. 'unique keys' => [
  1208. 'arraydesign_c1' => [
  1209. 0 => 'name',
  1210. ],
  1211. ],
  1212. 'indexes' => [
  1213. 'arraydesign_idx1' => [
  1214. 0 => 'manufacturer_id',
  1215. ],
  1216. 'arraydesign_idx2' => [
  1217. 0 => 'platformtype_id',
  1218. ],
  1219. 'arraydesign_idx3' => [
  1220. 0 => 'substratetype_id',
  1221. ],
  1222. 'arraydesign_idx4' => [
  1223. 0 => 'protocol_id',
  1224. ],
  1225. 'arraydesign_idx5' => [
  1226. 0 => 'dbxref_id',
  1227. ],
  1228. ],
  1229. 'primary key' => [
  1230. 0 => 'arraydesign_id',
  1231. ],
  1232. 'foreign keys' => [
  1233. 'contact' => [
  1234. 'table' => 'contact',
  1235. 'columns' => [
  1236. 'manufacturer_id' => 'contact_id',
  1237. ],
  1238. ],
  1239. 'cvterm' => [
  1240. 'table' => 'cvterm',
  1241. 'columns' => [
  1242. 'platformtype_id' => 'cvterm_id',
  1243. 'substratetype_id' => 'cvterm_id',
  1244. ],
  1245. ],
  1246. 'protocol' => [
  1247. 'table' => 'protocol',
  1248. 'columns' => [
  1249. 'protocol_id' => 'protocol_id',
  1250. ],
  1251. ],
  1252. 'dbxref' => [
  1253. 'table' => 'dbxref',
  1254. 'columns' => [
  1255. 'dbxref_id' => 'dbxref_id',
  1256. ],
  1257. ],
  1258. ],
  1259. 'referring_tables' => [
  1260. 0 => 'arraydesignprop',
  1261. 1 => 'assay',
  1262. 2 => 'element',
  1263. ],
  1264. ];
  1265. return $description;
  1266. }
  1267. /**
  1268. * Implements hook_chado_schema_v1_3_arraydesignprop()
  1269. *
  1270. * Purpose: To describe the structure of 'arraydesignprop' to tripal
  1271. *
  1272. * @see chado_insert_record()
  1273. * @see chado_update_record()
  1274. * @see chado_select_record()
  1275. * @see chado_generate_var()
  1276. * @see chado_expan_var()
  1277. *
  1278. * @return
  1279. * An array describing the 'arraydesignprop' table
  1280. *
  1281. * @ingroup tripal_chado_v1.3_schema_api
  1282. *
  1283. */
  1284. function tripal_chado_chado_schema_v1_3_arraydesignprop() {
  1285. $description = [
  1286. 'description' => '',
  1287. 'table' => 'arraydesignprop',
  1288. 'fields' => [
  1289. 'arraydesignprop_id' => [
  1290. 'size' => 'big',
  1291. 'type' => 'serial',
  1292. 'not null' => TRUE,
  1293. ],
  1294. 'arraydesign_id' => [
  1295. 'size' => 'big',
  1296. 'type' => 'int',
  1297. 'not null' => TRUE,
  1298. ],
  1299. 'type_id' => [
  1300. 'size' => 'big',
  1301. 'type' => 'int',
  1302. 'not null' => TRUE,
  1303. ],
  1304. 'value' => [
  1305. 'size' => 'normal',
  1306. 'type' => 'text',
  1307. 'not null' => FALSE,
  1308. ],
  1309. 'rank' => [
  1310. 'size' => 'normal',
  1311. 'type' => 'int',
  1312. 'not null' => TRUE,
  1313. 'default' => 0,
  1314. ],
  1315. ],
  1316. 'unique keys' => [
  1317. 'arraydesignprop_c1' => [
  1318. 0 => 'arraydesign_id',
  1319. 1 => 'type_id',
  1320. 2 => 'rank',
  1321. ],
  1322. ],
  1323. 'indexes' => [
  1324. 'arraydesignprop_idx1' => [
  1325. 0 => 'arraydesign_id',
  1326. ],
  1327. 'arraydesignprop_idx2' => [
  1328. 0 => 'type_id',
  1329. ],
  1330. ],
  1331. 'primary key' => [
  1332. 0 => 'arraydesignprop_id',
  1333. ],
  1334. 'foreign keys' => [
  1335. 'arraydesign' => [
  1336. 'table' => 'arraydesign',
  1337. 'columns' => [
  1338. 'arraydesign_id' => 'arraydesign_id',
  1339. ],
  1340. ],
  1341. 'cvterm' => [
  1342. 'table' => 'cvterm',
  1343. 'columns' => [
  1344. 'type_id' => 'cvterm_id',
  1345. ],
  1346. ],
  1347. ],
  1348. 'referring_tables' => [
  1349. ],
  1350. ];
  1351. return $description;
  1352. }
  1353. /**
  1354. * Implements hook_chado_schema_v1_3_assay()
  1355. *
  1356. * Purpose: To describe the structure of 'assay' to tripal
  1357. *
  1358. * @see chado_insert_record()
  1359. * @see chado_update_record()
  1360. * @see chado_select_record()
  1361. * @see chado_generate_var()
  1362. * @see chado_expan_var()
  1363. *
  1364. * @return
  1365. * An array describing the 'assay' table
  1366. *
  1367. * @ingroup tripal_chado_v1.3_schema_api
  1368. *
  1369. */
  1370. function tripal_chado_chado_schema_v1_3_assay() {
  1371. $description = [
  1372. 'description' => '',
  1373. 'table' => 'assay',
  1374. 'fields' => [
  1375. 'assay_id' => [
  1376. 'size' => 'big',
  1377. 'type' => 'serial',
  1378. 'not null' => TRUE,
  1379. ],
  1380. 'arraydesign_id' => [
  1381. 'size' => 'big',
  1382. 'type' => 'int',
  1383. 'not null' => TRUE,
  1384. ],
  1385. 'protocol_id' => [
  1386. 'size' => 'big',
  1387. 'type' => 'int',
  1388. 'not null' => FALSE,
  1389. ],
  1390. 'assaydate' => [
  1391. 'size' => 'normal',
  1392. 'type' => 'datetime',
  1393. 'not null' => FALSE,
  1394. 'default' => 'now()',
  1395. ],
  1396. 'arrayidentifier' => [
  1397. 'size' => 'normal',
  1398. 'type' => 'text',
  1399. 'not null' => FALSE,
  1400. ],
  1401. 'arraybatchidentifier' => [
  1402. 'size' => 'normal',
  1403. 'type' => 'text',
  1404. 'not null' => FALSE,
  1405. ],
  1406. 'operator_id' => [
  1407. 'size' => 'big',
  1408. 'type' => 'int',
  1409. 'not null' => TRUE,
  1410. ],
  1411. 'dbxref_id' => [
  1412. 'size' => 'big',
  1413. 'type' => 'int',
  1414. 'not null' => FALSE,
  1415. ],
  1416. 'name' => [
  1417. 'size' => 'normal',
  1418. 'type' => 'text',
  1419. 'not null' => FALSE,
  1420. ],
  1421. 'description' => [
  1422. 'size' => 'normal',
  1423. 'type' => 'text',
  1424. 'not null' => FALSE,
  1425. ],
  1426. ],
  1427. 'unique keys' => [
  1428. 'assay_c1' => [
  1429. 0 => 'name',
  1430. ],
  1431. ],
  1432. 'indexes' => [
  1433. 'assay_idx1' => [
  1434. 0 => 'arraydesign_id',
  1435. ],
  1436. 'assay_idx2' => [
  1437. 0 => 'protocol_id',
  1438. ],
  1439. 'assay_idx3' => [
  1440. 0 => 'operator_id',
  1441. ],
  1442. 'assay_idx4' => [
  1443. 0 => 'dbxref_id',
  1444. ],
  1445. ],
  1446. 'primary key' => [
  1447. 0 => 'assay_id',
  1448. ],
  1449. 'foreign keys' => [
  1450. 'arraydesign' => [
  1451. 'table' => 'arraydesign',
  1452. 'columns' => [
  1453. 'arraydesign_id' => 'arraydesign_id',
  1454. ],
  1455. ],
  1456. 'protocol' => [
  1457. 'table' => 'protocol',
  1458. 'columns' => [
  1459. 'protocol_id' => 'protocol_id',
  1460. ],
  1461. ],
  1462. 'contact' => [
  1463. 'table' => 'contact',
  1464. 'columns' => [
  1465. 'operator_id' => 'contact_id',
  1466. ],
  1467. ],
  1468. 'dbxref' => [
  1469. 'table' => 'dbxref',
  1470. 'columns' => [
  1471. 'dbxref_id' => 'dbxref_id',
  1472. ],
  1473. ],
  1474. ],
  1475. 'referring_tables' => [
  1476. 0 => 'acquisition',
  1477. 1 => 'assay_biomaterial',
  1478. 2 => 'assay_project',
  1479. 3 => 'assayprop',
  1480. 4 => 'control',
  1481. 5 => 'study_assay',
  1482. 6 => 'studyfactorvalue',
  1483. ],
  1484. ];
  1485. return $description;
  1486. }
  1487. /**
  1488. * Implements hook_chado_schema_v1_3_assay_biomaterial()
  1489. *
  1490. * Purpose: To describe the structure of 'assay_biomaterial' to tripal
  1491. *
  1492. * @see chado_insert_record()
  1493. * @see chado_update_record()
  1494. * @see chado_select_record()
  1495. * @see chado_generate_var()
  1496. * @see chado_expan_var()
  1497. *
  1498. * @return
  1499. * An array describing the 'assay_biomaterial' table
  1500. *
  1501. * @ingroup tripal_chado_v1.3_schema_api
  1502. *
  1503. */
  1504. function tripal_chado_chado_schema_v1_3_assay_biomaterial() {
  1505. $description = [
  1506. 'description' => '',
  1507. 'table' => 'assay_biomaterial',
  1508. 'fields' => [
  1509. 'assay_biomaterial_id' => [
  1510. 'size' => 'big',
  1511. 'type' => 'serial',
  1512. 'not null' => TRUE,
  1513. ],
  1514. 'assay_id' => [
  1515. 'size' => 'big',
  1516. 'type' => 'int',
  1517. 'not null' => TRUE,
  1518. ],
  1519. 'biomaterial_id' => [
  1520. 'size' => 'big',
  1521. 'type' => 'int',
  1522. 'not null' => TRUE,
  1523. ],
  1524. 'channel_id' => [
  1525. 'size' => 'big',
  1526. 'type' => 'int',
  1527. 'not null' => FALSE,
  1528. ],
  1529. 'rank' => [
  1530. 'size' => 'normal',
  1531. 'type' => 'int',
  1532. 'not null' => TRUE,
  1533. 'default' => 0,
  1534. ],
  1535. ],
  1536. 'unique keys' => [
  1537. 'assay_biomaterial_c1' => [
  1538. 0 => 'assay_id',
  1539. 1 => 'biomaterial_id',
  1540. 2 => 'channel_id',
  1541. 3 => 'rank',
  1542. ],
  1543. ],
  1544. 'indexes' => [
  1545. 'assay_biomaterial_idx1' => [
  1546. 0 => 'assay_id',
  1547. ],
  1548. 'assay_biomaterial_idx2' => [
  1549. 0 => 'biomaterial_id',
  1550. ],
  1551. 'assay_biomaterial_idx3' => [
  1552. 0 => 'channel_id',
  1553. ],
  1554. ],
  1555. 'primary key' => [
  1556. 0 => 'assay_biomaterial_id',
  1557. ],
  1558. 'foreign keys' => [
  1559. 'assay' => [
  1560. 'table' => 'assay',
  1561. 'columns' => [
  1562. 'assay_id' => 'assay_id',
  1563. ],
  1564. ],
  1565. 'biomaterial' => [
  1566. 'table' => 'biomaterial',
  1567. 'columns' => [
  1568. 'biomaterial_id' => 'biomaterial_id',
  1569. ],
  1570. ],
  1571. 'channel' => [
  1572. 'table' => 'channel',
  1573. 'columns' => [
  1574. 'channel_id' => 'channel_id',
  1575. ],
  1576. ],
  1577. ],
  1578. 'referring_tables' => [
  1579. ],
  1580. ];
  1581. return $description;
  1582. }
  1583. /**
  1584. * Implements hook_chado_schema_v1_3_assay_project()
  1585. *
  1586. * Purpose: To describe the structure of 'assay_project' to tripal
  1587. *
  1588. * @see chado_insert_record()
  1589. * @see chado_update_record()
  1590. * @see chado_select_record()
  1591. * @see chado_generate_var()
  1592. * @see chado_expan_var()
  1593. *
  1594. * @return
  1595. * An array describing the 'assay_project' table
  1596. *
  1597. * @ingroup tripal_chado_v1.3_schema_api
  1598. *
  1599. */
  1600. function tripal_chado_chado_schema_v1_3_assay_project() {
  1601. $description = [
  1602. 'description' => '',
  1603. 'table' => 'assay_project',
  1604. 'fields' => [
  1605. 'assay_project_id' => [
  1606. 'size' => 'big',
  1607. 'type' => 'serial',
  1608. 'not null' => TRUE,
  1609. ],
  1610. 'assay_id' => [
  1611. 'size' => 'big',
  1612. 'type' => 'int',
  1613. 'not null' => TRUE,
  1614. ],
  1615. 'project_id' => [
  1616. 'size' => 'big',
  1617. 'type' => 'int',
  1618. 'not null' => TRUE,
  1619. ],
  1620. ],
  1621. 'unique keys' => [
  1622. 'assay_project_c1' => [
  1623. 0 => 'assay_id',
  1624. 1 => 'project_id',
  1625. ],
  1626. ],
  1627. 'indexes' => [
  1628. 'assay_project_idx1' => [
  1629. 0 => 'assay_id',
  1630. ],
  1631. 'assay_project_idx2' => [
  1632. 0 => 'project_id',
  1633. ],
  1634. ],
  1635. 'primary key' => [
  1636. 0 => 'assay_project_id',
  1637. ],
  1638. 'foreign keys' => [
  1639. 'assay' => [
  1640. 'table' => 'assay',
  1641. 'columns' => [
  1642. 'assay_id' => 'assay_id',
  1643. ],
  1644. ],
  1645. 'project' => [
  1646. 'table' => 'project',
  1647. 'columns' => [
  1648. 'project_id' => 'project_id',
  1649. ],
  1650. ],
  1651. ],
  1652. 'referring_tables' => [
  1653. ],
  1654. ];
  1655. return $description;
  1656. }
  1657. /**
  1658. * Implements hook_chado_schema_v1_3_assayprop()
  1659. *
  1660. * Purpose: To describe the structure of 'assayprop' to tripal
  1661. *
  1662. * @see chado_insert_record()
  1663. * @see chado_update_record()
  1664. * @see chado_select_record()
  1665. * @see chado_generate_var()
  1666. * @see chado_expan_var()
  1667. *
  1668. * @return
  1669. * An array describing the 'assayprop' table
  1670. *
  1671. * @ingroup tripal_chado_v1.3_schema_api
  1672. *
  1673. */
  1674. function tripal_chado_chado_schema_v1_3_assayprop() {
  1675. $description = [
  1676. 'description' => '',
  1677. 'table' => 'assayprop',
  1678. 'fields' => [
  1679. 'assayprop_id' => [
  1680. 'size' => 'big',
  1681. 'type' => 'serial',
  1682. 'not null' => TRUE,
  1683. ],
  1684. 'assay_id' => [
  1685. 'size' => 'big',
  1686. 'type' => 'int',
  1687. 'not null' => TRUE,
  1688. ],
  1689. 'type_id' => [
  1690. 'size' => 'big',
  1691. 'type' => 'int',
  1692. 'not null' => TRUE,
  1693. ],
  1694. 'value' => [
  1695. 'size' => 'normal',
  1696. 'type' => 'text',
  1697. 'not null' => FALSE,
  1698. ],
  1699. 'rank' => [
  1700. 'size' => 'normal',
  1701. 'type' => 'int',
  1702. 'not null' => TRUE,
  1703. 'default' => 0,
  1704. ],
  1705. ],
  1706. 'unique keys' => [
  1707. 'assayprop_c1' => [
  1708. 0 => 'assay_id',
  1709. 1 => 'type_id',
  1710. 2 => 'rank',
  1711. ],
  1712. ],
  1713. 'indexes' => [
  1714. 'assayprop_idx1' => [
  1715. 0 => 'assay_id',
  1716. ],
  1717. 'assayprop_idx2' => [
  1718. 0 => 'type_id',
  1719. ],
  1720. ],
  1721. 'primary key' => [
  1722. 0 => 'assayprop_id',
  1723. ],
  1724. 'foreign keys' => [
  1725. 'assay' => [
  1726. 'table' => 'assay',
  1727. 'columns' => [
  1728. 'assay_id' => 'assay_id',
  1729. ],
  1730. ],
  1731. 'cvterm' => [
  1732. 'table' => 'cvterm',
  1733. 'columns' => [
  1734. 'type_id' => 'cvterm_id',
  1735. ],
  1736. ],
  1737. ],
  1738. 'referring_tables' => [
  1739. ],
  1740. ];
  1741. return $description;
  1742. }
  1743. /**
  1744. * Implements hook_chado_schema_v1_3_biomaterial()
  1745. *
  1746. * Purpose: To describe the structure of 'biomaterial' to tripal
  1747. *
  1748. * @see chado_insert_record()
  1749. * @see chado_update_record()
  1750. * @see chado_select_record()
  1751. * @see chado_generate_var()
  1752. * @see chado_expan_var()
  1753. *
  1754. * @return
  1755. * An array describing the 'biomaterial' table
  1756. *
  1757. * @ingroup tripal_chado_v1.3_schema_api
  1758. *
  1759. */
  1760. function tripal_chado_chado_schema_v1_3_biomaterial() {
  1761. $description = [
  1762. 'description' => '',
  1763. 'table' => 'biomaterial',
  1764. 'fields' => [
  1765. 'biomaterial_id' => [
  1766. 'size' => 'big',
  1767. 'type' => 'serial',
  1768. 'not null' => TRUE,
  1769. ],
  1770. 'taxon_id' => [
  1771. 'size' => 'big',
  1772. 'type' => 'int',
  1773. 'not null' => FALSE,
  1774. ],
  1775. 'biosourceprovider_id' => [
  1776. 'size' => 'big',
  1777. 'type' => 'int',
  1778. 'not null' => FALSE,
  1779. ],
  1780. 'dbxref_id' => [
  1781. 'size' => 'big',
  1782. 'type' => 'int',
  1783. 'not null' => FALSE,
  1784. ],
  1785. 'name' => [
  1786. 'size' => 'normal',
  1787. 'type' => 'text',
  1788. 'not null' => FALSE,
  1789. ],
  1790. 'description' => [
  1791. 'size' => 'normal',
  1792. 'type' => 'text',
  1793. 'not null' => FALSE,
  1794. ],
  1795. ],
  1796. 'unique keys' => [
  1797. 'biomaterial_c1' => [
  1798. 0 => 'name',
  1799. ],
  1800. ],
  1801. 'indexes' => [
  1802. 'biomaterial_idx1' => [
  1803. 0 => 'taxon_id',
  1804. ],
  1805. 'biomaterial_idx2' => [
  1806. 0 => 'biosourceprovider_id',
  1807. ],
  1808. 'biomaterial_idx3' => [
  1809. 0 => 'dbxref_id',
  1810. ],
  1811. ],
  1812. 'primary key' => [
  1813. 0 => 'biomaterial_id',
  1814. ],
  1815. 'foreign keys' => [
  1816. 'organism' => [
  1817. 'table' => 'organism',
  1818. 'columns' => [
  1819. 'taxon_id' => 'organism_id',
  1820. ],
  1821. ],
  1822. 'contact' => [
  1823. 'table' => 'contact',
  1824. 'columns' => [
  1825. 'biosourceprovider_id' => 'contact_id',
  1826. ],
  1827. ],
  1828. 'dbxref' => [
  1829. 'table' => 'dbxref',
  1830. 'columns' => [
  1831. 'dbxref_id' => 'dbxref_id',
  1832. ],
  1833. ],
  1834. ],
  1835. 'referring_tables' => [
  1836. 0 => 'assay_biomaterial',
  1837. 1 => 'biomaterial_dbxref',
  1838. 2 => 'biomaterialprop',
  1839. 3 => 'biomaterial_relationship',
  1840. 5 => 'biomaterial_treatment',
  1841. 6 => 'treatment',
  1842. ],
  1843. ];
  1844. return $description;
  1845. }
  1846. /**
  1847. * Implements hook_chado_schema_v1_3_biomaterial_dbxref()
  1848. *
  1849. * Purpose: To describe the structure of 'biomaterial_dbxref' to tripal
  1850. *
  1851. * @see chado_insert_record()
  1852. * @see chado_update_record()
  1853. * @see chado_select_record()
  1854. * @see chado_generate_var()
  1855. * @see chado_expan_var()
  1856. *
  1857. * @return
  1858. * An array describing the 'biomaterial_dbxref' table
  1859. *
  1860. * @ingroup tripal_chado_v1.3_schema_api
  1861. *
  1862. */
  1863. function tripal_chado_chado_schema_v1_3_biomaterial_dbxref() {
  1864. $description = [
  1865. 'description' => '',
  1866. 'table' => 'biomaterial_dbxref',
  1867. 'fields' => [
  1868. 'biomaterial_dbxref_id' => [
  1869. 'size' => 'big',
  1870. 'type' => 'serial',
  1871. 'not null' => TRUE,
  1872. ],
  1873. 'biomaterial_id' => [
  1874. 'size' => 'big',
  1875. 'type' => 'int',
  1876. 'not null' => TRUE,
  1877. ],
  1878. 'dbxref_id' => [
  1879. 'size' => 'big',
  1880. 'type' => 'int',
  1881. 'not null' => TRUE,
  1882. ],
  1883. ],
  1884. 'unique keys' => [
  1885. 'biomaterial_dbxref_c1' => [
  1886. 0 => 'biomaterial_id',
  1887. 1 => 'dbxref_id',
  1888. ],
  1889. ],
  1890. 'indexes' => [
  1891. 'biomaterial_dbxref_idx1' => [
  1892. 0 => 'biomaterial_id',
  1893. ],
  1894. 'biomaterial_dbxref_idx2' => [
  1895. 0 => 'dbxref_id',
  1896. ],
  1897. ],
  1898. 'primary key' => [
  1899. 0 => 'biomaterial_dbxref_id',
  1900. ],
  1901. 'foreign keys' => [
  1902. 'biomaterial' => [
  1903. 'table' => 'biomaterial',
  1904. 'columns' => [
  1905. 'biomaterial_id' => 'biomaterial_id',
  1906. ],
  1907. ],
  1908. 'dbxref' => [
  1909. 'table' => 'dbxref',
  1910. 'columns' => [
  1911. 'dbxref_id' => 'dbxref_id',
  1912. ],
  1913. ],
  1914. ],
  1915. 'referring_tables' => [
  1916. ],
  1917. ];
  1918. return $description;
  1919. }
  1920. /**
  1921. * Implements hook_chado_schema_v1_3_biomaterialprop()
  1922. *
  1923. * Purpose: To describe the structure of 'biomaterialprop' to tripal
  1924. *
  1925. * @see chado_insert_record()
  1926. * @see chado_update_record()
  1927. * @see chado_select_record()
  1928. * @see chado_generate_var()
  1929. * @see chado_expan_var()
  1930. *
  1931. * @return
  1932. * An array describing the 'biomaterialprop' table
  1933. *
  1934. * @ingroup tripal_chado_v1.3_schema_api
  1935. *
  1936. */
  1937. function tripal_chado_chado_schema_v1_3_biomaterialprop() {
  1938. $description = [
  1939. 'description' => '',
  1940. 'table' => 'biomaterialprop',
  1941. 'fields' => [
  1942. 'biomaterialprop_id' => [
  1943. 'size' => 'big',
  1944. 'type' => 'serial',
  1945. 'not null' => TRUE,
  1946. ],
  1947. 'biomaterial_id' => [
  1948. 'size' => 'big',
  1949. 'type' => 'int',
  1950. 'not null' => TRUE,
  1951. ],
  1952. 'type_id' => [
  1953. 'size' => 'big',
  1954. 'type' => 'int',
  1955. 'not null' => TRUE,
  1956. ],
  1957. 'value' => [
  1958. 'size' => 'normal',
  1959. 'type' => 'text',
  1960. 'not null' => FALSE,
  1961. ],
  1962. 'rank' => [
  1963. 'size' => 'normal',
  1964. 'type' => 'int',
  1965. 'not null' => TRUE,
  1966. 'default' => 0,
  1967. ],
  1968. ],
  1969. 'unique keys' => [
  1970. 'biomaterialprop_c1' => [
  1971. 0 => 'biomaterial_id',
  1972. 1 => 'type_id',
  1973. 2 => 'rank',
  1974. ],
  1975. ],
  1976. 'indexes' => [
  1977. 'biomaterialprop_idx1' => [
  1978. 0 => 'biomaterial_id',
  1979. ],
  1980. 'biomaterialprop_idx2' => [
  1981. 0 => 'type_id',
  1982. ],
  1983. ],
  1984. 'primary key' => [
  1985. 0 => 'biomaterialprop_id',
  1986. ],
  1987. 'foreign keys' => [
  1988. 'biomaterial' => [
  1989. 'table' => 'biomaterial',
  1990. 'columns' => [
  1991. 'biomaterial_id' => 'biomaterial_id',
  1992. ],
  1993. ],
  1994. 'cvterm' => [
  1995. 'table' => 'cvterm',
  1996. 'columns' => [
  1997. 'type_id' => 'cvterm_id',
  1998. ],
  1999. ],
  2000. ],
  2001. 'referring_tables' => [
  2002. ],
  2003. ];
  2004. return $description;
  2005. }
  2006. /**
  2007. * Implements hook_chado_schema_v1_3_biomaterial_relationship()
  2008. *
  2009. * Purpose: To describe the structure of 'biomaterial_relationship' to tripal
  2010. *
  2011. * @see chado_insert_record()
  2012. * @see chado_update_record()
  2013. * @see chado_select_record()
  2014. * @see chado_generate_var()
  2015. * @see chado_expan_var()
  2016. *
  2017. * @return
  2018. * An array describing the 'biomaterial_relationship' table
  2019. *
  2020. * @ingroup tripal_chado_v1.3_schema_api
  2021. *
  2022. */
  2023. function tripal_chado_chado_schema_v1_3_biomaterial_relationship() {
  2024. $description = [
  2025. 'description' => '',
  2026. 'table' => 'biomaterial_relationship',
  2027. 'fields' => [
  2028. 'biomaterial_relationship_id' => [
  2029. 'size' => 'big',
  2030. 'type' => 'serial',
  2031. 'not null' => TRUE,
  2032. ],
  2033. 'subject_id' => [
  2034. 'size' => 'big',
  2035. 'type' => 'int',
  2036. 'not null' => TRUE,
  2037. ],
  2038. 'type_id' => [
  2039. 'size' => 'big',
  2040. 'type' => 'int',
  2041. 'not null' => TRUE,
  2042. ],
  2043. 'object_id' => [
  2044. 'size' => 'big',
  2045. 'type' => 'int',
  2046. 'not null' => TRUE,
  2047. ],
  2048. ],
  2049. 'unique keys' => [
  2050. 'biomaterial_relationship_c1' => [
  2051. 0 => 'subject_id',
  2052. 1 => 'object_id',
  2053. 2 => 'type_id',
  2054. ],
  2055. ],
  2056. 'indexes' => [
  2057. 'biomaterial_relationship_idx1' => [
  2058. 0 => 'subject_id',
  2059. ],
  2060. 'biomaterial_relationship_idx2' => [
  2061. 0 => 'object_id',
  2062. ],
  2063. 'biomaterial_relationship_idx3' => [
  2064. 0 => 'type_id',
  2065. ],
  2066. ],
  2067. 'primary key' => [
  2068. 0 => 'biomaterial_relationship_id',
  2069. ],
  2070. 'foreign keys' => [
  2071. 'biomaterial' => [
  2072. 'table' => 'biomaterial',
  2073. 'columns' => [
  2074. 'subject_id' => 'biomaterial_id',
  2075. 'object_id' => 'biomaterial_id',
  2076. ],
  2077. ],
  2078. 'cvterm' => [
  2079. 'table' => 'cvterm',
  2080. 'columns' => [
  2081. 'type_id' => 'cvterm_id',
  2082. ],
  2083. ],
  2084. ],
  2085. 'referring_tables' => [
  2086. ],
  2087. ];
  2088. return $description;
  2089. }
  2090. /**
  2091. * Implements hook_chado_schema_v1_3_biomaterial_treatment()
  2092. *
  2093. * Purpose: To describe the structure of 'biomaterial_treatment' to tripal
  2094. *
  2095. * @see chado_insert_record()
  2096. * @see chado_update_record()
  2097. * @see chado_select_record()
  2098. * @see chado_generate_var()
  2099. * @see chado_expan_var()
  2100. *
  2101. * @return
  2102. * An array describing the 'biomaterial_treatment' table
  2103. *
  2104. * @ingroup tripal_chado_v1.3_schema_api
  2105. *
  2106. */
  2107. function tripal_chado_chado_schema_v1_3_biomaterial_treatment() {
  2108. $description = [
  2109. 'description' => '',
  2110. 'table' => 'biomaterial_treatment',
  2111. 'fields' => [
  2112. 'biomaterial_treatment_id' => [
  2113. 'size' => 'big',
  2114. 'type' => 'serial',
  2115. 'not null' => TRUE,
  2116. ],
  2117. 'biomaterial_id' => [
  2118. 'size' => 'big',
  2119. 'type' => 'int',
  2120. 'not null' => TRUE,
  2121. ],
  2122. 'treatment_id' => [
  2123. 'size' => 'big',
  2124. 'type' => 'int',
  2125. 'not null' => TRUE,
  2126. ],
  2127. 'unittype_id' => [
  2128. 'size' => 'big',
  2129. 'type' => 'int',
  2130. 'not null' => FALSE,
  2131. ],
  2132. 'value' => [
  2133. 'size' => 'normal',
  2134. 'type' => 'float',
  2135. 'not null' => FALSE,
  2136. ],
  2137. 'rank' => [
  2138. 'size' => 'normal',
  2139. 'type' => 'int',
  2140. 'not null' => TRUE,
  2141. 'default' => 0,
  2142. ],
  2143. ],
  2144. 'unique keys' => [
  2145. 'biomaterial_treatment_c1' => [
  2146. 0 => 'biomaterial_id',
  2147. 1 => 'treatment_id',
  2148. ],
  2149. ],
  2150. 'indexes' => [
  2151. 'biomaterial_treatment_idx1' => [
  2152. 0 => 'biomaterial_id',
  2153. ],
  2154. 'biomaterial_treatment_idx2' => [
  2155. 0 => 'treatment_id',
  2156. ],
  2157. 'biomaterial_treatment_idx3' => [
  2158. 0 => 'unittype_id',
  2159. ],
  2160. ],
  2161. 'primary key' => [
  2162. 0 => 'biomaterial_treatment_id',
  2163. ],
  2164. 'foreign keys' => [
  2165. 'biomaterial' => [
  2166. 'table' => 'biomaterial',
  2167. 'columns' => [
  2168. 'biomaterial_id' => 'biomaterial_id',
  2169. ],
  2170. ],
  2171. 'treatment' => [
  2172. 'table' => 'treatment',
  2173. 'columns' => [
  2174. 'treatment_id' => 'treatment_id',
  2175. ],
  2176. ],
  2177. 'cvterm' => [
  2178. 'table' => 'cvterm',
  2179. 'columns' => [
  2180. 'unittype_id' => 'cvterm_id',
  2181. ],
  2182. ],
  2183. ],
  2184. 'referring_tables' => [
  2185. ],
  2186. ];
  2187. return $description;
  2188. }
  2189. /**
  2190. * Implements hook_chado_schema_v1_3_cell_line()
  2191. *
  2192. * Purpose: To describe the structure of 'cell_line' to tripal
  2193. *
  2194. * @see chado_insert_record()
  2195. * @see chado_update_record()
  2196. * @see chado_select_record()
  2197. * @see chado_generate_var()
  2198. * @see chado_expan_var()
  2199. *
  2200. * @return
  2201. * An array describing the 'cell_line' table
  2202. *
  2203. * @ingroup tripal_chado_v1.3_schema_api
  2204. *
  2205. */
  2206. function tripal_chado_chado_schema_v1_3_cell_line() {
  2207. $description = [
  2208. 'description' => '',
  2209. 'table' => 'cell_line',
  2210. 'fields' => [
  2211. 'cell_line_id' => [
  2212. 'size' => 'big',
  2213. 'type' => 'serial',
  2214. 'not null' => TRUE,
  2215. ],
  2216. 'name' => [
  2217. 'size' => 'normal',
  2218. 'type' => 'varchar',
  2219. 'length' => '255',
  2220. 'not null' => FALSE,
  2221. ],
  2222. 'uniquename' => [
  2223. 'size' => 'normal',
  2224. 'type' => 'varchar',
  2225. 'length' => '255',
  2226. 'not null' => TRUE,
  2227. ],
  2228. 'organism_id' => [
  2229. 'size' => 'big',
  2230. 'type' => 'int',
  2231. 'not null' => TRUE,
  2232. ],
  2233. 'timeaccessioned' => [
  2234. 'size' => 'normal',
  2235. 'type' => 'datetime',
  2236. 'not null' => TRUE,
  2237. 'default' => 'now()',
  2238. ],
  2239. 'timelastmodified' => [
  2240. 'size' => 'normal',
  2241. 'type' => 'datetime',
  2242. 'not null' => TRUE,
  2243. 'default' => 'now()',
  2244. ],
  2245. ],
  2246. 'unique keys' => [
  2247. 'cell_line_c1' => [
  2248. 0 => 'uniquename',
  2249. 1 => 'organism_id',
  2250. ],
  2251. ],
  2252. 'primary key' => [
  2253. 0 => 'cell_line_id',
  2254. ],
  2255. 'foreign keys' => [
  2256. 'organism' => [
  2257. 'table' => 'organism',
  2258. 'columns' => [
  2259. 'organism_id' => 'organism_id',
  2260. ],
  2261. ],
  2262. ],
  2263. 'referring_tables' => [
  2264. 0 => 'cell_line_cvterm',
  2265. 1 => 'cell_line_dbxref',
  2266. 2 => 'cell_line_feature',
  2267. 3 => 'cell_line_library',
  2268. 4 => 'cell_lineprop',
  2269. 5 => 'cell_line_pub',
  2270. 6 => 'cell_line_relationship',
  2271. 8 => 'cell_line_synonym',
  2272. ],
  2273. ];
  2274. return $description;
  2275. }
  2276. /**
  2277. * Implements hook_chado_schema_v1_3_cell_line_cvterm()
  2278. *
  2279. * Purpose: To describe the structure of 'cell_line_cvterm' to tripal
  2280. *
  2281. * @see chado_insert_record()
  2282. * @see chado_update_record()
  2283. * @see chado_select_record()
  2284. * @see chado_generate_var()
  2285. * @see chado_expan_var()
  2286. *
  2287. * @return
  2288. * An array describing the 'cell_line_cvterm' table
  2289. *
  2290. * @ingroup tripal_chado_v1.3_schema_api
  2291. *
  2292. */
  2293. function tripal_chado_chado_schema_v1_3_cell_line_cvterm() {
  2294. $description = [
  2295. 'description' => '',
  2296. 'table' => 'cell_line_cvterm',
  2297. 'fields' => [
  2298. 'cell_line_cvterm_id' => [
  2299. 'size' => 'big',
  2300. 'type' => 'serial',
  2301. 'not null' => TRUE,
  2302. ],
  2303. 'cell_line_id' => [
  2304. 'size' => 'big',
  2305. 'type' => 'int',
  2306. 'not null' => TRUE,
  2307. ],
  2308. 'cvterm_id' => [
  2309. 'size' => 'big',
  2310. 'type' => 'int',
  2311. 'not null' => TRUE,
  2312. ],
  2313. 'pub_id' => [
  2314. 'size' => 'big',
  2315. 'type' => 'int',
  2316. 'not null' => TRUE,
  2317. ],
  2318. 'rank' => [
  2319. 'size' => 'normal',
  2320. 'type' => 'int',
  2321. 'not null' => TRUE,
  2322. 'default' => 0,
  2323. ],
  2324. ],
  2325. 'unique keys' => [
  2326. 'cell_line_cvterm_c1' => [
  2327. 0 => 'cell_line_id',
  2328. 1 => 'cvterm_id',
  2329. 2 => 'pub_id',
  2330. 3 => 'rank',
  2331. ],
  2332. ],
  2333. 'primary key' => [
  2334. 0 => 'cell_line_cvterm_id',
  2335. ],
  2336. 'foreign keys' => [
  2337. 'cell_line' => [
  2338. 'table' => 'cell_line',
  2339. 'columns' => [
  2340. 'cell_line_id' => 'cell_line_id',
  2341. ],
  2342. ],
  2343. 'cvterm' => [
  2344. 'table' => 'cvterm',
  2345. 'columns' => [
  2346. 'cvterm_id' => 'cvterm_id',
  2347. ],
  2348. ],
  2349. 'pub' => [
  2350. 'table' => 'pub',
  2351. 'columns' => [
  2352. 'pub_id' => 'pub_id',
  2353. ],
  2354. ],
  2355. ],
  2356. 'referring_tables' => [
  2357. 0 => 'cell_line_cvtermprop',
  2358. ],
  2359. ];
  2360. return $description;
  2361. }
  2362. /**
  2363. * Implements hook_chado_schema_v1_3_cell_line_cvtermprop()
  2364. *
  2365. * Purpose: To describe the structure of 'cell_line_cvtermprop' to tripal
  2366. *
  2367. * @see chado_insert_record()
  2368. * @see chado_update_record()
  2369. * @see chado_select_record()
  2370. * @see chado_generate_var()
  2371. * @see chado_expan_var()
  2372. *
  2373. * @return
  2374. * An array describing the 'cell_line_cvtermprop' table
  2375. *
  2376. * @ingroup tripal_chado_v1.3_schema_api
  2377. *
  2378. */
  2379. function tripal_chado_chado_schema_v1_3_cell_line_cvtermprop() {
  2380. $description = [
  2381. 'description' => '',
  2382. 'table' => 'cell_line_cvtermprop',
  2383. 'fields' => [
  2384. 'cell_line_cvtermprop_id' => [
  2385. 'size' => 'big',
  2386. 'type' => 'serial',
  2387. 'not null' => TRUE,
  2388. ],
  2389. 'cell_line_cvterm_id' => [
  2390. 'size' => 'big',
  2391. 'type' => 'int',
  2392. 'not null' => TRUE,
  2393. ],
  2394. 'type_id' => [
  2395. 'size' => 'big',
  2396. 'type' => 'int',
  2397. 'not null' => TRUE,
  2398. ],
  2399. 'value' => [
  2400. 'size' => 'normal',
  2401. 'type' => 'text',
  2402. 'not null' => FALSE,
  2403. ],
  2404. 'rank' => [
  2405. 'size' => 'normal',
  2406. 'type' => 'int',
  2407. 'not null' => TRUE,
  2408. 'default' => 0,
  2409. ],
  2410. ],
  2411. 'unique keys' => [
  2412. 'cell_line_cvtermprop_c1' => [
  2413. 0 => 'cell_line_cvterm_id',
  2414. 1 => 'type_id',
  2415. 2 => 'rank',
  2416. ],
  2417. ],
  2418. 'primary key' => [
  2419. 0 => 'cell_line_cvtermprop_id',
  2420. ],
  2421. 'foreign keys' => [
  2422. 'cell_line_cvterm' => [
  2423. 'table' => 'cell_line_cvterm',
  2424. 'columns' => [
  2425. 'cell_line_cvterm_id' => 'cell_line_cvterm_id',
  2426. ],
  2427. ],
  2428. 'cvterm' => [
  2429. 'table' => 'cvterm',
  2430. 'columns' => [
  2431. 'type_id' => 'cvterm_id',
  2432. ],
  2433. ],
  2434. ],
  2435. 'referring_tables' => [
  2436. ],
  2437. ];
  2438. return $description;
  2439. }
  2440. /**
  2441. * Implements hook_chado_schema_v1_3_cell_line_dbxref()
  2442. *
  2443. * Purpose: To describe the structure of 'cell_line_dbxref' to tripal
  2444. *
  2445. * @see chado_insert_record()
  2446. * @see chado_update_record()
  2447. * @see chado_select_record()
  2448. * @see chado_generate_var()
  2449. * @see chado_expan_var()
  2450. *
  2451. * @return
  2452. * An array describing the 'cell_line_dbxref' table
  2453. *
  2454. * @ingroup tripal_chado_v1.3_schema_api
  2455. *
  2456. */
  2457. function tripal_chado_chado_schema_v1_3_cell_line_dbxref() {
  2458. $description = [
  2459. 'description' => '',
  2460. 'table' => 'cell_line_dbxref',
  2461. 'fields' => [
  2462. 'cell_line_dbxref_id' => [
  2463. 'size' => 'big',
  2464. 'type' => 'serial',
  2465. 'not null' => TRUE,
  2466. ],
  2467. 'cell_line_id' => [
  2468. 'size' => 'big',
  2469. 'type' => 'int',
  2470. 'not null' => TRUE,
  2471. ],
  2472. 'dbxref_id' => [
  2473. 'size' => 'big',
  2474. 'type' => 'int',
  2475. 'not null' => TRUE,
  2476. ],
  2477. 'is_current' => [
  2478. 'size' => 'normal',
  2479. 'type' => 'boolean',
  2480. 'not null' => TRUE,
  2481. 'default' => 'true',
  2482. ],
  2483. ],
  2484. 'unique keys' => [
  2485. 'cell_line_dbxref_c1' => [
  2486. 0 => 'cell_line_id',
  2487. 1 => 'dbxref_id',
  2488. ],
  2489. ],
  2490. 'primary key' => [
  2491. 0 => 'cell_line_dbxref_id',
  2492. ],
  2493. 'foreign keys' => [
  2494. 'cell_line' => [
  2495. 'table' => 'cell_line',
  2496. 'columns' => [
  2497. 'cell_line_id' => 'cell_line_id',
  2498. ],
  2499. ],
  2500. 'dbxref' => [
  2501. 'table' => 'dbxref',
  2502. 'columns' => [
  2503. 'dbxref_id' => 'dbxref_id',
  2504. ],
  2505. ],
  2506. ],
  2507. 'referring_tables' => [
  2508. ],
  2509. ];
  2510. return $description;
  2511. }
  2512. /**
  2513. * Implements hook_chado_schema_v1_3_cell_line_feature()
  2514. *
  2515. * Purpose: To describe the structure of 'cell_line_feature' to tripal
  2516. *
  2517. * @see chado_insert_record()
  2518. * @see chado_update_record()
  2519. * @see chado_select_record()
  2520. * @see chado_generate_var()
  2521. * @see chado_expan_var()
  2522. *
  2523. * @return
  2524. * An array describing the 'cell_line_feature' table
  2525. *
  2526. * @ingroup tripal_chado_v1.3_schema_api
  2527. *
  2528. */
  2529. function tripal_chado_chado_schema_v1_3_cell_line_feature() {
  2530. $description = [
  2531. 'description' => '',
  2532. 'table' => 'cell_line_feature',
  2533. 'fields' => [
  2534. 'cell_line_feature_id' => [
  2535. 'size' => 'big',
  2536. 'type' => 'serial',
  2537. 'not null' => TRUE,
  2538. ],
  2539. 'cell_line_id' => [
  2540. 'size' => 'big',
  2541. 'type' => 'int',
  2542. 'not null' => TRUE,
  2543. ],
  2544. 'feature_id' => [
  2545. 'size' => 'big',
  2546. 'type' => 'int',
  2547. 'not null' => TRUE,
  2548. ],
  2549. 'pub_id' => [
  2550. 'size' => 'big',
  2551. 'type' => 'int',
  2552. 'not null' => TRUE,
  2553. ],
  2554. ],
  2555. 'unique keys' => [
  2556. 'cell_line_feature_c1' => [
  2557. 0 => 'cell_line_id',
  2558. 1 => 'feature_id',
  2559. 2 => 'pub_id',
  2560. ],
  2561. ],
  2562. 'primary key' => [
  2563. 0 => 'cell_line_feature_id',
  2564. ],
  2565. 'foreign keys' => [
  2566. 'cell_line' => [
  2567. 'table' => 'cell_line',
  2568. 'columns' => [
  2569. 'cell_line_id' => 'cell_line_id',
  2570. ],
  2571. ],
  2572. 'feature' => [
  2573. 'table' => 'feature',
  2574. 'columns' => [
  2575. 'feature_id' => 'feature_id',
  2576. ],
  2577. ],
  2578. 'pub' => [
  2579. 'table' => 'pub',
  2580. 'columns' => [
  2581. 'pub_id' => 'pub_id',
  2582. ],
  2583. ],
  2584. ],
  2585. 'referring_tables' => [
  2586. ],
  2587. ];
  2588. return $description;
  2589. }
  2590. /**
  2591. * Implements hook_chado_schema_v1_3_cell_line_library()
  2592. *
  2593. * Purpose: To describe the structure of 'cell_line_library' to tripal
  2594. *
  2595. * @see chado_insert_record()
  2596. * @see chado_update_record()
  2597. * @see chado_select_record()
  2598. * @see chado_generate_var()
  2599. * @see chado_expan_var()
  2600. *
  2601. * @return
  2602. * An array describing the 'cell_line_library' table
  2603. *
  2604. * @ingroup tripal_chado_v1.3_schema_api
  2605. *
  2606. */
  2607. function tripal_chado_chado_schema_v1_3_cell_line_library() {
  2608. $description = [
  2609. 'description' => '',
  2610. 'table' => 'cell_line_library',
  2611. 'fields' => [
  2612. 'cell_line_library_id' => [
  2613. 'size' => 'big',
  2614. 'type' => 'serial',
  2615. 'not null' => TRUE,
  2616. ],
  2617. 'cell_line_id' => [
  2618. 'size' => 'big',
  2619. 'type' => 'int',
  2620. 'not null' => TRUE,
  2621. ],
  2622. 'library_id' => [
  2623. 'size' => 'big',
  2624. 'type' => 'int',
  2625. 'not null' => TRUE,
  2626. ],
  2627. 'pub_id' => [
  2628. 'size' => 'big',
  2629. 'type' => 'int',
  2630. 'not null' => TRUE,
  2631. ],
  2632. ],
  2633. 'unique keys' => [
  2634. 'cell_line_library_c1' => [
  2635. 0 => 'cell_line_id',
  2636. 1 => 'library_id',
  2637. 2 => 'pub_id',
  2638. ],
  2639. ],
  2640. 'primary key' => [
  2641. 0 => 'cell_line_library_id',
  2642. ],
  2643. 'foreign keys' => [
  2644. 'cell_line' => [
  2645. 'table' => 'cell_line',
  2646. 'columns' => [
  2647. 'cell_line_id' => 'cell_line_id',
  2648. ],
  2649. ],
  2650. 'library' => [
  2651. 'table' => 'library',
  2652. 'columns' => [
  2653. 'library_id' => 'library_id',
  2654. ],
  2655. ],
  2656. 'pub' => [
  2657. 'table' => 'pub',
  2658. 'columns' => [
  2659. 'pub_id' => 'pub_id',
  2660. ],
  2661. ],
  2662. ],
  2663. 'referring_tables' => [
  2664. ],
  2665. ];
  2666. return $description;
  2667. }
  2668. /**
  2669. * Implements hook_chado_schema_v1_3_cell_lineprop()
  2670. *
  2671. * Purpose: To describe the structure of 'cell_lineprop' to tripal
  2672. *
  2673. * @see chado_insert_record()
  2674. * @see chado_update_record()
  2675. * @see chado_select_record()
  2676. * @see chado_generate_var()
  2677. * @see chado_expan_var()
  2678. *
  2679. * @return
  2680. * An array describing the 'cell_lineprop' table
  2681. *
  2682. * @ingroup tripal_chado_v1.3_schema_api
  2683. *
  2684. */
  2685. function tripal_chado_chado_schema_v1_3_cell_lineprop() {
  2686. $description = [
  2687. 'description' => '',
  2688. 'table' => 'cell_lineprop',
  2689. 'fields' => [
  2690. 'cell_lineprop_id' => [
  2691. 'size' => 'big',
  2692. 'type' => 'serial',
  2693. 'not null' => TRUE,
  2694. ],
  2695. 'cell_line_id' => [
  2696. 'size' => 'big',
  2697. 'type' => 'int',
  2698. 'not null' => TRUE,
  2699. ],
  2700. 'type_id' => [
  2701. 'size' => 'big',
  2702. 'type' => 'int',
  2703. 'not null' => TRUE,
  2704. ],
  2705. 'value' => [
  2706. 'size' => 'normal',
  2707. 'type' => 'text',
  2708. 'not null' => FALSE,
  2709. ],
  2710. 'rank' => [
  2711. 'size' => 'normal',
  2712. 'type' => 'int',
  2713. 'not null' => TRUE,
  2714. 'default' => 0,
  2715. ],
  2716. ],
  2717. 'unique keys' => [
  2718. 'cell_lineprop_c1' => [
  2719. 0 => 'cell_line_id',
  2720. 1 => 'type_id',
  2721. 2 => 'rank',
  2722. ],
  2723. ],
  2724. 'primary key' => [
  2725. 0 => 'cell_lineprop_id',
  2726. ],
  2727. 'foreign keys' => [
  2728. 'cell_line' => [
  2729. 'table' => 'cell_line',
  2730. 'columns' => [
  2731. 'cell_line_id' => 'cell_line_id',
  2732. ],
  2733. ],
  2734. 'cvterm' => [
  2735. 'table' => 'cvterm',
  2736. 'columns' => [
  2737. 'type_id' => 'cvterm_id',
  2738. ],
  2739. ],
  2740. ],
  2741. 'referring_tables' => [
  2742. 0 => 'cell_lineprop_pub',
  2743. ],
  2744. ];
  2745. return $description;
  2746. }
  2747. /**
  2748. * Implements hook_chado_schema_v1_3_cell_lineprop_pub()
  2749. *
  2750. * Purpose: To describe the structure of 'cell_lineprop_pub' to tripal
  2751. *
  2752. * @see chado_insert_record()
  2753. * @see chado_update_record()
  2754. * @see chado_select_record()
  2755. * @see chado_generate_var()
  2756. * @see chado_expan_var()
  2757. *
  2758. * @return
  2759. * An array describing the 'cell_lineprop_pub' table
  2760. *
  2761. * @ingroup tripal_chado_v1.3_schema_api
  2762. *
  2763. */
  2764. function tripal_chado_chado_schema_v1_3_cell_lineprop_pub() {
  2765. $description = [
  2766. 'description' => '',
  2767. 'table' => 'cell_lineprop_pub',
  2768. 'fields' => [
  2769. 'cell_lineprop_pub_id' => [
  2770. 'size' => 'big',
  2771. 'type' => 'serial',
  2772. 'not null' => TRUE,
  2773. ],
  2774. 'cell_lineprop_id' => [
  2775. 'size' => 'big',
  2776. 'type' => 'int',
  2777. 'not null' => TRUE,
  2778. ],
  2779. 'pub_id' => [
  2780. 'size' => 'big',
  2781. 'type' => 'int',
  2782. 'not null' => TRUE,
  2783. ],
  2784. ],
  2785. 'unique keys' => [
  2786. 'cell_lineprop_pub_c1' => [
  2787. 0 => 'cell_lineprop_id',
  2788. 1 => 'pub_id',
  2789. ],
  2790. ],
  2791. 'primary key' => [
  2792. 0 => 'cell_lineprop_pub_id',
  2793. ],
  2794. 'foreign keys' => [
  2795. 'cell_lineprop' => [
  2796. 'table' => 'cell_lineprop',
  2797. 'columns' => [
  2798. 'cell_lineprop_id' => 'cell_lineprop_id',
  2799. ],
  2800. ],
  2801. 'pub' => [
  2802. 'table' => 'pub',
  2803. 'columns' => [
  2804. 'pub_id' => 'pub_id',
  2805. ],
  2806. ],
  2807. ],
  2808. 'referring_tables' => [
  2809. ],
  2810. ];
  2811. return $description;
  2812. }
  2813. /**
  2814. * Implements hook_chado_schema_v1_3_cell_line_pub()
  2815. *
  2816. * Purpose: To describe the structure of 'cell_line_pub' to tripal
  2817. *
  2818. * @see chado_insert_record()
  2819. * @see chado_update_record()
  2820. * @see chado_select_record()
  2821. * @see chado_generate_var()
  2822. * @see chado_expan_var()
  2823. *
  2824. * @return
  2825. * An array describing the 'cell_line_pub' table
  2826. *
  2827. * @ingroup tripal_chado_v1.3_schema_api
  2828. *
  2829. */
  2830. function tripal_chado_chado_schema_v1_3_cell_line_pub() {
  2831. $description = [
  2832. 'description' => '',
  2833. 'table' => 'cell_line_pub',
  2834. 'fields' => [
  2835. 'cell_line_pub_id' => [
  2836. 'size' => 'big',
  2837. 'type' => 'serial',
  2838. 'not null' => TRUE,
  2839. ],
  2840. 'cell_line_id' => [
  2841. 'size' => 'big',
  2842. 'type' => 'int',
  2843. 'not null' => TRUE,
  2844. ],
  2845. 'pub_id' => [
  2846. 'size' => 'big',
  2847. 'type' => 'int',
  2848. 'not null' => TRUE,
  2849. ],
  2850. ],
  2851. 'unique keys' => [
  2852. 'cell_line_pub_c1' => [
  2853. 0 => 'cell_line_id',
  2854. 1 => 'pub_id',
  2855. ],
  2856. ],
  2857. 'primary key' => [
  2858. 0 => 'cell_line_pub_id',
  2859. ],
  2860. 'foreign keys' => [
  2861. 'cell_line' => [
  2862. 'table' => 'cell_line',
  2863. 'columns' => [
  2864. 'cell_line_id' => 'cell_line_id',
  2865. ],
  2866. ],
  2867. 'pub' => [
  2868. 'table' => 'pub',
  2869. 'columns' => [
  2870. 'pub_id' => 'pub_id',
  2871. ],
  2872. ],
  2873. ],
  2874. 'referring_tables' => [
  2875. ],
  2876. ];
  2877. return $description;
  2878. }
  2879. /**
  2880. * Implements hook_chado_schema_v1_3_cell_line_relationship()
  2881. *
  2882. * Purpose: To describe the structure of 'cell_line_relationship' to tripal
  2883. *
  2884. * @see chado_insert_record()
  2885. * @see chado_update_record()
  2886. * @see chado_select_record()
  2887. * @see chado_generate_var()
  2888. * @see chado_expan_var()
  2889. *
  2890. * @return
  2891. * An array describing the 'cell_line_relationship' table
  2892. *
  2893. * @ingroup tripal_chado_v1.3_schema_api
  2894. *
  2895. */
  2896. function tripal_chado_chado_schema_v1_3_cell_line_relationship() {
  2897. $description = [
  2898. 'description' => '',
  2899. 'table' => 'cell_line_relationship',
  2900. 'fields' => [
  2901. 'cell_line_relationship_id' => [
  2902. 'size' => 'big',
  2903. 'type' => 'serial',
  2904. 'not null' => TRUE,
  2905. ],
  2906. 'subject_id' => [
  2907. 'size' => 'big',
  2908. 'type' => 'int',
  2909. 'not null' => TRUE,
  2910. ],
  2911. 'object_id' => [
  2912. 'size' => 'big',
  2913. 'type' => 'int',
  2914. 'not null' => TRUE,
  2915. ],
  2916. 'type_id' => [
  2917. 'size' => 'big',
  2918. 'type' => 'int',
  2919. 'not null' => TRUE,
  2920. ],
  2921. ],
  2922. 'unique keys' => [
  2923. 'cell_line_relationship_c1' => [
  2924. 0 => 'subject_id',
  2925. 1 => 'object_id',
  2926. 2 => 'type_id',
  2927. ],
  2928. ],
  2929. 'primary key' => [
  2930. 0 => 'cell_line_relationship_id',
  2931. ],
  2932. 'foreign keys' => [
  2933. 'cell_line' => [
  2934. 'table' => 'cell_line',
  2935. 'columns' => [
  2936. 'subject_id' => 'cell_line_id',
  2937. 'object_id' => 'cell_line_id',
  2938. ],
  2939. ],
  2940. 'cvterm' => [
  2941. 'table' => 'cvterm',
  2942. 'columns' => [
  2943. 'type_id' => 'cvterm_id',
  2944. ],
  2945. ],
  2946. ],
  2947. 'referring_tables' => [
  2948. ],
  2949. ];
  2950. return $description;
  2951. }
  2952. /**
  2953. * Implements hook_chado_schema_v1_3_cell_line_synonym()
  2954. *
  2955. * Purpose: To describe the structure of 'cell_line_synonym' to tripal
  2956. *
  2957. * @see chado_insert_record()
  2958. * @see chado_update_record()
  2959. * @see chado_select_record()
  2960. * @see chado_generate_var()
  2961. * @see chado_expan_var()
  2962. *
  2963. * @return
  2964. * An array describing the 'cell_line_synonym' table
  2965. *
  2966. * @ingroup tripal_chado_v1.3_schema_api
  2967. *
  2968. */
  2969. function tripal_chado_chado_schema_v1_3_cell_line_synonym() {
  2970. $description = [
  2971. 'description' => '',
  2972. 'table' => 'cell_line_synonym',
  2973. 'fields' => [
  2974. 'cell_line_synonym_id' => [
  2975. 'size' => 'big',
  2976. 'type' => 'serial',
  2977. 'not null' => TRUE,
  2978. ],
  2979. 'cell_line_id' => [
  2980. 'size' => 'big',
  2981. 'type' => 'int',
  2982. 'not null' => TRUE,
  2983. ],
  2984. 'synonym_id' => [
  2985. 'size' => 'big',
  2986. 'type' => 'int',
  2987. 'not null' => TRUE,
  2988. ],
  2989. 'pub_id' => [
  2990. 'size' => 'big',
  2991. 'type' => 'int',
  2992. 'not null' => TRUE,
  2993. ],
  2994. 'is_current' => [
  2995. 'size' => 'normal',
  2996. 'type' => 'boolean',
  2997. 'not null' => TRUE,
  2998. 'default' => FALSE,
  2999. ],
  3000. 'is_internal' => [
  3001. 'size' => 'normal',
  3002. 'type' => 'boolean',
  3003. 'not null' => TRUE,
  3004. 'default' => FALSE,
  3005. ],
  3006. ],
  3007. 'unique keys' => [
  3008. 'cell_line_synonym_c1' => [
  3009. 0 => 'synonym_id',
  3010. 1 => 'cell_line_id',
  3011. 2 => 'pub_id',
  3012. ],
  3013. ],
  3014. 'primary key' => [
  3015. 0 => 'cell_line_synonym_id',
  3016. ],
  3017. 'foreign keys' => [
  3018. 'cell_line' => [
  3019. 'table' => 'cell_line',
  3020. 'columns' => [
  3021. 'cell_line_id' => 'cell_line_id',
  3022. ],
  3023. ],
  3024. 'synonym' => [
  3025. 'table' => 'synonym',
  3026. 'columns' => [
  3027. 'synonym_id' => 'synonym_id',
  3028. ],
  3029. ],
  3030. 'pub' => [
  3031. 'table' => 'pub',
  3032. 'columns' => [
  3033. 'pub_id' => 'pub_id',
  3034. ],
  3035. ],
  3036. ],
  3037. 'referring_tables' => [
  3038. ],
  3039. ];
  3040. return $description;
  3041. }
  3042. /**
  3043. * Implements hook_chado_schema_v1_3_chadoprop()
  3044. *
  3045. * Purpose: To describe the structure of 'chadoprop' to tripal
  3046. *
  3047. * @see chado_insert_record()
  3048. * @see chado_update_record()
  3049. * @see chado_select_record()
  3050. * @see chado_generate_var()
  3051. * @see chado_expan_var()
  3052. *
  3053. * @return
  3054. * An array describing the 'chadoprop' table
  3055. *
  3056. * @ingroup tripal_chado_v1.3_schema_api
  3057. *
  3058. */
  3059. function tripal_chado_chado_schema_v1_3_chadoprop() {
  3060. $description = [
  3061. 'description' => '',
  3062. 'table' => 'chadoprop',
  3063. 'fields' => [
  3064. 'chadoprop_id' => [
  3065. 'size' => 'big',
  3066. 'type' => 'serial',
  3067. 'not null' => TRUE,
  3068. ],
  3069. 'type_id' => [
  3070. 'size' => 'big',
  3071. 'type' => 'int',
  3072. 'not null' => TRUE,
  3073. ],
  3074. 'value' => [
  3075. 'size' => 'normal',
  3076. 'type' => 'text',
  3077. 'not null' => FALSE,
  3078. ],
  3079. 'rank' => [
  3080. 'size' => 'normal',
  3081. 'type' => 'int',
  3082. 'not null' => TRUE,
  3083. 'default' => 0,
  3084. ],
  3085. ],
  3086. 'unique keys' => [
  3087. 'chadoprop_c1' => [
  3088. 0 => 'type_id',
  3089. 1 => 'rank',
  3090. ],
  3091. ],
  3092. 'primary key' => [
  3093. 0 => 'chadoprop_id',
  3094. ],
  3095. 'foreign keys' => [
  3096. 'cvterm' => [
  3097. 'table' => 'cvterm',
  3098. 'columns' => [
  3099. 'type_id' => 'cvterm_id',
  3100. ],
  3101. ],
  3102. ],
  3103. 'referring_tables' => [
  3104. ],
  3105. ];
  3106. return $description;
  3107. }
  3108. /**
  3109. * Implements hook_chado_schema_v1_3_channel()
  3110. *
  3111. * Purpose: To describe the structure of 'channel' to tripal
  3112. *
  3113. * @see chado_insert_record()
  3114. * @see chado_update_record()
  3115. * @see chado_select_record()
  3116. * @see chado_generate_var()
  3117. * @see chado_expan_var()
  3118. *
  3119. * @return
  3120. * An array describing the 'channel' table
  3121. *
  3122. * @ingroup tripal_chado_v1.3_schema_api
  3123. *
  3124. */
  3125. function tripal_chado_chado_schema_v1_3_channel() {
  3126. $description = [
  3127. 'description' => '',
  3128. 'table' => 'channel',
  3129. 'fields' => [
  3130. 'channel_id' => [
  3131. 'size' => 'big',
  3132. 'type' => 'serial',
  3133. 'not null' => TRUE,
  3134. ],
  3135. 'name' => [
  3136. 'size' => 'normal',
  3137. 'type' => 'text',
  3138. 'not null' => TRUE,
  3139. ],
  3140. 'definition' => [
  3141. 'size' => 'normal',
  3142. 'type' => 'text',
  3143. 'not null' => TRUE,
  3144. ],
  3145. ],
  3146. 'unique keys' => [
  3147. 'channel_c1' => [
  3148. 0 => 'name',
  3149. ],
  3150. ],
  3151. 'primary key' => [
  3152. 0 => 'channel_id',
  3153. ],
  3154. 'foreign keys' => [
  3155. ],
  3156. 'referring_tables' => [
  3157. 0 => 'acquisition',
  3158. 1 => 'assay_biomaterial',
  3159. ],
  3160. ];
  3161. return $description;
  3162. }
  3163. /**
  3164. * Implements hook_chado_schema_v1_3_contact()
  3165. *
  3166. * Purpose: To describe the structure of 'contact' to tripal
  3167. *
  3168. * @see chado_insert_record()
  3169. * @see chado_update_record()
  3170. * @see chado_select_record()
  3171. * @see chado_generate_var()
  3172. * @see chado_expan_var()
  3173. *
  3174. * @return
  3175. * An array describing the 'contact' table
  3176. *
  3177. * @ingroup tripal_chado_v1.3_schema_api
  3178. *
  3179. */
  3180. function tripal_chado_chado_schema_v1_3_contact() {
  3181. $description = [
  3182. 'description' => '',
  3183. 'table' => 'contact',
  3184. 'fields' => [
  3185. 'contact_id' => [
  3186. 'size' => 'big',
  3187. 'type' => 'serial',
  3188. 'not null' => TRUE,
  3189. ],
  3190. 'type_id' => [
  3191. 'size' => 'big',
  3192. 'type' => 'int',
  3193. 'not null' => FALSE,
  3194. ],
  3195. 'name' => [
  3196. 'size' => 'normal',
  3197. 'type' => 'varchar',
  3198. 'length' => '255',
  3199. 'not null' => TRUE,
  3200. ],
  3201. 'description' => [
  3202. 'size' => 'normal',
  3203. 'type' => 'varchar',
  3204. 'length' => '255',
  3205. 'not null' => FALSE,
  3206. ],
  3207. ],
  3208. 'unique keys' => [
  3209. 'contact_c1' => [
  3210. 0 => 'name',
  3211. ],
  3212. ],
  3213. 'primary key' => [
  3214. 0 => 'contact_id',
  3215. ],
  3216. 'indexes' => [
  3217. 'library_contact_idx2' => [
  3218. 0 => 'contact_id',
  3219. ],
  3220. 'pubauthor_contact_idx2' => [
  3221. 0 => 'contact_id',
  3222. ],
  3223. ],
  3224. 'foreign keys' => [
  3225. 'cvterm' => [
  3226. 'table' => 'cvterm',
  3227. 'columns' => [
  3228. 'type_id' => 'cvterm_id',
  3229. ],
  3230. ],
  3231. ],
  3232. 'referring_tables' => [
  3233. 0 => 'arraydesign',
  3234. 1 => 'assay',
  3235. 2 => 'biomaterial',
  3236. 3 => 'contactprop',
  3237. 4 => 'contact_relationship',
  3238. 6 => 'feature_contact',
  3239. 7 => 'featuremap_contact',
  3240. 8 => 'library_contact',
  3241. 9 => 'nd_experiment_contact',
  3242. 10 => 'project_contact',
  3243. 11 => 'pubauthor_contact',
  3244. 12 => 'quantification',
  3245. 13 => 'stockcollection',
  3246. 14 => 'study',
  3247. ],
  3248. ];
  3249. return $description;
  3250. }
  3251. /**
  3252. * Implements hook_chado_schema_v1_3_contactprop()
  3253. *
  3254. * Purpose: To describe the structure of 'contactprop' to tripal
  3255. *
  3256. * @see chado_insert_record()
  3257. * @see chado_update_record()
  3258. * @see chado_select_record()
  3259. * @see chado_generate_var()
  3260. * @see chado_expan_var()
  3261. *
  3262. * @return
  3263. * An array describing the 'contactprop' table
  3264. *
  3265. * @ingroup tripal_chado_v1.3_schema_api
  3266. *
  3267. */
  3268. function tripal_chado_chado_schema_v1_3_contactprop() {
  3269. $description = [
  3270. 'description' => '',
  3271. 'table' => 'contactprop',
  3272. 'fields' => [
  3273. 'contactprop_id' => [
  3274. 'size' => 'big',
  3275. 'type' => 'serial',
  3276. 'not null' => TRUE,
  3277. ],
  3278. 'contact_id' => [
  3279. 'size' => 'big',
  3280. 'type' => 'int',
  3281. 'not null' => TRUE,
  3282. ],
  3283. 'type_id' => [
  3284. 'size' => 'big',
  3285. 'type' => 'int',
  3286. 'not null' => TRUE,
  3287. ],
  3288. 'value' => [
  3289. 'size' => 'normal',
  3290. 'type' => 'text',
  3291. 'not null' => FALSE,
  3292. ],
  3293. 'rank' => [
  3294. 'size' => 'normal',
  3295. 'type' => 'int',
  3296. 'not null' => TRUE,
  3297. 'default' => 0,
  3298. ],
  3299. ],
  3300. 'unique keys' => [
  3301. 'contactprop_c1' => [
  3302. 0 => 'contact_id',
  3303. 1 => 'type_id',
  3304. 2 => 'rank',
  3305. ],
  3306. ],
  3307. 'indexes' => [
  3308. 'contactprop_idx1' => [
  3309. 0 => 'contact_id',
  3310. ],
  3311. 'contactprop_idx2' => [
  3312. 0 => 'type_id',
  3313. ],
  3314. ],
  3315. 'primary key' => [
  3316. 0 => 'contactprop_id',
  3317. ],
  3318. 'foreign keys' => [
  3319. 'contact' => [
  3320. 'table' => 'contact',
  3321. 'columns' => [
  3322. 'contact_id' => 'contact_id',
  3323. ],
  3324. ],
  3325. 'cvterm' => [
  3326. 'table' => 'cvterm',
  3327. 'columns' => [
  3328. 'type_id' => 'cvterm_id',
  3329. ],
  3330. ],
  3331. ],
  3332. 'referring_tables' => [
  3333. ],
  3334. ];
  3335. return $description;
  3336. }
  3337. /**
  3338. * Implements hook_chado_schema_v1_3_contact_relationship()
  3339. *
  3340. * Purpose: To describe the structure of 'contact_relationship' to tripal
  3341. *
  3342. * @see chado_insert_record()
  3343. * @see chado_update_record()
  3344. * @see chado_select_record()
  3345. * @see chado_generate_var()
  3346. * @see chado_expan_var()
  3347. *
  3348. * @return
  3349. * An array describing the 'contact_relationship' table
  3350. *
  3351. * @ingroup tripal_chado_v1.3_schema_api
  3352. *
  3353. */
  3354. function tripal_chado_chado_schema_v1_3_contact_relationship() {
  3355. $description = [
  3356. 'description' => '',
  3357. 'table' => 'contact_relationship',
  3358. 'fields' => [
  3359. 'contact_relationship_id' => [
  3360. 'size' => 'big',
  3361. 'type' => 'serial',
  3362. 'not null' => TRUE,
  3363. ],
  3364. 'type_id' => [
  3365. 'size' => 'big',
  3366. 'type' => 'int',
  3367. 'not null' => TRUE,
  3368. ],
  3369. 'subject_id' => [
  3370. 'size' => 'big',
  3371. 'type' => 'int',
  3372. 'not null' => TRUE,
  3373. ],
  3374. 'object_id' => [
  3375. 'size' => 'big',
  3376. 'type' => 'int',
  3377. 'not null' => TRUE,
  3378. ],
  3379. ],
  3380. 'unique keys' => [
  3381. 'contact_relationship_c1' => [
  3382. 0 => 'subject_id',
  3383. 1 => 'object_id',
  3384. 2 => 'type_id',
  3385. ],
  3386. ],
  3387. 'indexes' => [
  3388. 'contact_relationship_idx1' => [
  3389. 0 => 'type_id',
  3390. ],
  3391. 'contact_relationship_idx2' => [
  3392. 0 => 'subject_id',
  3393. ],
  3394. 'contact_relationship_idx3' => [
  3395. 0 => 'object_id',
  3396. ],
  3397. ],
  3398. 'primary key' => [
  3399. 0 => 'contact_relationship_id',
  3400. ],
  3401. 'foreign keys' => [
  3402. 'cvterm' => [
  3403. 'table' => 'cvterm',
  3404. 'columns' => [
  3405. 'type_id' => 'cvterm_id',
  3406. ],
  3407. ],
  3408. 'contact' => [
  3409. 'table' => 'contact',
  3410. 'columns' => [
  3411. 'subject_id' => 'contact_id',
  3412. 'object_id' => 'contact_id',
  3413. ],
  3414. ],
  3415. ],
  3416. 'referring_tables' => [
  3417. ],
  3418. ];
  3419. return $description;
  3420. }
  3421. /**
  3422. * Implements hook_chado_schema_v1_3_control()
  3423. *
  3424. * Purpose: To describe the structure of 'control' to tripal
  3425. *
  3426. * @see chado_insert_record()
  3427. * @see chado_update_record()
  3428. * @see chado_select_record()
  3429. * @see chado_generate_var()
  3430. * @see chado_expan_var()
  3431. *
  3432. * @return
  3433. * An array describing the 'control' table
  3434. *
  3435. * @ingroup tripal_chado_v1.3_schema_api
  3436. *
  3437. */
  3438. function tripal_chado_chado_schema_v1_3_control() {
  3439. $description = [
  3440. 'description' => '',
  3441. 'table' => 'control',
  3442. 'fields' => [
  3443. 'control_id' => [
  3444. 'size' => 'big',
  3445. 'type' => 'serial',
  3446. 'not null' => TRUE,
  3447. ],
  3448. 'type_id' => [
  3449. 'size' => 'big',
  3450. 'type' => 'int',
  3451. 'not null' => TRUE,
  3452. ],
  3453. 'assay_id' => [
  3454. 'size' => 'big',
  3455. 'type' => 'int',
  3456. 'not null' => TRUE,
  3457. ],
  3458. 'tableinfo_id' => [
  3459. 'size' => 'big',
  3460. 'type' => 'int',
  3461. 'not null' => TRUE,
  3462. ],
  3463. 'row_id' => [
  3464. 'size' => 'normal',
  3465. 'type' => 'int',
  3466. 'not null' => TRUE,
  3467. ],
  3468. 'name' => [
  3469. 'size' => 'normal',
  3470. 'type' => 'text',
  3471. 'not null' => FALSE,
  3472. ],
  3473. 'value' => [
  3474. 'size' => 'normal',
  3475. 'type' => 'text',
  3476. 'not null' => FALSE,
  3477. ],
  3478. 'rank' => [
  3479. 'size' => 'normal',
  3480. 'type' => 'int',
  3481. 'not null' => TRUE,
  3482. 'default' => 0,
  3483. ],
  3484. ],
  3485. 'indexes' => [
  3486. 'control_idx1' => [
  3487. 0 => 'type_id',
  3488. ],
  3489. 'control_idx2' => [
  3490. 0 => 'assay_id',
  3491. ],
  3492. 'control_idx3' => [
  3493. 0 => 'tableinfo_id',
  3494. ],
  3495. 'control_idx4' => [
  3496. 0 => 'row_id',
  3497. ],
  3498. ],
  3499. 'primary key' => [
  3500. 0 => 'control_id',
  3501. ],
  3502. 'foreign keys' => [
  3503. 'cvterm' => [
  3504. 'table' => 'cvterm',
  3505. 'columns' => [
  3506. 'type_id' => 'cvterm_id',
  3507. ],
  3508. ],
  3509. 'assay' => [
  3510. 'table' => 'assay',
  3511. 'columns' => [
  3512. 'assay_id' => 'assay_id',
  3513. ],
  3514. ],
  3515. 'tableinfo' => [
  3516. 'table' => 'tableinfo',
  3517. 'columns' => [
  3518. 'tableinfo_id' => 'tableinfo_id',
  3519. ],
  3520. ],
  3521. ],
  3522. 'referring_tables' => [
  3523. ],
  3524. ];
  3525. return $description;
  3526. }
  3527. /**
  3528. * Implements hook_chado_schema_v1_3_cv()
  3529. *
  3530. * Purpose: To describe the structure of 'cv' to tripal
  3531. *
  3532. * @see chado_insert_record()
  3533. * @see chado_update_record()
  3534. * @see chado_select_record()
  3535. * @see chado_generate_var()
  3536. * @see chado_expan_var()
  3537. *
  3538. * @return
  3539. * An array describing the 'cv' table
  3540. *
  3541. * @ingroup tripal_chado_v1.3_schema_api
  3542. *
  3543. */
  3544. function tripal_chado_chado_schema_v1_3_cv() {
  3545. $description = [
  3546. 'description' => '',
  3547. 'table' => 'cv',
  3548. 'fields' => [
  3549. 'cv_id' => [
  3550. 'size' => 'big',
  3551. 'type' => 'serial',
  3552. 'not null' => TRUE,
  3553. ],
  3554. 'name' => [
  3555. 'size' => 'normal',
  3556. 'type' => 'varchar',
  3557. 'length' => '255',
  3558. 'not null' => TRUE,
  3559. ],
  3560. 'definition' => [
  3561. 'size' => 'normal',
  3562. 'type' => 'text',
  3563. 'not null' => FALSE,
  3564. ],
  3565. ],
  3566. 'unique keys' => [
  3567. 'cv_c1' => [
  3568. 0 => 'name',
  3569. ],
  3570. ],
  3571. 'primary key' => [
  3572. 0 => 'cv_id',
  3573. ],
  3574. 'foreign keys' => [
  3575. ],
  3576. 'referring_tables' => [
  3577. 0 => 'cvprop',
  3578. 1 => 'cvterm',
  3579. 2 => 'cvtermpath',
  3580. ],
  3581. ];
  3582. return $description;
  3583. }
  3584. /**
  3585. * Implements hook_chado_schema_v1_3_cvprop()
  3586. *
  3587. * Purpose: To describe the structure of 'cvprop' to tripal
  3588. *
  3589. * @see chado_insert_record()
  3590. * @see chado_update_record()
  3591. * @see chado_select_record()
  3592. * @see chado_generate_var()
  3593. * @see chado_expan_var()
  3594. *
  3595. * @return
  3596. * An array describing the 'cvprop' table
  3597. *
  3598. * @ingroup tripal_chado_v1.3_schema_api
  3599. *
  3600. */
  3601. function tripal_chado_chado_schema_v1_3_cvprop() {
  3602. $description = [
  3603. 'description' => '',
  3604. 'table' => 'cvprop',
  3605. 'fields' => [
  3606. 'cvprop_id' => [
  3607. 'size' => 'big',
  3608. 'type' => 'serial',
  3609. 'not null' => TRUE,
  3610. ],
  3611. 'cv_id' => [
  3612. 'size' => 'big',
  3613. 'type' => 'int',
  3614. 'not null' => TRUE,
  3615. ],
  3616. 'type_id' => [
  3617. 'size' => 'big',
  3618. 'type' => 'int',
  3619. 'not null' => TRUE,
  3620. ],
  3621. 'value' => [
  3622. 'size' => 'normal',
  3623. 'type' => 'text',
  3624. 'not null' => FALSE,
  3625. ],
  3626. 'rank' => [
  3627. 'size' => 'normal',
  3628. 'type' => 'int',
  3629. 'not null' => TRUE,
  3630. 'default' => 0,
  3631. ],
  3632. ],
  3633. 'unique keys' => [
  3634. 'cvprop_c1' => [
  3635. 0 => 'cv_id',
  3636. 1 => 'type_id',
  3637. 2 => 'rank',
  3638. ],
  3639. ],
  3640. 'primary key' => [
  3641. 0 => 'cvprop_id',
  3642. ],
  3643. 'foreign keys' => [
  3644. 'cv' => [
  3645. 'table' => 'cv',
  3646. 'columns' => [
  3647. 'cv_id' => 'cv_id',
  3648. ],
  3649. ],
  3650. 'cvterm' => [
  3651. 'table' => 'cvterm',
  3652. 'columns' => [
  3653. 'type_id' => 'cvterm_id',
  3654. ],
  3655. ],
  3656. ],
  3657. 'referring_tables' => [
  3658. ],
  3659. ];
  3660. return $description;
  3661. }
  3662. /**
  3663. * Implements hook_chado_schema_v1_3_cv_root_mview()
  3664. *
  3665. * Purpose: To describe the structure of 'cv_root_mview' to tripal
  3666. *
  3667. * @see chado_insert_record()
  3668. * @see chado_update_record()
  3669. * @see chado_select_record()
  3670. * @see chado_generate_var()
  3671. * @see chado_expan_var()
  3672. *
  3673. * @return
  3674. * An array describing the 'cv_root_mview' table
  3675. *
  3676. * @ingroup tripal_chado_v1.3_schema_api
  3677. *
  3678. */
  3679. function tripal_chado_chado_schema_v1_3_cv_root_mview() {
  3680. $description = [
  3681. 'description' => '',
  3682. 'table' => 'cv_root_mview',
  3683. 'fields' => [
  3684. 'name' => [
  3685. 'size' => 'normal',
  3686. 'type' => 'varchar',
  3687. 'length' => '255',
  3688. 'not null' => TRUE,
  3689. ],
  3690. 'cvterm_id' => [
  3691. 'size' => 'normal',
  3692. 'type' => 'int',
  3693. 'not null' => TRUE,
  3694. ],
  3695. 'cv_id' => [
  3696. 'size' => 'normal',
  3697. 'type' => 'int',
  3698. 'not null' => TRUE,
  3699. ],
  3700. 'cv_name' => [
  3701. 'size' => 'normal',
  3702. 'type' => 'varchar',
  3703. 'length' => '255',
  3704. 'not null' => TRUE,
  3705. ],
  3706. ],
  3707. 'indexes' => [
  3708. 'cv_root_mview_indx1' => [
  3709. 0 => 'cvterm_id',
  3710. ],
  3711. 'cv_root_mview_indx2' => [
  3712. 0 => 'cv_id',
  3713. ],
  3714. ],
  3715. 'foreign keys' => [
  3716. ],
  3717. 'referring_tables' => [
  3718. ],
  3719. ];
  3720. return $description;
  3721. }
  3722. /**
  3723. * Implements hook_chado_schema_v1_3_cvterm()
  3724. *
  3725. * Purpose: To describe the structure of 'cvterm' to tripal
  3726. *
  3727. * @see chado_insert_record()
  3728. * @see chado_update_record()
  3729. * @see chado_select_record()
  3730. * @see chado_generate_var()
  3731. * @see chado_expan_var()
  3732. *
  3733. * @return
  3734. * An array describing the 'cvterm' table
  3735. *
  3736. * @ingroup tripal_chado_v1.3_schema_api
  3737. *
  3738. */
  3739. function tripal_chado_chado_schema_v1_3_cvterm() {
  3740. $description = [
  3741. 'description' => '',
  3742. 'table' => 'cvterm',
  3743. 'fields' => [
  3744. 'cvterm_id' => [
  3745. 'size' => 'big',
  3746. 'type' => 'serial',
  3747. 'not null' => TRUE,
  3748. ],
  3749. 'cv_id' => [
  3750. 'size' => 'big',
  3751. 'type' => 'int',
  3752. 'not null' => TRUE,
  3753. ],
  3754. 'name' => [
  3755. 'size' => 'normal',
  3756. 'type' => 'varchar',
  3757. 'length' => '1024',
  3758. 'not null' => TRUE,
  3759. ],
  3760. 'definition' => [
  3761. 'size' => 'normal',
  3762. 'type' => 'text',
  3763. 'not null' => FALSE,
  3764. ],
  3765. 'dbxref_id' => [
  3766. 'size' => 'big',
  3767. 'type' => 'int',
  3768. 'not null' => TRUE,
  3769. ],
  3770. 'is_obsolete' => [
  3771. 'size' => 'normal',
  3772. 'type' => 'int',
  3773. 'not null' => TRUE,
  3774. 'default' => 0,
  3775. ],
  3776. 'is_relationshiptype' => [
  3777. 'size' => 'normal',
  3778. 'type' => 'int',
  3779. 'not null' => TRUE,
  3780. 'default' => 0,
  3781. ],
  3782. ],
  3783. 'unique keys' => [
  3784. 'cvterm_c1' => [
  3785. 0 => 'name',
  3786. 1 => 'cv_id',
  3787. 2 => 'is_obsolete',
  3788. ],
  3789. 'cvterm_c2' => [
  3790. 0 => 'dbxref_id',
  3791. ],
  3792. ],
  3793. 'indexes' => [
  3794. 'cvterm_idx1' => [
  3795. 0 => 'cv_id',
  3796. ],
  3797. 'cvterm_idx2' => [
  3798. 0 => 'name',
  3799. ],
  3800. 'cvterm_idx3' => [
  3801. 0 => 'dbxref_id',
  3802. ],
  3803. ],
  3804. 'primary key' => [
  3805. 0 => 'cvterm_id',
  3806. ],
  3807. 'foreign keys' => [
  3808. 'cv' => [
  3809. 'table' => 'cv',
  3810. 'columns' => [
  3811. 'cv_id' => 'cv_id',
  3812. ],
  3813. ],
  3814. 'dbxref' => [
  3815. 'table' => 'dbxref',
  3816. 'columns' => [
  3817. 'dbxref_id' => 'dbxref_id',
  3818. ],
  3819. ],
  3820. ],
  3821. 'referring_tables' => [
  3822. 0 => 'acquisitionprop',
  3823. 1 => 'acquisition_relationship',
  3824. 2 => 'analysis_cvterm',
  3825. 3 => 'analysisfeatureprop',
  3826. 4 => 'analysisprop',
  3827. 5 => 'analysis_relationship',
  3828. 6 => 'arraydesign',
  3829. 8 => 'arraydesignprop',
  3830. 9 => 'assayprop',
  3831. 10 => 'biomaterialprop',
  3832. 11 => 'biomaterial_relationship',
  3833. 12 => 'biomaterial_treatment',
  3834. 13 => 'cell_line_cvterm',
  3835. 14 => 'cell_line_cvtermprop',
  3836. 15 => 'cell_lineprop',
  3837. 16 => 'cell_line_relationship',
  3838. 17 => 'chadoprop',
  3839. 18 => 'contact',
  3840. 19 => 'contactprop',
  3841. 20 => 'contact_relationship',
  3842. 21 => 'control',
  3843. 22 => 'cvprop',
  3844. 23 => 'cvterm_dbxref',
  3845. 24 => 'cvtermpath',
  3846. 27 => 'cvtermprop',
  3847. 29 => 'cvterm_relationship',
  3848. 32 => 'cvtermsynonym',
  3849. 34 => 'dbprop',
  3850. 35 => 'dbxrefprop',
  3851. 36 => 'element',
  3852. 37 => 'element_relationship',
  3853. 38 => 'elementresult_relationship',
  3854. 39 => 'environment_cvterm',
  3855. 40 => 'expression_cvterm',
  3856. 42 => 'expression_cvtermprop',
  3857. 43 => 'expressionprop',
  3858. 44 => 'feature',
  3859. 45 => 'feature_cvterm',
  3860. 46 => 'feature_cvtermprop',
  3861. 47 => 'feature_expressionprop',
  3862. 48 => 'feature_genotype',
  3863. 49 => 'featuremap',
  3864. 50 => 'featuremapprop',
  3865. 51 => 'featureposprop',
  3866. 52 => 'featureprop',
  3867. 53 => 'feature_pubprop',
  3868. 54 => 'feature_relationship',
  3869. 55 => 'feature_relationshipprop',
  3870. 56 => 'genotype',
  3871. 57 => 'genotypeprop',
  3872. 58 => 'library',
  3873. 59 => 'library_cvterm',
  3874. 60 => 'library_expressionprop',
  3875. 61 => 'library_featureprop',
  3876. 62 => 'libraryprop',
  3877. 63 => 'library_relationship',
  3878. 64 => 'nd_experiment',
  3879. 65 => 'nd_experiment_analysis',
  3880. 66 => 'nd_experimentprop',
  3881. 67 => 'nd_experiment_stock',
  3882. 68 => 'nd_experiment_stockprop',
  3883. 69 => 'nd_geolocationprop',
  3884. 70 => 'nd_protocol',
  3885. 71 => 'nd_protocolprop',
  3886. 72 => 'nd_protocol_reagent',
  3887. 73 => 'nd_reagent',
  3888. 74 => 'nd_reagentprop',
  3889. 75 => 'nd_reagent_relationship',
  3890. 76 => 'organism',
  3891. 77 => 'organism_cvterm',
  3892. 78 => 'organism_cvtermprop',
  3893. 79 => 'organismprop',
  3894. 80 => 'organism_relationship',
  3895. 81 => 'phendesc',
  3896. 82 => 'phenotype',
  3897. 86 => 'phenotype_comparison_cvterm',
  3898. 87 => 'phenotype_cvterm',
  3899. 88 => 'phenotypeprop',
  3900. 89 => 'phenstatement',
  3901. 90 => 'phylonode',
  3902. 91 => 'phylonodeprop',
  3903. 92 => 'phylonode_relationship',
  3904. 93 => 'phylotree',
  3905. 94 => 'phylotreeprop',
  3906. 95 => 'projectprop',
  3907. 96 => 'project_relationship',
  3908. 97 => 'protocol',
  3909. 98 => 'protocolparam',
  3910. 100 => 'pub',
  3911. 101 => 'pubprop',
  3912. 102 => 'pub_relationship',
  3913. 103 => 'quantificationprop',
  3914. 104 => 'quantification_relationship',
  3915. 105 => 'stock',
  3916. 106 => 'stockcollection',
  3917. 107 => 'stockcollectionprop',
  3918. 108 => 'stock_cvterm',
  3919. 109 => 'stock_cvtermprop',
  3920. 110 => 'stock_dbxrefprop',
  3921. 111 => 'stock_feature',
  3922. 112 => 'stock_featuremap',
  3923. 113 => 'stockprop',
  3924. 114 => 'stock_relationship',
  3925. 115 => 'stock_relationship_cvterm',
  3926. 116 => 'studydesignprop',
  3927. 117 => 'studyfactor',
  3928. 118 => 'studyprop',
  3929. 119 => 'studyprop_feature',
  3930. 120 => 'synonym',
  3931. 121 => 'treatment',
  3932. ],
  3933. ];
  3934. return $description;
  3935. }
  3936. /**
  3937. * Implements hook_chado_schema_v1_3_cvterm_dbxref()
  3938. *
  3939. * Purpose: To describe the structure of 'cvterm_dbxref' to tripal
  3940. *
  3941. * @see chado_insert_record()
  3942. * @see chado_update_record()
  3943. * @see chado_select_record()
  3944. * @see chado_generate_var()
  3945. * @see chado_expan_var()
  3946. *
  3947. * @return
  3948. * An array describing the 'cvterm_dbxref' table
  3949. *
  3950. * @ingroup tripal_chado_v1.3_schema_api
  3951. *
  3952. */
  3953. function tripal_chado_chado_schema_v1_3_cvterm_dbxref() {
  3954. $description = [
  3955. 'description' => '',
  3956. 'table' => 'cvterm_dbxref',
  3957. 'fields' => [
  3958. 'cvterm_dbxref_id' => [
  3959. 'size' => 'big',
  3960. 'type' => 'serial',
  3961. 'not null' => TRUE,
  3962. ],
  3963. 'cvterm_id' => [
  3964. 'size' => 'big',
  3965. 'type' => 'int',
  3966. 'not null' => TRUE,
  3967. ],
  3968. 'dbxref_id' => [
  3969. 'size' => 'big',
  3970. 'type' => 'int',
  3971. 'not null' => TRUE,
  3972. ],
  3973. 'is_for_definition' => [
  3974. 'size' => 'normal',
  3975. 'type' => 'int',
  3976. 'not null' => TRUE,
  3977. 'default' => 0,
  3978. ],
  3979. ],
  3980. 'unique keys' => [
  3981. 'cvterm_dbxref_c1' => [
  3982. 0 => 'cvterm_id',
  3983. 1 => 'dbxref_id',
  3984. ],
  3985. ],
  3986. 'indexes' => [
  3987. 'cvterm_dbxref_idx1' => [
  3988. 0 => 'cvterm_id',
  3989. ],
  3990. 'cvterm_dbxref_idx2' => [
  3991. 0 => 'dbxref_id',
  3992. ],
  3993. ],
  3994. 'primary key' => [
  3995. 0 => 'cvterm_dbxref_id',
  3996. ],
  3997. 'foreign keys' => [
  3998. 'cvterm' => [
  3999. 'table' => 'cvterm',
  4000. 'columns' => [
  4001. 'cvterm_id' => 'cvterm_id',
  4002. ],
  4003. ],
  4004. 'dbxref' => [
  4005. 'table' => 'dbxref',
  4006. 'columns' => [
  4007. 'dbxref_id' => 'dbxref_id',
  4008. ],
  4009. ],
  4010. ],
  4011. 'referring_tables' => [
  4012. ],
  4013. ];
  4014. return $description;
  4015. }
  4016. /**
  4017. * Implements hook_chado_schema_v1_3_cvtermpath()
  4018. *
  4019. * Purpose: To describe the structure of 'cvtermpath' to tripal
  4020. *
  4021. * @see chado_insert_record()
  4022. * @see chado_update_record()
  4023. * @see chado_select_record()
  4024. * @see chado_generate_var()
  4025. * @see chado_expan_var()
  4026. *
  4027. * @return
  4028. * An array describing the 'cvtermpath' table
  4029. *
  4030. * @ingroup tripal_chado_v1.3_schema_api
  4031. *
  4032. */
  4033. function tripal_chado_chado_schema_v1_3_cvtermpath() {
  4034. $description = [
  4035. 'description' => '',
  4036. 'table' => 'cvtermpath',
  4037. 'fields' => [
  4038. 'cvtermpath_id' => [
  4039. 'size' => 'big',
  4040. 'type' => 'serial',
  4041. 'not null' => TRUE,
  4042. ],
  4043. 'type_id' => [
  4044. 'size' => 'big',
  4045. 'type' => 'int',
  4046. 'not null' => FALSE,
  4047. ],
  4048. 'subject_id' => [
  4049. 'size' => 'big',
  4050. 'type' => 'int',
  4051. 'not null' => TRUE,
  4052. ],
  4053. 'object_id' => [
  4054. 'size' => 'big',
  4055. 'type' => 'int',
  4056. 'not null' => TRUE,
  4057. ],
  4058. 'cv_id' => [
  4059. 'size' => 'big',
  4060. 'type' => 'int',
  4061. 'not null' => TRUE,
  4062. ],
  4063. 'pathdistance' => [
  4064. 'size' => 'normal',
  4065. 'type' => 'int',
  4066. 'not null' => FALSE,
  4067. ],
  4068. ],
  4069. 'unique keys' => [
  4070. 'cvtermpath_c1' => [
  4071. 0 => 'subject_id',
  4072. 1 => 'object_id',
  4073. 2 => 'type_id',
  4074. 3 => 'pathdistance',
  4075. ],
  4076. ],
  4077. 'indexes' => [
  4078. 'cvtermpath_idx1' => [
  4079. 0 => 'type_id',
  4080. ],
  4081. 'cvtermpath_idx2' => [
  4082. 0 => 'subject_id',
  4083. ],
  4084. 'cvtermpath_idx3' => [
  4085. 0 => 'object_id',
  4086. ],
  4087. 'cvtermpath_idx4' => [
  4088. 0 => 'cv_id',
  4089. ],
  4090. ],
  4091. 'primary key' => [
  4092. 0 => 'cvtermpath_id',
  4093. ],
  4094. 'foreign keys' => [
  4095. 'cvterm' => [
  4096. 'table' => 'cvterm',
  4097. 'columns' => [
  4098. 'type_id' => 'cvterm_id',
  4099. 'subject_id' => 'cvterm_id',
  4100. 'object_id' => 'cvterm_id',
  4101. ],
  4102. ],
  4103. 'cv' => [
  4104. 'table' => 'cv',
  4105. 'columns' => [
  4106. 'cv_id' => 'cv_id',
  4107. ],
  4108. ],
  4109. ],
  4110. 'referring_tables' => [
  4111. ],
  4112. ];
  4113. return $description;
  4114. }
  4115. /**
  4116. * Implements hook_chado_schema_v1_3_cvtermprop()
  4117. *
  4118. * Purpose: To describe the structure of 'cvtermprop' to tripal
  4119. *
  4120. * @see chado_insert_record()
  4121. * @see chado_update_record()
  4122. * @see chado_select_record()
  4123. * @see chado_generate_var()
  4124. * @see chado_expan_var()
  4125. *
  4126. * @return
  4127. * An array describing the 'cvtermprop' table
  4128. *
  4129. * @ingroup tripal_chado_v1.3_schema_api
  4130. *
  4131. */
  4132. function tripal_chado_chado_schema_v1_3_cvtermprop() {
  4133. $description = [
  4134. 'description' => '',
  4135. 'table' => 'cvtermprop',
  4136. 'fields' => [
  4137. 'cvtermprop_id' => [
  4138. 'size' => 'big',
  4139. 'type' => 'serial',
  4140. 'not null' => TRUE,
  4141. ],
  4142. 'cvterm_id' => [
  4143. 'size' => 'big',
  4144. 'type' => 'int',
  4145. 'not null' => TRUE,
  4146. ],
  4147. 'type_id' => [
  4148. 'size' => 'big',
  4149. 'type' => 'int',
  4150. 'not null' => TRUE,
  4151. ],
  4152. 'value' => [
  4153. 'size' => 'normal',
  4154. 'type' => 'text',
  4155. 'not null' => TRUE,
  4156. 'default' => '',
  4157. ],
  4158. 'rank' => [
  4159. 'size' => 'normal',
  4160. 'type' => 'int',
  4161. 'not null' => TRUE,
  4162. 'default' => 0,
  4163. ],
  4164. ],
  4165. 'unique keys' => [
  4166. 'cvtermprop_cvterm_id_type_id_value_rank_key' => [
  4167. 0 => 'cvterm_id',
  4168. 1 => 'type_id',
  4169. 2 => 'value',
  4170. 3 => 'rank',
  4171. ],
  4172. ],
  4173. 'indexes' => [
  4174. 'cvtermprop_idx1' => [
  4175. 0 => 'cvterm_id',
  4176. ],
  4177. 'cvtermprop_idx2' => [
  4178. 0 => 'type_id',
  4179. ],
  4180. ],
  4181. 'primary key' => [
  4182. 0 => 'cvtermprop_id',
  4183. ],
  4184. 'foreign keys' => [
  4185. 'cvterm' => [
  4186. 'table' => 'cvterm',
  4187. 'columns' => [
  4188. 'cvterm_id' => 'cvterm_id',
  4189. 'type_id' => 'cvterm_id',
  4190. ],
  4191. ],
  4192. ],
  4193. 'referring_tables' => [
  4194. ],
  4195. ];
  4196. return $description;
  4197. }
  4198. /**
  4199. * Implements hook_chado_schema_v1_3_cvterm_relationship()
  4200. *
  4201. * Purpose: To describe the structure of 'cvterm_relationship' to tripal
  4202. *
  4203. * @see chado_insert_record()
  4204. * @see chado_update_record()
  4205. * @see chado_select_record()
  4206. * @see chado_generate_var()
  4207. * @see chado_expan_var()
  4208. *
  4209. * @return
  4210. * An array describing the 'cvterm_relationship' table
  4211. *
  4212. * @ingroup tripal_chado_v1.3_schema_api
  4213. *
  4214. */
  4215. function tripal_chado_chado_schema_v1_3_cvterm_relationship() {
  4216. $description = [
  4217. 'description' => '',
  4218. 'table' => 'cvterm_relationship',
  4219. 'fields' => [
  4220. 'cvterm_relationship_id' => [
  4221. 'size' => 'big',
  4222. 'type' => 'serial',
  4223. 'not null' => TRUE,
  4224. ],
  4225. 'type_id' => [
  4226. 'size' => 'big',
  4227. 'type' => 'int',
  4228. 'not null' => TRUE,
  4229. ],
  4230. 'subject_id' => [
  4231. 'size' => 'big',
  4232. 'type' => 'int',
  4233. 'not null' => TRUE,
  4234. ],
  4235. 'object_id' => [
  4236. 'size' => 'big',
  4237. 'type' => 'int',
  4238. 'not null' => TRUE,
  4239. ],
  4240. ],
  4241. 'unique keys' => [
  4242. 'cvterm_relationship_c1' => [
  4243. 0 => 'subject_id',
  4244. 1 => 'object_id',
  4245. 2 => 'type_id',
  4246. ],
  4247. ],
  4248. 'indexes' => [
  4249. 'cvterm_relationship_idx1' => [
  4250. 0 => 'type_id',
  4251. ],
  4252. 'cvterm_relationship_idx2' => [
  4253. 0 => 'subject_id',
  4254. ],
  4255. 'cvterm_relationship_idx3' => [
  4256. 0 => 'object_id',
  4257. ],
  4258. ],
  4259. 'primary key' => [
  4260. 0 => 'cvterm_relationship_id',
  4261. ],
  4262. 'foreign keys' => [
  4263. 'cvterm' => [
  4264. 'table' => 'cvterm',
  4265. 'columns' => [
  4266. 'type_id' => 'cvterm_id',
  4267. 'subject_id' => 'cvterm_id',
  4268. 'object_id' => 'cvterm_id',
  4269. ],
  4270. ],
  4271. ],
  4272. 'referring_tables' => [
  4273. ],
  4274. ];
  4275. return $description;
  4276. }
  4277. /**
  4278. * Implements hook_chado_schema_v1_3_cvtermsynonym()
  4279. *
  4280. * Purpose: To describe the structure of 'cvtermsynonym' to tripal
  4281. *
  4282. * @see chado_insert_record()
  4283. * @see chado_update_record()
  4284. * @see chado_select_record()
  4285. * @see chado_generate_var()
  4286. * @see chado_expan_var()
  4287. *
  4288. * @return
  4289. * An array describing the 'cvtermsynonym' table
  4290. *
  4291. * @ingroup tripal_chado_v1.3_schema_api
  4292. *
  4293. */
  4294. function tripal_chado_chado_schema_v1_3_cvtermsynonym() {
  4295. $description = [
  4296. 'description' => '',
  4297. 'table' => 'cvtermsynonym',
  4298. 'fields' => [
  4299. 'cvtermsynonym_id' => [
  4300. 'size' => 'big',
  4301. 'type' => 'serial',
  4302. 'not null' => TRUE,
  4303. ],
  4304. 'cvterm_id' => [
  4305. 'size' => 'big',
  4306. 'type' => 'int',
  4307. 'not null' => TRUE,
  4308. ],
  4309. 'synonym' => [
  4310. 'size' => 'normal',
  4311. 'type' => 'varchar',
  4312. 'length' => '1024',
  4313. 'not null' => TRUE,
  4314. ],
  4315. 'type_id' => [
  4316. 'size' => 'big',
  4317. 'type' => 'int',
  4318. 'not null' => FALSE,
  4319. ],
  4320. ],
  4321. 'unique keys' => [
  4322. 'cvtermsynonym_c1' => [
  4323. 0 => 'cvterm_id',
  4324. 1 => 'synonym',
  4325. ],
  4326. ],
  4327. 'indexes' => [
  4328. 'cvtermsynonym_idx1' => [
  4329. 0 => 'cvterm_id',
  4330. ],
  4331. ],
  4332. 'primary key' => [
  4333. 0 => 'cvtermsynonym_id',
  4334. ],
  4335. 'foreign keys' => [
  4336. 'cvterm' => [
  4337. 'table' => 'cvterm',
  4338. 'columns' => [
  4339. 'cvterm_id' => 'cvterm_id',
  4340. 'type_id' => 'cvterm_id',
  4341. ],
  4342. ],
  4343. ],
  4344. 'referring_tables' => [
  4345. ],
  4346. ];
  4347. return $description;
  4348. }
  4349. /**
  4350. * Implements hook_chado_schema_v1_3_db()
  4351. *
  4352. * Purpose: To describe the structure of 'db' to tripal
  4353. *
  4354. * @see chado_insert_record()
  4355. * @see chado_update_record()
  4356. * @see chado_select_record()
  4357. * @see chado_generate_var()
  4358. * @see chado_expan_var()
  4359. *
  4360. * @return
  4361. * An array describing the 'db' table
  4362. *
  4363. * @ingroup tripal_chado_v1.3_schema_api
  4364. *
  4365. */
  4366. function tripal_chado_chado_schema_v1_3_db() {
  4367. $description = [
  4368. 'description' => '',
  4369. 'table' => 'db',
  4370. 'fields' => [
  4371. 'db_id' => [
  4372. 'size' => 'big',
  4373. 'type' => 'serial',
  4374. 'not null' => TRUE,
  4375. ],
  4376. 'name' => [
  4377. 'size' => 'normal',
  4378. 'type' => 'varchar',
  4379. 'length' => '255',
  4380. 'not null' => TRUE,
  4381. ],
  4382. 'description' => [
  4383. 'size' => 'normal',
  4384. 'type' => 'varchar',
  4385. 'length' => '255',
  4386. 'not null' => FALSE,
  4387. ],
  4388. 'urlprefix' => [
  4389. 'size' => 'normal',
  4390. 'type' => 'varchar',
  4391. 'length' => '255',
  4392. 'not null' => FALSE,
  4393. ],
  4394. 'url' => [
  4395. 'size' => 'normal',
  4396. 'type' => 'varchar',
  4397. 'length' => '255',
  4398. 'not null' => FALSE,
  4399. ],
  4400. ],
  4401. 'unique keys' => [
  4402. 'db_c1' => [
  4403. 0 => 'name',
  4404. ],
  4405. ],
  4406. 'primary key' => [
  4407. 0 => 'db_id',
  4408. ],
  4409. 'foreign keys' => [
  4410. ],
  4411. 'referring_tables' => [
  4412. 0 => 'dbprop',
  4413. 1 => 'dbxref',
  4414. 2 => 'stockcollection_db',
  4415. ],
  4416. ];
  4417. return $description;
  4418. }
  4419. /**
  4420. * Implements hook_chado_schema_v1_3_dbprop()
  4421. *
  4422. * Purpose: To describe the structure of 'dbprop' to tripal
  4423. *
  4424. * @see chado_insert_record()
  4425. * @see chado_update_record()
  4426. * @see chado_select_record()
  4427. * @see chado_generate_var()
  4428. * @see chado_expan_var()
  4429. *
  4430. * @return
  4431. * An array describing the 'dbprop' table
  4432. *
  4433. * @ingroup tripal_chado_v1.3_schema_api
  4434. *
  4435. */
  4436. function tripal_chado_chado_schema_v1_3_dbprop() {
  4437. $description = [
  4438. 'description' => '',
  4439. 'table' => 'dbprop',
  4440. 'fields' => [
  4441. 'dbprop_id' => [
  4442. 'size' => 'big',
  4443. 'type' => 'serial',
  4444. 'not null' => TRUE,
  4445. ],
  4446. 'db_id' => [
  4447. 'size' => 'big',
  4448. 'type' => 'int',
  4449. 'not null' => TRUE,
  4450. ],
  4451. 'type_id' => [
  4452. 'size' => 'big',
  4453. 'type' => 'int',
  4454. 'not null' => TRUE,
  4455. ],
  4456. 'value' => [
  4457. 'size' => 'normal',
  4458. 'type' => 'text',
  4459. 'not null' => FALSE,
  4460. ],
  4461. 'rank' => [
  4462. 'size' => 'normal',
  4463. 'type' => 'int',
  4464. 'not null' => TRUE,
  4465. 'default' => 0,
  4466. ],
  4467. ],
  4468. 'unique keys' => [
  4469. 'dbprop_c1' => [
  4470. 0 => 'db_id',
  4471. 1 => 'type_id',
  4472. 2 => 'rank',
  4473. ],
  4474. ],
  4475. 'indexes' => [
  4476. 'dbprop_idx1' => [
  4477. 0 => 'db_id',
  4478. ],
  4479. 'dbprop_idx2' => [
  4480. 0 => 'type_id',
  4481. ],
  4482. ],
  4483. 'primary key' => [
  4484. 0 => 'dbprop_id',
  4485. ],
  4486. 'foreign keys' => [
  4487. 'cvterm' => [
  4488. 'table' => 'cvterm',
  4489. 'columns' => [
  4490. 'type_id' => 'cvterm_id',
  4491. ],
  4492. ],
  4493. 'db' => [
  4494. 'table' => 'db',
  4495. 'columns' => [
  4496. 'db_id' => 'db_id',
  4497. ],
  4498. ],
  4499. ],
  4500. 'referring_tables' => [
  4501. ],
  4502. ];
  4503. return $description;
  4504. }
  4505. /**
  4506. * Implements hook_chado_schema_v1_3_dbxref()
  4507. *
  4508. * Purpose: To describe the structure of 'dbxref' to tripal
  4509. *
  4510. * @see chado_insert_record()
  4511. * @see chado_update_record()
  4512. * @see chado_select_record()
  4513. * @see chado_generate_var()
  4514. * @see chado_expan_var()
  4515. *
  4516. * @return
  4517. * An array describing the 'dbxref' table
  4518. *
  4519. * @ingroup tripal_chado_v1.3_schema_api
  4520. *
  4521. */
  4522. function tripal_chado_chado_schema_v1_3_dbxref() {
  4523. $description = [
  4524. 'description' => '',
  4525. 'table' => 'dbxref',
  4526. 'fields' => [
  4527. 'dbxref_id' => [
  4528. 'size' => 'big',
  4529. 'type' => 'serial',
  4530. 'not null' => TRUE,
  4531. ],
  4532. 'db_id' => [
  4533. 'size' => 'big',
  4534. 'type' => 'int',
  4535. 'not null' => TRUE,
  4536. ],
  4537. 'accession' => [
  4538. 'size' => 'normal',
  4539. 'type' => 'varchar',
  4540. 'length' => '1024',
  4541. 'not null' => TRUE,
  4542. ],
  4543. 'version' => [
  4544. 'size' => 'normal',
  4545. 'type' => 'varchar',
  4546. 'length' => '255',
  4547. 'not null' => TRUE,
  4548. 'default' => '',
  4549. ],
  4550. 'description' => [
  4551. 'size' => 'normal',
  4552. 'type' => 'text',
  4553. 'not null' => FALSE,
  4554. ],
  4555. ],
  4556. 'unique keys' => [
  4557. 'dbxref_c1' => [
  4558. 0 => 'db_id',
  4559. 1 => 'accession',
  4560. 2 => 'version',
  4561. ],
  4562. ],
  4563. 'indexes' => [
  4564. 'dbxref_idx1' => [
  4565. 0 => 'db_id',
  4566. ],
  4567. 'dbxref_idx2' => [
  4568. 0 => 'accession',
  4569. ],
  4570. 'dbxref_idx3' => [
  4571. 0 => 'version',
  4572. ],
  4573. ],
  4574. 'primary key' => [
  4575. 0 => 'dbxref_id',
  4576. ],
  4577. 'foreign keys' => [
  4578. 'db' => [
  4579. 'table' => 'db',
  4580. 'columns' => [
  4581. 'db_id' => 'db_id',
  4582. ],
  4583. ],
  4584. ],
  4585. 'referring_tables' => [
  4586. 0 => 'analysis_dbxref',
  4587. 1 => 'arraydesign',
  4588. 2 => 'assay',
  4589. 3 => 'biomaterial',
  4590. 4 => 'biomaterial_dbxref',
  4591. 5 => 'cell_line_dbxref',
  4592. 6 => 'cvterm',
  4593. 7 => 'cvterm_dbxref',
  4594. 8 => 'dbxrefprop',
  4595. 9 => 'element',
  4596. 10 => 'feature',
  4597. 11 => 'feature_cvterm_dbxref',
  4598. 12 => 'feature_dbxref',
  4599. 13 => 'featuremap_dbxref',
  4600. 14 => 'library_dbxref',
  4601. 15 => 'nd_experiment_dbxref',
  4602. 16 => 'nd_experiment_stock_dbxref',
  4603. 17 => 'organism_dbxref',
  4604. 18 => 'phylonode_dbxref',
  4605. 19 => 'phylotree',
  4606. 20 => 'project_dbxref',
  4607. 21 => 'protocol',
  4608. 22 => 'pub_dbxref',
  4609. 23 => 'stock',
  4610. 24 => 'stock_dbxref',
  4611. 25 => 'study',
  4612. ],
  4613. ];
  4614. return $description;
  4615. }
  4616. /**
  4617. * Implements hook_chado_schema_v1_3_dbxrefprop()
  4618. *
  4619. * Purpose: To describe the structure of 'dbxrefprop' to tripal
  4620. *
  4621. * @see chado_insert_record()
  4622. * @see chado_update_record()
  4623. * @see chado_select_record()
  4624. * @see chado_generate_var()
  4625. * @see chado_expan_var()
  4626. *
  4627. * @return
  4628. * An array describing the 'dbxrefprop' table
  4629. *
  4630. * @ingroup tripal_chado_v1.3_schema_api
  4631. *
  4632. */
  4633. function tripal_chado_chado_schema_v1_3_dbxrefprop() {
  4634. $description = [
  4635. 'description' => '',
  4636. 'table' => 'dbxrefprop',
  4637. 'fields' => [
  4638. 'dbxrefprop_id' => [
  4639. 'size' => 'big',
  4640. 'type' => 'serial',
  4641. 'not null' => TRUE,
  4642. ],
  4643. 'dbxref_id' => [
  4644. 'size' => 'big',
  4645. 'type' => 'int',
  4646. 'not null' => TRUE,
  4647. ],
  4648. 'type_id' => [
  4649. 'size' => 'big',
  4650. 'type' => 'int',
  4651. 'not null' => TRUE,
  4652. ],
  4653. 'value' => [
  4654. 'size' => 'normal',
  4655. 'type' => 'text',
  4656. 'not null' => TRUE,
  4657. 'default' => '',
  4658. ],
  4659. 'rank' => [
  4660. 'size' => 'normal',
  4661. 'type' => 'int',
  4662. 'not null' => TRUE,
  4663. 'default' => 0,
  4664. ],
  4665. ],
  4666. 'unique keys' => [
  4667. 'dbxrefprop_c1' => [
  4668. 0 => 'dbxref_id',
  4669. 1 => 'type_id',
  4670. 2 => 'rank',
  4671. ],
  4672. ],
  4673. 'indexes' => [
  4674. 'dbxrefprop_idx1' => [
  4675. 0 => 'dbxref_id',
  4676. ],
  4677. 'dbxrefprop_idx2' => [
  4678. 0 => 'type_id',
  4679. ],
  4680. ],
  4681. 'primary key' => [
  4682. 0 => 'dbxrefprop_id',
  4683. ],
  4684. 'foreign keys' => [
  4685. 'dbxref' => [
  4686. 'table' => 'dbxref',
  4687. 'columns' => [
  4688. 'dbxref_id' => 'dbxref_id',
  4689. ],
  4690. ],
  4691. 'cvterm' => [
  4692. 'table' => 'cvterm',
  4693. 'columns' => [
  4694. 'type_id' => 'cvterm_id',
  4695. ],
  4696. ],
  4697. ],
  4698. 'referring_tables' => [
  4699. ],
  4700. ];
  4701. return $description;
  4702. }
  4703. /**
  4704. * Implements hook_chado_schema_v1_3_eimage()
  4705. *
  4706. * Purpose: To describe the structure of 'eimage' to tripal
  4707. *
  4708. * @see chado_insert_record()
  4709. * @see chado_update_record()
  4710. * @see chado_select_record()
  4711. * @see chado_generate_var()
  4712. * @see chado_expan_var()
  4713. *
  4714. * @return
  4715. * An array describing the 'eimage' table
  4716. *
  4717. * @ingroup tripal_chado_v1.3_schema_api
  4718. *
  4719. */
  4720. function tripal_chado_chado_schema_v1_3_eimage() {
  4721. $description = [
  4722. 'description' => '',
  4723. 'table' => 'eimage',
  4724. 'fields' => [
  4725. 'eimage_id' => [
  4726. 'size' => 'big',
  4727. 'type' => 'serial',
  4728. 'not null' => TRUE,
  4729. ],
  4730. 'eimage_data' => [
  4731. 'size' => 'normal',
  4732. 'type' => 'text',
  4733. 'not null' => FALSE,
  4734. ],
  4735. 'eimage_type' => [
  4736. 'size' => 'normal',
  4737. 'type' => 'varchar',
  4738. 'length' => '255',
  4739. 'not null' => TRUE,
  4740. ],
  4741. 'image_uri' => [
  4742. 'size' => 'normal',
  4743. 'type' => 'varchar',
  4744. 'length' => '255',
  4745. 'not null' => FALSE,
  4746. ],
  4747. ],
  4748. 'primary key' => [
  4749. 0 => 'eimage_id',
  4750. ],
  4751. 'foreign keys' => [
  4752. ],
  4753. 'referring_tables' => [
  4754. 0 => 'expression_image',
  4755. ],
  4756. ];
  4757. return $description;
  4758. }
  4759. /**
  4760. * Implements hook_chado_schema_v1_3_element()
  4761. *
  4762. * Purpose: To describe the structure of 'element' to tripal
  4763. *
  4764. * @see chado_insert_record()
  4765. * @see chado_update_record()
  4766. * @see chado_select_record()
  4767. * @see chado_generate_var()
  4768. * @see chado_expan_var()
  4769. *
  4770. * @return
  4771. * An array describing the 'element' table
  4772. *
  4773. * @ingroup tripal_chado_v1.3_schema_api
  4774. *
  4775. */
  4776. function tripal_chado_chado_schema_v1_3_element() {
  4777. $description = [
  4778. 'description' => '',
  4779. 'table' => 'element',
  4780. 'fields' => [
  4781. 'element_id' => [
  4782. 'size' => 'big',
  4783. 'type' => 'serial',
  4784. 'not null' => TRUE,
  4785. ],
  4786. 'feature_id' => [
  4787. 'size' => 'big',
  4788. 'type' => 'int',
  4789. 'not null' => FALSE,
  4790. ],
  4791. 'arraydesign_id' => [
  4792. 'size' => 'big',
  4793. 'type' => 'int',
  4794. 'not null' => TRUE,
  4795. ],
  4796. 'type_id' => [
  4797. 'size' => 'big',
  4798. 'type' => 'int',
  4799. 'not null' => FALSE,
  4800. ],
  4801. 'dbxref_id' => [
  4802. 'size' => 'big',
  4803. 'type' => 'int',
  4804. 'not null' => FALSE,
  4805. ],
  4806. ],
  4807. 'unique keys' => [
  4808. 'element_c1' => [
  4809. 0 => 'feature_id',
  4810. 1 => 'arraydesign_id',
  4811. ],
  4812. ],
  4813. 'indexes' => [
  4814. 'element_idx1' => [
  4815. 0 => 'feature_id',
  4816. ],
  4817. 'element_idx2' => [
  4818. 0 => 'arraydesign_id',
  4819. ],
  4820. 'element_idx3' => [
  4821. 0 => 'type_id',
  4822. ],
  4823. 'element_idx4' => [
  4824. 0 => 'dbxref_id',
  4825. ],
  4826. ],
  4827. 'primary key' => [
  4828. 0 => 'element_id',
  4829. ],
  4830. 'foreign keys' => [
  4831. 'feature' => [
  4832. 'table' => 'feature',
  4833. 'columns' => [
  4834. 'feature_id' => 'feature_id',
  4835. ],
  4836. ],
  4837. 'arraydesign' => [
  4838. 'table' => 'arraydesign',
  4839. 'columns' => [
  4840. 'arraydesign_id' => 'arraydesign_id',
  4841. ],
  4842. ],
  4843. 'cvterm' => [
  4844. 'table' => 'cvterm',
  4845. 'columns' => [
  4846. 'type_id' => 'cvterm_id',
  4847. ],
  4848. ],
  4849. 'dbxref' => [
  4850. 'table' => 'dbxref',
  4851. 'columns' => [
  4852. 'dbxref_id' => 'dbxref_id',
  4853. ],
  4854. ],
  4855. ],
  4856. 'referring_tables' => [
  4857. 0 => 'element_relationship',
  4858. 2 => 'elementresult',
  4859. ],
  4860. ];
  4861. return $description;
  4862. }
  4863. /**
  4864. * Implements hook_chado_schema_v1_3_element_relationship()
  4865. *
  4866. * Purpose: To describe the structure of 'element_relationship' to tripal
  4867. *
  4868. * @see chado_insert_record()
  4869. * @see chado_update_record()
  4870. * @see chado_select_record()
  4871. * @see chado_generate_var()
  4872. * @see chado_expan_var()
  4873. *
  4874. * @return
  4875. * An array describing the 'element_relationship' table
  4876. *
  4877. * @ingroup tripal_chado_v1.3_schema_api
  4878. *
  4879. */
  4880. function tripal_chado_chado_schema_v1_3_element_relationship() {
  4881. $description = [
  4882. 'description' => '',
  4883. 'table' => 'element_relationship',
  4884. 'fields' => [
  4885. 'element_relationship_id' => [
  4886. 'size' => 'big',
  4887. 'type' => 'serial',
  4888. 'not null' => TRUE,
  4889. ],
  4890. 'subject_id' => [
  4891. 'size' => 'big',
  4892. 'type' => 'int',
  4893. 'not null' => TRUE,
  4894. ],
  4895. 'type_id' => [
  4896. 'size' => 'big',
  4897. 'type' => 'int',
  4898. 'not null' => TRUE,
  4899. ],
  4900. 'object_id' => [
  4901. 'size' => 'big',
  4902. 'type' => 'int',
  4903. 'not null' => TRUE,
  4904. ],
  4905. 'value' => [
  4906. 'size' => 'normal',
  4907. 'type' => 'text',
  4908. 'not null' => FALSE,
  4909. ],
  4910. 'rank' => [
  4911. 'size' => 'normal',
  4912. 'type' => 'int',
  4913. 'not null' => TRUE,
  4914. 'default' => 0,
  4915. ],
  4916. ],
  4917. 'unique keys' => [
  4918. 'element_relationship_c1' => [
  4919. 0 => 'subject_id',
  4920. 1 => 'object_id',
  4921. 2 => 'type_id',
  4922. 3 => 'rank',
  4923. ],
  4924. ],
  4925. 'indexes' => [
  4926. 'element_relationship_idx1' => [
  4927. 0 => 'subject_id',
  4928. ],
  4929. 'element_relationship_idx2' => [
  4930. 0 => 'type_id',
  4931. ],
  4932. 'element_relationship_idx3' => [
  4933. 0 => 'object_id',
  4934. ],
  4935. 'element_relationship_idx4' => [
  4936. 0 => 'value',
  4937. ],
  4938. ],
  4939. 'primary key' => [
  4940. 0 => 'element_relationship_id',
  4941. ],
  4942. 'foreign keys' => [
  4943. 'element' => [
  4944. 'table' => 'element',
  4945. 'columns' => [
  4946. 'subject_id' => 'element_id',
  4947. 'object_id' => 'element_id',
  4948. ],
  4949. ],
  4950. 'cvterm' => [
  4951. 'table' => 'cvterm',
  4952. 'columns' => [
  4953. 'type_id' => 'cvterm_id',
  4954. ],
  4955. ],
  4956. ],
  4957. 'referring_tables' => [
  4958. ],
  4959. ];
  4960. return $description;
  4961. }
  4962. /**
  4963. * Implements hook_chado_schema_v1_3_elementresult()
  4964. *
  4965. * Purpose: To describe the structure of 'elementresult' to tripal
  4966. *
  4967. * @see chado_insert_record()
  4968. * @see chado_update_record()
  4969. * @see chado_select_record()
  4970. * @see chado_generate_var()
  4971. * @see chado_expan_var()
  4972. *
  4973. * @return
  4974. * An array describing the 'elementresult' table
  4975. *
  4976. * @ingroup tripal_chado_v1.3_schema_api
  4977. *
  4978. */
  4979. function tripal_chado_chado_schema_v1_3_elementresult() {
  4980. $description = [
  4981. 'description' => '',
  4982. 'table' => 'elementresult',
  4983. 'fields' => [
  4984. 'elementresult_id' => [
  4985. 'size' => 'big',
  4986. 'type' => 'serial',
  4987. 'not null' => TRUE,
  4988. ],
  4989. 'element_id' => [
  4990. 'size' => 'big',
  4991. 'type' => 'int',
  4992. 'not null' => TRUE,
  4993. ],
  4994. 'quantification_id' => [
  4995. 'size' => 'big',
  4996. 'type' => 'int',
  4997. 'not null' => TRUE,
  4998. ],
  4999. 'signal' => [
  5000. 'size' => 'big',
  5001. 'type' => 'float',
  5002. 'not null' => TRUE,
  5003. ],
  5004. ],
  5005. 'unique keys' => [
  5006. 'elementresult_c1' => [
  5007. 0 => 'element_id',
  5008. 1 => 'quantification_id',
  5009. ],
  5010. ],
  5011. 'indexes' => [
  5012. 'elementresult_idx1' => [
  5013. 0 => 'element_id',
  5014. ],
  5015. 'elementresult_idx2' => [
  5016. 0 => 'quantification_id',
  5017. ],
  5018. 'elementresult_idx3' => [
  5019. 0 => 'signal',
  5020. ],
  5021. ],
  5022. 'primary key' => [
  5023. 0 => 'elementresult_id',
  5024. ],
  5025. 'foreign keys' => [
  5026. 'element' => [
  5027. 'table' => 'element',
  5028. 'columns' => [
  5029. 'element_id' => 'element_id',
  5030. ],
  5031. ],
  5032. 'quantification' => [
  5033. 'table' => 'quantification',
  5034. 'columns' => [
  5035. 'quantification_id' => 'quantification_id',
  5036. ],
  5037. ],
  5038. ],
  5039. 'referring_tables' => [
  5040. 0 => 'elementresult_relationship',
  5041. ],
  5042. ];
  5043. return $description;
  5044. }
  5045. /**
  5046. * Implements hook_chado_schema_v1_3_elementresult_relationship()
  5047. *
  5048. * Purpose: To describe the structure of 'elementresult_relationship' to tripal
  5049. *
  5050. * @see chado_insert_record()
  5051. * @see chado_update_record()
  5052. * @see chado_select_record()
  5053. * @see chado_generate_var()
  5054. * @see chado_expan_var()
  5055. *
  5056. * @return
  5057. * An array describing the 'elementresult_relationship' table
  5058. *
  5059. * @ingroup tripal_chado_v1.3_schema_api
  5060. *
  5061. */
  5062. function tripal_chado_chado_schema_v1_3_elementresult_relationship() {
  5063. $description = [
  5064. 'description' => '',
  5065. 'table' => 'elementresult_relationship',
  5066. 'fields' => [
  5067. 'elementresult_relationship_id' => [
  5068. 'size' => 'big',
  5069. 'type' => 'serial',
  5070. 'not null' => TRUE,
  5071. ],
  5072. 'subject_id' => [
  5073. 'size' => 'big',
  5074. 'type' => 'int',
  5075. 'not null' => TRUE,
  5076. ],
  5077. 'type_id' => [
  5078. 'size' => 'big',
  5079. 'type' => 'int',
  5080. 'not null' => TRUE,
  5081. ],
  5082. 'object_id' => [
  5083. 'size' => 'big',
  5084. 'type' => 'int',
  5085. 'not null' => TRUE,
  5086. ],
  5087. 'value' => [
  5088. 'size' => 'normal',
  5089. 'type' => 'text',
  5090. 'not null' => FALSE,
  5091. ],
  5092. 'rank' => [
  5093. 'size' => 'normal',
  5094. 'type' => 'int',
  5095. 'not null' => TRUE,
  5096. 'default' => 0,
  5097. ],
  5098. ],
  5099. 'unique keys' => [
  5100. 'elementresult_relationship_c1' => [
  5101. 0 => 'subject_id',
  5102. 1 => 'object_id',
  5103. 2 => 'type_id',
  5104. 3 => 'rank',
  5105. ],
  5106. ],
  5107. 'indexes' => [
  5108. 'elementresult_relationship_idx1' => [
  5109. 0 => 'subject_id',
  5110. ],
  5111. 'elementresult_relationship_idx2' => [
  5112. 0 => 'type_id',
  5113. ],
  5114. 'elementresult_relationship_idx3' => [
  5115. 0 => 'object_id',
  5116. ],
  5117. 'elementresult_relationship_idx4' => [
  5118. 0 => 'value',
  5119. ],
  5120. ],
  5121. 'primary key' => [
  5122. 0 => 'elementresult_relationship_id',
  5123. ],
  5124. 'foreign keys' => [
  5125. 'elementresult' => [
  5126. 'table' => 'elementresult',
  5127. 'columns' => [
  5128. 'subject_id' => 'elementresult_id',
  5129. 'object_id' => 'elementresult_id',
  5130. ],
  5131. ],
  5132. 'cvterm' => [
  5133. 'table' => 'cvterm',
  5134. 'columns' => [
  5135. 'type_id' => 'cvterm_id',
  5136. ],
  5137. ],
  5138. ],
  5139. 'referring_tables' => [
  5140. ],
  5141. ];
  5142. return $description;
  5143. }
  5144. /**
  5145. * Implements hook_chado_schema_v1_3_environment()
  5146. *
  5147. * Purpose: To describe the structure of 'environment' to tripal
  5148. *
  5149. * @see chado_insert_record()
  5150. * @see chado_update_record()
  5151. * @see chado_select_record()
  5152. * @see chado_generate_var()
  5153. * @see chado_expan_var()
  5154. *
  5155. * @return
  5156. * An array describing the 'environment' table
  5157. *
  5158. * @ingroup tripal_chado_v1.3_schema_api
  5159. *
  5160. */
  5161. function tripal_chado_chado_schema_v1_3_environment() {
  5162. $description = [
  5163. 'description' => '',
  5164. 'table' => 'environment',
  5165. 'fields' => [
  5166. 'environment_id' => [
  5167. 'size' => 'big',
  5168. 'type' => 'serial',
  5169. 'not null' => TRUE,
  5170. ],
  5171. 'uniquename' => [
  5172. 'size' => 'normal',
  5173. 'type' => 'text',
  5174. 'not null' => TRUE,
  5175. ],
  5176. 'description' => [
  5177. 'size' => 'normal',
  5178. 'type' => 'text',
  5179. 'not null' => FALSE,
  5180. ],
  5181. ],
  5182. 'unique keys' => [
  5183. 'environment_c1' => [
  5184. 0 => 'uniquename',
  5185. ],
  5186. ],
  5187. 'indexes' => [
  5188. 'environment_idx1' => [
  5189. 0 => 'uniquename',
  5190. ],
  5191. ],
  5192. 'primary key' => [
  5193. 0 => 'environment_id',
  5194. ],
  5195. 'foreign keys' => [
  5196. ],
  5197. 'referring_tables' => [
  5198. 0 => 'environment_cvterm',
  5199. 1 => 'phendesc',
  5200. 2 => 'phenotype_comparison',
  5201. 4 => 'phenstatement',
  5202. ],
  5203. ];
  5204. return $description;
  5205. }
  5206. /**
  5207. * Implements hook_chado_schema_v1_3_environment_cvterm()
  5208. *
  5209. * Purpose: To describe the structure of 'environment_cvterm' to tripal
  5210. *
  5211. * @see chado_insert_record()
  5212. * @see chado_update_record()
  5213. * @see chado_select_record()
  5214. * @see chado_generate_var()
  5215. * @see chado_expan_var()
  5216. *
  5217. * @return
  5218. * An array describing the 'environment_cvterm' table
  5219. *
  5220. * @ingroup tripal_chado_v1.3_schema_api
  5221. *
  5222. */
  5223. function tripal_chado_chado_schema_v1_3_environment_cvterm() {
  5224. $description = [
  5225. 'description' => '',
  5226. 'table' => 'environment_cvterm',
  5227. 'fields' => [
  5228. 'environment_cvterm_id' => [
  5229. 'size' => 'big',
  5230. 'type' => 'serial',
  5231. 'not null' => TRUE,
  5232. ],
  5233. 'environment_id' => [
  5234. 'size' => 'big',
  5235. 'type' => 'int',
  5236. 'not null' => TRUE,
  5237. ],
  5238. 'cvterm_id' => [
  5239. 'size' => 'big',
  5240. 'type' => 'int',
  5241. 'not null' => TRUE,
  5242. ],
  5243. ],
  5244. 'unique keys' => [
  5245. 'environment_cvterm_c1' => [
  5246. 0 => 'environment_id',
  5247. 1 => 'cvterm_id',
  5248. ],
  5249. ],
  5250. 'indexes' => [
  5251. 'environment_cvterm_idx1' => [
  5252. 0 => 'environment_id',
  5253. ],
  5254. 'environment_cvterm_idx2' => [
  5255. 0 => 'cvterm_id',
  5256. ],
  5257. ],
  5258. 'primary key' => [
  5259. 0 => 'environment_cvterm_id',
  5260. ],
  5261. 'foreign keys' => [
  5262. 'environment' => [
  5263. 'table' => 'environment',
  5264. 'columns' => [
  5265. 'environment_id' => 'environment_id',
  5266. ],
  5267. ],
  5268. 'cvterm' => [
  5269. 'table' => 'cvterm',
  5270. 'columns' => [
  5271. 'cvterm_id' => 'cvterm_id',
  5272. ],
  5273. ],
  5274. ],
  5275. 'referring_tables' => [
  5276. ],
  5277. ];
  5278. return $description;
  5279. }
  5280. /**
  5281. * Implements hook_chado_schema_v1_3_expression()
  5282. *
  5283. * Purpose: To describe the structure of 'expression' to tripal
  5284. *
  5285. * @see chado_insert_record()
  5286. * @see chado_update_record()
  5287. * @see chado_select_record()
  5288. * @see chado_generate_var()
  5289. * @see chado_expan_var()
  5290. *
  5291. * @return
  5292. * An array describing the 'expression' table
  5293. *
  5294. * @ingroup tripal_chado_v1.3_schema_api
  5295. *
  5296. */
  5297. function tripal_chado_chado_schema_v1_3_expression() {
  5298. $description = [
  5299. 'description' => '',
  5300. 'table' => 'expression',
  5301. 'fields' => [
  5302. 'expression_id' => [
  5303. 'size' => 'big',
  5304. 'type' => 'serial',
  5305. 'not null' => TRUE,
  5306. ],
  5307. 'uniquename' => [
  5308. 'size' => 'normal',
  5309. 'type' => 'text',
  5310. 'not null' => TRUE,
  5311. ],
  5312. 'md5checksum' => [
  5313. 'size' => 'normal',
  5314. 'type' => 'char',
  5315. 'length' => '32',
  5316. 'not null' => FALSE,
  5317. ],
  5318. 'description' => [
  5319. 'size' => 'normal',
  5320. 'type' => 'text',
  5321. 'not null' => FALSE,
  5322. ],
  5323. ],
  5324. 'unique keys' => [
  5325. 'expression_c1' => [
  5326. 0 => 'uniquename',
  5327. ],
  5328. ],
  5329. 'primary key' => [
  5330. 0 => 'expression_id',
  5331. ],
  5332. 'foreign keys' => [
  5333. ],
  5334. 'referring_tables' => [
  5335. 0 => 'expression_cvterm',
  5336. 1 => 'expression_image',
  5337. 2 => 'expressionprop',
  5338. 3 => 'expression_pub',
  5339. 4 => 'feature_expression',
  5340. 5 => 'library_expression',
  5341. ],
  5342. ];
  5343. return $description;
  5344. }
  5345. /**
  5346. * Implements hook_chado_schema_v1_3_expression_cvterm()
  5347. *
  5348. * Purpose: To describe the structure of 'expression_cvterm' to tripal
  5349. *
  5350. * @see chado_insert_record()
  5351. * @see chado_update_record()
  5352. * @see chado_select_record()
  5353. * @see chado_generate_var()
  5354. * @see chado_expan_var()
  5355. *
  5356. * @return
  5357. * An array describing the 'expression_cvterm' table
  5358. *
  5359. * @ingroup tripal_chado_v1.3_schema_api
  5360. *
  5361. */
  5362. function tripal_chado_chado_schema_v1_3_expression_cvterm() {
  5363. $description = [
  5364. 'description' => '',
  5365. 'table' => 'expression_cvterm',
  5366. 'fields' => [
  5367. 'expression_cvterm_id' => [
  5368. 'size' => 'big',
  5369. 'type' => 'serial',
  5370. 'not null' => TRUE,
  5371. ],
  5372. 'expression_id' => [
  5373. 'size' => 'big',
  5374. 'type' => 'int',
  5375. 'not null' => TRUE,
  5376. ],
  5377. 'cvterm_id' => [
  5378. 'size' => 'big',
  5379. 'type' => 'int',
  5380. 'not null' => TRUE,
  5381. ],
  5382. 'rank' => [
  5383. 'size' => 'normal',
  5384. 'type' => 'int',
  5385. 'not null' => TRUE,
  5386. 'default' => 0,
  5387. ],
  5388. 'cvterm_type_id' => [
  5389. 'size' => 'big',
  5390. 'type' => 'int',
  5391. 'not null' => TRUE,
  5392. ],
  5393. ],
  5394. 'unique keys' => [
  5395. 'expression_cvterm_c1' => [
  5396. 0 => 'expression_id',
  5397. 1 => 'cvterm_id',
  5398. 2 => 'rank',
  5399. 3 => 'cvterm_type_id',
  5400. ],
  5401. ],
  5402. 'indexes' => [
  5403. 'expression_cvterm_idx1' => [
  5404. 0 => 'expression_id',
  5405. ],
  5406. 'expression_cvterm_idx2' => [
  5407. 0 => 'cvterm_id',
  5408. ],
  5409. 'expression_cvterm_idx3' => [
  5410. 0 => 'cvterm_type_id',
  5411. ],
  5412. ],
  5413. 'primary key' => [
  5414. 0 => 'expression_cvterm_id',
  5415. ],
  5416. 'foreign keys' => [
  5417. 'expression' => [
  5418. 'table' => 'expression',
  5419. 'columns' => [
  5420. 'expression_id' => 'expression_id',
  5421. ],
  5422. ],
  5423. 'cvterm' => [
  5424. 'table' => 'cvterm',
  5425. 'columns' => [
  5426. 'cvterm_id' => 'cvterm_id',
  5427. 'cvterm_type_id' => 'cvterm_id',
  5428. ],
  5429. ],
  5430. ],
  5431. 'referring_tables' => [
  5432. 0 => 'expression_cvtermprop',
  5433. ],
  5434. ];
  5435. return $description;
  5436. }
  5437. /**
  5438. * Implements hook_chado_schema_v1_3_expression_cvtermprop()
  5439. *
  5440. * Purpose: To describe the structure of 'expression_cvtermprop' to tripal
  5441. *
  5442. * @see chado_insert_record()
  5443. * @see chado_update_record()
  5444. * @see chado_select_record()
  5445. * @see chado_generate_var()
  5446. * @see chado_expan_var()
  5447. *
  5448. * @return
  5449. * An array describing the 'expression_cvtermprop' table
  5450. *
  5451. * @ingroup tripal_chado_v1.3_schema_api
  5452. *
  5453. */
  5454. function tripal_chado_chado_schema_v1_3_expression_cvtermprop() {
  5455. $description = [
  5456. 'description' => '',
  5457. 'table' => 'expression_cvtermprop',
  5458. 'fields' => [
  5459. 'expression_cvtermprop_id' => [
  5460. 'size' => 'big',
  5461. 'type' => 'serial',
  5462. 'not null' => TRUE,
  5463. ],
  5464. 'expression_cvterm_id' => [
  5465. 'size' => 'big',
  5466. 'type' => 'int',
  5467. 'not null' => TRUE,
  5468. ],
  5469. 'type_id' => [
  5470. 'size' => 'big',
  5471. 'type' => 'int',
  5472. 'not null' => TRUE,
  5473. ],
  5474. 'value' => [
  5475. 'size' => 'normal',
  5476. 'type' => 'text',
  5477. 'not null' => FALSE,
  5478. ],
  5479. 'rank' => [
  5480. 'size' => 'normal',
  5481. 'type' => 'int',
  5482. 'not null' => TRUE,
  5483. 'default' => 0,
  5484. ],
  5485. ],
  5486. 'unique keys' => [
  5487. 'expression_cvtermprop_c1' => [
  5488. 0 => 'expression_cvterm_id',
  5489. 1 => 'type_id',
  5490. 2 => 'rank',
  5491. ],
  5492. ],
  5493. 'indexes' => [
  5494. 'expression_cvtermprop_idx1' => [
  5495. 0 => 'expression_cvterm_id',
  5496. ],
  5497. 'expression_cvtermprop_idx2' => [
  5498. 0 => 'type_id',
  5499. ],
  5500. ],
  5501. 'primary key' => [
  5502. 0 => 'expression_cvtermprop_id',
  5503. ],
  5504. 'foreign keys' => [
  5505. 'expression_cvterm' => [
  5506. 'table' => 'expression_cvterm',
  5507. 'columns' => [
  5508. 'expression_cvterm_id' => 'expression_cvterm_id',
  5509. ],
  5510. ],
  5511. 'cvterm' => [
  5512. 'table' => 'cvterm',
  5513. 'columns' => [
  5514. 'type_id' => 'cvterm_id',
  5515. ],
  5516. ],
  5517. ],
  5518. 'referring_tables' => [
  5519. ],
  5520. ];
  5521. return $description;
  5522. }
  5523. /**
  5524. * Implements hook_chado_schema_v1_3_expression_image()
  5525. *
  5526. * Purpose: To describe the structure of 'expression_image' to tripal
  5527. *
  5528. * @see chado_insert_record()
  5529. * @see chado_update_record()
  5530. * @see chado_select_record()
  5531. * @see chado_generate_var()
  5532. * @see chado_expan_var()
  5533. *
  5534. * @return
  5535. * An array describing the 'expression_image' table
  5536. *
  5537. * @ingroup tripal_chado_v1.3_schema_api
  5538. *
  5539. */
  5540. function tripal_chado_chado_schema_v1_3_expression_image() {
  5541. $description = [
  5542. 'description' => '',
  5543. 'table' => 'expression_image',
  5544. 'fields' => [
  5545. 'expression_image_id' => [
  5546. 'size' => 'big',
  5547. 'type' => 'serial',
  5548. 'not null' => TRUE,
  5549. ],
  5550. 'expression_id' => [
  5551. 'size' => 'big',
  5552. 'type' => 'int',
  5553. 'not null' => TRUE,
  5554. ],
  5555. 'eimage_id' => [
  5556. 'size' => 'big',
  5557. 'type' => 'int',
  5558. 'not null' => TRUE,
  5559. ],
  5560. ],
  5561. 'unique keys' => [
  5562. 'expression_image_c1' => [
  5563. 0 => 'expression_id',
  5564. 1 => 'eimage_id',
  5565. ],
  5566. ],
  5567. 'indexes' => [
  5568. 'expression_image_idx1' => [
  5569. 0 => 'expression_id',
  5570. ],
  5571. 'expression_image_idx2' => [
  5572. 0 => 'eimage_id',
  5573. ],
  5574. ],
  5575. 'primary key' => [
  5576. 0 => 'expression_image_id',
  5577. ],
  5578. 'foreign keys' => [
  5579. 'expression' => [
  5580. 'table' => 'expression',
  5581. 'columns' => [
  5582. 'expression_id' => 'expression_id',
  5583. ],
  5584. ],
  5585. 'eimage' => [
  5586. 'table' => 'eimage',
  5587. 'columns' => [
  5588. 'eimage_id' => 'eimage_id',
  5589. ],
  5590. ],
  5591. ],
  5592. 'referring_tables' => [
  5593. ],
  5594. ];
  5595. return $description;
  5596. }
  5597. /**
  5598. * Implements hook_chado_schema_v1_3_expressionprop()
  5599. *
  5600. * Purpose: To describe the structure of 'expressionprop' to tripal
  5601. *
  5602. * @see chado_insert_record()
  5603. * @see chado_update_record()
  5604. * @see chado_select_record()
  5605. * @see chado_generate_var()
  5606. * @see chado_expan_var()
  5607. *
  5608. * @return
  5609. * An array describing the 'expressionprop' table
  5610. *
  5611. * @ingroup tripal_chado_v1.3_schema_api
  5612. *
  5613. */
  5614. function tripal_chado_chado_schema_v1_3_expressionprop() {
  5615. $description = [
  5616. 'description' => '',
  5617. 'table' => 'expressionprop',
  5618. 'fields' => [
  5619. 'expressionprop_id' => [
  5620. 'size' => 'big',
  5621. 'type' => 'serial',
  5622. 'not null' => TRUE,
  5623. ],
  5624. 'expression_id' => [
  5625. 'size' => 'big',
  5626. 'type' => 'int',
  5627. 'not null' => TRUE,
  5628. ],
  5629. 'type_id' => [
  5630. 'size' => 'big',
  5631. 'type' => 'int',
  5632. 'not null' => TRUE,
  5633. ],
  5634. 'value' => [
  5635. 'size' => 'normal',
  5636. 'type' => 'text',
  5637. 'not null' => FALSE,
  5638. ],
  5639. 'rank' => [
  5640. 'size' => 'normal',
  5641. 'type' => 'int',
  5642. 'not null' => TRUE,
  5643. 'default' => 0,
  5644. ],
  5645. ],
  5646. 'unique keys' => [
  5647. 'expressionprop_c1' => [
  5648. 0 => 'expression_id',
  5649. 1 => 'type_id',
  5650. 2 => 'rank',
  5651. ],
  5652. ],
  5653. 'indexes' => [
  5654. 'expressionprop_idx1' => [
  5655. 0 => 'expression_id',
  5656. ],
  5657. 'expressionprop_idx2' => [
  5658. 0 => 'type_id',
  5659. ],
  5660. ],
  5661. 'primary key' => [
  5662. 0 => 'expressionprop_id',
  5663. ],
  5664. 'foreign keys' => [
  5665. 'expression' => [
  5666. 'table' => 'expression',
  5667. 'columns' => [
  5668. 'expression_id' => 'expression_id',
  5669. ],
  5670. ],
  5671. 'cvterm' => [
  5672. 'table' => 'cvterm',
  5673. 'columns' => [
  5674. 'type_id' => 'cvterm_id',
  5675. ],
  5676. ],
  5677. ],
  5678. 'referring_tables' => [
  5679. ],
  5680. ];
  5681. return $description;
  5682. }
  5683. /**
  5684. * Implements hook_chado_schema_v1_3_expression_pub()
  5685. *
  5686. * Purpose: To describe the structure of 'expression_pub' to tripal
  5687. *
  5688. * @see chado_insert_record()
  5689. * @see chado_update_record()
  5690. * @see chado_select_record()
  5691. * @see chado_generate_var()
  5692. * @see chado_expan_var()
  5693. *
  5694. * @return
  5695. * An array describing the 'expression_pub' table
  5696. *
  5697. * @ingroup tripal_chado_v1.3_schema_api
  5698. *
  5699. */
  5700. function tripal_chado_chado_schema_v1_3_expression_pub() {
  5701. $description = [
  5702. 'description' => '',
  5703. 'table' => 'expression_pub',
  5704. 'fields' => [
  5705. 'expression_pub_id' => [
  5706. 'size' => 'big',
  5707. 'type' => 'serial',
  5708. 'not null' => TRUE,
  5709. ],
  5710. 'expression_id' => [
  5711. 'size' => 'big',
  5712. 'type' => 'int',
  5713. 'not null' => TRUE,
  5714. ],
  5715. 'pub_id' => [
  5716. 'size' => 'big',
  5717. 'type' => 'int',
  5718. 'not null' => TRUE,
  5719. ],
  5720. ],
  5721. 'unique keys' => [
  5722. 'expression_pub_c1' => [
  5723. 0 => 'expression_id',
  5724. 1 => 'pub_id',
  5725. ],
  5726. ],
  5727. 'indexes' => [
  5728. 'expression_pub_idx1' => [
  5729. 0 => 'expression_id',
  5730. ],
  5731. 'expression_pub_idx2' => [
  5732. 0 => 'pub_id',
  5733. ],
  5734. ],
  5735. 'primary key' => [
  5736. 0 => 'expression_pub_id',
  5737. ],
  5738. 'foreign keys' => [
  5739. 'expression' => [
  5740. 'table' => 'expression',
  5741. 'columns' => [
  5742. 'expression_id' => 'expression_id',
  5743. ],
  5744. ],
  5745. 'pub' => [
  5746. 'table' => 'pub',
  5747. 'columns' => [
  5748. 'pub_id' => 'pub_id',
  5749. ],
  5750. ],
  5751. ],
  5752. 'referring_tables' => [
  5753. ],
  5754. ];
  5755. return $description;
  5756. }
  5757. /**
  5758. * Implements hook_chado_schema_v1_3_feature()
  5759. *
  5760. * Purpose: To describe the structure of 'feature' to tripal
  5761. *
  5762. * @see chado_insert_record()
  5763. * @see chado_update_record()
  5764. * @see chado_select_record()
  5765. * @see chado_generate_var()
  5766. * @see chado_expan_var()
  5767. *
  5768. * @return
  5769. * An array describing the 'feature' table
  5770. *
  5771. * @ingroup tripal_chado_v1.3_schema_api
  5772. *
  5773. */
  5774. function tripal_chado_chado_schema_v1_3_feature() {
  5775. $description = [
  5776. 'description' => '',
  5777. 'table' => 'feature',
  5778. 'fields' => [
  5779. 'feature_id' => [
  5780. 'size' => 'big',
  5781. 'type' => 'serial',
  5782. 'not null' => TRUE,
  5783. ],
  5784. 'dbxref_id' => [
  5785. 'size' => 'big',
  5786. 'type' => 'int',
  5787. 'not null' => FALSE,
  5788. ],
  5789. 'organism_id' => [
  5790. 'size' => 'big',
  5791. 'type' => 'int',
  5792. 'not null' => TRUE,
  5793. ],
  5794. 'name' => [
  5795. 'size' => 'normal',
  5796. 'type' => 'varchar',
  5797. 'length' => '255',
  5798. 'not null' => FALSE,
  5799. ],
  5800. 'uniquename' => [
  5801. 'size' => 'normal',
  5802. 'type' => 'text',
  5803. 'not null' => TRUE,
  5804. ],
  5805. 'residues' => [
  5806. 'size' => 'normal',
  5807. 'type' => 'text',
  5808. 'not null' => FALSE,
  5809. ],
  5810. 'seqlen' => [
  5811. 'size' => 'big',
  5812. 'type' => 'int',
  5813. 'not null' => FALSE,
  5814. ],
  5815. 'md5checksum' => [
  5816. 'size' => 'normal',
  5817. 'type' => 'char',
  5818. 'length' => '32',
  5819. 'not null' => FALSE,
  5820. ],
  5821. 'type_id' => [
  5822. 'size' => 'big',
  5823. 'type' => 'int',
  5824. 'not null' => TRUE,
  5825. ],
  5826. 'is_analysis' => [
  5827. 'size' => 'normal',
  5828. 'type' => 'boolean',
  5829. 'not null' => TRUE,
  5830. 'default' => FALSE,
  5831. ],
  5832. 'is_obsolete' => [
  5833. 'size' => 'normal',
  5834. 'type' => 'boolean',
  5835. 'not null' => TRUE,
  5836. 'default' => FALSE,
  5837. ],
  5838. 'timeaccessioned' => [
  5839. 'size' => 'normal',
  5840. 'type' => 'datetime',
  5841. 'not null' => TRUE,
  5842. 'default' => 'now()',
  5843. ],
  5844. 'timelastmodified' => [
  5845. 'size' => 'normal',
  5846. 'type' => 'datetime',
  5847. 'not null' => TRUE,
  5848. 'default' => 'now()',
  5849. ],
  5850. ],
  5851. 'unique keys' => [
  5852. 'feature_c1' => [
  5853. 0 => 'organism_id',
  5854. 1 => 'uniquename',
  5855. 2 => 'type_id',
  5856. ],
  5857. ],
  5858. 'indexes' => [
  5859. 'feature_idx1' => [
  5860. 0 => 'dbxref_id',
  5861. ],
  5862. 'feature_idx2' => [
  5863. 0 => 'organism_id',
  5864. ],
  5865. 'feature_idx3' => [
  5866. 0 => 'type_id',
  5867. ],
  5868. 'feature_idx4' => [
  5869. 0 => 'uniquename',
  5870. ],
  5871. 'feature_name_ind1' => [
  5872. 0 => 'name',
  5873. ],
  5874. ],
  5875. 'primary key' => [
  5876. 0 => 'feature_id',
  5877. ],
  5878. 'foreign keys' => [
  5879. 'dbxref' => [
  5880. 'table' => 'dbxref',
  5881. 'columns' => [
  5882. 'dbxref_id' => 'dbxref_id',
  5883. ],
  5884. ],
  5885. 'organism' => [
  5886. 'table' => 'organism',
  5887. 'columns' => [
  5888. 'organism_id' => 'organism_id',
  5889. ],
  5890. ],
  5891. 'cvterm' => [
  5892. 'table' => 'cvterm',
  5893. 'columns' => [
  5894. 'type_id' => 'cvterm_id',
  5895. ],
  5896. ],
  5897. ],
  5898. 'referring_tables' => [
  5899. 0 => 'analysisfeature',
  5900. 1 => 'cell_line_feature',
  5901. 2 => 'element',
  5902. 3 => 'feature_contact',
  5903. 4 => 'feature_cvterm',
  5904. 5 => 'feature_dbxref',
  5905. 6 => 'feature_expression',
  5906. 7 => 'feature_genotype',
  5907. 9 => 'featureloc',
  5908. 11 => 'feature_phenotype',
  5909. 12 => 'featurepos',
  5910. 14 => 'featureprop',
  5911. 15 => 'feature_pub',
  5912. 16 => 'featurerange',
  5913. 21 => 'feature_relationship',
  5914. 23 => 'feature_synonym',
  5915. 24 => 'library_feature',
  5916. 25 => 'nd_reagent',
  5917. 26 => 'phylonode',
  5918. 27 => 'project_feature',
  5919. 28 => 'stock_feature',
  5920. 29 => 'studyprop_feature',
  5921. ],
  5922. ];
  5923. return $description;
  5924. }
  5925. /**
  5926. * Implements hook_chado_schema_v1_3_feature_contact()
  5927. *
  5928. * Purpose: To describe the structure of 'feature_contact' to tripal
  5929. *
  5930. * @see chado_insert_record()
  5931. * @see chado_update_record()
  5932. * @see chado_select_record()
  5933. * @see chado_generate_var()
  5934. * @see chado_expan_var()
  5935. *
  5936. * @return
  5937. * An array describing the 'feature_contact' table
  5938. *
  5939. * @ingroup tripal_chado_v1.3_schema_api
  5940. *
  5941. */
  5942. function tripal_chado_chado_schema_v1_3_feature_contact() {
  5943. $description = [
  5944. 'description' => '',
  5945. 'table' => 'feature_contact',
  5946. 'fields' => [
  5947. 'feature_contact_id' => [
  5948. 'size' => 'big',
  5949. 'type' => 'serial',
  5950. 'not null' => TRUE,
  5951. ],
  5952. 'feature_id' => [
  5953. 'size' => 'big',
  5954. 'type' => 'int',
  5955. 'not null' => TRUE,
  5956. ],
  5957. 'contact_id' => [
  5958. 'size' => 'big',
  5959. 'type' => 'int',
  5960. 'not null' => TRUE,
  5961. ],
  5962. ],
  5963. 'unique keys' => [
  5964. 'feature_contact_c1' => [
  5965. 0 => 'feature_id',
  5966. 1 => 'contact_id',
  5967. ],
  5968. ],
  5969. 'indexes' => [
  5970. 'feature_contact_idx1' => [
  5971. 0 => 'feature_id',
  5972. ],
  5973. 'feature_contact_idx2' => [
  5974. 0 => 'contact_id',
  5975. ],
  5976. ],
  5977. 'primary key' => [
  5978. 0 => 'feature_contact_id',
  5979. ],
  5980. 'foreign keys' => [
  5981. 'contact' => [
  5982. 'table' => 'contact',
  5983. 'columns' => [
  5984. 'contact_id' => 'contact_id',
  5985. ],
  5986. ],
  5987. 'feature' => [
  5988. 'table' => 'feature',
  5989. 'columns' => [
  5990. 'feature_id' => 'feature_id',
  5991. ],
  5992. ],
  5993. ],
  5994. 'referring_tables' => [
  5995. ],
  5996. ];
  5997. return $description;
  5998. }
  5999. /**
  6000. * Implements hook_chado_schema_v1_3_feature_cvterm()
  6001. *
  6002. * Purpose: To describe the structure of 'feature_cvterm' to tripal
  6003. *
  6004. * @see chado_insert_record()
  6005. * @see chado_update_record()
  6006. * @see chado_select_record()
  6007. * @see chado_generate_var()
  6008. * @see chado_expan_var()
  6009. *
  6010. * @return
  6011. * An array describing the 'feature_cvterm' table
  6012. *
  6013. * @ingroup tripal_chado_v1.3_schema_api
  6014. *
  6015. */
  6016. function tripal_chado_chado_schema_v1_3_feature_cvterm() {
  6017. $description = [
  6018. 'description' => '',
  6019. 'table' => 'feature_cvterm',
  6020. 'fields' => [
  6021. 'feature_cvterm_id' => [
  6022. 'size' => 'big',
  6023. 'type' => 'serial',
  6024. 'not null' => TRUE,
  6025. ],
  6026. 'feature_id' => [
  6027. 'size' => 'big',
  6028. 'type' => 'int',
  6029. 'not null' => TRUE,
  6030. ],
  6031. 'cvterm_id' => [
  6032. 'size' => 'big',
  6033. 'type' => 'int',
  6034. 'not null' => TRUE,
  6035. ],
  6036. 'pub_id' => [
  6037. 'size' => 'big',
  6038. 'type' => 'int',
  6039. 'not null' => TRUE,
  6040. ],
  6041. 'is_not' => [
  6042. 'size' => 'normal',
  6043. 'type' => 'boolean',
  6044. 'not null' => TRUE,
  6045. 'default' => FALSE,
  6046. ],
  6047. 'rank' => [
  6048. 'size' => 'normal',
  6049. 'type' => 'int',
  6050. 'not null' => TRUE,
  6051. 'default' => 0,
  6052. ],
  6053. ],
  6054. 'unique keys' => [
  6055. 'feature_cvterm_c1' => [
  6056. 0 => 'feature_id',
  6057. 1 => 'cvterm_id',
  6058. 2 => 'pub_id',
  6059. 3 => 'rank',
  6060. ],
  6061. ],
  6062. 'indexes' => [
  6063. 'feature_cvterm_idx1' => [
  6064. 0 => 'feature_id',
  6065. ],
  6066. 'feature_cvterm_idx2' => [
  6067. 0 => 'cvterm_id',
  6068. ],
  6069. 'feature_cvterm_idx3' => [
  6070. 0 => 'pub_id',
  6071. ],
  6072. ],
  6073. 'primary key' => [
  6074. 0 => 'feature_cvterm_id',
  6075. ],
  6076. 'foreign keys' => [
  6077. 'feature' => [
  6078. 'table' => 'feature',
  6079. 'columns' => [
  6080. 'feature_id' => 'feature_id',
  6081. ],
  6082. ],
  6083. 'cvterm' => [
  6084. 'table' => 'cvterm',
  6085. 'columns' => [
  6086. 'cvterm_id' => 'cvterm_id',
  6087. ],
  6088. ],
  6089. 'pub' => [
  6090. 'table' => 'pub',
  6091. 'columns' => [
  6092. 'pub_id' => 'pub_id',
  6093. ],
  6094. ],
  6095. ],
  6096. 'referring_tables' => [
  6097. 0 => 'feature_cvterm_dbxref',
  6098. 1 => 'feature_cvtermprop',
  6099. 2 => 'feature_cvterm_pub',
  6100. ],
  6101. ];
  6102. return $description;
  6103. }
  6104. /**
  6105. * Implements hook_chado_schema_v1_3_feature_cvterm_dbxref()
  6106. *
  6107. * Purpose: To describe the structure of 'feature_cvterm_dbxref' to tripal
  6108. *
  6109. * @see chado_insert_record()
  6110. * @see chado_update_record()
  6111. * @see chado_select_record()
  6112. * @see chado_generate_var()
  6113. * @see chado_expan_var()
  6114. *
  6115. * @return
  6116. * An array describing the 'feature_cvterm_dbxref' table
  6117. *
  6118. * @ingroup tripal_chado_v1.3_schema_api
  6119. *
  6120. */
  6121. function tripal_chado_chado_schema_v1_3_feature_cvterm_dbxref() {
  6122. $description = [
  6123. 'description' => '',
  6124. 'table' => 'feature_cvterm_dbxref',
  6125. 'fields' => [
  6126. 'feature_cvterm_dbxref_id' => [
  6127. 'size' => 'big',
  6128. 'type' => 'serial',
  6129. 'not null' => TRUE,
  6130. ],
  6131. 'feature_cvterm_id' => [
  6132. 'size' => 'big',
  6133. 'type' => 'int',
  6134. 'not null' => TRUE,
  6135. ],
  6136. 'dbxref_id' => [
  6137. 'size' => 'big',
  6138. 'type' => 'int',
  6139. 'not null' => TRUE,
  6140. ],
  6141. ],
  6142. 'unique keys' => [
  6143. 'feature_cvterm_dbxref_c1' => [
  6144. 0 => 'feature_cvterm_id',
  6145. 1 => 'dbxref_id',
  6146. ],
  6147. ],
  6148. 'indexes' => [
  6149. 'feature_cvterm_dbxref_idx1' => [
  6150. 0 => 'feature_cvterm_id',
  6151. ],
  6152. 'feature_cvterm_dbxref_idx2' => [
  6153. 0 => 'dbxref_id',
  6154. ],
  6155. ],
  6156. 'primary key' => [
  6157. 0 => 'feature_cvterm_dbxref_id',
  6158. ],
  6159. 'foreign keys' => [
  6160. 'feature_cvterm' => [
  6161. 'table' => 'feature_cvterm',
  6162. 'columns' => [
  6163. 'feature_cvterm_id' => 'feature_cvterm_id',
  6164. ],
  6165. ],
  6166. 'dbxref' => [
  6167. 'table' => 'dbxref',
  6168. 'columns' => [
  6169. 'dbxref_id' => 'dbxref_id',
  6170. ],
  6171. ],
  6172. ],
  6173. 'referring_tables' => [
  6174. ],
  6175. ];
  6176. return $description;
  6177. }
  6178. /**
  6179. * Implements hook_chado_schema_v1_3_feature_cvtermprop()
  6180. *
  6181. * Purpose: To describe the structure of 'feature_cvtermprop' to tripal
  6182. *
  6183. * @see chado_insert_record()
  6184. * @see chado_update_record()
  6185. * @see chado_select_record()
  6186. * @see chado_generate_var()
  6187. * @see chado_expan_var()
  6188. *
  6189. * @return
  6190. * An array describing the 'feature_cvtermprop' table
  6191. *
  6192. * @ingroup tripal_chado_v1.3_schema_api
  6193. *
  6194. */
  6195. function tripal_chado_chado_schema_v1_3_feature_cvtermprop() {
  6196. $description = [
  6197. 'description' => '',
  6198. 'table' => 'feature_cvtermprop',
  6199. 'fields' => [
  6200. 'feature_cvtermprop_id' => [
  6201. 'size' => 'big',
  6202. 'type' => 'serial',
  6203. 'not null' => TRUE,
  6204. ],
  6205. 'feature_cvterm_id' => [
  6206. 'size' => 'big',
  6207. 'type' => 'int',
  6208. 'not null' => TRUE,
  6209. ],
  6210. 'type_id' => [
  6211. 'size' => 'big',
  6212. 'type' => 'int',
  6213. 'not null' => TRUE,
  6214. ],
  6215. 'value' => [
  6216. 'size' => 'normal',
  6217. 'type' => 'text',
  6218. 'not null' => FALSE,
  6219. ],
  6220. 'rank' => [
  6221. 'size' => 'normal',
  6222. 'type' => 'int',
  6223. 'not null' => TRUE,
  6224. 'default' => 0,
  6225. ],
  6226. ],
  6227. 'unique keys' => [
  6228. 'feature_cvtermprop_c1' => [
  6229. 0 => 'feature_cvterm_id',
  6230. 1 => 'type_id',
  6231. 2 => 'rank',
  6232. ],
  6233. ],
  6234. 'indexes' => [
  6235. 'feature_cvtermprop_idx1' => [
  6236. 0 => 'feature_cvterm_id',
  6237. ],
  6238. 'feature_cvtermprop_idx2' => [
  6239. 0 => 'type_id',
  6240. ],
  6241. ],
  6242. 'primary key' => [
  6243. 0 => 'feature_cvtermprop_id',
  6244. ],
  6245. 'foreign keys' => [
  6246. 'feature_cvterm' => [
  6247. 'table' => 'feature_cvterm',
  6248. 'columns' => [
  6249. 'feature_cvterm_id' => 'feature_cvterm_id',
  6250. ],
  6251. ],
  6252. 'cvterm' => [
  6253. 'table' => 'cvterm',
  6254. 'columns' => [
  6255. 'type_id' => 'cvterm_id',
  6256. ],
  6257. ],
  6258. ],
  6259. 'referring_tables' => [
  6260. ],
  6261. ];
  6262. return $description;
  6263. }
  6264. /**
  6265. * Implements hook_chado_schema_v1_3_feature_cvterm_pub()
  6266. *
  6267. * Purpose: To describe the structure of 'feature_cvterm_pub' to tripal
  6268. *
  6269. * @see chado_insert_record()
  6270. * @see chado_update_record()
  6271. * @see chado_select_record()
  6272. * @see chado_generate_var()
  6273. * @see chado_expan_var()
  6274. *
  6275. * @return
  6276. * An array describing the 'feature_cvterm_pub' table
  6277. *
  6278. * @ingroup tripal_chado_v1.3_schema_api
  6279. *
  6280. */
  6281. function tripal_chado_chado_schema_v1_3_feature_cvterm_pub() {
  6282. $description = [
  6283. 'description' => '',
  6284. 'table' => 'feature_cvterm_pub',
  6285. 'fields' => [
  6286. 'feature_cvterm_pub_id' => [
  6287. 'size' => 'big',
  6288. 'type' => 'serial',
  6289. 'not null' => TRUE,
  6290. ],
  6291. 'feature_cvterm_id' => [
  6292. 'size' => 'big',
  6293. 'type' => 'int',
  6294. 'not null' => TRUE,
  6295. ],
  6296. 'pub_id' => [
  6297. 'size' => 'big',
  6298. 'type' => 'int',
  6299. 'not null' => TRUE,
  6300. ],
  6301. ],
  6302. 'unique keys' => [
  6303. 'feature_cvterm_pub_c1' => [
  6304. 0 => 'feature_cvterm_id',
  6305. 1 => 'pub_id',
  6306. ],
  6307. ],
  6308. 'indexes' => [
  6309. 'feature_cvterm_pub_idx1' => [
  6310. 0 => 'feature_cvterm_id',
  6311. ],
  6312. 'feature_cvterm_pub_idx2' => [
  6313. 0 => 'pub_id',
  6314. ],
  6315. ],
  6316. 'primary key' => [
  6317. 0 => 'feature_cvterm_pub_id',
  6318. ],
  6319. 'foreign keys' => [
  6320. 'feature_cvterm' => [
  6321. 'table' => 'feature_cvterm',
  6322. 'columns' => [
  6323. 'feature_cvterm_id' => 'feature_cvterm_id',
  6324. ],
  6325. ],
  6326. 'pub' => [
  6327. 'table' => 'pub',
  6328. 'columns' => [
  6329. 'pub_id' => 'pub_id',
  6330. ],
  6331. ],
  6332. ],
  6333. 'referring_tables' => [
  6334. ],
  6335. ];
  6336. return $description;
  6337. }
  6338. /**
  6339. * Implements hook_chado_schema_v1_3_feature_dbxref()
  6340. *
  6341. * Purpose: To describe the structure of 'feature_dbxref' to tripal
  6342. *
  6343. * @see chado_insert_record()
  6344. * @see chado_update_record()
  6345. * @see chado_select_record()
  6346. * @see chado_generate_var()
  6347. * @see chado_expan_var()
  6348. *
  6349. * @return
  6350. * An array describing the 'feature_dbxref' table
  6351. *
  6352. * @ingroup tripal_chado_v1.3_schema_api
  6353. *
  6354. */
  6355. function tripal_chado_chado_schema_v1_3_feature_dbxref() {
  6356. $description = [
  6357. 'description' => '',
  6358. 'table' => 'feature_dbxref',
  6359. 'fields' => [
  6360. 'feature_dbxref_id' => [
  6361. 'size' => 'big',
  6362. 'type' => 'serial',
  6363. 'not null' => TRUE,
  6364. ],
  6365. 'feature_id' => [
  6366. 'size' => 'big',
  6367. 'type' => 'int',
  6368. 'not null' => TRUE,
  6369. ],
  6370. 'dbxref_id' => [
  6371. 'size' => 'big',
  6372. 'type' => 'int',
  6373. 'not null' => TRUE,
  6374. ],
  6375. 'is_current' => [
  6376. 'size' => 'normal',
  6377. 'type' => 'boolean',
  6378. 'not null' => TRUE,
  6379. 'default' => 'true',
  6380. ],
  6381. ],
  6382. 'unique keys' => [
  6383. 'feature_dbxref_c1' => [
  6384. 0 => 'feature_id',
  6385. 1 => 'dbxref_id',
  6386. ],
  6387. ],
  6388. 'indexes' => [
  6389. 'feature_dbxref_idx1' => [
  6390. 0 => 'feature_id',
  6391. ],
  6392. 'feature_dbxref_idx2' => [
  6393. 0 => 'dbxref_id',
  6394. ],
  6395. ],
  6396. 'primary key' => [
  6397. 0 => 'feature_dbxref_id',
  6398. ],
  6399. 'foreign keys' => [
  6400. 'feature' => [
  6401. 'table' => 'feature',
  6402. 'columns' => [
  6403. 'feature_id' => 'feature_id',
  6404. ],
  6405. ],
  6406. 'dbxref' => [
  6407. 'table' => 'dbxref',
  6408. 'columns' => [
  6409. 'dbxref_id' => 'dbxref_id',
  6410. ],
  6411. ],
  6412. ],
  6413. 'referring_tables' => [
  6414. ],
  6415. ];
  6416. return $description;
  6417. }
  6418. /**
  6419. * Implements hook_chado_schema_v1_3_feature_expression()
  6420. *
  6421. * Purpose: To describe the structure of 'feature_expression' to tripal
  6422. *
  6423. * @see chado_insert_record()
  6424. * @see chado_update_record()
  6425. * @see chado_select_record()
  6426. * @see chado_generate_var()
  6427. * @see chado_expan_var()
  6428. *
  6429. * @return
  6430. * An array describing the 'feature_expression' table
  6431. *
  6432. * @ingroup tripal_chado_v1.3_schema_api
  6433. *
  6434. */
  6435. function tripal_chado_chado_schema_v1_3_feature_expression() {
  6436. $description = [
  6437. 'description' => '',
  6438. 'table' => 'feature_expression',
  6439. 'fields' => [
  6440. 'feature_expression_id' => [
  6441. 'size' => 'big',
  6442. 'type' => 'serial',
  6443. 'not null' => TRUE,
  6444. ],
  6445. 'expression_id' => [
  6446. 'size' => 'big',
  6447. 'type' => 'int',
  6448. 'not null' => TRUE,
  6449. ],
  6450. 'feature_id' => [
  6451. 'size' => 'big',
  6452. 'type' => 'int',
  6453. 'not null' => TRUE,
  6454. ],
  6455. 'pub_id' => [
  6456. 'size' => 'big',
  6457. 'type' => 'int',
  6458. 'not null' => TRUE,
  6459. ],
  6460. ],
  6461. 'unique keys' => [
  6462. 'feature_expression_c1' => [
  6463. 0 => 'expression_id',
  6464. 1 => 'feature_id',
  6465. 2 => 'pub_id',
  6466. ],
  6467. ],
  6468. 'indexes' => [
  6469. 'feature_expression_idx1' => [
  6470. 0 => 'expression_id',
  6471. ],
  6472. 'feature_expression_idx2' => [
  6473. 0 => 'feature_id',
  6474. ],
  6475. 'feature_expression_idx3' => [
  6476. 0 => 'pub_id',
  6477. ],
  6478. ],
  6479. 'primary key' => [
  6480. 0 => 'feature_expression_id',
  6481. ],
  6482. 'foreign keys' => [
  6483. 'expression' => [
  6484. 'table' => 'expression',
  6485. 'columns' => [
  6486. 'expression_id' => 'expression_id',
  6487. ],
  6488. ],
  6489. 'feature' => [
  6490. 'table' => 'feature',
  6491. 'columns' => [
  6492. 'feature_id' => 'feature_id',
  6493. ],
  6494. ],
  6495. 'pub' => [
  6496. 'table' => 'pub',
  6497. 'columns' => [
  6498. 'pub_id' => 'pub_id',
  6499. ],
  6500. ],
  6501. ],
  6502. 'referring_tables' => [
  6503. 0 => 'feature_expressionprop',
  6504. ],
  6505. ];
  6506. return $description;
  6507. }
  6508. /**
  6509. * Implements hook_chado_schema_v1_3_feature_expressionprop()
  6510. *
  6511. * Purpose: To describe the structure of 'feature_expressionprop' to tripal
  6512. *
  6513. * @see chado_insert_record()
  6514. * @see chado_update_record()
  6515. * @see chado_select_record()
  6516. * @see chado_generate_var()
  6517. * @see chado_expan_var()
  6518. *
  6519. * @return
  6520. * An array describing the 'feature_expressionprop' table
  6521. *
  6522. * @ingroup tripal_chado_v1.3_schema_api
  6523. *
  6524. */
  6525. function tripal_chado_chado_schema_v1_3_feature_expressionprop() {
  6526. $description = [
  6527. 'description' => '',
  6528. 'table' => 'feature_expressionprop',
  6529. 'fields' => [
  6530. 'feature_expressionprop_id' => [
  6531. 'size' => 'big',
  6532. 'type' => 'serial',
  6533. 'not null' => TRUE,
  6534. ],
  6535. 'feature_expression_id' => [
  6536. 'size' => 'big',
  6537. 'type' => 'int',
  6538. 'not null' => TRUE,
  6539. ],
  6540. 'type_id' => [
  6541. 'size' => 'big',
  6542. 'type' => 'int',
  6543. 'not null' => TRUE,
  6544. ],
  6545. 'value' => [
  6546. 'size' => 'normal',
  6547. 'type' => 'text',
  6548. 'not null' => FALSE,
  6549. ],
  6550. 'rank' => [
  6551. 'size' => 'normal',
  6552. 'type' => 'int',
  6553. 'not null' => TRUE,
  6554. 'default' => 0,
  6555. ],
  6556. ],
  6557. 'unique keys' => [
  6558. 'feature_expressionprop_c1' => [
  6559. 0 => 'feature_expression_id',
  6560. 1 => 'type_id',
  6561. 2 => 'rank',
  6562. ],
  6563. ],
  6564. 'indexes' => [
  6565. 'feature_expressionprop_idx1' => [
  6566. 0 => 'feature_expression_id',
  6567. ],
  6568. 'feature_expressionprop_idx2' => [
  6569. 0 => 'type_id',
  6570. ],
  6571. ],
  6572. 'primary key' => [
  6573. 0 => 'feature_expressionprop_id',
  6574. ],
  6575. 'foreign keys' => [
  6576. 'feature_expression' => [
  6577. 'table' => 'feature_expression',
  6578. 'columns' => [
  6579. 'feature_expression_id' => 'feature_expression_id',
  6580. ],
  6581. ],
  6582. 'cvterm' => [
  6583. 'table' => 'cvterm',
  6584. 'columns' => [
  6585. 'type_id' => 'cvterm_id',
  6586. ],
  6587. ],
  6588. ],
  6589. 'referring_tables' => [
  6590. ],
  6591. ];
  6592. return $description;
  6593. }
  6594. /**
  6595. * Implements hook_chado_schema_v1_3_feature_genotype()
  6596. *
  6597. * Purpose: To describe the structure of 'feature_genotype' to tripal
  6598. *
  6599. * @see chado_insert_record()
  6600. * @see chado_update_record()
  6601. * @see chado_select_record()
  6602. * @see chado_generate_var()
  6603. * @see chado_expan_var()
  6604. *
  6605. * @return
  6606. * An array describing the 'feature_genotype' table
  6607. *
  6608. * @ingroup tripal_chado_v1.3_schema_api
  6609. *
  6610. */
  6611. function tripal_chado_chado_schema_v1_3_feature_genotype() {
  6612. $description = [
  6613. 'description' => '',
  6614. 'table' => 'feature_genotype',
  6615. 'fields' => [
  6616. 'feature_genotype_id' => [
  6617. 'size' => 'big',
  6618. 'type' => 'serial',
  6619. 'not null' => TRUE,
  6620. ],
  6621. 'feature_id' => [
  6622. 'size' => 'big',
  6623. 'type' => 'int',
  6624. 'not null' => TRUE,
  6625. ],
  6626. 'genotype_id' => [
  6627. 'size' => 'big',
  6628. 'type' => 'int',
  6629. 'not null' => TRUE,
  6630. ],
  6631. 'chromosome_id' => [
  6632. 'size' => 'big',
  6633. 'type' => 'int',
  6634. 'not null' => FALSE,
  6635. ],
  6636. 'rank' => [
  6637. 'size' => 'normal',
  6638. 'type' => 'int',
  6639. 'not null' => TRUE,
  6640. ],
  6641. 'cgroup' => [
  6642. 'size' => 'normal',
  6643. 'type' => 'int',
  6644. 'not null' => TRUE,
  6645. ],
  6646. 'cvterm_id' => [
  6647. 'size' => 'big',
  6648. 'type' => 'int',
  6649. 'not null' => TRUE,
  6650. ],
  6651. ],
  6652. 'unique keys' => [
  6653. 'feature_genotype_c1' => [
  6654. 0 => 'feature_id',
  6655. 1 => 'genotype_id',
  6656. 2 => 'cvterm_id',
  6657. 3 => 'chromosome_id',
  6658. 4 => 'rank',
  6659. 5 => 'cgroup',
  6660. ],
  6661. ],
  6662. 'indexes' => [
  6663. 'feature_genotype_idx1' => [
  6664. 0 => 'feature_id',
  6665. ],
  6666. 'feature_genotype_idx2' => [
  6667. 0 => 'genotype_id',
  6668. ],
  6669. ],
  6670. 'primary key' => [
  6671. 0 => 'feature_genotype_id',
  6672. ],
  6673. 'foreign keys' => [
  6674. 'feature' => [
  6675. 'table' => 'feature',
  6676. 'columns' => [
  6677. 'feature_id' => 'feature_id',
  6678. 'chromosome_id' => 'feature_id',
  6679. ],
  6680. ],
  6681. 'genotype' => [
  6682. 'table' => 'genotype',
  6683. 'columns' => [
  6684. 'genotype_id' => 'genotype_id',
  6685. ],
  6686. ],
  6687. 'cvterm' => [
  6688. 'table' => 'cvterm',
  6689. 'columns' => [
  6690. 'cvterm_id' => 'cvterm_id',
  6691. ],
  6692. ],
  6693. ],
  6694. 'referring_tables' => [
  6695. ],
  6696. ];
  6697. return $description;
  6698. }
  6699. /**
  6700. * Implements hook_chado_schema_v1_3_featureloc()
  6701. *
  6702. * Purpose: To describe the structure of 'featureloc' to tripal
  6703. *
  6704. * @see chado_insert_record()
  6705. * @see chado_update_record()
  6706. * @see chado_select_record()
  6707. * @see chado_generate_var()
  6708. * @see chado_expan_var()
  6709. *
  6710. * @return
  6711. * An array describing the 'featureloc' table
  6712. *
  6713. * @ingroup tripal_chado_v1.3_schema_api
  6714. *
  6715. */
  6716. function tripal_chado_chado_schema_v1_3_featureloc() {
  6717. $description = [
  6718. 'description' => '',
  6719. 'table' => 'featureloc',
  6720. 'fields' => [
  6721. 'featureloc_id' => [
  6722. 'size' => 'big',
  6723. 'type' => 'serial',
  6724. 'not null' => TRUE,
  6725. ],
  6726. 'feature_id' => [
  6727. 'size' => 'big',
  6728. 'type' => 'int',
  6729. 'not null' => TRUE,
  6730. ],
  6731. 'srcfeature_id' => [
  6732. 'size' => 'big',
  6733. 'type' => 'int',
  6734. 'not null' => FALSE,
  6735. ],
  6736. 'fmin' => [
  6737. 'size' => 'big',
  6738. 'type' => 'int',
  6739. 'not null' => FALSE,
  6740. ],
  6741. 'is_fmin_partial' => [
  6742. 'size' => 'normal',
  6743. 'type' => 'boolean',
  6744. 'not null' => TRUE,
  6745. 'default' => FALSE,
  6746. ],
  6747. 'fmax' => [
  6748. 'size' => 'big',
  6749. 'type' => 'int',
  6750. 'not null' => FALSE,
  6751. ],
  6752. 'is_fmax_partial' => [
  6753. 'size' => 'normal',
  6754. 'type' => 'boolean',
  6755. 'not null' => TRUE,
  6756. 'default' => FALSE,
  6757. ],
  6758. 'strand' => [
  6759. 'size' => 'small',
  6760. 'type' => 'int',
  6761. 'not null' => FALSE,
  6762. ],
  6763. 'phase' => [
  6764. 'size' => 'normal',
  6765. 'type' => 'int',
  6766. 'not null' => FALSE,
  6767. ],
  6768. 'residue_info' => [
  6769. 'size' => 'normal',
  6770. 'type' => 'text',
  6771. 'not null' => FALSE,
  6772. ],
  6773. 'locgroup' => [
  6774. 'size' => 'normal',
  6775. 'type' => 'int',
  6776. 'not null' => TRUE,
  6777. 'default' => 0,
  6778. ],
  6779. 'rank' => [
  6780. 'size' => 'normal',
  6781. 'type' => 'int',
  6782. 'not null' => TRUE,
  6783. 'default' => 0,
  6784. ],
  6785. ],
  6786. 'indexes' => [
  6787. 'binloc_boxrange' => [
  6788. 0 => 'fmin',
  6789. ],
  6790. 'binloc_boxrange_src' => [
  6791. 0 => 'srcfeature_id',
  6792. 1 => 'fmin',
  6793. ],
  6794. 'featureloc_idx1' => [
  6795. 0 => 'feature_id',
  6796. ],
  6797. 'featureloc_idx1b' => [
  6798. 0 => 'feature_id',
  6799. 1 => 'fmin',
  6800. 2 => 'fmax',
  6801. ],
  6802. 'featureloc_idx2' => [
  6803. 0 => 'srcfeature_id',
  6804. ],
  6805. 'featureloc_idx3' => [
  6806. 0 => 'srcfeature_id',
  6807. 1 => 'fmin',
  6808. 2 => 'fmax',
  6809. ],
  6810. ],
  6811. 'unique keys' => [
  6812. 'featureloc_c1' => [
  6813. 0 => 'feature_id',
  6814. 1 => 'locgroup',
  6815. 2 => 'rank',
  6816. ],
  6817. ],
  6818. 'primary key' => [
  6819. 0 => 'featureloc_id',
  6820. ],
  6821. 'foreign keys' => [
  6822. 'feature' => [
  6823. 'table' => 'feature',
  6824. 'columns' => [
  6825. 'feature_id' => 'feature_id',
  6826. 'srcfeature_id' => 'feature_id',
  6827. ],
  6828. ],
  6829. ],
  6830. 'referring_tables' => [
  6831. 0 => 'featureloc_pub',
  6832. ],
  6833. ];
  6834. return $description;
  6835. }
  6836. /**
  6837. * Implements hook_chado_schema_v1_3_featureloc_pub()
  6838. *
  6839. * Purpose: To describe the structure of 'featureloc_pub' to tripal
  6840. *
  6841. * @see chado_insert_record()
  6842. * @see chado_update_record()
  6843. * @see chado_select_record()
  6844. * @see chado_generate_var()
  6845. * @see chado_expan_var()
  6846. *
  6847. * @return
  6848. * An array describing the 'featureloc_pub' table
  6849. *
  6850. * @ingroup tripal_chado_v1.3_schema_api
  6851. *
  6852. */
  6853. function tripal_chado_chado_schema_v1_3_featureloc_pub() {
  6854. $description = [
  6855. 'description' => '',
  6856. 'table' => 'featureloc_pub',
  6857. 'fields' => [
  6858. 'featureloc_pub_id' => [
  6859. 'size' => 'big',
  6860. 'type' => 'serial',
  6861. 'not null' => TRUE,
  6862. ],
  6863. 'featureloc_id' => [
  6864. 'size' => 'big',
  6865. 'type' => 'int',
  6866. 'not null' => TRUE,
  6867. ],
  6868. 'pub_id' => [
  6869. 'size' => 'big',
  6870. 'type' => 'int',
  6871. 'not null' => TRUE,
  6872. ],
  6873. ],
  6874. 'unique keys' => [
  6875. 'featureloc_pub_c1' => [
  6876. 0 => 'featureloc_id',
  6877. 1 => 'pub_id',
  6878. ],
  6879. ],
  6880. 'indexes' => [
  6881. 'featureloc_pub_idx1' => [
  6882. 0 => 'featureloc_id',
  6883. ],
  6884. 'featureloc_pub_idx2' => [
  6885. 0 => 'pub_id',
  6886. ],
  6887. ],
  6888. 'primary key' => [
  6889. 0 => 'featureloc_pub_id',
  6890. ],
  6891. 'foreign keys' => [
  6892. 'featureloc' => [
  6893. 'table' => 'featureloc',
  6894. 'columns' => [
  6895. 'featureloc_id' => 'featureloc_id',
  6896. ],
  6897. ],
  6898. 'pub' => [
  6899. 'table' => 'pub',
  6900. 'columns' => [
  6901. 'pub_id' => 'pub_id',
  6902. ],
  6903. ],
  6904. ],
  6905. 'referring_tables' => [
  6906. ],
  6907. ];
  6908. return $description;
  6909. }
  6910. /**
  6911. * Implements hook_chado_schema_v1_3_featuremap()
  6912. *
  6913. * Purpose: To describe the structure of 'featuremap' to tripal
  6914. *
  6915. * @see chado_insert_record()
  6916. * @see chado_update_record()
  6917. * @see chado_select_record()
  6918. * @see chado_generate_var()
  6919. * @see chado_expan_var()
  6920. *
  6921. * @return
  6922. * An array describing the 'featuremap' table
  6923. *
  6924. * @ingroup tripal_chado_v1.3_schema_api
  6925. *
  6926. */
  6927. function tripal_chado_chado_schema_v1_3_featuremap() {
  6928. $description = [
  6929. 'description' => '',
  6930. 'table' => 'featuremap',
  6931. 'fields' => [
  6932. 'featuremap_id' => [
  6933. 'size' => 'big',
  6934. 'type' => 'serial',
  6935. 'not null' => TRUE,
  6936. ],
  6937. 'name' => [
  6938. 'size' => 'normal',
  6939. 'type' => 'varchar',
  6940. 'length' => '255',
  6941. 'not null' => FALSE,
  6942. ],
  6943. 'description' => [
  6944. 'size' => 'normal',
  6945. 'type' => 'text',
  6946. 'not null' => FALSE,
  6947. ],
  6948. 'unittype_id' => [
  6949. 'size' => 'big',
  6950. 'type' => 'int',
  6951. 'not null' => FALSE,
  6952. ],
  6953. ],
  6954. 'unique keys' => [
  6955. 'featuremap_c1' => [
  6956. 0 => 'name',
  6957. ],
  6958. ],
  6959. 'primary key' => [
  6960. 0 => 'featuremap_id',
  6961. ],
  6962. 'foreign keys' => [
  6963. 'cvterm' => [
  6964. 'table' => 'cvterm',
  6965. 'columns' => [
  6966. 'unittype_id' => 'cvterm_id',
  6967. ],
  6968. ],
  6969. ],
  6970. 'referring_tables' => [
  6971. 0 => 'featuremap_contact',
  6972. 1 => 'featuremap_dbxref',
  6973. 2 => 'featuremap_organism',
  6974. 3 => 'featuremapprop',
  6975. 4 => 'featuremap_pub',
  6976. 5 => 'featurepos',
  6977. 6 => 'featurerange',
  6978. 7 => 'stock_featuremap',
  6979. ],
  6980. ];
  6981. return $description;
  6982. }
  6983. /**
  6984. * Implements hook_chado_schema_v1_3_featuremap_contact()
  6985. *
  6986. * Purpose: To describe the structure of 'featuremap_contact' to tripal
  6987. *
  6988. * @see chado_insert_record()
  6989. * @see chado_update_record()
  6990. * @see chado_select_record()
  6991. * @see chado_generate_var()
  6992. * @see chado_expan_var()
  6993. *
  6994. * @return
  6995. * An array describing the 'featuremap_contact' table
  6996. *
  6997. * @ingroup tripal_chado_v1.3_schema_api
  6998. *
  6999. */
  7000. function tripal_chado_chado_schema_v1_3_featuremap_contact() {
  7001. $description = [
  7002. 'description' => '',
  7003. 'table' => 'featuremap_contact',
  7004. 'fields' => [
  7005. 'featuremap_contact_id' => [
  7006. 'size' => 'big',
  7007. 'type' => 'serial',
  7008. 'not null' => TRUE,
  7009. ],
  7010. 'featuremap_id' => [
  7011. 'size' => 'big',
  7012. 'type' => 'int',
  7013. 'not null' => TRUE,
  7014. ],
  7015. 'contact_id' => [
  7016. 'size' => 'big',
  7017. 'type' => 'int',
  7018. 'not null' => TRUE,
  7019. ],
  7020. ],
  7021. 'unique keys' => [
  7022. 'featuremap_contact_c1' => [
  7023. 0 => 'featuremap_id',
  7024. 1 => 'contact_id',
  7025. ],
  7026. ],
  7027. 'indexes' => [
  7028. 'featuremap_contact_idx1' => [
  7029. 0 => 'featuremap_id',
  7030. ],
  7031. 'featuremap_contact_idx2' => [
  7032. 0 => 'contact_id',
  7033. ],
  7034. ],
  7035. 'primary key' => [
  7036. 0 => 'featuremap_contact_id',
  7037. ],
  7038. 'foreign keys' => [
  7039. 'contact' => [
  7040. 'table' => 'contact',
  7041. 'columns' => [
  7042. 'contact_id' => 'contact_id',
  7043. ],
  7044. ],
  7045. 'featuremap' => [
  7046. 'table' => 'featuremap',
  7047. 'columns' => [
  7048. 'featuremap_id' => 'featuremap_id',
  7049. ],
  7050. ],
  7051. ],
  7052. 'referring_tables' => [
  7053. ],
  7054. ];
  7055. return $description;
  7056. }
  7057. /**
  7058. * Implements hook_chado_schema_v1_3_featuremap_dbxref()
  7059. *
  7060. * Purpose: To describe the structure of 'featuremap_dbxref' to tripal
  7061. *
  7062. * @see chado_insert_record()
  7063. * @see chado_update_record()
  7064. * @see chado_select_record()
  7065. * @see chado_generate_var()
  7066. * @see chado_expan_var()
  7067. *
  7068. * @return
  7069. * An array describing the 'featuremap_dbxref' table
  7070. *
  7071. * @ingroup tripal_chado_v1.3_schema_api
  7072. *
  7073. */
  7074. function tripal_chado_chado_schema_v1_3_featuremap_dbxref() {
  7075. $description = [
  7076. 'description' => '',
  7077. 'table' => 'featuremap_dbxref',
  7078. 'fields' => [
  7079. 'featuremap_dbxref_id' => [
  7080. 'size' => 'big',
  7081. 'type' => 'serial',
  7082. 'not null' => TRUE,
  7083. ],
  7084. 'featuremap_id' => [
  7085. 'size' => 'big',
  7086. 'type' => 'int',
  7087. 'not null' => TRUE,
  7088. ],
  7089. 'dbxref_id' => [
  7090. 'size' => 'big',
  7091. 'type' => 'int',
  7092. 'not null' => TRUE,
  7093. ],
  7094. 'is_current' => [
  7095. 'size' => 'normal',
  7096. 'type' => 'boolean',
  7097. 'not null' => TRUE,
  7098. 'default' => 'true',
  7099. ],
  7100. ],
  7101. 'unique keys' => [
  7102. /* @todo: this unique constraint is missing from the actual Chado schema.
  7103. * It should be included.
  7104. * 'feature_dbxref_c1' => array(
  7105. * 0 => 'featuremap_id',
  7106. * 1 => 'dbxref_id',
  7107. * ),
  7108. */
  7109. ],
  7110. 'indexes' => [
  7111. 'featuremap_dbxref_idx1' => [
  7112. 0 => 'featuremap_id',
  7113. ],
  7114. 'featuremap_dbxref_idx2' => [
  7115. 0 => 'dbxref_id',
  7116. ],
  7117. ],
  7118. 'primary key' => [
  7119. 0 => 'featuremap_dbxref_id',
  7120. ],
  7121. 'foreign keys' => [
  7122. 'featuremap' => [
  7123. 'table' => 'featuremap',
  7124. 'columns' => [
  7125. 'featuremap_id' => 'featuremap_id',
  7126. ],
  7127. ],
  7128. 'dbxref' => [
  7129. 'table' => 'dbxref',
  7130. 'columns' => [
  7131. 'dbxref_id' => 'dbxref_id',
  7132. ],
  7133. ],
  7134. ],
  7135. 'referring_tables' => [
  7136. ],
  7137. ];
  7138. return $description;
  7139. }
  7140. /**
  7141. * Implements hook_chado_schema_v1_3_featuremap_organism()
  7142. *
  7143. * Purpose: To describe the structure of 'featuremap_organism' to tripal
  7144. *
  7145. * @see chado_insert_record()
  7146. * @see chado_update_record()
  7147. * @see chado_select_record()
  7148. * @see chado_generate_var()
  7149. * @see chado_expan_var()
  7150. *
  7151. * @return
  7152. * An array describing the 'featuremap_organism' table
  7153. *
  7154. * @ingroup tripal_chado_v1.3_schema_api
  7155. *
  7156. */
  7157. function tripal_chado_chado_schema_v1_3_featuremap_organism() {
  7158. $description = [
  7159. 'description' => '',
  7160. 'table' => 'featuremap_organism',
  7161. 'fields' => [
  7162. 'featuremap_organism_id' => [
  7163. 'size' => 'big',
  7164. 'type' => 'serial',
  7165. 'not null' => TRUE,
  7166. ],
  7167. 'featuremap_id' => [
  7168. 'size' => 'big',
  7169. 'type' => 'int',
  7170. 'not null' => TRUE,
  7171. ],
  7172. 'organism_id' => [
  7173. 'size' => 'big',
  7174. 'type' => 'int',
  7175. 'not null' => TRUE,
  7176. ],
  7177. ],
  7178. 'unique keys' => [
  7179. 'featuremap_organism_c1' => [
  7180. 0 => 'featuremap_id',
  7181. 1 => 'organism_id',
  7182. ],
  7183. ],
  7184. 'indexes' => [
  7185. 'featuremap_organism_idx1' => [
  7186. 0 => 'featuremap_id',
  7187. ],
  7188. 'featuremap_organism_idx2' => [
  7189. 0 => 'organism_id',
  7190. ],
  7191. ],
  7192. 'primary key' => [
  7193. 0 => 'featuremap_organism_id',
  7194. ],
  7195. 'foreign keys' => [
  7196. 'featuremap' => [
  7197. 'table' => 'featuremap',
  7198. 'columns' => [
  7199. 'featuremap_id' => 'featuremap_id',
  7200. ],
  7201. ],
  7202. 'organism' => [
  7203. 'table' => 'organism',
  7204. 'columns' => [
  7205. 'organism_id' => 'organism_id',
  7206. ],
  7207. ],
  7208. ],
  7209. 'referring_tables' => [
  7210. ],
  7211. ];
  7212. return $description;
  7213. }
  7214. /**
  7215. * Implements hook_chado_schema_v1_3_featuremapprop()
  7216. *
  7217. * Purpose: To describe the structure of 'featuremapprop' to tripal
  7218. *
  7219. * @see chado_insert_record()
  7220. * @see chado_update_record()
  7221. * @see chado_select_record()
  7222. * @see chado_generate_var()
  7223. * @see chado_expan_var()
  7224. *
  7225. * @return
  7226. * An array describing the 'featuremapprop' table
  7227. *
  7228. * @ingroup tripal_chado_v1.3_schema_api
  7229. *
  7230. */
  7231. function tripal_chado_chado_schema_v1_3_featuremapprop() {
  7232. $description = [
  7233. 'description' => '',
  7234. 'table' => 'featuremapprop',
  7235. 'fields' => [
  7236. 'featuremapprop_id' => [
  7237. 'size' => 'big',
  7238. 'type' => 'serial',
  7239. 'not null' => TRUE,
  7240. ],
  7241. 'featuremap_id' => [
  7242. 'size' => 'big',
  7243. 'type' => 'int',
  7244. 'not null' => TRUE,
  7245. ],
  7246. 'type_id' => [
  7247. 'size' => 'big',
  7248. 'type' => 'int',
  7249. 'not null' => TRUE,
  7250. ],
  7251. 'value' => [
  7252. 'size' => 'normal',
  7253. 'type' => 'text',
  7254. 'not null' => FALSE,
  7255. ],
  7256. 'rank' => [
  7257. 'size' => 'normal',
  7258. 'type' => 'int',
  7259. 'not null' => TRUE,
  7260. 'default' => 0,
  7261. ],
  7262. ],
  7263. 'unique keys' => [
  7264. 'featuremapprop_c1' => [
  7265. 0 => 'featuremap_id',
  7266. 1 => 'type_id',
  7267. 2 => 'rank',
  7268. ],
  7269. ],
  7270. 'indexes' => [
  7271. 'featuremapprop_idx1' => [
  7272. 0 => 'featuremap_id',
  7273. ],
  7274. 'featuremapprop_idx2' => [
  7275. 0 => 'type_id',
  7276. ],
  7277. ],
  7278. 'primary key' => [
  7279. 0 => 'featuremapprop_id',
  7280. ],
  7281. 'foreign keys' => [
  7282. 'featuremap' => [
  7283. 'table' => 'featuremap',
  7284. 'columns' => [
  7285. 'featuremap_id' => 'featuremap_id',
  7286. ],
  7287. ],
  7288. 'cvterm' => [
  7289. 'table' => 'cvterm',
  7290. 'columns' => [
  7291. 'type_id' => 'cvterm_id',
  7292. ],
  7293. ],
  7294. ],
  7295. 'referring_tables' => [
  7296. ],
  7297. ];
  7298. return $description;
  7299. }
  7300. /**
  7301. * Implements hook_chado_schema_v1_3_featuremap_pub()
  7302. *
  7303. * Purpose: To describe the structure of 'featuremap_pub' to tripal
  7304. *
  7305. * @see chado_insert_record()
  7306. * @see chado_update_record()
  7307. * @see chado_select_record()
  7308. * @see chado_generate_var()
  7309. * @see chado_expan_var()
  7310. *
  7311. * @return
  7312. * An array describing the 'featuremap_pub' table
  7313. *
  7314. * @ingroup tripal_chado_v1.3_schema_api
  7315. *
  7316. */
  7317. function tripal_chado_chado_schema_v1_3_featuremap_pub() {
  7318. $description = [
  7319. 'description' => '',
  7320. 'table' => 'featuremap_pub',
  7321. 'fields' => [
  7322. 'featuremap_pub_id' => [
  7323. 'size' => 'big',
  7324. 'type' => 'serial',
  7325. 'not null' => TRUE,
  7326. ],
  7327. 'featuremap_id' => [
  7328. 'size' => 'big',
  7329. 'type' => 'int',
  7330. 'not null' => TRUE,
  7331. ],
  7332. 'pub_id' => [
  7333. 'size' => 'big',
  7334. 'type' => 'int',
  7335. 'not null' => TRUE,
  7336. ],
  7337. ],
  7338. 'unique keys' => [
  7339. /* @todo: this unique constraint is missing from the actual Chado schema.
  7340. * It should be included.
  7341. * 'feature_pub_c1' => array(
  7342. * 0 => 'featuremap_id',
  7343. * 1 => 'pub_id',
  7344. * ),
  7345. */
  7346. ],
  7347. 'indexes' => [
  7348. 'featuremap_pub_idx1' => [
  7349. 0 => 'featuremap_id',
  7350. ],
  7351. 'featuremap_pub_idx2' => [
  7352. 0 => 'pub_id',
  7353. ],
  7354. ],
  7355. 'primary key' => [
  7356. 0 => 'featuremap_pub_id',
  7357. ],
  7358. 'foreign keys' => [
  7359. 'featuremap' => [
  7360. 'table' => 'featuremap',
  7361. 'columns' => [
  7362. 'featuremap_id' => 'featuremap_id',
  7363. ],
  7364. ],
  7365. 'pub' => [
  7366. 'table' => 'pub',
  7367. 'columns' => [
  7368. 'pub_id' => 'pub_id',
  7369. ],
  7370. ],
  7371. ],
  7372. 'referring_tables' => [
  7373. ],
  7374. ];
  7375. return $description;
  7376. }
  7377. /**
  7378. * Implements hook_chado_schema_v1_3_feature_phenotype()
  7379. *
  7380. * Purpose: To describe the structure of 'feature_phenotype' to tripal
  7381. *
  7382. * @see chado_insert_record()
  7383. * @see chado_update_record()
  7384. * @see chado_select_record()
  7385. * @see chado_generate_var()
  7386. * @see chado_expan_var()
  7387. *
  7388. * @return
  7389. * An array describing the 'feature_phenotype' table
  7390. *
  7391. * @ingroup tripal_chado_v1.3_schema_api
  7392. *
  7393. */
  7394. function tripal_chado_chado_schema_v1_3_feature_phenotype() {
  7395. $description = [
  7396. 'description' => '',
  7397. 'table' => 'feature_phenotype',
  7398. 'fields' => [
  7399. 'feature_phenotype_id' => [
  7400. 'size' => 'big',
  7401. 'type' => 'serial',
  7402. 'not null' => TRUE,
  7403. ],
  7404. 'feature_id' => [
  7405. 'size' => 'big',
  7406. 'type' => 'int',
  7407. 'not null' => TRUE,
  7408. ],
  7409. 'phenotype_id' => [
  7410. 'size' => 'big',
  7411. 'type' => 'int',
  7412. 'not null' => TRUE,
  7413. ],
  7414. ],
  7415. 'unique keys' => [
  7416. 'feature_phenotype_c1' => [
  7417. 0 => 'feature_id',
  7418. 1 => 'phenotype_id',
  7419. ],
  7420. ],
  7421. 'indexes' => [
  7422. 'feature_phenotype_idx1' => [
  7423. 0 => 'feature_id',
  7424. ],
  7425. 'feature_phenotype_idx2' => [
  7426. 0 => 'phenotype_id',
  7427. ],
  7428. ],
  7429. 'primary key' => [
  7430. 0 => 'feature_phenotype_id',
  7431. ],
  7432. 'foreign keys' => [
  7433. 'feature' => [
  7434. 'table' => 'feature',
  7435. 'columns' => [
  7436. 'feature_id' => 'feature_id',
  7437. ],
  7438. ],
  7439. 'phenotype' => [
  7440. 'table' => 'phenotype',
  7441. 'columns' => [
  7442. 'phenotype_id' => 'phenotype_id',
  7443. ],
  7444. ],
  7445. ],
  7446. 'referring_tables' => [
  7447. ],
  7448. ];
  7449. return $description;
  7450. }
  7451. /**
  7452. * Implements hook_chado_schema_v1_3_featurepos()
  7453. *
  7454. * Purpose: To describe the structure of 'featurepos' to tripal
  7455. *
  7456. * @see chado_insert_record()
  7457. * @see chado_update_record()
  7458. * @see chado_select_record()
  7459. * @see chado_generate_var()
  7460. * @see chado_expan_var()
  7461. *
  7462. * @return
  7463. * An array describing the 'featurepos' table
  7464. *
  7465. * @ingroup tripal_chado_v1.3_schema_api
  7466. *
  7467. */
  7468. function tripal_chado_chado_schema_v1_3_featurepos() {
  7469. $description = [
  7470. 'description' => '',
  7471. 'table' => 'featurepos',
  7472. 'fields' => [
  7473. 'featurepos_id' => [
  7474. 'size' => 'big',
  7475. 'type' => 'serial',
  7476. 'not null' => TRUE,
  7477. ],
  7478. 'featuremap_id' => [
  7479. 'size' => 'big',
  7480. 'type' => 'int',
  7481. 'not null' => TRUE,
  7482. ],
  7483. 'feature_id' => [
  7484. 'size' => 'big',
  7485. 'type' => 'int',
  7486. 'not null' => TRUE,
  7487. ],
  7488. 'map_feature_id' => [
  7489. 'size' => 'big',
  7490. 'type' => 'int',
  7491. 'not null' => TRUE,
  7492. ],
  7493. 'mappos' => [
  7494. 'size' => 'big',
  7495. 'type' => 'float',
  7496. 'not null' => TRUE,
  7497. ],
  7498. ],
  7499. 'indexes' => [
  7500. 'featurepos_idx1' => [
  7501. 0 => 'featuremap_id',
  7502. ],
  7503. 'featurepos_idx2' => [
  7504. 0 => 'feature_id',
  7505. ],
  7506. 'featurepos_idx3' => [
  7507. 0 => 'map_feature_id',
  7508. ],
  7509. ],
  7510. 'primary key' => [
  7511. 0 => 'featurepos_id',
  7512. ],
  7513. 'foreign keys' => [
  7514. 'featuremap' => [
  7515. 'table' => 'featuremap',
  7516. 'columns' => [
  7517. 'featuremap_id' => 'featuremap_id',
  7518. ],
  7519. ],
  7520. 'feature' => [
  7521. 'table' => 'feature',
  7522. 'columns' => [
  7523. 'feature_id' => 'feature_id',
  7524. 'map_feature_id' => 'feature_id',
  7525. ],
  7526. ],
  7527. ],
  7528. 'referring_tables' => [
  7529. 0 => 'featureposprop',
  7530. ],
  7531. ];
  7532. return $description;
  7533. }
  7534. /**
  7535. * Implements hook_chado_schema_v1_3_featureposprop()
  7536. *
  7537. * Purpose: To describe the structure of 'featureposprop' to tripal
  7538. *
  7539. * @see chado_insert_record()
  7540. * @see chado_update_record()
  7541. * @see chado_select_record()
  7542. * @see chado_generate_var()
  7543. * @see chado_expan_var()
  7544. *
  7545. * @return
  7546. * An array describing the 'featureposprop' table
  7547. *
  7548. * @ingroup tripal_chado_v1.3_schema_api
  7549. *
  7550. */
  7551. function tripal_chado_chado_schema_v1_3_featureposprop() {
  7552. $description = [
  7553. 'description' => '',
  7554. 'table' => 'featureposprop',
  7555. 'fields' => [
  7556. 'featureposprop_id' => [
  7557. 'size' => 'big',
  7558. 'type' => 'serial',
  7559. 'not null' => TRUE,
  7560. ],
  7561. 'featurepos_id' => [
  7562. 'size' => 'big',
  7563. 'type' => 'int',
  7564. 'not null' => TRUE,
  7565. ],
  7566. 'type_id' => [
  7567. 'size' => 'big',
  7568. 'type' => 'int',
  7569. 'not null' => TRUE,
  7570. ],
  7571. 'value' => [
  7572. 'size' => 'normal',
  7573. 'type' => 'text',
  7574. 'not null' => FALSE,
  7575. ],
  7576. 'rank' => [
  7577. 'size' => 'normal',
  7578. 'type' => 'int',
  7579. 'not null' => TRUE,
  7580. 'default' => 0,
  7581. ],
  7582. ],
  7583. 'unique keys' => [
  7584. 'featureposprop_c1' => [
  7585. 0 => 'featurepos_id',
  7586. 1 => 'type_id',
  7587. 2 => 'rank',
  7588. ],
  7589. ],
  7590. 'indexes' => [
  7591. 'featureposprop_idx1' => [
  7592. 0 => 'featurepos_id',
  7593. ],
  7594. 'featureposprop_idx2' => [
  7595. 0 => 'type_id',
  7596. ],
  7597. ],
  7598. 'primary key' => [
  7599. 0 => 'featureposprop_id',
  7600. ],
  7601. 'foreign keys' => [
  7602. 'featurepos' => [
  7603. 'table' => 'featurepos',
  7604. 'columns' => [
  7605. 'featurepos_id' => 'featurepos_id',
  7606. ],
  7607. ],
  7608. 'cvterm' => [
  7609. 'table' => 'cvterm',
  7610. 'columns' => [
  7611. 'type_id' => 'cvterm_id',
  7612. ],
  7613. ],
  7614. ],
  7615. 'referring_tables' => [
  7616. ],
  7617. ];
  7618. return $description;
  7619. }
  7620. /**
  7621. * Implements hook_chado_schema_v1_3_featureprop()
  7622. *
  7623. * Purpose: To describe the structure of 'featureprop' to tripal
  7624. *
  7625. * @see chado_insert_record()
  7626. * @see chado_update_record()
  7627. * @see chado_select_record()
  7628. * @see chado_generate_var()
  7629. * @see chado_expan_var()
  7630. *
  7631. * @return
  7632. * An array describing the 'featureprop' table
  7633. *
  7634. * @ingroup tripal_chado_v1.3_schema_api
  7635. *
  7636. */
  7637. function tripal_chado_chado_schema_v1_3_featureprop() {
  7638. $description = [
  7639. 'description' => '',
  7640. 'table' => 'featureprop',
  7641. 'fields' => [
  7642. 'featureprop_id' => [
  7643. 'size' => 'big',
  7644. 'type' => 'serial',
  7645. 'not null' => TRUE,
  7646. ],
  7647. 'feature_id' => [
  7648. 'size' => 'big',
  7649. 'type' => 'int',
  7650. 'not null' => TRUE,
  7651. ],
  7652. 'type_id' => [
  7653. 'size' => 'big',
  7654. 'type' => 'int',
  7655. 'not null' => TRUE,
  7656. ],
  7657. 'value' => [
  7658. 'size' => 'normal',
  7659. 'type' => 'text',
  7660. 'not null' => FALSE,
  7661. ],
  7662. 'rank' => [
  7663. 'size' => 'normal',
  7664. 'type' => 'int',
  7665. 'not null' => TRUE,
  7666. 'default' => 0,
  7667. ],
  7668. ],
  7669. 'unique keys' => [
  7670. 'featureprop_c1' => [
  7671. 0 => 'feature_id',
  7672. 1 => 'type_id',
  7673. 2 => 'rank',
  7674. ],
  7675. ],
  7676. 'indexes' => [
  7677. 'featureprop_idx1' => [
  7678. 0 => 'feature_id',
  7679. ],
  7680. 'featureprop_idx2' => [
  7681. 0 => 'type_id',
  7682. ],
  7683. ],
  7684. 'primary key' => [
  7685. 0 => 'featureprop_id',
  7686. ],
  7687. 'foreign keys' => [
  7688. 'feature' => [
  7689. 'table' => 'feature',
  7690. 'columns' => [
  7691. 'feature_id' => 'feature_id',
  7692. ],
  7693. ],
  7694. 'cvterm' => [
  7695. 'table' => 'cvterm',
  7696. 'columns' => [
  7697. 'type_id' => 'cvterm_id',
  7698. ],
  7699. ],
  7700. ],
  7701. 'referring_tables' => [
  7702. 0 => 'featureprop_pub',
  7703. ],
  7704. ];
  7705. return $description;
  7706. }
  7707. /**
  7708. * Implements hook_chado_schema_v1_3_featureprop_pub()
  7709. *
  7710. * Purpose: To describe the structure of 'featureprop_pub' to tripal
  7711. *
  7712. * @see chado_insert_record()
  7713. * @see chado_update_record()
  7714. * @see chado_select_record()
  7715. * @see chado_generate_var()
  7716. * @see chado_expan_var()
  7717. *
  7718. * @return
  7719. * An array describing the 'featureprop_pub' table
  7720. *
  7721. * @ingroup tripal_chado_v1.3_schema_api
  7722. *
  7723. */
  7724. function tripal_chado_chado_schema_v1_3_featureprop_pub() {
  7725. $description = [
  7726. 'description' => '',
  7727. 'table' => 'featureprop_pub',
  7728. 'fields' => [
  7729. 'featureprop_pub_id' => [
  7730. 'size' => 'big',
  7731. 'type' => 'serial',
  7732. 'not null' => TRUE,
  7733. ],
  7734. 'featureprop_id' => [
  7735. 'size' => 'big',
  7736. 'type' => 'int',
  7737. 'not null' => TRUE,
  7738. ],
  7739. 'pub_id' => [
  7740. 'size' => 'big',
  7741. 'type' => 'int',
  7742. 'not null' => TRUE,
  7743. ],
  7744. ],
  7745. 'unique keys' => [
  7746. 'featureprop_pub_c1' => [
  7747. 0 => 'featureprop_id',
  7748. 1 => 'pub_id',
  7749. ],
  7750. ],
  7751. 'indexes' => [
  7752. 'featureprop_pub_idx1' => [
  7753. 0 => 'featureprop_id',
  7754. ],
  7755. 'featureprop_pub_idx2' => [
  7756. 0 => 'pub_id',
  7757. ],
  7758. ],
  7759. 'primary key' => [
  7760. 0 => 'featureprop_pub_id',
  7761. ],
  7762. 'foreign keys' => [
  7763. 'featureprop' => [
  7764. 'table' => 'featureprop',
  7765. 'columns' => [
  7766. 'featureprop_id' => 'featureprop_id',
  7767. ],
  7768. ],
  7769. 'pub' => [
  7770. 'table' => 'pub',
  7771. 'columns' => [
  7772. 'pub_id' => 'pub_id',
  7773. ],
  7774. ],
  7775. ],
  7776. 'referring_tables' => [
  7777. ],
  7778. ];
  7779. return $description;
  7780. }
  7781. /**
  7782. * Implements hook_chado_schema_v1_3_feature_pub()
  7783. *
  7784. * Purpose: To describe the structure of 'feature_pub' to tripal
  7785. *
  7786. * @see chado_insert_record()
  7787. * @see chado_update_record()
  7788. * @see chado_select_record()
  7789. * @see chado_generate_var()
  7790. * @see chado_expan_var()
  7791. *
  7792. * @return
  7793. * An array describing the 'feature_pub' table
  7794. *
  7795. * @ingroup tripal_chado_v1.3_schema_api
  7796. *
  7797. */
  7798. function tripal_chado_chado_schema_v1_3_feature_pub() {
  7799. $description = [
  7800. 'description' => '',
  7801. 'table' => 'feature_pub',
  7802. 'fields' => [
  7803. 'feature_pub_id' => [
  7804. 'size' => 'big',
  7805. 'type' => 'serial',
  7806. 'not null' => TRUE,
  7807. ],
  7808. 'feature_id' => [
  7809. 'size' => 'big',
  7810. 'type' => 'int',
  7811. 'not null' => TRUE,
  7812. ],
  7813. 'pub_id' => [
  7814. 'size' => 'big',
  7815. 'type' => 'int',
  7816. 'not null' => TRUE,
  7817. ],
  7818. ],
  7819. 'unique keys' => [
  7820. 'feature_pub_c1' => [
  7821. 0 => 'feature_id',
  7822. 1 => 'pub_id',
  7823. ],
  7824. ],
  7825. 'indexes' => [
  7826. 'feature_pub_idx1' => [
  7827. 0 => 'feature_id',
  7828. ],
  7829. 'feature_pub_idx2' => [
  7830. 0 => 'pub_id',
  7831. ],
  7832. ],
  7833. 'primary key' => [
  7834. 0 => 'feature_pub_id',
  7835. ],
  7836. 'foreign keys' => [
  7837. 'feature' => [
  7838. 'table' => 'feature',
  7839. 'columns' => [
  7840. 'feature_id' => 'feature_id',
  7841. ],
  7842. ],
  7843. 'pub' => [
  7844. 'table' => 'pub',
  7845. 'columns' => [
  7846. 'pub_id' => 'pub_id',
  7847. ],
  7848. ],
  7849. ],
  7850. 'referring_tables' => [
  7851. 0 => 'feature_pubprop',
  7852. ],
  7853. ];
  7854. return $description;
  7855. }
  7856. /**
  7857. * Implements hook_chado_schema_v1_3_feature_pubprop()
  7858. *
  7859. * Purpose: To describe the structure of 'feature_pubprop' to tripal
  7860. *
  7861. * @see chado_insert_record()
  7862. * @see chado_update_record()
  7863. * @see chado_select_record()
  7864. * @see chado_generate_var()
  7865. * @see chado_expan_var()
  7866. *
  7867. * @return
  7868. * An array describing the 'feature_pubprop' table
  7869. *
  7870. * @ingroup tripal_chado_v1.3_schema_api
  7871. *
  7872. */
  7873. function tripal_chado_chado_schema_v1_3_feature_pubprop() {
  7874. $description = [
  7875. 'description' => '',
  7876. 'table' => 'feature_pubprop',
  7877. 'fields' => [
  7878. 'feature_pubprop_id' => [
  7879. 'size' => 'big',
  7880. 'type' => 'serial',
  7881. 'not null' => TRUE,
  7882. ],
  7883. 'feature_pub_id' => [
  7884. 'size' => 'big',
  7885. 'type' => 'int',
  7886. 'not null' => TRUE,
  7887. ],
  7888. 'type_id' => [
  7889. 'size' => 'big',
  7890. 'type' => 'int',
  7891. 'not null' => TRUE,
  7892. ],
  7893. 'value' => [
  7894. 'size' => 'normal',
  7895. 'type' => 'text',
  7896. 'not null' => FALSE,
  7897. ],
  7898. 'rank' => [
  7899. 'size' => 'normal',
  7900. 'type' => 'int',
  7901. 'not null' => TRUE,
  7902. 'default' => 0,
  7903. ],
  7904. ],
  7905. 'unique keys' => [
  7906. 'feature_pubprop_c1' => [
  7907. 0 => 'feature_pub_id',
  7908. 1 => 'type_id',
  7909. 2 => 'rank',
  7910. ],
  7911. ],
  7912. 'indexes' => [
  7913. 'feature_pubprop_idx1' => [
  7914. 0 => 'feature_pub_id',
  7915. ],
  7916. ],
  7917. 'primary key' => [
  7918. 0 => 'feature_pubprop_id',
  7919. ],
  7920. 'foreign keys' => [
  7921. 'feature_pub' => [
  7922. 'table' => 'feature_pub',
  7923. 'columns' => [
  7924. 'feature_pub_id' => 'feature_pub_id',
  7925. ],
  7926. ],
  7927. 'cvterm' => [
  7928. 'table' => 'cvterm',
  7929. 'columns' => [
  7930. 'type_id' => 'cvterm_id',
  7931. ],
  7932. ],
  7933. ],
  7934. 'referring_tables' => [
  7935. ],
  7936. ];
  7937. return $description;
  7938. }
  7939. /**
  7940. * Implements hook_chado_schema_v1_3_featurerange()
  7941. *
  7942. * Purpose: To describe the structure of 'featurerange' to tripal
  7943. *
  7944. * @see chado_insert_record()
  7945. * @see chado_update_record()
  7946. * @see chado_select_record()
  7947. * @see chado_generate_var()
  7948. * @see chado_expan_var()
  7949. *
  7950. * @return
  7951. * An array describing the 'featurerange' table
  7952. *
  7953. * @ingroup tripal_chado_v1.3_schema_api
  7954. *
  7955. */
  7956. function tripal_chado_chado_schema_v1_3_featurerange() {
  7957. $description = [
  7958. 'description' => '',
  7959. 'table' => 'featurerange',
  7960. 'fields' => [
  7961. 'featurerange_id' => [
  7962. 'size' => 'big',
  7963. 'type' => 'serial',
  7964. 'not null' => TRUE,
  7965. ],
  7966. 'featuremap_id' => [
  7967. 'size' => 'big',
  7968. 'type' => 'int',
  7969. 'not null' => TRUE,
  7970. ],
  7971. 'feature_id' => [
  7972. 'size' => 'big',
  7973. 'type' => 'int',
  7974. 'not null' => TRUE,
  7975. ],
  7976. 'leftstartf_id' => [
  7977. 'size' => 'big',
  7978. 'type' => 'int',
  7979. 'not null' => TRUE,
  7980. ],
  7981. 'leftendf_id' => [
  7982. 'size' => 'big',
  7983. 'type' => 'int',
  7984. 'not null' => FALSE,
  7985. ],
  7986. 'rightstartf_id' => [
  7987. 'size' => 'big',
  7988. 'type' => 'int',
  7989. 'not null' => FALSE,
  7990. ],
  7991. 'rightendf_id' => [
  7992. 'size' => 'big',
  7993. 'type' => 'int',
  7994. 'not null' => TRUE,
  7995. ],
  7996. 'rangestr' => [
  7997. 'size' => 'normal',
  7998. 'type' => 'varchar',
  7999. 'length' => '255',
  8000. 'not null' => FALSE,
  8001. ],
  8002. ],
  8003. 'indexes' => [
  8004. 'featurerange_idx1' => [
  8005. 0 => 'featuremap_id',
  8006. ],
  8007. 'featurerange_idx2' => [
  8008. 0 => 'feature_id',
  8009. ],
  8010. 'featurerange_idx3' => [
  8011. 0 => 'leftstartf_id',
  8012. ],
  8013. 'featurerange_idx4' => [
  8014. 0 => 'leftendf_id',
  8015. ],
  8016. 'featurerange_idx5' => [
  8017. 0 => 'rightstartf_id',
  8018. ],
  8019. 'featurerange_idx6' => [
  8020. 0 => 'rightendf_id',
  8021. ],
  8022. ],
  8023. 'primary key' => [
  8024. 0 => 'featurerange_id',
  8025. ],
  8026. 'foreign keys' => [
  8027. 'featuremap' => [
  8028. 'table' => 'featuremap',
  8029. 'columns' => [
  8030. 'featuremap_id' => 'featuremap_id',
  8031. ],
  8032. ],
  8033. 'feature' => [
  8034. 'table' => 'feature',
  8035. 'columns' => [
  8036. 'feature_id' => 'feature_id',
  8037. 'leftstartf_id' => 'feature_id',
  8038. 'leftendf_id' => 'feature_id',
  8039. 'rightstartf_id' => 'feature_id',
  8040. 'rightendf_id' => 'feature_id',
  8041. ],
  8042. ],
  8043. ],
  8044. 'referring_tables' => [
  8045. ],
  8046. ];
  8047. return $description;
  8048. }
  8049. /**
  8050. * Implements hook_chado_schema_v1_3_feature_relationship()
  8051. *
  8052. * Purpose: To describe the structure of 'feature_relationship' to tripal
  8053. *
  8054. * @see chado_insert_record()
  8055. * @see chado_update_record()
  8056. * @see chado_select_record()
  8057. * @see chado_generate_var()
  8058. * @see chado_expan_var()
  8059. *
  8060. * @return
  8061. * An array describing the 'feature_relationship' table
  8062. *
  8063. * @ingroup tripal_chado_v1.3_schema_api
  8064. *
  8065. */
  8066. function tripal_chado_chado_schema_v1_3_feature_relationship() {
  8067. $description = [
  8068. 'description' => '',
  8069. 'table' => 'feature_relationship',
  8070. 'fields' => [
  8071. 'feature_relationship_id' => [
  8072. 'size' => 'big',
  8073. 'type' => 'serial',
  8074. 'not null' => TRUE,
  8075. ],
  8076. 'subject_id' => [
  8077. 'size' => 'big',
  8078. 'type' => 'int',
  8079. 'not null' => TRUE,
  8080. ],
  8081. 'object_id' => [
  8082. 'size' => 'big',
  8083. 'type' => 'int',
  8084. 'not null' => TRUE,
  8085. ],
  8086. 'type_id' => [
  8087. 'size' => 'big',
  8088. 'type' => 'int',
  8089. 'not null' => TRUE,
  8090. ],
  8091. 'value' => [
  8092. 'size' => 'normal',
  8093. 'type' => 'text',
  8094. 'not null' => FALSE,
  8095. ],
  8096. 'rank' => [
  8097. 'size' => 'normal',
  8098. 'type' => 'int',
  8099. 'not null' => TRUE,
  8100. 'default' => 0,
  8101. ],
  8102. ],
  8103. 'unique keys' => [
  8104. 'feature_relationship_c1' => [
  8105. 0 => 'subject_id',
  8106. 1 => 'object_id',
  8107. 2 => 'type_id',
  8108. 3 => 'rank',
  8109. ],
  8110. ],
  8111. 'indexes' => [
  8112. 'feature_relationship_idx1' => [
  8113. 0 => 'subject_id',
  8114. ],
  8115. 'feature_relationship_idx1b' => [
  8116. 0 => 'object_id',
  8117. 1 => 'subject_id',
  8118. 2 => 'type_id',
  8119. ],
  8120. 'feature_relationship_idx2' => [
  8121. 0 => 'object_id',
  8122. ],
  8123. 'feature_relationship_idx3' => [
  8124. 0 => 'type_id',
  8125. ],
  8126. ],
  8127. 'primary key' => [
  8128. 0 => 'feature_relationship_id',
  8129. ],
  8130. 'foreign keys' => [
  8131. 'feature' => [
  8132. 'table' => 'feature',
  8133. 'columns' => [
  8134. 'subject_id' => 'feature_id',
  8135. 'object_id' => 'feature_id',
  8136. ],
  8137. ],
  8138. 'cvterm' => [
  8139. 'table' => 'cvterm',
  8140. 'columns' => [
  8141. 'type_id' => 'cvterm_id',
  8142. ],
  8143. ],
  8144. ],
  8145. 'referring_tables' => [
  8146. 0 => 'feature_relationshipprop',
  8147. 1 => 'feature_relationship_pub',
  8148. ],
  8149. ];
  8150. return $description;
  8151. }
  8152. /**
  8153. * Implements hook_chado_schema_v1_3_feature_relationshipprop()
  8154. *
  8155. * Purpose: To describe the structure of 'feature_relationshipprop' to tripal
  8156. *
  8157. * @see chado_insert_record()
  8158. * @see chado_update_record()
  8159. * @see chado_select_record()
  8160. * @see chado_generate_var()
  8161. * @see chado_expan_var()
  8162. *
  8163. * @return
  8164. * An array describing the 'feature_relationshipprop' table
  8165. *
  8166. * @ingroup tripal_chado_v1.3_schema_api
  8167. *
  8168. */
  8169. function tripal_chado_chado_schema_v1_3_feature_relationshipprop() {
  8170. $description = [
  8171. 'description' => '',
  8172. 'table' => 'feature_relationshipprop',
  8173. 'fields' => [
  8174. 'feature_relationshipprop_id' => [
  8175. 'size' => 'big',
  8176. 'type' => 'serial',
  8177. 'not null' => TRUE,
  8178. ],
  8179. 'feature_relationship_id' => [
  8180. 'size' => 'big',
  8181. 'type' => 'int',
  8182. 'not null' => TRUE,
  8183. ],
  8184. 'type_id' => [
  8185. 'size' => 'big',
  8186. 'type' => 'int',
  8187. 'not null' => TRUE,
  8188. ],
  8189. 'value' => [
  8190. 'size' => 'normal',
  8191. 'type' => 'text',
  8192. 'not null' => FALSE,
  8193. ],
  8194. 'rank' => [
  8195. 'size' => 'normal',
  8196. 'type' => 'int',
  8197. 'not null' => TRUE,
  8198. 'default' => 0,
  8199. ],
  8200. ],
  8201. 'unique keys' => [
  8202. 'feature_relationshipprop_c1' => [
  8203. 0 => 'feature_relationship_id',
  8204. 1 => 'type_id',
  8205. 2 => 'rank',
  8206. ],
  8207. ],
  8208. 'indexes' => [
  8209. 'feature_relationshipprop_idx1' => [
  8210. 0 => 'feature_relationship_id',
  8211. ],
  8212. 'feature_relationshipprop_idx2' => [
  8213. 0 => 'type_id',
  8214. ],
  8215. ],
  8216. 'primary key' => [
  8217. 0 => 'feature_relationshipprop_id',
  8218. ],
  8219. 'foreign keys' => [
  8220. 'feature_relationship' => [
  8221. 'table' => 'feature_relationship',
  8222. 'columns' => [
  8223. 'feature_relationship_id' => 'feature_relationship_id',
  8224. ],
  8225. ],
  8226. 'cvterm' => [
  8227. 'table' => 'cvterm',
  8228. 'columns' => [
  8229. 'type_id' => 'cvterm_id',
  8230. ],
  8231. ],
  8232. ],
  8233. 'referring_tables' => [
  8234. 0 => 'feature_relationshipprop_pub',
  8235. ],
  8236. ];
  8237. return $description;
  8238. }
  8239. /**
  8240. * Implements hook_chado_schema_v1_3_feature_relationshipprop_pub()
  8241. *
  8242. * Purpose: To describe the structure of 'feature_relationshipprop_pub' to
  8243. * tripal
  8244. *
  8245. * @see chado_insert_record()
  8246. * @see chado_update_record()
  8247. * @see chado_select_record()
  8248. * @see chado_generate_var()
  8249. * @see chado_expan_var()
  8250. *
  8251. * @return
  8252. * An array describing the 'feature_relationshipprop_pub' table
  8253. *
  8254. * @ingroup tripal_chado_v1.3_schema_api
  8255. *
  8256. */
  8257. function tripal_chado_chado_schema_v1_3_feature_relationshipprop_pub() {
  8258. $description = [
  8259. 'description' => '',
  8260. 'table' => 'feature_relationshipprop_pub',
  8261. 'fields' => [
  8262. 'feature_relationshipprop_pub_id' => [
  8263. 'size' => 'big',
  8264. 'type' => 'serial',
  8265. 'not null' => TRUE,
  8266. ],
  8267. 'feature_relationshipprop_id' => [
  8268. 'size' => 'big',
  8269. 'type' => 'int',
  8270. 'not null' => TRUE,
  8271. ],
  8272. 'pub_id' => [
  8273. 'size' => 'big',
  8274. 'type' => 'int',
  8275. 'not null' => TRUE,
  8276. ],
  8277. ],
  8278. 'unique keys' => [
  8279. 'feature_relationshipprop_pub_c1' => [
  8280. 0 => 'feature_relationshipprop_id',
  8281. 1 => 'pub_id',
  8282. ],
  8283. ],
  8284. 'indexes' => [
  8285. 'feature_relationshipprop_pub_idx1' => [
  8286. 0 => 'feature_relationshipprop_id',
  8287. ],
  8288. 'feature_relationshipprop_pub_idx2' => [
  8289. 0 => 'pub_id',
  8290. ],
  8291. ],
  8292. 'primary key' => [
  8293. 0 => 'feature_relationshipprop_pub_id',
  8294. ],
  8295. 'foreign keys' => [
  8296. 'feature_relationshipprop' => [
  8297. 'table' => 'feature_relationshipprop',
  8298. 'columns' => [
  8299. 'feature_relationshipprop_id' => 'feature_relationshipprop_id',
  8300. ],
  8301. ],
  8302. 'pub' => [
  8303. 'table' => 'pub',
  8304. 'columns' => [
  8305. 'pub_id' => 'pub_id',
  8306. ],
  8307. ],
  8308. ],
  8309. 'referring_tables' => [
  8310. ],
  8311. ];
  8312. return $description;
  8313. }
  8314. /**
  8315. * Implements hook_chado_schema_v1_3_feature_relationship_pub()
  8316. *
  8317. * Purpose: To describe the structure of 'feature_relationship_pub' to tripal
  8318. *
  8319. * @see chado_insert_record()
  8320. * @see chado_update_record()
  8321. * @see chado_select_record()
  8322. * @see chado_generate_var()
  8323. * @see chado_expan_var()
  8324. *
  8325. * @return
  8326. * An array describing the 'feature_relationship_pub' table
  8327. *
  8328. * @ingroup tripal_chado_v1.3_schema_api
  8329. *
  8330. */
  8331. function tripal_chado_chado_schema_v1_3_feature_relationship_pub() {
  8332. $description = [
  8333. 'description' => '',
  8334. 'table' => 'feature_relationship_pub',
  8335. 'fields' => [
  8336. 'feature_relationship_pub_id' => [
  8337. 'size' => 'big',
  8338. 'type' => 'serial',
  8339. 'not null' => TRUE,
  8340. ],
  8341. 'feature_relationship_id' => [
  8342. 'size' => 'big',
  8343. 'type' => 'int',
  8344. 'not null' => TRUE,
  8345. ],
  8346. 'pub_id' => [
  8347. 'size' => 'big',
  8348. 'type' => 'int',
  8349. 'not null' => TRUE,
  8350. ],
  8351. ],
  8352. 'unique keys' => [
  8353. 'feature_relationship_pub_c1' => [
  8354. 0 => 'feature_relationship_id',
  8355. 1 => 'pub_id',
  8356. ],
  8357. ],
  8358. 'indexes' => [
  8359. 'feature_relationship_pub_idx1' => [
  8360. 0 => 'feature_relationship_id',
  8361. ],
  8362. 'feature_relationship_pub_idx2' => [
  8363. 0 => 'pub_id',
  8364. ],
  8365. ],
  8366. 'primary key' => [
  8367. 0 => 'feature_relationship_pub_id',
  8368. ],
  8369. 'foreign keys' => [
  8370. 'feature_relationship' => [
  8371. 'table' => 'feature_relationship',
  8372. 'columns' => [
  8373. 'feature_relationship_id' => 'feature_relationship_id',
  8374. ],
  8375. ],
  8376. 'pub' => [
  8377. 'table' => 'pub',
  8378. 'columns' => [
  8379. 'pub_id' => 'pub_id',
  8380. ],
  8381. ],
  8382. ],
  8383. 'referring_tables' => [
  8384. ],
  8385. ];
  8386. return $description;
  8387. }
  8388. /**
  8389. * Implements hook_chado_schema_v1_3_feature_synonym()
  8390. *
  8391. * Purpose: To describe the structure of 'feature_synonym' to tripal
  8392. *
  8393. * @see chado_insert_record()
  8394. * @see chado_update_record()
  8395. * @see chado_select_record()
  8396. * @see chado_generate_var()
  8397. * @see chado_expan_var()
  8398. *
  8399. * @return
  8400. * An array describing the 'feature_synonym' table
  8401. *
  8402. * @ingroup tripal_chado_v1.3_schema_api
  8403. *
  8404. */
  8405. function tripal_chado_chado_schema_v1_3_feature_synonym() {
  8406. $description = [
  8407. 'description' => '',
  8408. 'table' => 'feature_synonym',
  8409. 'fields' => [
  8410. 'feature_synonym_id' => [
  8411. 'size' => 'big',
  8412. 'type' => 'serial',
  8413. 'not null' => TRUE,
  8414. ],
  8415. 'synonym_id' => [
  8416. 'size' => 'big',
  8417. 'type' => 'int',
  8418. 'not null' => TRUE,
  8419. ],
  8420. 'feature_id' => [
  8421. 'size' => 'big',
  8422. 'type' => 'int',
  8423. 'not null' => TRUE,
  8424. ],
  8425. 'pub_id' => [
  8426. 'size' => 'big',
  8427. 'type' => 'int',
  8428. 'not null' => TRUE,
  8429. ],
  8430. 'is_current' => [
  8431. 'size' => 'normal',
  8432. 'type' => 'boolean',
  8433. 'not null' => TRUE,
  8434. 'default' => FALSE,
  8435. ],
  8436. 'is_internal' => [
  8437. 'size' => 'normal',
  8438. 'type' => 'boolean',
  8439. 'not null' => TRUE,
  8440. 'default' => FALSE,
  8441. ],
  8442. ],
  8443. 'unique keys' => [
  8444. 'feature_synonym_c1' => [
  8445. 0 => 'synonym_id',
  8446. 1 => 'feature_id',
  8447. 2 => 'pub_id',
  8448. ],
  8449. ],
  8450. 'indexes' => [
  8451. 'feature_synonym_idx1' => [
  8452. 0 => 'synonym_id',
  8453. ],
  8454. 'feature_synonym_idx2' => [
  8455. 0 => 'feature_id',
  8456. ],
  8457. 'feature_synonym_idx3' => [
  8458. 0 => 'pub_id',
  8459. ],
  8460. ],
  8461. 'primary key' => [
  8462. 0 => 'feature_synonym_id',
  8463. ],
  8464. 'foreign keys' => [
  8465. 'synonym' => [
  8466. 'table' => 'synonym',
  8467. 'columns' => [
  8468. 'synonym_id' => 'synonym_id',
  8469. ],
  8470. ],
  8471. 'feature' => [
  8472. 'table' => 'feature',
  8473. 'columns' => [
  8474. 'feature_id' => 'feature_id',
  8475. ],
  8476. ],
  8477. 'pub' => [
  8478. 'table' => 'pub',
  8479. 'columns' => [
  8480. 'pub_id' => 'pub_id',
  8481. ],
  8482. ],
  8483. ],
  8484. 'referring_tables' => [
  8485. ],
  8486. ];
  8487. return $description;
  8488. }
  8489. /**
  8490. * Implements hook_chado_schema_v1_3_genotype()
  8491. *
  8492. * Purpose: To describe the structure of 'genotype' to tripal
  8493. *
  8494. * @see chado_insert_record()
  8495. * @see chado_update_record()
  8496. * @see chado_select_record()
  8497. * @see chado_generate_var()
  8498. * @see chado_expan_var()
  8499. *
  8500. * @return
  8501. * An array describing the 'genotype' table
  8502. *
  8503. * @ingroup tripal_chado_v1.3_schema_api
  8504. *
  8505. */
  8506. function tripal_chado_chado_schema_v1_3_genotype() {
  8507. $description = [
  8508. 'description' => '',
  8509. 'table' => 'genotype',
  8510. 'fields' => [
  8511. 'genotype_id' => [
  8512. 'size' => 'big',
  8513. 'type' => 'serial',
  8514. 'not null' => TRUE,
  8515. ],
  8516. 'name' => [
  8517. 'size' => 'normal',
  8518. 'type' => 'text',
  8519. 'not null' => FALSE,
  8520. ],
  8521. 'uniquename' => [
  8522. 'size' => 'normal',
  8523. 'type' => 'text',
  8524. 'not null' => TRUE,
  8525. ],
  8526. 'description' => [
  8527. 'size' => 'normal',
  8528. 'type' => 'text',
  8529. 'not null' => FALSE,
  8530. ],
  8531. 'type_id' => [
  8532. 'size' => 'big',
  8533. 'type' => 'int',
  8534. 'not null' => TRUE,
  8535. ],
  8536. ],
  8537. 'unique keys' => [
  8538. 'genotype_c1' => [
  8539. 0 => 'uniquename',
  8540. ],
  8541. ],
  8542. 'indexes' => [
  8543. 'genotype_idx1' => [
  8544. 0 => 'uniquename',
  8545. ],
  8546. 'genotype_idx2' => [
  8547. 0 => 'name',
  8548. ],
  8549. ],
  8550. 'primary key' => [
  8551. 0 => 'genotype_id',
  8552. ],
  8553. 'foreign keys' => [
  8554. 'cvterm' => [
  8555. 'table' => 'cvterm',
  8556. 'columns' => [
  8557. 'type_id' => 'cvterm_id',
  8558. ],
  8559. ],
  8560. ],
  8561. 'referring_tables' => [
  8562. 0 => 'feature_genotype',
  8563. 1 => 'genotypeprop',
  8564. 2 => 'nd_experiment_genotype',
  8565. 3 => 'phendesc',
  8566. 4 => 'phenotype_comparison',
  8567. 6 => 'phenstatement',
  8568. 7 => 'stock_genotype',
  8569. ],
  8570. ];
  8571. return $description;
  8572. }
  8573. /**
  8574. * Implements hook_chado_schema_v1_3_genotypeprop()
  8575. *
  8576. * Purpose: To describe the structure of 'genotypeprop' to tripal
  8577. *
  8578. * @see chado_insert_record()
  8579. * @see chado_update_record()
  8580. * @see chado_select_record()
  8581. * @see chado_generate_var()
  8582. * @see chado_expan_var()
  8583. *
  8584. * @return
  8585. * An array describing the 'genotypeprop' table
  8586. *
  8587. * @ingroup tripal_chado_v1.3_schema_api
  8588. *
  8589. */
  8590. function tripal_chado_chado_schema_v1_3_genotypeprop() {
  8591. $description = [
  8592. 'description' => '',
  8593. 'table' => 'genotypeprop',
  8594. 'fields' => [
  8595. 'genotypeprop_id' => [
  8596. 'size' => 'big',
  8597. 'type' => 'serial',
  8598. 'not null' => TRUE,
  8599. ],
  8600. 'genotype_id' => [
  8601. 'size' => 'big',
  8602. 'type' => 'int',
  8603. 'not null' => TRUE,
  8604. ],
  8605. 'type_id' => [
  8606. 'size' => 'big',
  8607. 'type' => 'int',
  8608. 'not null' => TRUE,
  8609. ],
  8610. 'value' => [
  8611. 'size' => 'normal',
  8612. 'type' => 'text',
  8613. 'not null' => FALSE,
  8614. ],
  8615. 'rank' => [
  8616. 'size' => 'normal',
  8617. 'type' => 'int',
  8618. 'not null' => TRUE,
  8619. 'default' => 0,
  8620. ],
  8621. ],
  8622. 'unique keys' => [
  8623. 'genotypeprop_c1' => [
  8624. 0 => 'genotype_id',
  8625. 1 => 'type_id',
  8626. 2 => 'rank',
  8627. ],
  8628. ],
  8629. 'indexes' => [
  8630. 'genotypeprop_idx1' => [
  8631. 0 => 'genotype_id',
  8632. ],
  8633. 'genotypeprop_idx2' => [
  8634. 0 => 'type_id',
  8635. ],
  8636. ],
  8637. 'primary key' => [
  8638. 0 => 'genotypeprop_id',
  8639. ],
  8640. 'foreign keys' => [
  8641. 'genotype' => [
  8642. 'table' => 'genotype',
  8643. 'columns' => [
  8644. 'genotype_id' => 'genotype_id',
  8645. ],
  8646. ],
  8647. 'cvterm' => [
  8648. 'table' => 'cvterm',
  8649. 'columns' => [
  8650. 'type_id' => 'cvterm_id',
  8651. ],
  8652. ],
  8653. ],
  8654. 'referring_tables' => [
  8655. ],
  8656. ];
  8657. return $description;
  8658. }
  8659. /**
  8660. * Implements hook_chado_schema_v1_3_library()
  8661. *
  8662. * Purpose: To describe the structure of 'library' to tripal
  8663. *
  8664. * @see chado_insert_record()
  8665. * @see chado_update_record()
  8666. * @see chado_select_record()
  8667. * @see chado_generate_var()
  8668. * @see chado_expan_var()
  8669. *
  8670. * @return
  8671. * An array describing the 'library' table
  8672. *
  8673. * @ingroup tripal_chado_v1.3_schema_api
  8674. *
  8675. */
  8676. function tripal_chado_chado_schema_v1_3_library() {
  8677. $description = [
  8678. 'description' => '',
  8679. 'table' => 'library',
  8680. 'fields' => [
  8681. 'library_id' => [
  8682. 'size' => 'big',
  8683. 'type' => 'serial',
  8684. 'not null' => TRUE,
  8685. ],
  8686. 'organism_id' => [
  8687. 'size' => 'big',
  8688. 'type' => 'int',
  8689. 'not null' => TRUE,
  8690. ],
  8691. 'name' => [
  8692. 'size' => 'normal',
  8693. 'type' => 'varchar',
  8694. 'length' => '255',
  8695. 'not null' => FALSE,
  8696. ],
  8697. 'uniquename' => [
  8698. 'size' => 'normal',
  8699. 'type' => 'text',
  8700. 'not null' => TRUE,
  8701. ],
  8702. 'type_id' => [
  8703. 'size' => 'big',
  8704. 'type' => 'int',
  8705. 'not null' => TRUE,
  8706. ],
  8707. 'is_obsolete' => [
  8708. 'size' => 'normal',
  8709. 'type' => 'int',
  8710. 'not null' => TRUE,
  8711. 'default' => 0,
  8712. ],
  8713. 'timeaccessioned' => [
  8714. 'size' => 'normal',
  8715. 'type' => 'datetime',
  8716. 'not null' => TRUE,
  8717. 'default' => 'now()',
  8718. ],
  8719. 'timelastmodified' => [
  8720. 'size' => 'normal',
  8721. 'type' => 'datetime',
  8722. 'not null' => TRUE,
  8723. 'default' => 'now()',
  8724. ],
  8725. ],
  8726. 'unique keys' => [
  8727. 'library_c1' => [
  8728. 0 => 'organism_id',
  8729. 1 => 'uniquename',
  8730. 2 => 'type_id',
  8731. ],
  8732. ],
  8733. 'indexes' => [
  8734. 'library_contact_idx1' => [
  8735. 0 => 'library_id',
  8736. ],
  8737. 'library_idx1' => [
  8738. 0 => 'organism_id',
  8739. ],
  8740. 'library_idx2' => [
  8741. 0 => 'type_id',
  8742. ],
  8743. 'library_idx3' => [
  8744. 0 => 'uniquename',
  8745. ],
  8746. 'library_name_ind1' => [
  8747. 0 => 'name',
  8748. ],
  8749. ],
  8750. 'primary key' => [
  8751. 0 => 'library_id',
  8752. ],
  8753. 'foreign keys' => [
  8754. 'organism' => [
  8755. 'table' => 'organism',
  8756. 'columns' => [
  8757. 'organism_id' => 'organism_id',
  8758. ],
  8759. ],
  8760. 'cvterm' => [
  8761. 'table' => 'cvterm',
  8762. 'columns' => [
  8763. 'type_id' => 'cvterm_id',
  8764. ],
  8765. ],
  8766. ],
  8767. 'referring_tables' => [
  8768. 0 => 'cell_line_library',
  8769. 1 => 'library_contact',
  8770. 2 => 'library_cvterm',
  8771. 3 => 'library_dbxref',
  8772. 4 => 'library_expression',
  8773. 5 => 'library_feature',
  8774. 6 => 'libraryprop',
  8775. 7 => 'library_pub',
  8776. 8 => 'library_relationship',
  8777. 10 => 'library_synonym',
  8778. 11 => 'stock_library',
  8779. ],
  8780. ];
  8781. return $description;
  8782. }
  8783. /**
  8784. * Implements hook_chado_schema_v1_3_library_contact()
  8785. *
  8786. * Purpose: To describe the structure of 'library_contact' to tripal
  8787. *
  8788. * @see chado_insert_record()
  8789. * @see chado_update_record()
  8790. * @see chado_select_record()
  8791. * @see chado_generate_var()
  8792. * @see chado_expan_var()
  8793. *
  8794. * @return
  8795. * An array describing the 'library_contact' table
  8796. *
  8797. * @ingroup tripal_chado_v1.3_schema_api
  8798. *
  8799. */
  8800. function tripal_chado_chado_schema_v1_3_library_contact() {
  8801. $description = [
  8802. 'description' => '',
  8803. 'table' => 'library_contact',
  8804. 'fields' => [
  8805. 'library_contact_id' => [
  8806. 'size' => 'big',
  8807. 'type' => 'serial',
  8808. 'not null' => TRUE,
  8809. ],
  8810. 'library_id' => [
  8811. 'size' => 'big',
  8812. 'type' => 'int',
  8813. 'not null' => TRUE,
  8814. ],
  8815. 'contact_id' => [
  8816. 'size' => 'big',
  8817. 'type' => 'int',
  8818. 'not null' => TRUE,
  8819. ],
  8820. ],
  8821. 'unique keys' => [
  8822. 'library_contact_c1' => [
  8823. 0 => 'library_id',
  8824. 1 => 'contact_id',
  8825. ],
  8826. ],
  8827. 'primary key' => [
  8828. 0 => 'library_contact_id',
  8829. ],
  8830. 'foreign keys' => [
  8831. 'library' => [
  8832. 'table' => 'library',
  8833. 'columns' => [
  8834. 'library_id' => 'library_id',
  8835. ],
  8836. ],
  8837. 'contact' => [
  8838. 'table' => 'contact',
  8839. 'columns' => [
  8840. 'contact_id' => 'contact_id',
  8841. ],
  8842. ],
  8843. ],
  8844. 'referring_tables' => [
  8845. ],
  8846. ];
  8847. return $description;
  8848. }
  8849. /**
  8850. * Implements hook_chado_schema_v1_3_library_cvterm()
  8851. *
  8852. * Purpose: To describe the structure of 'library_cvterm' to tripal
  8853. *
  8854. * @see chado_insert_record()
  8855. * @see chado_update_record()
  8856. * @see chado_select_record()
  8857. * @see chado_generate_var()
  8858. * @see chado_expan_var()
  8859. *
  8860. * @return
  8861. * An array describing the 'library_cvterm' table
  8862. *
  8863. * @ingroup tripal_chado_v1.3_schema_api
  8864. *
  8865. */
  8866. function tripal_chado_chado_schema_v1_3_library_cvterm() {
  8867. $description = [
  8868. 'description' => '',
  8869. 'table' => 'library_cvterm',
  8870. 'fields' => [
  8871. 'library_cvterm_id' => [
  8872. 'size' => 'big',
  8873. 'type' => 'serial',
  8874. 'not null' => TRUE,
  8875. ],
  8876. 'library_id' => [
  8877. 'size' => 'big',
  8878. 'type' => 'int',
  8879. 'not null' => TRUE,
  8880. ],
  8881. 'cvterm_id' => [
  8882. 'size' => 'big',
  8883. 'type' => 'int',
  8884. 'not null' => TRUE,
  8885. ],
  8886. 'pub_id' => [
  8887. 'size' => 'big',
  8888. 'type' => 'int',
  8889. 'not null' => TRUE,
  8890. ],
  8891. ],
  8892. 'unique keys' => [
  8893. 'library_cvterm_c1' => [
  8894. 0 => 'library_id',
  8895. 1 => 'cvterm_id',
  8896. 2 => 'pub_id',
  8897. ],
  8898. ],
  8899. 'indexes' => [
  8900. 'library_cvterm_idx1' => [
  8901. 0 => 'library_id',
  8902. ],
  8903. 'library_cvterm_idx2' => [
  8904. 0 => 'cvterm_id',
  8905. ],
  8906. 'library_cvterm_idx3' => [
  8907. 0 => 'pub_id',
  8908. ],
  8909. ],
  8910. 'primary key' => [
  8911. 0 => 'library_cvterm_id',
  8912. ],
  8913. 'foreign keys' => [
  8914. 'library' => [
  8915. 'table' => 'library',
  8916. 'columns' => [
  8917. 'library_id' => 'library_id',
  8918. ],
  8919. ],
  8920. 'cvterm' => [
  8921. 'table' => 'cvterm',
  8922. 'columns' => [
  8923. 'cvterm_id' => 'cvterm_id',
  8924. ],
  8925. ],
  8926. 'pub' => [
  8927. 'table' => 'pub',
  8928. 'columns' => [
  8929. 'pub_id' => 'pub_id',
  8930. ],
  8931. ],
  8932. ],
  8933. 'referring_tables' => [
  8934. ],
  8935. ];
  8936. return $description;
  8937. }
  8938. /**
  8939. * Implements hook_chado_schema_v1_3_library_dbxref()
  8940. *
  8941. * Purpose: To describe the structure of 'library_dbxref' to tripal
  8942. *
  8943. * @see chado_insert_record()
  8944. * @see chado_update_record()
  8945. * @see chado_select_record()
  8946. * @see chado_generate_var()
  8947. * @see chado_expan_var()
  8948. *
  8949. * @return
  8950. * An array describing the 'library_dbxref' table
  8951. *
  8952. * @ingroup tripal_chado_v1.3_schema_api
  8953. *
  8954. */
  8955. function tripal_chado_chado_schema_v1_3_library_dbxref() {
  8956. $description = [
  8957. 'description' => '',
  8958. 'table' => 'library_dbxref',
  8959. 'fields' => [
  8960. 'library_dbxref_id' => [
  8961. 'size' => 'big',
  8962. 'type' => 'serial',
  8963. 'not null' => TRUE,
  8964. ],
  8965. 'library_id' => [
  8966. 'size' => 'big',
  8967. 'type' => 'int',
  8968. 'not null' => TRUE,
  8969. ],
  8970. 'dbxref_id' => [
  8971. 'size' => 'big',
  8972. 'type' => 'int',
  8973. 'not null' => TRUE,
  8974. ],
  8975. 'is_current' => [
  8976. 'size' => 'normal',
  8977. 'type' => 'boolean',
  8978. 'not null' => TRUE,
  8979. 'default' => 'true',
  8980. ],
  8981. ],
  8982. 'unique keys' => [
  8983. 'library_dbxref_c1' => [
  8984. 0 => 'library_id',
  8985. 1 => 'dbxref_id',
  8986. ],
  8987. ],
  8988. 'indexes' => [
  8989. 'library_dbxref_idx1' => [
  8990. 0 => 'library_id',
  8991. ],
  8992. 'library_dbxref_idx2' => [
  8993. 0 => 'dbxref_id',
  8994. ],
  8995. ],
  8996. 'primary key' => [
  8997. 0 => 'library_dbxref_id',
  8998. ],
  8999. 'foreign keys' => [
  9000. 'library' => [
  9001. 'table' => 'library',
  9002. 'columns' => [
  9003. 'library_id' => 'library_id',
  9004. ],
  9005. ],
  9006. 'dbxref' => [
  9007. 'table' => 'dbxref',
  9008. 'columns' => [
  9009. 'dbxref_id' => 'dbxref_id',
  9010. ],
  9011. ],
  9012. ],
  9013. 'referring_tables' => [
  9014. ],
  9015. ];
  9016. return $description;
  9017. }
  9018. /**
  9019. * Implements hook_chado_schema_v1_3_library_expression()
  9020. *
  9021. * Purpose: To describe the structure of 'library_expression' to tripal
  9022. *
  9023. * @see chado_insert_record()
  9024. * @see chado_update_record()
  9025. * @see chado_select_record()
  9026. * @see chado_generate_var()
  9027. * @see chado_expan_var()
  9028. *
  9029. * @return
  9030. * An array describing the 'library_expression' table
  9031. *
  9032. * @ingroup tripal_chado_v1.3_schema_api
  9033. *
  9034. */
  9035. function tripal_chado_chado_schema_v1_3_library_expression() {
  9036. $description = [
  9037. 'description' => '',
  9038. 'table' => 'library_expression',
  9039. 'fields' => [
  9040. 'library_expression_id' => [
  9041. 'size' => 'big',
  9042. 'type' => 'serial',
  9043. 'not null' => TRUE,
  9044. ],
  9045. 'library_id' => [
  9046. 'size' => 'big',
  9047. 'type' => 'int',
  9048. 'not null' => TRUE,
  9049. ],
  9050. 'expression_id' => [
  9051. 'size' => 'big',
  9052. 'type' => 'int',
  9053. 'not null' => TRUE,
  9054. ],
  9055. 'pub_id' => [
  9056. 'size' => 'big',
  9057. 'type' => 'int',
  9058. 'not null' => TRUE,
  9059. ],
  9060. ],
  9061. 'unique keys' => [
  9062. 'library_expression_c1' => [
  9063. 0 => 'library_id',
  9064. 1 => 'expression_id',
  9065. ],
  9066. ],
  9067. 'indexes' => [
  9068. 'library_expression_idx1' => [
  9069. 0 => 'library_id',
  9070. ],
  9071. 'library_expression_idx2' => [
  9072. 0 => 'expression_id',
  9073. ],
  9074. 'library_expression_idx3' => [
  9075. 0 => 'pub_id',
  9076. ],
  9077. ],
  9078. 'primary key' => [
  9079. 0 => 'library_expression_id',
  9080. ],
  9081. 'foreign keys' => [
  9082. 'library' => [
  9083. 'table' => 'library',
  9084. 'columns' => [
  9085. 'library_id' => 'library_id',
  9086. ],
  9087. ],
  9088. 'expression' => [
  9089. 'table' => 'expression',
  9090. 'columns' => [
  9091. 'expression_id' => 'expression_id',
  9092. ],
  9093. ],
  9094. 'pub' => [
  9095. 'table' => 'pub',
  9096. 'columns' => [
  9097. 'pub_id' => 'pub_id',
  9098. ],
  9099. ],
  9100. ],
  9101. 'referring_tables' => [
  9102. 0 => 'library_expressionprop',
  9103. ],
  9104. ];
  9105. return $description;
  9106. }
  9107. /**
  9108. * Implements hook_chado_schema_v1_3_library_expressionprop()
  9109. *
  9110. * Purpose: To describe the structure of 'library_expressionprop' to tripal
  9111. *
  9112. * @see chado_insert_record()
  9113. * @see chado_update_record()
  9114. * @see chado_select_record()
  9115. * @see chado_generate_var()
  9116. * @see chado_expan_var()
  9117. *
  9118. * @return
  9119. * An array describing the 'library_expressionprop' table
  9120. *
  9121. * @ingroup tripal_chado_v1.3_schema_api
  9122. *
  9123. */
  9124. function tripal_chado_chado_schema_v1_3_library_expressionprop() {
  9125. $description = [
  9126. 'description' => '',
  9127. 'table' => 'library_expressionprop',
  9128. 'fields' => [
  9129. 'library_expressionprop_id' => [
  9130. 'size' => 'big',
  9131. 'type' => 'serial',
  9132. 'not null' => TRUE,
  9133. ],
  9134. 'library_expression_id' => [
  9135. 'size' => 'big',
  9136. 'type' => 'int',
  9137. 'not null' => TRUE,
  9138. ],
  9139. 'type_id' => [
  9140. 'size' => 'big',
  9141. 'type' => 'int',
  9142. 'not null' => TRUE,
  9143. ],
  9144. 'value' => [
  9145. 'size' => 'normal',
  9146. 'type' => 'text',
  9147. 'not null' => FALSE,
  9148. ],
  9149. 'rank' => [
  9150. 'size' => 'normal',
  9151. 'type' => 'int',
  9152. 'not null' => TRUE,
  9153. 'default' => 0,
  9154. ],
  9155. ],
  9156. 'unique keys' => [
  9157. 'library_expressionprop_c1' => [
  9158. 0 => 'library_expression_id',
  9159. 1 => 'type_id',
  9160. 2 => 'rank',
  9161. ],
  9162. ],
  9163. 'indexes' => [
  9164. 'library_expressionprop_idx1' => [
  9165. 0 => 'library_expression_id',
  9166. ],
  9167. 'library_expressionprop_idx2' => [
  9168. 0 => 'type_id',
  9169. ],
  9170. ],
  9171. 'primary key' => [
  9172. 0 => 'library_expressionprop_id',
  9173. ],
  9174. 'foreign keys' => [
  9175. 'library_expression' => [
  9176. 'table' => 'library_expression',
  9177. 'columns' => [
  9178. 'library_expression_id' => 'library_expression_id',
  9179. ],
  9180. ],
  9181. 'cvterm' => [
  9182. 'table' => 'cvterm',
  9183. 'columns' => [
  9184. 'type_id' => 'cvterm_id',
  9185. ],
  9186. ],
  9187. ],
  9188. 'referring_tables' => [
  9189. ],
  9190. ];
  9191. return $description;
  9192. }
  9193. /**
  9194. * Implements hook_chado_schema_v1_3_library_feature()
  9195. *
  9196. * Purpose: To describe the structure of 'library_feature' to tripal
  9197. *
  9198. * @see chado_insert_record()
  9199. * @see chado_update_record()
  9200. * @see chado_select_record()
  9201. * @see chado_generate_var()
  9202. * @see chado_expan_var()
  9203. *
  9204. * @return
  9205. * An array describing the 'library_feature' table
  9206. *
  9207. * @ingroup tripal_chado_v1.3_schema_api
  9208. *
  9209. */
  9210. function tripal_chado_chado_schema_v1_3_library_feature() {
  9211. $description = [
  9212. 'description' => '',
  9213. 'table' => 'library_feature',
  9214. 'fields' => [
  9215. 'library_feature_id' => [
  9216. 'size' => 'big',
  9217. 'type' => 'serial',
  9218. 'not null' => TRUE,
  9219. ],
  9220. 'library_id' => [
  9221. 'size' => 'big',
  9222. 'type' => 'int',
  9223. 'not null' => TRUE,
  9224. ],
  9225. 'feature_id' => [
  9226. 'size' => 'big',
  9227. 'type' => 'int',
  9228. 'not null' => TRUE,
  9229. ],
  9230. ],
  9231. 'unique keys' => [
  9232. 'library_feature_c1' => [
  9233. 0 => 'library_id',
  9234. 1 => 'feature_id',
  9235. ],
  9236. ],
  9237. 'indexes' => [
  9238. 'library_feature_idx1' => [
  9239. 0 => 'library_id',
  9240. ],
  9241. 'library_feature_idx2' => [
  9242. 0 => 'feature_id',
  9243. ],
  9244. ],
  9245. 'primary key' => [
  9246. 0 => 'library_feature_id',
  9247. ],
  9248. 'foreign keys' => [
  9249. 'library' => [
  9250. 'table' => 'library',
  9251. 'columns' => [
  9252. 'library_id' => 'library_id',
  9253. ],
  9254. ],
  9255. 'feature' => [
  9256. 'table' => 'feature',
  9257. 'columns' => [
  9258. 'feature_id' => 'feature_id',
  9259. ],
  9260. ],
  9261. ],
  9262. 'referring_tables' => [
  9263. 0 => 'library_featureprop',
  9264. ],
  9265. ];
  9266. return $description;
  9267. }
  9268. /**
  9269. * Implements hook_chado_schema_v1_3_library_featureprop()
  9270. *
  9271. * Purpose: To describe the structure of 'library_featureprop' to tripal
  9272. *
  9273. * @see chado_insert_record()
  9274. * @see chado_update_record()
  9275. * @see chado_select_record()
  9276. * @see chado_generate_var()
  9277. * @see chado_expan_var()
  9278. *
  9279. * @return
  9280. * An array describing the 'library_featureprop' table
  9281. *
  9282. * @ingroup tripal_chado_v1.3_schema_api
  9283. *
  9284. */
  9285. function tripal_chado_chado_schema_v1_3_library_featureprop() {
  9286. $description = [
  9287. 'description' => '',
  9288. 'table' => 'library_featureprop',
  9289. 'fields' => [
  9290. 'library_featureprop_id' => [
  9291. 'size' => 'big',
  9292. 'type' => 'serial',
  9293. 'not null' => TRUE,
  9294. ],
  9295. 'library_feature_id' => [
  9296. 'size' => 'big',
  9297. 'type' => 'int',
  9298. 'not null' => TRUE,
  9299. ],
  9300. 'type_id' => [
  9301. 'size' => 'big',
  9302. 'type' => 'int',
  9303. 'not null' => TRUE,
  9304. ],
  9305. 'value' => [
  9306. 'size' => 'normal',
  9307. 'type' => 'text',
  9308. 'not null' => FALSE,
  9309. ],
  9310. 'rank' => [
  9311. 'size' => 'normal',
  9312. 'type' => 'int',
  9313. 'not null' => TRUE,
  9314. 'default' => 0,
  9315. ],
  9316. ],
  9317. 'unique keys' => [
  9318. 'library_featureprop_c1' => [
  9319. 0 => 'library_feature_id',
  9320. 1 => 'type_id',
  9321. 2 => 'rank',
  9322. ],
  9323. ],
  9324. 'indexes' => [
  9325. 'library_featureprop_idx1' => [
  9326. 0 => 'library_feature_id',
  9327. ],
  9328. 'library_featureprop_idx2' => [
  9329. 0 => 'type_id',
  9330. ],
  9331. ],
  9332. 'primary key' => [
  9333. 0 => 'library_featureprop_id',
  9334. ],
  9335. 'foreign keys' => [
  9336. 'library_feature' => [
  9337. 'table' => 'library_feature',
  9338. 'columns' => [
  9339. 'library_feature_id' => 'library_feature_id',
  9340. ],
  9341. ],
  9342. 'cvterm' => [
  9343. 'table' => 'cvterm',
  9344. 'columns' => [
  9345. 'type_id' => 'cvterm_id',
  9346. ],
  9347. ],
  9348. ],
  9349. 'referring_tables' => [
  9350. ],
  9351. ];
  9352. return $description;
  9353. }
  9354. /**
  9355. * Implements hook_chado_schema_v1_3_libraryprop()
  9356. *
  9357. * Purpose: To describe the structure of 'libraryprop' to tripal
  9358. *
  9359. * @see chado_insert_record()
  9360. * @see chado_update_record()
  9361. * @see chado_select_record()
  9362. * @see chado_generate_var()
  9363. * @see chado_expan_var()
  9364. *
  9365. * @return
  9366. * An array describing the 'libraryprop' table
  9367. *
  9368. * @ingroup tripal_chado_v1.3_schema_api
  9369. *
  9370. */
  9371. function tripal_chado_chado_schema_v1_3_libraryprop() {
  9372. $description = [
  9373. 'description' => '',
  9374. 'table' => 'libraryprop',
  9375. 'fields' => [
  9376. 'libraryprop_id' => [
  9377. 'size' => 'big',
  9378. 'type' => 'serial',
  9379. 'not null' => TRUE,
  9380. ],
  9381. 'library_id' => [
  9382. 'size' => 'big',
  9383. 'type' => 'int',
  9384. 'not null' => TRUE,
  9385. ],
  9386. 'type_id' => [
  9387. 'size' => 'big',
  9388. 'type' => 'int',
  9389. 'not null' => TRUE,
  9390. ],
  9391. 'value' => [
  9392. 'size' => 'normal',
  9393. 'type' => 'text',
  9394. 'not null' => FALSE,
  9395. ],
  9396. 'rank' => [
  9397. 'size' => 'normal',
  9398. 'type' => 'int',
  9399. 'not null' => TRUE,
  9400. 'default' => 0,
  9401. ],
  9402. ],
  9403. 'unique keys' => [
  9404. 'libraryprop_c1' => [
  9405. 0 => 'library_id',
  9406. 1 => 'type_id',
  9407. 2 => 'rank',
  9408. ],
  9409. ],
  9410. 'indexes' => [
  9411. 'libraryprop_idx1' => [
  9412. 0 => 'library_id',
  9413. ],
  9414. 'libraryprop_idx2' => [
  9415. 0 => 'type_id',
  9416. ],
  9417. ],
  9418. 'primary key' => [
  9419. 0 => 'libraryprop_id',
  9420. ],
  9421. 'foreign keys' => [
  9422. 'library' => [
  9423. 'table' => 'library',
  9424. 'columns' => [
  9425. 'library_id' => 'library_id',
  9426. ],
  9427. ],
  9428. 'cvterm' => [
  9429. 'table' => 'cvterm',
  9430. 'columns' => [
  9431. 'type_id' => 'cvterm_id',
  9432. ],
  9433. ],
  9434. ],
  9435. 'referring_tables' => [
  9436. 0 => 'libraryprop_pub',
  9437. ],
  9438. ];
  9439. return $description;
  9440. }
  9441. /**
  9442. * Implements hook_chado_schema_v1_3_libraryprop_pub()
  9443. *
  9444. * Purpose: To describe the structure of 'libraryprop_pub' to tripal
  9445. *
  9446. * @see chado_insert_record()
  9447. * @see chado_update_record()
  9448. * @see chado_select_record()
  9449. * @see chado_generate_var()
  9450. * @see chado_expan_var()
  9451. *
  9452. * @return
  9453. * An array describing the 'libraryprop_pub' table
  9454. *
  9455. * @ingroup tripal_chado_v1.3_schema_api
  9456. *
  9457. */
  9458. function tripal_chado_chado_schema_v1_3_libraryprop_pub() {
  9459. $description = [
  9460. 'description' => '',
  9461. 'table' => 'libraryprop_pub',
  9462. 'fields' => [
  9463. 'libraryprop_pub_id' => [
  9464. 'size' => 'big',
  9465. 'type' => 'serial',
  9466. 'not null' => TRUE,
  9467. ],
  9468. 'libraryprop_id' => [
  9469. 'size' => 'big',
  9470. 'type' => 'int',
  9471. 'not null' => TRUE,
  9472. ],
  9473. 'pub_id' => [
  9474. 'size' => 'big',
  9475. 'type' => 'int',
  9476. 'not null' => TRUE,
  9477. ],
  9478. ],
  9479. 'unique keys' => [
  9480. 'libraryprop_pub_c1' => [
  9481. 0 => 'libraryprop_id',
  9482. 1 => 'pub_id',
  9483. ],
  9484. ],
  9485. 'indexes' => [
  9486. 'libraryprop_pub_idx1' => [
  9487. 0 => 'libraryprop_id',
  9488. ],
  9489. 'libraryprop_pub_idx2' => [
  9490. 0 => 'pub_id',
  9491. ],
  9492. ],
  9493. 'primary key' => [
  9494. 0 => 'libraryprop_pub_id',
  9495. ],
  9496. 'foreign keys' => [
  9497. 'libraryprop' => [
  9498. 'table' => 'libraryprop',
  9499. 'columns' => [
  9500. 'libraryprop_id' => 'libraryprop_id',
  9501. ],
  9502. ],
  9503. 'pub' => [
  9504. 'table' => 'pub',
  9505. 'columns' => [
  9506. 'pub_id' => 'pub_id',
  9507. ],
  9508. ],
  9509. ],
  9510. 'referring_tables' => [
  9511. ],
  9512. ];
  9513. return $description;
  9514. }
  9515. /**
  9516. * Implements hook_chado_schema_v1_3_library_pub()
  9517. *
  9518. * Purpose: To describe the structure of 'library_pub' to tripal
  9519. *
  9520. * @see chado_insert_record()
  9521. * @see chado_update_record()
  9522. * @see chado_select_record()
  9523. * @see chado_generate_var()
  9524. * @see chado_expan_var()
  9525. *
  9526. * @return
  9527. * An array describing the 'library_pub' table
  9528. *
  9529. * @ingroup tripal_chado_v1.3_schema_api
  9530. *
  9531. */
  9532. function tripal_chado_chado_schema_v1_3_library_pub() {
  9533. $description = [
  9534. 'description' => '',
  9535. 'table' => 'library_pub',
  9536. 'fields' => [
  9537. 'library_pub_id' => [
  9538. 'size' => 'big',
  9539. 'type' => 'serial',
  9540. 'not null' => TRUE,
  9541. ],
  9542. 'library_id' => [
  9543. 'size' => 'big',
  9544. 'type' => 'int',
  9545. 'not null' => TRUE,
  9546. ],
  9547. 'pub_id' => [
  9548. 'size' => 'big',
  9549. 'type' => 'int',
  9550. 'not null' => TRUE,
  9551. ],
  9552. ],
  9553. 'unique keys' => [
  9554. 'library_pub_c1' => [
  9555. 0 => 'library_id',
  9556. 1 => 'pub_id',
  9557. ],
  9558. ],
  9559. 'indexes' => [
  9560. 'library_pub_idx1' => [
  9561. 0 => 'library_id',
  9562. ],
  9563. 'library_pub_idx2' => [
  9564. 0 => 'pub_id',
  9565. ],
  9566. ],
  9567. 'primary key' => [
  9568. 0 => 'library_pub_id',
  9569. ],
  9570. 'foreign keys' => [
  9571. 'library' => [
  9572. 'table' => 'library',
  9573. 'columns' => [
  9574. 'library_id' => 'library_id',
  9575. ],
  9576. ],
  9577. 'pub' => [
  9578. 'table' => 'pub',
  9579. 'columns' => [
  9580. 'pub_id' => 'pub_id',
  9581. ],
  9582. ],
  9583. ],
  9584. 'referring_tables' => [
  9585. ],
  9586. ];
  9587. return $description;
  9588. }
  9589. /**
  9590. * Implements hook_chado_schema_v1_3_library_relationship()
  9591. *
  9592. * Purpose: To describe the structure of 'library_relationship' to tripal
  9593. *
  9594. * @see chado_insert_record()
  9595. * @see chado_update_record()
  9596. * @see chado_select_record()
  9597. * @see chado_generate_var()
  9598. * @see chado_expan_var()
  9599. *
  9600. * @return
  9601. * An array describing the 'library_relationship' table
  9602. *
  9603. * @ingroup tripal_chado_v1.3_schema_api
  9604. *
  9605. */
  9606. function tripal_chado_chado_schema_v1_3_library_relationship() {
  9607. $description = [
  9608. 'description' => '',
  9609. 'table' => 'library_relationship',
  9610. 'fields' => [
  9611. 'library_relationship_id' => [
  9612. 'size' => 'big',
  9613. 'type' => 'serial',
  9614. 'not null' => TRUE,
  9615. ],
  9616. 'subject_id' => [
  9617. 'size' => 'big',
  9618. 'type' => 'int',
  9619. 'not null' => TRUE,
  9620. ],
  9621. 'object_id' => [
  9622. 'size' => 'big',
  9623. 'type' => 'int',
  9624. 'not null' => TRUE,
  9625. ],
  9626. 'type_id' => [
  9627. 'size' => 'big',
  9628. 'type' => 'int',
  9629. 'not null' => TRUE,
  9630. ],
  9631. ],
  9632. 'unique keys' => [
  9633. 'library_relationship_c1' => [
  9634. 0 => 'subject_id',
  9635. 1 => 'object_id',
  9636. 2 => 'type_id',
  9637. ],
  9638. ],
  9639. 'indexes' => [
  9640. 'library_relationship_idx1' => [
  9641. 0 => 'subject_id',
  9642. ],
  9643. 'library_relationship_idx2' => [
  9644. 0 => 'object_id',
  9645. ],
  9646. 'library_relationship_idx3' => [
  9647. 0 => 'type_id',
  9648. ],
  9649. ],
  9650. 'primary key' => [
  9651. 0 => 'library_relationship_id',
  9652. ],
  9653. 'foreign keys' => [
  9654. 'library' => [
  9655. 'table' => 'library',
  9656. 'columns' => [
  9657. 'subject_id' => 'library_id',
  9658. 'object_id' => 'library_id',
  9659. ],
  9660. ],
  9661. 'cvterm' => [
  9662. 'table' => 'cvterm',
  9663. 'columns' => [
  9664. 'type_id' => 'cvterm_id',
  9665. ],
  9666. ],
  9667. ],
  9668. 'referring_tables' => [
  9669. 0 => 'library_relationship_pub',
  9670. ],
  9671. ];
  9672. return $description;
  9673. }
  9674. /**
  9675. * Implements hook_chado_schema_v1_3_library_relationship_pub()
  9676. *
  9677. * Purpose: To describe the structure of 'library_relationship_pub' to tripal
  9678. *
  9679. * @see chado_insert_record()
  9680. * @see chado_update_record()
  9681. * @see chado_select_record()
  9682. * @see chado_generate_var()
  9683. * @see chado_expan_var()
  9684. *
  9685. * @return
  9686. * An array describing the 'library_relationship_pub' table
  9687. *
  9688. * @ingroup tripal_chado_v1.3_schema_api
  9689. *
  9690. */
  9691. function tripal_chado_chado_schema_v1_3_library_relationship_pub() {
  9692. $description = [
  9693. 'description' => '',
  9694. 'table' => 'library_relationship_pub',
  9695. 'fields' => [
  9696. 'library_relationship_pub_id' => [
  9697. 'size' => 'big',
  9698. 'type' => 'serial',
  9699. 'not null' => TRUE,
  9700. ],
  9701. 'library_relationship_id' => [
  9702. 'size' => 'big',
  9703. 'type' => 'int',
  9704. 'not null' => TRUE,
  9705. ],
  9706. 'pub_id' => [
  9707. 'size' => 'big',
  9708. 'type' => 'int',
  9709. 'not null' => TRUE,
  9710. ],
  9711. ],
  9712. 'unique keys' => [
  9713. 'library_relationship_pub_c1' => [
  9714. 0 => 'library_relationship_id',
  9715. 1 => 'pub_id',
  9716. ],
  9717. ],
  9718. 'indexes' => [
  9719. 'library_relationship_pub_idx1' => [
  9720. 0 => 'library_relationship_id',
  9721. ],
  9722. 'library_relationship_pub_idx2' => [
  9723. 0 => 'pub_id',
  9724. ],
  9725. ],
  9726. 'primary key' => [
  9727. 0 => 'library_relationship_pub_id',
  9728. ],
  9729. 'foreign keys' => [
  9730. 'library_relationship' => [
  9731. 'table' => 'library_relationship',
  9732. 'columns' => [
  9733. 'library_relationship_id' => 'library_relationship_id',
  9734. ],
  9735. ],
  9736. 'pub' => [
  9737. 'table' => 'pub',
  9738. 'columns' => [
  9739. 'pub_id' => 'pub_id',
  9740. ],
  9741. ],
  9742. ],
  9743. 'referring_tables' => [
  9744. ],
  9745. ];
  9746. return $description;
  9747. }
  9748. /**
  9749. * Implements hook_chado_schema_v1_3_library_synonym()
  9750. *
  9751. * Purpose: To describe the structure of 'library_synonym' to tripal
  9752. *
  9753. * @see chado_insert_record()
  9754. * @see chado_update_record()
  9755. * @see chado_select_record()
  9756. * @see chado_generate_var()
  9757. * @see chado_expan_var()
  9758. *
  9759. * @return
  9760. * An array describing the 'library_synonym' table
  9761. *
  9762. * @ingroup tripal_chado_v1.3_schema_api
  9763. *
  9764. */
  9765. function tripal_chado_chado_schema_v1_3_library_synonym() {
  9766. $description = [
  9767. 'description' => '',
  9768. 'table' => 'library_synonym',
  9769. 'fields' => [
  9770. 'library_synonym_id' => [
  9771. 'size' => 'big',
  9772. 'type' => 'serial',
  9773. 'not null' => TRUE,
  9774. ],
  9775. 'synonym_id' => [
  9776. 'size' => 'big',
  9777. 'type' => 'int',
  9778. 'not null' => TRUE,
  9779. ],
  9780. 'library_id' => [
  9781. 'size' => 'big',
  9782. 'type' => 'int',
  9783. 'not null' => TRUE,
  9784. ],
  9785. 'pub_id' => [
  9786. 'size' => 'big',
  9787. 'type' => 'int',
  9788. 'not null' => TRUE,
  9789. ],
  9790. 'is_current' => [
  9791. 'size' => 'normal',
  9792. 'type' => 'boolean',
  9793. 'not null' => TRUE,
  9794. 'default' => 'true',
  9795. ],
  9796. 'is_internal' => [
  9797. 'size' => 'normal',
  9798. 'type' => 'boolean',
  9799. 'not null' => TRUE,
  9800. 'default' => FALSE,
  9801. ],
  9802. ],
  9803. 'unique keys' => [
  9804. 'library_synonym_c1' => [
  9805. 0 => 'synonym_id',
  9806. 1 => 'library_id',
  9807. 2 => 'pub_id',
  9808. ],
  9809. ],
  9810. 'indexes' => [
  9811. 'library_synonym_idx1' => [
  9812. 0 => 'synonym_id',
  9813. ],
  9814. 'library_synonym_idx2' => [
  9815. 0 => 'library_id',
  9816. ],
  9817. 'library_synonym_idx3' => [
  9818. 0 => 'pub_id',
  9819. ],
  9820. ],
  9821. 'primary key' => [
  9822. 0 => 'library_synonym_id',
  9823. ],
  9824. 'foreign keys' => [
  9825. 'synonym' => [
  9826. 'table' => 'synonym',
  9827. 'columns' => [
  9828. 'synonym_id' => 'synonym_id',
  9829. ],
  9830. ],
  9831. 'library' => [
  9832. 'table' => 'library',
  9833. 'columns' => [
  9834. 'library_id' => 'library_id',
  9835. ],
  9836. ],
  9837. 'pub' => [
  9838. 'table' => 'pub',
  9839. 'columns' => [
  9840. 'pub_id' => 'pub_id',
  9841. ],
  9842. ],
  9843. ],
  9844. 'referring_tables' => [
  9845. ],
  9846. ];
  9847. return $description;
  9848. }
  9849. /**
  9850. * Implements hook_chado_schema_v1_3_magedocumentation()
  9851. *
  9852. * Purpose: To describe the structure of 'magedocumentation' to tripal
  9853. *
  9854. * @see chado_insert_record()
  9855. * @see chado_update_record()
  9856. * @see chado_select_record()
  9857. * @see chado_generate_var()
  9858. * @see chado_expan_var()
  9859. *
  9860. * @return
  9861. * An array describing the 'magedocumentation' table
  9862. *
  9863. * @ingroup tripal_chado_v1.3_schema_api
  9864. *
  9865. */
  9866. function tripal_chado_chado_schema_v1_3_magedocumentation() {
  9867. $description = [
  9868. 'description' => '',
  9869. 'table' => 'magedocumentation',
  9870. 'fields' => [
  9871. 'magedocumentation_id' => [
  9872. 'size' => 'big',
  9873. 'type' => 'serial',
  9874. 'not null' => TRUE,
  9875. ],
  9876. 'mageml_id' => [
  9877. 'size' => 'big',
  9878. 'type' => 'int',
  9879. 'not null' => TRUE,
  9880. ],
  9881. 'tableinfo_id' => [
  9882. 'size' => 'big',
  9883. 'type' => 'int',
  9884. 'not null' => TRUE,
  9885. ],
  9886. 'row_id' => [
  9887. 'size' => 'normal',
  9888. 'type' => 'int',
  9889. 'not null' => TRUE,
  9890. ],
  9891. 'mageidentifier' => [
  9892. 'size' => 'normal',
  9893. 'type' => 'text',
  9894. 'not null' => TRUE,
  9895. ],
  9896. ],
  9897. 'indexes' => [
  9898. 'magedocumentation_idx1' => [
  9899. 0 => 'mageml_id',
  9900. ],
  9901. 'magedocumentation_idx2' => [
  9902. 0 => 'tableinfo_id',
  9903. ],
  9904. 'magedocumentation_idx3' => [
  9905. 0 => 'row_id',
  9906. ],
  9907. ],
  9908. 'primary key' => [
  9909. 0 => 'magedocumentation_id',
  9910. ],
  9911. 'foreign keys' => [
  9912. 'mageml' => [
  9913. 'table' => 'mageml',
  9914. 'columns' => [
  9915. 'mageml_id' => 'mageml_id',
  9916. ],
  9917. ],
  9918. 'tableinfo' => [
  9919. 'table' => 'tableinfo',
  9920. 'columns' => [
  9921. 'tableinfo_id' => 'tableinfo_id',
  9922. ],
  9923. ],
  9924. ],
  9925. 'referring_tables' => [
  9926. ],
  9927. ];
  9928. return $description;
  9929. }
  9930. /**
  9931. * Implements hook_chado_schema_v1_3_mageml()
  9932. *
  9933. * Purpose: To describe the structure of 'mageml' to tripal
  9934. *
  9935. * @see chado_insert_record()
  9936. * @see chado_update_record()
  9937. * @see chado_select_record()
  9938. * @see chado_generate_var()
  9939. * @see chado_expan_var()
  9940. *
  9941. * @return
  9942. * An array describing the 'mageml' table
  9943. *
  9944. * @ingroup tripal_chado_v1.3_schema_api
  9945. *
  9946. */
  9947. function tripal_chado_chado_schema_v1_3_mageml() {
  9948. $description = [
  9949. 'description' => '',
  9950. 'table' => 'mageml',
  9951. 'fields' => [
  9952. 'mageml_id' => [
  9953. 'size' => 'big',
  9954. 'type' => 'serial',
  9955. 'not null' => TRUE,
  9956. ],
  9957. 'mage_package' => [
  9958. 'size' => 'normal',
  9959. 'type' => 'text',
  9960. 'not null' => TRUE,
  9961. ],
  9962. 'mage_ml' => [
  9963. 'size' => 'normal',
  9964. 'type' => 'text',
  9965. 'not null' => TRUE,
  9966. ],
  9967. ],
  9968. 'primary key' => [
  9969. 0 => 'mageml_id',
  9970. ],
  9971. 'foreign keys' => [
  9972. ],
  9973. 'referring_tables' => [
  9974. 0 => 'magedocumentation',
  9975. ],
  9976. ];
  9977. return $description;
  9978. }
  9979. /**
  9980. * Implements hook_chado_schema_v1_3_materialized_view()
  9981. *
  9982. * Purpose: To describe the structure of 'materialized_view' to tripal
  9983. *
  9984. * @see chado_insert_record()
  9985. * @see chado_update_record()
  9986. * @see chado_select_record()
  9987. * @see chado_generate_var()
  9988. * @see chado_expan_var()
  9989. *
  9990. * @return
  9991. * An array describing the 'materialized_view' table
  9992. *
  9993. * @ingroup tripal_chado_v1.3_schema_api
  9994. *
  9995. */
  9996. function tripal_chado_chado_schema_v1_3_materialized_view() {
  9997. $description = [
  9998. 'description' => '',
  9999. 'table' => 'materialized_view',
  10000. 'fields' => [
  10001. 'materialized_view_id' => [
  10002. 'size' => 'normal',
  10003. 'type' => 'serial',
  10004. 'not null' => TRUE,
  10005. ],
  10006. 'last_update' => [
  10007. 'size' => 'normal',
  10008. 'type' => 'datetime',
  10009. 'not null' => FALSE,
  10010. ],
  10011. 'refresh_time' => [
  10012. 'size' => 'normal',
  10013. 'type' => 'int',
  10014. 'not null' => FALSE,
  10015. ],
  10016. 'name' => [
  10017. 'size' => 'normal',
  10018. 'type' => 'varchar',
  10019. 'length' => '64',
  10020. 'not null' => FALSE,
  10021. ],
  10022. 'mv_schema' => [
  10023. 'size' => 'normal',
  10024. 'type' => 'varchar',
  10025. 'length' => '64',
  10026. 'not null' => FALSE,
  10027. ],
  10028. 'mv_table' => [
  10029. 'size' => 'normal',
  10030. 'type' => 'varchar',
  10031. 'length' => '128',
  10032. 'not null' => FALSE,
  10033. ],
  10034. 'mv_specs' => [
  10035. 'size' => 'normal',
  10036. 'type' => 'text',
  10037. 'not null' => FALSE,
  10038. ],
  10039. 'indexed' => [
  10040. 'size' => 'normal',
  10041. 'type' => 'text',
  10042. 'not null' => FALSE,
  10043. ],
  10044. 'query' => [
  10045. 'size' => 'normal',
  10046. 'type' => 'text',
  10047. 'not null' => FALSE,
  10048. ],
  10049. 'special_index' => [
  10050. 'size' => 'normal',
  10051. 'type' => 'text',
  10052. 'not null' => FALSE,
  10053. ],
  10054. ],
  10055. 'unique keys' => [
  10056. 'materialized_view_name_key' => [
  10057. 0 => 'name',
  10058. ],
  10059. ],
  10060. 'foreign keys' => [
  10061. ],
  10062. 'referring_tables' => [
  10063. ],
  10064. ];
  10065. return $description;
  10066. }
  10067. /**
  10068. * Implements hook_chado_schema_v1_3_nd_experiment()
  10069. *
  10070. * Purpose: To describe the structure of 'nd_experiment' to tripal
  10071. *
  10072. * @see chado_insert_record()
  10073. * @see chado_update_record()
  10074. * @see chado_select_record()
  10075. * @see chado_generate_var()
  10076. * @see chado_expan_var()
  10077. *
  10078. * @return
  10079. * An array describing the 'nd_experiment' table
  10080. *
  10081. * @ingroup tripal_chado_v1.3_schema_api
  10082. *
  10083. */
  10084. function tripal_chado_chado_schema_v1_3_nd_experiment() {
  10085. $description = [
  10086. 'description' => '',
  10087. 'table' => 'nd_experiment',
  10088. 'fields' => [
  10089. 'nd_experiment_id' => [
  10090. 'size' => 'big',
  10091. 'type' => 'serial',
  10092. 'not null' => TRUE,
  10093. ],
  10094. 'nd_geolocation_id' => [
  10095. 'size' => 'big',
  10096. 'type' => 'int',
  10097. 'not null' => TRUE,
  10098. ],
  10099. 'type_id' => [
  10100. 'size' => 'big',
  10101. 'type' => 'int',
  10102. 'not null' => TRUE,
  10103. ],
  10104. ],
  10105. 'indexes' => [
  10106. 'nd_experiment_idx1' => [
  10107. 0 => 'nd_geolocation_id',
  10108. ],
  10109. 'nd_experiment_idx2' => [
  10110. 0 => 'type_id',
  10111. ],
  10112. ],
  10113. 'primary key' => [
  10114. 0 => 'nd_experiment_id',
  10115. ],
  10116. 'foreign keys' => [
  10117. 'nd_geolocation' => [
  10118. 'table' => 'nd_geolocation',
  10119. 'columns' => [
  10120. 'nd_geolocation_id' => 'nd_geolocation_id',
  10121. ],
  10122. ],
  10123. 'cvterm' => [
  10124. 'table' => 'cvterm',
  10125. 'columns' => [
  10126. 'type_id' => 'cvterm_id',
  10127. ],
  10128. ],
  10129. ],
  10130. 'referring_tables' => [
  10131. 0 => 'nd_experiment_analysis',
  10132. 1 => 'nd_experiment_contact',
  10133. 2 => 'nd_experiment_dbxref',
  10134. 3 => 'nd_experiment_genotype',
  10135. 4 => 'nd_experiment_phenotype',
  10136. 5 => 'nd_experiment_project',
  10137. 6 => 'nd_experimentprop',
  10138. 7 => 'nd_experiment_protocol',
  10139. 8 => 'nd_experiment_pub',
  10140. 9 => 'nd_experiment_stock',
  10141. ],
  10142. ];
  10143. return $description;
  10144. }
  10145. /**
  10146. * Implements hook_chado_schema_v1_3_nd_experiment_analysis()
  10147. *
  10148. * Purpose: To describe the structure of 'nd_experiment_analysis' to tripal
  10149. *
  10150. * @see chado_insert_record()
  10151. * @see chado_update_record()
  10152. * @see chado_select_record()
  10153. * @see chado_generate_var()
  10154. * @see chado_expan_var()
  10155. *
  10156. * @return
  10157. * An array describing the 'nd_experiment_analysis' table
  10158. *
  10159. * @ingroup tripal_chado_v1.3_schema_api
  10160. *
  10161. */
  10162. function tripal_chado_chado_schema_v1_3_nd_experiment_analysis() {
  10163. $description = [
  10164. 'description' => '',
  10165. 'table' => 'nd_experiment_analysis',
  10166. 'fields' => [
  10167. 'nd_experiment_analysis_id' => [
  10168. 'size' => 'big',
  10169. 'type' => 'serial',
  10170. 'not null' => TRUE,
  10171. ],
  10172. 'nd_experiment_id' => [
  10173. 'size' => 'big',
  10174. 'type' => 'int',
  10175. 'not null' => TRUE,
  10176. ],
  10177. 'analysis_id' => [
  10178. 'size' => 'big',
  10179. 'type' => 'int',
  10180. 'not null' => TRUE,
  10181. ],
  10182. 'type_id' => [
  10183. 'size' => 'big',
  10184. 'type' => 'int',
  10185. 'not null' => FALSE,
  10186. ],
  10187. ],
  10188. 'indexes' => [
  10189. 'nd_experiment_analysis_idx1' => [
  10190. 0 => 'nd_experiment_id',
  10191. ],
  10192. 'nd_experiment_analysis_idx2' => [
  10193. 0 => 'analysis_id',
  10194. ],
  10195. 'nd_experiment_analysis_idx3' => [
  10196. 0 => 'type_id',
  10197. ],
  10198. ],
  10199. 'primary key' => [
  10200. 0 => 'nd_experiment_analysis_id',
  10201. ],
  10202. 'foreign keys' => [
  10203. 'nd_experiment' => [
  10204. 'table' => 'nd_experiment',
  10205. 'columns' => [
  10206. 'nd_experiment_id' => 'nd_experiment_id',
  10207. ],
  10208. ],
  10209. 'analysis' => [
  10210. 'table' => 'analysis',
  10211. 'columns' => [
  10212. 'analysis_id' => 'analysis_id',
  10213. ],
  10214. ],
  10215. 'cvterm' => [
  10216. 'table' => 'cvterm',
  10217. 'columns' => [
  10218. 'type_id' => 'cvterm_id',
  10219. ],
  10220. ],
  10221. ],
  10222. 'referring_tables' => [
  10223. ],
  10224. ];
  10225. return $description;
  10226. }
  10227. /**
  10228. * Implements hook_chado_schema_v1_3_nd_experiment_contact()
  10229. *
  10230. * Purpose: To describe the structure of 'nd_experiment_contact' to tripal
  10231. *
  10232. * @see chado_insert_record()
  10233. * @see chado_update_record()
  10234. * @see chado_select_record()
  10235. * @see chado_generate_var()
  10236. * @see chado_expan_var()
  10237. *
  10238. * @return
  10239. * An array describing the 'nd_experiment_contact' table
  10240. *
  10241. * @ingroup tripal_chado_v1.3_schema_api
  10242. *
  10243. */
  10244. function tripal_chado_chado_schema_v1_3_nd_experiment_contact() {
  10245. $description = [
  10246. 'description' => '',
  10247. 'table' => 'nd_experiment_contact',
  10248. 'fields' => [
  10249. 'nd_experiment_contact_id' => [
  10250. 'size' => 'big',
  10251. 'type' => 'serial',
  10252. 'not null' => TRUE,
  10253. ],
  10254. 'nd_experiment_id' => [
  10255. 'size' => 'big',
  10256. 'type' => 'int',
  10257. 'not null' => TRUE,
  10258. ],
  10259. 'contact_id' => [
  10260. 'size' => 'big',
  10261. 'type' => 'int',
  10262. 'not null' => TRUE,
  10263. ],
  10264. ],
  10265. 'indexes' => [
  10266. 'nd_experiment_contact_idx1' => [
  10267. 0 => 'nd_experiment_id',
  10268. ],
  10269. 'nd_experiment_contact_idx2' => [
  10270. 0 => 'contact_id',
  10271. ],
  10272. ],
  10273. 'primary key' => [
  10274. 0 => 'nd_experiment_contact_id',
  10275. ],
  10276. 'foreign keys' => [
  10277. 'nd_experiment' => [
  10278. 'table' => 'nd_experiment',
  10279. 'columns' => [
  10280. 'nd_experiment_id' => 'nd_experiment_id',
  10281. ],
  10282. ],
  10283. 'contact' => [
  10284. 'table' => 'contact',
  10285. 'columns' => [
  10286. 'contact_id' => 'contact_id',
  10287. ],
  10288. ],
  10289. ],
  10290. 'referring_tables' => [
  10291. ],
  10292. ];
  10293. return $description;
  10294. }
  10295. /**
  10296. * Implements hook_chado_schema_v1_3_nd_experiment_dbxref()
  10297. *
  10298. * Purpose: To describe the structure of 'nd_experiment_dbxref' to tripal
  10299. *
  10300. * @see chado_insert_record()
  10301. * @see chado_update_record()
  10302. * @see chado_select_record()
  10303. * @see chado_generate_var()
  10304. * @see chado_expan_var()
  10305. *
  10306. * @return
  10307. * An array describing the 'nd_experiment_dbxref' table
  10308. *
  10309. * @ingroup tripal_chado_v1.3_schema_api
  10310. *
  10311. */
  10312. function tripal_chado_chado_schema_v1_3_nd_experiment_dbxref() {
  10313. $description = [
  10314. 'description' => '',
  10315. 'table' => 'nd_experiment_dbxref',
  10316. 'fields' => [
  10317. 'nd_experiment_dbxref_id' => [
  10318. 'size' => 'big',
  10319. 'type' => 'serial',
  10320. 'not null' => TRUE,
  10321. ],
  10322. 'nd_experiment_id' => [
  10323. 'size' => 'big',
  10324. 'type' => 'int',
  10325. 'not null' => TRUE,
  10326. ],
  10327. 'dbxref_id' => [
  10328. 'size' => 'big',
  10329. 'type' => 'int',
  10330. 'not null' => TRUE,
  10331. ],
  10332. ],
  10333. 'indexes' => [
  10334. 'nd_experiment_dbxref_idx1' => [
  10335. 0 => 'nd_experiment_id',
  10336. ],
  10337. 'nd_experiment_dbxref_idx2' => [
  10338. 0 => 'dbxref_id',
  10339. ],
  10340. ],
  10341. 'primary key' => [
  10342. 0 => 'nd_experiment_dbxref_id',
  10343. ],
  10344. 'foreign keys' => [
  10345. 'nd_experiment' => [
  10346. 'table' => 'nd_experiment',
  10347. 'columns' => [
  10348. 'nd_experiment_id' => 'nd_experiment_id',
  10349. ],
  10350. ],
  10351. 'dbxref' => [
  10352. 'table' => 'dbxref',
  10353. 'columns' => [
  10354. 'dbxref_id' => 'dbxref_id',
  10355. ],
  10356. ],
  10357. ],
  10358. 'referring_tables' => [
  10359. ],
  10360. ];
  10361. return $description;
  10362. }
  10363. /**
  10364. * Implements hook_chado_schema_v1_3_nd_experiment_genotype()
  10365. *
  10366. * Purpose: To describe the structure of 'nd_experiment_genotype' to tripal
  10367. *
  10368. * @see chado_insert_record()
  10369. * @see chado_update_record()
  10370. * @see chado_select_record()
  10371. * @see chado_generate_var()
  10372. * @see chado_expan_var()
  10373. *
  10374. * @return
  10375. * An array describing the 'nd_experiment_genotype' table
  10376. *
  10377. * @ingroup tripal_chado_v1.3_schema_api
  10378. *
  10379. */
  10380. function tripal_chado_chado_schema_v1_3_nd_experiment_genotype() {
  10381. $description = [
  10382. 'description' => '',
  10383. 'table' => 'nd_experiment_genotype',
  10384. 'fields' => [
  10385. 'nd_experiment_genotype_id' => [
  10386. 'size' => 'big',
  10387. 'type' => 'serial',
  10388. 'not null' => TRUE,
  10389. ],
  10390. 'nd_experiment_id' => [
  10391. 'size' => 'big',
  10392. 'type' => 'int',
  10393. 'not null' => TRUE,
  10394. ],
  10395. 'genotype_id' => [
  10396. 'size' => 'big',
  10397. 'type' => 'int',
  10398. 'not null' => TRUE,
  10399. ],
  10400. ],
  10401. 'unique keys' => [
  10402. 'nd_experiment_genotype_c1' => [
  10403. 0 => 'nd_experiment_id',
  10404. 1 => 'genotype_id',
  10405. ],
  10406. ],
  10407. 'indexes' => [
  10408. 'nd_experiment_genotype_idx1' => [
  10409. 0 => 'nd_experiment_id',
  10410. ],
  10411. 'nd_experiment_genotype_idx2' => [
  10412. 0 => 'genotype_id',
  10413. ],
  10414. ],
  10415. 'primary key' => [
  10416. 0 => 'nd_experiment_genotype_id',
  10417. ],
  10418. 'foreign keys' => [
  10419. 'nd_experiment' => [
  10420. 'table' => 'nd_experiment',
  10421. 'columns' => [
  10422. 'nd_experiment_id' => 'nd_experiment_id',
  10423. ],
  10424. ],
  10425. 'genotype' => [
  10426. 'table' => 'genotype',
  10427. 'columns' => [
  10428. 'genotype_id' => 'genotype_id',
  10429. ],
  10430. ],
  10431. ],
  10432. 'referring_tables' => [
  10433. ],
  10434. ];
  10435. return $description;
  10436. }
  10437. /**
  10438. * Implements hook_chado_schema_v1_3_nd_experiment_phenotype()
  10439. *
  10440. * Purpose: To describe the structure of 'nd_experiment_phenotype' to tripal
  10441. *
  10442. * @see chado_insert_record()
  10443. * @see chado_update_record()
  10444. * @see chado_select_record()
  10445. * @see chado_generate_var()
  10446. * @see chado_expan_var()
  10447. *
  10448. * @return
  10449. * An array describing the 'nd_experiment_phenotype' table
  10450. *
  10451. * @ingroup tripal_chado_v1.3_schema_api
  10452. *
  10453. */
  10454. function tripal_chado_chado_schema_v1_3_nd_experiment_phenotype() {
  10455. $description = [
  10456. 'description' => '',
  10457. 'table' => 'nd_experiment_phenotype',
  10458. 'fields' => [
  10459. 'nd_experiment_phenotype_id' => [
  10460. 'size' => 'big',
  10461. 'type' => 'serial',
  10462. 'not null' => TRUE,
  10463. ],
  10464. 'nd_experiment_id' => [
  10465. 'size' => 'big',
  10466. 'type' => 'int',
  10467. 'not null' => TRUE,
  10468. ],
  10469. 'phenotype_id' => [
  10470. 'size' => 'big',
  10471. 'type' => 'int',
  10472. 'not null' => TRUE,
  10473. ],
  10474. ],
  10475. 'unique keys' => [
  10476. 'nd_experiment_phenotype_c1' => [
  10477. 0 => 'nd_experiment_id',
  10478. 1 => 'phenotype_id',
  10479. ],
  10480. ],
  10481. 'indexes' => [
  10482. 'nd_experiment_phenotype_idx1' => [
  10483. 0 => 'nd_experiment_id',
  10484. ],
  10485. 'nd_experiment_phenotype_idx2' => [
  10486. 0 => 'phenotype_id',
  10487. ],
  10488. ],
  10489. 'primary key' => [
  10490. 0 => 'nd_experiment_phenotype_id',
  10491. ],
  10492. 'foreign keys' => [
  10493. 'nd_experiment' => [
  10494. 'table' => 'nd_experiment',
  10495. 'columns' => [
  10496. 'nd_experiment_id' => 'nd_experiment_id',
  10497. ],
  10498. ],
  10499. 'phenotype' => [
  10500. 'table' => 'phenotype',
  10501. 'columns' => [
  10502. 'phenotype_id' => 'phenotype_id',
  10503. ],
  10504. ],
  10505. ],
  10506. 'referring_tables' => [
  10507. ],
  10508. ];
  10509. return $description;
  10510. }
  10511. /**
  10512. * Implements hook_chado_schema_v1_3_nd_experiment_project()
  10513. *
  10514. * Purpose: To describe the structure of 'nd_experiment_project' to tripal
  10515. *
  10516. * @see chado_insert_record()
  10517. * @see chado_update_record()
  10518. * @see chado_select_record()
  10519. * @see chado_generate_var()
  10520. * @see chado_expan_var()
  10521. *
  10522. * @return
  10523. * An array describing the 'nd_experiment_project' table
  10524. *
  10525. * @ingroup tripal_chado_v1.3_schema_api
  10526. *
  10527. */
  10528. function tripal_chado_chado_schema_v1_3_nd_experiment_project() {
  10529. $description = [
  10530. 'description' => '',
  10531. 'table' => 'nd_experiment_project',
  10532. 'fields' => [
  10533. 'nd_experiment_project_id' => [
  10534. 'size' => 'big',
  10535. 'type' => 'serial',
  10536. 'not null' => TRUE,
  10537. ],
  10538. 'project_id' => [
  10539. 'size' => 'big',
  10540. 'type' => 'int',
  10541. 'not null' => TRUE,
  10542. ],
  10543. 'nd_experiment_id' => [
  10544. 'size' => 'big',
  10545. 'type' => 'int',
  10546. 'not null' => TRUE,
  10547. ],
  10548. ],
  10549. 'unique keys' => [
  10550. 'nd_experiment_project_c1' => [
  10551. 0 => 'project_id',
  10552. 1 => 'nd_experiment_id',
  10553. ],
  10554. ],
  10555. 'indexes' => [
  10556. 'nd_experiment_project_idx1' => [
  10557. 0 => 'project_id',
  10558. ],
  10559. 'nd_experiment_project_idx2' => [
  10560. 0 => 'nd_experiment_id',
  10561. ],
  10562. ],
  10563. 'primary key' => [
  10564. 0 => 'nd_experiment_project_id',
  10565. ],
  10566. 'foreign keys' => [
  10567. 'project' => [
  10568. 'table' => 'project',
  10569. 'columns' => [
  10570. 'project_id' => 'project_id',
  10571. ],
  10572. ],
  10573. 'nd_experiment' => [
  10574. 'table' => 'nd_experiment',
  10575. 'columns' => [
  10576. 'nd_experiment_id' => 'nd_experiment_id',
  10577. ],
  10578. ],
  10579. ],
  10580. 'referring_tables' => [
  10581. ],
  10582. ];
  10583. return $description;
  10584. }
  10585. /**
  10586. * Implements hook_chado_schema_v1_3_nd_experimentprop()
  10587. *
  10588. * Purpose: To describe the structure of 'nd_experimentprop' to tripal
  10589. *
  10590. * @see chado_insert_record()
  10591. * @see chado_update_record()
  10592. * @see chado_select_record()
  10593. * @see chado_generate_var()
  10594. * @see chado_expan_var()
  10595. *
  10596. * @return
  10597. * An array describing the 'nd_experimentprop' table
  10598. *
  10599. * @ingroup tripal_chado_v1.3_schema_api
  10600. *
  10601. */
  10602. function tripal_chado_chado_schema_v1_3_nd_experimentprop() {
  10603. $description = [
  10604. 'description' => '',
  10605. 'table' => 'nd_experimentprop',
  10606. 'fields' => [
  10607. 'nd_experimentprop_id' => [
  10608. 'size' => 'big',
  10609. 'type' => 'serial',
  10610. 'not null' => TRUE,
  10611. ],
  10612. 'nd_experiment_id' => [
  10613. 'size' => 'big',
  10614. 'type' => 'int',
  10615. 'not null' => TRUE,
  10616. ],
  10617. 'type_id' => [
  10618. 'size' => 'big',
  10619. 'type' => 'int',
  10620. 'not null' => TRUE,
  10621. ],
  10622. 'value' => [
  10623. 'size' => 'normal',
  10624. 'type' => 'text',
  10625. 'not null' => FALSE,
  10626. ],
  10627. 'rank' => [
  10628. 'size' => 'normal',
  10629. 'type' => 'int',
  10630. 'not null' => TRUE,
  10631. 'default' => 0,
  10632. ],
  10633. ],
  10634. 'unique keys' => [
  10635. 'nd_experimentprop_c1' => [
  10636. 0 => 'nd_experiment_id',
  10637. 1 => 'type_id',
  10638. 2 => 'rank',
  10639. ],
  10640. ],
  10641. 'indexes' => [
  10642. 'nd_experimentprop_idx1' => [
  10643. 0 => 'nd_experiment_id',
  10644. ],
  10645. 'nd_experimentprop_idx2' => [
  10646. 0 => 'type_id',
  10647. ],
  10648. ],
  10649. 'primary key' => [
  10650. 0 => 'nd_experimentprop_id',
  10651. ],
  10652. 'foreign keys' => [
  10653. 'nd_experiment' => [
  10654. 'table' => 'nd_experiment',
  10655. 'columns' => [
  10656. 'nd_experiment_id' => 'nd_experiment_id',
  10657. ],
  10658. ],
  10659. 'cvterm' => [
  10660. 'table' => 'cvterm',
  10661. 'columns' => [
  10662. 'type_id' => 'cvterm_id',
  10663. ],
  10664. ],
  10665. ],
  10666. 'referring_tables' => [
  10667. ],
  10668. ];
  10669. return $description;
  10670. }
  10671. /**
  10672. * Implements hook_chado_schema_v1_3_nd_experiment_protocol()
  10673. *
  10674. * Purpose: To describe the structure of 'nd_experiment_protocol' to tripal
  10675. *
  10676. * @see chado_insert_record()
  10677. * @see chado_update_record()
  10678. * @see chado_select_record()
  10679. * @see chado_generate_var()
  10680. * @see chado_expan_var()
  10681. *
  10682. * @return
  10683. * An array describing the 'nd_experiment_protocol' table
  10684. *
  10685. * @ingroup tripal_chado_v1.3_schema_api
  10686. *
  10687. */
  10688. function tripal_chado_chado_schema_v1_3_nd_experiment_protocol() {
  10689. $description = [
  10690. 'description' => '',
  10691. 'table' => 'nd_experiment_protocol',
  10692. 'fields' => [
  10693. 'nd_experiment_protocol_id' => [
  10694. 'size' => 'big',
  10695. 'type' => 'serial',
  10696. 'not null' => TRUE,
  10697. ],
  10698. 'nd_experiment_id' => [
  10699. 'size' => 'big',
  10700. 'type' => 'int',
  10701. 'not null' => TRUE,
  10702. ],
  10703. 'nd_protocol_id' => [
  10704. 'size' => 'big',
  10705. 'type' => 'int',
  10706. 'not null' => TRUE,
  10707. ],
  10708. ],
  10709. 'indexes' => [
  10710. 'nd_experiment_protocol_idx1' => [
  10711. 0 => 'nd_experiment_id',
  10712. ],
  10713. 'nd_experiment_protocol_idx2' => [
  10714. 0 => 'nd_protocol_id',
  10715. ],
  10716. ],
  10717. 'primary key' => [
  10718. 0 => 'nd_experiment_protocol_id',
  10719. ],
  10720. 'foreign keys' => [
  10721. 'nd_experiment' => [
  10722. 'table' => 'nd_experiment',
  10723. 'columns' => [
  10724. 'nd_experiment_id' => 'nd_experiment_id',
  10725. ],
  10726. ],
  10727. 'nd_protocol' => [
  10728. 'table' => 'nd_protocol',
  10729. 'columns' => [
  10730. 'nd_protocol_id' => 'nd_protocol_id',
  10731. ],
  10732. ],
  10733. ],
  10734. 'referring_tables' => [
  10735. ],
  10736. ];
  10737. return $description;
  10738. }
  10739. /**
  10740. * Implements hook_chado_schema_v1_3_nd_experiment_pub()
  10741. *
  10742. * Purpose: To describe the structure of 'nd_experiment_pub' to tripal
  10743. *
  10744. * @see chado_insert_record()
  10745. * @see chado_update_record()
  10746. * @see chado_select_record()
  10747. * @see chado_generate_var()
  10748. * @see chado_expan_var()
  10749. *
  10750. * @return
  10751. * An array describing the 'nd_experiment_pub' table
  10752. *
  10753. * @ingroup tripal_chado_v1.3_schema_api
  10754. *
  10755. */
  10756. function tripal_chado_chado_schema_v1_3_nd_experiment_pub() {
  10757. $description = [
  10758. 'description' => '',
  10759. 'table' => 'nd_experiment_pub',
  10760. 'fields' => [
  10761. 'nd_experiment_pub_id' => [
  10762. 'size' => 'big',
  10763. 'type' => 'serial',
  10764. 'not null' => TRUE,
  10765. ],
  10766. 'nd_experiment_id' => [
  10767. 'size' => 'big',
  10768. 'type' => 'int',
  10769. 'not null' => TRUE,
  10770. ],
  10771. 'pub_id' => [
  10772. 'size' => 'big',
  10773. 'type' => 'int',
  10774. 'not null' => TRUE,
  10775. ],
  10776. ],
  10777. 'unique keys' => [
  10778. 'nd_experiment_pub_c1' => [
  10779. 0 => 'nd_experiment_id',
  10780. 1 => 'pub_id',
  10781. ],
  10782. ],
  10783. 'indexes' => [
  10784. 'nd_experiment_pub_idx1' => [
  10785. 0 => 'nd_experiment_id',
  10786. ],
  10787. 'nd_experiment_pub_idx2' => [
  10788. 0 => 'pub_id',
  10789. ],
  10790. ],
  10791. 'primary key' => [
  10792. 0 => 'nd_experiment_pub_id',
  10793. ],
  10794. 'foreign keys' => [
  10795. 'nd_experiment' => [
  10796. 'table' => 'nd_experiment',
  10797. 'columns' => [
  10798. 'nd_experiment_id' => 'nd_experiment_id',
  10799. ],
  10800. ],
  10801. 'pub' => [
  10802. 'table' => 'pub',
  10803. 'columns' => [
  10804. 'pub_id' => 'pub_id',
  10805. ],
  10806. ],
  10807. ],
  10808. 'referring_tables' => [
  10809. ],
  10810. ];
  10811. return $description;
  10812. }
  10813. /**
  10814. * Implements hook_chado_schema_v1_3_nd_experiment_stock()
  10815. *
  10816. * Purpose: To describe the structure of 'nd_experiment_stock' to tripal
  10817. *
  10818. * @see chado_insert_record()
  10819. * @see chado_update_record()
  10820. * @see chado_select_record()
  10821. * @see chado_generate_var()
  10822. * @see chado_expan_var()
  10823. *
  10824. * @return
  10825. * An array describing the 'nd_experiment_stock' table
  10826. *
  10827. * @ingroup tripal_chado_v1.3_schema_api
  10828. *
  10829. */
  10830. function tripal_chado_chado_schema_v1_3_nd_experiment_stock() {
  10831. $description = [
  10832. 'description' => '',
  10833. 'table' => 'nd_experiment_stock',
  10834. 'fields' => [
  10835. 'nd_experiment_stock_id' => [
  10836. 'size' => 'big',
  10837. 'type' => 'serial',
  10838. 'not null' => TRUE,
  10839. ],
  10840. 'nd_experiment_id' => [
  10841. 'size' => 'big',
  10842. 'type' => 'int',
  10843. 'not null' => TRUE,
  10844. ],
  10845. 'stock_id' => [
  10846. 'size' => 'big',
  10847. 'type' => 'int',
  10848. 'not null' => TRUE,
  10849. ],
  10850. 'type_id' => [
  10851. 'size' => 'big',
  10852. 'type' => 'int',
  10853. 'not null' => TRUE,
  10854. ],
  10855. ],
  10856. 'indexes' => [
  10857. 'nd_experiment_stock_idx1' => [
  10858. 0 => 'nd_experiment_id',
  10859. ],
  10860. 'nd_experiment_stock_idx2' => [
  10861. 0 => 'stock_id',
  10862. ],
  10863. 'nd_experiment_stock_idx3' => [
  10864. 0 => 'type_id',
  10865. ],
  10866. ],
  10867. 'primary key' => [
  10868. 0 => 'nd_experiment_stock_id',
  10869. ],
  10870. 'foreign keys' => [
  10871. 'nd_experiment' => [
  10872. 'table' => 'nd_experiment',
  10873. 'columns' => [
  10874. 'nd_experiment_id' => 'nd_experiment_id',
  10875. ],
  10876. ],
  10877. 'stock' => [
  10878. 'table' => 'stock',
  10879. 'columns' => [
  10880. 'stock_id' => 'stock_id',
  10881. ],
  10882. ],
  10883. 'cvterm' => [
  10884. 'table' => 'cvterm',
  10885. 'columns' => [
  10886. 'type_id' => 'cvterm_id',
  10887. ],
  10888. ],
  10889. ],
  10890. 'referring_tables' => [
  10891. 0 => 'nd_experiment_stock_dbxref',
  10892. 1 => 'nd_experiment_stockprop',
  10893. ],
  10894. ];
  10895. return $description;
  10896. }
  10897. /**
  10898. * Implements hook_chado_schema_v1_3_nd_experiment_stock_dbxref()
  10899. *
  10900. * Purpose: To describe the structure of 'nd_experiment_stock_dbxref' to tripal
  10901. *
  10902. * @see chado_insert_record()
  10903. * @see chado_update_record()
  10904. * @see chado_select_record()
  10905. * @see chado_generate_var()
  10906. * @see chado_expan_var()
  10907. *
  10908. * @return
  10909. * An array describing the 'nd_experiment_stock_dbxref' table
  10910. *
  10911. * @ingroup tripal_chado_v1.3_schema_api
  10912. *
  10913. */
  10914. function tripal_chado_chado_schema_v1_3_nd_experiment_stock_dbxref() {
  10915. $description = [
  10916. 'description' => '',
  10917. 'table' => 'nd_experiment_stock_dbxref',
  10918. 'fields' => [
  10919. 'nd_experiment_stock_dbxref_id' => [
  10920. 'size' => 'big',
  10921. 'type' => 'serial',
  10922. 'not null' => TRUE,
  10923. ],
  10924. 'nd_experiment_stock_id' => [
  10925. 'size' => 'big',
  10926. 'type' => 'int',
  10927. 'not null' => TRUE,
  10928. ],
  10929. 'dbxref_id' => [
  10930. 'size' => 'big',
  10931. 'type' => 'int',
  10932. 'not null' => TRUE,
  10933. ],
  10934. ],
  10935. 'indexes' => [
  10936. 'nd_experiment_stock_dbxref_idx1' => [
  10937. 0 => 'nd_experiment_stock_id',
  10938. ],
  10939. 'nd_experiment_stock_dbxref_idx2' => [
  10940. 0 => 'dbxref_id',
  10941. ],
  10942. ],
  10943. 'primary key' => [
  10944. 0 => 'nd_experiment_stock_dbxref_id',
  10945. ],
  10946. 'foreign keys' => [
  10947. 'nd_experiment_stock' => [
  10948. 'table' => 'nd_experiment_stock',
  10949. 'columns' => [
  10950. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  10951. ],
  10952. ],
  10953. 'dbxref' => [
  10954. 'table' => 'dbxref',
  10955. 'columns' => [
  10956. 'dbxref_id' => 'dbxref_id',
  10957. ],
  10958. ],
  10959. ],
  10960. 'referring_tables' => [
  10961. ],
  10962. ];
  10963. return $description;
  10964. }
  10965. /**
  10966. * Implements hook_chado_schema_v1_3_nd_experiment_stockprop()
  10967. *
  10968. * Purpose: To describe the structure of 'nd_experiment_stockprop' to tripal
  10969. *
  10970. * @see chado_insert_record()
  10971. * @see chado_update_record()
  10972. * @see chado_select_record()
  10973. * @see chado_generate_var()
  10974. * @see chado_expan_var()
  10975. *
  10976. * @return
  10977. * An array describing the 'nd_experiment_stockprop' table
  10978. *
  10979. * @ingroup tripal_chado_v1.3_schema_api
  10980. *
  10981. */
  10982. function tripal_chado_chado_schema_v1_3_nd_experiment_stockprop() {
  10983. $description = [
  10984. 'description' => '',
  10985. 'table' => 'nd_experiment_stockprop',
  10986. 'fields' => [
  10987. 'nd_experiment_stockprop_id' => [
  10988. 'size' => 'big',
  10989. 'type' => 'serial',
  10990. 'not null' => TRUE,
  10991. ],
  10992. 'nd_experiment_stock_id' => [
  10993. 'size' => 'big',
  10994. 'type' => 'int',
  10995. 'not null' => TRUE,
  10996. ],
  10997. 'type_id' => [
  10998. 'size' => 'big',
  10999. 'type' => 'int',
  11000. 'not null' => TRUE,
  11001. ],
  11002. 'value' => [
  11003. 'size' => 'normal',
  11004. 'type' => 'text',
  11005. 'not null' => FALSE,
  11006. ],
  11007. 'rank' => [
  11008. 'size' => 'normal',
  11009. 'type' => 'int',
  11010. 'not null' => TRUE,
  11011. 'default' => 0,
  11012. ],
  11013. ],
  11014. 'unique keys' => [
  11015. 'nd_experiment_stockprop_c1' => [
  11016. 0 => 'nd_experiment_stock_id',
  11017. 1 => 'type_id',
  11018. 2 => 'rank',
  11019. ],
  11020. ],
  11021. 'indexes' => [
  11022. 'nd_experiment_stockprop_idx1' => [
  11023. 0 => 'nd_experiment_stock_id',
  11024. ],
  11025. 'nd_experiment_stockprop_idx2' => [
  11026. 0 => 'type_id',
  11027. ],
  11028. ],
  11029. 'primary key' => [
  11030. 0 => 'nd_experiment_stockprop_id',
  11031. ],
  11032. 'foreign keys' => [
  11033. 'nd_experiment_stock' => [
  11034. 'table' => 'nd_experiment_stock',
  11035. 'columns' => [
  11036. 'nd_experiment_stock_id' => 'nd_experiment_stock_id',
  11037. ],
  11038. ],
  11039. 'cvterm' => [
  11040. 'table' => 'cvterm',
  11041. 'columns' => [
  11042. 'type_id' => 'cvterm_id',
  11043. ],
  11044. ],
  11045. ],
  11046. 'referring_tables' => [
  11047. ],
  11048. ];
  11049. return $description;
  11050. }
  11051. /**
  11052. * Implements hook_chado_schema_v1_3_nd_geolocation()
  11053. *
  11054. * Purpose: To describe the structure of 'nd_geolocation' to tripal
  11055. *
  11056. * @see chado_insert_record()
  11057. * @see chado_update_record()
  11058. * @see chado_select_record()
  11059. * @see chado_generate_var()
  11060. * @see chado_expan_var()
  11061. *
  11062. * @return
  11063. * An array describing the 'nd_geolocation' table
  11064. *
  11065. * @ingroup tripal_chado_v1.3_schema_api
  11066. *
  11067. */
  11068. function tripal_chado_chado_schema_v1_3_nd_geolocation() {
  11069. $description = [
  11070. 'description' => '',
  11071. 'table' => 'nd_geolocation',
  11072. 'fields' => [
  11073. 'nd_geolocation_id' => [
  11074. 'size' => 'big',
  11075. 'type' => 'serial',
  11076. 'not null' => TRUE,
  11077. ],
  11078. 'description' => [
  11079. 'size' => 'normal',
  11080. 'type' => 'text',
  11081. 'not null' => FALSE,
  11082. ],
  11083. 'latitude' => [
  11084. 'size' => 'normal',
  11085. 'type' => 'float',
  11086. 'not null' => FALSE,
  11087. ],
  11088. 'longitude' => [
  11089. 'size' => 'normal',
  11090. 'type' => 'float',
  11091. 'not null' => FALSE,
  11092. ],
  11093. 'geodetic_datum' => [
  11094. 'size' => 'normal',
  11095. 'type' => 'varchar',
  11096. 'length' => '32',
  11097. 'not null' => FALSE,
  11098. ],
  11099. 'altitude' => [
  11100. 'size' => 'normal',
  11101. 'type' => 'float',
  11102. 'not null' => FALSE,
  11103. ],
  11104. ],
  11105. 'indexes' => [
  11106. 'nd_geolocation_idx1' => [
  11107. 0 => 'latitude',
  11108. ],
  11109. 'nd_geolocation_idx2' => [
  11110. 0 => 'longitude',
  11111. ],
  11112. 'nd_geolocation_idx3' => [
  11113. 0 => 'altitude',
  11114. ],
  11115. ],
  11116. 'primary key' => [
  11117. 0 => 'nd_geolocation_id',
  11118. ],
  11119. 'foreign keys' => [
  11120. ],
  11121. 'referring_tables' => [
  11122. 0 => 'nd_experiment',
  11123. 1 => 'nd_geolocationprop',
  11124. ],
  11125. ];
  11126. return $description;
  11127. }
  11128. /**
  11129. * Implements hook_chado_schema_v1_3_nd_geolocationprop()
  11130. *
  11131. * Purpose: To describe the structure of 'nd_geolocationprop' to tripal
  11132. *
  11133. * @see chado_insert_record()
  11134. * @see chado_update_record()
  11135. * @see chado_select_record()
  11136. * @see chado_generate_var()
  11137. * @see chado_expan_var()
  11138. *
  11139. * @return
  11140. * An array describing the 'nd_geolocationprop' table
  11141. *
  11142. * @ingroup tripal_chado_v1.3_schema_api
  11143. *
  11144. */
  11145. function tripal_chado_chado_schema_v1_3_nd_geolocationprop() {
  11146. $description = [
  11147. 'description' => '',
  11148. 'table' => 'nd_geolocationprop',
  11149. 'fields' => [
  11150. 'nd_geolocationprop_id' => [
  11151. 'size' => 'big',
  11152. 'type' => 'serial',
  11153. 'not null' => TRUE,
  11154. ],
  11155. 'nd_geolocation_id' => [
  11156. 'size' => 'big',
  11157. 'type' => 'int',
  11158. 'not null' => TRUE,
  11159. ],
  11160. 'type_id' => [
  11161. 'size' => 'big',
  11162. 'type' => 'int',
  11163. 'not null' => TRUE,
  11164. ],
  11165. 'value' => [
  11166. 'size' => 'normal',
  11167. 'type' => 'text',
  11168. 'not null' => FALSE,
  11169. ],
  11170. 'rank' => [
  11171. 'size' => 'normal',
  11172. 'type' => 'int',
  11173. 'not null' => TRUE,
  11174. 'default' => 0,
  11175. ],
  11176. ],
  11177. 'unique keys' => [
  11178. 'nd_geolocationprop_c1' => [
  11179. 0 => 'nd_geolocation_id',
  11180. 1 => 'type_id',
  11181. 2 => 'rank',
  11182. ],
  11183. ],
  11184. 'indexes' => [
  11185. 'nd_geolocationprop_idx1' => [
  11186. 0 => 'nd_geolocation_id',
  11187. ],
  11188. 'nd_geolocationprop_idx2' => [
  11189. 0 => 'type_id',
  11190. ],
  11191. ],
  11192. 'primary key' => [
  11193. 0 => 'nd_geolocationprop_id',
  11194. ],
  11195. 'foreign keys' => [
  11196. 'nd_geolocation' => [
  11197. 'table' => 'nd_geolocation',
  11198. 'columns' => [
  11199. 'nd_geolocation_id' => 'nd_geolocation_id',
  11200. ],
  11201. ],
  11202. 'cvterm' => [
  11203. 'table' => 'cvterm',
  11204. 'columns' => [
  11205. 'type_id' => 'cvterm_id',
  11206. ],
  11207. ],
  11208. ],
  11209. 'referring_tables' => [
  11210. ],
  11211. ];
  11212. return $description;
  11213. }
  11214. /**
  11215. * Implements hook_chado_schema_v1_3_nd_protocol()
  11216. *
  11217. * Purpose: To describe the structure of 'nd_protocol' to tripal
  11218. *
  11219. * @see chado_insert_record()
  11220. * @see chado_update_record()
  11221. * @see chado_select_record()
  11222. * @see chado_generate_var()
  11223. * @see chado_expan_var()
  11224. *
  11225. * @return
  11226. * An array describing the 'nd_protocol' table
  11227. *
  11228. * @ingroup tripal_chado_v1.3_schema_api
  11229. *
  11230. */
  11231. function tripal_chado_chado_schema_v1_3_nd_protocol() {
  11232. $description = [
  11233. 'description' => '',
  11234. 'table' => 'nd_protocol',
  11235. 'fields' => [
  11236. 'nd_protocol_id' => [
  11237. 'size' => 'big',
  11238. 'type' => 'serial',
  11239. 'not null' => TRUE,
  11240. ],
  11241. 'name' => [
  11242. 'size' => 'normal',
  11243. 'type' => 'varchar',
  11244. 'length' => '255',
  11245. 'not null' => TRUE,
  11246. ],
  11247. 'type_id' => [
  11248. 'size' => 'big',
  11249. 'type' => 'int',
  11250. 'not null' => TRUE,
  11251. ],
  11252. ],
  11253. 'indexes' => [
  11254. 'nd_protocol_idx1' => [
  11255. 0 => 'type_id',
  11256. ],
  11257. ],
  11258. 'unique keys' => [
  11259. 'nd_protocol_name_key' => [
  11260. 0 => 'name',
  11261. ],
  11262. ],
  11263. 'primary key' => [
  11264. 0 => 'nd_protocol_id',
  11265. ],
  11266. 'foreign keys' => [
  11267. 'cvterm' => [
  11268. 'table' => 'cvterm',
  11269. 'columns' => [
  11270. 'type_id' => 'cvterm_id',
  11271. ],
  11272. ],
  11273. ],
  11274. 'referring_tables' => [
  11275. 0 => 'nd_experiment_protocol',
  11276. 1 => 'nd_protocolprop',
  11277. 2 => 'nd_protocol_reagent',
  11278. ],
  11279. ];
  11280. return $description;
  11281. }
  11282. /**
  11283. * Implements hook_chado_schema_v1_3_nd_protocolprop()
  11284. *
  11285. * Purpose: To describe the structure of 'nd_protocolprop' to tripal
  11286. *
  11287. * @see chado_insert_record()
  11288. * @see chado_update_record()
  11289. * @see chado_select_record()
  11290. * @see chado_generate_var()
  11291. * @see chado_expan_var()
  11292. *
  11293. * @return
  11294. * An array describing the 'nd_protocolprop' table
  11295. *
  11296. * @ingroup tripal_chado_v1.3_schema_api
  11297. *
  11298. */
  11299. function tripal_chado_chado_schema_v1_3_nd_protocolprop() {
  11300. $description = [
  11301. 'description' => '',
  11302. 'table' => 'nd_protocolprop',
  11303. 'fields' => [
  11304. 'nd_protocolprop_id' => [
  11305. 'size' => 'big',
  11306. 'type' => 'serial',
  11307. 'not null' => TRUE,
  11308. ],
  11309. 'nd_protocol_id' => [
  11310. 'size' => 'big',
  11311. 'type' => 'int',
  11312. 'not null' => TRUE,
  11313. ],
  11314. 'type_id' => [
  11315. 'size' => 'big',
  11316. 'type' => 'int',
  11317. 'not null' => TRUE,
  11318. ],
  11319. 'value' => [
  11320. 'size' => 'normal',
  11321. 'type' => 'text',
  11322. 'not null' => FALSE,
  11323. ],
  11324. 'rank' => [
  11325. 'size' => 'normal',
  11326. 'type' => 'int',
  11327. 'not null' => TRUE,
  11328. 'default' => 0,
  11329. ],
  11330. ],
  11331. 'unique keys' => [
  11332. 'nd_protocolprop_c1' => [
  11333. 0 => 'nd_protocol_id',
  11334. 1 => 'type_id',
  11335. 2 => 'rank',
  11336. ],
  11337. ],
  11338. 'indexes' => [
  11339. 'nd_protocolprop_idx1' => [
  11340. 0 => 'nd_protocol_id',
  11341. ],
  11342. 'nd_protocolprop_idx2' => [
  11343. 0 => 'type_id',
  11344. ],
  11345. ],
  11346. 'primary key' => [
  11347. 0 => 'nd_protocolprop_id',
  11348. ],
  11349. 'foreign keys' => [
  11350. 'nd_protocol' => [
  11351. 'table' => 'nd_protocol',
  11352. 'columns' => [
  11353. 'nd_protocol_id' => 'nd_protocol_id',
  11354. ],
  11355. ],
  11356. 'cvterm' => [
  11357. 'table' => 'cvterm',
  11358. 'columns' => [
  11359. 'type_id' => 'cvterm_id',
  11360. ],
  11361. ],
  11362. ],
  11363. 'referring_tables' => [
  11364. ],
  11365. ];
  11366. return $description;
  11367. }
  11368. /**
  11369. * Implements hook_chado_schema_v1_3_nd_protocol_reagent()
  11370. *
  11371. * Purpose: To describe the structure of 'nd_protocol_reagent' to tripal
  11372. *
  11373. * @see chado_insert_record()
  11374. * @see chado_update_record()
  11375. * @see chado_select_record()
  11376. * @see chado_generate_var()
  11377. * @see chado_expan_var()
  11378. *
  11379. * @return
  11380. * An array describing the 'nd_protocol_reagent' table
  11381. *
  11382. * @ingroup tripal_chado_v1.3_schema_api
  11383. *
  11384. */
  11385. function tripal_chado_chado_schema_v1_3_nd_protocol_reagent() {
  11386. $description = [
  11387. 'description' => '',
  11388. 'table' => 'nd_protocol_reagent',
  11389. 'fields' => [
  11390. 'nd_protocol_reagent_id' => [
  11391. 'size' => 'big',
  11392. 'type' => 'serial',
  11393. 'not null' => TRUE,
  11394. ],
  11395. 'nd_protocol_id' => [
  11396. 'size' => 'big',
  11397. 'type' => 'int',
  11398. 'not null' => TRUE,
  11399. ],
  11400. 'reagent_id' => [
  11401. 'size' => 'big',
  11402. 'type' => 'int',
  11403. 'not null' => TRUE,
  11404. ],
  11405. 'type_id' => [
  11406. 'size' => 'big',
  11407. 'type' => 'int',
  11408. 'not null' => TRUE,
  11409. ],
  11410. ],
  11411. 'indexes' => [
  11412. 'nd_protocol_reagent_idx1' => [
  11413. 0 => 'nd_protocol_id',
  11414. ],
  11415. 'nd_protocol_reagent_idx2' => [
  11416. 0 => 'reagent_id',
  11417. ],
  11418. 'nd_protocol_reagent_idx3' => [
  11419. 0 => 'type_id',
  11420. ],
  11421. ],
  11422. 'primary key' => [
  11423. 0 => 'nd_protocol_reagent_id',
  11424. ],
  11425. 'foreign keys' => [
  11426. 'nd_protocol' => [
  11427. 'table' => 'nd_protocol',
  11428. 'columns' => [
  11429. 'nd_protocol_id' => 'nd_protocol_id',
  11430. ],
  11431. ],
  11432. 'nd_reagent' => [
  11433. 'table' => 'nd_reagent',
  11434. 'columns' => [
  11435. 'reagent_id' => 'nd_reagent_id',
  11436. ],
  11437. ],
  11438. 'cvterm' => [
  11439. 'table' => 'cvterm',
  11440. 'columns' => [
  11441. 'type_id' => 'cvterm_id',
  11442. ],
  11443. ],
  11444. ],
  11445. 'referring_tables' => [
  11446. ],
  11447. ];
  11448. return $description;
  11449. }
  11450. /**
  11451. * Implements hook_chado_schema_v1_3_nd_reagent()
  11452. *
  11453. * Purpose: To describe the structure of 'nd_reagent' to tripal
  11454. *
  11455. * @see chado_insert_record()
  11456. * @see chado_update_record()
  11457. * @see chado_select_record()
  11458. * @see chado_generate_var()
  11459. * @see chado_expan_var()
  11460. *
  11461. * @return
  11462. * An array describing the 'nd_reagent' table
  11463. *
  11464. * @ingroup tripal_chado_v1.3_schema_api
  11465. *
  11466. */
  11467. function tripal_chado_chado_schema_v1_3_nd_reagent() {
  11468. $description = [
  11469. 'description' => '',
  11470. 'table' => 'nd_reagent',
  11471. 'fields' => [
  11472. 'nd_reagent_id' => [
  11473. 'size' => 'big',
  11474. 'type' => 'serial',
  11475. 'not null' => TRUE,
  11476. ],
  11477. 'name' => [
  11478. 'size' => 'normal',
  11479. 'type' => 'varchar',
  11480. 'length' => '80',
  11481. 'not null' => TRUE,
  11482. ],
  11483. 'type_id' => [
  11484. 'size' => 'big',
  11485. 'type' => 'int',
  11486. 'not null' => TRUE,
  11487. ],
  11488. 'feature_id' => [
  11489. 'size' => 'big',
  11490. 'type' => 'int',
  11491. 'not null' => FALSE,
  11492. ],
  11493. ],
  11494. 'indexes' => [
  11495. 'nd_reagent_idx1' => [
  11496. 0 => 'type_id',
  11497. ],
  11498. 'nd_reagent_idx2' => [
  11499. 0 => 'feature_id',
  11500. ],
  11501. ],
  11502. 'primary key' => [
  11503. 0 => 'nd_reagent_id',
  11504. ],
  11505. 'foreign keys' => [
  11506. 'cvterm' => [
  11507. 'table' => 'cvterm',
  11508. 'columns' => [
  11509. 'type_id' => 'cvterm_id',
  11510. ],
  11511. ],
  11512. 'feature' => [
  11513. 'table' => 'feature',
  11514. 'columns' => [
  11515. 'feature_id' => 'feature_id',
  11516. ],
  11517. ],
  11518. ],
  11519. 'referring_tables' => [
  11520. 0 => 'nd_protocol_reagent',
  11521. 1 => 'nd_reagentprop',
  11522. 2 => 'nd_reagent_relationship',
  11523. ],
  11524. ];
  11525. return $description;
  11526. }
  11527. /**
  11528. * Implements hook_chado_schema_v1_3_nd_reagentprop()
  11529. *
  11530. * Purpose: To describe the structure of 'nd_reagentprop' to tripal
  11531. *
  11532. * @see chado_insert_record()
  11533. * @see chado_update_record()
  11534. * @see chado_select_record()
  11535. * @see chado_generate_var()
  11536. * @see chado_expan_var()
  11537. *
  11538. * @return
  11539. * An array describing the 'nd_reagentprop' table
  11540. *
  11541. * @ingroup tripal_chado_v1.3_schema_api
  11542. *
  11543. */
  11544. function tripal_chado_chado_schema_v1_3_nd_reagentprop() {
  11545. $description = [
  11546. 'description' => '',
  11547. 'table' => 'nd_reagentprop',
  11548. 'fields' => [
  11549. 'nd_reagentprop_id' => [
  11550. 'size' => 'big',
  11551. 'type' => 'serial',
  11552. 'not null' => TRUE,
  11553. ],
  11554. 'nd_reagent_id' => [
  11555. 'size' => 'big',
  11556. 'type' => 'int',
  11557. 'not null' => TRUE,
  11558. ],
  11559. 'type_id' => [
  11560. 'size' => 'big',
  11561. 'type' => 'int',
  11562. 'not null' => TRUE,
  11563. ],
  11564. 'value' => [
  11565. 'size' => 'normal',
  11566. 'type' => 'text',
  11567. 'not null' => FALSE,
  11568. ],
  11569. 'rank' => [
  11570. 'size' => 'normal',
  11571. 'type' => 'int',
  11572. 'not null' => TRUE,
  11573. 'default' => 0,
  11574. ],
  11575. ],
  11576. 'unique keys' => [
  11577. 'nd_reagentprop_c1' => [
  11578. 0 => 'nd_reagent_id',
  11579. 1 => 'type_id',
  11580. 2 => 'rank',
  11581. ],
  11582. ],
  11583. 'indexes' => [
  11584. 'nd_reagentprop_idx1' => [
  11585. 0 => 'nd_reagent_id',
  11586. ],
  11587. 'nd_reagentprop_idx2' => [
  11588. 0 => 'type_id',
  11589. ],
  11590. ],
  11591. 'primary key' => [
  11592. 0 => 'nd_reagentprop_id',
  11593. ],
  11594. 'foreign keys' => [
  11595. 'nd_reagent' => [
  11596. 'table' => 'nd_reagent',
  11597. 'columns' => [
  11598. 'nd_reagent_id' => 'nd_reagent_id',
  11599. ],
  11600. ],
  11601. 'cvterm' => [
  11602. 'table' => 'cvterm',
  11603. 'columns' => [
  11604. 'type_id' => 'cvterm_id',
  11605. ],
  11606. ],
  11607. ],
  11608. 'referring_tables' => [
  11609. ],
  11610. ];
  11611. return $description;
  11612. }
  11613. /**
  11614. * Implements hook_chado_schema_v1_3_nd_reagent_relationship()
  11615. *
  11616. * Purpose: To describe the structure of 'nd_reagent_relationship' to tripal
  11617. *
  11618. * @see chado_insert_record()
  11619. * @see chado_update_record()
  11620. * @see chado_select_record()
  11621. * @see chado_generate_var()
  11622. * @see chado_expan_var()
  11623. *
  11624. * @return
  11625. * An array describing the 'nd_reagent_relationship' table
  11626. *
  11627. * @ingroup tripal_chado_v1.3_schema_api
  11628. *
  11629. */
  11630. function tripal_chado_chado_schema_v1_3_nd_reagent_relationship() {
  11631. $description = [
  11632. 'description' => '',
  11633. 'table' => 'nd_reagent_relationship',
  11634. 'fields' => [
  11635. 'nd_reagent_relationship_id' => [
  11636. 'size' => 'big',
  11637. 'type' => 'serial',
  11638. 'not null' => TRUE,
  11639. ],
  11640. 'subject_reagent_id' => [
  11641. 'size' => 'big',
  11642. 'type' => 'int',
  11643. 'not null' => TRUE,
  11644. ],
  11645. 'object_reagent_id' => [
  11646. 'size' => 'big',
  11647. 'type' => 'int',
  11648. 'not null' => TRUE,
  11649. ],
  11650. 'type_id' => [
  11651. 'size' => 'big',
  11652. 'type' => 'int',
  11653. 'not null' => TRUE,
  11654. ],
  11655. ],
  11656. 'indexes' => [
  11657. 'nd_reagent_relationship_idx1' => [
  11658. 0 => 'subject_reagent_id',
  11659. ],
  11660. 'nd_reagent_relationship_idx2' => [
  11661. 0 => 'object_reagent_id',
  11662. ],
  11663. 'nd_reagent_relationship_idx3' => [
  11664. 0 => 'type_id',
  11665. ],
  11666. ],
  11667. 'primary key' => [
  11668. 0 => 'nd_reagent_relationship_id',
  11669. ],
  11670. 'foreign keys' => [
  11671. 'nd_reagent' => [
  11672. 'table' => 'nd_reagent',
  11673. 'columns' => [
  11674. 'subject_reagent_id' => 'nd_reagent_id',
  11675. 'object_reagent_id' => 'nd_reagent_id',
  11676. ],
  11677. ],
  11678. 'cvterm' => [
  11679. 'table' => 'cvterm',
  11680. 'columns' => [
  11681. 'type_id' => 'cvterm_id',
  11682. ],
  11683. ],
  11684. ],
  11685. 'referring_tables' => [
  11686. ],
  11687. ];
  11688. return $description;
  11689. }
  11690. /**
  11691. * Implements hook_chado_schema_v1_3_organism()
  11692. *
  11693. * Purpose: To describe the structure of 'organism' to tripal
  11694. *
  11695. * @see chado_insert_record()
  11696. * @see chado_update_record()
  11697. * @see chado_select_record()
  11698. * @see chado_generate_var()
  11699. * @see chado_expan_var()
  11700. *
  11701. * @return
  11702. * An array describing the 'organism' table
  11703. *
  11704. * @ingroup tripal_chado_v1.3_schema_api
  11705. *
  11706. */
  11707. function tripal_chado_chado_schema_v1_3_organism() {
  11708. $description = [
  11709. 'description' => '',
  11710. 'table' => 'organism',
  11711. 'fields' => [
  11712. 'organism_id' => [
  11713. 'size' => 'big',
  11714. 'type' => 'serial',
  11715. 'not null' => TRUE,
  11716. ],
  11717. 'abbreviation' => [
  11718. 'size' => 'normal',
  11719. 'type' => 'varchar',
  11720. 'length' => '255',
  11721. 'not null' => FALSE,
  11722. ],
  11723. 'genus' => [
  11724. 'size' => 'normal',
  11725. 'type' => 'varchar',
  11726. 'length' => '255',
  11727. 'not null' => TRUE,
  11728. ],
  11729. 'species' => [
  11730. 'size' => 'normal',
  11731. 'type' => 'varchar',
  11732. 'length' => '255',
  11733. 'not null' => TRUE,
  11734. ],
  11735. 'common_name' => [
  11736. 'size' => 'normal',
  11737. 'type' => 'varchar',
  11738. 'length' => '255',
  11739. 'not null' => FALSE,
  11740. ],
  11741. 'infraspecific_name' => [
  11742. 'size' => 'normal',
  11743. 'type' => 'varchar',
  11744. 'length' => '1024',
  11745. 'not null' => FALSE,
  11746. ],
  11747. 'type_id' => [
  11748. 'size' => 'big',
  11749. 'type' => 'int',
  11750. 'not null' => FALSE,
  11751. ],
  11752. 'comment' => [
  11753. 'size' => 'normal',
  11754. 'type' => 'text',
  11755. 'not null' => FALSE,
  11756. ],
  11757. ],
  11758. 'unique keys' => [
  11759. 'organism_c1' => [
  11760. 0 => 'genus',
  11761. 1 => 'species',
  11762. 2 => 'type_id',
  11763. 3 => 'infraspecific_name',
  11764. ],
  11765. ],
  11766. 'primary key' => [
  11767. 0 => 'organism_id',
  11768. ],
  11769. 'foreign keys' => [
  11770. 'cvterm' => [
  11771. 'table' => 'cvterm',
  11772. 'columns' => [
  11773. 'type_id' => 'cvterm_id',
  11774. ],
  11775. ],
  11776. ],
  11777. 'referring_tables' => [
  11778. 0 => 'analysis_organism',
  11779. 1 => 'biomaterial',
  11780. 2 => 'cell_line',
  11781. 3 => 'feature',
  11782. 4 => 'featuremap_organism',
  11783. 5 => 'library',
  11784. 6 => 'organism_cvterm',
  11785. 7 => 'organism_dbxref',
  11786. 8 => 'organismprop',
  11787. 9 => 'organism_pub',
  11788. 10 => 'organism_relationship',
  11789. 12 => 'phenotype_comparison',
  11790. 13 => 'phylonode_organism',
  11791. 14 => 'stock',
  11792. ],
  11793. ];
  11794. return $description;
  11795. }
  11796. /**
  11797. * Implements hook_chado_schema_v1_3_organism_cvterm()
  11798. *
  11799. * Purpose: To describe the structure of 'organism_cvterm' to tripal
  11800. *
  11801. * @see chado_insert_record()
  11802. * @see chado_update_record()
  11803. * @see chado_select_record()
  11804. * @see chado_generate_var()
  11805. * @see chado_expan_var()
  11806. *
  11807. * @return
  11808. * An array describing the 'organism_cvterm' table
  11809. *
  11810. * @ingroup tripal_chado_v1.3_schema_api
  11811. *
  11812. */
  11813. function tripal_chado_chado_schema_v1_3_organism_cvterm() {
  11814. $description = [
  11815. 'description' => '',
  11816. 'table' => 'organism_cvterm',
  11817. 'fields' => [
  11818. 'organism_cvterm_id' => [
  11819. 'size' => 'big',
  11820. 'type' => 'serial',
  11821. 'not null' => TRUE,
  11822. ],
  11823. 'organism_id' => [
  11824. 'size' => 'big',
  11825. 'type' => 'int',
  11826. 'not null' => TRUE,
  11827. ],
  11828. 'cvterm_id' => [
  11829. 'size' => 'big',
  11830. 'type' => 'int',
  11831. 'not null' => TRUE,
  11832. ],
  11833. 'rank' => [
  11834. 'size' => 'normal',
  11835. 'type' => 'int',
  11836. 'not null' => TRUE,
  11837. 'default' => 0,
  11838. ],
  11839. 'pub_id' => [
  11840. 'size' => 'big',
  11841. 'type' => 'int',
  11842. 'not null' => TRUE,
  11843. ],
  11844. ],
  11845. 'unique keys' => [
  11846. 'organism_cvterm_c1' => [
  11847. 0 => 'organism_id',
  11848. 1 => 'cvterm_id',
  11849. 2 => 'pub_id',
  11850. ],
  11851. ],
  11852. 'indexes' => [
  11853. 'organism_cvterm_idx1' => [
  11854. 0 => 'organism_id',
  11855. ],
  11856. 'organism_cvterm_idx2' => [
  11857. 0 => 'cvterm_id',
  11858. ],
  11859. ],
  11860. 'primary key' => [
  11861. 0 => 'organism_cvterm_id',
  11862. ],
  11863. 'foreign keys' => [
  11864. 'organism' => [
  11865. 'table' => 'organism',
  11866. 'columns' => [
  11867. 'organism_id' => 'organism_id',
  11868. ],
  11869. ],
  11870. 'cvterm' => [
  11871. 'table' => 'cvterm',
  11872. 'columns' => [
  11873. 'cvterm_id' => 'cvterm_id',
  11874. ],
  11875. ],
  11876. 'pub' => [
  11877. 'table' => 'pub',
  11878. 'columns' => [
  11879. 'pub_id' => 'pub_id',
  11880. ],
  11881. ],
  11882. ],
  11883. 'referring_tables' => [
  11884. 0 => 'organism_cvtermprop',
  11885. ],
  11886. ];
  11887. return $description;
  11888. }
  11889. /**
  11890. * Implements hook_chado_schema_v1_3_organism_cvtermprop()
  11891. *
  11892. * Purpose: To describe the structure of 'organism_cvtermprop' to tripal
  11893. *
  11894. * @see chado_insert_record()
  11895. * @see chado_update_record()
  11896. * @see chado_select_record()
  11897. * @see chado_generate_var()
  11898. * @see chado_expan_var()
  11899. *
  11900. * @return
  11901. * An array describing the 'organism_cvtermprop' table
  11902. *
  11903. * @ingroup tripal_chado_v1.3_schema_api
  11904. *
  11905. */
  11906. function tripal_chado_chado_schema_v1_3_organism_cvtermprop() {
  11907. $description = [
  11908. 'description' => '',
  11909. 'table' => 'organism_cvtermprop',
  11910. 'fields' => [
  11911. 'organism_cvtermprop_id' => [
  11912. 'size' => 'big',
  11913. 'type' => 'serial',
  11914. 'not null' => TRUE,
  11915. ],
  11916. 'organism_cvterm_id' => [
  11917. 'size' => 'big',
  11918. 'type' => 'int',
  11919. 'not null' => TRUE,
  11920. ],
  11921. 'type_id' => [
  11922. 'size' => 'big',
  11923. 'type' => 'int',
  11924. 'not null' => TRUE,
  11925. ],
  11926. 'value' => [
  11927. 'size' => 'normal',
  11928. 'type' => 'text',
  11929. 'not null' => FALSE,
  11930. ],
  11931. 'rank' => [
  11932. 'size' => 'normal',
  11933. 'type' => 'int',
  11934. 'not null' => TRUE,
  11935. 'default' => 0,
  11936. ],
  11937. ],
  11938. 'unique keys' => [
  11939. 'organism_cvtermprop_c1' => [
  11940. 0 => 'organism_cvterm_id',
  11941. 1 => 'type_id',
  11942. 2 => 'rank',
  11943. ],
  11944. ],
  11945. 'indexes' => [
  11946. 'organism_cvtermprop_idx1' => [
  11947. 0 => 'organism_cvterm_id',
  11948. ],
  11949. 'organism_cvtermprop_idx2' => [
  11950. 0 => 'type_id',
  11951. ],
  11952. ],
  11953. 'primary key' => [
  11954. 0 => 'organism_cvtermprop_id',
  11955. ],
  11956. 'foreign keys' => [
  11957. 'organism_cvterm' => [
  11958. 'table' => 'organism_cvterm',
  11959. 'columns' => [
  11960. 'organism_cvterm_id' => 'organism_cvterm_id',
  11961. ],
  11962. ],
  11963. 'cvterm' => [
  11964. 'table' => 'cvterm',
  11965. 'columns' => [
  11966. 'type_id' => 'cvterm_id',
  11967. ],
  11968. ],
  11969. ],
  11970. 'referring_tables' => [
  11971. ],
  11972. ];
  11973. return $description;
  11974. }
  11975. /**
  11976. * Implements hook_chado_schema_v1_3_organism_dbxref()
  11977. *
  11978. * Purpose: To describe the structure of 'organism_dbxref' to tripal
  11979. *
  11980. * @see chado_insert_record()
  11981. * @see chado_update_record()
  11982. * @see chado_select_record()
  11983. * @see chado_generate_var()
  11984. * @see chado_expan_var()
  11985. *
  11986. * @return
  11987. * An array describing the 'organism_dbxref' table
  11988. *
  11989. * @ingroup tripal_chado_v1.3_schema_api
  11990. *
  11991. */
  11992. function tripal_chado_chado_schema_v1_3_organism_dbxref() {
  11993. $description = [
  11994. 'description' => '',
  11995. 'table' => 'organism_dbxref',
  11996. 'fields' => [
  11997. 'organism_dbxref_id' => [
  11998. 'size' => 'big',
  11999. 'type' => 'serial',
  12000. 'not null' => TRUE,
  12001. ],
  12002. 'organism_id' => [
  12003. 'size' => 'big',
  12004. 'type' => 'int',
  12005. 'not null' => TRUE,
  12006. ],
  12007. 'dbxref_id' => [
  12008. 'size' => 'big',
  12009. 'type' => 'int',
  12010. 'not null' => TRUE,
  12011. ],
  12012. ],
  12013. 'unique keys' => [
  12014. 'organism_dbxref_c1' => [
  12015. 0 => 'organism_id',
  12016. 1 => 'dbxref_id',
  12017. ],
  12018. ],
  12019. 'indexes' => [
  12020. 'organism_dbxref_idx1' => [
  12021. 0 => 'organism_id',
  12022. ],
  12023. 'organism_dbxref_idx2' => [
  12024. 0 => 'dbxref_id',
  12025. ],
  12026. ],
  12027. 'primary key' => [
  12028. 0 => 'organism_dbxref_id',
  12029. ],
  12030. 'foreign keys' => [
  12031. 'organism' => [
  12032. 'table' => 'organism',
  12033. 'columns' => [
  12034. 'organism_id' => 'organism_id',
  12035. ],
  12036. ],
  12037. 'dbxref' => [
  12038. 'table' => 'dbxref',
  12039. 'columns' => [
  12040. 'dbxref_id' => 'dbxref_id',
  12041. ],
  12042. ],
  12043. ],
  12044. 'referring_tables' => [
  12045. ],
  12046. ];
  12047. return $description;
  12048. }
  12049. /**
  12050. * Implements hook_chado_schema_v1_3_organism_feature_count()
  12051. *
  12052. * Purpose: To describe the structure of 'organism_feature_count' to tripal
  12053. *
  12054. * @see chado_insert_record()
  12055. * @see chado_update_record()
  12056. * @see chado_select_record()
  12057. * @see chado_generate_var()
  12058. * @see chado_expan_var()
  12059. *
  12060. * @return
  12061. * An array describing the 'organism_feature_count' table
  12062. *
  12063. * @ingroup tripal_chado_v1.3_schema_api
  12064. *
  12065. */
  12066. function tripal_chado_chado_schema_v1_3_organism_feature_count() {
  12067. $description = [
  12068. 'description' => '',
  12069. 'table' => 'organism_feature_count',
  12070. 'fields' => [
  12071. 'organism_id' => [
  12072. 'size' => 'normal',
  12073. 'type' => 'int',
  12074. 'not null' => TRUE,
  12075. ],
  12076. 'genus' => [
  12077. 'size' => 'normal',
  12078. 'type' => 'varchar',
  12079. 'length' => '255',
  12080. 'not null' => TRUE,
  12081. ],
  12082. 'species' => [
  12083. 'size' => 'normal',
  12084. 'type' => 'varchar',
  12085. 'length' => '255',
  12086. 'not null' => TRUE,
  12087. ],
  12088. 'common_name' => [
  12089. 'size' => 'normal',
  12090. 'type' => 'varchar',
  12091. 'length' => '255',
  12092. 'not null' => FALSE,
  12093. ],
  12094. 'num_features' => [
  12095. 'size' => 'normal',
  12096. 'type' => 'int',
  12097. 'not null' => TRUE,
  12098. ],
  12099. 'cvterm_id' => [
  12100. 'size' => 'normal',
  12101. 'type' => 'int',
  12102. 'not null' => TRUE,
  12103. ],
  12104. 'feature_type' => [
  12105. 'size' => 'normal',
  12106. 'type' => 'varchar',
  12107. 'length' => '255',
  12108. 'not null' => TRUE,
  12109. ],
  12110. ],
  12111. 'indexes' => [
  12112. 'organism_feature_count_idx1' => [
  12113. 0 => 'organism_id',
  12114. ],
  12115. 'organism_feature_count_idx2' => [
  12116. 0 => 'cvterm_id',
  12117. ],
  12118. 'organism_feature_count_idx3' => [
  12119. 0 => 'feature_type',
  12120. ],
  12121. ],
  12122. 'foreign keys' => [
  12123. ],
  12124. 'referring_tables' => [
  12125. ],
  12126. ];
  12127. return $description;
  12128. }
  12129. /**
  12130. * Implements hook_chado_schema_v1_3_organismprop()
  12131. *
  12132. * Purpose: To describe the structure of 'organismprop' to tripal
  12133. *
  12134. * @see chado_insert_record()
  12135. * @see chado_update_record()
  12136. * @see chado_select_record()
  12137. * @see chado_generate_var()
  12138. * @see chado_expan_var()
  12139. *
  12140. * @return
  12141. * An array describing the 'organismprop' table
  12142. *
  12143. * @ingroup tripal_chado_v1.3_schema_api
  12144. *
  12145. */
  12146. function tripal_chado_chado_schema_v1_3_organismprop() {
  12147. $description = [
  12148. 'description' => '',
  12149. 'table' => 'organismprop',
  12150. 'fields' => [
  12151. 'organismprop_id' => [
  12152. 'size' => 'big',
  12153. 'type' => 'serial',
  12154. 'not null' => TRUE,
  12155. ],
  12156. 'organism_id' => [
  12157. 'size' => 'big',
  12158. 'type' => 'int',
  12159. 'not null' => TRUE,
  12160. ],
  12161. 'type_id' => [
  12162. 'size' => 'big',
  12163. 'type' => 'int',
  12164. 'not null' => TRUE,
  12165. ],
  12166. 'value' => [
  12167. 'size' => 'normal',
  12168. 'type' => 'text',
  12169. 'not null' => FALSE,
  12170. ],
  12171. 'rank' => [
  12172. 'size' => 'normal',
  12173. 'type' => 'int',
  12174. 'not null' => TRUE,
  12175. 'default' => 0,
  12176. ],
  12177. ],
  12178. 'unique keys' => [
  12179. 'organismprop_c1' => [
  12180. 0 => 'organism_id',
  12181. 1 => 'type_id',
  12182. 2 => 'rank',
  12183. ],
  12184. ],
  12185. 'indexes' => [
  12186. 'organismprop_idx1' => [
  12187. 0 => 'organism_id',
  12188. ],
  12189. 'organismprop_idx2' => [
  12190. 0 => 'type_id',
  12191. ],
  12192. ],
  12193. 'primary key' => [
  12194. 0 => 'organismprop_id',
  12195. ],
  12196. 'foreign keys' => [
  12197. 'organism' => [
  12198. 'table' => 'organism',
  12199. 'columns' => [
  12200. 'organism_id' => 'organism_id',
  12201. ],
  12202. ],
  12203. 'cvterm' => [
  12204. 'table' => 'cvterm',
  12205. 'columns' => [
  12206. 'type_id' => 'cvterm_id',
  12207. ],
  12208. ],
  12209. ],
  12210. 'referring_tables' => [
  12211. 0 => 'organismprop_pub',
  12212. ],
  12213. ];
  12214. return $description;
  12215. }
  12216. /**
  12217. * Implements hook_chado_schema_v1_3_organismprop_pub()
  12218. *
  12219. * Purpose: To describe the structure of 'organismprop_pub' to tripal
  12220. *
  12221. * @see chado_insert_record()
  12222. * @see chado_update_record()
  12223. * @see chado_select_record()
  12224. * @see chado_generate_var()
  12225. * @see chado_expan_var()
  12226. *
  12227. * @return
  12228. * An array describing the 'organismprop_pub' table
  12229. *
  12230. * @ingroup tripal_chado_v1.3_schema_api
  12231. *
  12232. */
  12233. function tripal_chado_chado_schema_v1_3_organismprop_pub() {
  12234. $description = [
  12235. 'description' => '',
  12236. 'table' => 'organismprop_pub',
  12237. 'fields' => [
  12238. 'organismprop_pub_id' => [
  12239. 'size' => 'big',
  12240. 'type' => 'serial',
  12241. 'not null' => TRUE,
  12242. ],
  12243. 'organismprop_id' => [
  12244. 'size' => 'big',
  12245. 'type' => 'int',
  12246. 'not null' => TRUE,
  12247. ],
  12248. 'pub_id' => [
  12249. 'size' => 'big',
  12250. 'type' => 'int',
  12251. 'not null' => TRUE,
  12252. ],
  12253. 'value' => [
  12254. 'size' => 'normal',
  12255. 'type' => 'text',
  12256. 'not null' => FALSE,
  12257. ],
  12258. 'rank' => [
  12259. 'size' => 'normal',
  12260. 'type' => 'int',
  12261. 'not null' => TRUE,
  12262. 'default' => 0,
  12263. ],
  12264. ],
  12265. 'unique keys' => [
  12266. 'organismprop_pub_c1' => [
  12267. 0 => 'organismprop_id',
  12268. 1 => 'pub_id',
  12269. ],
  12270. ],
  12271. 'indexes' => [
  12272. 'organismprop_pub_idx1' => [
  12273. 0 => 'organismprop_id',
  12274. ],
  12275. 'organismprop_pub_idx2' => [
  12276. 0 => 'pub_id',
  12277. ],
  12278. ],
  12279. 'primary key' => [
  12280. 0 => 'organismprop_pub_id',
  12281. ],
  12282. 'foreign keys' => [
  12283. 'organismprop' => [
  12284. 'table' => 'organismprop',
  12285. 'columns' => [
  12286. 'organismprop_id' => 'organismprop_id',
  12287. ],
  12288. ],
  12289. 'pub' => [
  12290. 'table' => 'pub',
  12291. 'columns' => [
  12292. 'pub_id' => 'pub_id',
  12293. ],
  12294. ],
  12295. ],
  12296. 'referring_tables' => [
  12297. ],
  12298. ];
  12299. return $description;
  12300. }
  12301. /**
  12302. * Implements hook_chado_schema_v1_3_organism_pub()
  12303. *
  12304. * Purpose: To describe the structure of 'organism_pub' to tripal
  12305. *
  12306. * @see chado_insert_record()
  12307. * @see chado_update_record()
  12308. * @see chado_select_record()
  12309. * @see chado_generate_var()
  12310. * @see chado_expan_var()
  12311. *
  12312. * @return
  12313. * An array describing the 'organism_pub' table
  12314. *
  12315. * @ingroup tripal_chado_v1.3_schema_api
  12316. *
  12317. */
  12318. function tripal_chado_chado_schema_v1_3_organism_pub() {
  12319. $description = [
  12320. 'description' => '',
  12321. 'table' => 'organism_pub',
  12322. 'fields' => [
  12323. 'organism_pub_id' => [
  12324. 'size' => 'big',
  12325. 'type' => 'serial',
  12326. 'not null' => TRUE,
  12327. ],
  12328. 'organism_id' => [
  12329. 'size' => 'big',
  12330. 'type' => 'int',
  12331. 'not null' => TRUE,
  12332. ],
  12333. 'pub_id' => [
  12334. 'size' => 'big',
  12335. 'type' => 'int',
  12336. 'not null' => TRUE,
  12337. ],
  12338. ],
  12339. 'unique keys' => [
  12340. 'organism_pub_c1' => [
  12341. 0 => 'organism_id',
  12342. 1 => 'pub_id',
  12343. ],
  12344. ],
  12345. 'indexes' => [
  12346. 'organism_pub_idx1' => [
  12347. 0 => 'organism_id',
  12348. ],
  12349. 'organism_pub_idx2' => [
  12350. 0 => 'pub_id',
  12351. ],
  12352. ],
  12353. 'primary key' => [
  12354. 0 => 'organism_pub_id',
  12355. ],
  12356. 'foreign keys' => [
  12357. 'organism' => [
  12358. 'table' => 'organism',
  12359. 'columns' => [
  12360. 'organism_id' => 'organism_id',
  12361. ],
  12362. ],
  12363. 'pub' => [
  12364. 'table' => 'pub',
  12365. 'columns' => [
  12366. 'pub_id' => 'pub_id',
  12367. ],
  12368. ],
  12369. ],
  12370. 'referring_tables' => [
  12371. ],
  12372. ];
  12373. return $description;
  12374. }
  12375. /**
  12376. * Implements hook_chado_schema_v1_3_organism_relationship()
  12377. *
  12378. * Purpose: To describe the structure of 'organism_relationship' to tripal
  12379. *
  12380. * @see chado_insert_record()
  12381. * @see chado_update_record()
  12382. * @see chado_select_record()
  12383. * @see chado_generate_var()
  12384. * @see chado_expan_var()
  12385. *
  12386. * @return
  12387. * An array describing the 'organism_relationship' table
  12388. *
  12389. * @ingroup tripal_chado_v1.3_schema_api
  12390. *
  12391. */
  12392. function tripal_chado_chado_schema_v1_3_organism_relationship() {
  12393. $description = [
  12394. 'description' => '',
  12395. 'table' => 'organism_relationship',
  12396. 'fields' => [
  12397. 'organism_relationship_id' => [
  12398. 'size' => 'big',
  12399. 'type' => 'serial',
  12400. 'not null' => TRUE,
  12401. ],
  12402. 'subject_id' => [
  12403. 'size' => 'big',
  12404. 'type' => 'int',
  12405. 'not null' => TRUE,
  12406. ],
  12407. 'object_id' => [
  12408. 'size' => 'big',
  12409. 'type' => 'int',
  12410. 'not null' => TRUE,
  12411. ],
  12412. 'type_id' => [
  12413. 'size' => 'big',
  12414. 'type' => 'int',
  12415. 'not null' => TRUE,
  12416. ],
  12417. 'rank' => [
  12418. 'size' => 'normal',
  12419. 'type' => 'int',
  12420. 'not null' => TRUE,
  12421. 'default' => 0,
  12422. ],
  12423. ],
  12424. 'unique keys' => [
  12425. 'organism_relationship_c1' => [
  12426. 0 => 'subject_id',
  12427. 1 => 'object_id',
  12428. 2 => 'type_id',
  12429. 3 => 'rank',
  12430. ],
  12431. ],
  12432. 'indexes' => [
  12433. 'organism_relationship_idx1' => [
  12434. 0 => 'subject_id',
  12435. ],
  12436. 'organism_relationship_idx2' => [
  12437. 0 => 'object_id',
  12438. ],
  12439. 'organism_relationship_idx3' => [
  12440. 0 => 'type_id',
  12441. ],
  12442. ],
  12443. 'primary key' => [
  12444. 0 => 'organism_relationship_id',
  12445. ],
  12446. 'foreign keys' => [
  12447. 'organism' => [
  12448. 'table' => 'organism',
  12449. 'columns' => [
  12450. 'object_id' => 'organism_id',
  12451. 'subject_id' => 'organism_id',
  12452. ],
  12453. ],
  12454. 'cvterm' => [
  12455. 'table' => 'cvterm',
  12456. 'columns' => [
  12457. 'type_id' => 'cvterm_id',
  12458. ],
  12459. ],
  12460. ],
  12461. 'referring_tables' => [
  12462. ],
  12463. ];
  12464. return $description;
  12465. }
  12466. /**
  12467. * Implements hook_chado_schema_v1_3_phendesc()
  12468. *
  12469. * Purpose: To describe the structure of 'phendesc' to tripal
  12470. *
  12471. * @see chado_insert_record()
  12472. * @see chado_update_record()
  12473. * @see chado_select_record()
  12474. * @see chado_generate_var()
  12475. * @see chado_expan_var()
  12476. *
  12477. * @return
  12478. * An array describing the 'phendesc' table
  12479. *
  12480. * @ingroup tripal_chado_v1.3_schema_api
  12481. *
  12482. */
  12483. function tripal_chado_chado_schema_v1_3_phendesc() {
  12484. $description = [
  12485. 'description' => '',
  12486. 'table' => 'phendesc',
  12487. 'fields' => [
  12488. 'phendesc_id' => [
  12489. 'size' => 'big',
  12490. 'type' => 'serial',
  12491. 'not null' => TRUE,
  12492. ],
  12493. 'genotype_id' => [
  12494. 'size' => 'big',
  12495. 'type' => 'int',
  12496. 'not null' => TRUE,
  12497. ],
  12498. 'environment_id' => [
  12499. 'size' => 'big',
  12500. 'type' => 'int',
  12501. 'not null' => TRUE,
  12502. ],
  12503. 'description' => [
  12504. 'size' => 'normal',
  12505. 'type' => 'text',
  12506. 'not null' => TRUE,
  12507. ],
  12508. 'type_id' => [
  12509. 'size' => 'big',
  12510. 'type' => 'int',
  12511. 'not null' => TRUE,
  12512. ],
  12513. 'pub_id' => [
  12514. 'size' => 'big',
  12515. 'type' => 'int',
  12516. 'not null' => TRUE,
  12517. ],
  12518. ],
  12519. 'unique keys' => [
  12520. 'phendesc_c1' => [
  12521. 0 => 'genotype_id',
  12522. 1 => 'environment_id',
  12523. 2 => 'type_id',
  12524. 3 => 'pub_id',
  12525. ],
  12526. ],
  12527. 'indexes' => [
  12528. 'phendesc_idx1' => [
  12529. 0 => 'genotype_id',
  12530. ],
  12531. 'phendesc_idx2' => [
  12532. 0 => 'environment_id',
  12533. ],
  12534. 'phendesc_idx3' => [
  12535. 0 => 'pub_id',
  12536. ],
  12537. ],
  12538. 'primary key' => [
  12539. 0 => 'phendesc_id',
  12540. ],
  12541. 'foreign keys' => [
  12542. 'genotype' => [
  12543. 'table' => 'genotype',
  12544. 'columns' => [
  12545. 'genotype_id' => 'genotype_id',
  12546. ],
  12547. ],
  12548. 'environment' => [
  12549. 'table' => 'environment',
  12550. 'columns' => [
  12551. 'environment_id' => 'environment_id',
  12552. ],
  12553. ],
  12554. 'cvterm' => [
  12555. 'table' => 'cvterm',
  12556. 'columns' => [
  12557. 'type_id' => 'cvterm_id',
  12558. ],
  12559. ],
  12560. 'pub' => [
  12561. 'table' => 'pub',
  12562. 'columns' => [
  12563. 'pub_id' => 'pub_id',
  12564. ],
  12565. ],
  12566. ],
  12567. 'referring_tables' => [
  12568. ],
  12569. ];
  12570. return $description;
  12571. }
  12572. /**
  12573. * Implements hook_chado_schema_v1_3_phenotype()
  12574. *
  12575. * Purpose: To describe the structure of 'phenotype' to tripal
  12576. *
  12577. * @see chado_insert_record()
  12578. * @see chado_update_record()
  12579. * @see chado_select_record()
  12580. * @see chado_generate_var()
  12581. * @see chado_expan_var()
  12582. *
  12583. * @return
  12584. * An array describing the 'phenotype' table
  12585. *
  12586. * @ingroup tripal_chado_v1.3_schema_api
  12587. *
  12588. */
  12589. function tripal_chado_chado_schema_v1_3_phenotype() {
  12590. $description = [
  12591. 'description' => '',
  12592. 'table' => 'phenotype',
  12593. 'fields' => [
  12594. 'phenotype_id' => [
  12595. 'size' => 'big',
  12596. 'type' => 'serial',
  12597. 'not null' => TRUE,
  12598. ],
  12599. 'uniquename' => [
  12600. 'size' => 'normal',
  12601. 'type' => 'text',
  12602. 'not null' => TRUE,
  12603. ],
  12604. 'name' => [
  12605. 'size' => 'normal',
  12606. 'type' => 'text',
  12607. 'not null' => FALSE,
  12608. ],
  12609. 'observable_id' => [
  12610. 'size' => 'big',
  12611. 'type' => 'int',
  12612. 'not null' => FALSE,
  12613. ],
  12614. 'attr_id' => [
  12615. 'size' => 'big',
  12616. 'type' => 'int',
  12617. 'not null' => FALSE,
  12618. ],
  12619. 'value' => [
  12620. 'size' => 'normal',
  12621. 'type' => 'text',
  12622. 'not null' => FALSE,
  12623. ],
  12624. 'cvalue_id' => [
  12625. 'size' => 'big',
  12626. 'type' => 'int',
  12627. 'not null' => FALSE,
  12628. ],
  12629. 'assay_id' => [
  12630. 'size' => 'big',
  12631. 'type' => 'int',
  12632. 'not null' => FALSE,
  12633. ],
  12634. ],
  12635. 'unique keys' => [
  12636. 'phenotype_c1' => [
  12637. 0 => 'uniquename',
  12638. ],
  12639. ],
  12640. 'indexes' => [
  12641. 'phenotype_idx1' => [
  12642. 0 => 'cvalue_id',
  12643. ],
  12644. 'phenotype_idx2' => [
  12645. 0 => 'observable_id',
  12646. ],
  12647. 'phenotype_idx3' => [
  12648. 0 => 'attr_id',
  12649. ],
  12650. ],
  12651. 'primary key' => [
  12652. 0 => 'phenotype_id',
  12653. ],
  12654. 'foreign keys' => [
  12655. 'cvterm' => [
  12656. 'table' => 'cvterm',
  12657. 'columns' => [
  12658. 'observable_id' => 'cvterm_id',
  12659. 'attr_id' => 'cvterm_id',
  12660. 'cvalue_id' => 'cvterm_id',
  12661. 'assay_id' => 'cvterm_id',
  12662. ],
  12663. ],
  12664. ],
  12665. 'referring_tables' => [
  12666. 0 => 'feature_phenotype',
  12667. 1 => 'nd_experiment_phenotype',
  12668. 2 => 'phenotype_comparison',
  12669. 4 => 'phenotype_cvterm',
  12670. 5 => 'phenotypeprop',
  12671. 6 => 'phenstatement',
  12672. ],
  12673. ];
  12674. return $description;
  12675. }
  12676. /**
  12677. * Implements hook_chado_schema_v1_3_phenotype_comparison()
  12678. *
  12679. * Purpose: To describe the structure of 'phenotype_comparison' to tripal
  12680. *
  12681. * @see chado_insert_record()
  12682. * @see chado_update_record()
  12683. * @see chado_select_record()
  12684. * @see chado_generate_var()
  12685. * @see chado_expan_var()
  12686. *
  12687. * @return
  12688. * An array describing the 'phenotype_comparison' table
  12689. *
  12690. * @ingroup tripal_chado_v1.3_schema_api
  12691. *
  12692. */
  12693. function tripal_chado_chado_schema_v1_3_phenotype_comparison() {
  12694. $description = [
  12695. 'description' => '',
  12696. 'table' => 'phenotype_comparison',
  12697. 'fields' => [
  12698. 'phenotype_comparison_id' => [
  12699. 'size' => 'big',
  12700. 'type' => 'serial',
  12701. 'not null' => TRUE,
  12702. ],
  12703. 'genotype1_id' => [
  12704. 'size' => 'big',
  12705. 'type' => 'int',
  12706. 'not null' => TRUE,
  12707. ],
  12708. 'environment1_id' => [
  12709. 'size' => 'big',
  12710. 'type' => 'int',
  12711. 'not null' => TRUE,
  12712. ],
  12713. 'genotype2_id' => [
  12714. 'size' => 'big',
  12715. 'type' => 'int',
  12716. 'not null' => TRUE,
  12717. ],
  12718. 'environment2_id' => [
  12719. 'size' => 'big',
  12720. 'type' => 'int',
  12721. 'not null' => TRUE,
  12722. ],
  12723. 'phenotype1_id' => [
  12724. 'size' => 'big',
  12725. 'type' => 'int',
  12726. 'not null' => TRUE,
  12727. ],
  12728. 'phenotype2_id' => [
  12729. 'size' => 'big',
  12730. 'type' => 'int',
  12731. 'not null' => FALSE,
  12732. ],
  12733. 'pub_id' => [
  12734. 'size' => 'big',
  12735. 'type' => 'int',
  12736. 'not null' => TRUE,
  12737. ],
  12738. 'organism_id' => [
  12739. 'size' => 'big',
  12740. 'type' => 'int',
  12741. 'not null' => TRUE,
  12742. ],
  12743. ],
  12744. 'unique keys' => [
  12745. 'phenotype_comparison_c1' => [
  12746. 0 => 'genotype1_id',
  12747. 1 => 'environment1_id',
  12748. 2 => 'genotype2_id',
  12749. 3 => 'environment2_id',
  12750. 4 => 'phenotype1_id',
  12751. 5 => 'pub_id',
  12752. ],
  12753. ],
  12754. 'indexes' => [
  12755. 'phenotype_comparison_idx1' => [
  12756. 0 => 'genotype1_id',
  12757. ],
  12758. 'phenotype_comparison_idx2' => [
  12759. 0 => 'genotype2_id',
  12760. ],
  12761. 'phenotype_comparison_idx4' => [
  12762. 0 => 'pub_id',
  12763. ],
  12764. ],
  12765. 'primary key' => [
  12766. 0 => 'phenotype_comparison_id',
  12767. ],
  12768. 'foreign keys' => [
  12769. 'genotype' => [
  12770. 'table' => 'genotype',
  12771. 'columns' => [
  12772. 'genotype1_id' => 'genotype_id',
  12773. 'genotype2_id' => 'genotype_id',
  12774. ],
  12775. ],
  12776. 'environment' => [
  12777. 'table' => 'environment',
  12778. 'columns' => [
  12779. 'environment1_id' => 'environment_id',
  12780. 'environment2_id' => 'environment_id',
  12781. ],
  12782. ],
  12783. 'phenotype' => [
  12784. 'table' => 'phenotype',
  12785. 'columns' => [
  12786. 'phenotype1_id' => 'phenotype_id',
  12787. 'phenotype2_id' => 'phenotype_id',
  12788. ],
  12789. ],
  12790. 'pub' => [
  12791. 'table' => 'pub',
  12792. 'columns' => [
  12793. 'pub_id' => 'pub_id',
  12794. ],
  12795. ],
  12796. 'organism' => [
  12797. 'table' => 'organism',
  12798. 'columns' => [
  12799. 'organism_id' => 'organism_id',
  12800. ],
  12801. ],
  12802. ],
  12803. 'referring_tables' => [
  12804. 0 => 'phenotype_comparison_cvterm',
  12805. ],
  12806. ];
  12807. return $description;
  12808. }
  12809. /**
  12810. * Implements hook_chado_schema_v1_3_phenotype_comparison_cvterm()
  12811. *
  12812. * Purpose: To describe the structure of 'phenotype_comparison_cvterm' to tripal
  12813. *
  12814. * @see chado_insert_record()
  12815. * @see chado_update_record()
  12816. * @see chado_select_record()
  12817. * @see chado_generate_var()
  12818. * @see chado_expan_var()
  12819. *
  12820. * @return
  12821. * An array describing the 'phenotype_comparison_cvterm' table
  12822. *
  12823. * @ingroup tripal_chado_v1.3_schema_api
  12824. *
  12825. */
  12826. function tripal_chado_chado_schema_v1_3_phenotype_comparison_cvterm() {
  12827. $description = [
  12828. 'description' => '',
  12829. 'table' => 'phenotype_comparison_cvterm',
  12830. 'fields' => [
  12831. 'phenotype_comparison_cvterm_id' => [
  12832. 'size' => 'big',
  12833. 'type' => 'serial',
  12834. 'not null' => TRUE,
  12835. ],
  12836. 'phenotype_comparison_id' => [
  12837. 'size' => 'big',
  12838. 'type' => 'int',
  12839. 'not null' => TRUE,
  12840. ],
  12841. 'cvterm_id' => [
  12842. 'size' => 'big',
  12843. 'type' => 'int',
  12844. 'not null' => TRUE,
  12845. ],
  12846. 'pub_id' => [
  12847. 'size' => 'big',
  12848. 'type' => 'int',
  12849. 'not null' => TRUE,
  12850. ],
  12851. 'rank' => [
  12852. 'size' => 'normal',
  12853. 'type' => 'int',
  12854. 'not null' => TRUE,
  12855. 'default' => 0,
  12856. ],
  12857. ],
  12858. 'unique keys' => [
  12859. 'phenotype_comparison_cvterm_c1' => [
  12860. 0 => 'phenotype_comparison_id',
  12861. 1 => 'cvterm_id',
  12862. ],
  12863. ],
  12864. 'indexes' => [
  12865. 'phenotype_comparison_cvterm_idx1' => [
  12866. 0 => 'phenotype_comparison_id',
  12867. ],
  12868. 'phenotype_comparison_cvterm_idx2' => [
  12869. 0 => 'cvterm_id',
  12870. ],
  12871. ],
  12872. 'primary key' => [
  12873. 0 => 'phenotype_comparison_cvterm_id',
  12874. ],
  12875. 'foreign keys' => [
  12876. 'phenotype_comparison' => [
  12877. 'table' => 'phenotype_comparison',
  12878. 'columns' => [
  12879. 'phenotype_comparison_id' => 'phenotype_comparison_id',
  12880. ],
  12881. ],
  12882. 'cvterm' => [
  12883. 'table' => 'cvterm',
  12884. 'columns' => [
  12885. 'cvterm_id' => 'cvterm_id',
  12886. ],
  12887. ],
  12888. 'pub' => [
  12889. 'table' => 'pub',
  12890. 'columns' => [
  12891. 'pub_id' => 'pub_id',
  12892. ],
  12893. ],
  12894. ],
  12895. 'referring_tables' => [
  12896. ],
  12897. ];
  12898. return $description;
  12899. }
  12900. /**
  12901. * Implements hook_chado_schema_v1_3_phenotype_cvterm()
  12902. *
  12903. * Purpose: To describe the structure of 'phenotype_cvterm' to tripal
  12904. *
  12905. * @see chado_insert_record()
  12906. * @see chado_update_record()
  12907. * @see chado_select_record()
  12908. * @see chado_generate_var()
  12909. * @see chado_expan_var()
  12910. *
  12911. * @return
  12912. * An array describing the 'phenotype_cvterm' table
  12913. *
  12914. * @ingroup tripal_chado_v1.3_schema_api
  12915. *
  12916. */
  12917. function tripal_chado_chado_schema_v1_3_phenotype_cvterm() {
  12918. $description = [
  12919. 'description' => '',
  12920. 'table' => 'phenotype_cvterm',
  12921. 'fields' => [
  12922. 'phenotype_cvterm_id' => [
  12923. 'size' => 'big',
  12924. 'type' => 'serial',
  12925. 'not null' => TRUE,
  12926. ],
  12927. 'phenotype_id' => [
  12928. 'size' => 'big',
  12929. 'type' => 'int',
  12930. 'not null' => TRUE,
  12931. ],
  12932. 'cvterm_id' => [
  12933. 'size' => 'big',
  12934. 'type' => 'int',
  12935. 'not null' => TRUE,
  12936. ],
  12937. 'rank' => [
  12938. 'size' => 'normal',
  12939. 'type' => 'int',
  12940. 'not null' => TRUE,
  12941. 'default' => 0,
  12942. ],
  12943. ],
  12944. 'unique keys' => [
  12945. 'phenotype_cvterm_c1' => [
  12946. 0 => 'phenotype_id',
  12947. 1 => 'cvterm_id',
  12948. 2 => 'rank',
  12949. ],
  12950. ],
  12951. 'indexes' => [
  12952. 'phenotype_cvterm_idx1' => [
  12953. 0 => 'phenotype_id',
  12954. ],
  12955. 'phenotype_cvterm_idx2' => [
  12956. 0 => 'cvterm_id',
  12957. ],
  12958. ],
  12959. 'primary key' => [
  12960. 0 => 'phenotype_cvterm_id',
  12961. ],
  12962. 'foreign keys' => [
  12963. 'phenotype' => [
  12964. 'table' => 'phenotype',
  12965. 'columns' => [
  12966. 'phenotype_id' => 'phenotype_id',
  12967. ],
  12968. ],
  12969. 'cvterm' => [
  12970. 'table' => 'cvterm',
  12971. 'columns' => [
  12972. 'cvterm_id' => 'cvterm_id',
  12973. ],
  12974. ],
  12975. ],
  12976. 'referring_tables' => [
  12977. ],
  12978. ];
  12979. return $description;
  12980. }
  12981. /**
  12982. * Implements hook_chado_schema_v1_3_phenotypeprop()
  12983. *
  12984. * Purpose: To describe the structure of 'phenotypeprop' to tripal
  12985. *
  12986. * @see chado_insert_record()
  12987. * @see chado_update_record()
  12988. * @see chado_select_record()
  12989. * @see chado_generate_var()
  12990. * @see chado_expan_var()
  12991. *
  12992. * @return
  12993. * An array describing the 'phenotypeprop' table
  12994. *
  12995. * @ingroup tripal_chado_v1.3_schema_api
  12996. *
  12997. */
  12998. function tripal_chado_chado_schema_v1_3_phenotypeprop() {
  12999. $description = [
  13000. 'description' => '',
  13001. 'table' => 'phenotypeprop',
  13002. 'fields' => [
  13003. 'phenotypeprop_id' => [
  13004. 'size' => 'big',
  13005. 'type' => 'serial',
  13006. 'not null' => TRUE,
  13007. ],
  13008. 'phenotype_id' => [
  13009. 'size' => 'big',
  13010. 'type' => 'int',
  13011. 'not null' => TRUE,
  13012. ],
  13013. 'type_id' => [
  13014. 'size' => 'big',
  13015. 'type' => 'int',
  13016. 'not null' => TRUE,
  13017. ],
  13018. 'value' => [
  13019. 'size' => 'normal',
  13020. 'type' => 'text',
  13021. 'not null' => FALSE,
  13022. ],
  13023. 'rank' => [
  13024. 'size' => 'normal',
  13025. 'type' => 'int',
  13026. 'not null' => TRUE,
  13027. 'default' => 0,
  13028. ],
  13029. ],
  13030. 'unique keys' => [
  13031. 'phenotypeprop_c1' => [
  13032. 0 => 'phenotype_id',
  13033. 1 => 'type_id',
  13034. 2 => 'rank',
  13035. ],
  13036. ],
  13037. 'indexes' => [
  13038. 'phenotypeprop_idx1' => [
  13039. 0 => 'phenotype_id',
  13040. ],
  13041. 'phenotypeprop_idx2' => [
  13042. 0 => 'type_id',
  13043. ],
  13044. ],
  13045. 'primary key' => [
  13046. 0 => 'phenotypeprop_id',
  13047. ],
  13048. 'foreign keys' => [
  13049. 'phenotype' => [
  13050. 'table' => 'phenotype',
  13051. 'columns' => [
  13052. 'phenotype_id' => 'phenotype_id',
  13053. ],
  13054. ],
  13055. 'cvterm' => [
  13056. 'table' => 'cvterm',
  13057. 'columns' => [
  13058. 'type_id' => 'cvterm_id',
  13059. ],
  13060. ],
  13061. ],
  13062. 'referring_tables' => [
  13063. ],
  13064. ];
  13065. return $description;
  13066. }
  13067. /**
  13068. * Implements hook_chado_schema_v1_3_phenstatement()
  13069. *
  13070. * Purpose: To describe the structure of 'phenstatement' to tripal
  13071. *
  13072. * @see chado_insert_record()
  13073. * @see chado_update_record()
  13074. * @see chado_select_record()
  13075. * @see chado_generate_var()
  13076. * @see chado_expan_var()
  13077. *
  13078. * @return
  13079. * An array describing the 'phenstatement' table
  13080. *
  13081. * @ingroup tripal_chado_v1.3_schema_api
  13082. *
  13083. */
  13084. function tripal_chado_chado_schema_v1_3_phenstatement() {
  13085. $description = [
  13086. 'description' => '',
  13087. 'table' => 'phenstatement',
  13088. 'fields' => [
  13089. 'phenstatement_id' => [
  13090. 'size' => 'big',
  13091. 'type' => 'serial',
  13092. 'not null' => TRUE,
  13093. ],
  13094. 'genotype_id' => [
  13095. 'size' => 'big',
  13096. 'type' => 'int',
  13097. 'not null' => TRUE,
  13098. ],
  13099. 'environment_id' => [
  13100. 'size' => 'big',
  13101. 'type' => 'int',
  13102. 'not null' => TRUE,
  13103. ],
  13104. 'phenotype_id' => [
  13105. 'size' => 'big',
  13106. 'type' => 'int',
  13107. 'not null' => TRUE,
  13108. ],
  13109. 'type_id' => [
  13110. 'size' => 'big',
  13111. 'type' => 'int',
  13112. 'not null' => TRUE,
  13113. ],
  13114. 'pub_id' => [
  13115. 'size' => 'big',
  13116. 'type' => 'int',
  13117. 'not null' => TRUE,
  13118. ],
  13119. ],
  13120. 'unique keys' => [
  13121. 'phenstatement_c1' => [
  13122. 0 => 'genotype_id',
  13123. 1 => 'phenotype_id',
  13124. 2 => 'environment_id',
  13125. 3 => 'type_id',
  13126. 4 => 'pub_id',
  13127. ],
  13128. ],
  13129. 'indexes' => [
  13130. 'phenstatement_idx1' => [
  13131. 0 => 'genotype_id',
  13132. ],
  13133. 'phenstatement_idx2' => [
  13134. 0 => 'phenotype_id',
  13135. ],
  13136. ],
  13137. 'primary key' => [
  13138. 0 => 'phenstatement_id',
  13139. ],
  13140. 'foreign keys' => [
  13141. 'genotype' => [
  13142. 'table' => 'genotype',
  13143. 'columns' => [
  13144. 'genotype_id' => 'genotype_id',
  13145. ],
  13146. ],
  13147. 'environment' => [
  13148. 'table' => 'environment',
  13149. 'columns' => [
  13150. 'environment_id' => 'environment_id',
  13151. ],
  13152. ],
  13153. 'phenotype' => [
  13154. 'table' => 'phenotype',
  13155. 'columns' => [
  13156. 'phenotype_id' => 'phenotype_id',
  13157. ],
  13158. ],
  13159. 'cvterm' => [
  13160. 'table' => 'cvterm',
  13161. 'columns' => [
  13162. 'type_id' => 'cvterm_id',
  13163. ],
  13164. ],
  13165. 'pub' => [
  13166. 'table' => 'pub',
  13167. 'columns' => [
  13168. 'pub_id' => 'pub_id',
  13169. ],
  13170. ],
  13171. ],
  13172. 'referring_tables' => [
  13173. ],
  13174. ];
  13175. return $description;
  13176. }
  13177. /**
  13178. * Implements hook_chado_schema_v1_3_phylonode()
  13179. *
  13180. * Purpose: To describe the structure of 'phylonode' to tripal
  13181. *
  13182. * @see chado_insert_record()
  13183. * @see chado_update_record()
  13184. * @see chado_select_record()
  13185. * @see chado_generate_var()
  13186. * @see chado_expan_var()
  13187. *
  13188. * @return
  13189. * An array describing the 'phylonode' table
  13190. *
  13191. * @ingroup tripal_chado_v1.3_schema_api
  13192. *
  13193. */
  13194. function tripal_chado_chado_schema_v1_3_phylonode() {
  13195. $description = [
  13196. 'description' => '',
  13197. 'table' => 'phylonode',
  13198. 'fields' => [
  13199. 'phylonode_id' => [
  13200. 'size' => 'big',
  13201. 'type' => 'serial',
  13202. 'not null' => TRUE,
  13203. ],
  13204. 'phylotree_id' => [
  13205. 'size' => 'big',
  13206. 'type' => 'int',
  13207. 'not null' => TRUE,
  13208. ],
  13209. 'parent_phylonode_id' => [
  13210. 'size' => 'big',
  13211. 'type' => 'int',
  13212. 'not null' => FALSE,
  13213. ],
  13214. 'left_idx' => [
  13215. 'size' => 'normal',
  13216. 'type' => 'int',
  13217. 'not null' => TRUE,
  13218. ],
  13219. 'right_idx' => [
  13220. 'size' => 'normal',
  13221. 'type' => 'int',
  13222. 'not null' => TRUE,
  13223. ],
  13224. 'type_id' => [
  13225. 'size' => 'big',
  13226. 'type' => 'int',
  13227. 'not null' => FALSE,
  13228. ],
  13229. 'feature_id' => [
  13230. 'size' => 'big',
  13231. 'type' => 'int',
  13232. 'not null' => FALSE,
  13233. ],
  13234. 'label' => [
  13235. 'size' => 'normal',
  13236. 'type' => 'varchar',
  13237. 'length' => '255',
  13238. 'not null' => FALSE,
  13239. ],
  13240. 'distance' => [
  13241. 'size' => 'big',
  13242. 'type' => 'float',
  13243. 'not null' => FALSE,
  13244. ],
  13245. ],
  13246. 'indexes' => [
  13247. 'parent_phylonode_id' => [
  13248. 0 => 'parent_phylonode_id',
  13249. ],
  13250. ],
  13251. 'unique keys' => [
  13252. 'phylonode_phylotree_id_left_idx_key' => [
  13253. 0 => 'phylotree_id',
  13254. 1 => 'left_idx',
  13255. ],
  13256. 'phylonode_phylotree_id_right_idx_key' => [
  13257. 0 => 'phylotree_id',
  13258. 1 => 'right_idx',
  13259. ],
  13260. ],
  13261. 'primary key' => [
  13262. 0 => 'phylonode_id',
  13263. ],
  13264. 'foreign keys' => [
  13265. 'phylotree' => [
  13266. 'table' => 'phylotree',
  13267. 'columns' => [
  13268. 'phylotree_id' => 'phylotree_id',
  13269. ],
  13270. ],
  13271. 'phylonode' => [
  13272. 'table' => 'phylonode',
  13273. 'columns' => [
  13274. 'parent_phylonode_id' => 'phylonode_id',
  13275. ],
  13276. ],
  13277. 'cvterm' => [
  13278. 'table' => 'cvterm',
  13279. 'columns' => [
  13280. 'type_id' => 'cvterm_id',
  13281. ],
  13282. ],
  13283. 'feature' => [
  13284. 'table' => 'feature',
  13285. 'columns' => [
  13286. 'feature_id' => 'feature_id',
  13287. ],
  13288. ],
  13289. ],
  13290. 'referring_tables' => [
  13291. 0 => 'phylonode',
  13292. 1 => 'phylonode_dbxref',
  13293. 2 => 'phylonode_organism',
  13294. 3 => 'phylonodeprop',
  13295. 4 => 'phylonode_pub',
  13296. 5 => 'phylonode_relationship',
  13297. ],
  13298. ];
  13299. return $description;
  13300. }
  13301. /**
  13302. * Implements hook_chado_schema_v1_3_phylonode_dbxref()
  13303. *
  13304. * Purpose: To describe the structure of 'phylonode_dbxref' to tripal
  13305. *
  13306. * @see chado_insert_record()
  13307. * @see chado_update_record()
  13308. * @see chado_select_record()
  13309. * @see chado_generate_var()
  13310. * @see chado_expan_var()
  13311. *
  13312. * @return
  13313. * An array describing the 'phylonode_dbxref' table
  13314. *
  13315. * @ingroup tripal_chado_v1.3_schema_api
  13316. *
  13317. */
  13318. function tripal_chado_chado_schema_v1_3_phylonode_dbxref() {
  13319. $description = [
  13320. 'description' => '',
  13321. 'table' => 'phylonode_dbxref',
  13322. 'fields' => [
  13323. 'phylonode_dbxref_id' => [
  13324. 'size' => 'big',
  13325. 'type' => 'serial',
  13326. 'not null' => TRUE,
  13327. ],
  13328. 'phylonode_id' => [
  13329. 'size' => 'big',
  13330. 'type' => 'int',
  13331. 'not null' => TRUE,
  13332. ],
  13333. 'dbxref_id' => [
  13334. 'size' => 'big',
  13335. 'type' => 'int',
  13336. 'not null' => TRUE,
  13337. ],
  13338. ],
  13339. 'indexes' => [
  13340. 'phylonode_dbxref_idx1' => [
  13341. 0 => 'phylonode_id',
  13342. ],
  13343. 'phylonode_dbxref_idx2' => [
  13344. 0 => 'dbxref_id',
  13345. ],
  13346. ],
  13347. 'unique keys' => [
  13348. 'phylonode_dbxref_phylonode_id_dbxref_id_key' => [
  13349. 0 => 'phylonode_id',
  13350. 1 => 'dbxref_id',
  13351. ],
  13352. ],
  13353. 'primary key' => [
  13354. 0 => 'phylonode_dbxref_id',
  13355. ],
  13356. 'foreign keys' => [
  13357. 'phylonode' => [
  13358. 'table' => 'phylonode',
  13359. 'columns' => [
  13360. 'phylonode_id' => 'phylonode_id',
  13361. ],
  13362. ],
  13363. 'dbxref' => [
  13364. 'table' => 'dbxref',
  13365. 'columns' => [
  13366. 'dbxref_id' => 'dbxref_id',
  13367. ],
  13368. ],
  13369. ],
  13370. 'referring_tables' => [
  13371. ],
  13372. ];
  13373. return $description;
  13374. }
  13375. /**
  13376. * Implements hook_chado_schema_v1_3_phylonode_organism()
  13377. *
  13378. * Purpose: To describe the structure of 'phylonode_organism' to tripal
  13379. *
  13380. * @see chado_insert_record()
  13381. * @see chado_update_record()
  13382. * @see chado_select_record()
  13383. * @see chado_generate_var()
  13384. * @see chado_expan_var()
  13385. *
  13386. * @return
  13387. * An array describing the 'phylonode_organism' table
  13388. *
  13389. * @ingroup tripal_chado_v1.3_schema_api
  13390. *
  13391. */
  13392. function tripal_chado_chado_schema_v1_3_phylonode_organism() {
  13393. $description = [
  13394. 'description' => '',
  13395. 'table' => 'phylonode_organism',
  13396. 'fields' => [
  13397. 'phylonode_organism_id' => [
  13398. 'size' => 'big',
  13399. 'type' => 'serial',
  13400. 'not null' => TRUE,
  13401. ],
  13402. 'phylonode_id' => [
  13403. 'size' => 'big',
  13404. 'type' => 'int',
  13405. 'not null' => TRUE,
  13406. ],
  13407. 'organism_id' => [
  13408. 'size' => 'big',
  13409. 'type' => 'int',
  13410. 'not null' => TRUE,
  13411. ],
  13412. ],
  13413. 'indexes' => [
  13414. 'phylonode_organism_idx1' => [
  13415. 0 => 'phylonode_id',
  13416. ],
  13417. 'phylonode_organism_idx2' => [
  13418. 0 => 'organism_id',
  13419. ],
  13420. ],
  13421. 'unique keys' => [
  13422. 'phylonode_organism_phylonode_id_key' => [
  13423. 0 => 'phylonode_id',
  13424. ],
  13425. ],
  13426. 'primary key' => [
  13427. 0 => 'phylonode_organism_id',
  13428. ],
  13429. 'foreign keys' => [
  13430. 'phylonode' => [
  13431. 'table' => 'phylonode',
  13432. 'columns' => [
  13433. 'phylonode_id' => 'phylonode_id',
  13434. ],
  13435. ],
  13436. 'organism' => [
  13437. 'table' => 'organism',
  13438. 'columns' => [
  13439. 'organism_id' => 'organism_id',
  13440. ],
  13441. ],
  13442. ],
  13443. 'referring_tables' => [
  13444. ],
  13445. ];
  13446. return $description;
  13447. }
  13448. /**
  13449. * Implements hook_chado_schema_v1_3_phylonodeprop()
  13450. *
  13451. * Purpose: To describe the structure of 'phylonodeprop' to tripal
  13452. *
  13453. * @see chado_insert_record()
  13454. * @see chado_update_record()
  13455. * @see chado_select_record()
  13456. * @see chado_generate_var()
  13457. * @see chado_expan_var()
  13458. *
  13459. * @return
  13460. * An array describing the 'phylonodeprop' table
  13461. *
  13462. * @ingroup tripal_chado_v1.3_schema_api
  13463. *
  13464. */
  13465. function tripal_chado_chado_schema_v1_3_phylonodeprop() {
  13466. $description = [
  13467. 'description' => '',
  13468. 'table' => 'phylonodeprop',
  13469. 'fields' => [
  13470. 'phylonodeprop_id' => [
  13471. 'size' => 'big',
  13472. 'type' => 'serial',
  13473. 'not null' => TRUE,
  13474. ],
  13475. 'phylonode_id' => [
  13476. 'size' => 'big',
  13477. 'type' => 'int',
  13478. 'not null' => TRUE,
  13479. ],
  13480. 'type_id' => [
  13481. 'size' => 'big',
  13482. 'type' => 'int',
  13483. 'not null' => TRUE,
  13484. ],
  13485. 'value' => [
  13486. 'size' => 'normal',
  13487. 'type' => 'text',
  13488. 'not null' => TRUE,
  13489. 'default' => '',
  13490. ],
  13491. 'rank' => [
  13492. 'size' => 'normal',
  13493. 'type' => 'int',
  13494. 'not null' => TRUE,
  13495. 'default' => 0,
  13496. ],
  13497. ],
  13498. 'indexes' => [
  13499. 'phylonodeprop_idx1' => [
  13500. 0 => 'phylonode_id',
  13501. ],
  13502. 'phylonodeprop_idx2' => [
  13503. 0 => 'type_id',
  13504. ],
  13505. ],
  13506. 'unique keys' => [
  13507. 'phylonodeprop_phylonode_id_type_id_value_rank_key' => [
  13508. 0 => 'phylonode_id',
  13509. 1 => 'type_id',
  13510. 2 => 'value',
  13511. 3 => 'rank',
  13512. ],
  13513. ],
  13514. 'primary key' => [
  13515. 0 => 'phylonodeprop_id',
  13516. ],
  13517. 'foreign keys' => [
  13518. 'phylonode' => [
  13519. 'table' => 'phylonode',
  13520. 'columns' => [
  13521. 'phylonode_id' => 'phylonode_id',
  13522. ],
  13523. ],
  13524. 'cvterm' => [
  13525. 'table' => 'cvterm',
  13526. 'columns' => [
  13527. 'type_id' => 'cvterm_id',
  13528. ],
  13529. ],
  13530. ],
  13531. 'referring_tables' => [
  13532. ],
  13533. ];
  13534. return $description;
  13535. }
  13536. /**
  13537. * Implements hook_chado_schema_v1_3_phylonode_pub()
  13538. *
  13539. * Purpose: To describe the structure of 'phylonode_pub' to tripal
  13540. *
  13541. * @see chado_insert_record()
  13542. * @see chado_update_record()
  13543. * @see chado_select_record()
  13544. * @see chado_generate_var()
  13545. * @see chado_expan_var()
  13546. *
  13547. * @return
  13548. * An array describing the 'phylonode_pub' table
  13549. *
  13550. * @ingroup tripal_chado_v1.3_schema_api
  13551. *
  13552. */
  13553. function tripal_chado_chado_schema_v1_3_phylonode_pub() {
  13554. $description = [
  13555. 'description' => '',
  13556. 'table' => 'phylonode_pub',
  13557. 'fields' => [
  13558. 'phylonode_pub_id' => [
  13559. 'size' => 'big',
  13560. 'type' => 'serial',
  13561. 'not null' => TRUE,
  13562. ],
  13563. 'phylonode_id' => [
  13564. 'size' => 'big',
  13565. 'type' => 'int',
  13566. 'not null' => TRUE,
  13567. ],
  13568. 'pub_id' => [
  13569. 'size' => 'big',
  13570. 'type' => 'int',
  13571. 'not null' => TRUE,
  13572. ],
  13573. ],
  13574. 'indexes' => [
  13575. 'phylonode_pub_idx1' => [
  13576. 0 => 'phylonode_id',
  13577. ],
  13578. 'phylonode_pub_idx2' => [
  13579. 0 => 'pub_id',
  13580. ],
  13581. ],
  13582. 'unique keys' => [
  13583. 'phylonode_pub_phylonode_id_pub_id_key' => [
  13584. 0 => 'phylonode_id',
  13585. 1 => 'pub_id',
  13586. ],
  13587. ],
  13588. 'primary key' => [
  13589. 0 => 'phylonode_pub_id',
  13590. ],
  13591. 'foreign keys' => [
  13592. 'phylonode' => [
  13593. 'table' => 'phylonode',
  13594. 'columns' => [
  13595. 'phylonode_id' => 'phylonode_id',
  13596. ],
  13597. ],
  13598. 'pub' => [
  13599. 'table' => 'pub',
  13600. 'columns' => [
  13601. 'pub_id' => 'pub_id',
  13602. ],
  13603. ],
  13604. ],
  13605. 'referring_tables' => [
  13606. ],
  13607. ];
  13608. return $description;
  13609. }
  13610. /**
  13611. * Implements hook_chado_schema_v1_3_phylonode_relationship()
  13612. *
  13613. * Purpose: To describe the structure of 'phylonode_relationship' to tripal
  13614. *
  13615. * @see chado_insert_record()
  13616. * @see chado_update_record()
  13617. * @see chado_select_record()
  13618. * @see chado_generate_var()
  13619. * @see chado_expan_var()
  13620. *
  13621. * @return
  13622. * An array describing the 'phylonode_relationship' table
  13623. *
  13624. * @ingroup tripal_chado_v1.3_schema_api
  13625. *
  13626. */
  13627. function tripal_chado_chado_schema_v1_3_phylonode_relationship() {
  13628. $description = [
  13629. 'description' => '',
  13630. 'table' => 'phylonode_relationship',
  13631. 'fields' => [
  13632. 'phylonode_relationship_id' => [
  13633. 'size' => 'big',
  13634. 'type' => 'serial',
  13635. 'not null' => TRUE,
  13636. ],
  13637. 'subject_id' => [
  13638. 'size' => 'big',
  13639. 'type' => 'int',
  13640. 'not null' => TRUE,
  13641. ],
  13642. 'object_id' => [
  13643. 'size' => 'big',
  13644. 'type' => 'int',
  13645. 'not null' => TRUE,
  13646. ],
  13647. 'type_id' => [
  13648. 'size' => 'big',
  13649. 'type' => 'int',
  13650. 'not null' => TRUE,
  13651. ],
  13652. 'rank' => [
  13653. 'size' => 'normal',
  13654. 'type' => 'int',
  13655. 'not null' => FALSE,
  13656. ],
  13657. 'phylotree_id' => [
  13658. 'size' => 'big',
  13659. 'type' => 'int',
  13660. 'not null' => TRUE,
  13661. ],
  13662. ],
  13663. 'indexes' => [
  13664. 'phylonode_relationship_idx1' => [
  13665. 0 => 'subject_id',
  13666. ],
  13667. 'phylonode_relationship_idx2' => [
  13668. 0 => 'object_id',
  13669. ],
  13670. 'phylonode_relationship_idx3' => [
  13671. 0 => 'type_id',
  13672. ],
  13673. ],
  13674. 'primary key' => [
  13675. 0 => 'phylonode_relationship_id',
  13676. ],
  13677. 'unique keys' => [
  13678. 'phylonode_relationship_subject_id_object_id_type_id_key' => [
  13679. 0 => 'subject_id',
  13680. 1 => 'object_id',
  13681. 2 => 'type_id',
  13682. ],
  13683. ],
  13684. 'foreign keys' => [
  13685. 'phylonode' => [
  13686. 'table' => 'phylonode',
  13687. 'columns' => [
  13688. 'subject_id' => 'phylonode_id',
  13689. 'object_id' => 'phylonode_id',
  13690. ],
  13691. ],
  13692. 'cvterm' => [
  13693. 'table' => 'cvterm',
  13694. 'columns' => [
  13695. 'type_id' => 'cvterm_id',
  13696. ],
  13697. ],
  13698. 'phylotree' => [
  13699. 'table' => 'phylotree',
  13700. 'columns' => [
  13701. 'phylotree_id' => 'phylotree_id',
  13702. ],
  13703. ],
  13704. ],
  13705. 'referring_tables' => [
  13706. ],
  13707. ];
  13708. return $description;
  13709. }
  13710. /**
  13711. * Implements hook_chado_schema_v1_3_phylotree()
  13712. *
  13713. * Purpose: To describe the structure of 'phylotree' to tripal
  13714. *
  13715. * @see chado_insert_record()
  13716. * @see chado_update_record()
  13717. * @see chado_select_record()
  13718. * @see chado_generate_var()
  13719. * @see chado_expan_var()
  13720. *
  13721. * @return
  13722. * An array describing the 'phylotree' table
  13723. *
  13724. * @ingroup tripal_chado_v1.3_schema_api
  13725. *
  13726. */
  13727. function tripal_chado_chado_schema_v1_3_phylotree() {
  13728. $description = [
  13729. 'description' => '',
  13730. 'table' => 'phylotree',
  13731. 'fields' => [
  13732. 'phylotree_id' => [
  13733. 'size' => 'big',
  13734. 'type' => 'serial',
  13735. 'not null' => TRUE,
  13736. ],
  13737. 'dbxref_id' => [
  13738. 'size' => 'big',
  13739. 'type' => 'int',
  13740. 'not null' => TRUE,
  13741. ],
  13742. 'name' => [
  13743. 'size' => 'normal',
  13744. 'type' => 'varchar',
  13745. 'length' => '255',
  13746. 'not null' => FALSE,
  13747. ],
  13748. 'type_id' => [
  13749. 'size' => 'big',
  13750. 'type' => 'int',
  13751. 'not null' => FALSE,
  13752. ],
  13753. 'analysis_id' => [
  13754. 'size' => 'big',
  13755. 'type' => 'int',
  13756. 'not null' => FALSE,
  13757. ],
  13758. 'comment' => [
  13759. 'size' => 'normal',
  13760. 'type' => 'text',
  13761. 'not null' => FALSE,
  13762. ],
  13763. ],
  13764. 'indexes' => [
  13765. 'phylotree_idx1' => [
  13766. 0 => 'phylotree_id',
  13767. ],
  13768. ],
  13769. 'primary key' => [
  13770. 0 => 'phylotree_id',
  13771. ],
  13772. 'foreign keys' => [
  13773. 'dbxref' => [
  13774. 'table' => 'dbxref',
  13775. 'columns' => [
  13776. 'dbxref_id' => 'dbxref_id',
  13777. ],
  13778. ],
  13779. 'cvterm' => [
  13780. 'table' => 'cvterm',
  13781. 'columns' => [
  13782. 'type_id' => 'cvterm_id',
  13783. ],
  13784. ],
  13785. 'analysis' => [
  13786. 'table' => 'analysis',
  13787. 'columns' => [
  13788. 'analysis_id' => 'analysis_id',
  13789. ],
  13790. ],
  13791. ],
  13792. 'referring_tables' => [
  13793. 0 => 'phylonode',
  13794. 1 => 'phylonode_relationship',
  13795. 2 => 'phylotreeprop',
  13796. 3 => 'phylotree_pub',
  13797. ],
  13798. ];
  13799. return $description;
  13800. }
  13801. /**
  13802. * Implements hook_chado_schema_v1_3_phylotreeprop()
  13803. *
  13804. * Purpose: To describe the structure of 'phylotreeprop' to tripal
  13805. *
  13806. * @see chado_insert_record()
  13807. * @see chado_update_record()
  13808. * @see chado_select_record()
  13809. * @see chado_generate_var()
  13810. * @see chado_expan_var()
  13811. *
  13812. * @return
  13813. * An array describing the 'phylotreeprop' table
  13814. *
  13815. * @ingroup tripal_chado_v1.3_schema_api
  13816. *
  13817. */
  13818. function tripal_chado_chado_schema_v1_3_phylotreeprop() {
  13819. $description = [
  13820. 'description' => '',
  13821. 'table' => 'phylotreeprop',
  13822. 'fields' => [
  13823. 'phylotreeprop_id' => [
  13824. 'size' => 'big',
  13825. 'type' => 'serial',
  13826. 'not null' => TRUE,
  13827. ],
  13828. 'phylotree_id' => [
  13829. 'size' => 'big',
  13830. 'type' => 'int',
  13831. 'not null' => TRUE,
  13832. ],
  13833. 'type_id' => [
  13834. 'size' => 'big',
  13835. 'type' => 'int',
  13836. 'not null' => TRUE,
  13837. ],
  13838. 'value' => [
  13839. 'size' => 'normal',
  13840. 'type' => 'text',
  13841. 'not null' => FALSE,
  13842. ],
  13843. 'rank' => [
  13844. 'size' => 'normal',
  13845. 'type' => 'int',
  13846. 'not null' => TRUE,
  13847. 'default' => 0,
  13848. ],
  13849. ],
  13850. 'unique keys' => [
  13851. 'phylotreeprop_c1' => [
  13852. 0 => 'phylotree_id',
  13853. 1 => 'type_id',
  13854. 2 => 'rank',
  13855. ],
  13856. ],
  13857. 'indexes' => [
  13858. 'phylotreeprop_idx1' => [
  13859. 0 => 'phylotree_id',
  13860. ],
  13861. 'phylotreeprop_idx2' => [
  13862. 0 => 'type_id',
  13863. ],
  13864. ],
  13865. 'primary key' => [
  13866. 0 => 'phylotreeprop_id',
  13867. ],
  13868. 'foreign keys' => [
  13869. 'phylotree' => [
  13870. 'table' => 'phylotree',
  13871. 'columns' => [
  13872. 'phylotree_id' => 'phylotree_id',
  13873. ],
  13874. ],
  13875. 'cvterm' => [
  13876. 'table' => 'cvterm',
  13877. 'columns' => [
  13878. 'type_id' => 'cvterm_id',
  13879. ],
  13880. ],
  13881. ],
  13882. 'referring_tables' => [
  13883. ],
  13884. ];
  13885. return $description;
  13886. }
  13887. /**
  13888. * Implements hook_chado_schema_v1_3_phylotree_pub()
  13889. *
  13890. * Purpose: To describe the structure of 'phylotree_pub' to tripal
  13891. *
  13892. * @see chado_insert_record()
  13893. * @see chado_update_record()
  13894. * @see chado_select_record()
  13895. * @see chado_generate_var()
  13896. * @see chado_expan_var()
  13897. *
  13898. * @return
  13899. * An array describing the 'phylotree_pub' table
  13900. *
  13901. * @ingroup tripal_chado_v1.3_schema_api
  13902. *
  13903. */
  13904. function tripal_chado_chado_schema_v1_3_phylotree_pub() {
  13905. $description = [
  13906. 'description' => '',
  13907. 'table' => 'phylotree_pub',
  13908. 'fields' => [
  13909. 'phylotree_pub_id' => [
  13910. 'size' => 'big',
  13911. 'type' => 'serial',
  13912. 'not null' => TRUE,
  13913. ],
  13914. 'phylotree_id' => [
  13915. 'size' => 'big',
  13916. 'type' => 'int',
  13917. 'not null' => TRUE,
  13918. ],
  13919. 'pub_id' => [
  13920. 'size' => 'big',
  13921. 'type' => 'int',
  13922. 'not null' => TRUE,
  13923. ],
  13924. ],
  13925. 'indexes' => [
  13926. 'phylotree_pub_idx1' => [
  13927. 0 => 'phylotree_id',
  13928. ],
  13929. 'phylotree_pub_idx2' => [
  13930. 0 => 'pub_id',
  13931. ],
  13932. ],
  13933. 'unique keys' => [
  13934. 'phylotree_pub_phylotree_id_pub_id_key' => [
  13935. 0 => 'phylotree_id',
  13936. 1 => 'pub_id',
  13937. ],
  13938. ],
  13939. 'primary key' => [
  13940. 0 => 'phylotree_pub_id',
  13941. ],
  13942. 'foreign keys' => [
  13943. 'phylotree' => [
  13944. 'table' => 'phylotree',
  13945. 'columns' => [
  13946. 'phylotree_id' => 'phylotree_id',
  13947. ],
  13948. ],
  13949. 'pub' => [
  13950. 'table' => 'pub',
  13951. 'columns' => [
  13952. 'pub_id' => 'pub_id',
  13953. ],
  13954. ],
  13955. ],
  13956. 'referring_tables' => [
  13957. ],
  13958. ];
  13959. return $description;
  13960. }
  13961. /**
  13962. * Implements hook_chado_schema_v1_3_project()
  13963. *
  13964. * Purpose: To describe the structure of 'project' to tripal
  13965. *
  13966. * @see chado_insert_record()
  13967. * @see chado_update_record()
  13968. * @see chado_select_record()
  13969. * @see chado_generate_var()
  13970. * @see chado_expan_var()
  13971. *
  13972. * @return
  13973. * An array describing the 'project' table
  13974. *
  13975. * @ingroup tripal_chado_v1.3_schema_api
  13976. *
  13977. */
  13978. function tripal_chado_chado_schema_v1_3_project() {
  13979. $description = [
  13980. 'description' => '',
  13981. 'table' => 'project',
  13982. 'fields' => [
  13983. 'project_id' => [
  13984. 'size' => 'big',
  13985. 'type' => 'serial',
  13986. 'not null' => TRUE,
  13987. ],
  13988. 'name' => [
  13989. 'size' => 'normal',
  13990. 'type' => 'varchar',
  13991. 'length' => '255',
  13992. 'not null' => TRUE,
  13993. ],
  13994. 'description' => [
  13995. 'size' => 'normal',
  13996. 'type' => 'text',
  13997. 'not null' => FALSE,
  13998. ],
  13999. ],
  14000. 'unique keys' => [
  14001. 'project_c1' => [
  14002. 0 => 'name',
  14003. ],
  14004. ],
  14005. 'primary key' => [
  14006. 0 => 'project_id',
  14007. ],
  14008. 'foreign keys' => [
  14009. ],
  14010. 'referring_tables' => [
  14011. 0 => 'assay_project',
  14012. 1 => 'nd_experiment_project',
  14013. 2 => 'project_analysis',
  14014. 3 => 'project_contact',
  14015. 4 => 'project_dbxref',
  14016. 5 => 'project_feature',
  14017. 6 => 'projectprop',
  14018. 7 => 'project_pub',
  14019. 8 => 'project_relationship',
  14020. 10 => 'project_stock',
  14021. ],
  14022. ];
  14023. return $description;
  14024. }
  14025. /**
  14026. * Implements hook_chado_schema_v1_3_project_analysis()
  14027. *
  14028. * Purpose: To describe the structure of 'project_analysis' to tripal
  14029. *
  14030. * @see chado_insert_record()
  14031. * @see chado_update_record()
  14032. * @see chado_select_record()
  14033. * @see chado_generate_var()
  14034. * @see chado_expan_var()
  14035. *
  14036. * @return
  14037. * An array describing the 'project_analysis' table
  14038. *
  14039. * @ingroup tripal_chado_v1.3_schema_api
  14040. *
  14041. */
  14042. function tripal_chado_chado_schema_v1_3_project_analysis() {
  14043. $description = [
  14044. 'description' => '',
  14045. 'table' => 'project_analysis',
  14046. 'fields' => [
  14047. 'project_analysis_id' => [
  14048. 'size' => 'big',
  14049. 'type' => 'serial',
  14050. 'not null' => TRUE,
  14051. ],
  14052. 'project_id' => [
  14053. 'size' => 'big',
  14054. 'type' => 'int',
  14055. 'not null' => TRUE,
  14056. ],
  14057. 'analysis_id' => [
  14058. 'size' => 'big',
  14059. 'type' => 'int',
  14060. 'not null' => TRUE,
  14061. ],
  14062. 'rank' => [
  14063. 'size' => 'normal',
  14064. 'type' => 'int',
  14065. 'not null' => TRUE,
  14066. 'default' => 0,
  14067. ],
  14068. ],
  14069. 'unique keys' => [
  14070. 'project_analysis_c1' => [
  14071. 0 => 'project_id',
  14072. 1 => 'analysis_id',
  14073. ],
  14074. ],
  14075. 'indexes' => [
  14076. 'project_analysis_idx1' => [
  14077. 0 => 'project_id',
  14078. ],
  14079. 'project_analysis_idx2' => [
  14080. 0 => 'analysis_id',
  14081. ],
  14082. ],
  14083. 'primary key' => [
  14084. 0 => 'project_analysis_id',
  14085. ],
  14086. 'foreign keys' => [
  14087. 'project' => [
  14088. 'table' => 'project',
  14089. 'columns' => [
  14090. 'project_id' => 'project_id',
  14091. ],
  14092. ],
  14093. 'analysis' => [
  14094. 'table' => 'analysis',
  14095. 'columns' => [
  14096. 'analysis_id' => 'analysis_id',
  14097. ],
  14098. ],
  14099. ],
  14100. 'referring_tables' => [
  14101. ],
  14102. ];
  14103. return $description;
  14104. }
  14105. /**
  14106. * Implements hook_chado_schema_v1_3_project_contact()
  14107. *
  14108. * Purpose: To describe the structure of 'project_contact' to tripal
  14109. *
  14110. * @see chado_insert_record()
  14111. * @see chado_update_record()
  14112. * @see chado_select_record()
  14113. * @see chado_generate_var()
  14114. * @see chado_expan_var()
  14115. *
  14116. * @return
  14117. * An array describing the 'project_contact' table
  14118. *
  14119. * @ingroup tripal_chado_v1.3_schema_api
  14120. *
  14121. */
  14122. function tripal_chado_chado_schema_v1_3_project_contact() {
  14123. $description = [
  14124. 'description' => '',
  14125. 'table' => 'project_contact',
  14126. 'fields' => [
  14127. 'project_contact_id' => [
  14128. 'size' => 'big',
  14129. 'type' => 'serial',
  14130. 'not null' => TRUE,
  14131. ],
  14132. 'project_id' => [
  14133. 'size' => 'big',
  14134. 'type' => 'int',
  14135. 'not null' => TRUE,
  14136. ],
  14137. 'contact_id' => [
  14138. 'size' => 'big',
  14139. 'type' => 'int',
  14140. 'not null' => TRUE,
  14141. ],
  14142. ],
  14143. 'unique keys' => [
  14144. 'project_contact_c1' => [
  14145. 0 => 'project_id',
  14146. 1 => 'contact_id',
  14147. ],
  14148. ],
  14149. 'indexes' => [
  14150. 'project_contact_idx1' => [
  14151. 0 => 'project_id',
  14152. ],
  14153. 'project_contact_idx2' => [
  14154. 0 => 'contact_id',
  14155. ],
  14156. ],
  14157. 'primary key' => [
  14158. 0 => 'project_contact_id',
  14159. ],
  14160. 'foreign keys' => [
  14161. 'project' => [
  14162. 'table' => 'project',
  14163. 'columns' => [
  14164. 'project_id' => 'project_id',
  14165. ],
  14166. ],
  14167. 'contact' => [
  14168. 'table' => 'contact',
  14169. 'columns' => [
  14170. 'contact_id' => 'contact_id',
  14171. ],
  14172. ],
  14173. ],
  14174. 'referring_tables' => [
  14175. ],
  14176. ];
  14177. return $description;
  14178. }
  14179. /**
  14180. * Implements hook_chado_schema_v1_3_project_dbxref()
  14181. *
  14182. * Purpose: To describe the structure of 'project_dbxref' to tripal
  14183. *
  14184. * @see chado_insert_record()
  14185. * @see chado_update_record()
  14186. * @see chado_select_record()
  14187. * @see chado_generate_var()
  14188. * @see chado_expan_var()
  14189. *
  14190. * @return
  14191. * An array describing the 'project_dbxref' table
  14192. *
  14193. * @ingroup tripal_chado_v1.3_schema_api
  14194. *
  14195. */
  14196. function tripal_chado_chado_schema_v1_3_project_dbxref() {
  14197. $description = [
  14198. 'description' => '',
  14199. 'table' => 'project_dbxref',
  14200. 'fields' => [
  14201. 'project_dbxref_id' => [
  14202. 'size' => 'big',
  14203. 'type' => 'serial',
  14204. 'not null' => TRUE,
  14205. ],
  14206. 'project_id' => [
  14207. 'size' => 'big',
  14208. 'type' => 'int',
  14209. 'not null' => TRUE,
  14210. ],
  14211. 'dbxref_id' => [
  14212. 'size' => 'big',
  14213. 'type' => 'int',
  14214. 'not null' => TRUE,
  14215. ],
  14216. 'is_current' => [
  14217. 'size' => 'normal',
  14218. 'type' => 'boolean',
  14219. 'not null' => TRUE,
  14220. 'default' => 'true',
  14221. ],
  14222. ],
  14223. 'unique keys' => [
  14224. 'project_dbxref_c1' => [
  14225. 0 => 'project_id',
  14226. 1 => 'dbxref_id',
  14227. ],
  14228. ],
  14229. 'indexes' => [
  14230. 'project_dbxref_idx1' => [
  14231. 0 => 'project_id',
  14232. ],
  14233. 'project_dbxref_idx2' => [
  14234. 0 => 'dbxref_id',
  14235. ],
  14236. ],
  14237. 'primary key' => [
  14238. 0 => 'project_dbxref_id',
  14239. ],
  14240. 'foreign keys' => [
  14241. 'dbxref' => [
  14242. 'table' => 'dbxref',
  14243. 'columns' => [
  14244. 'dbxref_id' => 'dbxref_id',
  14245. ],
  14246. ],
  14247. 'project' => [
  14248. 'table' => 'project',
  14249. 'columns' => [
  14250. 'project_id' => 'project_id',
  14251. ],
  14252. ],
  14253. ],
  14254. 'referring_tables' => [
  14255. ],
  14256. ];
  14257. return $description;
  14258. }
  14259. /**
  14260. * Implements hook_chado_schema_v1_3_project_feature()
  14261. *
  14262. * Purpose: To describe the structure of 'project_feature' to tripal
  14263. *
  14264. * @see chado_insert_record()
  14265. * @see chado_update_record()
  14266. * @see chado_select_record()
  14267. * @see chado_generate_var()
  14268. * @see chado_expan_var()
  14269. *
  14270. * @return
  14271. * An array describing the 'project_feature' table
  14272. *
  14273. * @ingroup tripal_chado_v1.3_schema_api
  14274. *
  14275. */
  14276. function tripal_chado_chado_schema_v1_3_project_feature() {
  14277. $description = [
  14278. 'description' => '',
  14279. 'table' => 'project_feature',
  14280. 'fields' => [
  14281. 'project_feature_id' => [
  14282. 'size' => 'big',
  14283. 'type' => 'serial',
  14284. 'not null' => TRUE,
  14285. ],
  14286. 'feature_id' => [
  14287. 'size' => 'big',
  14288. 'type' => 'int',
  14289. 'not null' => TRUE,
  14290. ],
  14291. 'project_id' => [
  14292. 'size' => 'big',
  14293. 'type' => 'int',
  14294. 'not null' => TRUE,
  14295. ],
  14296. ],
  14297. 'unique keys' => [
  14298. 'project_feature_c1' => [
  14299. 0 => 'feature_id',
  14300. 1 => 'project_id',
  14301. ],
  14302. ],
  14303. 'indexes' => [
  14304. 'project_feature_idx1' => [
  14305. 0 => 'feature_id',
  14306. ],
  14307. 'project_feature_idx2' => [
  14308. 0 => 'project_id',
  14309. ],
  14310. ],
  14311. 'primary key' => [
  14312. 0 => 'project_feature_id',
  14313. ],
  14314. 'foreign keys' => [
  14315. 'feature' => [
  14316. 'table' => 'feature',
  14317. 'columns' => [
  14318. 'feature_id' => 'feature_id',
  14319. ],
  14320. ],
  14321. 'project' => [
  14322. 'table' => 'project',
  14323. 'columns' => [
  14324. 'project_id' => 'project_id',
  14325. ],
  14326. ],
  14327. ],
  14328. 'referring_tables' => [
  14329. ],
  14330. ];
  14331. return $description;
  14332. }
  14333. /**
  14334. * Implements hook_chado_schema_v1_3_projectprop()
  14335. *
  14336. * Purpose: To describe the structure of 'projectprop' to tripal
  14337. *
  14338. * @see chado_insert_record()
  14339. * @see chado_update_record()
  14340. * @see chado_select_record()
  14341. * @see chado_generate_var()
  14342. * @see chado_expan_var()
  14343. *
  14344. * @return
  14345. * An array describing the 'projectprop' table
  14346. *
  14347. * @ingroup tripal_chado_v1.3_schema_api
  14348. *
  14349. */
  14350. function tripal_chado_chado_schema_v1_3_projectprop() {
  14351. $description = [
  14352. 'description' => '',
  14353. 'table' => 'projectprop',
  14354. 'fields' => [
  14355. 'projectprop_id' => [
  14356. 'size' => 'big',
  14357. 'type' => 'serial',
  14358. 'not null' => TRUE,
  14359. ],
  14360. 'project_id' => [
  14361. 'size' => 'big',
  14362. 'type' => 'int',
  14363. 'not null' => TRUE,
  14364. ],
  14365. 'type_id' => [
  14366. 'size' => 'big',
  14367. 'type' => 'int',
  14368. 'not null' => TRUE,
  14369. ],
  14370. 'value' => [
  14371. 'size' => 'normal',
  14372. 'type' => 'text',
  14373. 'not null' => FALSE,
  14374. ],
  14375. 'rank' => [
  14376. 'size' => 'normal',
  14377. 'type' => 'int',
  14378. 'not null' => TRUE,
  14379. 'default' => 0,
  14380. ],
  14381. ],
  14382. 'unique keys' => [
  14383. 'projectprop_c1' => [
  14384. 0 => 'project_id',
  14385. 1 => 'type_id',
  14386. 2 => 'rank',
  14387. ],
  14388. ],
  14389. 'primary key' => [
  14390. 0 => 'projectprop_id',
  14391. ],
  14392. 'foreign keys' => [
  14393. 'project' => [
  14394. 'table' => 'project',
  14395. 'columns' => [
  14396. 'project_id' => 'project_id',
  14397. ],
  14398. ],
  14399. 'cvterm' => [
  14400. 'table' => 'cvterm',
  14401. 'columns' => [
  14402. 'type_id' => 'cvterm_id',
  14403. ],
  14404. ],
  14405. ],
  14406. 'referring_tables' => [
  14407. ],
  14408. ];
  14409. return $description;
  14410. }
  14411. /**
  14412. * Implements hook_chado_schema_v1_3_project_pub()
  14413. *
  14414. * Purpose: To describe the structure of 'project_pub' to tripal
  14415. *
  14416. * @see chado_insert_record()
  14417. * @see chado_update_record()
  14418. * @see chado_select_record()
  14419. * @see chado_generate_var()
  14420. * @see chado_expan_var()
  14421. *
  14422. * @return
  14423. * An array describing the 'project_pub' table
  14424. *
  14425. * @ingroup tripal_chado_v1.3_schema_api
  14426. *
  14427. */
  14428. function tripal_chado_chado_schema_v1_3_project_pub() {
  14429. $description = [
  14430. 'description' => '',
  14431. 'table' => 'project_pub',
  14432. 'fields' => [
  14433. 'project_pub_id' => [
  14434. 'size' => 'big',
  14435. 'type' => 'serial',
  14436. 'not null' => TRUE,
  14437. ],
  14438. 'project_id' => [
  14439. 'size' => 'big',
  14440. 'type' => 'int',
  14441. 'not null' => TRUE,
  14442. ],
  14443. 'pub_id' => [
  14444. 'size' => 'big',
  14445. 'type' => 'int',
  14446. 'not null' => TRUE,
  14447. ],
  14448. ],
  14449. 'unique keys' => [
  14450. 'project_pub_c1' => [
  14451. 0 => 'project_id',
  14452. 1 => 'pub_id',
  14453. ],
  14454. ],
  14455. 'indexes' => [
  14456. 'project_pub_idx1' => [
  14457. 0 => 'project_id',
  14458. ],
  14459. 'project_pub_idx2' => [
  14460. 0 => 'pub_id',
  14461. ],
  14462. ],
  14463. 'primary key' => [
  14464. 0 => 'project_pub_id',
  14465. ],
  14466. 'foreign keys' => [
  14467. 'project' => [
  14468. 'table' => 'project',
  14469. 'columns' => [
  14470. 'project_id' => 'project_id',
  14471. ],
  14472. ],
  14473. 'pub' => [
  14474. 'table' => 'pub',
  14475. 'columns' => [
  14476. 'pub_id' => 'pub_id',
  14477. ],
  14478. ],
  14479. ],
  14480. 'referring_tables' => [
  14481. ],
  14482. ];
  14483. return $description;
  14484. }
  14485. /**
  14486. * Implements hook_chado_schema_v1_3_project_relationship()
  14487. *
  14488. * Purpose: To describe the structure of 'project_relationship' to tripal
  14489. *
  14490. * @see chado_insert_record()
  14491. * @see chado_update_record()
  14492. * @see chado_select_record()
  14493. * @see chado_generate_var()
  14494. * @see chado_expan_var()
  14495. *
  14496. * @return
  14497. * An array describing the 'project_relationship' table
  14498. *
  14499. * @ingroup tripal_chado_v1.3_schema_api
  14500. *
  14501. */
  14502. function tripal_chado_chado_schema_v1_3_project_relationship() {
  14503. $description = [
  14504. 'description' => '',
  14505. 'table' => 'project_relationship',
  14506. 'fields' => [
  14507. 'project_relationship_id' => [
  14508. 'size' => 'big',
  14509. 'type' => 'serial',
  14510. 'not null' => TRUE,
  14511. ],
  14512. 'subject_project_id' => [
  14513. 'size' => 'big',
  14514. 'type' => 'int',
  14515. 'not null' => TRUE,
  14516. ],
  14517. 'object_project_id' => [
  14518. 'size' => 'big',
  14519. 'type' => 'int',
  14520. 'not null' => TRUE,
  14521. ],
  14522. 'type_id' => [
  14523. 'size' => 'big',
  14524. 'type' => 'int',
  14525. 'not null' => TRUE,
  14526. ],
  14527. ],
  14528. 'unique keys' => [
  14529. 'project_relationship_c1' => [
  14530. 0 => 'subject_project_id',
  14531. 1 => 'object_project_id',
  14532. 2 => 'type_id',
  14533. ],
  14534. ],
  14535. 'primary key' => [
  14536. 0 => 'project_relationship_id',
  14537. ],
  14538. 'foreign keys' => [
  14539. 'project' => [
  14540. 'table' => 'project',
  14541. 'columns' => [
  14542. 'subject_project_id' => 'project_id',
  14543. 'object_project_id' => 'project_id',
  14544. ],
  14545. ],
  14546. 'cvterm' => [
  14547. 'table' => 'cvterm',
  14548. 'columns' => [
  14549. 'type_id' => 'cvterm_id',
  14550. ],
  14551. ],
  14552. ],
  14553. 'referring_tables' => [
  14554. ],
  14555. ];
  14556. return $description;
  14557. }
  14558. /**
  14559. * Implements hook_chado_schema_v1_3_project_stock()
  14560. *
  14561. * Purpose: To describe the structure of 'project_stock' to tripal
  14562. *
  14563. * @see chado_insert_record()
  14564. * @see chado_update_record()
  14565. * @see chado_select_record()
  14566. * @see chado_generate_var()
  14567. * @see chado_expan_var()
  14568. *
  14569. * @return
  14570. * An array describing the 'project_stock' table
  14571. *
  14572. * @ingroup tripal_chado_v1.3_schema_api
  14573. *
  14574. */
  14575. function tripal_chado_chado_schema_v1_3_project_stock() {
  14576. $description = [
  14577. 'description' => '',
  14578. 'table' => 'project_stock',
  14579. 'fields' => [
  14580. 'project_stock_id' => [
  14581. 'size' => 'big',
  14582. 'type' => 'serial',
  14583. 'not null' => TRUE,
  14584. ],
  14585. 'stock_id' => [
  14586. 'size' => 'big',
  14587. 'type' => 'int',
  14588. 'not null' => TRUE,
  14589. ],
  14590. 'project_id' => [
  14591. 'size' => 'big',
  14592. 'type' => 'int',
  14593. 'not null' => TRUE,
  14594. ],
  14595. ],
  14596. 'unique keys' => [
  14597. 'project_stock_c1' => [
  14598. 0 => 'stock_id',
  14599. 1 => 'project_id',
  14600. ],
  14601. ],
  14602. 'indexes' => [
  14603. 'project_stock_idx1' => [
  14604. 0 => 'stock_id',
  14605. ],
  14606. 'project_stock_idx2' => [
  14607. 0 => 'project_id',
  14608. ],
  14609. ],
  14610. 'primary key' => [
  14611. 0 => 'project_stock_id',
  14612. ],
  14613. 'foreign keys' => [
  14614. 'stock' => [
  14615. 'table' => 'stock',
  14616. 'columns' => [
  14617. 'stock_id' => 'stock_id',
  14618. ],
  14619. ],
  14620. 'project' => [
  14621. 'table' => 'project',
  14622. 'columns' => [
  14623. 'project_id' => 'project_id',
  14624. ],
  14625. ],
  14626. ],
  14627. 'referring_tables' => [
  14628. ],
  14629. ];
  14630. return $description;
  14631. }
  14632. /**
  14633. * Implements hook_chado_schema_v1_3_protocol()
  14634. *
  14635. * Purpose: To describe the structure of 'protocol' to tripal
  14636. *
  14637. * @see chado_insert_record()
  14638. * @see chado_update_record()
  14639. * @see chado_select_record()
  14640. * @see chado_generate_var()
  14641. * @see chado_expan_var()
  14642. *
  14643. * @return
  14644. * An array describing the 'protocol' table
  14645. *
  14646. * @ingroup tripal_chado_v1.3_schema_api
  14647. *
  14648. */
  14649. function tripal_chado_chado_schema_v1_3_protocol() {
  14650. $description = [
  14651. 'description' => '',
  14652. 'table' => 'protocol',
  14653. 'fields' => [
  14654. 'protocol_id' => [
  14655. 'size' => 'big',
  14656. 'type' => 'serial',
  14657. 'not null' => TRUE,
  14658. ],
  14659. 'type_id' => [
  14660. 'size' => 'big',
  14661. 'type' => 'int',
  14662. 'not null' => TRUE,
  14663. ],
  14664. 'pub_id' => [
  14665. 'size' => 'big',
  14666. 'type' => 'int',
  14667. 'not null' => FALSE,
  14668. ],
  14669. 'dbxref_id' => [
  14670. 'size' => 'big',
  14671. 'type' => 'int',
  14672. 'not null' => FALSE,
  14673. ],
  14674. 'name' => [
  14675. 'size' => 'normal',
  14676. 'type' => 'text',
  14677. 'not null' => TRUE,
  14678. ],
  14679. 'uri' => [
  14680. 'size' => 'normal',
  14681. 'type' => 'text',
  14682. 'not null' => FALSE,
  14683. ],
  14684. 'protocoldescription' => [
  14685. 'size' => 'normal',
  14686. 'type' => 'text',
  14687. 'not null' => FALSE,
  14688. ],
  14689. 'hardwaredescription' => [
  14690. 'size' => 'normal',
  14691. 'type' => 'text',
  14692. 'not null' => FALSE,
  14693. ],
  14694. 'softwaredescription' => [
  14695. 'size' => 'normal',
  14696. 'type' => 'text',
  14697. 'not null' => FALSE,
  14698. ],
  14699. ],
  14700. 'unique keys' => [
  14701. 'protocol_c1' => [
  14702. 0 => 'name',
  14703. ],
  14704. ],
  14705. 'indexes' => [
  14706. 'protocol_idx1' => [
  14707. 0 => 'type_id',
  14708. ],
  14709. 'protocol_idx2' => [
  14710. 0 => 'pub_id',
  14711. ],
  14712. 'protocol_idx3' => [
  14713. 0 => 'dbxref_id',
  14714. ],
  14715. ],
  14716. 'primary key' => [
  14717. 0 => 'protocol_id',
  14718. ],
  14719. 'foreign keys' => [
  14720. 'cvterm' => [
  14721. 'table' => 'cvterm',
  14722. 'columns' => [
  14723. 'type_id' => 'cvterm_id',
  14724. ],
  14725. ],
  14726. 'pub' => [
  14727. 'table' => 'pub',
  14728. 'columns' => [
  14729. 'pub_id' => 'pub_id',
  14730. ],
  14731. ],
  14732. 'dbxref' => [
  14733. 'table' => 'dbxref',
  14734. 'columns' => [
  14735. 'dbxref_id' => 'dbxref_id',
  14736. ],
  14737. ],
  14738. ],
  14739. 'referring_tables' => [
  14740. 0 => 'acquisition',
  14741. 1 => 'arraydesign',
  14742. 2 => 'assay',
  14743. 3 => 'protocolparam',
  14744. 4 => 'quantification',
  14745. 5 => 'treatment',
  14746. ],
  14747. ];
  14748. return $description;
  14749. }
  14750. /**
  14751. * Implements hook_chado_schema_v1_3_protocolparam()
  14752. *
  14753. * Purpose: To describe the structure of 'protocolparam' to tripal
  14754. *
  14755. * @see chado_insert_record()
  14756. * @see chado_update_record()
  14757. * @see chado_select_record()
  14758. * @see chado_generate_var()
  14759. * @see chado_expan_var()
  14760. *
  14761. * @return
  14762. * An array describing the 'protocolparam' table
  14763. *
  14764. * @ingroup tripal_chado_v1.3_schema_api
  14765. *
  14766. */
  14767. function tripal_chado_chado_schema_v1_3_protocolparam() {
  14768. $description = [
  14769. 'description' => '',
  14770. 'table' => 'protocolparam',
  14771. 'fields' => [
  14772. 'protocolparam_id' => [
  14773. 'size' => 'big',
  14774. 'type' => 'serial',
  14775. 'not null' => TRUE,
  14776. ],
  14777. 'protocol_id' => [
  14778. 'size' => 'big',
  14779. 'type' => 'int',
  14780. 'not null' => TRUE,
  14781. ],
  14782. 'name' => [
  14783. 'size' => 'normal',
  14784. 'type' => 'text',
  14785. 'not null' => TRUE,
  14786. ],
  14787. 'datatype_id' => [
  14788. 'size' => 'big',
  14789. 'type' => 'int',
  14790. 'not null' => FALSE,
  14791. ],
  14792. 'unittype_id' => [
  14793. 'size' => 'big',
  14794. 'type' => 'int',
  14795. 'not null' => FALSE,
  14796. ],
  14797. 'value' => [
  14798. 'size' => 'normal',
  14799. 'type' => 'text',
  14800. 'not null' => FALSE,
  14801. ],
  14802. 'rank' => [
  14803. 'size' => 'normal',
  14804. 'type' => 'int',
  14805. 'not null' => TRUE,
  14806. 'default' => 0,
  14807. ],
  14808. ],
  14809. 'indexes' => [
  14810. 'protocolparam_idx1' => [
  14811. 0 => 'protocol_id',
  14812. ],
  14813. 'protocolparam_idx2' => [
  14814. 0 => 'datatype_id',
  14815. ],
  14816. 'protocolparam_idx3' => [
  14817. 0 => 'unittype_id',
  14818. ],
  14819. ],
  14820. 'primary key' => [
  14821. 0 => 'protocolparam_id',
  14822. ],
  14823. 'foreign keys' => [
  14824. 'protocol' => [
  14825. 'table' => 'protocol',
  14826. 'columns' => [
  14827. 'protocol_id' => 'protocol_id',
  14828. ],
  14829. ],
  14830. 'cvterm' => [
  14831. 'table' => 'cvterm',
  14832. 'columns' => [
  14833. 'datatype_id' => 'cvterm_id',
  14834. 'unittype_id' => 'cvterm_id',
  14835. ],
  14836. ],
  14837. ],
  14838. 'referring_tables' => [
  14839. ],
  14840. ];
  14841. return $description;
  14842. }
  14843. /**
  14844. * Implements hook_chado_schema_v1_3_pub()
  14845. *
  14846. * Purpose: To describe the structure of 'pub' to tripal
  14847. *
  14848. * @see chado_insert_record()
  14849. * @see chado_update_record()
  14850. * @see chado_select_record()
  14851. * @see chado_generate_var()
  14852. * @see chado_expan_var()
  14853. *
  14854. * @return
  14855. * An array describing the 'pub' table
  14856. *
  14857. * @ingroup tripal_chado_v1.3_schema_api
  14858. *
  14859. */
  14860. function tripal_chado_chado_schema_v1_3_pub() {
  14861. $description = [
  14862. 'description' => '',
  14863. 'table' => 'pub',
  14864. 'fields' => [
  14865. 'pub_id' => [
  14866. 'size' => 'big',
  14867. 'type' => 'serial',
  14868. 'not null' => TRUE,
  14869. ],
  14870. 'title' => [
  14871. 'size' => 'normal',
  14872. 'type' => 'text',
  14873. 'not null' => FALSE,
  14874. ],
  14875. 'volumetitle' => [
  14876. 'size' => 'normal',
  14877. 'type' => 'text',
  14878. 'not null' => FALSE,
  14879. ],
  14880. 'volume' => [
  14881. 'size' => 'normal',
  14882. 'type' => 'varchar',
  14883. 'length' => '255',
  14884. 'not null' => FALSE,
  14885. ],
  14886. 'series_name' => [
  14887. 'size' => 'normal',
  14888. 'type' => 'varchar',
  14889. 'length' => '255',
  14890. 'not null' => FALSE,
  14891. ],
  14892. 'issue' => [
  14893. 'size' => 'normal',
  14894. 'type' => 'varchar',
  14895. 'length' => '255',
  14896. 'not null' => FALSE,
  14897. ],
  14898. 'pyear' => [
  14899. 'size' => 'normal',
  14900. 'type' => 'varchar',
  14901. 'length' => '255',
  14902. 'not null' => FALSE,
  14903. ],
  14904. 'pages' => [
  14905. 'size' => 'normal',
  14906. 'type' => 'varchar',
  14907. 'length' => '255',
  14908. 'not null' => FALSE,
  14909. ],
  14910. 'miniref' => [
  14911. 'size' => 'normal',
  14912. 'type' => 'varchar',
  14913. 'length' => '255',
  14914. 'not null' => FALSE,
  14915. ],
  14916. 'uniquename' => [
  14917. 'size' => 'normal',
  14918. 'type' => 'text',
  14919. 'not null' => TRUE,
  14920. ],
  14921. 'type_id' => [
  14922. 'size' => 'big',
  14923. 'type' => 'int',
  14924. 'not null' => TRUE,
  14925. ],
  14926. 'is_obsolete' => [
  14927. 'size' => 'normal',
  14928. 'type' => 'boolean',
  14929. 'not null' => FALSE,
  14930. 'default' => FALSE,
  14931. ],
  14932. 'publisher' => [
  14933. 'size' => 'normal',
  14934. 'type' => 'varchar',
  14935. 'length' => '255',
  14936. 'not null' => FALSE,
  14937. ],
  14938. 'pubplace' => [
  14939. 'size' => 'normal',
  14940. 'type' => 'varchar',
  14941. 'length' => '255',
  14942. 'not null' => FALSE,
  14943. ],
  14944. ],
  14945. 'unique keys' => [
  14946. 'pub_c1' => [
  14947. 0 => 'uniquename',
  14948. ],
  14949. ],
  14950. 'indexes' => [
  14951. 'pub_idx1' => [
  14952. 0 => 'type_id',
  14953. ],
  14954. ],
  14955. 'primary key' => [
  14956. 0 => 'pub_id',
  14957. ],
  14958. 'foreign keys' => [
  14959. 'cvterm' => [
  14960. 'table' => 'cvterm',
  14961. 'columns' => [
  14962. 'type_id' => 'cvterm_id',
  14963. ],
  14964. ],
  14965. ],
  14966. 'referring_tables' => [
  14967. 0 => 'analysis_pub',
  14968. 1 => 'cell_line_cvterm',
  14969. 2 => 'cell_line_feature',
  14970. 3 => 'cell_line_library',
  14971. 4 => 'cell_lineprop_pub',
  14972. 5 => 'cell_line_pub',
  14973. 6 => 'cell_line_synonym',
  14974. 7 => 'expression_pub',
  14975. 8 => 'feature_cvterm',
  14976. 9 => 'feature_cvterm_pub',
  14977. 10 => 'feature_expression',
  14978. 11 => 'featureloc_pub',
  14979. 12 => 'featuremap_pub',
  14980. 13 => 'featureprop_pub',
  14981. 14 => 'feature_pub',
  14982. 15 => 'feature_relationshipprop_pub',
  14983. 16 => 'feature_relationship_pub',
  14984. 17 => 'feature_synonym',
  14985. 18 => 'library_cvterm',
  14986. 19 => 'library_expression',
  14987. 20 => 'libraryprop_pub',
  14988. 21 => 'library_pub',
  14989. 22 => 'library_relationship_pub',
  14990. 23 => 'library_synonym',
  14991. 24 => 'nd_experiment_pub',
  14992. 25 => 'organism_cvterm',
  14993. 26 => 'organismprop_pub',
  14994. 27 => 'organism_pub',
  14995. 28 => 'phendesc',
  14996. 29 => 'phenotype_comparison',
  14997. 30 => 'phenotype_comparison_cvterm',
  14998. 31 => 'phenstatement',
  14999. 32 => 'phylonode_pub',
  15000. 33 => 'phylotree_pub',
  15001. 34 => 'project_pub',
  15002. 35 => 'protocol',
  15003. 36 => 'pubauthor',
  15004. 37 => 'pub_dbxref',
  15005. 38 => 'pubprop',
  15006. 39 => 'pub_relationship',
  15007. 41 => 'stock_cvterm',
  15008. 42 => 'stockprop_pub',
  15009. 43 => 'stock_pub',
  15010. 44 => 'stock_relationship_cvterm',
  15011. 45 => 'stock_relationship_pub',
  15012. 46 => 'study',
  15013. ],
  15014. ];
  15015. return $description;
  15016. }
  15017. /**
  15018. * Implements hook_chado_schema_v1_3_pubauthor()
  15019. *
  15020. * Purpose: To describe the structure of 'pubauthor' to tripal
  15021. *
  15022. * @see chado_insert_record()
  15023. * @see chado_update_record()
  15024. * @see chado_select_record()
  15025. * @see chado_generate_var()
  15026. * @see chado_expan_var()
  15027. *
  15028. * @return
  15029. * An array describing the 'pubauthor' table
  15030. *
  15031. * @ingroup tripal_chado_v1.3_schema_api
  15032. *
  15033. */
  15034. function tripal_chado_chado_schema_v1_3_pubauthor() {
  15035. $description = [
  15036. 'description' => '',
  15037. 'table' => 'pubauthor',
  15038. 'fields' => [
  15039. 'pubauthor_id' => [
  15040. 'size' => 'big',
  15041. 'type' => 'serial',
  15042. 'not null' => TRUE,
  15043. ],
  15044. 'pub_id' => [
  15045. 'size' => 'big',
  15046. 'type' => 'int',
  15047. 'not null' => TRUE,
  15048. ],
  15049. 'rank' => [
  15050. 'size' => 'normal',
  15051. 'type' => 'int',
  15052. 'not null' => TRUE,
  15053. ],
  15054. 'editor' => [
  15055. 'size' => 'normal',
  15056. 'type' => 'boolean',
  15057. 'not null' => FALSE,
  15058. 'default' => FALSE,
  15059. ],
  15060. 'surname' => [
  15061. 'size' => 'normal',
  15062. 'type' => 'varchar',
  15063. 'length' => '100',
  15064. 'not null' => TRUE,
  15065. ],
  15066. 'givennames' => [
  15067. 'size' => 'normal',
  15068. 'type' => 'varchar',
  15069. 'length' => '100',
  15070. 'not null' => FALSE,
  15071. ],
  15072. 'suffix' => [
  15073. 'size' => 'normal',
  15074. 'type' => 'varchar',
  15075. 'length' => '100',
  15076. 'not null' => FALSE,
  15077. ],
  15078. ],
  15079. 'unique keys' => [
  15080. 'pubauthor_c1' => [
  15081. 0 => 'pub_id',
  15082. 1 => 'rank',
  15083. ],
  15084. ],
  15085. 'indexes' => [
  15086. 'pubauthor_contact_idx1' => [
  15087. 0 => 'pubauthor_id',
  15088. ],
  15089. 'pubauthor_idx2' => [
  15090. 0 => 'pub_id',
  15091. ],
  15092. ],
  15093. 'primary key' => [
  15094. 0 => 'pubauthor_id',
  15095. ],
  15096. 'foreign keys' => [
  15097. 'pub' => [
  15098. 'table' => 'pub',
  15099. 'columns' => [
  15100. 'pub_id' => 'pub_id',
  15101. ],
  15102. ],
  15103. ],
  15104. 'referring_tables' => [
  15105. 0 => 'pubauthor_contact',
  15106. ],
  15107. ];
  15108. return $description;
  15109. }
  15110. /**
  15111. * Implements hook_chado_schema_v1_3_pubauthor_contact()
  15112. *
  15113. * Purpose: To describe the structure of 'pubauthor_contact' to tripal
  15114. *
  15115. * @see chado_insert_record()
  15116. * @see chado_update_record()
  15117. * @see chado_select_record()
  15118. * @see chado_generate_var()
  15119. * @see chado_expan_var()
  15120. *
  15121. * @return
  15122. * An array describing the 'pubauthor_contact' table
  15123. *
  15124. * @ingroup tripal_chado_v1.3_schema_api
  15125. *
  15126. */
  15127. function tripal_chado_chado_schema_v1_3_pubauthor_contact() {
  15128. $description = [
  15129. 'description' => '',
  15130. 'table' => 'pubauthor_contact',
  15131. 'fields' => [
  15132. 'pubauthor_contact_id' => [
  15133. 'size' => 'big',
  15134. 'type' => 'serial',
  15135. 'not null' => TRUE,
  15136. ],
  15137. 'contact_id' => [
  15138. 'size' => 'big',
  15139. 'type' => 'int',
  15140. 'not null' => TRUE,
  15141. ],
  15142. 'pubauthor_id' => [
  15143. 'size' => 'big',
  15144. 'type' => 'int',
  15145. 'not null' => TRUE,
  15146. ],
  15147. ],
  15148. 'unique keys' => [
  15149. 'pubauthor_contact_c1' => [
  15150. 0 => 'contact_id',
  15151. 1 => 'pubauthor_id',
  15152. ],
  15153. ],
  15154. 'primary key' => [
  15155. 0 => 'pubauthor_contact_id',
  15156. ],
  15157. 'foreign keys' => [
  15158. 'pubauthor' => [
  15159. 'table' => 'pubauthor',
  15160. 'columns' => [
  15161. 'pubauthor_id' => 'pubauthor_id',
  15162. ],
  15163. ],
  15164. 'contact' => [
  15165. 'table' => 'contact',
  15166. 'columns' => [
  15167. 'contact_id' => 'contact_id',
  15168. ],
  15169. ],
  15170. ],
  15171. 'referring_tables' => [
  15172. ],
  15173. ];
  15174. return $description;
  15175. }
  15176. /**
  15177. * Implements hook_chado_schema_v1_3_pub_dbxref()
  15178. *
  15179. * Purpose: To describe the structure of 'pub_dbxref' to tripal
  15180. *
  15181. * @see chado_insert_record()
  15182. * @see chado_update_record()
  15183. * @see chado_select_record()
  15184. * @see chado_generate_var()
  15185. * @see chado_expan_var()
  15186. *
  15187. * @return
  15188. * An array describing the 'pub_dbxref' table
  15189. *
  15190. * @ingroup tripal_chado_v1.3_schema_api
  15191. *
  15192. */
  15193. function tripal_chado_chado_schema_v1_3_pub_dbxref() {
  15194. $description = [
  15195. 'description' => '',
  15196. 'table' => 'pub_dbxref',
  15197. 'fields' => [
  15198. 'pub_dbxref_id' => [
  15199. 'size' => 'big',
  15200. 'type' => 'serial',
  15201. 'not null' => TRUE,
  15202. ],
  15203. 'pub_id' => [
  15204. 'size' => 'big',
  15205. 'type' => 'int',
  15206. 'not null' => TRUE,
  15207. ],
  15208. 'dbxref_id' => [
  15209. 'size' => 'big',
  15210. 'type' => 'int',
  15211. 'not null' => TRUE,
  15212. ],
  15213. 'is_current' => [
  15214. 'size' => 'normal',
  15215. 'type' => 'boolean',
  15216. 'not null' => TRUE,
  15217. 'default' => 'true',
  15218. ],
  15219. ],
  15220. 'unique keys' => [
  15221. 'pub_dbxref_c1' => [
  15222. 0 => 'pub_id',
  15223. 1 => 'dbxref_id',
  15224. ],
  15225. ],
  15226. 'indexes' => [
  15227. 'pub_dbxref_idx1' => [
  15228. 0 => 'pub_id',
  15229. ],
  15230. 'pub_dbxref_idx2' => [
  15231. 0 => 'dbxref_id',
  15232. ],
  15233. ],
  15234. 'primary key' => [
  15235. 0 => 'pub_dbxref_id',
  15236. ],
  15237. 'foreign keys' => [
  15238. 'pub' => [
  15239. 'table' => 'pub',
  15240. 'columns' => [
  15241. 'pub_id' => 'pub_id',
  15242. ],
  15243. ],
  15244. 'dbxref' => [
  15245. 'table' => 'dbxref',
  15246. 'columns' => [
  15247. 'dbxref_id' => 'dbxref_id',
  15248. ],
  15249. ],
  15250. ],
  15251. 'referring_tables' => [
  15252. ],
  15253. ];
  15254. return $description;
  15255. }
  15256. /**
  15257. * Implements hook_chado_schema_v1_3_pubprop()
  15258. *
  15259. * Purpose: To describe the structure of 'pubprop' to tripal
  15260. *
  15261. * @see chado_insert_record()
  15262. * @see chado_update_record()
  15263. * @see chado_select_record()
  15264. * @see chado_generate_var()
  15265. * @see chado_expan_var()
  15266. *
  15267. * @return
  15268. * An array describing the 'pubprop' table
  15269. *
  15270. * @ingroup tripal_chado_v1.3_schema_api
  15271. *
  15272. */
  15273. function tripal_chado_chado_schema_v1_3_pubprop() {
  15274. $description = [
  15275. 'description' => '',
  15276. 'table' => 'pubprop',
  15277. 'fields' => [
  15278. 'pubprop_id' => [
  15279. 'size' => 'big',
  15280. 'type' => 'serial',
  15281. 'not null' => TRUE,
  15282. ],
  15283. 'pub_id' => [
  15284. 'size' => 'big',
  15285. 'type' => 'int',
  15286. 'not null' => TRUE,
  15287. ],
  15288. 'type_id' => [
  15289. 'size' => 'big',
  15290. 'type' => 'int',
  15291. 'not null' => TRUE,
  15292. ],
  15293. 'value' => [
  15294. 'size' => 'normal',
  15295. 'type' => 'text',
  15296. 'not null' => TRUE,
  15297. ],
  15298. 'rank' => [
  15299. 'size' => 'normal',
  15300. 'type' => 'int',
  15301. 'not null' => FALSE,
  15302. ],
  15303. ],
  15304. 'unique keys' => [
  15305. 'pubprop_c1' => [
  15306. 0 => 'pub_id',
  15307. 1 => 'type_id',
  15308. 2 => 'rank',
  15309. ],
  15310. ],
  15311. 'indexes' => [
  15312. 'pubprop_idx1' => [
  15313. 0 => 'pub_id',
  15314. ],
  15315. 'pubprop_idx2' => [
  15316. 0 => 'type_id',
  15317. ],
  15318. ],
  15319. 'primary key' => [
  15320. 0 => 'pubprop_id',
  15321. ],
  15322. 'foreign keys' => [
  15323. 'pub' => [
  15324. 'table' => 'pub',
  15325. 'columns' => [
  15326. 'pub_id' => 'pub_id',
  15327. ],
  15328. ],
  15329. 'cvterm' => [
  15330. 'table' => 'cvterm',
  15331. 'columns' => [
  15332. 'type_id' => 'cvterm_id',
  15333. ],
  15334. ],
  15335. ],
  15336. 'referring_tables' => [
  15337. ],
  15338. ];
  15339. return $description;
  15340. }
  15341. /**
  15342. * Implements hook_chado_schema_v1_3_pub_relationship()
  15343. *
  15344. * Purpose: To describe the structure of 'pub_relationship' to tripal
  15345. *
  15346. * @see chado_insert_record()
  15347. * @see chado_update_record()
  15348. * @see chado_select_record()
  15349. * @see chado_generate_var()
  15350. * @see chado_expan_var()
  15351. *
  15352. * @return
  15353. * An array describing the 'pub_relationship' table
  15354. *
  15355. * @ingroup tripal_chado_v1.3_schema_api
  15356. *
  15357. */
  15358. function tripal_chado_chado_schema_v1_3_pub_relationship() {
  15359. $description = [
  15360. 'description' => '',
  15361. 'table' => 'pub_relationship',
  15362. 'fields' => [
  15363. 'pub_relationship_id' => [
  15364. 'size' => 'big',
  15365. 'type' => 'serial',
  15366. 'not null' => TRUE,
  15367. ],
  15368. 'subject_id' => [
  15369. 'size' => 'big',
  15370. 'type' => 'int',
  15371. 'not null' => TRUE,
  15372. ],
  15373. 'object_id' => [
  15374. 'size' => 'big',
  15375. 'type' => 'int',
  15376. 'not null' => TRUE,
  15377. ],
  15378. 'type_id' => [
  15379. 'size' => 'big',
  15380. 'type' => 'int',
  15381. 'not null' => TRUE,
  15382. ],
  15383. ],
  15384. 'unique keys' => [
  15385. 'pub_relationship_c1' => [
  15386. 0 => 'subject_id',
  15387. 1 => 'object_id',
  15388. 2 => 'type_id',
  15389. ],
  15390. ],
  15391. 'indexes' => [
  15392. 'pub_relationship_idx1' => [
  15393. 0 => 'subject_id',
  15394. ],
  15395. 'pub_relationship_idx2' => [
  15396. 0 => 'object_id',
  15397. ],
  15398. 'pub_relationship_idx3' => [
  15399. 0 => 'type_id',
  15400. ],
  15401. ],
  15402. 'primary key' => [
  15403. 0 => 'pub_relationship_id',
  15404. ],
  15405. 'foreign keys' => [
  15406. 'pub' => [
  15407. 'table' => 'pub',
  15408. 'columns' => [
  15409. 'subject_id' => 'pub_id',
  15410. 'object_id' => 'pub_id',
  15411. ],
  15412. ],
  15413. 'cvterm' => [
  15414. 'table' => 'cvterm',
  15415. 'columns' => [
  15416. 'type_id' => 'cvterm_id',
  15417. ],
  15418. ],
  15419. ],
  15420. 'referring_tables' => [
  15421. ],
  15422. ];
  15423. return $description;
  15424. }
  15425. /**
  15426. * Implements hook_chado_schema_v1_3_quantification()
  15427. *
  15428. * Purpose: To describe the structure of 'quantification' to tripal
  15429. *
  15430. * @see chado_insert_record()
  15431. * @see chado_update_record()
  15432. * @see chado_select_record()
  15433. * @see chado_generate_var()
  15434. * @see chado_expan_var()
  15435. *
  15436. * @return
  15437. * An array describing the 'quantification' table
  15438. *
  15439. * @ingroup tripal_chado_v1.3_schema_api
  15440. *
  15441. */
  15442. function tripal_chado_chado_schema_v1_3_quantification() {
  15443. $description = [
  15444. 'description' => '',
  15445. 'table' => 'quantification',
  15446. 'fields' => [
  15447. 'quantification_id' => [
  15448. 'size' => 'big',
  15449. 'type' => 'serial',
  15450. 'not null' => TRUE,
  15451. ],
  15452. 'acquisition_id' => [
  15453. 'size' => 'big',
  15454. 'type' => 'int',
  15455. 'not null' => TRUE,
  15456. ],
  15457. 'operator_id' => [
  15458. 'size' => 'big',
  15459. 'type' => 'int',
  15460. 'not null' => FALSE,
  15461. ],
  15462. 'protocol_id' => [
  15463. 'size' => 'big',
  15464. 'type' => 'int',
  15465. 'not null' => FALSE,
  15466. ],
  15467. 'analysis_id' => [
  15468. 'size' => 'big',
  15469. 'type' => 'int',
  15470. 'not null' => TRUE,
  15471. ],
  15472. 'quantificationdate' => [
  15473. 'size' => 'normal',
  15474. 'type' => 'datetime',
  15475. 'not null' => FALSE,
  15476. 'default' => 'now()',
  15477. ],
  15478. 'name' => [
  15479. 'size' => 'normal',
  15480. 'type' => 'text',
  15481. 'not null' => FALSE,
  15482. ],
  15483. 'uri' => [
  15484. 'size' => 'normal',
  15485. 'type' => 'text',
  15486. 'not null' => FALSE,
  15487. ],
  15488. ],
  15489. 'unique keys' => [
  15490. 'quantification_c1' => [
  15491. 0 => 'name',
  15492. 1 => 'analysis_id',
  15493. ],
  15494. ],
  15495. 'indexes' => [
  15496. 'quantification_idx1' => [
  15497. 0 => 'acquisition_id',
  15498. ],
  15499. 'quantification_idx2' => [
  15500. 0 => 'operator_id',
  15501. ],
  15502. 'quantification_idx3' => [
  15503. 0 => 'protocol_id',
  15504. ],
  15505. 'quantification_idx4' => [
  15506. 0 => 'analysis_id',
  15507. ],
  15508. ],
  15509. 'primary key' => [
  15510. 0 => 'quantification_id',
  15511. ],
  15512. 'foreign keys' => [
  15513. 'acquisition' => [
  15514. 'table' => 'acquisition',
  15515. 'columns' => [
  15516. 'acquisition_id' => 'acquisition_id',
  15517. ],
  15518. ],
  15519. 'contact' => [
  15520. 'table' => 'contact',
  15521. 'columns' => [
  15522. 'operator_id' => 'contact_id',
  15523. ],
  15524. ],
  15525. 'protocol' => [
  15526. 'table' => 'protocol',
  15527. 'columns' => [
  15528. 'protocol_id' => 'protocol_id',
  15529. ],
  15530. ],
  15531. 'analysis' => [
  15532. 'table' => 'analysis',
  15533. 'columns' => [
  15534. 'analysis_id' => 'analysis_id',
  15535. ],
  15536. ],
  15537. ],
  15538. 'referring_tables' => [
  15539. 0 => 'elementresult',
  15540. 1 => 'quantificationprop',
  15541. 2 => 'quantification_relationship',
  15542. ],
  15543. ];
  15544. return $description;
  15545. }
  15546. /**
  15547. * Implements hook_chado_schema_v1_3_quantificationprop()
  15548. *
  15549. * Purpose: To describe the structure of 'quantificationprop' to tripal
  15550. *
  15551. * @see chado_insert_record()
  15552. * @see chado_update_record()
  15553. * @see chado_select_record()
  15554. * @see chado_generate_var()
  15555. * @see chado_expan_var()
  15556. *
  15557. * @return
  15558. * An array describing the 'quantificationprop' table
  15559. *
  15560. * @ingroup tripal_chado_v1.3_schema_api
  15561. *
  15562. */
  15563. function tripal_chado_chado_schema_v1_3_quantificationprop() {
  15564. $description = [
  15565. 'description' => '',
  15566. 'table' => 'quantificationprop',
  15567. 'fields' => [
  15568. 'quantificationprop_id' => [
  15569. 'size' => 'big',
  15570. 'type' => 'serial',
  15571. 'not null' => TRUE,
  15572. ],
  15573. 'quantification_id' => [
  15574. 'size' => 'big',
  15575. 'type' => 'int',
  15576. 'not null' => TRUE,
  15577. ],
  15578. 'type_id' => [
  15579. 'size' => 'big',
  15580. 'type' => 'int',
  15581. 'not null' => TRUE,
  15582. ],
  15583. 'value' => [
  15584. 'size' => 'normal',
  15585. 'type' => 'text',
  15586. 'not null' => FALSE,
  15587. ],
  15588. 'rank' => [
  15589. 'size' => 'normal',
  15590. 'type' => 'int',
  15591. 'not null' => TRUE,
  15592. 'default' => 0,
  15593. ],
  15594. ],
  15595. 'unique keys' => [
  15596. 'quantificationprop_c1' => [
  15597. 0 => 'quantification_id',
  15598. 1 => 'type_id',
  15599. 2 => 'rank',
  15600. ],
  15601. ],
  15602. 'indexes' => [
  15603. 'quantificationprop_idx1' => [
  15604. 0 => 'quantification_id',
  15605. ],
  15606. 'quantificationprop_idx2' => [
  15607. 0 => 'type_id',
  15608. ],
  15609. ],
  15610. 'primary key' => [
  15611. 0 => 'quantificationprop_id',
  15612. ],
  15613. 'foreign keys' => [
  15614. 'quantification' => [
  15615. 'table' => 'quantification',
  15616. 'columns' => [
  15617. 'quantification_id' => 'quantification_id',
  15618. ],
  15619. ],
  15620. 'cvterm' => [
  15621. 'table' => 'cvterm',
  15622. 'columns' => [
  15623. 'type_id' => 'cvterm_id',
  15624. ],
  15625. ],
  15626. ],
  15627. 'referring_tables' => [
  15628. ],
  15629. ];
  15630. return $description;
  15631. }
  15632. /**
  15633. * Implements hook_chado_schema_v1_3_quantification_relationship()
  15634. *
  15635. * Purpose: To describe the structure of 'quantification_relationship' to tripal
  15636. *
  15637. * @see chado_insert_record()
  15638. * @see chado_update_record()
  15639. * @see chado_select_record()
  15640. * @see chado_generate_var()
  15641. * @see chado_expan_var()
  15642. *
  15643. * @return
  15644. * An array describing the 'quantification_relationship' table
  15645. *
  15646. * @ingroup tripal_chado_v1.3_schema_api
  15647. *
  15648. */
  15649. function tripal_chado_chado_schema_v1_3_quantification_relationship() {
  15650. $description = [
  15651. 'description' => '',
  15652. 'table' => 'quantification_relationship',
  15653. 'fields' => [
  15654. 'quantification_relationship_id' => [
  15655. 'size' => 'big',
  15656. 'type' => 'serial',
  15657. 'not null' => TRUE,
  15658. ],
  15659. 'subject_id' => [
  15660. 'size' => 'big',
  15661. 'type' => 'int',
  15662. 'not null' => TRUE,
  15663. ],
  15664. 'type_id' => [
  15665. 'size' => 'big',
  15666. 'type' => 'int',
  15667. 'not null' => TRUE,
  15668. ],
  15669. 'object_id' => [
  15670. 'size' => 'big',
  15671. 'type' => 'int',
  15672. 'not null' => TRUE,
  15673. ],
  15674. ],
  15675. 'unique keys' => [
  15676. 'quantification_relationship_c1' => [
  15677. 0 => 'subject_id',
  15678. 1 => 'object_id',
  15679. 2 => 'type_id',
  15680. ],
  15681. ],
  15682. 'indexes' => [
  15683. 'quantification_relationship_idx1' => [
  15684. 0 => 'subject_id',
  15685. ],
  15686. 'quantification_relationship_idx2' => [
  15687. 0 => 'type_id',
  15688. ],
  15689. 'quantification_relationship_idx3' => [
  15690. 0 => 'object_id',
  15691. ],
  15692. ],
  15693. 'primary key' => [
  15694. 0 => 'quantification_relationship_id',
  15695. ],
  15696. 'foreign keys' => [
  15697. 'quantification' => [
  15698. 'table' => 'quantification',
  15699. 'columns' => [
  15700. 'subject_id' => 'quantification_id',
  15701. 'object_id' => 'quantification_id',
  15702. ],
  15703. ],
  15704. 'cvterm' => [
  15705. 'table' => 'cvterm',
  15706. 'columns' => [
  15707. 'type_id' => 'cvterm_id',
  15708. ],
  15709. ],
  15710. ],
  15711. 'referring_tables' => [
  15712. ],
  15713. ];
  15714. return $description;
  15715. }
  15716. /**
  15717. * Implements hook_chado_schema_v1_3_stock()
  15718. *
  15719. * Purpose: To describe the structure of 'stock' to tripal
  15720. *
  15721. * @see chado_insert_record()
  15722. * @see chado_update_record()
  15723. * @see chado_select_record()
  15724. * @see chado_generate_var()
  15725. * @see chado_expan_var()
  15726. *
  15727. * @return
  15728. * An array describing the 'stock' table
  15729. *
  15730. * @ingroup tripal_chado_v1.3_schema_api
  15731. *
  15732. */
  15733. function tripal_chado_chado_schema_v1_3_stock() {
  15734. $description = [
  15735. 'description' => '',
  15736. 'table' => 'stock',
  15737. 'fields' => [
  15738. 'stock_id' => [
  15739. 'size' => 'big',
  15740. 'type' => 'serial',
  15741. 'not null' => TRUE,
  15742. ],
  15743. 'dbxref_id' => [
  15744. 'size' => 'big',
  15745. 'type' => 'int',
  15746. 'not null' => FALSE,
  15747. ],
  15748. 'organism_id' => [
  15749. 'size' => 'big',
  15750. 'type' => 'int',
  15751. 'not null' => FALSE,
  15752. ],
  15753. 'name' => [
  15754. 'size' => 'normal',
  15755. 'type' => 'varchar',
  15756. 'length' => '255',
  15757. 'not null' => FALSE,
  15758. ],
  15759. 'uniquename' => [
  15760. 'size' => 'normal',
  15761. 'type' => 'text',
  15762. 'not null' => TRUE,
  15763. ],
  15764. 'description' => [
  15765. 'size' => 'normal',
  15766. 'type' => 'text',
  15767. 'not null' => FALSE,
  15768. ],
  15769. 'type_id' => [
  15770. 'size' => 'big',
  15771. 'type' => 'int',
  15772. 'not null' => TRUE,
  15773. ],
  15774. 'is_obsolete' => [
  15775. 'size' => 'normal',
  15776. 'type' => 'boolean',
  15777. 'not null' => TRUE,
  15778. 'default' => FALSE,
  15779. ],
  15780. ],
  15781. 'unique keys' => [
  15782. 'stock_c1' => [
  15783. 0 => 'organism_id',
  15784. 1 => 'uniquename',
  15785. 2 => 'type_id',
  15786. ],
  15787. ],
  15788. 'indexes' => [
  15789. 'stock_idx1' => [
  15790. 0 => 'dbxref_id',
  15791. ],
  15792. 'stock_idx2' => [
  15793. 0 => 'organism_id',
  15794. ],
  15795. 'stock_idx3' => [
  15796. 0 => 'type_id',
  15797. ],
  15798. 'stock_idx4' => [
  15799. 0 => 'uniquename',
  15800. ],
  15801. 'stock_name_ind1' => [
  15802. 0 => 'name',
  15803. ],
  15804. ],
  15805. 'primary key' => [
  15806. 0 => 'stock_id',
  15807. ],
  15808. 'foreign keys' => [
  15809. 'dbxref' => [
  15810. 'table' => 'dbxref',
  15811. 'columns' => [
  15812. 'dbxref_id' => 'dbxref_id',
  15813. ],
  15814. ],
  15815. 'organism' => [
  15816. 'table' => 'organism',
  15817. 'columns' => [
  15818. 'organism_id' => 'organism_id',
  15819. ],
  15820. ],
  15821. 'cvterm' => [
  15822. 'table' => 'cvterm',
  15823. 'columns' => [
  15824. 'type_id' => 'cvterm_id',
  15825. ],
  15826. ],
  15827. ],
  15828. 'referring_tables' => [
  15829. 0 => 'nd_experiment_stock',
  15830. 1 => 'project_stock',
  15831. 2 => 'stockcollection_stock',
  15832. 3 => 'stock_cvterm',
  15833. 4 => 'stock_dbxref',
  15834. 5 => 'stock_feature',
  15835. 6 => 'stock_featuremap',
  15836. 7 => 'stock_genotype',
  15837. 8 => 'stock_library',
  15838. 9 => 'stockprop',
  15839. 10 => 'stock_pub',
  15840. 11 => 'stock_relationship',
  15841. ],
  15842. ];
  15843. return $description;
  15844. }
  15845. /**
  15846. * Implements hook_chado_schema_v1_3_stockcollection()
  15847. *
  15848. * Purpose: To describe the structure of 'stockcollection' to tripal
  15849. *
  15850. * @see chado_insert_record()
  15851. * @see chado_update_record()
  15852. * @see chado_select_record()
  15853. * @see chado_generate_var()
  15854. * @see chado_expan_var()
  15855. *
  15856. * @return
  15857. * An array describing the 'stockcollection' table
  15858. *
  15859. * @ingroup tripal_chado_v1.3_schema_api
  15860. *
  15861. */
  15862. function tripal_chado_chado_schema_v1_3_stockcollection() {
  15863. $description = [
  15864. 'description' => '',
  15865. 'table' => 'stockcollection',
  15866. 'fields' => [
  15867. 'stockcollection_id' => [
  15868. 'size' => 'big',
  15869. 'type' => 'serial',
  15870. 'not null' => TRUE,
  15871. ],
  15872. 'type_id' => [
  15873. 'size' => 'big',
  15874. 'type' => 'int',
  15875. 'not null' => TRUE,
  15876. ],
  15877. 'contact_id' => [
  15878. 'size' => 'big',
  15879. 'type' => 'int',
  15880. 'not null' => FALSE,
  15881. ],
  15882. 'name' => [
  15883. 'size' => 'normal',
  15884. 'type' => 'varchar',
  15885. 'length' => '255',
  15886. 'not null' => FALSE,
  15887. ],
  15888. 'uniquename' => [
  15889. 'size' => 'normal',
  15890. 'type' => 'text',
  15891. 'not null' => TRUE,
  15892. ],
  15893. ],
  15894. 'unique keys' => [
  15895. 'stockcollection_c1' => [
  15896. 0 => 'uniquename',
  15897. 1 => 'type_id',
  15898. ],
  15899. ],
  15900. 'indexes' => [
  15901. 'stockcollection_idx1' => [
  15902. 0 => 'contact_id',
  15903. ],
  15904. 'stockcollection_idx2' => [
  15905. 0 => 'type_id',
  15906. ],
  15907. 'stockcollection_idx3' => [
  15908. 0 => 'uniquename',
  15909. ],
  15910. 'stockcollection_name_ind1' => [
  15911. 0 => 'name',
  15912. ],
  15913. ],
  15914. 'primary key' => [
  15915. 0 => 'stockcollection_id',
  15916. ],
  15917. 'foreign keys' => [
  15918. 'cvterm' => [
  15919. 'table' => 'cvterm',
  15920. 'columns' => [
  15921. 'type_id' => 'cvterm_id',
  15922. ],
  15923. ],
  15924. 'contact' => [
  15925. 'table' => 'contact',
  15926. 'columns' => [
  15927. 'contact_id' => 'contact_id',
  15928. ],
  15929. ],
  15930. ],
  15931. 'referring_tables' => [
  15932. 0 => 'stockcollection_db',
  15933. 1 => 'stockcollectionprop',
  15934. 2 => 'stockcollection_stock',
  15935. ],
  15936. ];
  15937. return $description;
  15938. }
  15939. /**
  15940. * Implements hook_chado_schema_v1_3_stockcollection_db()
  15941. *
  15942. * Purpose: To describe the structure of 'stockcollection_db' to tripal
  15943. *
  15944. * @see chado_insert_record()
  15945. * @see chado_update_record()
  15946. * @see chado_select_record()
  15947. * @see chado_generate_var()
  15948. * @see chado_expan_var()
  15949. *
  15950. * @return
  15951. * An array describing the 'stockcollection_db' table
  15952. *
  15953. * @ingroup tripal_chado_v1.3_schema_api
  15954. *
  15955. */
  15956. function tripal_chado_chado_schema_v1_3_stockcollection_db() {
  15957. $description = [
  15958. 'description' => '',
  15959. 'table' => 'stockcollection_db',
  15960. 'fields' => [
  15961. 'stockcollection_db_id' => [
  15962. 'size' => 'big',
  15963. 'type' => 'serial',
  15964. 'not null' => TRUE,
  15965. ],
  15966. 'stockcollection_id' => [
  15967. 'size' => 'big',
  15968. 'type' => 'int',
  15969. 'not null' => TRUE,
  15970. ],
  15971. 'db_id' => [
  15972. 'size' => 'big',
  15973. 'type' => 'int',
  15974. 'not null' => TRUE,
  15975. ],
  15976. ],
  15977. 'unique keys' => [
  15978. 'stockcollection_db_c1' => [
  15979. 0 => 'stockcollection_id',
  15980. 1 => 'db_id',
  15981. ],
  15982. ],
  15983. 'indexes' => [
  15984. 'stockcollection_db_idx1' => [
  15985. 0 => 'stockcollection_id',
  15986. ],
  15987. 'stockcollection_db_idx2' => [
  15988. 0 => 'db_id',
  15989. ],
  15990. ],
  15991. 'primary key' => [
  15992. 0 => 'stockcollection_db_id',
  15993. ],
  15994. 'foreign keys' => [
  15995. 'db' => [
  15996. 'table' => 'db',
  15997. 'columns' => [
  15998. 'db_id' => 'db_id',
  15999. ],
  16000. ],
  16001. 'stockcollection' => [
  16002. 'table' => 'stockcollection',
  16003. 'columns' => [
  16004. 'stockcollection_id' => 'stockcollection_id',
  16005. ],
  16006. ],
  16007. ],
  16008. 'referring_tables' => [
  16009. ],
  16010. ];
  16011. return $description;
  16012. }
  16013. /**
  16014. * Implements hook_chado_schema_v1_3_stockcollectionprop()
  16015. *
  16016. * Purpose: To describe the structure of 'stockcollectionprop' to tripal
  16017. *
  16018. * @see chado_insert_record()
  16019. * @see chado_update_record()
  16020. * @see chado_select_record()
  16021. * @see chado_generate_var()
  16022. * @see chado_expan_var()
  16023. *
  16024. * @return
  16025. * An array describing the 'stockcollectionprop' table
  16026. *
  16027. * @ingroup tripal_chado_v1.3_schema_api
  16028. *
  16029. */
  16030. function tripal_chado_chado_schema_v1_3_stockcollectionprop() {
  16031. $description = [
  16032. 'description' => '',
  16033. 'table' => 'stockcollectionprop',
  16034. 'fields' => [
  16035. 'stockcollectionprop_id' => [
  16036. 'size' => 'big',
  16037. 'type' => 'serial',
  16038. 'not null' => TRUE,
  16039. ],
  16040. 'stockcollection_id' => [
  16041. 'size' => 'big',
  16042. 'type' => 'int',
  16043. 'not null' => TRUE,
  16044. ],
  16045. 'type_id' => [
  16046. 'size' => 'big',
  16047. 'type' => 'int',
  16048. 'not null' => TRUE,
  16049. ],
  16050. 'value' => [
  16051. 'size' => 'normal',
  16052. 'type' => 'text',
  16053. 'not null' => FALSE,
  16054. ],
  16055. 'rank' => [
  16056. 'size' => 'normal',
  16057. 'type' => 'int',
  16058. 'not null' => TRUE,
  16059. 'default' => 0,
  16060. ],
  16061. ],
  16062. 'unique keys' => [
  16063. 'stockcollectionprop_c1' => [
  16064. 0 => 'stockcollection_id',
  16065. 1 => 'type_id',
  16066. 2 => 'rank',
  16067. ],
  16068. ],
  16069. 'indexes' => [
  16070. 'stockcollectionprop_idx1' => [
  16071. 0 => 'stockcollection_id',
  16072. ],
  16073. 'stockcollectionprop_idx2' => [
  16074. 0 => 'type_id',
  16075. ],
  16076. ],
  16077. 'primary key' => [
  16078. 0 => 'stockcollectionprop_id',
  16079. ],
  16080. 'foreign keys' => [
  16081. 'stockcollection' => [
  16082. 'table' => 'stockcollection',
  16083. 'columns' => [
  16084. 'stockcollection_id' => 'stockcollection_id',
  16085. ],
  16086. ],
  16087. 'cvterm' => [
  16088. 'table' => 'cvterm',
  16089. 'columns' => [
  16090. 'type_id' => 'cvterm_id',
  16091. ],
  16092. ],
  16093. ],
  16094. 'referring_tables' => [
  16095. ],
  16096. ];
  16097. return $description;
  16098. }
  16099. /**
  16100. * Implements hook_chado_schema_v1_3_stockcollection_stock()
  16101. *
  16102. * Purpose: To describe the structure of 'stockcollection_stock' to tripal
  16103. *
  16104. * @see chado_insert_record()
  16105. * @see chado_update_record()
  16106. * @see chado_select_record()
  16107. * @see chado_generate_var()
  16108. * @see chado_expan_var()
  16109. *
  16110. * @return
  16111. * An array describing the 'stockcollection_stock' table
  16112. *
  16113. * @ingroup tripal_chado_v1.3_schema_api
  16114. *
  16115. */
  16116. function tripal_chado_chado_schema_v1_3_stockcollection_stock() {
  16117. $description = [
  16118. 'description' => '',
  16119. 'table' => 'stockcollection_stock',
  16120. 'fields' => [
  16121. 'stockcollection_stock_id' => [
  16122. 'size' => 'big',
  16123. 'type' => 'serial',
  16124. 'not null' => TRUE,
  16125. ],
  16126. 'stockcollection_id' => [
  16127. 'size' => 'big',
  16128. 'type' => 'int',
  16129. 'not null' => TRUE,
  16130. ],
  16131. 'stock_id' => [
  16132. 'size' => 'big',
  16133. 'type' => 'int',
  16134. 'not null' => TRUE,
  16135. ],
  16136. ],
  16137. 'unique keys' => [
  16138. 'stockcollection_stock_c1' => [
  16139. 0 => 'stockcollection_id',
  16140. 1 => 'stock_id',
  16141. ],
  16142. ],
  16143. 'indexes' => [
  16144. 'stockcollection_stock_idx1' => [
  16145. 0 => 'stockcollection_id',
  16146. ],
  16147. 'stockcollection_stock_idx2' => [
  16148. 0 => 'stock_id',
  16149. ],
  16150. ],
  16151. 'primary key' => [
  16152. 0 => 'stockcollection_stock_id',
  16153. ],
  16154. 'foreign keys' => [
  16155. 'stockcollection' => [
  16156. 'table' => 'stockcollection',
  16157. 'columns' => [
  16158. 'stockcollection_id' => 'stockcollection_id',
  16159. ],
  16160. ],
  16161. 'stock' => [
  16162. 'table' => 'stock',
  16163. 'columns' => [
  16164. 'stock_id' => 'stock_id',
  16165. ],
  16166. ],
  16167. ],
  16168. 'referring_tables' => [
  16169. ],
  16170. ];
  16171. return $description;
  16172. }
  16173. /**
  16174. * Implements hook_chado_schema_v1_3_stock_cvterm()
  16175. *
  16176. * Purpose: To describe the structure of 'stock_cvterm' to tripal
  16177. *
  16178. * @see chado_insert_record()
  16179. * @see chado_update_record()
  16180. * @see chado_select_record()
  16181. * @see chado_generate_var()
  16182. * @see chado_expan_var()
  16183. *
  16184. * @return
  16185. * An array describing the 'stock_cvterm' table
  16186. *
  16187. * @ingroup tripal_chado_v1.3_schema_api
  16188. *
  16189. */
  16190. function tripal_chado_chado_schema_v1_3_stock_cvterm() {
  16191. $description = [
  16192. 'description' => '',
  16193. 'table' => 'stock_cvterm',
  16194. 'fields' => [
  16195. 'stock_cvterm_id' => [
  16196. 'size' => 'big',
  16197. 'type' => 'serial',
  16198. 'not null' => TRUE,
  16199. ],
  16200. 'stock_id' => [
  16201. 'size' => 'big',
  16202. 'type' => 'int',
  16203. 'not null' => TRUE,
  16204. ],
  16205. 'cvterm_id' => [
  16206. 'size' => 'big',
  16207. 'type' => 'int',
  16208. 'not null' => TRUE,
  16209. ],
  16210. 'pub_id' => [
  16211. 'size' => 'big',
  16212. 'type' => 'int',
  16213. 'not null' => TRUE,
  16214. ],
  16215. 'is_not' => [
  16216. 'size' => 'normal',
  16217. 'type' => 'boolean',
  16218. 'not null' => TRUE,
  16219. 'default' => FALSE,
  16220. ],
  16221. 'rank' => [
  16222. 'size' => 'normal',
  16223. 'type' => 'int',
  16224. 'not null' => TRUE,
  16225. 'default' => 0,
  16226. ],
  16227. ],
  16228. 'unique keys' => [
  16229. 'stock_cvterm_c1' => [
  16230. 0 => 'stock_id',
  16231. 1 => 'cvterm_id',
  16232. 2 => 'pub_id',
  16233. 3 => 'rank',
  16234. ],
  16235. ],
  16236. 'indexes' => [
  16237. 'stock_cvterm_idx1' => [
  16238. 0 => 'stock_id',
  16239. ],
  16240. 'stock_cvterm_idx2' => [
  16241. 0 => 'cvterm_id',
  16242. ],
  16243. 'stock_cvterm_idx3' => [
  16244. 0 => 'pub_id',
  16245. ],
  16246. ],
  16247. 'primary key' => [
  16248. 0 => 'stock_cvterm_id',
  16249. ],
  16250. 'foreign keys' => [
  16251. 'stock' => [
  16252. 'table' => 'stock',
  16253. 'columns' => [
  16254. 'stock_id' => 'stock_id',
  16255. ],
  16256. ],
  16257. 'cvterm' => [
  16258. 'table' => 'cvterm',
  16259. 'columns' => [
  16260. 'cvterm_id' => 'cvterm_id',
  16261. ],
  16262. ],
  16263. 'pub' => [
  16264. 'table' => 'pub',
  16265. 'columns' => [
  16266. 'pub_id' => 'pub_id',
  16267. ],
  16268. ],
  16269. ],
  16270. 'referring_tables' => [
  16271. 0 => 'stock_cvtermprop',
  16272. ],
  16273. ];
  16274. return $description;
  16275. }
  16276. /**
  16277. * Implements hook_chado_schema_v1_3_stock_cvtermprop()
  16278. *
  16279. * Purpose: To describe the structure of 'stock_cvtermprop' to tripal
  16280. *
  16281. * @see chado_insert_record()
  16282. * @see chado_update_record()
  16283. * @see chado_select_record()
  16284. * @see chado_generate_var()
  16285. * @see chado_expan_var()
  16286. *
  16287. * @return
  16288. * An array describing the 'stock_cvtermprop' table
  16289. *
  16290. * @ingroup tripal_chado_v1.3_schema_api
  16291. *
  16292. */
  16293. function tripal_chado_chado_schema_v1_3_stock_cvtermprop() {
  16294. $description = [
  16295. 'description' => '',
  16296. 'table' => 'stock_cvtermprop',
  16297. 'fields' => [
  16298. 'stock_cvtermprop_id' => [
  16299. 'size' => 'big',
  16300. 'type' => 'serial',
  16301. 'not null' => TRUE,
  16302. ],
  16303. 'stock_cvterm_id' => [
  16304. 'size' => 'big',
  16305. 'type' => 'int',
  16306. 'not null' => TRUE,
  16307. ],
  16308. 'type_id' => [
  16309. 'size' => 'big',
  16310. 'type' => 'int',
  16311. 'not null' => TRUE,
  16312. ],
  16313. 'value' => [
  16314. 'size' => 'normal',
  16315. 'type' => 'text',
  16316. 'not null' => FALSE,
  16317. ],
  16318. 'rank' => [
  16319. 'size' => 'normal',
  16320. 'type' => 'int',
  16321. 'not null' => TRUE,
  16322. 'default' => 0,
  16323. ],
  16324. ],
  16325. 'unique keys' => [
  16326. 'stock_cvtermprop_c1' => [
  16327. 0 => 'stock_cvterm_id',
  16328. 1 => 'type_id',
  16329. 2 => 'rank',
  16330. ],
  16331. ],
  16332. 'indexes' => [
  16333. 'stock_cvtermprop_idx1' => [
  16334. 0 => 'stock_cvterm_id',
  16335. ],
  16336. 'stock_cvtermprop_idx2' => [
  16337. 0 => 'type_id',
  16338. ],
  16339. ],
  16340. 'primary key' => [
  16341. 0 => 'stock_cvtermprop_id',
  16342. ],
  16343. 'foreign keys' => [
  16344. 'stock_cvterm' => [
  16345. 'table' => 'stock_cvterm',
  16346. 'columns' => [
  16347. 'stock_cvterm_id' => 'stock_cvterm_id',
  16348. ],
  16349. ],
  16350. 'cvterm' => [
  16351. 'table' => 'cvterm',
  16352. 'columns' => [
  16353. 'type_id' => 'cvterm_id',
  16354. ],
  16355. ],
  16356. ],
  16357. 'referring_tables' => [
  16358. ],
  16359. ];
  16360. return $description;
  16361. }
  16362. /**
  16363. * Implements hook_chado_schema_v1_3_stock_dbxref()
  16364. *
  16365. * Purpose: To describe the structure of 'stock_dbxref' to tripal
  16366. *
  16367. * @see chado_insert_record()
  16368. * @see chado_update_record()
  16369. * @see chado_select_record()
  16370. * @see chado_generate_var()
  16371. * @see chado_expan_var()
  16372. *
  16373. * @return
  16374. * An array describing the 'stock_dbxref' table
  16375. *
  16376. * @ingroup tripal_chado_v1.3_schema_api
  16377. *
  16378. */
  16379. function tripal_chado_chado_schema_v1_3_stock_dbxref() {
  16380. $description = [
  16381. 'description' => '',
  16382. 'table' => 'stock_dbxref',
  16383. 'fields' => [
  16384. 'stock_dbxref_id' => [
  16385. 'size' => 'big',
  16386. 'type' => 'serial',
  16387. 'not null' => TRUE,
  16388. ],
  16389. 'stock_id' => [
  16390. 'size' => 'big',
  16391. 'type' => 'int',
  16392. 'not null' => TRUE,
  16393. ],
  16394. 'dbxref_id' => [
  16395. 'size' => 'big',
  16396. 'type' => 'int',
  16397. 'not null' => TRUE,
  16398. ],
  16399. 'is_current' => [
  16400. 'size' => 'normal',
  16401. 'type' => 'boolean',
  16402. 'not null' => TRUE,
  16403. 'default' => 'true',
  16404. ],
  16405. ],
  16406. 'unique keys' => [
  16407. 'stock_dbxref_c1' => [
  16408. 0 => 'stock_id',
  16409. 1 => 'dbxref_id',
  16410. ],
  16411. ],
  16412. 'indexes' => [
  16413. 'stock_dbxref_idx1' => [
  16414. 0 => 'stock_id',
  16415. ],
  16416. 'stock_dbxref_idx2' => [
  16417. 0 => 'dbxref_id',
  16418. ],
  16419. ],
  16420. 'primary key' => [
  16421. 0 => 'stock_dbxref_id',
  16422. ],
  16423. 'foreign keys' => [
  16424. 'stock' => [
  16425. 'table' => 'stock',
  16426. 'columns' => [
  16427. 'stock_id' => 'stock_id',
  16428. ],
  16429. ],
  16430. 'dbxref' => [
  16431. 'table' => 'dbxref',
  16432. 'columns' => [
  16433. 'dbxref_id' => 'dbxref_id',
  16434. ],
  16435. ],
  16436. ],
  16437. 'referring_tables' => [
  16438. 0 => 'stock_dbxrefprop',
  16439. ],
  16440. ];
  16441. return $description;
  16442. }
  16443. /**
  16444. * Implements hook_chado_schema_v1_3_stock_dbxrefprop()
  16445. *
  16446. * Purpose: To describe the structure of 'stock_dbxrefprop' to tripal
  16447. *
  16448. * @see chado_insert_record()
  16449. * @see chado_update_record()
  16450. * @see chado_select_record()
  16451. * @see chado_generate_var()
  16452. * @see chado_expan_var()
  16453. *
  16454. * @return
  16455. * An array describing the 'stock_dbxrefprop' table
  16456. *
  16457. * @ingroup tripal_chado_v1.3_schema_api
  16458. *
  16459. */
  16460. function tripal_chado_chado_schema_v1_3_stock_dbxrefprop() {
  16461. $description = [
  16462. 'description' => '',
  16463. 'table' => 'stock_dbxrefprop',
  16464. 'fields' => [
  16465. 'stock_dbxrefprop_id' => [
  16466. 'size' => 'big',
  16467. 'type' => 'serial',
  16468. 'not null' => TRUE,
  16469. ],
  16470. 'stock_dbxref_id' => [
  16471. 'size' => 'big',
  16472. 'type' => 'int',
  16473. 'not null' => TRUE,
  16474. ],
  16475. 'type_id' => [
  16476. 'size' => 'big',
  16477. 'type' => 'int',
  16478. 'not null' => TRUE,
  16479. ],
  16480. 'value' => [
  16481. 'size' => 'normal',
  16482. 'type' => 'text',
  16483. 'not null' => FALSE,
  16484. ],
  16485. 'rank' => [
  16486. 'size' => 'normal',
  16487. 'type' => 'int',
  16488. 'not null' => TRUE,
  16489. 'default' => 0,
  16490. ],
  16491. ],
  16492. 'unique keys' => [
  16493. 'stock_dbxrefprop_c1' => [
  16494. 0 => 'stock_dbxref_id',
  16495. 1 => 'type_id',
  16496. 2 => 'rank',
  16497. ],
  16498. ],
  16499. 'indexes' => [
  16500. 'stock_dbxrefprop_idx1' => [
  16501. 0 => 'stock_dbxref_id',
  16502. ],
  16503. 'stock_dbxrefprop_idx2' => [
  16504. 0 => 'type_id',
  16505. ],
  16506. ],
  16507. 'primary key' => [
  16508. 0 => 'stock_dbxrefprop_id',
  16509. ],
  16510. 'foreign keys' => [
  16511. 'stock_dbxref' => [
  16512. 'table' => 'stock_dbxref',
  16513. 'columns' => [
  16514. 'stock_dbxref_id' => 'stock_dbxref_id',
  16515. ],
  16516. ],
  16517. 'cvterm' => [
  16518. 'table' => 'cvterm',
  16519. 'columns' => [
  16520. 'type_id' => 'cvterm_id',
  16521. ],
  16522. ],
  16523. ],
  16524. 'referring_tables' => [
  16525. ],
  16526. ];
  16527. return $description;
  16528. }
  16529. /**
  16530. * Implements hook_chado_schema_v1_3_stock_feature()
  16531. *
  16532. * Purpose: To describe the structure of 'stock_feature' to tripal
  16533. *
  16534. * @see chado_insert_record()
  16535. * @see chado_update_record()
  16536. * @see chado_select_record()
  16537. * @see chado_generate_var()
  16538. * @see chado_expan_var()
  16539. *
  16540. * @return
  16541. * An array describing the 'stock_feature' table
  16542. *
  16543. * @ingroup tripal_chado_v1.3_schema_api
  16544. *
  16545. */
  16546. function tripal_chado_chado_schema_v1_3_stock_feature() {
  16547. $description = [
  16548. 'description' => '',
  16549. 'table' => 'stock_feature',
  16550. 'fields' => [
  16551. 'stock_feature_id' => [
  16552. 'size' => 'big',
  16553. 'type' => 'serial',
  16554. 'not null' => TRUE,
  16555. ],
  16556. 'feature_id' => [
  16557. 'size' => 'big',
  16558. 'type' => 'int',
  16559. 'not null' => TRUE,
  16560. ],
  16561. 'stock_id' => [
  16562. 'size' => 'big',
  16563. 'type' => 'int',
  16564. 'not null' => TRUE,
  16565. ],
  16566. 'type_id' => [
  16567. 'size' => 'big',
  16568. 'type' => 'int',
  16569. 'not null' => TRUE,
  16570. ],
  16571. 'rank' => [
  16572. 'size' => 'normal',
  16573. 'type' => 'int',
  16574. 'not null' => TRUE,
  16575. 'default' => 0,
  16576. ],
  16577. ],
  16578. 'unique keys' => [
  16579. 'stock_feature_c1' => [
  16580. 0 => 'feature_id',
  16581. 1 => 'stock_id',
  16582. 2 => 'type_id',
  16583. 3 => 'rank',
  16584. ],
  16585. ],
  16586. 'indexes' => [
  16587. 'stock_feature_idx1' => [
  16588. 0 => 'stock_feature_id',
  16589. ],
  16590. 'stock_feature_idx2' => [
  16591. 0 => 'feature_id',
  16592. ],
  16593. 'stock_feature_idx3' => [
  16594. 0 => 'stock_id',
  16595. ],
  16596. 'stock_feature_idx4' => [
  16597. 0 => 'type_id',
  16598. ],
  16599. ],
  16600. 'primary key' => [
  16601. 0 => 'stock_feature_id',
  16602. ],
  16603. 'foreign keys' => [
  16604. 'feature' => [
  16605. 'table' => 'feature',
  16606. 'columns' => [
  16607. 'feature_id' => 'feature_id',
  16608. ],
  16609. ],
  16610. 'stock' => [
  16611. 'table' => 'stock',
  16612. 'columns' => [
  16613. 'stock_id' => 'stock_id',
  16614. ],
  16615. ],
  16616. 'cvterm' => [
  16617. 'table' => 'cvterm',
  16618. 'columns' => [
  16619. 'type_id' => 'cvterm_id',
  16620. ],
  16621. ],
  16622. ],
  16623. 'referring_tables' => [
  16624. ],
  16625. ];
  16626. return $description;
  16627. }
  16628. /**
  16629. * Implements hook_chado_schema_v1_3_stock_featuremap()
  16630. *
  16631. * Purpose: To describe the structure of 'stock_featuremap' to tripal
  16632. *
  16633. * @see chado_insert_record()
  16634. * @see chado_update_record()
  16635. * @see chado_select_record()
  16636. * @see chado_generate_var()
  16637. * @see chado_expan_var()
  16638. *
  16639. * @return
  16640. * An array describing the 'stock_featuremap' table
  16641. *
  16642. * @ingroup tripal_chado_v1.3_schema_api
  16643. *
  16644. */
  16645. function tripal_chado_chado_schema_v1_3_stock_featuremap() {
  16646. $description = [
  16647. 'description' => '',
  16648. 'table' => 'stock_featuremap',
  16649. 'fields' => [
  16650. 'stock_featuremap_id' => [
  16651. 'size' => 'big',
  16652. 'type' => 'serial',
  16653. 'not null' => TRUE,
  16654. ],
  16655. 'featuremap_id' => [
  16656. 'size' => 'big',
  16657. 'type' => 'int',
  16658. 'not null' => TRUE,
  16659. ],
  16660. 'stock_id' => [
  16661. 'size' => 'big',
  16662. 'type' => 'int',
  16663. 'not null' => TRUE,
  16664. ],
  16665. 'type_id' => [
  16666. 'size' => 'big',
  16667. 'type' => 'int',
  16668. 'not null' => FALSE,
  16669. ],
  16670. ],
  16671. 'unique keys' => [
  16672. 'stock_featuremap_c1' => [
  16673. 0 => 'featuremap_id',
  16674. 1 => 'stock_id',
  16675. 2 => 'type_id',
  16676. ],
  16677. ],
  16678. 'indexes' => [
  16679. 'stock_featuremap_idx1' => [
  16680. 0 => 'featuremap_id',
  16681. ],
  16682. 'stock_featuremap_idx2' => [
  16683. 0 => 'stock_id',
  16684. ],
  16685. 'stock_featuremap_idx3' => [
  16686. 0 => 'type_id',
  16687. ],
  16688. ],
  16689. 'primary key' => [
  16690. 0 => 'stock_featuremap_id',
  16691. ],
  16692. 'foreign keys' => [
  16693. 'featuremap' => [
  16694. 'table' => 'featuremap',
  16695. 'columns' => [
  16696. 'featuremap_id' => 'featuremap_id',
  16697. ],
  16698. ],
  16699. 'stock' => [
  16700. 'table' => 'stock',
  16701. 'columns' => [
  16702. 'stock_id' => 'stock_id',
  16703. ],
  16704. ],
  16705. 'cvterm' => [
  16706. 'table' => 'cvterm',
  16707. 'columns' => [
  16708. 'type_id' => 'cvterm_id',
  16709. ],
  16710. ],
  16711. ],
  16712. 'referring_tables' => [
  16713. ],
  16714. ];
  16715. return $description;
  16716. }
  16717. /**
  16718. * Implements hook_chado_schema_v1_3_stock_genotype()
  16719. *
  16720. * Purpose: To describe the structure of 'stock_genotype' to tripal
  16721. *
  16722. * @see chado_insert_record()
  16723. * @see chado_update_record()
  16724. * @see chado_select_record()
  16725. * @see chado_generate_var()
  16726. * @see chado_expan_var()
  16727. *
  16728. * @return
  16729. * An array describing the 'stock_genotype' table
  16730. *
  16731. * @ingroup tripal_chado_v1.3_schema_api
  16732. *
  16733. */
  16734. function tripal_chado_chado_schema_v1_3_stock_genotype() {
  16735. $description = [
  16736. 'description' => '',
  16737. 'table' => 'stock_genotype',
  16738. 'fields' => [
  16739. 'stock_genotype_id' => [
  16740. 'size' => 'big',
  16741. 'type' => 'serial',
  16742. 'not null' => TRUE,
  16743. ],
  16744. 'stock_id' => [
  16745. 'size' => 'big',
  16746. 'type' => 'int',
  16747. 'not null' => TRUE,
  16748. ],
  16749. 'genotype_id' => [
  16750. 'size' => 'big',
  16751. 'type' => 'int',
  16752. 'not null' => TRUE,
  16753. ],
  16754. ],
  16755. 'unique keys' => [
  16756. 'stock_genotype_c1' => [
  16757. 0 => 'stock_id',
  16758. 1 => 'genotype_id',
  16759. ],
  16760. ],
  16761. 'indexes' => [
  16762. 'stock_genotype_idx1' => [
  16763. 0 => 'stock_id',
  16764. ],
  16765. 'stock_genotype_idx2' => [
  16766. 0 => 'genotype_id',
  16767. ],
  16768. ],
  16769. 'primary key' => [
  16770. 0 => 'stock_genotype_id',
  16771. ],
  16772. 'foreign keys' => [
  16773. 'stock' => [
  16774. 'table' => 'stock',
  16775. 'columns' => [
  16776. 'stock_id' => 'stock_id',
  16777. ],
  16778. ],
  16779. 'genotype' => [
  16780. 'table' => 'genotype',
  16781. 'columns' => [
  16782. 'genotype_id' => 'genotype_id',
  16783. ],
  16784. ],
  16785. ],
  16786. 'referring_tables' => [
  16787. ],
  16788. ];
  16789. return $description;
  16790. }
  16791. /**
  16792. * Implements hook_chado_schema_v1_3_stock_library()
  16793. *
  16794. * Purpose: To describe the structure of 'stock_library' to tripal
  16795. *
  16796. * @see chado_insert_record()
  16797. * @see chado_update_record()
  16798. * @see chado_select_record()
  16799. * @see chado_generate_var()
  16800. * @see chado_expan_var()
  16801. *
  16802. * @return
  16803. * An array describing the 'stock_library' table
  16804. *
  16805. * @ingroup tripal_chado_v1.3_schema_api
  16806. *
  16807. */
  16808. function tripal_chado_chado_schema_v1_3_stock_library() {
  16809. $description = [
  16810. 'description' => '',
  16811. 'table' => 'stock_library',
  16812. 'fields' => [
  16813. 'stock_library_id' => [
  16814. 'size' => 'big',
  16815. 'type' => 'serial',
  16816. 'not null' => TRUE,
  16817. ],
  16818. 'library_id' => [
  16819. 'size' => 'big',
  16820. 'type' => 'int',
  16821. 'not null' => TRUE,
  16822. ],
  16823. 'stock_id' => [
  16824. 'size' => 'big',
  16825. 'type' => 'int',
  16826. 'not null' => TRUE,
  16827. ],
  16828. ],
  16829. 'unique keys' => [
  16830. 'stock_library_c1' => [
  16831. 0 => 'library_id',
  16832. 1 => 'stock_id',
  16833. ],
  16834. ],
  16835. 'indexes' => [
  16836. 'stock_library_idx1' => [
  16837. 0 => 'library_id',
  16838. ],
  16839. 'stock_library_idx2' => [
  16840. 0 => 'stock_id',
  16841. ],
  16842. ],
  16843. 'primary key' => [
  16844. 0 => 'stock_library_id',
  16845. ],
  16846. 'foreign keys' => [
  16847. 'library' => [
  16848. 'table' => 'library',
  16849. 'columns' => [
  16850. 'library_id' => 'library_id',
  16851. ],
  16852. ],
  16853. 'stock' => [
  16854. 'table' => 'stock',
  16855. 'columns' => [
  16856. 'stock_id' => 'stock_id',
  16857. ],
  16858. ],
  16859. ],
  16860. 'referring_tables' => [
  16861. ],
  16862. ];
  16863. return $description;
  16864. }
  16865. /**
  16866. * Implements hook_chado_schema_v1_3_stockprop()
  16867. *
  16868. * Purpose: To describe the structure of 'stockprop' to tripal
  16869. *
  16870. * @see chado_insert_record()
  16871. * @see chado_update_record()
  16872. * @see chado_select_record()
  16873. * @see chado_generate_var()
  16874. * @see chado_expan_var()
  16875. *
  16876. * @return
  16877. * An array describing the 'stockprop' table
  16878. *
  16879. * @ingroup tripal_chado_v1.3_schema_api
  16880. *
  16881. */
  16882. function tripal_chado_chado_schema_v1_3_stockprop() {
  16883. $description = [
  16884. 'description' => '',
  16885. 'table' => 'stockprop',
  16886. 'fields' => [
  16887. 'stockprop_id' => [
  16888. 'size' => 'big',
  16889. 'type' => 'serial',
  16890. 'not null' => TRUE,
  16891. ],
  16892. 'stock_id' => [
  16893. 'size' => 'big',
  16894. 'type' => 'int',
  16895. 'not null' => TRUE,
  16896. ],
  16897. 'type_id' => [
  16898. 'size' => 'big',
  16899. 'type' => 'int',
  16900. 'not null' => TRUE,
  16901. ],
  16902. 'value' => [
  16903. 'size' => 'normal',
  16904. 'type' => 'text',
  16905. 'not null' => FALSE,
  16906. ],
  16907. 'rank' => [
  16908. 'size' => 'normal',
  16909. 'type' => 'int',
  16910. 'not null' => TRUE,
  16911. 'default' => 0,
  16912. ],
  16913. ],
  16914. 'unique keys' => [
  16915. 'stockprop_c1' => [
  16916. 0 => 'stock_id',
  16917. 1 => 'type_id',
  16918. 2 => 'rank',
  16919. ],
  16920. ],
  16921. 'indexes' => [
  16922. 'stockprop_idx1' => [
  16923. 0 => 'stock_id',
  16924. ],
  16925. 'stockprop_idx2' => [
  16926. 0 => 'type_id',
  16927. ],
  16928. ],
  16929. 'primary key' => [
  16930. 0 => 'stockprop_id',
  16931. ],
  16932. 'foreign keys' => [
  16933. 'stock' => [
  16934. 'table' => 'stock',
  16935. 'columns' => [
  16936. 'stock_id' => 'stock_id',
  16937. ],
  16938. ],
  16939. 'cvterm' => [
  16940. 'table' => 'cvterm',
  16941. 'columns' => [
  16942. 'type_id' => 'cvterm_id',
  16943. ],
  16944. ],
  16945. ],
  16946. 'referring_tables' => [
  16947. 0 => 'stockprop_pub',
  16948. ],
  16949. ];
  16950. return $description;
  16951. }
  16952. /**
  16953. * Implements hook_chado_schema_v1_3_stockprop_pub()
  16954. *
  16955. * Purpose: To describe the structure of 'stockprop_pub' to tripal
  16956. *
  16957. * @see chado_insert_record()
  16958. * @see chado_update_record()
  16959. * @see chado_select_record()
  16960. * @see chado_generate_var()
  16961. * @see chado_expan_var()
  16962. *
  16963. * @return
  16964. * An array describing the 'stockprop_pub' table
  16965. *
  16966. * @ingroup tripal_chado_v1.3_schema_api
  16967. *
  16968. */
  16969. function tripal_chado_chado_schema_v1_3_stockprop_pub() {
  16970. $description = [
  16971. 'description' => '',
  16972. 'table' => 'stockprop_pub',
  16973. 'fields' => [
  16974. 'stockprop_pub_id' => [
  16975. 'size' => 'big',
  16976. 'type' => 'serial',
  16977. 'not null' => TRUE,
  16978. ],
  16979. 'stockprop_id' => [
  16980. 'size' => 'big',
  16981. 'type' => 'int',
  16982. 'not null' => TRUE,
  16983. ],
  16984. 'pub_id' => [
  16985. 'size' => 'big',
  16986. 'type' => 'int',
  16987. 'not null' => TRUE,
  16988. ],
  16989. ],
  16990. 'unique keys' => [
  16991. 'stockprop_pub_c1' => [
  16992. 0 => 'stockprop_id',
  16993. 1 => 'pub_id',
  16994. ],
  16995. ],
  16996. 'indexes' => [
  16997. 'stockprop_pub_idx1' => [
  16998. 0 => 'stockprop_id',
  16999. ],
  17000. 'stockprop_pub_idx2' => [
  17001. 0 => 'pub_id',
  17002. ],
  17003. ],
  17004. 'primary key' => [
  17005. 0 => 'stockprop_pub_id',
  17006. ],
  17007. 'foreign keys' => [
  17008. 'stockprop' => [
  17009. 'table' => 'stockprop',
  17010. 'columns' => [
  17011. 'stockprop_id' => 'stockprop_id',
  17012. ],
  17013. ],
  17014. 'pub' => [
  17015. 'table' => 'pub',
  17016. 'columns' => [
  17017. 'pub_id' => 'pub_id',
  17018. ],
  17019. ],
  17020. ],
  17021. 'referring_tables' => [
  17022. ],
  17023. ];
  17024. return $description;
  17025. }
  17026. /**
  17027. * Implements hook_chado_schema_v1_3_stock_pub()
  17028. *
  17029. * Purpose: To describe the structure of 'stock_pub' to tripal
  17030. *
  17031. * @see chado_insert_record()
  17032. * @see chado_update_record()
  17033. * @see chado_select_record()
  17034. * @see chado_generate_var()
  17035. * @see chado_expan_var()
  17036. *
  17037. * @return
  17038. * An array describing the 'stock_pub' table
  17039. *
  17040. * @ingroup tripal_chado_v1.3_schema_api
  17041. *
  17042. */
  17043. function tripal_chado_chado_schema_v1_3_stock_pub() {
  17044. $description = [
  17045. 'description' => '',
  17046. 'table' => 'stock_pub',
  17047. 'fields' => [
  17048. 'stock_pub_id' => [
  17049. 'size' => 'big',
  17050. 'type' => 'serial',
  17051. 'not null' => TRUE,
  17052. ],
  17053. 'stock_id' => [
  17054. 'size' => 'big',
  17055. 'type' => 'int',
  17056. 'not null' => TRUE,
  17057. ],
  17058. 'pub_id' => [
  17059. 'size' => 'big',
  17060. 'type' => 'int',
  17061. 'not null' => TRUE,
  17062. ],
  17063. ],
  17064. 'unique keys' => [
  17065. 'stock_pub_c1' => [
  17066. 0 => 'stock_id',
  17067. 1 => 'pub_id',
  17068. ],
  17069. ],
  17070. 'indexes' => [
  17071. 'stock_pub_idx1' => [
  17072. 0 => 'stock_id',
  17073. ],
  17074. 'stock_pub_idx2' => [
  17075. 0 => 'pub_id',
  17076. ],
  17077. ],
  17078. 'primary key' => [
  17079. 0 => 'stock_pub_id',
  17080. ],
  17081. 'foreign keys' => [
  17082. 'stock' => [
  17083. 'table' => 'stock',
  17084. 'columns' => [
  17085. 'stock_id' => 'stock_id',
  17086. ],
  17087. ],
  17088. 'pub' => [
  17089. 'table' => 'pub',
  17090. 'columns' => [
  17091. 'pub_id' => 'pub_id',
  17092. ],
  17093. ],
  17094. ],
  17095. 'referring_tables' => [
  17096. ],
  17097. ];
  17098. return $description;
  17099. }
  17100. /**
  17101. * Implements hook_chado_schema_v1_3_stock_relationship()
  17102. *
  17103. * Purpose: To describe the structure of 'stock_relationship' to tripal
  17104. *
  17105. * @see chado_insert_record()
  17106. * @see chado_update_record()
  17107. * @see chado_select_record()
  17108. * @see chado_generate_var()
  17109. * @see chado_expan_var()
  17110. *
  17111. * @return
  17112. * An array describing the 'stock_relationship' table
  17113. *
  17114. * @ingroup tripal_chado_v1.3_schema_api
  17115. *
  17116. */
  17117. function tripal_chado_chado_schema_v1_3_stock_relationship() {
  17118. $description = [
  17119. 'description' => '',
  17120. 'table' => 'stock_relationship',
  17121. 'fields' => [
  17122. 'stock_relationship_id' => [
  17123. 'size' => 'big',
  17124. 'type' => 'serial',
  17125. 'not null' => TRUE,
  17126. ],
  17127. 'subject_id' => [
  17128. 'size' => 'big',
  17129. 'type' => 'int',
  17130. 'not null' => TRUE,
  17131. ],
  17132. 'object_id' => [
  17133. 'size' => 'big',
  17134. 'type' => 'int',
  17135. 'not null' => TRUE,
  17136. ],
  17137. 'type_id' => [
  17138. 'size' => 'big',
  17139. 'type' => 'int',
  17140. 'not null' => TRUE,
  17141. ],
  17142. 'value' => [
  17143. 'size' => 'normal',
  17144. 'type' => 'text',
  17145. 'not null' => FALSE,
  17146. ],
  17147. 'rank' => [
  17148. 'size' => 'normal',
  17149. 'type' => 'int',
  17150. 'not null' => TRUE,
  17151. 'default' => 0,
  17152. ],
  17153. ],
  17154. 'unique keys' => [
  17155. 'stock_relationship_c1' => [
  17156. 0 => 'subject_id',
  17157. 1 => 'object_id',
  17158. 2 => 'type_id',
  17159. 3 => 'rank',
  17160. ],
  17161. ],
  17162. 'indexes' => [
  17163. 'stock_relationship_idx1' => [
  17164. 0 => 'subject_id',
  17165. ],
  17166. 'stock_relationship_idx2' => [
  17167. 0 => 'object_id',
  17168. ],
  17169. 'stock_relationship_idx3' => [
  17170. 0 => 'type_id',
  17171. ],
  17172. ],
  17173. 'primary key' => [
  17174. 0 => 'stock_relationship_id',
  17175. ],
  17176. 'foreign keys' => [
  17177. 'stock' => [
  17178. 'table' => 'stock',
  17179. 'columns' => [
  17180. 'subject_id' => 'stock_id',
  17181. 'object_id' => 'stock_id',
  17182. ],
  17183. ],
  17184. 'cvterm' => [
  17185. 'table' => 'cvterm',
  17186. 'columns' => [
  17187. 'type_id' => 'cvterm_id',
  17188. ],
  17189. ],
  17190. ],
  17191. 'referring_tables' => [
  17192. 0 => 'stock_relationship_cvterm',
  17193. 1 => 'stock_relationship_pub',
  17194. ],
  17195. ];
  17196. return $description;
  17197. }
  17198. /**
  17199. * Implements hook_chado_schema_v1_3_stock_relationship_cvterm()
  17200. *
  17201. * Purpose: To describe the structure of 'stock_relationship_cvterm' to tripal
  17202. *
  17203. * @see chado_insert_record()
  17204. * @see chado_update_record()
  17205. * @see chado_select_record()
  17206. * @see chado_generate_var()
  17207. * @see chado_expan_var()
  17208. *
  17209. * @return
  17210. * An array describing the 'stock_relationship_cvterm' table
  17211. *
  17212. * @ingroup tripal_chado_v1.3_schema_api
  17213. *
  17214. */
  17215. function tripal_chado_chado_schema_v1_3_stock_relationship_cvterm() {
  17216. $description = [
  17217. 'description' => '',
  17218. 'table' => 'stock_relationship_cvterm',
  17219. 'fields' => [
  17220. 'stock_relationship_cvterm_id' => [
  17221. 'size' => 'big',
  17222. 'type' => 'serial',
  17223. 'not null' => TRUE,
  17224. ],
  17225. 'stock_relationship_id' => [
  17226. 'size' => 'big',
  17227. 'type' => 'int',
  17228. 'not null' => TRUE,
  17229. ],
  17230. 'cvterm_id' => [
  17231. 'size' => 'big',
  17232. 'type' => 'int',
  17233. 'not null' => TRUE,
  17234. ],
  17235. 'pub_id' => [
  17236. 'size' => 'big',
  17237. 'type' => 'int',
  17238. 'not null' => FALSE,
  17239. ],
  17240. ],
  17241. 'primary key' => [
  17242. 0 => 'stock_relationship_cvterm_id',
  17243. ],
  17244. 'foreign keys' => [
  17245. 'stock_relationship' => [
  17246. 'table' => 'stock_relationship',
  17247. 'columns' => [
  17248. 'stock_relationship_id' => 'stock_relationship_id',
  17249. ],
  17250. ],
  17251. 'cvterm' => [
  17252. 'table' => 'cvterm',
  17253. 'columns' => [
  17254. 'cvterm_id' => 'cvterm_id',
  17255. ],
  17256. ],
  17257. 'pub' => [
  17258. 'table' => 'pub',
  17259. 'columns' => [
  17260. 'pub_id' => 'pub_id',
  17261. ],
  17262. ],
  17263. ],
  17264. 'referring_tables' => [
  17265. ],
  17266. ];
  17267. return $description;
  17268. }
  17269. /**
  17270. * Implements hook_chado_schema_v1_3_stock_relationship_pub()
  17271. *
  17272. * Purpose: To describe the structure of 'stock_relationship_pub' to tripal
  17273. *
  17274. * @see chado_insert_record()
  17275. * @see chado_update_record()
  17276. * @see chado_select_record()
  17277. * @see chado_generate_var()
  17278. * @see chado_expan_var()
  17279. *
  17280. * @return
  17281. * An array describing the 'stock_relationship_pub' table
  17282. *
  17283. * @ingroup tripal_chado_v1.3_schema_api
  17284. *
  17285. */
  17286. function tripal_chado_chado_schema_v1_3_stock_relationship_pub() {
  17287. $description = [
  17288. 'description' => '',
  17289. 'table' => 'stock_relationship_pub',
  17290. 'fields' => [
  17291. 'stock_relationship_pub_id' => [
  17292. 'size' => 'big',
  17293. 'type' => 'serial',
  17294. 'not null' => TRUE,
  17295. ],
  17296. 'stock_relationship_id' => [
  17297. 'size' => 'big',
  17298. 'type' => 'int',
  17299. 'not null' => TRUE,
  17300. ],
  17301. 'pub_id' => [
  17302. 'size' => 'big',
  17303. 'type' => 'int',
  17304. 'not null' => TRUE,
  17305. ],
  17306. ],
  17307. 'unique keys' => [
  17308. 'stock_relationship_pub_c1' => [
  17309. 0 => 'stock_relationship_id',
  17310. 1 => 'pub_id',
  17311. ],
  17312. ],
  17313. 'indexes' => [
  17314. 'stock_relationship_pub_idx1' => [
  17315. 0 => 'stock_relationship_id',
  17316. ],
  17317. 'stock_relationship_pub_idx2' => [
  17318. 0 => 'pub_id',
  17319. ],
  17320. ],
  17321. 'primary key' => [
  17322. 0 => 'stock_relationship_pub_id',
  17323. ],
  17324. 'foreign keys' => [
  17325. 'stock_relationship' => [
  17326. 'table' => 'stock_relationship',
  17327. 'columns' => [
  17328. 'stock_relationship_id' => 'stock_relationship_id',
  17329. ],
  17330. ],
  17331. 'pub' => [
  17332. 'table' => 'pub',
  17333. 'columns' => [
  17334. 'pub_id' => 'pub_id',
  17335. ],
  17336. ],
  17337. ],
  17338. 'referring_tables' => [
  17339. ],
  17340. ];
  17341. return $description;
  17342. }
  17343. /**
  17344. * Implements hook_chado_schema_v1_3_study()
  17345. *
  17346. * Purpose: To describe the structure of 'study' to tripal
  17347. *
  17348. * @see chado_insert_record()
  17349. * @see chado_update_record()
  17350. * @see chado_select_record()
  17351. * @see chado_generate_var()
  17352. * @see chado_expan_var()
  17353. *
  17354. * @return
  17355. * An array describing the 'study' table
  17356. *
  17357. * @ingroup tripal_chado_v1.3_schema_api
  17358. *
  17359. */
  17360. function tripal_chado_chado_schema_v1_3_study() {
  17361. $description = [
  17362. 'description' => '',
  17363. 'table' => 'study',
  17364. 'fields' => [
  17365. 'study_id' => [
  17366. 'size' => 'big',
  17367. 'type' => 'serial',
  17368. 'not null' => TRUE,
  17369. ],
  17370. 'contact_id' => [
  17371. 'size' => 'big',
  17372. 'type' => 'int',
  17373. 'not null' => TRUE,
  17374. ],
  17375. 'pub_id' => [
  17376. 'size' => 'big',
  17377. 'type' => 'int',
  17378. 'not null' => FALSE,
  17379. ],
  17380. 'dbxref_id' => [
  17381. 'size' => 'big',
  17382. 'type' => 'int',
  17383. 'not null' => FALSE,
  17384. ],
  17385. 'name' => [
  17386. 'size' => 'normal',
  17387. 'type' => 'text',
  17388. 'not null' => TRUE,
  17389. ],
  17390. 'description' => [
  17391. 'size' => 'normal',
  17392. 'type' => 'text',
  17393. 'not null' => FALSE,
  17394. ],
  17395. ],
  17396. 'unique keys' => [
  17397. 'study_c1' => [
  17398. 0 => 'name',
  17399. ],
  17400. ],
  17401. 'indexes' => [
  17402. 'study_idx1' => [
  17403. 0 => 'contact_id',
  17404. ],
  17405. 'study_idx2' => [
  17406. 0 => 'pub_id',
  17407. ],
  17408. 'study_idx3' => [
  17409. 0 => 'dbxref_id',
  17410. ],
  17411. ],
  17412. 'primary key' => [
  17413. 0 => 'study_id',
  17414. ],
  17415. 'foreign keys' => [
  17416. 'contact' => [
  17417. 'table' => 'contact',
  17418. 'columns' => [
  17419. 'contact_id' => 'contact_id',
  17420. ],
  17421. ],
  17422. 'pub' => [
  17423. 'table' => 'pub',
  17424. 'columns' => [
  17425. 'pub_id' => 'pub_id',
  17426. ],
  17427. ],
  17428. 'dbxref' => [
  17429. 'table' => 'dbxref',
  17430. 'columns' => [
  17431. 'dbxref_id' => 'dbxref_id',
  17432. ],
  17433. ],
  17434. ],
  17435. 'referring_tables' => [
  17436. 0 => 'study_assay',
  17437. 1 => 'studydesign',
  17438. 2 => 'studyprop',
  17439. ],
  17440. ];
  17441. return $description;
  17442. }
  17443. /**
  17444. * Implements hook_chado_schema_v1_3_study_assay()
  17445. *
  17446. * Purpose: To describe the structure of 'study_assay' to tripal
  17447. *
  17448. * @see chado_insert_record()
  17449. * @see chado_update_record()
  17450. * @see chado_select_record()
  17451. * @see chado_generate_var()
  17452. * @see chado_expan_var()
  17453. *
  17454. * @return
  17455. * An array describing the 'study_assay' table
  17456. *
  17457. * @ingroup tripal_chado_v1.3_schema_api
  17458. *
  17459. */
  17460. function tripal_chado_chado_schema_v1_3_study_assay() {
  17461. $description = [
  17462. 'description' => '',
  17463. 'table' => 'study_assay',
  17464. 'fields' => [
  17465. 'study_assay_id' => [
  17466. 'size' => 'big',
  17467. 'type' => 'serial',
  17468. 'not null' => TRUE,
  17469. ],
  17470. 'study_id' => [
  17471. 'size' => 'big',
  17472. 'type' => 'int',
  17473. 'not null' => TRUE,
  17474. ],
  17475. 'assay_id' => [
  17476. 'size' => 'big',
  17477. 'type' => 'int',
  17478. 'not null' => TRUE,
  17479. ],
  17480. ],
  17481. 'unique keys' => [
  17482. 'study_assay_c1' => [
  17483. 0 => 'study_id',
  17484. 1 => 'assay_id',
  17485. ],
  17486. ],
  17487. 'indexes' => [
  17488. 'study_assay_idx1' => [
  17489. 0 => 'study_id',
  17490. ],
  17491. 'study_assay_idx2' => [
  17492. 0 => 'assay_id',
  17493. ],
  17494. ],
  17495. 'primary key' => [
  17496. 0 => 'study_assay_id',
  17497. ],
  17498. 'foreign keys' => [
  17499. 'study' => [
  17500. 'table' => 'study',
  17501. 'columns' => [
  17502. 'study_id' => 'study_id',
  17503. ],
  17504. ],
  17505. 'assay' => [
  17506. 'table' => 'assay',
  17507. 'columns' => [
  17508. 'assay_id' => 'assay_id',
  17509. ],
  17510. ],
  17511. ],
  17512. 'referring_tables' => [
  17513. ],
  17514. ];
  17515. return $description;
  17516. }
  17517. /**
  17518. * Implements hook_chado_schema_v1_3_studydesign()
  17519. *
  17520. * Purpose: To describe the structure of 'studydesign' to tripal
  17521. *
  17522. * @see chado_insert_record()
  17523. * @see chado_update_record()
  17524. * @see chado_select_record()
  17525. * @see chado_generate_var()
  17526. * @see chado_expan_var()
  17527. *
  17528. * @return
  17529. * An array describing the 'studydesign' table
  17530. *
  17531. * @ingroup tripal_chado_v1.3_schema_api
  17532. *
  17533. */
  17534. function tripal_chado_chado_schema_v1_3_studydesign() {
  17535. $description = [
  17536. 'description' => '',
  17537. 'table' => 'studydesign',
  17538. 'fields' => [
  17539. 'studydesign_id' => [
  17540. 'size' => 'big',
  17541. 'type' => 'serial',
  17542. 'not null' => TRUE,
  17543. ],
  17544. 'study_id' => [
  17545. 'size' => 'big',
  17546. 'type' => 'int',
  17547. 'not null' => TRUE,
  17548. ],
  17549. 'description' => [
  17550. 'size' => 'normal',
  17551. 'type' => 'text',
  17552. 'not null' => FALSE,
  17553. ],
  17554. ],
  17555. 'indexes' => [
  17556. 'studydesign_idx1' => [
  17557. 0 => 'study_id',
  17558. ],
  17559. ],
  17560. 'primary key' => [
  17561. 0 => 'studydesign_id',
  17562. ],
  17563. 'foreign keys' => [
  17564. 'study' => [
  17565. 'table' => 'study',
  17566. 'columns' => [
  17567. 'study_id' => 'study_id',
  17568. ],
  17569. ],
  17570. ],
  17571. 'referring_tables' => [
  17572. 0 => 'studydesignprop',
  17573. 1 => 'studyfactor',
  17574. ],
  17575. ];
  17576. return $description;
  17577. }
  17578. /**
  17579. * Implements hook_chado_schema_v1_3_studydesignprop()
  17580. *
  17581. * Purpose: To describe the structure of 'studydesignprop' to tripal
  17582. *
  17583. * @see chado_insert_record()
  17584. * @see chado_update_record()
  17585. * @see chado_select_record()
  17586. * @see chado_generate_var()
  17587. * @see chado_expan_var()
  17588. *
  17589. * @return
  17590. * An array describing the 'studydesignprop' table
  17591. *
  17592. * @ingroup tripal_chado_v1.3_schema_api
  17593. *
  17594. */
  17595. function tripal_chado_chado_schema_v1_3_studydesignprop() {
  17596. $description = [
  17597. 'description' => '',
  17598. 'table' => 'studydesignprop',
  17599. 'fields' => [
  17600. 'studydesignprop_id' => [
  17601. 'size' => 'big',
  17602. 'type' => 'serial',
  17603. 'not null' => TRUE,
  17604. ],
  17605. 'studydesign_id' => [
  17606. 'size' => 'big',
  17607. 'type' => 'int',
  17608. 'not null' => TRUE,
  17609. ],
  17610. 'type_id' => [
  17611. 'size' => 'big',
  17612. 'type' => 'int',
  17613. 'not null' => TRUE,
  17614. ],
  17615. 'value' => [
  17616. 'size' => 'normal',
  17617. 'type' => 'text',
  17618. 'not null' => FALSE,
  17619. ],
  17620. 'rank' => [
  17621. 'size' => 'normal',
  17622. 'type' => 'int',
  17623. 'not null' => TRUE,
  17624. 'default' => 0,
  17625. ],
  17626. ],
  17627. 'unique keys' => [
  17628. 'studydesignprop_c1' => [
  17629. 0 => 'studydesign_id',
  17630. 1 => 'type_id',
  17631. 2 => 'rank',
  17632. ],
  17633. ],
  17634. 'indexes' => [
  17635. 'studydesignprop_idx1' => [
  17636. 0 => 'studydesign_id',
  17637. ],
  17638. 'studydesignprop_idx2' => [
  17639. 0 => 'type_id',
  17640. ],
  17641. ],
  17642. 'primary key' => [
  17643. 0 => 'studydesignprop_id',
  17644. ],
  17645. 'foreign keys' => [
  17646. 'studydesign' => [
  17647. 'table' => 'studydesign',
  17648. 'columns' => [
  17649. 'studydesign_id' => 'studydesign_id',
  17650. ],
  17651. ],
  17652. 'cvterm' => [
  17653. 'table' => 'cvterm',
  17654. 'columns' => [
  17655. 'type_id' => 'cvterm_id',
  17656. ],
  17657. ],
  17658. ],
  17659. 'referring_tables' => [
  17660. ],
  17661. ];
  17662. return $description;
  17663. }
  17664. /**
  17665. * Implements hook_chado_schema_v1_3_studyfactor()
  17666. *
  17667. * Purpose: To describe the structure of 'studyfactor' to tripal
  17668. *
  17669. * @see chado_insert_record()
  17670. * @see chado_update_record()
  17671. * @see chado_select_record()
  17672. * @see chado_generate_var()
  17673. * @see chado_expan_var()
  17674. *
  17675. * @return
  17676. * An array describing the 'studyfactor' table
  17677. *
  17678. * @ingroup tripal_chado_v1.3_schema_api
  17679. *
  17680. */
  17681. function tripal_chado_chado_schema_v1_3_studyfactor() {
  17682. $description = [
  17683. 'description' => '',
  17684. 'table' => 'studyfactor',
  17685. 'fields' => [
  17686. 'studyfactor_id' => [
  17687. 'size' => 'big',
  17688. 'type' => 'serial',
  17689. 'not null' => TRUE,
  17690. ],
  17691. 'studydesign_id' => [
  17692. 'size' => 'big',
  17693. 'type' => 'int',
  17694. 'not null' => TRUE,
  17695. ],
  17696. 'type_id' => [
  17697. 'size' => 'big',
  17698. 'type' => 'int',
  17699. 'not null' => FALSE,
  17700. ],
  17701. 'name' => [
  17702. 'size' => 'normal',
  17703. 'type' => 'text',
  17704. 'not null' => TRUE,
  17705. ],
  17706. 'description' => [
  17707. 'size' => 'normal',
  17708. 'type' => 'text',
  17709. 'not null' => FALSE,
  17710. ],
  17711. ],
  17712. 'indexes' => [
  17713. 'studyfactor_idx1' => [
  17714. 0 => 'studydesign_id',
  17715. ],
  17716. 'studyfactor_idx2' => [
  17717. 0 => 'type_id',
  17718. ],
  17719. ],
  17720. 'primary key' => [
  17721. 0 => 'studyfactor_id',
  17722. ],
  17723. 'foreign keys' => [
  17724. 'studydesign' => [
  17725. 'table' => 'studydesign',
  17726. 'columns' => [
  17727. 'studydesign_id' => 'studydesign_id',
  17728. ],
  17729. ],
  17730. 'cvterm' => [
  17731. 'table' => 'cvterm',
  17732. 'columns' => [
  17733. 'type_id' => 'cvterm_id',
  17734. ],
  17735. ],
  17736. ],
  17737. 'referring_tables' => [
  17738. 0 => 'studyfactorvalue',
  17739. ],
  17740. ];
  17741. return $description;
  17742. }
  17743. /**
  17744. * Implements hook_chado_schema_v1_3_studyfactorvalue()
  17745. *
  17746. * Purpose: To describe the structure of 'studyfactorvalue' to tripal
  17747. *
  17748. * @see chado_insert_record()
  17749. * @see chado_update_record()
  17750. * @see chado_select_record()
  17751. * @see chado_generate_var()
  17752. * @see chado_expan_var()
  17753. *
  17754. * @return
  17755. * An array describing the 'studyfactorvalue' table
  17756. *
  17757. * @ingroup tripal_chado_v1.3_schema_api
  17758. *
  17759. */
  17760. function tripal_chado_chado_schema_v1_3_studyfactorvalue() {
  17761. $description = [
  17762. 'description' => '',
  17763. 'table' => 'studyfactorvalue',
  17764. 'fields' => [
  17765. 'studyfactorvalue_id' => [
  17766. 'size' => 'big',
  17767. 'type' => 'serial',
  17768. 'not null' => TRUE,
  17769. ],
  17770. 'studyfactor_id' => [
  17771. 'size' => 'big',
  17772. 'type' => 'int',
  17773. 'not null' => TRUE,
  17774. ],
  17775. 'assay_id' => [
  17776. 'size' => 'big',
  17777. 'type' => 'int',
  17778. 'not null' => TRUE,
  17779. ],
  17780. 'factorvalue' => [
  17781. 'size' => 'normal',
  17782. 'type' => 'text',
  17783. 'not null' => FALSE,
  17784. ],
  17785. 'name' => [
  17786. 'size' => 'normal',
  17787. 'type' => 'text',
  17788. 'not null' => FALSE,
  17789. ],
  17790. 'rank' => [
  17791. 'size' => 'normal',
  17792. 'type' => 'int',
  17793. 'not null' => TRUE,
  17794. 'default' => 0,
  17795. ],
  17796. ],
  17797. 'indexes' => [
  17798. 'studyfactorvalue_idx1' => [
  17799. 0 => 'studyfactor_id',
  17800. ],
  17801. 'studyfactorvalue_idx2' => [
  17802. 0 => 'assay_id',
  17803. ],
  17804. ],
  17805. 'primary key' => [
  17806. 0 => 'studyfactorvalue_id',
  17807. ],
  17808. 'foreign keys' => [
  17809. 'studyfactor' => [
  17810. 'table' => 'studyfactor',
  17811. 'columns' => [
  17812. 'studyfactor_id' => 'studyfactor_id',
  17813. ],
  17814. ],
  17815. 'assay' => [
  17816. 'table' => 'assay',
  17817. 'columns' => [
  17818. 'assay_id' => 'assay_id',
  17819. ],
  17820. ],
  17821. ],
  17822. 'referring_tables' => [
  17823. ],
  17824. ];
  17825. return $description;
  17826. }
  17827. /**
  17828. * Implements hook_chado_schema_v1_3_studyprop()
  17829. *
  17830. * Purpose: To describe the structure of 'studyprop' to tripal
  17831. *
  17832. * @see chado_insert_record()
  17833. * @see chado_update_record()
  17834. * @see chado_select_record()
  17835. * @see chado_generate_var()
  17836. * @see chado_expan_var()
  17837. *
  17838. * @return
  17839. * An array describing the 'studyprop' table
  17840. *
  17841. * @ingroup tripal_chado_v1.3_schema_api
  17842. *
  17843. */
  17844. function tripal_chado_chado_schema_v1_3_studyprop() {
  17845. $description = [
  17846. 'description' => '',
  17847. 'table' => 'studyprop',
  17848. 'fields' => [
  17849. 'studyprop_id' => [
  17850. 'size' => 'big',
  17851. 'type' => 'serial',
  17852. 'not null' => TRUE,
  17853. ],
  17854. 'study_id' => [
  17855. 'size' => 'big',
  17856. 'type' => 'int',
  17857. 'not null' => TRUE,
  17858. ],
  17859. 'type_id' => [
  17860. 'size' => 'big',
  17861. 'type' => 'int',
  17862. 'not null' => TRUE,
  17863. ],
  17864. 'value' => [
  17865. 'size' => 'normal',
  17866. 'type' => 'text',
  17867. 'not null' => FALSE,
  17868. ],
  17869. 'rank' => [
  17870. 'size' => 'normal',
  17871. 'type' => 'int',
  17872. 'not null' => TRUE,
  17873. 'default' => 0,
  17874. ],
  17875. ],
  17876. 'indexes' => [
  17877. 'studyprop_idx1' => [
  17878. 0 => 'study_id',
  17879. ],
  17880. 'studyprop_idx2' => [
  17881. 0 => 'type_id',
  17882. ],
  17883. ],
  17884. 'primary key' => [
  17885. 0 => 'studyprop_id',
  17886. ],
  17887. 'unique keys' => [
  17888. 'studyprop_study_id_type_id_rank_key' => [
  17889. 0 => 'study_id',
  17890. 1 => 'type_id',
  17891. 2 => 'rank',
  17892. ],
  17893. ],
  17894. 'foreign keys' => [
  17895. 'study' => [
  17896. 'table' => 'study',
  17897. 'columns' => [
  17898. 'study_id' => 'study_id',
  17899. ],
  17900. ],
  17901. 'cvterm' => [
  17902. 'table' => 'cvterm',
  17903. 'columns' => [
  17904. 'type_id' => 'cvterm_id',
  17905. ],
  17906. ],
  17907. ],
  17908. 'referring_tables' => [
  17909. 0 => 'studyprop_feature',
  17910. ],
  17911. ];
  17912. return $description;
  17913. }
  17914. /**
  17915. * Implements hook_chado_schema_v1_3_studyprop_feature()
  17916. *
  17917. * Purpose: To describe the structure of 'studyprop_feature' to tripal
  17918. *
  17919. * @see chado_insert_record()
  17920. * @see chado_update_record()
  17921. * @see chado_select_record()
  17922. * @see chado_generate_var()
  17923. * @see chado_expan_var()
  17924. *
  17925. * @return
  17926. * An array describing the 'studyprop_feature' table
  17927. *
  17928. * @ingroup tripal_chado_v1.3_schema_api
  17929. *
  17930. */
  17931. function tripal_chado_chado_schema_v1_3_studyprop_feature() {
  17932. $description = [
  17933. 'description' => '',
  17934. 'table' => 'studyprop_feature',
  17935. 'fields' => [
  17936. 'studyprop_feature_id' => [
  17937. 'size' => 'big',
  17938. 'type' => 'serial',
  17939. 'not null' => TRUE,
  17940. ],
  17941. 'studyprop_id' => [
  17942. 'size' => 'big',
  17943. 'type' => 'int',
  17944. 'not null' => TRUE,
  17945. ],
  17946. 'feature_id' => [
  17947. 'size' => 'big',
  17948. 'type' => 'int',
  17949. 'not null' => TRUE,
  17950. ],
  17951. 'type_id' => [
  17952. 'size' => 'big',
  17953. 'type' => 'int',
  17954. 'not null' => FALSE,
  17955. ],
  17956. ],
  17957. 'indexes' => [
  17958. 'studyprop_feature_idx1' => [
  17959. 0 => 'studyprop_id',
  17960. ],
  17961. 'studyprop_feature_idx2' => [
  17962. 0 => 'feature_id',
  17963. ],
  17964. ],
  17965. 'primary key' => [
  17966. 0 => 'studyprop_feature_id',
  17967. ],
  17968. 'unique keys' => [
  17969. 'studyprop_feature_studyprop_id_feature_id_key' => [
  17970. 0 => 'studyprop_id',
  17971. 1 => 'feature_id',
  17972. ],
  17973. ],
  17974. 'foreign keys' => [
  17975. 'studyprop' => [
  17976. 'table' => 'studyprop',
  17977. 'columns' => [
  17978. 'studyprop_id' => 'studyprop_id',
  17979. ],
  17980. ],
  17981. 'feature' => [
  17982. 'table' => 'feature',
  17983. 'columns' => [
  17984. 'feature_id' => 'feature_id',
  17985. ],
  17986. ],
  17987. 'cvterm' => [
  17988. 'table' => 'cvterm',
  17989. 'columns' => [
  17990. 'type_id' => 'cvterm_id',
  17991. ],
  17992. ],
  17993. ],
  17994. 'referring_tables' => [
  17995. ],
  17996. ];
  17997. return $description;
  17998. }
  17999. /**
  18000. * Implements hook_chado_schema_v1_3_synonym()
  18001. *
  18002. * Purpose: To describe the structure of 'synonym' to tripal
  18003. *
  18004. * @see chado_insert_record()
  18005. * @see chado_update_record()
  18006. * @see chado_select_record()
  18007. * @see chado_generate_var()
  18008. * @see chado_expan_var()
  18009. *
  18010. * @return
  18011. * An array describing the 'synonym' table
  18012. *
  18013. * @ingroup tripal_chado_v1.3_schema_api
  18014. *
  18015. */
  18016. function tripal_chado_chado_schema_v1_3_synonym() {
  18017. $description = [
  18018. 'description' => '',
  18019. 'table' => 'synonym',
  18020. 'fields' => [
  18021. 'synonym_id' => [
  18022. 'size' => 'big',
  18023. 'type' => 'serial',
  18024. 'not null' => TRUE,
  18025. ],
  18026. 'name' => [
  18027. 'size' => 'normal',
  18028. 'type' => 'varchar',
  18029. 'length' => '255',
  18030. 'not null' => TRUE,
  18031. ],
  18032. 'type_id' => [
  18033. 'size' => 'big',
  18034. 'type' => 'int',
  18035. 'not null' => TRUE,
  18036. ],
  18037. 'synonym_sgml' => [
  18038. 'size' => 'normal',
  18039. 'type' => 'varchar',
  18040. 'length' => '255',
  18041. 'not null' => TRUE,
  18042. ],
  18043. ],
  18044. 'unique keys' => [
  18045. 'synonym_c1' => [
  18046. 0 => 'name',
  18047. 1 => 'type_id',
  18048. ],
  18049. ],
  18050. 'indexes' => [
  18051. 'synonym_idx1' => [
  18052. 0 => 'type_id',
  18053. ],
  18054. ],
  18055. 'primary key' => [
  18056. 0 => 'synonym_id',
  18057. ],
  18058. 'foreign keys' => [
  18059. 'cvterm' => [
  18060. 'table' => 'cvterm',
  18061. 'columns' => [
  18062. 'type_id' => 'cvterm_id',
  18063. ],
  18064. ],
  18065. ],
  18066. 'referring_tables' => [
  18067. 0 => 'cell_line_synonym',
  18068. 1 => 'feature_synonym',
  18069. 2 => 'library_synonym',
  18070. ],
  18071. ];
  18072. return $description;
  18073. }
  18074. /**
  18075. * Implements hook_chado_schema_v1_3_tableinfo()
  18076. *
  18077. * Purpose: To describe the structure of 'tableinfo' to tripal
  18078. *
  18079. * @see chado_insert_record()
  18080. * @see chado_update_record()
  18081. * @see chado_select_record()
  18082. * @see chado_generate_var()
  18083. * @see chado_expan_var()
  18084. *
  18085. * @return
  18086. * An array describing the 'tableinfo' table
  18087. *
  18088. * @ingroup tripal_chado_v1.3_schema_api
  18089. *
  18090. */
  18091. function tripal_chado_chado_schema_v1_3_tableinfo() {
  18092. $description = [
  18093. 'description' => '',
  18094. 'table' => 'tableinfo',
  18095. 'fields' => [
  18096. 'tableinfo_id' => [
  18097. 'size' => 'big',
  18098. 'type' => 'serial',
  18099. 'not null' => TRUE,
  18100. ],
  18101. 'name' => [
  18102. 'size' => 'normal',
  18103. 'type' => 'varchar',
  18104. 'length' => '30',
  18105. 'not null' => TRUE,
  18106. ],
  18107. 'primary_key_column' => [
  18108. 'size' => 'normal',
  18109. 'type' => 'varchar',
  18110. 'length' => '30',
  18111. 'not null' => FALSE,
  18112. ],
  18113. 'is_view' => [
  18114. 'size' => 'normal',
  18115. 'type' => 'int',
  18116. 'not null' => TRUE,
  18117. 'default' => 0,
  18118. ],
  18119. 'view_on_table_id' => [
  18120. 'size' => 'big',
  18121. 'type' => 'int',
  18122. 'not null' => FALSE,
  18123. ],
  18124. 'superclass_table_id' => [
  18125. 'size' => 'big',
  18126. 'type' => 'int',
  18127. 'not null' => FALSE,
  18128. ],
  18129. 'is_updateable' => [
  18130. 'size' => 'normal',
  18131. 'type' => 'int',
  18132. 'not null' => TRUE,
  18133. 'default' => 1,
  18134. ],
  18135. 'modification_date' => [
  18136. 'size' => 'normal',
  18137. 'type' => 'date',
  18138. 'not null' => TRUE,
  18139. 'default' => 'now()',
  18140. ],
  18141. ],
  18142. 'unique keys' => [
  18143. 'tableinfo_c1' => [
  18144. 0 => 'name',
  18145. ],
  18146. ],
  18147. 'primary key' => [
  18148. 0 => 'tableinfo_id',
  18149. ],
  18150. 'foreign keys' => [
  18151. ],
  18152. 'referring_tables' => [
  18153. 0 => 'control',
  18154. 1 => 'magedocumentation',
  18155. ],
  18156. ];
  18157. return $description;
  18158. }
  18159. /**
  18160. * Implements hook_chado_schema_v1_3_treatment()
  18161. *
  18162. * Purpose: To describe the structure of 'treatment' to tripal
  18163. *
  18164. * @see chado_insert_record()
  18165. * @see chado_update_record()
  18166. * @see chado_select_record()
  18167. * @see chado_generate_var()
  18168. * @see chado_expan_var()
  18169. *
  18170. * @return
  18171. * An array describing the 'treatment' table
  18172. *
  18173. * @ingroup tripal_chado_v1.3_schema_api
  18174. *
  18175. */
  18176. function tripal_chado_chado_schema_v1_3_treatment() {
  18177. $description = [
  18178. 'description' => '',
  18179. 'table' => 'treatment',
  18180. 'fields' => [
  18181. 'treatment_id' => [
  18182. 'size' => 'big',
  18183. 'type' => 'serial',
  18184. 'not null' => TRUE,
  18185. ],
  18186. 'rank' => [
  18187. 'size' => 'normal',
  18188. 'type' => 'int',
  18189. 'not null' => TRUE,
  18190. 'default' => 0,
  18191. ],
  18192. 'biomaterial_id' => [
  18193. 'size' => 'big',
  18194. 'type' => 'int',
  18195. 'not null' => TRUE,
  18196. ],
  18197. 'type_id' => [
  18198. 'size' => 'big',
  18199. 'type' => 'int',
  18200. 'not null' => TRUE,
  18201. ],
  18202. 'protocol_id' => [
  18203. 'size' => 'big',
  18204. 'type' => 'int',
  18205. 'not null' => FALSE,
  18206. ],
  18207. 'name' => [
  18208. 'size' => 'normal',
  18209. 'type' => 'text',
  18210. 'not null' => FALSE,
  18211. ],
  18212. ],
  18213. 'indexes' => [
  18214. 'treatment_idx1' => [
  18215. 0 => 'biomaterial_id',
  18216. ],
  18217. 'treatment_idx2' => [
  18218. 0 => 'type_id',
  18219. ],
  18220. 'treatment_idx3' => [
  18221. 0 => 'protocol_id',
  18222. ],
  18223. ],
  18224. 'primary key' => [
  18225. 0 => 'treatment_id',
  18226. ],
  18227. 'foreign keys' => [
  18228. 'biomaterial' => [
  18229. 'table' => 'biomaterial',
  18230. 'columns' => [
  18231. 'biomaterial_id' => 'biomaterial_id',
  18232. ],
  18233. ],
  18234. 'cvterm' => [
  18235. 'table' => 'cvterm',
  18236. 'columns' => [
  18237. 'type_id' => 'cvterm_id',
  18238. ],
  18239. ],
  18240. 'protocol' => [
  18241. 'table' => 'protocol',
  18242. 'columns' => [
  18243. 'protocol_id' => 'protocol_id',
  18244. ],
  18245. ],
  18246. ],
  18247. 'referring_tables' => [
  18248. 0 => 'biomaterial_treatment',
  18249. ],
  18250. ];
  18251. return $description;
  18252. }
  18253. /**
  18254. * Lists the table names in the v1.3 chado schema
  18255. *
  18256. * @return
  18257. * An array containing all of the table names
  18258. *
  18259. * @ingroup tripal_chado_v1.3_schema_api
  18260. *
  18261. */
  18262. function tripal_chado_chado_get_v1_3_tables() {
  18263. $tables = [
  18264. 'acquisition',
  18265. 'acquisitionprop',
  18266. 'acquisition_relationship',
  18267. 'analysis',
  18268. 'analysis_cvterm',
  18269. 'analysis_dbxref',
  18270. 'analysisfeature',
  18271. 'analysisfeatureprop',
  18272. 'analysis_organism',
  18273. 'analysisprop',
  18274. 'analysis_pub',
  18275. 'analysis_relationship',
  18276. 'arraydesign',
  18277. 'arraydesignprop',
  18278. 'assay',
  18279. 'assay_biomaterial',
  18280. 'assay_project',
  18281. 'assayprop',
  18282. 'biomaterial',
  18283. 'biomaterial_dbxref',
  18284. 'biomaterialprop',
  18285. 'biomaterial_relationship',
  18286. 'biomaterial_treatment',
  18287. 'cell_line',
  18288. 'cell_line_cvterm',
  18289. 'cell_line_cvtermprop',
  18290. 'cell_line_dbxref',
  18291. 'cell_line_feature',
  18292. 'cell_line_library',
  18293. 'cell_lineprop',
  18294. 'cell_lineprop_pub',
  18295. 'cell_line_pub',
  18296. 'cell_line_relationship',
  18297. 'cell_line_synonym',
  18298. 'chadoprop',
  18299. 'channel',
  18300. 'contact',
  18301. 'contactprop',
  18302. 'contact_relationship',
  18303. 'control',
  18304. 'cv',
  18305. 'cvprop',
  18306. 'cv_root_mview',
  18307. 'cvterm',
  18308. 'cvterm_dbxref',
  18309. 'cvtermpath',
  18310. 'cvtermprop',
  18311. 'cvterm_relationship',
  18312. 'cvtermsynonym',
  18313. 'db',
  18314. 'dbprop',
  18315. 'dbxref',
  18316. 'dbxrefprop',
  18317. 'eimage',
  18318. 'element',
  18319. 'element_relationship',
  18320. 'elementresult',
  18321. 'elementresult_relationship',
  18322. 'environment',
  18323. 'environment_cvterm',
  18324. 'expression',
  18325. 'expression_cvterm',
  18326. 'expression_cvtermprop',
  18327. 'expression_image',
  18328. 'expressionprop',
  18329. 'expression_pub',
  18330. 'feature',
  18331. 'feature_contact',
  18332. 'feature_cvterm',
  18333. 'feature_cvterm_dbxref',
  18334. 'feature_cvtermprop',
  18335. 'feature_cvterm_pub',
  18336. 'feature_dbxref',
  18337. 'feature_expression',
  18338. 'feature_expressionprop',
  18339. 'feature_genotype',
  18340. 'featureloc',
  18341. 'featureloc_pub',
  18342. 'featuremap',
  18343. 'featuremap_contact',
  18344. 'featuremap_dbxref',
  18345. 'featuremap_organism',
  18346. 'featuremapprop',
  18347. 'featuremap_pub',
  18348. 'feature_phenotype',
  18349. 'featurepos',
  18350. 'featureposprop',
  18351. 'featureprop',
  18352. 'featureprop_pub',
  18353. 'feature_pub',
  18354. 'feature_pubprop',
  18355. 'featurerange',
  18356. 'feature_relationship',
  18357. 'feature_relationshipprop',
  18358. 'feature_relationshipprop_pub',
  18359. 'feature_relationship_pub',
  18360. 'feature_synonym',
  18361. 'genotype',
  18362. 'genotypeprop',
  18363. 'library',
  18364. 'library_contact',
  18365. 'library_cvterm',
  18366. 'library_dbxref',
  18367. 'library_expression',
  18368. 'library_expressionprop',
  18369. 'library_feature',
  18370. 'library_featureprop',
  18371. 'libraryprop',
  18372. 'libraryprop_pub',
  18373. 'library_pub',
  18374. 'library_relationship',
  18375. 'library_relationship_pub',
  18376. 'library_synonym',
  18377. 'magedocumentation',
  18378. 'mageml',
  18379. 'materialized_view',
  18380. 'nd_experiment',
  18381. 'nd_experiment_analysis',
  18382. 'nd_experiment_contact',
  18383. 'nd_experiment_dbxref',
  18384. 'nd_experiment_genotype',
  18385. 'nd_experiment_phenotype',
  18386. 'nd_experiment_project',
  18387. 'nd_experimentprop',
  18388. 'nd_experiment_protocol',
  18389. 'nd_experiment_pub',
  18390. 'nd_experiment_stock',
  18391. 'nd_experiment_stock_dbxref',
  18392. 'nd_experiment_stockprop',
  18393. 'nd_geolocation',
  18394. 'nd_geolocationprop',
  18395. 'nd_protocol',
  18396. 'nd_protocolprop',
  18397. 'nd_protocol_reagent',
  18398. 'nd_reagent',
  18399. 'nd_reagentprop',
  18400. 'nd_reagent_relationship',
  18401. 'organism',
  18402. 'organism_cvterm',
  18403. 'organism_cvtermprop',
  18404. 'organism_dbxref',
  18405. 'organism_feature_count',
  18406. 'organismprop',
  18407. 'organismprop_pub',
  18408. 'organism_pub',
  18409. 'organism_relationship',
  18410. 'phendesc',
  18411. 'phenotype',
  18412. 'phenotype_comparison',
  18413. 'phenotype_comparison_cvterm',
  18414. 'phenotype_cvterm',
  18415. 'phenotypeprop',
  18416. 'phenstatement',
  18417. 'phylonode',
  18418. 'phylonode_dbxref',
  18419. 'phylonode_organism',
  18420. 'phylonodeprop',
  18421. 'phylonode_pub',
  18422. 'phylonode_relationship',
  18423. 'phylotree',
  18424. 'phylotreeprop',
  18425. 'phylotree_pub',
  18426. 'project',
  18427. 'project_analysis',
  18428. 'project_contact',
  18429. 'project_dbxref',
  18430. 'project_feature',
  18431. 'projectprop',
  18432. 'project_pub',
  18433. 'project_relationship',
  18434. 'project_stock',
  18435. 'protocol',
  18436. 'protocolparam',
  18437. 'pub',
  18438. 'pubauthor',
  18439. 'pubauthor_contact',
  18440. 'pub_dbxref',
  18441. 'pubprop',
  18442. 'pub_relationship',
  18443. 'quantification',
  18444. 'quantificationprop',
  18445. 'quantification_relationship',
  18446. 'stock',
  18447. 'stockcollection',
  18448. 'stockcollection_db',
  18449. 'stockcollectionprop',
  18450. 'stockcollection_stock',
  18451. 'stock_cvterm',
  18452. 'stock_cvtermprop',
  18453. 'stock_dbxref',
  18454. 'stock_dbxrefprop',
  18455. 'stock_feature',
  18456. 'stock_featuremap',
  18457. 'stock_genotype',
  18458. 'stock_library',
  18459. 'stockprop',
  18460. 'stockprop_pub',
  18461. 'stock_pub',
  18462. 'stock_relationship',
  18463. 'stock_relationship_cvterm',
  18464. 'stock_relationship_pub',
  18465. 'study',
  18466. 'study_assay',
  18467. 'studydesign',
  18468. 'studydesignprop',
  18469. 'studyfactor',
  18470. 'studyfactorvalue',
  18471. 'studyprop',
  18472. 'studyprop_feature',
  18473. 'synonym',
  18474. 'tableinfo',
  18475. 'treatment',
  18476. ];
  18477. return $tables;
  18478. }