tripal_core.schema_v1.11.api.inc 251 KB

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