tripal_core.schema.api.inc 326 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693
  1. <?php
  2. /* @file: This file contains default schema definitions for all chado tables
  3. * to be used with tripal_core chado insert/update/select functions.
  4. * These schema definitions can be augmented by the various modules
  5. * (specifically to add missing foreign key definitions) by implementing
  6. * hook_chado_<table name>_schema().
  7. */
  8. /**
  9. *
  10. */
  11. function tripal_core_get_chado_tables() {
  12. if(is_array($db_url) and array_key_exists('chado',$db_url)){
  13. $previous_db = tripal_db_set_active('chado');
  14. $sql = 'SELECT tablename FROM pg_tables';
  15. $resource = db_query($sql);
  16. tripal_db_set_active($previous_db);
  17. } else {
  18. $sql = "SELECT tablename FROM pg_tables WHERE schemaname='chado'";
  19. $resource = db_query($sql);
  20. }
  21. $tables = array();
  22. while ($r = db_fetch_object($resource)) {
  23. $tables[$r->tablename] = $r->tablename;
  24. }
  25. asort($tables);
  26. return $tables;
  27. }
  28. /**
  29. * Implements hook_organism_dbxref_schema()
  30. * Purpose: To describe the structure of organism_dbxref to tripal
  31. * @see tripal_core.api.inc: tripal_core_chado_insert()
  32. * @see tripal_core.api.inc: tripal_core_chado_update()
  33. * @see tripal_core.api.inc: tripal_core_chado_select()
  34. *
  35. * @return
  36. * An array describing the current table
  37. *
  38. * @ingroup tripal_schema_api
  39. *
  40. */
  41. function tripal_core_chado_organism_dbxref_schema () {
  42. $description = array();
  43. $description = array(
  44. 'table' => 'organism_dbxref',
  45. // 'description' => 'TODO: please describe this table!',
  46. 'fields' => array(
  47. 'organism_dbxref_id' => array(
  48. // 'description' => 'TODO: please describe this field!',
  49. 'type' => 'serial',
  50. 'not null' => '1',
  51. ),
  52. 'organism_id' => array(
  53. // 'description' => 'TODO: please describe this field!',
  54. 'type' => 'int',
  55. 'not null' => '1',
  56. ),
  57. 'dbxref_id' => array(
  58. // 'description' => 'TODO: please describe this field!',
  59. 'type' => 'int',
  60. 'not null' => '1',
  61. ),
  62. ),
  63. 'primary key' => array(
  64. '0' => 'organism_dbxref_id',
  65. ),
  66. 'unique keys' => array(
  67. 'organism_dbxref_c1' => array(
  68. '0' => 'organism_id',
  69. '1' => 'dbxref_id',
  70. ),
  71. ),
  72. 'indexes' => array(
  73. 'organism_dbxref_idx1' => array(
  74. '0' => 'organism_id',
  75. ),
  76. 'organism_dbxref_idx2' => array(
  77. '0' => 'dbxref_id',
  78. ),
  79. ),
  80. 'foreign keys' => array(
  81. ),
  82. );
  83. return $description;
  84. }
  85. /**
  86. * Implements hook_organismprop_schema()
  87. * Purpose: To describe the structure of organismprop to tripal
  88. * @see tripal_core.api.inc: tripal_core_chado_insert()
  89. * @see tripal_core.api.inc: tripal_core_chado_update()
  90. * @see tripal_core.api.inc: tripal_core_chado_select()
  91. *
  92. * @return
  93. * An array describing the current table
  94. *
  95. * @ingroup tripal_schema_api
  96. *
  97. */
  98. function tripal_core_chado_organismprop_schema () {
  99. $description = array();
  100. $description = array(
  101. 'table' => 'organismprop',
  102. // 'description' => 'TODO: please describe this table!',
  103. 'fields' => array(
  104. 'organismprop_id' => array(
  105. // 'description' => 'TODO: please describe this field!',
  106. 'type' => 'serial',
  107. 'not null' => '1',
  108. ),
  109. 'organism_id' => array(
  110. // 'description' => 'TODO: please describe this field!',
  111. 'type' => 'int',
  112. 'not null' => '1',
  113. ),
  114. 'type_id' => array(
  115. // 'description' => 'TODO: please describe this field!',
  116. 'type' => 'int',
  117. 'not null' => '1',
  118. ),
  119. 'value' => array(
  120. // 'description' => 'TODO: please describe this field!',
  121. 'type' => 'text',
  122. 'not null' => '',
  123. ),
  124. 'rank' => array(
  125. // 'description' => 'TODO: please describe this field!',
  126. 'type' => 'int',
  127. 'not null' => '1',
  128. 'default' => '0',
  129. ),
  130. ),
  131. 'primary key' => array(
  132. '0' => 'organismprop_id',
  133. ),
  134. 'unique keys' => array(
  135. 'organismprop_c1' => array(
  136. '0' => 'organism_id',
  137. '1' => 'type_id',
  138. '2' => 'rank',
  139. ),
  140. ),
  141. 'indexes' => array(
  142. 'organismprop_idx1' => array(
  143. '0' => 'organism_id',
  144. ),
  145. 'organismprop_idx2' => array(
  146. '0' => 'type_id',
  147. ),
  148. ),
  149. 'foreign keys' => array(
  150. ),
  151. );
  152. return $description;
  153. }
  154. /**
  155. * Implements hook_phendesc_schema()
  156. * Purpose: To describe the structure of phendesc to tripal
  157. * @see tripal_core.api.inc: tripal_core_chado_insert()
  158. * @see tripal_core.api.inc: tripal_core_chado_update()
  159. * @see tripal_core.api.inc: tripal_core_chado_select()
  160. *
  161. * @return
  162. * An array describing the current table
  163. *
  164. * @ingroup tripal_schema_api
  165. *
  166. */
  167. function tripal_core_chado_phendesc_schema () {
  168. $description = array();
  169. $description = array(
  170. 'table' => 'phendesc',
  171. // 'description' => 'TODO: please describe this table!',
  172. 'fields' => array(
  173. 'phendesc_id' => array(
  174. // 'description' => 'TODO: please describe this field!',
  175. 'type' => 'serial',
  176. 'not null' => '1',
  177. ),
  178. 'genotype_id' => array(
  179. // 'description' => 'TODO: please describe this field!',
  180. 'type' => 'int',
  181. 'not null' => '1',
  182. ),
  183. 'environment_id' => array(
  184. // 'description' => 'TODO: please describe this field!',
  185. 'type' => 'int',
  186. 'not null' => '1',
  187. ),
  188. 'description' => array(
  189. // 'description' => 'TODO: please describe this field!',
  190. 'type' => 'text',
  191. 'not null' => '1',
  192. ),
  193. 'type_id' => array(
  194. // 'description' => 'TODO: please describe this field!',
  195. 'type' => 'int',
  196. 'not null' => '1',
  197. ),
  198. 'pub_id' => array(
  199. // 'description' => 'TODO: please describe this field!',
  200. 'type' => 'int',
  201. 'not null' => '1',
  202. ),
  203. ),
  204. 'primary key' => array(
  205. '0' => 'phendesc_id',
  206. ),
  207. 'unique keys' => array(
  208. 'phendesc_c1' => array(
  209. '0' => 'genotype_id',
  210. '1' => 'environment_id',
  211. '2' => 'type_id',
  212. '3' => 'pub_id',
  213. ),
  214. ),
  215. 'indexes' => array(
  216. 'phendesc_idx1' => array(
  217. '0' => 'genotype_id',
  218. ),
  219. 'phendesc_idx2' => array(
  220. '0' => 'environment_id',
  221. ),
  222. 'phendesc_idx3' => array(
  223. '0' => 'pub_id',
  224. ),
  225. ),
  226. 'foreign keys' => array(
  227. ),
  228. );
  229. return $description;
  230. }
  231. /**
  232. * Implements hook_phenotype_schema()
  233. * Purpose: To describe the structure of phenotype to tripal
  234. * @see tripal_core.api.inc: tripal_core_chado_insert()
  235. * @see tripal_core.api.inc: tripal_core_chado_update()
  236. * @see tripal_core.api.inc: tripal_core_chado_select()
  237. *
  238. * @return
  239. * An array describing the current table
  240. *
  241. * @ingroup tripal_schema_api
  242. *
  243. */
  244. function tripal_core_chado_phenotype_schema () {
  245. $description = array();
  246. $description = array(
  247. 'table' => 'phenotype',
  248. // 'description' => 'TODO: please describe this table!',
  249. 'fields' => array(
  250. 'phenotype_id' => array(
  251. // 'description' => 'TODO: please describe this field!',
  252. 'type' => 'serial',
  253. 'not null' => '1',
  254. ),
  255. 'uniquename' => array(
  256. // 'description' => 'TODO: please describe this field!',
  257. 'type' => 'text',
  258. 'not null' => '1',
  259. ),
  260. 'observable_id' => array(
  261. // 'description' => 'TODO: please describe this field!',
  262. 'type' => 'int',
  263. 'not null' => '',
  264. ),
  265. 'attr_id' => array(
  266. // 'description' => 'TODO: please describe this field!',
  267. 'type' => 'int',
  268. 'not null' => '',
  269. ),
  270. 'value' => array(
  271. // 'description' => 'TODO: please describe this field!',
  272. 'type' => 'text',
  273. 'not null' => '',
  274. ),
  275. 'cvalue_id' => array(
  276. // 'description' => 'TODO: please describe this field!',
  277. 'type' => 'int',
  278. 'not null' => '',
  279. ),
  280. 'assay_id' => array(
  281. // 'description' => 'TODO: please describe this field!',
  282. 'type' => 'int',
  283. 'not null' => '',
  284. ),
  285. ),
  286. 'primary key' => array(
  287. '0' => 'phenotype_id',
  288. ),
  289. 'unique keys' => array(
  290. 'phenotype_c1' => array(
  291. '0' => 'uniquename',
  292. ),
  293. ),
  294. 'indexes' => array(
  295. 'phenotype_idx1' => array(
  296. '0' => 'cvalue_id',
  297. ),
  298. 'phenotype_idx2' => array(
  299. '0' => 'observable_id',
  300. ),
  301. 'phenotype_idx3' => array(
  302. '0' => 'attr_id',
  303. ),
  304. ),
  305. 'foreign keys' => array(
  306. ),
  307. );
  308. return $description;
  309. }
  310. /**
  311. * Implements hook_organism_schema()
  312. * Purpose: To describe the structure of organism to tripal
  313. * @see tripal_core.api.inc: tripal_core_chado_insert()
  314. * @see tripal_core.api.inc: tripal_core_chado_update()
  315. * @see tripal_core.api.inc: tripal_core_chado_select()
  316. *
  317. * @return
  318. * An array describing the current table
  319. *
  320. * @ingroup tripal_schema_api
  321. *
  322. */
  323. function tripal_core_chado_organism_schema () {
  324. $description = array();
  325. $description = array(
  326. 'table' => 'organism',
  327. // 'description' => 'TODO: please describe this table!',
  328. 'fields' => array(
  329. 'organism_id' => array(
  330. // 'description' => 'TODO: please describe this field!',
  331. 'type' => 'serial',
  332. 'not null' => '1',
  333. ),
  334. 'abbreviation' => array(
  335. // 'description' => 'TODO: please describe this field!',
  336. 'type' => 'varchar',
  337. 'length' => '255',
  338. 'not null' => '',
  339. ),
  340. 'genus' => array(
  341. // 'description' => 'TODO: please describe this field!',
  342. 'type' => 'varchar',
  343. 'length' => '255',
  344. 'not null' => '1',
  345. ),
  346. 'species' => array(
  347. // 'description' => 'TODO: please describe this field!',
  348. 'type' => 'varchar',
  349. 'length' => '255',
  350. 'not null' => '1',
  351. ),
  352. 'common_name' => array(
  353. // 'description' => 'TODO: please describe this field!',
  354. 'type' => 'varchar',
  355. 'length' => '255',
  356. 'not null' => '',
  357. ),
  358. 'comment' => array(
  359. // 'description' => 'TODO: please describe this field!',
  360. 'type' => 'text',
  361. 'not null' => '',
  362. ),
  363. ),
  364. 'primary key' => array(
  365. '0' => 'organism_id',
  366. ),
  367. 'unique keys' => array(
  368. 'organism_c1' => array(
  369. '0' => 'genus',
  370. '1' => 'species',
  371. ),
  372. ),
  373. 'indexes' => array(
  374. ),
  375. 'foreign keys' => array(
  376. ),
  377. );
  378. return $description;
  379. }
  380. /**
  381. * Implements hook_materialized_view_schema()
  382. * Purpose: To describe the structure of materialized_view to tripal
  383. * @see tripal_core.api.inc: tripal_core_chado_insert()
  384. * @see tripal_core.api.inc: tripal_core_chado_update()
  385. * @see tripal_core.api.inc: tripal_core_chado_select()
  386. *
  387. * @return
  388. * An array describing the current table
  389. *
  390. * @ingroup tripal_schema_api
  391. *
  392. */
  393. function tripal_core_chado_materialized_view_schema () {
  394. $description = array();
  395. $description = array(
  396. 'table' => 'materialized_view',
  397. // 'description' => 'TODO: please describe this table!',
  398. 'fields' => array(
  399. 'materialized_view_id' => array(
  400. // 'description' => 'TODO: please describe this field!',
  401. 'type' => 'serial',
  402. 'not null' => '1',
  403. ),
  404. 'last_update' => array(
  405. // 'description' => 'TODO: please describe this field!',
  406. 'type' => 'datetime',
  407. 'not null' => '',
  408. ),
  409. 'refresh_time' => array(
  410. // 'description' => 'TODO: please describe this field!',
  411. 'type' => 'int',
  412. 'not null' => '',
  413. ),
  414. 'name' => array(
  415. // 'description' => 'TODO: please describe this field!',
  416. 'type' => 'varchar',
  417. 'length' => '64',
  418. 'not null' => '',
  419. ),
  420. 'mv_schema' => array(
  421. // 'description' => 'TODO: please describe this field!',
  422. 'type' => 'varchar',
  423. 'length' => '64',
  424. 'not null' => '',
  425. ),
  426. 'mv_table' => array(
  427. // 'description' => 'TODO: please describe this field!',
  428. 'type' => 'varchar',
  429. 'length' => '128',
  430. 'not null' => '',
  431. ),
  432. 'mv_specs' => array(
  433. // 'description' => 'TODO: please describe this field!',
  434. 'type' => 'text',
  435. 'not null' => '',
  436. ),
  437. 'indexed' => array(
  438. // 'description' => 'TODO: please describe this field!',
  439. 'type' => 'text',
  440. 'not null' => '',
  441. ),
  442. 'query' => array(
  443. // 'description' => 'TODO: please describe this field!',
  444. 'type' => 'text',
  445. 'not null' => '',
  446. ),
  447. 'special_index' => array(
  448. // 'description' => 'TODO: please describe this field!',
  449. 'type' => 'text',
  450. 'not null' => '',
  451. ),
  452. ),
  453. 'primary key' => array(
  454. ),
  455. 'unique keys' => array(
  456. 'name' => array(
  457. '0' => 'name',
  458. ),
  459. ),
  460. 'indexes' => array(
  461. ),
  462. 'foreign keys' => array(
  463. ),
  464. );
  465. return $description;
  466. }
  467. /**
  468. * Implements hook_libraryprop_schema()
  469. * Purpose: To describe the structure of libraryprop to tripal
  470. * @see tripal_core.api.inc: tripal_core_chado_insert()
  471. * @see tripal_core.api.inc: tripal_core_chado_update()
  472. * @see tripal_core.api.inc: tripal_core_chado_select()
  473. *
  474. * @return
  475. * An array describing the current table
  476. *
  477. * @ingroup tripal_schema_api
  478. *
  479. */
  480. function tripal_core_chado_libraryprop_schema () {
  481. $description = array();
  482. $description = array(
  483. 'table' => 'libraryprop',
  484. // 'description' => 'TODO: please describe this table!',
  485. 'fields' => array(
  486. 'libraryprop_id' => array(
  487. // 'description' => 'TODO: please describe this field!',
  488. 'type' => 'serial',
  489. 'not null' => '1',
  490. ),
  491. 'library_id' => array(
  492. // 'description' => 'TODO: please describe this field!',
  493. 'type' => 'int',
  494. 'not null' => '1',
  495. ),
  496. 'type_id' => array(
  497. // 'description' => 'TODO: please describe this field!',
  498. 'type' => 'int',
  499. 'not null' => '1',
  500. ),
  501. 'value' => array(
  502. // 'description' => 'TODO: please describe this field!',
  503. 'type' => 'text',
  504. 'not null' => '',
  505. ),
  506. 'rank' => array(
  507. // 'description' => 'TODO: please describe this field!',
  508. 'type' => 'int',
  509. 'not null' => '1',
  510. 'default' => '0',
  511. ),
  512. ),
  513. 'primary key' => array(
  514. '0' => 'libraryprop_id',
  515. ),
  516. 'unique keys' => array(
  517. 'libraryprop_c1' => array(
  518. '0' => 'library_id',
  519. '1' => 'type_id',
  520. '2' => 'rank',
  521. ),
  522. ),
  523. 'indexes' => array(
  524. 'libraryprop_idx1' => array(
  525. '0' => 'library_id',
  526. ),
  527. 'libraryprop_idx2' => array(
  528. '0' => 'type_id',
  529. ),
  530. ),
  531. 'foreign keys' => array(
  532. ),
  533. );
  534. return $description;
  535. }
  536. /**
  537. * Implements hook_libraryprop_pub_schema()
  538. * Purpose: To describe the structure of libraryprop_pub to tripal
  539. * @see tripal_core.api.inc: tripal_core_chado_insert()
  540. * @see tripal_core.api.inc: tripal_core_chado_update()
  541. * @see tripal_core.api.inc: tripal_core_chado_select()
  542. *
  543. * @return
  544. * An array describing the current table
  545. *
  546. * @ingroup tripal_schema_api
  547. *
  548. */
  549. function tripal_core_chado_libraryprop_pub_schema () {
  550. $description = array();
  551. $description = array(
  552. 'table' => 'libraryprop_pub',
  553. // 'description' => 'TODO: please describe this table!',
  554. 'fields' => array(
  555. 'libraryprop_pub_id' => array(
  556. // 'description' => 'TODO: please describe this field!',
  557. 'type' => 'serial',
  558. 'not null' => '1',
  559. ),
  560. 'libraryprop_id' => array(
  561. // 'description' => 'TODO: please describe this field!',
  562. 'type' => 'int',
  563. 'not null' => '1',
  564. ),
  565. 'pub_id' => array(
  566. // 'description' => 'TODO: please describe this field!',
  567. 'type' => 'int',
  568. 'not null' => '1',
  569. ),
  570. ),
  571. 'primary key' => array(
  572. '0' => 'libraryprop_pub_id',
  573. ),
  574. 'unique keys' => array(
  575. 'libraryprop_pub_c1' => array(
  576. '0' => 'libraryprop_id',
  577. '1' => 'pub_id',
  578. ),
  579. ),
  580. 'indexes' => array(
  581. 'libraryprop_pub_idx1' => array(
  582. '0' => 'libraryprop_id',
  583. ),
  584. 'libraryprop_pub_idx2' => array(
  585. '0' => 'pub_id',
  586. ),
  587. ),
  588. 'foreign keys' => array(
  589. ),
  590. );
  591. return $description;
  592. }
  593. /**
  594. * Implements hook_magedocumentation_schema()
  595. * Purpose: To describe the structure of magedocumentation to tripal
  596. * @see tripal_core.api.inc: tripal_core_chado_insert()
  597. * @see tripal_core.api.inc: tripal_core_chado_update()
  598. * @see tripal_core.api.inc: tripal_core_chado_select()
  599. *
  600. * @return
  601. * An array describing the current table
  602. *
  603. * @ingroup tripal_schema_api
  604. *
  605. */
  606. function tripal_core_chado_magedocumentation_schema () {
  607. $description = array();
  608. $description = array(
  609. 'table' => 'magedocumentation',
  610. // 'description' => 'TODO: please describe this table!',
  611. 'fields' => array(
  612. 'magedocumentation_id' => array(
  613. // 'description' => 'TODO: please describe this field!',
  614. 'type' => 'serial',
  615. 'not null' => '1',
  616. ),
  617. 'mageml_id' => array(
  618. // 'description' => 'TODO: please describe this field!',
  619. 'type' => 'int',
  620. 'not null' => '1',
  621. ),
  622. 'tableinfo_id' => array(
  623. // 'description' => 'TODO: please describe this field!',
  624. 'type' => 'int',
  625. 'not null' => '1',
  626. ),
  627. 'row_id' => array(
  628. // 'description' => 'TODO: please describe this field!',
  629. 'type' => 'int',
  630. 'not null' => '1',
  631. ),
  632. 'mageidentifier' => array(
  633. // 'description' => 'TODO: please describe this field!',
  634. 'type' => 'text',
  635. 'not null' => '1',
  636. ),
  637. ),
  638. 'primary key' => array(
  639. '0' => 'magedocumentation_id',
  640. ),
  641. 'unique keys' => array(
  642. ),
  643. 'indexes' => array(
  644. 'magedocumentation_idx1' => array(
  645. '0' => 'mageml_id',
  646. ),
  647. 'magedocumentation_idx2' => array(
  648. '0' => 'tableinfo_id',
  649. ),
  650. 'magedocumentation_idx3' => array(
  651. '0' => 'row_id',
  652. ),
  653. ),
  654. 'foreign keys' => array(
  655. ),
  656. );
  657. return $description;
  658. }
  659. /**
  660. * Implements hook_mageml_schema()
  661. * Purpose: To describe the structure of mageml to tripal
  662. * @see tripal_core.api.inc: tripal_core_chado_insert()
  663. * @see tripal_core.api.inc: tripal_core_chado_update()
  664. * @see tripal_core.api.inc: tripal_core_chado_select()
  665. *
  666. * @return
  667. * An array describing the current table
  668. *
  669. * @ingroup tripal_schema_api
  670. *
  671. */
  672. function tripal_core_chado_mageml_schema () {
  673. $description = array();
  674. $description = array(
  675. 'table' => 'mageml',
  676. // 'description' => 'TODO: please describe this table!',
  677. 'fields' => array(
  678. 'mageml_id' => array(
  679. // 'description' => 'TODO: please describe this field!',
  680. 'type' => 'serial',
  681. 'not null' => '1',
  682. ),
  683. 'mage_package' => array(
  684. // 'description' => 'TODO: please describe this field!',
  685. 'type' => 'text',
  686. 'not null' => '1',
  687. ),
  688. 'mage_ml' => array(
  689. // 'description' => 'TODO: please describe this field!',
  690. 'type' => 'text',
  691. 'not null' => '1',
  692. ),
  693. ),
  694. 'primary key' => array(
  695. '0' => 'mageml_id',
  696. ),
  697. 'unique keys' => array(
  698. ),
  699. 'indexes' => array(
  700. ),
  701. 'foreign keys' => array(
  702. ),
  703. );
  704. return $description;
  705. }
  706. /**
  707. * Implements hook_phenotype_comparison_schema()
  708. * Purpose: To describe the structure of phenotype_comparison to tripal
  709. * @see tripal_core.api.inc: tripal_core_chado_insert()
  710. * @see tripal_core.api.inc: tripal_core_chado_update()
  711. * @see tripal_core.api.inc: tripal_core_chado_select()
  712. *
  713. * @return
  714. * An array describing the current table
  715. *
  716. * @ingroup tripal_schema_api
  717. *
  718. */
  719. function tripal_core_chado_phenotype_comparison_schema () {
  720. $description = array();
  721. $description = array(
  722. 'table' => 'phenotype_comparison',
  723. // 'description' => 'TODO: please describe this table!',
  724. 'fields' => array(
  725. 'phenotype_comparison_id' => array(
  726. // 'description' => 'TODO: please describe this field!',
  727. 'type' => 'serial',
  728. 'not null' => '1',
  729. ),
  730. 'genotype1_id' => array(
  731. // 'description' => 'TODO: please describe this field!',
  732. 'type' => 'int',
  733. 'not null' => '1',
  734. ),
  735. 'environment1_id' => array(
  736. // 'description' => 'TODO: please describe this field!',
  737. 'type' => 'int',
  738. 'not null' => '1',
  739. ),
  740. 'genotype2_id' => array(
  741. // 'description' => 'TODO: please describe this field!',
  742. 'type' => 'int',
  743. 'not null' => '1',
  744. ),
  745. 'environment2_id' => array(
  746. // 'description' => 'TODO: please describe this field!',
  747. 'type' => 'int',
  748. 'not null' => '1',
  749. ),
  750. 'phenotype1_id' => array(
  751. // 'description' => 'TODO: please describe this field!',
  752. 'type' => 'int',
  753. 'not null' => '1',
  754. ),
  755. 'phenotype2_id' => array(
  756. // 'description' => 'TODO: please describe this field!',
  757. 'type' => 'int',
  758. 'not null' => '',
  759. ),
  760. 'pub_id' => array(
  761. // 'description' => 'TODO: please describe this field!',
  762. 'type' => 'int',
  763. 'not null' => '1',
  764. ),
  765. 'organism_id' => array(
  766. // 'description' => 'TODO: please describe this field!',
  767. 'type' => 'int',
  768. 'not null' => '1',
  769. ),
  770. ),
  771. 'primary key' => array(
  772. '0' => 'phenotype_comparison_id',
  773. ),
  774. 'unique keys' => array(
  775. 'phenotype_comparison_c1' => array(
  776. '0' => 'genotype1_id',
  777. '1' => 'environment1_id',
  778. '2' => 'genotype2_id',
  779. '3' => 'environment2_id',
  780. '4' => 'phenotype1_id',
  781. '5' => 'pub_id',
  782. ),
  783. ),
  784. 'indexes' => array(
  785. 'phenotype_comparison_idx1' => array(
  786. '0' => 'genotype1_id',
  787. ),
  788. 'phenotype_comparison_idx2' => array(
  789. '0' => 'genotype2_id',
  790. ),
  791. 'phenotype_comparison_idx4' => array(
  792. '0' => 'pub_id',
  793. ),
  794. ),
  795. 'foreign keys' => array(
  796. ),
  797. );
  798. return $description;
  799. }
  800. /**
  801. * Implements hook_phenotype_comparison_cvterm_schema()
  802. * Purpose: To describe the structure of phenotype_comparison_cvterm to tripal
  803. * @see tripal_core.api.inc: tripal_core_chado_insert()
  804. * @see tripal_core.api.inc: tripal_core_chado_update()
  805. * @see tripal_core.api.inc: tripal_core_chado_select()
  806. *
  807. * @return
  808. * An array describing the current table
  809. *
  810. * @ingroup tripal_schema_api
  811. *
  812. */
  813. function tripal_core_chado_phenotype_comparison_cvterm_schema () {
  814. $description = array();
  815. $description = array(
  816. 'table' => 'phenotype_comparison_cvterm',
  817. // 'description' => 'TODO: please describe this table!',
  818. 'fields' => array(
  819. 'phenotype_comparison_cvterm_id' => array(
  820. // 'description' => 'TODO: please describe this field!',
  821. 'type' => 'serial',
  822. 'not null' => '1',
  823. ),
  824. 'phenotype_comparison_id' => array(
  825. // 'description' => 'TODO: please describe this field!',
  826. 'type' => 'int',
  827. 'not null' => '1',
  828. ),
  829. 'cvterm_id' => array(
  830. // 'description' => 'TODO: please describe this field!',
  831. 'type' => 'int',
  832. 'not null' => '1',
  833. ),
  834. 'pub_id' => array(
  835. // 'description' => 'TODO: please describe this field!',
  836. 'type' => 'int',
  837. 'not null' => '1',
  838. ),
  839. 'rank' => array(
  840. // 'description' => 'TODO: please describe this field!',
  841. 'type' => 'int',
  842. 'not null' => '1',
  843. 'default' => '0',
  844. ),
  845. ),
  846. 'primary key' => array(
  847. '0' => 'phenotype_comparison_cvterm_id',
  848. ),
  849. 'unique keys' => array(
  850. 'phenotype_comparison_cvterm_c1' => array(
  851. '0' => 'phenotype_comparison_id',
  852. '1' => 'cvterm_id',
  853. ),
  854. ),
  855. 'indexes' => array(
  856. 'phenotype_comparison_cvterm_idx1' => array(
  857. '0' => 'phenotype_comparison_id',
  858. ),
  859. 'phenotype_comparison_cvterm_idx2' => array(
  860. '0' => 'cvterm_id',
  861. ),
  862. ),
  863. 'foreign keys' => array(
  864. ),
  865. );
  866. return $description;
  867. }
  868. /**
  869. * Implements hook_phylonode_relationship_schema()
  870. * Purpose: To describe the structure of phylonode_relationship to tripal
  871. * @see tripal_core.api.inc: tripal_core_chado_insert()
  872. * @see tripal_core.api.inc: tripal_core_chado_update()
  873. * @see tripal_core.api.inc: tripal_core_chado_select()
  874. *
  875. * @return
  876. * An array describing the current table
  877. *
  878. * @ingroup tripal_schema_api
  879. *
  880. */
  881. function tripal_core_chado_phylonode_relationship_schema () {
  882. $description = array();
  883. $description = array(
  884. 'table' => 'phylonode_relationship',
  885. // 'description' => 'TODO: please describe this table!',
  886. 'fields' => array(
  887. 'phylonode_relationship_id' => array(
  888. // 'description' => 'TODO: please describe this field!',
  889. 'type' => 'serial',
  890. 'not null' => '1',
  891. ),
  892. 'subject_id' => array(
  893. // 'description' => 'TODO: please describe this field!',
  894. 'type' => 'int',
  895. 'not null' => '1',
  896. ),
  897. 'object_id' => array(
  898. // 'description' => 'TODO: please describe this field!',
  899. 'type' => 'int',
  900. 'not null' => '1',
  901. ),
  902. 'type_id' => array(
  903. // 'description' => 'TODO: please describe this field!',
  904. 'type' => 'int',
  905. 'not null' => '1',
  906. ),
  907. 'rank' => array(
  908. // 'description' => 'TODO: please describe this field!',
  909. 'type' => 'int',
  910. 'not null' => '',
  911. ),
  912. 'phylotree_id' => array(
  913. // 'description' => 'TODO: please describe this field!',
  914. 'type' => 'int',
  915. 'not null' => '1',
  916. ),
  917. ),
  918. 'primary key' => array(
  919. '0' => 'phylonode_relationship_id',
  920. ),
  921. 'unique keys' => array(
  922. 'subject_id' => array(
  923. '0' => 'subject_id',
  924. '1' => 'object_id',
  925. '2' => 'type_id',
  926. ),
  927. ),
  928. 'indexes' => array(
  929. 'phylonode_relationship_idx1' => array(
  930. '0' => 'subject_id',
  931. ),
  932. 'phylonode_relationship_idx2' => array(
  933. '0' => 'object_id',
  934. ),
  935. 'phylonode_relationship_idx3' => array(
  936. '0' => 'type_id',
  937. ),
  938. ),
  939. 'foreign keys' => array(
  940. ),
  941. );
  942. return $description;
  943. }
  944. /**
  945. * Implements hook_phylonodeprop_schema()
  946. * Purpose: To describe the structure of phylonodeprop to tripal
  947. * @see tripal_core.api.inc: tripal_core_chado_insert()
  948. * @see tripal_core.api.inc: tripal_core_chado_update()
  949. * @see tripal_core.api.inc: tripal_core_chado_select()
  950. *
  951. * @return
  952. * An array describing the current table
  953. *
  954. * @ingroup tripal_schema_api
  955. *
  956. */
  957. function tripal_core_chado_phylonodeprop_schema () {
  958. $description = array();
  959. $description = array(
  960. 'table' => 'phylonodeprop',
  961. // 'description' => 'TODO: please describe this table!',
  962. 'fields' => array(
  963. 'phylonodeprop_id' => array(
  964. // 'description' => 'TODO: please describe this field!',
  965. 'type' => 'serial',
  966. 'not null' => '1',
  967. ),
  968. 'phylonode_id' => array(
  969. // 'description' => 'TODO: please describe this field!',
  970. 'type' => 'int',
  971. 'not null' => '1',
  972. ),
  973. 'type_id' => array(
  974. // 'description' => 'TODO: please describe this field!',
  975. 'type' => 'int',
  976. 'not null' => '1',
  977. ),
  978. 'value' => array(
  979. // 'description' => 'TODO: please describe this field!',
  980. 'type' => 'text',
  981. 'not null' => '1',
  982. 'default' => '',
  983. ),
  984. 'rank' => array(
  985. // 'description' => 'TODO: please describe this field!',
  986. 'type' => 'int',
  987. 'not null' => '1',
  988. 'default' => '0',
  989. ),
  990. ),
  991. 'primary key' => array(
  992. '0' => 'phylonodeprop_id',
  993. ),
  994. 'unique keys' => array(
  995. 'phylonode_id' => array(
  996. '0' => 'phylonode_id',
  997. '1' => 'type_id',
  998. '2' => 'value',
  999. '3' => 'rank',
  1000. ),
  1001. ),
  1002. 'indexes' => array(
  1003. 'phylonodeprop_idx1' => array(
  1004. '0' => 'phylonode_id',
  1005. ),
  1006. 'phylonodeprop_idx2' => array(
  1007. '0' => 'type_id',
  1008. ),
  1009. ),
  1010. 'foreign keys' => array(
  1011. ),
  1012. );
  1013. return $description;
  1014. }
  1015. /**
  1016. * Implements hook_phylotree_schema()
  1017. * Purpose: To describe the structure of phylotree to tripal
  1018. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1019. * @see tripal_core.api.inc: tripal_core_chado_update()
  1020. * @see tripal_core.api.inc: tripal_core_chado_select()
  1021. *
  1022. * @return
  1023. * An array describing the current table
  1024. *
  1025. * @ingroup tripal_schema_api
  1026. *
  1027. */
  1028. function tripal_core_chado_phylotree_schema () {
  1029. $description = array();
  1030. $description = array(
  1031. 'table' => 'phylotree',
  1032. // 'description' => 'TODO: please describe this table!',
  1033. 'fields' => array(
  1034. 'phylotree_id' => array(
  1035. // 'description' => 'TODO: please describe this field!',
  1036. 'type' => 'serial',
  1037. 'not null' => '1',
  1038. ),
  1039. 'dbxref_id' => array(
  1040. // 'description' => 'TODO: please describe this field!',
  1041. 'type' => 'int',
  1042. 'not null' => '1',
  1043. ),
  1044. 'name' => array(
  1045. // 'description' => 'TODO: please describe this field!',
  1046. 'type' => 'varchar',
  1047. 'length' => '255',
  1048. 'not null' => '',
  1049. ),
  1050. 'type_id' => array(
  1051. // 'description' => 'TODO: please describe this field!',
  1052. 'type' => 'int',
  1053. 'not null' => '',
  1054. ),
  1055. 'analysis_id' => array(
  1056. // 'description' => 'TODO: please describe this field!',
  1057. 'type' => 'int',
  1058. 'not null' => '',
  1059. ),
  1060. 'comment' => array(
  1061. // 'description' => 'TODO: please describe this field!',
  1062. 'type' => 'text',
  1063. 'not null' => '',
  1064. ),
  1065. ),
  1066. 'primary key' => array(
  1067. '0' => 'phylotree_id',
  1068. ),
  1069. 'unique keys' => array(
  1070. ),
  1071. 'indexes' => array(
  1072. 'phylotree_idx1' => array(
  1073. '0' => 'phylotree_id',
  1074. ),
  1075. ),
  1076. 'foreign keys' => array(
  1077. ),
  1078. );
  1079. return $description;
  1080. }
  1081. /**
  1082. * Implements hook_phylotree_pub_schema()
  1083. * Purpose: To describe the structure of phylotree_pub to tripal
  1084. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1085. * @see tripal_core.api.inc: tripal_core_chado_update()
  1086. * @see tripal_core.api.inc: tripal_core_chado_select()
  1087. *
  1088. * @return
  1089. * An array describing the current table
  1090. *
  1091. * @ingroup tripal_schema_api
  1092. *
  1093. */
  1094. function tripal_core_chado_phylotree_pub_schema () {
  1095. $description = array();
  1096. $description = array(
  1097. 'table' => 'phylotree_pub',
  1098. // 'description' => 'TODO: please describe this table!',
  1099. 'fields' => array(
  1100. 'phylotree_pub_id' => array(
  1101. // 'description' => 'TODO: please describe this field!',
  1102. 'type' => 'serial',
  1103. 'not null' => '1',
  1104. ),
  1105. 'phylotree_id' => array(
  1106. // 'description' => 'TODO: please describe this field!',
  1107. 'type' => 'int',
  1108. 'not null' => '1',
  1109. ),
  1110. 'pub_id' => array(
  1111. // 'description' => 'TODO: please describe this field!',
  1112. 'type' => 'int',
  1113. 'not null' => '1',
  1114. ),
  1115. ),
  1116. 'primary key' => array(
  1117. '0' => 'phylotree_pub_id',
  1118. ),
  1119. 'unique keys' => array(
  1120. 'phylotree_id' => array(
  1121. '0' => 'phylotree_id',
  1122. '1' => 'pub_id',
  1123. ),
  1124. ),
  1125. 'indexes' => array(
  1126. 'phylotree_pub_idx1' => array(
  1127. '0' => 'phylotree_id',
  1128. ),
  1129. 'phylotree_pub_idx2' => array(
  1130. '0' => 'pub_id',
  1131. ),
  1132. ),
  1133. 'foreign keys' => array(
  1134. ),
  1135. );
  1136. return $description;
  1137. }
  1138. /**
  1139. * Implements hook_phylonode_pub_schema()
  1140. * Purpose: To describe the structure of phylonode_pub to tripal
  1141. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1142. * @see tripal_core.api.inc: tripal_core_chado_update()
  1143. * @see tripal_core.api.inc: tripal_core_chado_select()
  1144. *
  1145. * @return
  1146. * An array describing the current table
  1147. *
  1148. * @ingroup tripal_schema_api
  1149. *
  1150. */
  1151. function tripal_core_chado_phylonode_pub_schema () {
  1152. $description = array();
  1153. $description = array(
  1154. 'table' => 'phylonode_pub',
  1155. // 'description' => 'TODO: please describe this table!',
  1156. 'fields' => array(
  1157. 'phylonode_pub_id' => array(
  1158. // 'description' => 'TODO: please describe this field!',
  1159. 'type' => 'serial',
  1160. 'not null' => '1',
  1161. ),
  1162. 'phylonode_id' => array(
  1163. // 'description' => 'TODO: please describe this field!',
  1164. 'type' => 'int',
  1165. 'not null' => '1',
  1166. ),
  1167. 'pub_id' => array(
  1168. // 'description' => 'TODO: please describe this field!',
  1169. 'type' => 'int',
  1170. 'not null' => '1',
  1171. ),
  1172. ),
  1173. 'primary key' => array(
  1174. '0' => 'phylonode_pub_id',
  1175. ),
  1176. 'unique keys' => array(
  1177. 'phylonode_id' => array(
  1178. '0' => 'phylonode_id',
  1179. '1' => 'pub_id',
  1180. ),
  1181. ),
  1182. 'indexes' => array(
  1183. 'phylonode_pub_idx1' => array(
  1184. '0' => 'phylonode_id',
  1185. ),
  1186. 'phylonode_pub_idx2' => array(
  1187. '0' => 'pub_id',
  1188. ),
  1189. ),
  1190. 'foreign keys' => array(
  1191. ),
  1192. );
  1193. return $description;
  1194. }
  1195. /**
  1196. * Implements hook_phylonode_organism_schema()
  1197. * Purpose: To describe the structure of phylonode_organism to tripal
  1198. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1199. * @see tripal_core.api.inc: tripal_core_chado_update()
  1200. * @see tripal_core.api.inc: tripal_core_chado_select()
  1201. *
  1202. * @return
  1203. * An array describing the current table
  1204. *
  1205. * @ingroup tripal_schema_api
  1206. *
  1207. */
  1208. function tripal_core_chado_phylonode_organism_schema () {
  1209. $description = array();
  1210. $description = array(
  1211. 'table' => 'phylonode_organism',
  1212. // 'description' => 'TODO: please describe this table!',
  1213. 'fields' => array(
  1214. 'phylonode_organism_id' => array(
  1215. // 'description' => 'TODO: please describe this field!',
  1216. 'type' => 'serial',
  1217. 'not null' => '1',
  1218. ),
  1219. 'phylonode_id' => array(
  1220. // 'description' => 'TODO: please describe this field!',
  1221. 'type' => 'int',
  1222. 'not null' => '1',
  1223. ),
  1224. 'organism_id' => array(
  1225. // 'description' => 'TODO: please describe this field!',
  1226. 'type' => 'int',
  1227. 'not null' => '1',
  1228. ),
  1229. ),
  1230. 'primary key' => array(
  1231. '0' => 'phylonode_organism_id',
  1232. ),
  1233. 'unique keys' => array(
  1234. 'phylonode_id' => array(
  1235. '0' => 'phylonode_id',
  1236. ),
  1237. ),
  1238. 'indexes' => array(
  1239. 'phylonode_organism_idx1' => array(
  1240. '0' => 'phylonode_id',
  1241. ),
  1242. 'phylonode_organism_idx2' => array(
  1243. '0' => 'organism_id',
  1244. ),
  1245. ),
  1246. 'foreign keys' => array(
  1247. ),
  1248. );
  1249. return $description;
  1250. }
  1251. /**
  1252. * Implements hook_phenotype_cvterm_schema()
  1253. * Purpose: To describe the structure of phenotype_cvterm to tripal
  1254. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1255. * @see tripal_core.api.inc: tripal_core_chado_update()
  1256. * @see tripal_core.api.inc: tripal_core_chado_select()
  1257. *
  1258. * @return
  1259. * An array describing the current table
  1260. *
  1261. * @ingroup tripal_schema_api
  1262. *
  1263. */
  1264. function tripal_core_chado_phenotype_cvterm_schema () {
  1265. $description = array();
  1266. $description = array(
  1267. 'table' => 'phenotype_cvterm',
  1268. // 'description' => 'TODO: please describe this table!',
  1269. 'fields' => array(
  1270. 'phenotype_cvterm_id' => array(
  1271. // 'description' => 'TODO: please describe this field!',
  1272. 'type' => 'serial',
  1273. 'not null' => '1',
  1274. ),
  1275. 'phenotype_id' => array(
  1276. // 'description' => 'TODO: please describe this field!',
  1277. 'type' => 'int',
  1278. 'not null' => '1',
  1279. ),
  1280. 'cvterm_id' => array(
  1281. // 'description' => 'TODO: please describe this field!',
  1282. 'type' => 'int',
  1283. 'not null' => '1',
  1284. ),
  1285. 'rank' => array(
  1286. // 'description' => 'TODO: please describe this field!',
  1287. 'type' => 'int',
  1288. 'not null' => '1',
  1289. 'default' => '0',
  1290. ),
  1291. ),
  1292. 'primary key' => array(
  1293. '0' => 'phenotype_cvterm_id',
  1294. ),
  1295. 'unique keys' => array(
  1296. 'phenotype_cvterm_c1' => array(
  1297. '0' => 'phenotype_id',
  1298. '1' => 'cvterm_id',
  1299. '2' => 'rank',
  1300. ),
  1301. ),
  1302. 'indexes' => array(
  1303. 'phenotype_cvterm_idx1' => array(
  1304. '0' => 'phenotype_id',
  1305. ),
  1306. 'phenotype_cvterm_idx2' => array(
  1307. '0' => 'cvterm_id',
  1308. ),
  1309. ),
  1310. 'foreign keys' => array(
  1311. ),
  1312. );
  1313. return $description;
  1314. }
  1315. /**
  1316. * Implements hook_phenstatement_schema()
  1317. * Purpose: To describe the structure of phenstatement to tripal
  1318. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1319. * @see tripal_core.api.inc: tripal_core_chado_update()
  1320. * @see tripal_core.api.inc: tripal_core_chado_select()
  1321. *
  1322. * @return
  1323. * An array describing the current table
  1324. *
  1325. * @ingroup tripal_schema_api
  1326. *
  1327. */
  1328. function tripal_core_chado_phenstatement_schema () {
  1329. $description = array();
  1330. $description = array(
  1331. 'table' => 'phenstatement',
  1332. // 'description' => 'TODO: please describe this table!',
  1333. 'fields' => array(
  1334. 'phenstatement_id' => array(
  1335. // 'description' => 'TODO: please describe this field!',
  1336. 'type' => 'serial',
  1337. 'not null' => '1',
  1338. ),
  1339. 'genotype_id' => array(
  1340. // 'description' => 'TODO: please describe this field!',
  1341. 'type' => 'int',
  1342. 'not null' => '1',
  1343. ),
  1344. 'environment_id' => array(
  1345. // 'description' => 'TODO: please describe this field!',
  1346. 'type' => 'int',
  1347. 'not null' => '1',
  1348. ),
  1349. 'phenotype_id' => array(
  1350. // 'description' => 'TODO: please describe this field!',
  1351. 'type' => 'int',
  1352. 'not null' => '1',
  1353. ),
  1354. 'type_id' => array(
  1355. // 'description' => 'TODO: please describe this field!',
  1356. 'type' => 'int',
  1357. 'not null' => '1',
  1358. ),
  1359. 'pub_id' => array(
  1360. // 'description' => 'TODO: please describe this field!',
  1361. 'type' => 'int',
  1362. 'not null' => '1',
  1363. ),
  1364. ),
  1365. 'primary key' => array(
  1366. '0' => 'phenstatement_id',
  1367. ),
  1368. 'unique keys' => array(
  1369. 'phenstatement_c1' => array(
  1370. '0' => 'genotype_id',
  1371. '1' => 'phenotype_id',
  1372. '2' => 'environment_id',
  1373. '3' => 'type_id',
  1374. '4' => 'pub_id',
  1375. ),
  1376. ),
  1377. 'indexes' => array(
  1378. 'phenstatement_idx1' => array(
  1379. '0' => 'genotype_id',
  1380. ),
  1381. 'phenstatement_idx2' => array(
  1382. '0' => 'phenotype_id',
  1383. ),
  1384. ),
  1385. 'foreign keys' => array(
  1386. ),
  1387. );
  1388. return $description;
  1389. }
  1390. /**
  1391. * Implements hook_phylonode_schema()
  1392. * Purpose: To describe the structure of phylonode to tripal
  1393. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1394. * @see tripal_core.api.inc: tripal_core_chado_update()
  1395. * @see tripal_core.api.inc: tripal_core_chado_select()
  1396. *
  1397. * @return
  1398. * An array describing the current table
  1399. *
  1400. * @ingroup tripal_schema_api
  1401. *
  1402. */
  1403. function tripal_core_chado_phylonode_schema () {
  1404. $description = array();
  1405. $description = array(
  1406. 'table' => 'phylonode',
  1407. // 'description' => 'TODO: please describe this table!',
  1408. 'fields' => array(
  1409. 'phylonode_id' => array(
  1410. // 'description' => 'TODO: please describe this field!',
  1411. 'type' => 'serial',
  1412. 'not null' => '1',
  1413. ),
  1414. 'phylotree_id' => array(
  1415. // 'description' => 'TODO: please describe this field!',
  1416. 'type' => 'int',
  1417. 'not null' => '1',
  1418. ),
  1419. 'parent_phylonode_id' => array(
  1420. // 'description' => 'TODO: please describe this field!',
  1421. 'type' => 'int',
  1422. 'not null' => '',
  1423. ),
  1424. 'left_idx' => array(
  1425. // 'description' => 'TODO: please describe this field!',
  1426. 'type' => 'int',
  1427. 'not null' => '1',
  1428. ),
  1429. 'right_idx' => array(
  1430. // 'description' => 'TODO: please describe this field!',
  1431. 'type' => 'int',
  1432. 'not null' => '1',
  1433. ),
  1434. 'type_id' => array(
  1435. // 'description' => 'TODO: please describe this field!',
  1436. 'type' => 'int',
  1437. 'not null' => '',
  1438. ),
  1439. 'feature_id' => array(
  1440. // 'description' => 'TODO: please describe this field!',
  1441. 'type' => 'int',
  1442. 'not null' => '',
  1443. ),
  1444. 'label' => array(
  1445. // 'description' => 'TODO: please describe this field!',
  1446. 'type' => 'varchar',
  1447. 'length' => '255',
  1448. 'not null' => '',
  1449. ),
  1450. 'distance' => array(
  1451. // 'description' => 'TODO: please describe this field!',
  1452. 'type' => 'float',
  1453. 'size' => 'big',
  1454. 'not null' => '',
  1455. ),
  1456. ),
  1457. 'primary key' => array(
  1458. '0' => 'phylonode_id',
  1459. ),
  1460. 'unique keys' => array(
  1461. 'phylotree_id' => array(
  1462. '0' => 'phylotree_id',
  1463. '1' => 'left_idx',
  1464. ),
  1465. 'phylonode_phylotree_id_key1' => array(
  1466. '0' => 'phylotree_id',
  1467. '1' => 'right_idx',
  1468. ),
  1469. ),
  1470. 'indexes' => array(
  1471. ),
  1472. 'foreign keys' => array(
  1473. ),
  1474. );
  1475. return $description;
  1476. }
  1477. /**
  1478. * Implements hook_phylonode_dbxref_schema()
  1479. * Purpose: To describe the structure of phylonode_dbxref to tripal
  1480. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1481. * @see tripal_core.api.inc: tripal_core_chado_update()
  1482. * @see tripal_core.api.inc: tripal_core_chado_select()
  1483. *
  1484. * @return
  1485. * An array describing the current table
  1486. *
  1487. * @ingroup tripal_schema_api
  1488. *
  1489. */
  1490. function tripal_core_chado_phylonode_dbxref_schema () {
  1491. $description = array();
  1492. $description = array(
  1493. 'table' => 'phylonode_dbxref',
  1494. // 'description' => 'TODO: please describe this table!',
  1495. 'fields' => array(
  1496. 'phylonode_dbxref_id' => array(
  1497. // 'description' => 'TODO: please describe this field!',
  1498. 'type' => 'serial',
  1499. 'not null' => '1',
  1500. ),
  1501. 'phylonode_id' => array(
  1502. // 'description' => 'TODO: please describe this field!',
  1503. 'type' => 'int',
  1504. 'not null' => '1',
  1505. ),
  1506. 'dbxref_id' => array(
  1507. // 'description' => 'TODO: please describe this field!',
  1508. 'type' => 'int',
  1509. 'not null' => '1',
  1510. ),
  1511. ),
  1512. 'primary key' => array(
  1513. '0' => 'phylonode_dbxref_id',
  1514. ),
  1515. 'unique keys' => array(
  1516. 'phylonode_id' => array(
  1517. '0' => 'phylonode_id',
  1518. '1' => 'dbxref_id',
  1519. ),
  1520. ),
  1521. 'indexes' => array(
  1522. 'phylonode_dbxref_idx1' => array(
  1523. '0' => 'phylonode_id',
  1524. ),
  1525. 'phylonode_dbxref_idx2' => array(
  1526. '0' => 'dbxref_id',
  1527. ),
  1528. ),
  1529. 'foreign keys' => array(
  1530. ),
  1531. );
  1532. return $description;
  1533. }
  1534. /**
  1535. * Implements hook_library_synonym_schema()
  1536. * Purpose: To describe the structure of library_synonym to tripal
  1537. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1538. * @see tripal_core.api.inc: tripal_core_chado_update()
  1539. * @see tripal_core.api.inc: tripal_core_chado_select()
  1540. *
  1541. * @return
  1542. * An array describing the current table
  1543. *
  1544. * @ingroup tripal_schema_api
  1545. *
  1546. */
  1547. function tripal_core_chado_library_synonym_schema () {
  1548. $description = array();
  1549. $description = array(
  1550. 'table' => 'library_synonym',
  1551. // 'description' => 'TODO: please describe this table!',
  1552. 'fields' => array(
  1553. 'library_synonym_id' => array(
  1554. // 'description' => 'TODO: please describe this field!',
  1555. 'type' => 'serial',
  1556. 'not null' => '1',
  1557. ),
  1558. 'synonym_id' => array(
  1559. // 'description' => 'TODO: please describe this field!',
  1560. 'type' => 'int',
  1561. 'not null' => '1',
  1562. ),
  1563. 'library_id' => array(
  1564. // 'description' => 'TODO: please describe this field!',
  1565. 'type' => 'int',
  1566. 'not null' => '1',
  1567. ),
  1568. 'pub_id' => array(
  1569. // 'description' => 'TODO: please describe this field!',
  1570. 'type' => 'int',
  1571. 'not null' => '1',
  1572. ),
  1573. 'is_current' => array(
  1574. // 'description' => 'TODO: please describe this field!',
  1575. 'type' => 'boolean',
  1576. 'not null' => '1',
  1577. 'default' => 'ru',
  1578. ),
  1579. 'is_internal' => array(
  1580. // 'description' => 'TODO: please describe this field!',
  1581. 'type' => 'boolean',
  1582. 'not null' => '1',
  1583. 'default' => 'als',
  1584. ),
  1585. ),
  1586. 'primary key' => array(
  1587. '0' => 'library_synonym_id',
  1588. ),
  1589. 'unique keys' => array(
  1590. 'library_synonym_c1' => array(
  1591. '0' => 'synonym_id',
  1592. '1' => 'library_id',
  1593. '2' => 'pub_id',
  1594. ),
  1595. ),
  1596. 'indexes' => array(
  1597. 'library_synonym_idx1' => array(
  1598. '0' => 'synonym_id',
  1599. ),
  1600. 'library_synonym_idx2' => array(
  1601. '0' => 'library_id',
  1602. ),
  1603. 'library_synonym_idx3' => array(
  1604. '0' => 'pub_id',
  1605. ),
  1606. ),
  1607. 'foreign keys' => array(
  1608. ),
  1609. );
  1610. return $description;
  1611. }
  1612. /**
  1613. * Implements hook_library_pub_schema()
  1614. * Purpose: To describe the structure of library_pub to tripal
  1615. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1616. * @see tripal_core.api.inc: tripal_core_chado_update()
  1617. * @see tripal_core.api.inc: tripal_core_chado_select()
  1618. *
  1619. * @return
  1620. * An array describing the current table
  1621. *
  1622. * @ingroup tripal_schema_api
  1623. *
  1624. */
  1625. function tripal_core_chado_library_pub_schema () {
  1626. $description = array();
  1627. $description = array(
  1628. 'table' => 'library_pub',
  1629. // 'description' => 'TODO: please describe this table!',
  1630. 'fields' => array(
  1631. 'library_pub_id' => array(
  1632. // 'description' => 'TODO: please describe this field!',
  1633. 'type' => 'serial',
  1634. 'not null' => '1',
  1635. ),
  1636. 'library_id' => array(
  1637. // 'description' => 'TODO: please describe this field!',
  1638. 'type' => 'int',
  1639. 'not null' => '1',
  1640. ),
  1641. 'pub_id' => array(
  1642. // 'description' => 'TODO: please describe this field!',
  1643. 'type' => 'int',
  1644. 'not null' => '1',
  1645. ),
  1646. ),
  1647. 'primary key' => array(
  1648. '0' => 'library_pub_id',
  1649. ),
  1650. 'unique keys' => array(
  1651. 'library_pub_c1' => array(
  1652. '0' => 'library_id',
  1653. '1' => 'pub_id',
  1654. ),
  1655. ),
  1656. 'indexes' => array(
  1657. 'library_pub_idx1' => array(
  1658. '0' => 'library_id',
  1659. ),
  1660. 'library_pub_idx2' => array(
  1661. '0' => 'pub_id',
  1662. ),
  1663. ),
  1664. 'foreign keys' => array(
  1665. ),
  1666. );
  1667. return $description;
  1668. }
  1669. /**
  1670. * Implements hook_featureprop_pub_schema()
  1671. * Purpose: To describe the structure of featureprop_pub to tripal
  1672. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1673. * @see tripal_core.api.inc: tripal_core_chado_update()
  1674. * @see tripal_core.api.inc: tripal_core_chado_select()
  1675. *
  1676. * @return
  1677. * An array describing the current table
  1678. *
  1679. * @ingroup tripal_schema_api
  1680. *
  1681. */
  1682. function tripal_core_chado_featureprop_pub_schema () {
  1683. $description = array();
  1684. $description = array(
  1685. 'table' => 'featureprop_pub',
  1686. // 'description' => 'TODO: please describe this table!',
  1687. 'fields' => array(
  1688. 'featureprop_pub_id' => array(
  1689. // 'description' => 'TODO: please describe this field!',
  1690. 'type' => 'serial',
  1691. 'not null' => '1',
  1692. ),
  1693. 'featureprop_id' => array(
  1694. // 'description' => 'TODO: please describe this field!',
  1695. 'type' => 'int',
  1696. 'not null' => '1',
  1697. ),
  1698. 'pub_id' => array(
  1699. // 'description' => 'TODO: please describe this field!',
  1700. 'type' => 'int',
  1701. 'not null' => '1',
  1702. ),
  1703. ),
  1704. 'primary key' => array(
  1705. '0' => 'featureprop_pub_id',
  1706. ),
  1707. 'unique keys' => array(
  1708. 'featureprop_pub_c1' => array(
  1709. '0' => 'featureprop_id',
  1710. '1' => 'pub_id',
  1711. ),
  1712. ),
  1713. 'indexes' => array(
  1714. 'featureprop_pub_idx1' => array(
  1715. '0' => 'featureprop_id',
  1716. ),
  1717. 'featureprop_pub_idx2' => array(
  1718. '0' => 'pub_id',
  1719. ),
  1720. ),
  1721. 'foreign keys' => array(
  1722. ),
  1723. );
  1724. return $description;
  1725. }
  1726. /**
  1727. * Implements hook_featureprop_schema()
  1728. * Purpose: To describe the structure of featureprop to tripal
  1729. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1730. * @see tripal_core.api.inc: tripal_core_chado_update()
  1731. * @see tripal_core.api.inc: tripal_core_chado_select()
  1732. *
  1733. * @return
  1734. * An array describing the current table
  1735. *
  1736. * @ingroup tripal_schema_api
  1737. *
  1738. */
  1739. function tripal_core_chado_featureprop_schema () {
  1740. $description = array();
  1741. $description = array(
  1742. 'table' => 'featureprop',
  1743. // 'description' => 'TODO: please describe this table!',
  1744. 'fields' => array(
  1745. 'featureprop_id' => array(
  1746. // 'description' => 'TODO: please describe this field!',
  1747. 'type' => 'serial',
  1748. 'not null' => '1',
  1749. ),
  1750. 'feature_id' => array(
  1751. // 'description' => 'TODO: please describe this field!',
  1752. 'type' => 'int',
  1753. 'not null' => '1',
  1754. ),
  1755. 'type_id' => array(
  1756. // 'description' => 'TODO: please describe this field!',
  1757. 'type' => 'int',
  1758. 'not null' => '1',
  1759. ),
  1760. 'value' => array(
  1761. // 'description' => 'TODO: please describe this field!',
  1762. 'type' => 'text',
  1763. 'not null' => '',
  1764. ),
  1765. 'rank' => array(
  1766. // 'description' => 'TODO: please describe this field!',
  1767. 'type' => 'int',
  1768. 'not null' => '1',
  1769. 'default' => '0',
  1770. ),
  1771. ),
  1772. 'primary key' => array(
  1773. '0' => 'featureprop_id',
  1774. ),
  1775. 'unique keys' => array(
  1776. 'featureprop_c1' => array(
  1777. '0' => 'feature_id',
  1778. '1' => 'type_id',
  1779. '2' => 'rank',
  1780. ),
  1781. ),
  1782. 'indexes' => array(
  1783. 'featureprop_idx1' => array(
  1784. '0' => 'feature_id',
  1785. ),
  1786. 'featureprop_idx2' => array(
  1787. '0' => 'type_id',
  1788. ),
  1789. ),
  1790. 'foreign keys' => array(
  1791. ),
  1792. );
  1793. return $description;
  1794. }
  1795. /**
  1796. * Implements hook_featurerange_schema()
  1797. * Purpose: To describe the structure of featurerange to tripal
  1798. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1799. * @see tripal_core.api.inc: tripal_core_chado_update()
  1800. * @see tripal_core.api.inc: tripal_core_chado_select()
  1801. *
  1802. * @return
  1803. * An array describing the current table
  1804. *
  1805. * @ingroup tripal_schema_api
  1806. *
  1807. */
  1808. function tripal_core_chado_featurerange_schema () {
  1809. $description = array();
  1810. $description = array(
  1811. 'table' => 'featurerange',
  1812. // 'description' => 'TODO: please describe this table!',
  1813. 'fields' => array(
  1814. 'featurerange_id' => array(
  1815. // 'description' => 'TODO: please describe this field!',
  1816. 'type' => 'serial',
  1817. 'not null' => '1',
  1818. ),
  1819. 'featuremap_id' => array(
  1820. // 'description' => 'TODO: please describe this field!',
  1821. 'type' => 'int',
  1822. 'not null' => '1',
  1823. ),
  1824. 'feature_id' => array(
  1825. // 'description' => 'TODO: please describe this field!',
  1826. 'type' => 'int',
  1827. 'not null' => '1',
  1828. ),
  1829. 'leftstartf_id' => array(
  1830. // 'description' => 'TODO: please describe this field!',
  1831. 'type' => 'int',
  1832. 'not null' => '1',
  1833. ),
  1834. 'leftendf_id' => array(
  1835. // 'description' => 'TODO: please describe this field!',
  1836. 'type' => 'int',
  1837. 'not null' => '',
  1838. ),
  1839. 'rightstartf_id' => array(
  1840. // 'description' => 'TODO: please describe this field!',
  1841. 'type' => 'int',
  1842. 'not null' => '',
  1843. ),
  1844. 'rightendf_id' => array(
  1845. // 'description' => 'TODO: please describe this field!',
  1846. 'type' => 'int',
  1847. 'not null' => '1',
  1848. ),
  1849. 'rangestr' => array(
  1850. // 'description' => 'TODO: please describe this field!',
  1851. 'type' => 'varchar',
  1852. 'length' => '255',
  1853. 'not null' => '',
  1854. ),
  1855. ),
  1856. 'primary key' => array(
  1857. '0' => 'featurerange_id',
  1858. ),
  1859. 'unique keys' => array(
  1860. ),
  1861. 'indexes' => array(
  1862. 'featurerange_idx1' => array(
  1863. '0' => 'featuremap_id',
  1864. ),
  1865. 'featurerange_idx2' => array(
  1866. '0' => 'feature_id',
  1867. ),
  1868. 'featurerange_idx3' => array(
  1869. '0' => 'leftstartf_id',
  1870. ),
  1871. 'featurerange_idx4' => array(
  1872. '0' => 'leftendf_id',
  1873. ),
  1874. 'featurerange_idx5' => array(
  1875. '0' => 'rightstartf_id',
  1876. ),
  1877. 'featurerange_idx6' => array(
  1878. '0' => 'rightendf_id',
  1879. ),
  1880. ),
  1881. 'foreign keys' => array(
  1882. ),
  1883. );
  1884. return $description;
  1885. }
  1886. /**
  1887. * Implements hook_featureset_meets_schema()
  1888. * Purpose: To describe the structure of featureset_meets to tripal
  1889. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1890. * @see tripal_core.api.inc: tripal_core_chado_update()
  1891. * @see tripal_core.api.inc: tripal_core_chado_select()
  1892. *
  1893. * @return
  1894. * An array describing the current table
  1895. *
  1896. * @ingroup tripal_schema_api
  1897. *
  1898. */
  1899. function tripal_core_chado_featureset_meets_schema () {
  1900. $description = array();
  1901. $description = array(
  1902. 'table' => 'featureset_meets',
  1903. // 'description' => 'TODO: please describe this table!',
  1904. 'fields' => array(
  1905. 'subject_id' => array(
  1906. // 'description' => 'TODO: please describe this field!',
  1907. 'type' => 'int',
  1908. 'not null' => '',
  1909. ),
  1910. 'object_id' => array(
  1911. // 'description' => 'TODO: please describe this field!',
  1912. 'type' => 'int',
  1913. 'not null' => '',
  1914. ),
  1915. ),
  1916. 'primary key' => array(
  1917. ),
  1918. 'unique keys' => array(
  1919. ),
  1920. 'indexes' => array(
  1921. ),
  1922. 'foreign keys' => array(
  1923. ),
  1924. );
  1925. return $description;
  1926. }
  1927. /**
  1928. * Implements hook_fnr_type_schema()
  1929. * Purpose: To describe the structure of fnr_type to tripal
  1930. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1931. * @see tripal_core.api.inc: tripal_core_chado_update()
  1932. * @see tripal_core.api.inc: tripal_core_chado_select()
  1933. *
  1934. * @return
  1935. * An array describing the current table
  1936. *
  1937. * @ingroup tripal_schema_api
  1938. *
  1939. */
  1940. function tripal_core_chado_fnr_type_schema () {
  1941. $description = array();
  1942. $description = array(
  1943. 'table' => 'fnr_type',
  1944. // 'description' => 'TODO: please describe this table!',
  1945. 'fields' => array(
  1946. 'feature_id' => array(
  1947. // 'description' => 'TODO: please describe this field!',
  1948. 'type' => 'int',
  1949. 'not null' => '',
  1950. ),
  1951. 'name' => array(
  1952. // 'description' => 'TODO: please describe this field!',
  1953. 'type' => 'varchar',
  1954. 'length' => '255',
  1955. 'not null' => '',
  1956. ),
  1957. 'dbxref_id' => array(
  1958. // 'description' => 'TODO: please describe this field!',
  1959. 'type' => 'int',
  1960. 'not null' => '',
  1961. ),
  1962. 'type' => array(
  1963. // 'description' => 'TODO: please describe this field!',
  1964. 'type' => 'varchar',
  1965. 'length' => '1024',
  1966. 'not null' => '',
  1967. ),
  1968. 'residues' => array(
  1969. // 'description' => 'TODO: please describe this field!',
  1970. 'type' => 'text',
  1971. 'not null' => '',
  1972. ),
  1973. 'seqlen' => array(
  1974. // 'description' => 'TODO: please describe this field!',
  1975. 'type' => 'int',
  1976. 'not null' => '',
  1977. ),
  1978. 'md5checksum' => array(
  1979. // 'description' => 'TODO: please describe this field!',
  1980. 'type' => 'char',
  1981. 'length' => '32',
  1982. 'not null' => '',
  1983. ),
  1984. 'type_id' => array(
  1985. // 'description' => 'TODO: please describe this field!',
  1986. 'type' => 'int',
  1987. 'not null' => '',
  1988. ),
  1989. 'timeaccessioned' => array(
  1990. // 'description' => 'TODO: please describe this field!',
  1991. 'type' => 'datetime',
  1992. 'not null' => '',
  1993. ),
  1994. 'timelastmodified' => array(
  1995. // 'description' => 'TODO: please describe this field!',
  1996. 'type' => 'datetime',
  1997. 'not null' => '',
  1998. ),
  1999. ),
  2000. 'primary key' => array(
  2001. ),
  2002. 'unique keys' => array(
  2003. ),
  2004. 'indexes' => array(
  2005. ),
  2006. 'foreign keys' => array(
  2007. ),
  2008. );
  2009. return $description;
  2010. }
  2011. /**
  2012. * Implements hook_featurepos_schema()
  2013. * Purpose: To describe the structure of featurepos to tripal
  2014. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2015. * @see tripal_core.api.inc: tripal_core_chado_update()
  2016. * @see tripal_core.api.inc: tripal_core_chado_select()
  2017. *
  2018. * @return
  2019. * An array describing the current table
  2020. *
  2021. * @ingroup tripal_schema_api
  2022. *
  2023. */
  2024. function tripal_core_chado_featurepos_schema () {
  2025. $description = array();
  2026. $description = array(
  2027. 'table' => 'featurepos',
  2028. // 'description' => 'TODO: please describe this table!',
  2029. 'fields' => array(
  2030. 'featurepos_id' => array(
  2031. // 'description' => 'TODO: please describe this field!',
  2032. 'type' => 'serial',
  2033. 'not null' => '1',
  2034. ),
  2035. 'featuremap_id' => array(
  2036. // 'description' => 'TODO: please describe this field!',
  2037. 'type' => 'serial',
  2038. 'not null' => '1',
  2039. ),
  2040. 'feature_id' => array(
  2041. // 'description' => 'TODO: please describe this field!',
  2042. 'type' => 'int',
  2043. 'not null' => '1',
  2044. ),
  2045. 'map_feature_id' => array(
  2046. // 'description' => 'TODO: please describe this field!',
  2047. 'type' => 'int',
  2048. 'not null' => '1',
  2049. ),
  2050. 'mappos' => array(
  2051. // 'description' => 'TODO: please describe this field!',
  2052. 'type' => 'float',
  2053. 'size' => 'big',
  2054. 'not null' => '1',
  2055. ),
  2056. ),
  2057. 'primary key' => array(
  2058. '0' => 'featurepos_id',
  2059. ),
  2060. 'unique keys' => array(
  2061. ),
  2062. 'indexes' => array(
  2063. 'featurepos_idx1' => array(
  2064. '0' => 'featuremap_id',
  2065. ),
  2066. 'featurepos_idx2' => array(
  2067. '0' => 'feature_id',
  2068. ),
  2069. 'featurepos_idx3' => array(
  2070. '0' => 'map_feature_id',
  2071. ),
  2072. ),
  2073. 'foreign keys' => array(
  2074. ),
  2075. );
  2076. return $description;
  2077. }
  2078. /**
  2079. * Implements hook_featuremap_pub_schema()
  2080. * Purpose: To describe the structure of featuremap_pub to tripal
  2081. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2082. * @see tripal_core.api.inc: tripal_core_chado_update()
  2083. * @see tripal_core.api.inc: tripal_core_chado_select()
  2084. *
  2085. * @return
  2086. * An array describing the current table
  2087. *
  2088. * @ingroup tripal_schema_api
  2089. *
  2090. */
  2091. function tripal_core_chado_featuremap_pub_schema () {
  2092. $description = array();
  2093. $description = array(
  2094. 'table' => 'featuremap_pub',
  2095. // 'description' => 'TODO: please describe this table!',
  2096. 'fields' => array(
  2097. 'featuremap_pub_id' => array(
  2098. // 'description' => 'TODO: please describe this field!',
  2099. 'type' => 'serial',
  2100. 'not null' => '1',
  2101. ),
  2102. 'featuremap_id' => array(
  2103. // 'description' => 'TODO: please describe this field!',
  2104. 'type' => 'int',
  2105. 'not null' => '1',
  2106. ),
  2107. 'pub_id' => array(
  2108. // 'description' => 'TODO: please describe this field!',
  2109. 'type' => 'int',
  2110. 'not null' => '1',
  2111. ),
  2112. ),
  2113. 'primary key' => array(
  2114. '0' => 'featuremap_pub_id',
  2115. ),
  2116. 'unique keys' => array(
  2117. ),
  2118. 'indexes' => array(
  2119. 'featuremap_pub_idx1' => array(
  2120. '0' => 'featuremap_id',
  2121. ),
  2122. 'featuremap_pub_idx2' => array(
  2123. '0' => 'pub_id',
  2124. ),
  2125. ),
  2126. 'foreign keys' => array(
  2127. ),
  2128. );
  2129. return $description;
  2130. }
  2131. /**
  2132. * Implements hook_feature_union_schema()
  2133. * Purpose: To describe the structure of feature_union to tripal
  2134. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2135. * @see tripal_core.api.inc: tripal_core_chado_update()
  2136. * @see tripal_core.api.inc: tripal_core_chado_select()
  2137. *
  2138. * @return
  2139. * An array describing the current table
  2140. *
  2141. * @ingroup tripal_schema_api
  2142. *
  2143. */
  2144. function tripal_core_chado_feature_union_schema () {
  2145. $description = array();
  2146. $description = array(
  2147. 'table' => 'feature_union',
  2148. // 'description' => 'TODO: please describe this table!',
  2149. 'fields' => array(
  2150. 'subject_id' => array(
  2151. // 'description' => 'TODO: please describe this field!',
  2152. 'type' => 'int',
  2153. 'not null' => '',
  2154. ),
  2155. 'object_id' => array(
  2156. // 'description' => 'TODO: please describe this field!',
  2157. 'type' => 'int',
  2158. 'not null' => '',
  2159. ),
  2160. 'srcfeature_id' => array(
  2161. // 'description' => 'TODO: please describe this field!',
  2162. 'type' => 'int',
  2163. 'not null' => '',
  2164. ),
  2165. 'subject_strand' => array(
  2166. // 'description' => 'TODO: please describe this field!',
  2167. 'type' => 'int',
  2168. 'size' => 'small',
  2169. 'not null' => '',
  2170. ),
  2171. 'object_strand' => array(
  2172. // 'description' => 'TODO: please describe this field!',
  2173. 'type' => 'int',
  2174. 'size' => 'small',
  2175. 'not null' => '',
  2176. ),
  2177. 'fmin' => array(
  2178. // 'description' => 'TODO: please describe this field!',
  2179. 'type' => 'int',
  2180. 'not null' => '',
  2181. ),
  2182. 'fmax' => array(
  2183. // 'description' => 'TODO: please describe this field!',
  2184. 'type' => 'int',
  2185. 'not null' => '',
  2186. ),
  2187. ),
  2188. 'primary key' => array(
  2189. ),
  2190. 'unique keys' => array(
  2191. ),
  2192. 'indexes' => array(
  2193. ),
  2194. 'foreign keys' => array(
  2195. ),
  2196. );
  2197. return $description;
  2198. }
  2199. /**
  2200. * Implements hook_featureloc_schema()
  2201. * Purpose: To describe the structure of featureloc to tripal
  2202. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2203. * @see tripal_core.api.inc: tripal_core_chado_update()
  2204. * @see tripal_core.api.inc: tripal_core_chado_select()
  2205. *
  2206. * @return
  2207. * An array describing the current table
  2208. *
  2209. * @ingroup tripal_schema_api
  2210. *
  2211. */
  2212. function tripal_core_chado_featureloc_schema () {
  2213. $description = array();
  2214. $description = array(
  2215. 'table' => 'featureloc',
  2216. // 'description' => 'TODO: please describe this table!',
  2217. 'fields' => array(
  2218. 'featureloc_id' => array(
  2219. // 'description' => 'TODO: please describe this field!',
  2220. 'type' => 'serial',
  2221. 'not null' => '1',
  2222. ),
  2223. 'feature_id' => array(
  2224. // 'description' => 'TODO: please describe this field!',
  2225. 'type' => 'int',
  2226. 'not null' => '1',
  2227. ),
  2228. 'srcfeature_id' => array(
  2229. // 'description' => 'TODO: please describe this field!',
  2230. 'type' => 'int',
  2231. 'not null' => '',
  2232. ),
  2233. 'fmin' => array(
  2234. // 'description' => 'TODO: please describe this field!',
  2235. 'type' => 'int',
  2236. 'not null' => '',
  2237. ),
  2238. 'is_fmin_partial' => array(
  2239. // 'description' => 'TODO: please describe this field!',
  2240. 'type' => 'boolean',
  2241. 'not null' => '1',
  2242. 'default' => 'als',
  2243. ),
  2244. 'fmax' => array(
  2245. // 'description' => 'TODO: please describe this field!',
  2246. 'type' => 'int',
  2247. 'not null' => '',
  2248. ),
  2249. 'is_fmax_partial' => array(
  2250. // 'description' => 'TODO: please describe this field!',
  2251. 'type' => 'boolean',
  2252. 'not null' => '1',
  2253. 'default' => 'als',
  2254. ),
  2255. 'strand' => array(
  2256. // 'description' => 'TODO: please describe this field!',
  2257. 'type' => 'int',
  2258. 'size' => 'small',
  2259. 'not null' => '',
  2260. ),
  2261. 'phase' => array(
  2262. // 'description' => 'TODO: please describe this field!',
  2263. 'type' => 'int',
  2264. 'not null' => '',
  2265. ),
  2266. 'residue_info' => array(
  2267. // 'description' => 'TODO: please describe this field!',
  2268. 'type' => 'text',
  2269. 'not null' => '',
  2270. ),
  2271. 'locgroup' => array(
  2272. // 'description' => 'TODO: please describe this field!',
  2273. 'type' => 'int',
  2274. 'not null' => '1',
  2275. 'default' => '0',
  2276. ),
  2277. 'rank' => array(
  2278. // 'description' => 'TODO: please describe this field!',
  2279. 'type' => 'int',
  2280. 'not null' => '1',
  2281. 'default' => '0',
  2282. ),
  2283. ),
  2284. 'primary key' => array(
  2285. '0' => 'featureloc_id',
  2286. ),
  2287. 'unique keys' => array(
  2288. 'featureloc_c1' => array(
  2289. '0' => 'feature_id',
  2290. '1' => 'locgroup',
  2291. '2' => 'rank',
  2292. ),
  2293. ),
  2294. 'indexes' => array(
  2295. 'binloc_boxrange' => array(
  2296. '0' => 'fmin',
  2297. ),
  2298. 'binloc_boxrange_src' => array(
  2299. '0' => 'srcfeature_id',
  2300. '1' => 'fmin',
  2301. ),
  2302. 'featureloc_idx1' => array(
  2303. '0' => 'feature_id',
  2304. ),
  2305. 'featureloc_idx2' => array(
  2306. '0' => 'srcfeature_id',
  2307. ),
  2308. 'featureloc_idx3' => array(
  2309. '0' => 'srcfeature_id',
  2310. '1' => 'fmin',
  2311. '2' => 'fmax',
  2312. ),
  2313. ),
  2314. 'foreign keys' => array(
  2315. ),
  2316. );
  2317. return $description;
  2318. }
  2319. /**
  2320. * Implements hook_featureloc_pub_schema()
  2321. * Purpose: To describe the structure of featureloc_pub to tripal
  2322. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2323. * @see tripal_core.api.inc: tripal_core_chado_update()
  2324. * @see tripal_core.api.inc: tripal_core_chado_select()
  2325. *
  2326. * @return
  2327. * An array describing the current table
  2328. *
  2329. * @ingroup tripal_schema_api
  2330. *
  2331. */
  2332. function tripal_core_chado_featureloc_pub_schema () {
  2333. $description = array();
  2334. $description = array(
  2335. 'table' => 'featureloc_pub',
  2336. // 'description' => 'TODO: please describe this table!',
  2337. 'fields' => array(
  2338. 'featureloc_pub_id' => array(
  2339. // 'description' => 'TODO: please describe this field!',
  2340. 'type' => 'serial',
  2341. 'not null' => '1',
  2342. ),
  2343. 'featureloc_id' => array(
  2344. // 'description' => 'TODO: please describe this field!',
  2345. 'type' => 'int',
  2346. 'not null' => '1',
  2347. ),
  2348. 'pub_id' => array(
  2349. // 'description' => 'TODO: please describe this field!',
  2350. 'type' => 'int',
  2351. 'not null' => '1',
  2352. ),
  2353. ),
  2354. 'primary key' => array(
  2355. '0' => 'featureloc_pub_id',
  2356. ),
  2357. 'unique keys' => array(
  2358. 'featureloc_pub_c1' => array(
  2359. '0' => 'featureloc_id',
  2360. '1' => 'pub_id',
  2361. ),
  2362. ),
  2363. 'indexes' => array(
  2364. 'featureloc_pub_idx1' => array(
  2365. '0' => 'featureloc_id',
  2366. ),
  2367. 'featureloc_pub_idx2' => array(
  2368. '0' => 'pub_id',
  2369. ),
  2370. ),
  2371. 'foreign keys' => array(
  2372. ),
  2373. );
  2374. return $description;
  2375. }
  2376. /**
  2377. * Implements hook_featuremap_schema()
  2378. * Purpose: To describe the structure of featuremap to tripal
  2379. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2380. * @see tripal_core.api.inc: tripal_core_chado_update()
  2381. * @see tripal_core.api.inc: tripal_core_chado_select()
  2382. *
  2383. * @return
  2384. * An array describing the current table
  2385. *
  2386. * @ingroup tripal_schema_api
  2387. *
  2388. */
  2389. function tripal_core_chado_featuremap_schema () {
  2390. $description = array();
  2391. $description = array(
  2392. 'table' => 'featuremap',
  2393. // 'description' => 'TODO: please describe this table!',
  2394. 'fields' => array(
  2395. 'featuremap_id' => array(
  2396. // 'description' => 'TODO: please describe this field!',
  2397. 'type' => 'serial',
  2398. 'not null' => '1',
  2399. ),
  2400. 'name' => array(
  2401. // 'description' => 'TODO: please describe this field!',
  2402. 'type' => 'varchar',
  2403. 'length' => '255',
  2404. 'not null' => '',
  2405. ),
  2406. 'description' => array(
  2407. // 'description' => 'TODO: please describe this field!',
  2408. 'type' => 'text',
  2409. 'not null' => '',
  2410. ),
  2411. 'unittype_id' => array(
  2412. // 'description' => 'TODO: please describe this field!',
  2413. 'type' => 'int',
  2414. 'not null' => '',
  2415. ),
  2416. ),
  2417. 'primary key' => array(
  2418. '0' => 'featuremap_id',
  2419. ),
  2420. 'unique keys' => array(
  2421. 'featuremap_c1' => array(
  2422. '0' => 'name',
  2423. ),
  2424. ),
  2425. 'indexes' => array(
  2426. ),
  2427. 'foreign keys' => array(
  2428. ),
  2429. );
  2430. return $description;
  2431. }
  2432. /**
  2433. * Implements hook_fp_key_schema()
  2434. * Purpose: To describe the structure of fp_key to tripal
  2435. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2436. * @see tripal_core.api.inc: tripal_core_chado_update()
  2437. * @see tripal_core.api.inc: tripal_core_chado_select()
  2438. *
  2439. * @return
  2440. * An array describing the current table
  2441. *
  2442. * @ingroup tripal_schema_api
  2443. *
  2444. */
  2445. function tripal_core_chado_fp_key_schema () {
  2446. $description = array();
  2447. $description = array(
  2448. 'table' => 'fp_key',
  2449. // 'description' => 'TODO: please describe this table!',
  2450. 'fields' => array(
  2451. 'feature_id' => array(
  2452. // 'description' => 'TODO: please describe this field!',
  2453. 'type' => 'int',
  2454. 'not null' => '',
  2455. ),
  2456. 'pkey' => array(
  2457. // 'description' => 'TODO: please describe this field!',
  2458. 'type' => 'varchar',
  2459. 'length' => '1024',
  2460. 'not null' => '',
  2461. ),
  2462. 'value' => array(
  2463. // 'description' => 'TODO: please describe this field!',
  2464. 'type' => 'text',
  2465. 'not null' => '',
  2466. ),
  2467. ),
  2468. 'primary key' => array(
  2469. ),
  2470. 'unique keys' => array(
  2471. ),
  2472. 'indexes' => array(
  2473. ),
  2474. 'foreign keys' => array(
  2475. ),
  2476. );
  2477. return $description;
  2478. }
  2479. /**
  2480. * Implements hook_genotype_schema()
  2481. * Purpose: To describe the structure of genotype to tripal
  2482. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2483. * @see tripal_core.api.inc: tripal_core_chado_update()
  2484. * @see tripal_core.api.inc: tripal_core_chado_select()
  2485. *
  2486. * @return
  2487. * An array describing the current table
  2488. *
  2489. * @ingroup tripal_schema_api
  2490. *
  2491. */
  2492. function tripal_core_chado_genotype_schema () {
  2493. $description = array();
  2494. $description = array(
  2495. 'table' => 'genotype',
  2496. // 'description' => 'TODO: please describe this table!',
  2497. 'fields' => array(
  2498. 'genotype_id' => array(
  2499. // 'description' => 'TODO: please describe this field!',
  2500. 'type' => 'serial',
  2501. 'not null' => '1',
  2502. ),
  2503. 'name' => array(
  2504. // 'description' => 'TODO: please describe this field!',
  2505. 'type' => 'text',
  2506. 'not null' => '',
  2507. ),
  2508. 'uniquename' => array(
  2509. // 'description' => 'TODO: please describe this field!',
  2510. 'type' => 'text',
  2511. 'not null' => '1',
  2512. ),
  2513. 'description' => array(
  2514. // 'description' => 'TODO: please describe this field!',
  2515. 'type' => 'varchar',
  2516. 'length' => '255',
  2517. 'not null' => '',
  2518. ),
  2519. ),
  2520. 'primary key' => array(
  2521. '0' => 'genotype_id',
  2522. ),
  2523. 'unique keys' => array(
  2524. 'genotype_c1' => array(
  2525. '0' => 'uniquename',
  2526. ),
  2527. ),
  2528. 'indexes' => array(
  2529. 'genotype_idx1' => array(
  2530. '0' => 'uniquename',
  2531. ),
  2532. 'genotype_idx2' => array(
  2533. '0' => 'name',
  2534. ),
  2535. ),
  2536. 'foreign keys' => array(
  2537. ),
  2538. );
  2539. return $description;
  2540. }
  2541. /**
  2542. * Implements hook_library_cvterm_schema()
  2543. * Purpose: To describe the structure of library_cvterm to tripal
  2544. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2545. * @see tripal_core.api.inc: tripal_core_chado_update()
  2546. * @see tripal_core.api.inc: tripal_core_chado_select()
  2547. *
  2548. * @return
  2549. * An array describing the current table
  2550. *
  2551. * @ingroup tripal_schema_api
  2552. *
  2553. */
  2554. function tripal_core_chado_library_cvterm_schema () {
  2555. $description = array();
  2556. $description = array(
  2557. 'table' => 'library_cvterm',
  2558. // 'description' => 'TODO: please describe this table!',
  2559. 'fields' => array(
  2560. 'library_cvterm_id' => array(
  2561. // 'description' => 'TODO: please describe this field!',
  2562. 'type' => 'serial',
  2563. 'not null' => '1',
  2564. ),
  2565. 'library_id' => array(
  2566. // 'description' => 'TODO: please describe this field!',
  2567. 'type' => 'int',
  2568. 'not null' => '1',
  2569. ),
  2570. 'cvterm_id' => array(
  2571. // 'description' => 'TODO: please describe this field!',
  2572. 'type' => 'int',
  2573. 'not null' => '1',
  2574. ),
  2575. 'pub_id' => array(
  2576. // 'description' => 'TODO: please describe this field!',
  2577. 'type' => 'int',
  2578. 'not null' => '1',
  2579. ),
  2580. ),
  2581. 'primary key' => array(
  2582. '0' => 'library_cvterm_id',
  2583. ),
  2584. 'unique keys' => array(
  2585. 'library_cvterm_c1' => array(
  2586. '0' => 'library_id',
  2587. '1' => 'cvterm_id',
  2588. '2' => 'pub_id',
  2589. ),
  2590. ),
  2591. 'indexes' => array(
  2592. 'library_cvterm_idx1' => array(
  2593. '0' => 'library_id',
  2594. ),
  2595. 'library_cvterm_idx2' => array(
  2596. '0' => 'cvterm_id',
  2597. ),
  2598. 'library_cvterm_idx3' => array(
  2599. '0' => 'pub_id',
  2600. ),
  2601. ),
  2602. 'foreign keys' => array(
  2603. ),
  2604. );
  2605. return $description;
  2606. }
  2607. /**
  2608. * Implements hook_library_dbxref_schema()
  2609. * Purpose: To describe the structure of library_dbxref to tripal
  2610. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2611. * @see tripal_core.api.inc: tripal_core_chado_update()
  2612. * @see tripal_core.api.inc: tripal_core_chado_select()
  2613. *
  2614. * @return
  2615. * An array describing the current table
  2616. *
  2617. * @ingroup tripal_schema_api
  2618. *
  2619. */
  2620. function tripal_core_chado_library_dbxref_schema () {
  2621. $description = array();
  2622. $description = array(
  2623. 'table' => 'library_dbxref',
  2624. // 'description' => 'TODO: please describe this table!',
  2625. 'fields' => array(
  2626. 'library_dbxref_id' => array(
  2627. // 'description' => 'TODO: please describe this field!',
  2628. 'type' => 'serial',
  2629. 'not null' => '1',
  2630. ),
  2631. 'library_id' => array(
  2632. // 'description' => 'TODO: please describe this field!',
  2633. 'type' => 'int',
  2634. 'not null' => '1',
  2635. ),
  2636. 'dbxref_id' => array(
  2637. // 'description' => 'TODO: please describe this field!',
  2638. 'type' => 'int',
  2639. 'not null' => '1',
  2640. ),
  2641. 'is_current' => array(
  2642. // 'description' => 'TODO: please describe this field!',
  2643. 'type' => 'boolean',
  2644. 'not null' => '1',
  2645. 'default' => 'ru',
  2646. ),
  2647. ),
  2648. 'primary key' => array(
  2649. '0' => 'library_dbxref_id',
  2650. ),
  2651. 'unique keys' => array(
  2652. 'library_dbxref_c1' => array(
  2653. '0' => 'library_id',
  2654. '1' => 'dbxref_id',
  2655. ),
  2656. ),
  2657. 'indexes' => array(
  2658. 'library_dbxref_idx1' => array(
  2659. '0' => 'library_id',
  2660. ),
  2661. 'library_dbxref_idx2' => array(
  2662. '0' => 'dbxref_id',
  2663. ),
  2664. ),
  2665. 'foreign keys' => array(
  2666. ),
  2667. );
  2668. return $description;
  2669. }
  2670. /**
  2671. * Implements hook_library_feature_schema()
  2672. * Purpose: To describe the structure of library_feature to tripal
  2673. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2674. * @see tripal_core.api.inc: tripal_core_chado_update()
  2675. * @see tripal_core.api.inc: tripal_core_chado_select()
  2676. *
  2677. * @return
  2678. * An array describing the current table
  2679. *
  2680. * @ingroup tripal_schema_api
  2681. *
  2682. */
  2683. function tripal_core_chado_library_feature_schema () {
  2684. $description = array();
  2685. $description = array(
  2686. 'table' => 'library_feature',
  2687. // 'description' => 'TODO: please describe this table!',
  2688. 'fields' => array(
  2689. 'library_feature_id' => array(
  2690. // 'description' => 'TODO: please describe this field!',
  2691. 'type' => 'serial',
  2692. 'not null' => '1',
  2693. ),
  2694. 'library_id' => array(
  2695. // 'description' => 'TODO: please describe this field!',
  2696. 'type' => 'int',
  2697. 'not null' => '1',
  2698. ),
  2699. 'feature_id' => array(
  2700. // 'description' => 'TODO: please describe this field!',
  2701. 'type' => 'int',
  2702. 'not null' => '1',
  2703. ),
  2704. ),
  2705. 'primary key' => array(
  2706. '0' => 'library_feature_id',
  2707. ),
  2708. 'unique keys' => array(
  2709. 'library_feature_c1' => array(
  2710. '0' => 'library_id',
  2711. '1' => 'feature_id',
  2712. ),
  2713. ),
  2714. 'indexes' => array(
  2715. 'library_feature_idx1' => array(
  2716. '0' => 'library_id',
  2717. ),
  2718. 'library_feature_idx2' => array(
  2719. '0' => 'feature_id',
  2720. ),
  2721. ),
  2722. 'foreign keys' => array(
  2723. ),
  2724. );
  2725. return $description;
  2726. }
  2727. /**
  2728. * Implements hook_library_feature_count_schema()
  2729. * Purpose: To describe the structure of library_feature_count to tripal
  2730. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2731. * @see tripal_core.api.inc: tripal_core_chado_update()
  2732. * @see tripal_core.api.inc: tripal_core_chado_select()
  2733. *
  2734. * @return
  2735. * An array describing the current table
  2736. *
  2737. * @ingroup tripal_schema_api
  2738. *
  2739. */
  2740. function tripal_core_chado_library_feature_count_schema () {
  2741. $description = array();
  2742. $description = array(
  2743. 'table' => 'library_feature_count',
  2744. // 'description' => 'TODO: please describe this table!',
  2745. 'fields' => array(
  2746. 'library_id' => array(
  2747. // 'description' => 'TODO: please describe this field!',
  2748. 'type' => 'int',
  2749. 'not null' => '',
  2750. ),
  2751. 'name' => array(
  2752. // 'description' => 'TODO: please describe this field!',
  2753. 'type' => 'varchar',
  2754. 'length' => '255',
  2755. 'not null' => '',
  2756. ),
  2757. 'num_features' => array(
  2758. // 'description' => 'TODO: please describe this field!',
  2759. 'type' => 'int',
  2760. 'not null' => '',
  2761. ),
  2762. 'feature_type' => array(
  2763. // 'description' => 'TODO: please describe this field!',
  2764. 'type' => 'varchar',
  2765. 'length' => '255',
  2766. 'not null' => '',
  2767. ),
  2768. ),
  2769. 'primary key' => array(
  2770. ),
  2771. 'unique keys' => array(
  2772. 'library_feature_count_index' => array(
  2773. '0' => 'library_id',
  2774. ),
  2775. ),
  2776. 'indexes' => array(
  2777. ),
  2778. 'foreign keys' => array(
  2779. ),
  2780. );
  2781. return $description;
  2782. }
  2783. /**
  2784. * Implements hook_library_schema()
  2785. * Purpose: To describe the structure of library to tripal
  2786. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2787. * @see tripal_core.api.inc: tripal_core_chado_update()
  2788. * @see tripal_core.api.inc: tripal_core_chado_select()
  2789. *
  2790. * @return
  2791. * An array describing the current table
  2792. *
  2793. * @ingroup tripal_schema_api
  2794. *
  2795. */
  2796. function tripal_core_chado_library_schema () {
  2797. $description = array();
  2798. $description = array(
  2799. 'table' => 'library',
  2800. // 'description' => 'TODO: please describe this table!',
  2801. 'fields' => array(
  2802. 'library_id' => array(
  2803. // 'description' => 'TODO: please describe this field!',
  2804. 'type' => 'serial',
  2805. 'not null' => '1',
  2806. ),
  2807. 'organism_id' => array(
  2808. // 'description' => 'TODO: please describe this field!',
  2809. 'type' => 'int',
  2810. 'not null' => '1',
  2811. ),
  2812. 'name' => array(
  2813. // 'description' => 'TODO: please describe this field!',
  2814. 'type' => 'varchar',
  2815. 'length' => '255',
  2816. 'not null' => '',
  2817. ),
  2818. 'uniquename' => array(
  2819. // 'description' => 'TODO: please describe this field!',
  2820. 'type' => 'text',
  2821. 'not null' => '1',
  2822. ),
  2823. 'type_id' => array(
  2824. // 'description' => 'TODO: please describe this field!',
  2825. 'type' => 'int',
  2826. 'not null' => '1',
  2827. ),
  2828. 'is_obsolete' => array(
  2829. // 'description' => 'TODO: please describe this field!',
  2830. 'type' => 'int',
  2831. 'not null' => '1',
  2832. 'default' => '0',
  2833. ),
  2834. 'timeaccessioned' => array(
  2835. // 'description' => 'TODO: please describe this field!',
  2836. 'type' => 'datetime',
  2837. 'not null' => '1',
  2838. 'default' => 'ow(',
  2839. ),
  2840. 'timelastmodified' => array(
  2841. // 'description' => 'TODO: please describe this field!',
  2842. 'type' => 'datetime',
  2843. 'not null' => '1',
  2844. 'default' => 'ow(',
  2845. ),
  2846. ),
  2847. 'primary key' => array(
  2848. '0' => 'library_id',
  2849. ),
  2850. 'unique keys' => array(
  2851. 'library_c1' => array(
  2852. '0' => 'organism_id',
  2853. '1' => 'uniquename',
  2854. '2' => 'type_id',
  2855. ),
  2856. ),
  2857. 'indexes' => array(
  2858. 'library_idx1' => array(
  2859. '0' => 'organism_id',
  2860. ),
  2861. 'library_idx2' => array(
  2862. '0' => 'type_id',
  2863. ),
  2864. 'library_idx3' => array(
  2865. '0' => 'uniquename',
  2866. ),
  2867. 'library_name_ind1' => array(
  2868. '0' => 'name',
  2869. ),
  2870. ),
  2871. 'foreign keys' => array(
  2872. ),
  2873. );
  2874. return $description;
  2875. }
  2876. /**
  2877. * Implements hook_intronloc_view_schema()
  2878. * Purpose: To describe the structure of intronloc_view to tripal
  2879. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2880. * @see tripal_core.api.inc: tripal_core_chado_update()
  2881. * @see tripal_core.api.inc: tripal_core_chado_select()
  2882. *
  2883. * @return
  2884. * An array describing the current table
  2885. *
  2886. * @ingroup tripal_schema_api
  2887. *
  2888. */
  2889. function tripal_core_chado_intronloc_view_schema () {
  2890. $description = array();
  2891. $description = array(
  2892. 'table' => 'intronloc_view',
  2893. // 'description' => 'TODO: please describe this table!',
  2894. 'fields' => array(
  2895. 'exon1_id' => array(
  2896. // 'description' => 'TODO: please describe this field!',
  2897. 'type' => 'int',
  2898. 'not null' => '',
  2899. ),
  2900. 'exon2_id' => array(
  2901. // 'description' => 'TODO: please describe this field!',
  2902. 'type' => 'int',
  2903. 'not null' => '',
  2904. ),
  2905. 'fmin' => array(
  2906. // 'description' => 'TODO: please describe this field!',
  2907. 'type' => 'int',
  2908. 'not null' => '',
  2909. ),
  2910. 'fmax' => array(
  2911. // 'description' => 'TODO: please describe this field!',
  2912. 'type' => 'int',
  2913. 'not null' => '',
  2914. ),
  2915. 'strand' => array(
  2916. // 'description' => 'TODO: please describe this field!',
  2917. 'type' => 'int',
  2918. 'size' => 'small',
  2919. 'not null' => '',
  2920. ),
  2921. 'srcfeature_id' => array(
  2922. // 'description' => 'TODO: please describe this field!',
  2923. 'type' => 'int',
  2924. 'not null' => '',
  2925. ),
  2926. ),
  2927. 'primary key' => array(
  2928. ),
  2929. 'unique keys' => array(
  2930. ),
  2931. 'indexes' => array(
  2932. ),
  2933. 'foreign keys' => array(
  2934. ),
  2935. );
  2936. return $description;
  2937. }
  2938. /**
  2939. * Implements hook_gff3atts_schema()
  2940. * Purpose: To describe the structure of gff3atts to tripal
  2941. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2942. * @see tripal_core.api.inc: tripal_core_chado_update()
  2943. * @see tripal_core.api.inc: tripal_core_chado_select()
  2944. *
  2945. * @return
  2946. * An array describing the current table
  2947. *
  2948. * @ingroup tripal_schema_api
  2949. *
  2950. */
  2951. function tripal_core_chado_gff3atts_schema () {
  2952. $description = array();
  2953. $description = array(
  2954. 'table' => 'gff3atts',
  2955. // 'description' => 'TODO: please describe this table!',
  2956. 'fields' => array(
  2957. 'feature_id' => array(
  2958. // 'description' => 'TODO: please describe this field!',
  2959. 'type' => 'int',
  2960. 'not null' => '',
  2961. ),
  2962. 'type' => array(
  2963. // 'description' => 'TODO: please describe this field!',
  2964. 'type' => 'text',
  2965. 'not null' => '',
  2966. ),
  2967. 'attribute' => array(
  2968. // 'description' => 'TODO: please describe this field!',
  2969. 'type' => 'varchar',
  2970. 'not null' => '',
  2971. ),
  2972. ),
  2973. 'primary key' => array(
  2974. ),
  2975. 'unique keys' => array(
  2976. ),
  2977. 'indexes' => array(
  2978. ),
  2979. 'foreign keys' => array(
  2980. ),
  2981. );
  2982. return $description;
  2983. }
  2984. /**
  2985. * Implements hook_gff3view_schema()
  2986. * Purpose: To describe the structure of gff3view to tripal
  2987. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2988. * @see tripal_core.api.inc: tripal_core_chado_update()
  2989. * @see tripal_core.api.inc: tripal_core_chado_select()
  2990. *
  2991. * @return
  2992. * An array describing the current table
  2993. *
  2994. * @ingroup tripal_schema_api
  2995. *
  2996. */
  2997. function tripal_core_chado_gff3view_schema () {
  2998. $description = array();
  2999. $description = array(
  3000. 'table' => 'gff3view',
  3001. // 'description' => 'TODO: please describe this table!',
  3002. 'fields' => array(
  3003. 'feature_id' => array(
  3004. // 'description' => 'TODO: please describe this field!',
  3005. 'type' => 'int',
  3006. 'not null' => '',
  3007. ),
  3008. 'ref' => array(
  3009. // 'description' => 'TODO: please describe this field!',
  3010. 'type' => 'varchar',
  3011. 'length' => '255',
  3012. 'not null' => '',
  3013. ),
  3014. 'source' => array(
  3015. // 'description' => 'TODO: please describe this field!',
  3016. 'type' => 'varchar',
  3017. 'length' => '255',
  3018. 'not null' => '',
  3019. ),
  3020. 'type' => array(
  3021. // 'description' => 'TODO: please describe this field!',
  3022. 'type' => 'varchar',
  3023. 'length' => '1024',
  3024. 'not null' => '',
  3025. ),
  3026. 'fstart' => array(
  3027. // 'description' => 'TODO: please describe this field!',
  3028. 'type' => 'int',
  3029. 'not null' => '',
  3030. ),
  3031. 'fend' => array(
  3032. // 'description' => 'TODO: please describe this field!',
  3033. 'type' => 'int',
  3034. 'not null' => '',
  3035. ),
  3036. 'score' => array(
  3037. // 'description' => 'TODO: please describe this field!',
  3038. 'type' => 'float',
  3039. 'size' => 'big',
  3040. 'not null' => '',
  3041. ),
  3042. 'strand' => array(
  3043. // 'description' => 'TODO: please describe this field!',
  3044. 'type' => 'int',
  3045. 'size' => 'small',
  3046. 'not null' => '',
  3047. ),
  3048. 'phase' => array(
  3049. // 'description' => 'TODO: please describe this field!',
  3050. 'type' => 'int',
  3051. 'not null' => '',
  3052. ),
  3053. 'seqlen' => array(
  3054. // 'description' => 'TODO: please describe this field!',
  3055. 'type' => 'int',
  3056. 'not null' => '',
  3057. ),
  3058. 'name' => array(
  3059. // 'description' => 'TODO: please describe this field!',
  3060. 'type' => 'varchar',
  3061. 'length' => '255',
  3062. 'not null' => '',
  3063. ),
  3064. 'organism_id' => array(
  3065. // 'description' => 'TODO: please describe this field!',
  3066. 'type' => 'int',
  3067. 'not null' => '',
  3068. ),
  3069. ),
  3070. 'primary key' => array(
  3071. ),
  3072. 'unique keys' => array(
  3073. ),
  3074. 'indexes' => array(
  3075. ),
  3076. 'foreign keys' => array(
  3077. ),
  3078. );
  3079. return $description;
  3080. }
  3081. /**
  3082. * Implements hook_gffatts_schema()
  3083. * Purpose: To describe the structure of gffatts to tripal
  3084. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3085. * @see tripal_core.api.inc: tripal_core_chado_update()
  3086. * @see tripal_core.api.inc: tripal_core_chado_select()
  3087. *
  3088. * @return
  3089. * An array describing the current table
  3090. *
  3091. * @ingroup tripal_schema_api
  3092. *
  3093. */
  3094. function tripal_core_chado_gffatts_schema () {
  3095. $description = array();
  3096. $description = array(
  3097. 'table' => 'gffatts',
  3098. // 'description' => 'TODO: please describe this table!',
  3099. 'fields' => array(
  3100. 'feature_id' => array(
  3101. // 'description' => 'TODO: please describe this field!',
  3102. 'type' => 'int',
  3103. 'not null' => '',
  3104. ),
  3105. 'type' => array(
  3106. // 'description' => 'TODO: please describe this field!',
  3107. 'type' => 'text',
  3108. 'not null' => '',
  3109. ),
  3110. 'attribute' => array(
  3111. // 'description' => 'TODO: please describe this field!',
  3112. 'type' => 'varchar',
  3113. 'not null' => '',
  3114. ),
  3115. ),
  3116. 'primary key' => array(
  3117. ),
  3118. 'unique keys' => array(
  3119. ),
  3120. 'indexes' => array(
  3121. ),
  3122. 'foreign keys' => array(
  3123. ),
  3124. );
  3125. return $description;
  3126. }
  3127. /**
  3128. * Implements hook_intron_combined_view_schema()
  3129. * Purpose: To describe the structure of intron_combined_view to tripal
  3130. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3131. * @see tripal_core.api.inc: tripal_core_chado_update()
  3132. * @see tripal_core.api.inc: tripal_core_chado_select()
  3133. *
  3134. * @return
  3135. * An array describing the current table
  3136. *
  3137. * @ingroup tripal_schema_api
  3138. *
  3139. */
  3140. function tripal_core_chado_intron_combined_view_schema () {
  3141. $description = array();
  3142. $description = array(
  3143. 'table' => 'intron_combined_view',
  3144. // 'description' => 'TODO: please describe this table!',
  3145. 'fields' => array(
  3146. 'exon1_id' => array(
  3147. // 'description' => 'TODO: please describe this field!',
  3148. 'type' => 'int',
  3149. 'not null' => '',
  3150. ),
  3151. 'exon2_id' => array(
  3152. // 'description' => 'TODO: please describe this field!',
  3153. 'type' => 'int',
  3154. 'not null' => '',
  3155. ),
  3156. 'fmin' => array(
  3157. // 'description' => 'TODO: please describe this field!',
  3158. 'type' => 'int',
  3159. 'not null' => '',
  3160. ),
  3161. 'fmax' => array(
  3162. // 'description' => 'TODO: please describe this field!',
  3163. 'type' => 'int',
  3164. 'not null' => '',
  3165. ),
  3166. 'strand' => array(
  3167. // 'description' => 'TODO: please describe this field!',
  3168. 'type' => 'int',
  3169. 'size' => 'small',
  3170. 'not null' => '',
  3171. ),
  3172. 'srcfeature_id' => array(
  3173. // 'description' => 'TODO: please describe this field!',
  3174. 'type' => 'int',
  3175. 'not null' => '',
  3176. ),
  3177. 'intron_rank' => array(
  3178. // 'description' => 'TODO: please describe this field!',
  3179. 'type' => 'int',
  3180. 'not null' => '',
  3181. ),
  3182. 'transcript_id' => array(
  3183. // 'description' => 'TODO: please describe this field!',
  3184. 'type' => 'int',
  3185. 'not null' => '',
  3186. ),
  3187. ),
  3188. 'primary key' => array(
  3189. ),
  3190. 'unique keys' => array(
  3191. ),
  3192. 'indexes' => array(
  3193. ),
  3194. 'foreign keys' => array(
  3195. ),
  3196. );
  3197. return $description;
  3198. }
  3199. /**
  3200. * Implements hook_project_schema()
  3201. * Purpose: To describe the structure of project to tripal
  3202. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3203. * @see tripal_core.api.inc: tripal_core_chado_update()
  3204. * @see tripal_core.api.inc: tripal_core_chado_select()
  3205. *
  3206. * @return
  3207. * An array describing the current table
  3208. *
  3209. * @ingroup tripal_schema_api
  3210. *
  3211. */
  3212. function tripal_core_chado_project_schema () {
  3213. $description = array();
  3214. $description = array(
  3215. 'table' => 'project',
  3216. // 'description' => 'TODO: please describe this table!',
  3217. 'fields' => array(
  3218. 'project_id' => array(
  3219. // 'description' => 'TODO: please describe this field!',
  3220. 'type' => 'serial',
  3221. 'not null' => '1',
  3222. ),
  3223. 'name' => array(
  3224. // 'description' => 'TODO: please describe this field!',
  3225. 'type' => 'varchar',
  3226. 'length' => '255',
  3227. 'not null' => '1',
  3228. ),
  3229. 'description' => array(
  3230. // 'description' => 'TODO: please describe this field!',
  3231. 'type' => 'varchar',
  3232. 'length' => '255',
  3233. 'not null' => '1',
  3234. ),
  3235. ),
  3236. 'primary key' => array(
  3237. '0' => 'project_id',
  3238. ),
  3239. 'unique keys' => array(
  3240. 'project_c1' => array(
  3241. '0' => 'name',
  3242. ),
  3243. ),
  3244. 'indexes' => array(
  3245. ),
  3246. 'foreign keys' => array(
  3247. ),
  3248. );
  3249. return $description;
  3250. }
  3251. /**
  3252. * Implements hook_protein_coding_gene_schema()
  3253. * Purpose: To describe the structure of protein_coding_gene to tripal
  3254. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3255. * @see tripal_core.api.inc: tripal_core_chado_update()
  3256. * @see tripal_core.api.inc: tripal_core_chado_select()
  3257. *
  3258. * @return
  3259. * An array describing the current table
  3260. *
  3261. * @ingroup tripal_schema_api
  3262. *
  3263. */
  3264. function tripal_core_chado_protein_coding_gene_schema () {
  3265. $description = array();
  3266. $description = array(
  3267. 'table' => 'protein_coding_gene',
  3268. // 'description' => 'TODO: please describe this table!',
  3269. 'fields' => array(
  3270. 'feature_id' => array(
  3271. // 'description' => 'TODO: please describe this field!',
  3272. 'type' => 'int',
  3273. 'not null' => '',
  3274. ),
  3275. 'dbxref_id' => array(
  3276. // 'description' => 'TODO: please describe this field!',
  3277. 'type' => 'int',
  3278. 'not null' => '',
  3279. ),
  3280. 'organism_id' => array(
  3281. // 'description' => 'TODO: please describe this field!',
  3282. 'type' => 'int',
  3283. 'not null' => '',
  3284. ),
  3285. 'name' => array(
  3286. // 'description' => 'TODO: please describe this field!',
  3287. 'type' => 'varchar',
  3288. 'length' => '255',
  3289. 'not null' => '',
  3290. ),
  3291. 'uniquename' => array(
  3292. // 'description' => 'TODO: please describe this field!',
  3293. 'type' => 'text',
  3294. 'not null' => '',
  3295. ),
  3296. 'residues' => array(
  3297. // 'description' => 'TODO: please describe this field!',
  3298. 'type' => 'text',
  3299. 'not null' => '',
  3300. ),
  3301. 'seqlen' => array(
  3302. // 'description' => 'TODO: please describe this field!',
  3303. 'type' => 'int',
  3304. 'not null' => '',
  3305. ),
  3306. 'md5checksum' => array(
  3307. // 'description' => 'TODO: please describe this field!',
  3308. 'type' => 'char',
  3309. 'length' => '32',
  3310. 'not null' => '',
  3311. ),
  3312. 'type_id' => array(
  3313. // 'description' => 'TODO: please describe this field!',
  3314. 'type' => 'int',
  3315. 'not null' => '',
  3316. ),
  3317. 'is_analysis' => array(
  3318. // 'description' => 'TODO: please describe this field!',
  3319. 'type' => 'boolean',
  3320. 'not null' => '',
  3321. ),
  3322. 'is_obsolete' => array(
  3323. // 'description' => 'TODO: please describe this field!',
  3324. 'type' => 'boolean',
  3325. 'not null' => '',
  3326. ),
  3327. 'timeaccessioned' => array(
  3328. // 'description' => 'TODO: please describe this field!',
  3329. 'type' => 'datetime',
  3330. 'not null' => '',
  3331. ),
  3332. 'timelastmodified' => array(
  3333. // 'description' => 'TODO: please describe this field!',
  3334. 'type' => 'datetime',
  3335. 'not null' => '',
  3336. ),
  3337. ),
  3338. 'primary key' => array(
  3339. ),
  3340. 'unique keys' => array(
  3341. ),
  3342. 'indexes' => array(
  3343. ),
  3344. 'foreign keys' => array(
  3345. ),
  3346. );
  3347. return $description;
  3348. }
  3349. /**
  3350. * Implements hook_studyfactorvalue_schema()
  3351. * Purpose: To describe the structure of studyfactorvalue to tripal
  3352. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3353. * @see tripal_core.api.inc: tripal_core_chado_update()
  3354. * @see tripal_core.api.inc: tripal_core_chado_select()
  3355. *
  3356. * @return
  3357. * An array describing the current table
  3358. *
  3359. * @ingroup tripal_schema_api
  3360. *
  3361. */
  3362. function tripal_core_chado_studyfactorvalue_schema () {
  3363. $description = array();
  3364. $description = array(
  3365. 'table' => 'studyfactorvalue',
  3366. // 'description' => 'TODO: please describe this table!',
  3367. 'fields' => array(
  3368. 'studyfactorvalue_id' => array(
  3369. // 'description' => 'TODO: please describe this field!',
  3370. 'type' => 'serial',
  3371. 'not null' => '1',
  3372. ),
  3373. 'studyfactor_id' => array(
  3374. // 'description' => 'TODO: please describe this field!',
  3375. 'type' => 'int',
  3376. 'not null' => '1',
  3377. ),
  3378. 'assay_id' => array(
  3379. // 'description' => 'TODO: please describe this field!',
  3380. 'type' => 'int',
  3381. 'not null' => '1',
  3382. ),
  3383. 'factorvalue' => array(
  3384. // 'description' => 'TODO: please describe this field!',
  3385. 'type' => 'text',
  3386. 'not null' => '',
  3387. ),
  3388. 'name' => array(
  3389. // 'description' => 'TODO: please describe this field!',
  3390. 'type' => 'text',
  3391. 'not null' => '',
  3392. ),
  3393. 'rank' => array(
  3394. // 'description' => 'TODO: please describe this field!',
  3395. 'type' => 'int',
  3396. 'not null' => '1',
  3397. 'default' => '0',
  3398. ),
  3399. ),
  3400. 'primary key' => array(
  3401. '0' => 'studyfactorvalue_id',
  3402. ),
  3403. 'unique keys' => array(
  3404. ),
  3405. 'indexes' => array(
  3406. 'studyfactorvalue_idx1' => array(
  3407. '0' => 'studyfactor_id',
  3408. ),
  3409. 'studyfactorvalue_idx2' => array(
  3410. '0' => 'assay_id',
  3411. ),
  3412. ),
  3413. 'foreign keys' => array(
  3414. ),
  3415. );
  3416. return $description;
  3417. }
  3418. /**
  3419. * Implements hook_studyfactor_schema()
  3420. * Purpose: To describe the structure of studyfactor to tripal
  3421. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3422. * @see tripal_core.api.inc: tripal_core_chado_update()
  3423. * @see tripal_core.api.inc: tripal_core_chado_select()
  3424. *
  3425. * @return
  3426. * An array describing the current table
  3427. *
  3428. * @ingroup tripal_schema_api
  3429. *
  3430. */
  3431. function tripal_core_chado_studyfactor_schema () {
  3432. $description = array();
  3433. $description = array(
  3434. 'table' => 'studyfactor',
  3435. // 'description' => 'TODO: please describe this table!',
  3436. 'fields' => array(
  3437. 'studyfactor_id' => array(
  3438. // 'description' => 'TODO: please describe this field!',
  3439. 'type' => 'serial',
  3440. 'not null' => '1',
  3441. ),
  3442. 'studydesign_id' => array(
  3443. // 'description' => 'TODO: please describe this field!',
  3444. 'type' => 'int',
  3445. 'not null' => '1',
  3446. ),
  3447. 'type_id' => array(
  3448. // 'description' => 'TODO: please describe this field!',
  3449. 'type' => 'int',
  3450. 'not null' => '',
  3451. ),
  3452. 'name' => array(
  3453. // 'description' => 'TODO: please describe this field!',
  3454. 'type' => 'text',
  3455. 'not null' => '1',
  3456. ),
  3457. 'description' => array(
  3458. // 'description' => 'TODO: please describe this field!',
  3459. 'type' => 'text',
  3460. 'not null' => '',
  3461. ),
  3462. ),
  3463. 'primary key' => array(
  3464. '0' => 'studyfactor_id',
  3465. ),
  3466. 'unique keys' => array(
  3467. ),
  3468. 'indexes' => array(
  3469. 'studyfactor_idx1' => array(
  3470. '0' => 'studydesign_id',
  3471. ),
  3472. 'studyfactor_idx2' => array(
  3473. '0' => 'type_id',
  3474. ),
  3475. ),
  3476. 'foreign keys' => array(
  3477. ),
  3478. );
  3479. return $description;
  3480. }
  3481. /**
  3482. * Implements hook_studyprop_schema()
  3483. * Purpose: To describe the structure of studyprop to tripal
  3484. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3485. * @see tripal_core.api.inc: tripal_core_chado_update()
  3486. * @see tripal_core.api.inc: tripal_core_chado_select()
  3487. *
  3488. * @return
  3489. * An array describing the current table
  3490. *
  3491. * @ingroup tripal_schema_api
  3492. *
  3493. */
  3494. function tripal_core_chado_studyprop_schema () {
  3495. $description = array();
  3496. $description = array(
  3497. 'table' => 'studyprop',
  3498. // 'description' => 'TODO: please describe this table!',
  3499. 'fields' => array(
  3500. 'studyprop_id' => array(
  3501. // 'description' => 'TODO: please describe this field!',
  3502. 'type' => 'serial',
  3503. 'not null' => '1',
  3504. ),
  3505. 'study_id' => array(
  3506. // 'description' => 'TODO: please describe this field!',
  3507. 'type' => 'int',
  3508. 'not null' => '1',
  3509. ),
  3510. 'type_id' => array(
  3511. // 'description' => 'TODO: please describe this field!',
  3512. 'type' => 'int',
  3513. 'not null' => '1',
  3514. ),
  3515. 'value' => array(
  3516. // 'description' => 'TODO: please describe this field!',
  3517. 'type' => 'text',
  3518. 'not null' => '',
  3519. ),
  3520. 'rank' => array(
  3521. // 'description' => 'TODO: please describe this field!',
  3522. 'type' => 'int',
  3523. 'not null' => '1',
  3524. 'default' => '0',
  3525. ),
  3526. ),
  3527. 'primary key' => array(
  3528. '0' => 'studyprop_id',
  3529. ),
  3530. 'unique keys' => array(
  3531. 'study_id' => array(
  3532. '0' => 'study_id',
  3533. '1' => 'type_id',
  3534. '2' => 'rank',
  3535. ),
  3536. ),
  3537. 'indexes' => array(
  3538. 'studyprop_idx1' => array(
  3539. '0' => 'study_id',
  3540. ),
  3541. 'studyprop_idx2' => array(
  3542. '0' => 'type_id',
  3543. ),
  3544. ),
  3545. 'foreign keys' => array(
  3546. ),
  3547. );
  3548. return $description;
  3549. }
  3550. /**
  3551. * Implements hook_studyprop_feature_schema()
  3552. * Purpose: To describe the structure of studyprop_feature to tripal
  3553. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3554. * @see tripal_core.api.inc: tripal_core_chado_update()
  3555. * @see tripal_core.api.inc: tripal_core_chado_select()
  3556. *
  3557. * @return
  3558. * An array describing the current table
  3559. *
  3560. * @ingroup tripal_schema_api
  3561. *
  3562. */
  3563. function tripal_core_chado_studyprop_feature_schema () {
  3564. $description = array();
  3565. $description = array(
  3566. 'table' => 'studyprop_feature',
  3567. // 'description' => 'TODO: please describe this table!',
  3568. 'fields' => array(
  3569. 'studyprop_feature_id' => array(
  3570. // 'description' => 'TODO: please describe this field!',
  3571. 'type' => 'serial',
  3572. 'not null' => '1',
  3573. ),
  3574. 'studyprop_id' => array(
  3575. // 'description' => 'TODO: please describe this field!',
  3576. 'type' => 'int',
  3577. 'not null' => '1',
  3578. ),
  3579. 'feature_id' => array(
  3580. // 'description' => 'TODO: please describe this field!',
  3581. 'type' => 'int',
  3582. 'not null' => '1',
  3583. ),
  3584. 'type_id' => array(
  3585. // 'description' => 'TODO: please describe this field!',
  3586. 'type' => 'int',
  3587. 'not null' => '',
  3588. ),
  3589. ),
  3590. 'primary key' => array(
  3591. '0' => 'studyprop_feature_id',
  3592. ),
  3593. 'unique keys' => array(
  3594. 'studyprop_id' => array(
  3595. '0' => 'studyprop_id',
  3596. '1' => 'feature_id',
  3597. ),
  3598. ),
  3599. 'indexes' => array(
  3600. 'studyprop_feature_idx1' => array(
  3601. '0' => 'studyprop_id',
  3602. ),
  3603. 'studyprop_feature_idx2' => array(
  3604. '0' => 'feature_id',
  3605. ),
  3606. ),
  3607. 'foreign keys' => array(
  3608. ),
  3609. );
  3610. return $description;
  3611. }
  3612. /**
  3613. * Implements hook_synonym_schema()
  3614. * Purpose: To describe the structure of synonym to tripal
  3615. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3616. * @see tripal_core.api.inc: tripal_core_chado_update()
  3617. * @see tripal_core.api.inc: tripal_core_chado_select()
  3618. *
  3619. * @return
  3620. * An array describing the current table
  3621. *
  3622. * @ingroup tripal_schema_api
  3623. *
  3624. */
  3625. function tripal_core_chado_synonym_schema () {
  3626. $description = array();
  3627. $description = array(
  3628. 'table' => 'synonym',
  3629. // 'description' => 'TODO: please describe this table!',
  3630. 'fields' => array(
  3631. 'synonym_id' => array(
  3632. // 'description' => 'TODO: please describe this field!',
  3633. 'type' => 'serial',
  3634. 'not null' => '1',
  3635. ),
  3636. 'name' => array(
  3637. // 'description' => 'TODO: please describe this field!',
  3638. 'type' => 'varchar',
  3639. 'length' => '255',
  3640. 'not null' => '1',
  3641. ),
  3642. 'type_id' => array(
  3643. // 'description' => 'TODO: please describe this field!',
  3644. 'type' => 'int',
  3645. 'not null' => '1',
  3646. ),
  3647. 'synonym_sgml' => array(
  3648. // 'description' => 'TODO: please describe this field!',
  3649. 'type' => 'varchar',
  3650. 'length' => '255',
  3651. 'not null' => '1',
  3652. ),
  3653. ),
  3654. 'primary key' => array(
  3655. '0' => 'synonym_id',
  3656. ),
  3657. 'unique keys' => array(
  3658. 'synonym_c1' => array(
  3659. '0' => 'name',
  3660. '1' => 'type_id',
  3661. ),
  3662. ),
  3663. 'indexes' => array(
  3664. 'synonym_idx1' => array(
  3665. '0' => 'type_id',
  3666. ),
  3667. ),
  3668. 'foreign keys' => array(
  3669. ),
  3670. );
  3671. return $description;
  3672. }
  3673. /**
  3674. * Implements hook_studydesignprop_schema()
  3675. * Purpose: To describe the structure of studydesignprop to tripal
  3676. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3677. * @see tripal_core.api.inc: tripal_core_chado_update()
  3678. * @see tripal_core.api.inc: tripal_core_chado_select()
  3679. *
  3680. * @return
  3681. * An array describing the current table
  3682. *
  3683. * @ingroup tripal_schema_api
  3684. *
  3685. */
  3686. function tripal_core_chado_studydesignprop_schema () {
  3687. $description = array();
  3688. $description = array(
  3689. 'table' => 'studydesignprop',
  3690. // 'description' => 'TODO: please describe this table!',
  3691. 'fields' => array(
  3692. 'studydesignprop_id' => array(
  3693. // 'description' => 'TODO: please describe this field!',
  3694. 'type' => 'serial',
  3695. 'not null' => '1',
  3696. ),
  3697. 'studydesign_id' => array(
  3698. // 'description' => 'TODO: please describe this field!',
  3699. 'type' => 'int',
  3700. 'not null' => '1',
  3701. ),
  3702. 'type_id' => array(
  3703. // 'description' => 'TODO: please describe this field!',
  3704. 'type' => 'int',
  3705. 'not null' => '1',
  3706. ),
  3707. 'value' => array(
  3708. // 'description' => 'TODO: please describe this field!',
  3709. 'type' => 'text',
  3710. 'not null' => '',
  3711. ),
  3712. 'rank' => array(
  3713. // 'description' => 'TODO: please describe this field!',
  3714. 'type' => 'int',
  3715. 'not null' => '1',
  3716. 'default' => '0',
  3717. ),
  3718. ),
  3719. 'primary key' => array(
  3720. '0' => 'studydesignprop_id',
  3721. ),
  3722. 'unique keys' => array(
  3723. 'studydesignprop_c1' => array(
  3724. '0' => 'studydesign_id',
  3725. '1' => 'type_id',
  3726. '2' => 'rank',
  3727. ),
  3728. ),
  3729. 'indexes' => array(
  3730. 'studydesignprop_idx1' => array(
  3731. '0' => 'studydesign_id',
  3732. ),
  3733. 'studydesignprop_idx2' => array(
  3734. '0' => 'type_id',
  3735. ),
  3736. ),
  3737. 'foreign keys' => array(
  3738. ),
  3739. );
  3740. return $description;
  3741. }
  3742. /**
  3743. * Implements hook_studydesign_schema()
  3744. * Purpose: To describe the structure of studydesign to tripal
  3745. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3746. * @see tripal_core.api.inc: tripal_core_chado_update()
  3747. * @see tripal_core.api.inc: tripal_core_chado_select()
  3748. *
  3749. * @return
  3750. * An array describing the current table
  3751. *
  3752. * @ingroup tripal_schema_api
  3753. *
  3754. */
  3755. function tripal_core_chado_studydesign_schema () {
  3756. $description = array();
  3757. $description = array(
  3758. 'table' => 'studydesign',
  3759. // 'description' => 'TODO: please describe this table!',
  3760. 'fields' => array(
  3761. 'studydesign_id' => array(
  3762. // 'description' => 'TODO: please describe this field!',
  3763. 'type' => 'serial',
  3764. 'not null' => '1',
  3765. ),
  3766. 'study_id' => array(
  3767. // 'description' => 'TODO: please describe this field!',
  3768. 'type' => 'int',
  3769. 'not null' => '1',
  3770. ),
  3771. 'description' => array(
  3772. // 'description' => 'TODO: please describe this field!',
  3773. 'type' => 'text',
  3774. 'not null' => '',
  3775. ),
  3776. ),
  3777. 'primary key' => array(
  3778. '0' => 'studydesign_id',
  3779. ),
  3780. 'unique keys' => array(
  3781. ),
  3782. 'indexes' => array(
  3783. 'studydesign_idx1' => array(
  3784. '0' => 'study_id',
  3785. ),
  3786. ),
  3787. 'foreign keys' => array(
  3788. ),
  3789. );
  3790. return $description;
  3791. }
  3792. /**
  3793. * Implements hook_stockprop_schema()
  3794. * Purpose: To describe the structure of stockprop to tripal
  3795. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3796. * @see tripal_core.api.inc: tripal_core_chado_update()
  3797. * @see tripal_core.api.inc: tripal_core_chado_select()
  3798. *
  3799. * @return
  3800. * An array describing the current table
  3801. *
  3802. * @ingroup tripal_schema_api
  3803. *
  3804. */
  3805. function tripal_core_chado_stockprop_schema () {
  3806. $description = array();
  3807. $description = array(
  3808. 'table' => 'stockprop',
  3809. // 'description' => 'TODO: please describe this table!',
  3810. 'fields' => array(
  3811. 'stockprop_id' => array(
  3812. // 'description' => 'TODO: please describe this field!',
  3813. 'type' => 'serial',
  3814. 'not null' => '1',
  3815. ),
  3816. 'stock_id' => array(
  3817. // 'description' => 'TODO: please describe this field!',
  3818. 'type' => 'int',
  3819. 'not null' => '1',
  3820. ),
  3821. 'type_id' => array(
  3822. // 'description' => 'TODO: please describe this field!',
  3823. 'type' => 'int',
  3824. 'not null' => '1',
  3825. ),
  3826. 'value' => array(
  3827. // 'description' => 'TODO: please describe this field!',
  3828. 'type' => 'text',
  3829. 'not null' => '',
  3830. ),
  3831. 'rank' => array(
  3832. // 'description' => 'TODO: please describe this field!',
  3833. 'type' => 'int',
  3834. 'not null' => '1',
  3835. 'default' => '0',
  3836. ),
  3837. ),
  3838. 'primary key' => array(
  3839. '0' => 'stockprop_id',
  3840. ),
  3841. 'unique keys' => array(
  3842. 'stockprop_c1' => array(
  3843. '0' => 'stock_id',
  3844. '1' => 'type_id',
  3845. '2' => 'rank',
  3846. ),
  3847. ),
  3848. 'indexes' => array(
  3849. 'stockprop_idx1' => array(
  3850. '0' => 'stock_id',
  3851. ),
  3852. 'stockprop_idx2' => array(
  3853. '0' => 'type_id',
  3854. ),
  3855. ),
  3856. 'foreign keys' => array(
  3857. ),
  3858. );
  3859. return $description;
  3860. }
  3861. /**
  3862. * Implements hook_stockprop_pub_schema()
  3863. * Purpose: To describe the structure of stockprop_pub to tripal
  3864. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3865. * @see tripal_core.api.inc: tripal_core_chado_update()
  3866. * @see tripal_core.api.inc: tripal_core_chado_select()
  3867. *
  3868. * @return
  3869. * An array describing the current table
  3870. *
  3871. * @ingroup tripal_schema_api
  3872. *
  3873. */
  3874. function tripal_core_chado_stockprop_pub_schema () {
  3875. $description = array();
  3876. $description = array(
  3877. 'table' => 'stockprop_pub',
  3878. // 'description' => 'TODO: please describe this table!',
  3879. 'fields' => array(
  3880. 'stockprop_pub_id' => array(
  3881. // 'description' => 'TODO: please describe this field!',
  3882. 'type' => 'serial',
  3883. 'not null' => '1',
  3884. ),
  3885. 'stockprop_id' => array(
  3886. // 'description' => 'TODO: please describe this field!',
  3887. 'type' => 'int',
  3888. 'not null' => '1',
  3889. ),
  3890. 'pub_id' => array(
  3891. // 'description' => 'TODO: please describe this field!',
  3892. 'type' => 'int',
  3893. 'not null' => '1',
  3894. ),
  3895. ),
  3896. 'primary key' => array(
  3897. '0' => 'stockprop_pub_id',
  3898. ),
  3899. 'unique keys' => array(
  3900. 'stockprop_pub_c1' => array(
  3901. '0' => 'stockprop_id',
  3902. '1' => 'pub_id',
  3903. ),
  3904. ),
  3905. 'indexes' => array(
  3906. 'stockprop_pub_idx1' => array(
  3907. '0' => 'stockprop_id',
  3908. ),
  3909. 'stockprop_pub_idx2' => array(
  3910. '0' => 'pub_id',
  3911. ),
  3912. ),
  3913. 'foreign keys' => array(
  3914. ),
  3915. );
  3916. return $description;
  3917. }
  3918. /**
  3919. * Implements hook_study_schema()
  3920. * Purpose: To describe the structure of study to tripal
  3921. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3922. * @see tripal_core.api.inc: tripal_core_chado_update()
  3923. * @see tripal_core.api.inc: tripal_core_chado_select()
  3924. *
  3925. * @return
  3926. * An array describing the current table
  3927. *
  3928. * @ingroup tripal_schema_api
  3929. *
  3930. */
  3931. function tripal_core_chado_study_schema () {
  3932. $description = array();
  3933. $description = array(
  3934. 'table' => 'study',
  3935. // 'description' => 'TODO: please describe this table!',
  3936. 'fields' => array(
  3937. 'study_id' => array(
  3938. // 'description' => 'TODO: please describe this field!',
  3939. 'type' => 'serial',
  3940. 'not null' => '1',
  3941. ),
  3942. 'contact_id' => array(
  3943. // 'description' => 'TODO: please describe this field!',
  3944. 'type' => 'int',
  3945. 'not null' => '1',
  3946. ),
  3947. 'pub_id' => array(
  3948. // 'description' => 'TODO: please describe this field!',
  3949. 'type' => 'int',
  3950. 'not null' => '',
  3951. ),
  3952. 'dbxref_id' => array(
  3953. // 'description' => 'TODO: please describe this field!',
  3954. 'type' => 'int',
  3955. 'not null' => '',
  3956. ),
  3957. 'name' => array(
  3958. // 'description' => 'TODO: please describe this field!',
  3959. 'type' => 'text',
  3960. 'not null' => '1',
  3961. ),
  3962. 'description' => array(
  3963. // 'description' => 'TODO: please describe this field!',
  3964. 'type' => 'text',
  3965. 'not null' => '',
  3966. ),
  3967. ),
  3968. 'primary key' => array(
  3969. '0' => 'study_id',
  3970. ),
  3971. 'unique keys' => array(
  3972. 'study_c1' => array(
  3973. '0' => 'name',
  3974. ),
  3975. ),
  3976. 'indexes' => array(
  3977. 'study_idx1' => array(
  3978. '0' => 'contact_id',
  3979. ),
  3980. 'study_idx2' => array(
  3981. '0' => 'pub_id',
  3982. ),
  3983. 'study_idx3' => array(
  3984. '0' => 'dbxref_id',
  3985. ),
  3986. ),
  3987. 'foreign keys' => array(
  3988. ),
  3989. );
  3990. return $description;
  3991. }
  3992. /**
  3993. * Implements hook_study_assay_schema()
  3994. * Purpose: To describe the structure of study_assay to tripal
  3995. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3996. * @see tripal_core.api.inc: tripal_core_chado_update()
  3997. * @see tripal_core.api.inc: tripal_core_chado_select()
  3998. *
  3999. * @return
  4000. * An array describing the current table
  4001. *
  4002. * @ingroup tripal_schema_api
  4003. *
  4004. */
  4005. function tripal_core_chado_study_assay_schema () {
  4006. $description = array();
  4007. $description = array(
  4008. 'table' => 'study_assay',
  4009. // 'description' => 'TODO: please describe this table!',
  4010. 'fields' => array(
  4011. 'study_assay_id' => array(
  4012. // 'description' => 'TODO: please describe this field!',
  4013. 'type' => 'serial',
  4014. 'not null' => '1',
  4015. ),
  4016. 'study_id' => array(
  4017. // 'description' => 'TODO: please describe this field!',
  4018. 'type' => 'int',
  4019. 'not null' => '1',
  4020. ),
  4021. 'assay_id' => array(
  4022. // 'description' => 'TODO: please describe this field!',
  4023. 'type' => 'int',
  4024. 'not null' => '1',
  4025. ),
  4026. ),
  4027. 'primary key' => array(
  4028. '0' => 'study_assay_id',
  4029. ),
  4030. 'unique keys' => array(
  4031. 'study_assay_c1' => array(
  4032. '0' => 'study_id',
  4033. '1' => 'assay_id',
  4034. ),
  4035. ),
  4036. 'indexes' => array(
  4037. 'study_assay_idx1' => array(
  4038. '0' => 'study_id',
  4039. ),
  4040. 'study_assay_idx2' => array(
  4041. '0' => 'assay_id',
  4042. ),
  4043. ),
  4044. 'foreign keys' => array(
  4045. ),
  4046. );
  4047. return $description;
  4048. }
  4049. /**
  4050. * Implements hook_tableinfo_schema()
  4051. * Purpose: To describe the structure of tableinfo to tripal
  4052. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4053. * @see tripal_core.api.inc: tripal_core_chado_update()
  4054. * @see tripal_core.api.inc: tripal_core_chado_select()
  4055. *
  4056. * @return
  4057. * An array describing the current table
  4058. *
  4059. * @ingroup tripal_schema_api
  4060. *
  4061. */
  4062. function tripal_core_chado_tableinfo_schema () {
  4063. $description = array();
  4064. $description = array(
  4065. 'table' => 'tableinfo',
  4066. // 'description' => 'TODO: please describe this table!',
  4067. 'fields' => array(
  4068. 'tableinfo_id' => array(
  4069. // 'description' => 'TODO: please describe this field!',
  4070. 'type' => 'serial',
  4071. 'not null' => '1',
  4072. ),
  4073. 'name' => array(
  4074. // 'description' => 'TODO: please describe this field!',
  4075. 'type' => 'varchar',
  4076. 'length' => '30',
  4077. 'not null' => '1',
  4078. ),
  4079. 'primary_key_column' => array(
  4080. // 'description' => 'TODO: please describe this field!',
  4081. 'type' => 'varchar',
  4082. 'length' => '30',
  4083. 'not null' => '',
  4084. ),
  4085. 'is_view' => array(
  4086. // 'description' => 'TODO: please describe this field!',
  4087. 'type' => 'int',
  4088. 'not null' => '1',
  4089. 'default' => '0',
  4090. ),
  4091. 'view_on_table_id' => array(
  4092. // 'description' => 'TODO: please describe this field!',
  4093. 'type' => 'int',
  4094. 'not null' => '',
  4095. ),
  4096. 'superclass_table_id' => array(
  4097. // 'description' => 'TODO: please describe this field!',
  4098. 'type' => 'int',
  4099. 'not null' => '',
  4100. ),
  4101. 'is_updateable' => array(
  4102. // 'description' => 'TODO: please describe this field!',
  4103. 'type' => 'int',
  4104. 'not null' => '1',
  4105. 'default' => '1',
  4106. ),
  4107. 'modification_date' => array(
  4108. // 'description' => 'TODO: please describe this field!',
  4109. 'type' => 'date',
  4110. 'not null' => '1',
  4111. 'default' => 'ow(',
  4112. ),
  4113. ),
  4114. 'primary key' => array(
  4115. '0' => 'tableinfo_id',
  4116. ),
  4117. 'unique keys' => array(
  4118. 'tableinfo_c1' => array(
  4119. '0' => 'name',
  4120. ),
  4121. ),
  4122. 'indexes' => array(
  4123. ),
  4124. 'foreign keys' => array(
  4125. ),
  4126. );
  4127. return $description;
  4128. }
  4129. /**
  4130. * Implements hook_treatment_schema()
  4131. * Purpose: To describe the structure of treatment to tripal
  4132. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4133. * @see tripal_core.api.inc: tripal_core_chado_update()
  4134. * @see tripal_core.api.inc: tripal_core_chado_select()
  4135. *
  4136. * @return
  4137. * An array describing the current table
  4138. *
  4139. * @ingroup tripal_schema_api
  4140. *
  4141. */
  4142. function tripal_core_chado_treatment_schema () {
  4143. $description = array();
  4144. $description = array(
  4145. 'table' => 'treatment',
  4146. // 'description' => 'TODO: please describe this table!',
  4147. 'fields' => array(
  4148. 'treatment_id' => array(
  4149. // 'description' => 'TODO: please describe this field!',
  4150. 'type' => 'serial',
  4151. 'not null' => '1',
  4152. ),
  4153. 'rank' => array(
  4154. // 'description' => 'TODO: please describe this field!',
  4155. 'type' => 'int',
  4156. 'not null' => '1',
  4157. 'default' => '0',
  4158. ),
  4159. 'biomaterial_id' => array(
  4160. // 'description' => 'TODO: please describe this field!',
  4161. 'type' => 'int',
  4162. 'not null' => '1',
  4163. ),
  4164. 'type_id' => array(
  4165. // 'description' => 'TODO: please describe this field!',
  4166. 'type' => 'int',
  4167. 'not null' => '1',
  4168. ),
  4169. 'protocol_id' => array(
  4170. // 'description' => 'TODO: please describe this field!',
  4171. 'type' => 'int',
  4172. 'not null' => '',
  4173. ),
  4174. 'name' => array(
  4175. // 'description' => 'TODO: please describe this field!',
  4176. 'type' => 'text',
  4177. 'not null' => '',
  4178. ),
  4179. ),
  4180. 'primary key' => array(
  4181. '0' => 'treatment_id',
  4182. ),
  4183. 'unique keys' => array(
  4184. ),
  4185. 'indexes' => array(
  4186. 'treatment_idx1' => array(
  4187. '0' => 'biomaterial_id',
  4188. ),
  4189. 'treatment_idx2' => array(
  4190. '0' => 'type_id',
  4191. ),
  4192. 'treatment_idx3' => array(
  4193. '0' => 'protocol_id',
  4194. ),
  4195. ),
  4196. 'foreign keys' => array(
  4197. ),
  4198. );
  4199. return $description;
  4200. }
  4201. /**
  4202. * Implements hook_tripal_obo_schema()
  4203. * Purpose: To describe the structure of tripal_obo to tripal
  4204. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4205. * @see tripal_core.api.inc: tripal_core_chado_update()
  4206. * @see tripal_core.api.inc: tripal_core_chado_select()
  4207. *
  4208. * @return
  4209. * An array describing the current table
  4210. *
  4211. * @ingroup tripal_schema_api
  4212. *
  4213. */
  4214. function tripal_core_chado_tripal_obo_schema () {
  4215. $description = array();
  4216. $description = array(
  4217. 'table' => 'tripal_obo',
  4218. // 'description' => 'TODO: please describe this table!',
  4219. 'fields' => array(
  4220. 'cv_id' => array(
  4221. // 'description' => 'TODO: please describe this field!',
  4222. 'type' => 'int',
  4223. 'unsigned' => '1',
  4224. 'not null' => '1',
  4225. 'default' => '0',
  4226. ),
  4227. 'file' => array(
  4228. // 'description' => 'TODO: please describe this field!',
  4229. 'type' => 'varchar',
  4230. 'length' => '1024',
  4231. 'not null' => '',
  4232. ),
  4233. 'url' => array(
  4234. // 'description' => 'TODO: please describe this field!',
  4235. 'type' => 'varchar',
  4236. 'length' => '1024',
  4237. 'not null' => '',
  4238. ),
  4239. ),
  4240. 'primary key' => array(
  4241. '0' => 'cv_id',
  4242. ),
  4243. 'unique keys' => array(
  4244. ),
  4245. 'indexes' => array(
  4246. 'cv_id' => array(
  4247. '0' => 'cv_id',
  4248. ),
  4249. ),
  4250. 'foreign keys' => array(
  4251. ),
  4252. );
  4253. return $description;
  4254. }
  4255. /**
  4256. * Implements hook_tripal_organism_views_common_name_schema()
  4257. * Purpose: To describe the structure of tripal_organism_views_common_name to tripal
  4258. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4259. * @see tripal_core.api.inc: tripal_core_chado_update()
  4260. * @see tripal_core.api.inc: tripal_core_chado_select()
  4261. *
  4262. * @return
  4263. * An array describing the current table
  4264. *
  4265. * @ingroup tripal_schema_api
  4266. *
  4267. */
  4268. function tripal_core_chado_tripal_organism_views_common_name_schema () {
  4269. $description = array();
  4270. $description = array(
  4271. 'table' => 'tripal_organism_views_common_name',
  4272. // 'description' => 'TODO: please describe this table!',
  4273. 'fields' => array(
  4274. 'nid' => array(
  4275. // 'description' => 'TODO: please describe this field!',
  4276. 'type' => 'int',
  4277. 'unsigned' => '1',
  4278. 'not null' => '1',
  4279. 'default' => '0',
  4280. ),
  4281. 'common_name' => array(
  4282. // 'description' => 'TODO: please describe this field!',
  4283. 'type' => 'varchar',
  4284. 'length' => '255',
  4285. 'not null' => '1',
  4286. 'default' => 'NA',
  4287. ),
  4288. ),
  4289. 'primary key' => array(
  4290. ),
  4291. 'unique keys' => array(
  4292. ),
  4293. 'indexes' => array(
  4294. ),
  4295. 'foreign keys' => array(
  4296. ),
  4297. );
  4298. return $description;
  4299. }
  4300. /**
  4301. * Implements hook_type_feature_count_schema()
  4302. * Purpose: To describe the structure of type_feature_count to tripal
  4303. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4304. * @see tripal_core.api.inc: tripal_core_chado_update()
  4305. * @see tripal_core.api.inc: tripal_core_chado_select()
  4306. *
  4307. * @return
  4308. * An array describing the current table
  4309. *
  4310. * @ingroup tripal_schema_api
  4311. *
  4312. */
  4313. function tripal_core_chado_type_feature_count_schema () {
  4314. $description = array();
  4315. $description = array(
  4316. 'table' => 'type_feature_count',
  4317. // 'description' => 'TODO: please describe this table!',
  4318. 'fields' => array(
  4319. 'type' => array(
  4320. // 'description' => 'TODO: please describe this field!',
  4321. 'type' => 'varchar',
  4322. 'length' => '1024',
  4323. 'not null' => '',
  4324. ),
  4325. 'num_features' => array(
  4326. // 'description' => 'TODO: please describe this field!',
  4327. 'type' => 'int',
  4328. 'size' => 'big',
  4329. 'not null' => '',
  4330. ),
  4331. ),
  4332. 'primary key' => array(
  4333. ),
  4334. 'unique keys' => array(
  4335. ),
  4336. 'indexes' => array(
  4337. ),
  4338. 'foreign keys' => array(
  4339. ),
  4340. );
  4341. return $description;
  4342. }
  4343. /**
  4344. * Implements hook_stockcollectionprop_schema()
  4345. * Purpose: To describe the structure of stockcollectionprop to tripal
  4346. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4347. * @see tripal_core.api.inc: tripal_core_chado_update()
  4348. * @see tripal_core.api.inc: tripal_core_chado_select()
  4349. *
  4350. * @return
  4351. * An array describing the current table
  4352. *
  4353. * @ingroup tripal_schema_api
  4354. *
  4355. */
  4356. function tripal_core_chado_stockcollectionprop_schema () {
  4357. $description = array();
  4358. $description = array(
  4359. 'table' => 'stockcollectionprop',
  4360. // 'description' => 'TODO: please describe this table!',
  4361. 'fields' => array(
  4362. 'stockcollectionprop_id' => array(
  4363. // 'description' => 'TODO: please describe this field!',
  4364. 'type' => 'serial',
  4365. 'not null' => '1',
  4366. ),
  4367. 'stockcollection_id' => array(
  4368. // 'description' => 'TODO: please describe this field!',
  4369. 'type' => 'int',
  4370. 'not null' => '1',
  4371. ),
  4372. 'type_id' => array(
  4373. // 'description' => 'TODO: please describe this field!',
  4374. 'type' => 'int',
  4375. 'not null' => '1',
  4376. ),
  4377. 'value' => array(
  4378. // 'description' => 'TODO: please describe this field!',
  4379. 'type' => 'text',
  4380. 'not null' => '',
  4381. ),
  4382. 'rank' => array(
  4383. // 'description' => 'TODO: please describe this field!',
  4384. 'type' => 'int',
  4385. 'not null' => '1',
  4386. 'default' => '0',
  4387. ),
  4388. ),
  4389. 'primary key' => array(
  4390. '0' => 'stockcollectionprop_id',
  4391. ),
  4392. 'unique keys' => array(
  4393. 'stockcollectionprop_c1' => array(
  4394. '0' => 'stockcollection_id',
  4395. '1' => 'type_id',
  4396. '2' => 'rank',
  4397. ),
  4398. ),
  4399. 'indexes' => array(
  4400. 'stockcollectionprop_idx1' => array(
  4401. '0' => 'stockcollection_id',
  4402. ),
  4403. 'stockcollectionprop_idx2' => array(
  4404. '0' => 'type_id',
  4405. ),
  4406. ),
  4407. 'foreign keys' => array(
  4408. ),
  4409. );
  4410. return $description;
  4411. }
  4412. /**
  4413. * Implements hook_stockcollection_stock_schema()
  4414. * Purpose: To describe the structure of stockcollection_stock to tripal
  4415. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4416. * @see tripal_core.api.inc: tripal_core_chado_update()
  4417. * @see tripal_core.api.inc: tripal_core_chado_select()
  4418. *
  4419. * @return
  4420. * An array describing the current table
  4421. *
  4422. * @ingroup tripal_schema_api
  4423. *
  4424. */
  4425. function tripal_core_chado_stockcollection_stock_schema () {
  4426. $description = array();
  4427. $description = array(
  4428. 'table' => 'stockcollection_stock',
  4429. // 'description' => 'TODO: please describe this table!',
  4430. 'fields' => array(
  4431. 'stockcollection_stock_id' => array(
  4432. // 'description' => 'TODO: please describe this field!',
  4433. 'type' => 'serial',
  4434. 'not null' => '1',
  4435. ),
  4436. 'stockcollection_id' => array(
  4437. // 'description' => 'TODO: please describe this field!',
  4438. 'type' => 'int',
  4439. 'not null' => '1',
  4440. ),
  4441. 'stock_id' => array(
  4442. // 'description' => 'TODO: please describe this field!',
  4443. 'type' => 'int',
  4444. 'not null' => '1',
  4445. ),
  4446. ),
  4447. 'primary key' => array(
  4448. '0' => 'stockcollection_stock_id',
  4449. ),
  4450. 'unique keys' => array(
  4451. 'stockcollection_stock_c1' => array(
  4452. '0' => 'stockcollection_id',
  4453. '1' => 'stock_id',
  4454. ),
  4455. ),
  4456. 'indexes' => array(
  4457. 'stockcollection_stock_idx1' => array(
  4458. '0' => 'stockcollection_id',
  4459. ),
  4460. 'stockcollection_stock_idx2' => array(
  4461. '0' => 'stock_id',
  4462. ),
  4463. ),
  4464. 'foreign keys' => array(
  4465. ),
  4466. );
  4467. return $description;
  4468. }
  4469. /**
  4470. * Implements hook_public_feature_schema()
  4471. * Purpose: To describe the structure of public_feature to tripal
  4472. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4473. * @see tripal_core.api.inc: tripal_core_chado_update()
  4474. * @see tripal_core.api.inc: tripal_core_chado_select()
  4475. *
  4476. * @return
  4477. * An array describing the current table
  4478. *
  4479. * @ingroup tripal_schema_api
  4480. *
  4481. */
  4482. function tripal_core_chado_public_feature_schema () {
  4483. $description = array();
  4484. $description = array(
  4485. 'table' => 'public_feature',
  4486. // 'description' => 'TODO: please describe this table!',
  4487. 'fields' => array(
  4488. 'vid' => array(
  4489. // 'description' => 'TODO: please describe this field!',
  4490. 'type' => 'int',
  4491. 'unsigned' => '1',
  4492. 'not null' => '1',
  4493. 'default' => '0',
  4494. ),
  4495. 'nid' => array(
  4496. // 'description' => 'TODO: please describe this field!',
  4497. 'type' => 'int',
  4498. 'unsigned' => '1',
  4499. 'not null' => '1',
  4500. 'default' => '0',
  4501. ),
  4502. 'feature_id' => array(
  4503. // 'description' => 'TODO: please describe this field!',
  4504. 'type' => 'int',
  4505. 'not null' => '1',
  4506. 'default' => '0',
  4507. ),
  4508. 'sync_date' => array(
  4509. // 'description' => 'TODO: please describe this field!',
  4510. 'type' => 'int',
  4511. 'not null' => '',
  4512. ),
  4513. ),
  4514. 'primary key' => array(
  4515. '0' => 'nid',
  4516. ),
  4517. 'unique keys' => array(
  4518. 'nid_vid' => array(
  4519. '0' => 'nid',
  4520. '1' => 'vid',
  4521. ),
  4522. 'vid' => array(
  4523. '0' => 'vid',
  4524. ),
  4525. ),
  4526. 'indexes' => array(
  4527. 'feature_id' => array(
  4528. '0' => 'feature_id',
  4529. ),
  4530. ),
  4531. 'foreign keys' => array(
  4532. ),
  4533. );
  4534. return $description;
  4535. }
  4536. /**
  4537. * Implements hook_public_library_schema()
  4538. * Purpose: To describe the structure of public_library to tripal
  4539. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4540. * @see tripal_core.api.inc: tripal_core_chado_update()
  4541. * @see tripal_core.api.inc: tripal_core_chado_select()
  4542. *
  4543. * @return
  4544. * An array describing the current table
  4545. *
  4546. * @ingroup tripal_schema_api
  4547. *
  4548. */
  4549. function tripal_core_chado_public_library_schema () {
  4550. $description = array();
  4551. $description = array(
  4552. 'table' => 'public_library',
  4553. // 'description' => 'TODO: please describe this table!',
  4554. 'fields' => array(
  4555. 'vid' => array(
  4556. // 'description' => 'TODO: please describe this field!',
  4557. 'type' => 'int',
  4558. 'unsigned' => '1',
  4559. 'not null' => '1',
  4560. 'default' => '0',
  4561. ),
  4562. 'nid' => array(
  4563. // 'description' => 'TODO: please describe this field!',
  4564. 'type' => 'int',
  4565. 'unsigned' => '1',
  4566. 'not null' => '1',
  4567. 'default' => '0',
  4568. ),
  4569. 'library_id' => array(
  4570. // 'description' => 'TODO: please describe this field!',
  4571. 'type' => 'int',
  4572. 'not null' => '1',
  4573. 'default' => '0',
  4574. ),
  4575. ),
  4576. 'primary key' => array(
  4577. '0' => 'nid',
  4578. ),
  4579. 'unique keys' => array(
  4580. 'nid_vid' => array(
  4581. '0' => 'nid',
  4582. '1' => 'vid',
  4583. ),
  4584. 'vid' => array(
  4585. '0' => 'vid',
  4586. ),
  4587. ),
  4588. 'indexes' => array(
  4589. 'library_id' => array(
  4590. '0' => 'library_id',
  4591. ),
  4592. ),
  4593. 'foreign keys' => array(
  4594. ),
  4595. );
  4596. return $description;
  4597. }
  4598. /**
  4599. * Implements hook_public_organism_schema()
  4600. * Purpose: To describe the structure of public_organism to tripal
  4601. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4602. * @see tripal_core.api.inc: tripal_core_chado_update()
  4603. * @see tripal_core.api.inc: tripal_core_chado_select()
  4604. *
  4605. * @return
  4606. * An array describing the current table
  4607. *
  4608. * @ingroup tripal_schema_api
  4609. *
  4610. */
  4611. function tripal_core_chado_public_organism_schema () {
  4612. $description = array();
  4613. $description = array(
  4614. 'table' => 'public_organism',
  4615. // 'description' => 'TODO: please describe this table!',
  4616. 'fields' => array(
  4617. 'vid' => array(
  4618. // 'description' => 'TODO: please describe this field!',
  4619. 'type' => 'int',
  4620. 'unsigned' => '1',
  4621. 'not null' => '1',
  4622. 'default' => '0',
  4623. ),
  4624. 'nid' => array(
  4625. // 'description' => 'TODO: please describe this field!',
  4626. 'type' => 'int',
  4627. 'unsigned' => '1',
  4628. 'not null' => '1',
  4629. 'default' => '0',
  4630. ),
  4631. 'organism_id' => array(
  4632. // 'description' => 'TODO: please describe this field!',
  4633. 'type' => 'int',
  4634. 'not null' => '1',
  4635. 'default' => '0',
  4636. ),
  4637. ),
  4638. 'primary key' => array(
  4639. '0' => 'nid',
  4640. ),
  4641. 'unique keys' => array(
  4642. 'nid_vid' => array(
  4643. '0' => 'nid',
  4644. '1' => 'vid',
  4645. ),
  4646. 'vid' => array(
  4647. '0' => 'vid',
  4648. ),
  4649. ),
  4650. 'indexes' => array(
  4651. 'organism_id' => array(
  4652. '0' => 'organism_id',
  4653. ),
  4654. ),
  4655. 'foreign keys' => array(
  4656. ),
  4657. );
  4658. return $description;
  4659. }
  4660. /**
  4661. * Implements hook_pubprop_schema()
  4662. * Purpose: To describe the structure of pubprop to tripal
  4663. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4664. * @see tripal_core.api.inc: tripal_core_chado_update()
  4665. * @see tripal_core.api.inc: tripal_core_chado_select()
  4666. *
  4667. * @return
  4668. * An array describing the current table
  4669. *
  4670. * @ingroup tripal_schema_api
  4671. *
  4672. */
  4673. function tripal_core_chado_pubprop_schema () {
  4674. $description = array();
  4675. $description = array(
  4676. 'table' => 'pubprop',
  4677. // 'description' => 'TODO: please describe this table!',
  4678. 'fields' => array(
  4679. 'pubprop_id' => array(
  4680. // 'description' => 'TODO: please describe this field!',
  4681. 'type' => 'serial',
  4682. 'not null' => '1',
  4683. ),
  4684. 'pub_id' => array(
  4685. // 'description' => 'TODO: please describe this field!',
  4686. 'type' => 'int',
  4687. 'not null' => '1',
  4688. ),
  4689. 'type_id' => array(
  4690. // 'description' => 'TODO: please describe this field!',
  4691. 'type' => 'int',
  4692. 'not null' => '1',
  4693. ),
  4694. 'value' => array(
  4695. // 'description' => 'TODO: please describe this field!',
  4696. 'type' => 'text',
  4697. 'not null' => '1',
  4698. ),
  4699. 'rank' => array(
  4700. // 'description' => 'TODO: please describe this field!',
  4701. 'type' => 'int',
  4702. 'not null' => '',
  4703. ),
  4704. ),
  4705. 'primary key' => array(
  4706. '0' => 'pubprop_id',
  4707. ),
  4708. 'unique keys' => array(
  4709. 'pubprop_c1' => array(
  4710. '0' => 'pub_id',
  4711. '1' => 'type_id',
  4712. '2' => 'rank',
  4713. ),
  4714. ),
  4715. 'indexes' => array(
  4716. 'pubprop_idx1' => array(
  4717. '0' => 'pub_id',
  4718. ),
  4719. 'pubprop_idx2' => array(
  4720. '0' => 'type_id',
  4721. ),
  4722. ),
  4723. 'foreign keys' => array(
  4724. ),
  4725. );
  4726. return $description;
  4727. }
  4728. /**
  4729. * Implements hook_pubauthor_schema()
  4730. * Purpose: To describe the structure of pubauthor to tripal
  4731. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4732. * @see tripal_core.api.inc: tripal_core_chado_update()
  4733. * @see tripal_core.api.inc: tripal_core_chado_select()
  4734. *
  4735. * @return
  4736. * An array describing the current table
  4737. *
  4738. * @ingroup tripal_schema_api
  4739. *
  4740. */
  4741. function tripal_core_chado_pubauthor_schema () {
  4742. $description = array();
  4743. $description = array(
  4744. 'table' => 'pubauthor',
  4745. // 'description' => 'TODO: please describe this table!',
  4746. 'fields' => array(
  4747. 'pubauthor_id' => array(
  4748. // 'description' => 'TODO: please describe this field!',
  4749. 'type' => 'serial',
  4750. 'not null' => '1',
  4751. ),
  4752. 'pub_id' => array(
  4753. // 'description' => 'TODO: please describe this field!',
  4754. 'type' => 'int',
  4755. 'not null' => '1',
  4756. ),
  4757. 'rank' => array(
  4758. // 'description' => 'TODO: please describe this field!',
  4759. 'type' => 'int',
  4760. 'not null' => '1',
  4761. ),
  4762. 'editor' => array(
  4763. // 'description' => 'TODO: please describe this field!',
  4764. 'type' => 'boolean',
  4765. 'not null' => '',
  4766. 'default' => 'als',
  4767. ),
  4768. 'surname' => array(
  4769. // 'description' => 'TODO: please describe this field!',
  4770. 'type' => 'varchar',
  4771. 'length' => '100',
  4772. 'not null' => '1',
  4773. ),
  4774. 'givennames' => array(
  4775. // 'description' => 'TODO: please describe this field!',
  4776. 'type' => 'varchar',
  4777. 'length' => '100',
  4778. 'not null' => '',
  4779. ),
  4780. 'suffix' => array(
  4781. // 'description' => 'TODO: please describe this field!',
  4782. 'type' => 'varchar',
  4783. 'length' => '100',
  4784. 'not null' => '',
  4785. ),
  4786. ),
  4787. 'primary key' => array(
  4788. '0' => 'pubauthor_id',
  4789. ),
  4790. 'unique keys' => array(
  4791. 'pubauthor_c1' => array(
  4792. '0' => 'pub_id',
  4793. '1' => 'rank',
  4794. ),
  4795. ),
  4796. 'indexes' => array(
  4797. 'pubauthor_idx2' => array(
  4798. '0' => 'pub_id',
  4799. ),
  4800. ),
  4801. 'foreign keys' => array(
  4802. ),
  4803. );
  4804. return $description;
  4805. }
  4806. /**
  4807. * Implements hook_pub_relationship_schema()
  4808. * Purpose: To describe the structure of pub_relationship to tripal
  4809. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4810. * @see tripal_core.api.inc: tripal_core_chado_update()
  4811. * @see tripal_core.api.inc: tripal_core_chado_select()
  4812. *
  4813. * @return
  4814. * An array describing the current table
  4815. *
  4816. * @ingroup tripal_schema_api
  4817. *
  4818. */
  4819. function tripal_core_chado_pub_relationship_schema () {
  4820. $description = array();
  4821. $description = array(
  4822. 'table' => 'pub_relationship',
  4823. // 'description' => 'TODO: please describe this table!',
  4824. 'fields' => array(
  4825. 'pub_relationship_id' => array(
  4826. // 'description' => 'TODO: please describe this field!',
  4827. 'type' => 'serial',
  4828. 'not null' => '1',
  4829. ),
  4830. 'subject_id' => array(
  4831. // 'description' => 'TODO: please describe this field!',
  4832. 'type' => 'int',
  4833. 'not null' => '1',
  4834. ),
  4835. 'object_id' => array(
  4836. // 'description' => 'TODO: please describe this field!',
  4837. 'type' => 'int',
  4838. 'not null' => '1',
  4839. ),
  4840. 'type_id' => array(
  4841. // 'description' => 'TODO: please describe this field!',
  4842. 'type' => 'int',
  4843. 'not null' => '1',
  4844. ),
  4845. ),
  4846. 'primary key' => array(
  4847. '0' => 'pub_relationship_id',
  4848. ),
  4849. 'unique keys' => array(
  4850. 'pub_relationship_c1' => array(
  4851. '0' => 'subject_id',
  4852. '1' => 'object_id',
  4853. '2' => 'type_id',
  4854. ),
  4855. ),
  4856. 'indexes' => array(
  4857. 'pub_relationship_idx1' => array(
  4858. '0' => 'subject_id',
  4859. ),
  4860. 'pub_relationship_idx2' => array(
  4861. '0' => 'object_id',
  4862. ),
  4863. 'pub_relationship_idx3' => array(
  4864. '0' => 'type_id',
  4865. ),
  4866. ),
  4867. 'foreign keys' => array(
  4868. ),
  4869. );
  4870. return $description;
  4871. }
  4872. /**
  4873. * Implements hook_protocol_schema()
  4874. * Purpose: To describe the structure of protocol to tripal
  4875. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4876. * @see tripal_core.api.inc: tripal_core_chado_update()
  4877. * @see tripal_core.api.inc: tripal_core_chado_select()
  4878. *
  4879. * @return
  4880. * An array describing the current table
  4881. *
  4882. * @ingroup tripal_schema_api
  4883. *
  4884. */
  4885. function tripal_core_chado_protocol_schema () {
  4886. $description = array();
  4887. $description = array(
  4888. 'table' => 'protocol',
  4889. // 'description' => 'TODO: please describe this table!',
  4890. 'fields' => array(
  4891. 'protocol_id' => array(
  4892. // 'description' => 'TODO: please describe this field!',
  4893. 'type' => 'serial',
  4894. 'not null' => '1',
  4895. ),
  4896. 'type_id' => array(
  4897. // 'description' => 'TODO: please describe this field!',
  4898. 'type' => 'int',
  4899. 'not null' => '1',
  4900. ),
  4901. 'pub_id' => array(
  4902. // 'description' => 'TODO: please describe this field!',
  4903. 'type' => 'int',
  4904. 'not null' => '',
  4905. ),
  4906. 'dbxref_id' => array(
  4907. // 'description' => 'TODO: please describe this field!',
  4908. 'type' => 'int',
  4909. 'not null' => '',
  4910. ),
  4911. 'name' => array(
  4912. // 'description' => 'TODO: please describe this field!',
  4913. 'type' => 'text',
  4914. 'not null' => '1',
  4915. ),
  4916. 'uri' => array(
  4917. // 'description' => 'TODO: please describe this field!',
  4918. 'type' => 'text',
  4919. 'not null' => '',
  4920. ),
  4921. 'protocoldescription' => array(
  4922. // 'description' => 'TODO: please describe this field!',
  4923. 'type' => 'text',
  4924. 'not null' => '',
  4925. ),
  4926. 'hardwaredescription' => array(
  4927. // 'description' => 'TODO: please describe this field!',
  4928. 'type' => 'text',
  4929. 'not null' => '',
  4930. ),
  4931. 'softwaredescription' => array(
  4932. // 'description' => 'TODO: please describe this field!',
  4933. 'type' => 'text',
  4934. 'not null' => '',
  4935. ),
  4936. ),
  4937. 'primary key' => array(
  4938. '0' => 'protocol_id',
  4939. ),
  4940. 'unique keys' => array(
  4941. 'protocol_c1' => array(
  4942. '0' => 'name',
  4943. ),
  4944. ),
  4945. 'indexes' => array(
  4946. 'protocol_idx1' => array(
  4947. '0' => 'type_id',
  4948. ),
  4949. 'protocol_idx2' => array(
  4950. '0' => 'pub_id',
  4951. ),
  4952. 'protocol_idx3' => array(
  4953. '0' => 'dbxref_id',
  4954. ),
  4955. ),
  4956. 'foreign keys' => array(
  4957. ),
  4958. );
  4959. return $description;
  4960. }
  4961. /**
  4962. * Implements hook_protocolparam_schema()
  4963. * Purpose: To describe the structure of protocolparam to tripal
  4964. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4965. * @see tripal_core.api.inc: tripal_core_chado_update()
  4966. * @see tripal_core.api.inc: tripal_core_chado_select()
  4967. *
  4968. * @return
  4969. * An array describing the current table
  4970. *
  4971. * @ingroup tripal_schema_api
  4972. *
  4973. */
  4974. function tripal_core_chado_protocolparam_schema () {
  4975. $description = array();
  4976. $description = array(
  4977. 'table' => 'protocolparam',
  4978. // 'description' => 'TODO: please describe this table!',
  4979. 'fields' => array(
  4980. 'protocolparam_id' => array(
  4981. // 'description' => 'TODO: please describe this field!',
  4982. 'type' => 'serial',
  4983. 'not null' => '1',
  4984. ),
  4985. 'protocol_id' => array(
  4986. // 'description' => 'TODO: please describe this field!',
  4987. 'type' => 'int',
  4988. 'not null' => '1',
  4989. ),
  4990. 'name' => array(
  4991. // 'description' => 'TODO: please describe this field!',
  4992. 'type' => 'text',
  4993. 'not null' => '1',
  4994. ),
  4995. 'datatype_id' => array(
  4996. // 'description' => 'TODO: please describe this field!',
  4997. 'type' => 'int',
  4998. 'not null' => '',
  4999. ),
  5000. 'unittype_id' => array(
  5001. // 'description' => 'TODO: please describe this field!',
  5002. 'type' => 'int',
  5003. 'not null' => '',
  5004. ),
  5005. 'value' => array(
  5006. // 'description' => 'TODO: please describe this field!',
  5007. 'type' => 'text',
  5008. 'not null' => '',
  5009. ),
  5010. 'rank' => array(
  5011. // 'description' => 'TODO: please describe this field!',
  5012. 'type' => 'int',
  5013. 'not null' => '1',
  5014. 'default' => '0',
  5015. ),
  5016. ),
  5017. 'primary key' => array(
  5018. '0' => 'protocolparam_id',
  5019. ),
  5020. 'unique keys' => array(
  5021. ),
  5022. 'indexes' => array(
  5023. 'protocolparam_idx1' => array(
  5024. '0' => 'protocol_id',
  5025. ),
  5026. 'protocolparam_idx2' => array(
  5027. '0' => 'datatype_id',
  5028. ),
  5029. 'protocolparam_idx3' => array(
  5030. '0' => 'unittype_id',
  5031. ),
  5032. ),
  5033. 'foreign keys' => array(
  5034. ),
  5035. );
  5036. return $description;
  5037. }
  5038. /**
  5039. * Implements hook_pub_schema()
  5040. * Purpose: To describe the structure of pub to tripal
  5041. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5042. * @see tripal_core.api.inc: tripal_core_chado_update()
  5043. * @see tripal_core.api.inc: tripal_core_chado_select()
  5044. *
  5045. * @return
  5046. * An array describing the current table
  5047. *
  5048. * @ingroup tripal_schema_api
  5049. *
  5050. */
  5051. function tripal_core_chado_pub_schema () {
  5052. $description = array();
  5053. $description = array(
  5054. 'table' => 'pub',
  5055. // 'description' => 'TODO: please describe this table!',
  5056. 'fields' => array(
  5057. 'pub_id' => array(
  5058. // 'description' => 'TODO: please describe this field!',
  5059. 'type' => 'serial',
  5060. 'not null' => '1',
  5061. ),
  5062. 'title' => array(
  5063. // 'description' => 'TODO: please describe this field!',
  5064. 'type' => 'text',
  5065. 'not null' => '',
  5066. ),
  5067. 'volumetitle' => array(
  5068. // 'description' => 'TODO: please describe this field!',
  5069. 'type' => 'text',
  5070. 'not null' => '',
  5071. ),
  5072. 'volume' => array(
  5073. // 'description' => 'TODO: please describe this field!',
  5074. 'type' => 'varchar',
  5075. 'length' => '255',
  5076. 'not null' => '',
  5077. ),
  5078. 'series_name' => array(
  5079. // 'description' => 'TODO: please describe this field!',
  5080. 'type' => 'varchar',
  5081. 'length' => '255',
  5082. 'not null' => '',
  5083. ),
  5084. 'issue' => array(
  5085. // 'description' => 'TODO: please describe this field!',
  5086. 'type' => 'varchar',
  5087. 'length' => '255',
  5088. 'not null' => '',
  5089. ),
  5090. 'pyear' => array(
  5091. // 'description' => 'TODO: please describe this field!',
  5092. 'type' => 'varchar',
  5093. 'length' => '255',
  5094. 'not null' => '',
  5095. ),
  5096. 'pages' => array(
  5097. // 'description' => 'TODO: please describe this field!',
  5098. 'type' => 'varchar',
  5099. 'length' => '255',
  5100. 'not null' => '',
  5101. ),
  5102. 'miniref' => array(
  5103. // 'description' => 'TODO: please describe this field!',
  5104. 'type' => 'varchar',
  5105. 'length' => '255',
  5106. 'not null' => '',
  5107. ),
  5108. 'uniquename' => array(
  5109. // 'description' => 'TODO: please describe this field!',
  5110. 'type' => 'text',
  5111. 'not null' => '1',
  5112. ),
  5113. 'type_id' => array(
  5114. // 'description' => 'TODO: please describe this field!',
  5115. 'type' => 'int',
  5116. 'not null' => '1',
  5117. ),
  5118. 'is_obsolete' => array(
  5119. // 'description' => 'TODO: please describe this field!',
  5120. 'type' => 'boolean',
  5121. 'not null' => '',
  5122. 'default' => 'als',
  5123. ),
  5124. 'publisher' => array(
  5125. // 'description' => 'TODO: please describe this field!',
  5126. 'type' => 'varchar',
  5127. 'length' => '255',
  5128. 'not null' => '',
  5129. ),
  5130. 'pubplace' => array(
  5131. // 'description' => 'TODO: please describe this field!',
  5132. 'type' => 'varchar',
  5133. 'length' => '255',
  5134. 'not null' => '',
  5135. ),
  5136. ),
  5137. 'primary key' => array(
  5138. '0' => 'pub_id',
  5139. ),
  5140. 'unique keys' => array(
  5141. 'pub_c1' => array(
  5142. '0' => 'uniquename',
  5143. ),
  5144. ),
  5145. 'indexes' => array(
  5146. 'pub_idx1' => array(
  5147. '0' => 'type_id',
  5148. ),
  5149. ),
  5150. 'foreign keys' => array(
  5151. ),
  5152. );
  5153. return $description;
  5154. }
  5155. /**
  5156. * Implements hook_pub_dbxref_schema()
  5157. * Purpose: To describe the structure of pub_dbxref to tripal
  5158. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5159. * @see tripal_core.api.inc: tripal_core_chado_update()
  5160. * @see tripal_core.api.inc: tripal_core_chado_select()
  5161. *
  5162. * @return
  5163. * An array describing the current table
  5164. *
  5165. * @ingroup tripal_schema_api
  5166. *
  5167. */
  5168. function tripal_core_chado_pub_dbxref_schema () {
  5169. $description = array();
  5170. $description = array(
  5171. 'table' => 'pub_dbxref',
  5172. // 'description' => 'TODO: please describe this table!',
  5173. 'fields' => array(
  5174. 'pub_dbxref_id' => array(
  5175. // 'description' => 'TODO: please describe this field!',
  5176. 'type' => 'serial',
  5177. 'not null' => '1',
  5178. ),
  5179. 'pub_id' => array(
  5180. // 'description' => 'TODO: please describe this field!',
  5181. 'type' => 'int',
  5182. 'not null' => '1',
  5183. ),
  5184. 'dbxref_id' => array(
  5185. // 'description' => 'TODO: please describe this field!',
  5186. 'type' => 'int',
  5187. 'not null' => '1',
  5188. ),
  5189. 'is_current' => array(
  5190. // 'description' => 'TODO: please describe this field!',
  5191. 'type' => 'boolean',
  5192. 'not null' => '1',
  5193. 'default' => 'ru',
  5194. ),
  5195. ),
  5196. 'primary key' => array(
  5197. '0' => 'pub_dbxref_id',
  5198. ),
  5199. 'unique keys' => array(
  5200. 'pub_dbxref_c1' => array(
  5201. '0' => 'pub_id',
  5202. '1' => 'dbxref_id',
  5203. ),
  5204. ),
  5205. 'indexes' => array(
  5206. 'pub_dbxref_idx1' => array(
  5207. '0' => 'pub_id',
  5208. ),
  5209. 'pub_dbxref_idx2' => array(
  5210. '0' => 'dbxref_id',
  5211. ),
  5212. ),
  5213. 'foreign keys' => array(
  5214. ),
  5215. );
  5216. return $description;
  5217. }
  5218. /**
  5219. * Implements hook_quantification_schema()
  5220. * Purpose: To describe the structure of quantification to tripal
  5221. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5222. * @see tripal_core.api.inc: tripal_core_chado_update()
  5223. * @see tripal_core.api.inc: tripal_core_chado_select()
  5224. *
  5225. * @return
  5226. * An array describing the current table
  5227. *
  5228. * @ingroup tripal_schema_api
  5229. *
  5230. */
  5231. function tripal_core_chado_quantification_schema () {
  5232. $description = array();
  5233. $description = array(
  5234. 'table' => 'quantification',
  5235. // 'description' => 'TODO: please describe this table!',
  5236. 'fields' => array(
  5237. 'quantification_id' => array(
  5238. // 'description' => 'TODO: please describe this field!',
  5239. 'type' => 'serial',
  5240. 'not null' => '1',
  5241. ),
  5242. 'acquisition_id' => array(
  5243. // 'description' => 'TODO: please describe this field!',
  5244. 'type' => 'int',
  5245. 'not null' => '1',
  5246. ),
  5247. 'operator_id' => array(
  5248. // 'description' => 'TODO: please describe this field!',
  5249. 'type' => 'int',
  5250. 'not null' => '',
  5251. ),
  5252. 'protocol_id' => array(
  5253. // 'description' => 'TODO: please describe this field!',
  5254. 'type' => 'int',
  5255. 'not null' => '',
  5256. ),
  5257. 'analysis_id' => array(
  5258. // 'description' => 'TODO: please describe this field!',
  5259. 'type' => 'int',
  5260. 'not null' => '1',
  5261. ),
  5262. 'quantificationdate' => array(
  5263. // 'description' => 'TODO: please describe this field!',
  5264. 'type' => 'datetime',
  5265. 'not null' => '',
  5266. 'default' => 'ow(',
  5267. ),
  5268. 'name' => array(
  5269. // 'description' => 'TODO: please describe this field!',
  5270. 'type' => 'text',
  5271. 'not null' => '',
  5272. ),
  5273. 'uri' => array(
  5274. // 'description' => 'TODO: please describe this field!',
  5275. 'type' => 'text',
  5276. 'not null' => '',
  5277. ),
  5278. ),
  5279. 'primary key' => array(
  5280. '0' => 'quantification_id',
  5281. ),
  5282. 'unique keys' => array(
  5283. 'quantification_c1' => array(
  5284. '0' => 'name',
  5285. '1' => 'analysis_id',
  5286. ),
  5287. ),
  5288. 'indexes' => array(
  5289. 'quantification_idx1' => array(
  5290. '0' => 'acquisition_id',
  5291. ),
  5292. 'quantification_idx2' => array(
  5293. '0' => 'operator_id',
  5294. ),
  5295. 'quantification_idx3' => array(
  5296. '0' => 'protocol_id',
  5297. ),
  5298. 'quantification_idx4' => array(
  5299. '0' => 'analysis_id',
  5300. ),
  5301. ),
  5302. 'foreign keys' => array(
  5303. ),
  5304. );
  5305. return $description;
  5306. }
  5307. /**
  5308. * Implements hook_quantification_relationship_schema()
  5309. * Purpose: To describe the structure of quantification_relationship to tripal
  5310. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5311. * @see tripal_core.api.inc: tripal_core_chado_update()
  5312. * @see tripal_core.api.inc: tripal_core_chado_select()
  5313. *
  5314. * @return
  5315. * An array describing the current table
  5316. *
  5317. * @ingroup tripal_schema_api
  5318. *
  5319. */
  5320. function tripal_core_chado_quantification_relationship_schema () {
  5321. $description = array();
  5322. $description = array(
  5323. 'table' => 'quantification_relationship',
  5324. // 'description' => 'TODO: please describe this table!',
  5325. 'fields' => array(
  5326. 'quantification_relationship_id' => array(
  5327. // 'description' => 'TODO: please describe this field!',
  5328. 'type' => 'serial',
  5329. 'not null' => '1',
  5330. ),
  5331. 'subject_id' => array(
  5332. // 'description' => 'TODO: please describe this field!',
  5333. 'type' => 'int',
  5334. 'not null' => '1',
  5335. ),
  5336. 'type_id' => array(
  5337. // 'description' => 'TODO: please describe this field!',
  5338. 'type' => 'int',
  5339. 'not null' => '1',
  5340. ),
  5341. 'object_id' => array(
  5342. // 'description' => 'TODO: please describe this field!',
  5343. 'type' => 'int',
  5344. 'not null' => '1',
  5345. ),
  5346. ),
  5347. 'primary key' => array(
  5348. '0' => 'quantification_relationship_id',
  5349. ),
  5350. 'unique keys' => array(
  5351. 'quantification_relationship_c1' => array(
  5352. '0' => 'subject_id',
  5353. '1' => 'object_id',
  5354. '2' => 'type_id',
  5355. ),
  5356. ),
  5357. 'indexes' => array(
  5358. 'quantification_relationship_idx1' => array(
  5359. '0' => 'subject_id',
  5360. ),
  5361. 'quantification_relationship_idx2' => array(
  5362. '0' => 'type_id',
  5363. ),
  5364. 'quantification_relationship_idx3' => array(
  5365. '0' => 'object_id',
  5366. ),
  5367. ),
  5368. 'foreign keys' => array(
  5369. ),
  5370. );
  5371. return $description;
  5372. }
  5373. /**
  5374. * Implements hook_stock_pub_schema()
  5375. * Purpose: To describe the structure of stock_pub to tripal
  5376. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5377. * @see tripal_core.api.inc: tripal_core_chado_update()
  5378. * @see tripal_core.api.inc: tripal_core_chado_select()
  5379. *
  5380. * @return
  5381. * An array describing the current table
  5382. *
  5383. * @ingroup tripal_schema_api
  5384. *
  5385. */
  5386. function tripal_core_chado_stock_pub_schema () {
  5387. $description = array();
  5388. $description = array(
  5389. 'table' => 'stock_pub',
  5390. // 'description' => 'TODO: please describe this table!',
  5391. 'fields' => array(
  5392. 'stock_pub_id' => array(
  5393. // 'description' => 'TODO: please describe this field!',
  5394. 'type' => 'serial',
  5395. 'not null' => '1',
  5396. ),
  5397. 'stock_id' => array(
  5398. // 'description' => 'TODO: please describe this field!',
  5399. 'type' => 'int',
  5400. 'not null' => '1',
  5401. ),
  5402. 'pub_id' => array(
  5403. // 'description' => 'TODO: please describe this field!',
  5404. 'type' => 'int',
  5405. 'not null' => '1',
  5406. ),
  5407. ),
  5408. 'primary key' => array(
  5409. '0' => 'stock_pub_id',
  5410. ),
  5411. 'unique keys' => array(
  5412. 'stock_pub_c1' => array(
  5413. '0' => 'stock_id',
  5414. '1' => 'pub_id',
  5415. ),
  5416. ),
  5417. 'indexes' => array(
  5418. 'stock_pub_idx1' => array(
  5419. '0' => 'stock_id',
  5420. ),
  5421. 'stock_pub_idx2' => array(
  5422. '0' => 'pub_id',
  5423. ),
  5424. ),
  5425. 'foreign keys' => array(
  5426. ),
  5427. );
  5428. return $description;
  5429. }
  5430. /**
  5431. * Implements hook_stock_relationship_schema()
  5432. * Purpose: To describe the structure of stock_relationship to tripal
  5433. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5434. * @see tripal_core.api.inc: tripal_core_chado_update()
  5435. * @see tripal_core.api.inc: tripal_core_chado_select()
  5436. *
  5437. * @return
  5438. * An array describing the current table
  5439. *
  5440. * @ingroup tripal_schema_api
  5441. *
  5442. */
  5443. function tripal_core_chado_stock_relationship_schema () {
  5444. $description = array();
  5445. $description = array(
  5446. 'table' => 'stock_relationship',
  5447. // 'description' => 'TODO: please describe this table!',
  5448. 'fields' => array(
  5449. 'stock_relationship_id' => array(
  5450. // 'description' => 'TODO: please describe this field!',
  5451. 'type' => 'serial',
  5452. 'not null' => '1',
  5453. ),
  5454. 'subject_id' => array(
  5455. // 'description' => 'TODO: please describe this field!',
  5456. 'type' => 'int',
  5457. 'not null' => '1',
  5458. ),
  5459. 'object_id' => array(
  5460. // 'description' => 'TODO: please describe this field!',
  5461. 'type' => 'int',
  5462. 'not null' => '1',
  5463. ),
  5464. 'type_id' => array(
  5465. // 'description' => 'TODO: please describe this field!',
  5466. 'type' => 'int',
  5467. 'not null' => '1',
  5468. ),
  5469. 'value' => array(
  5470. // 'description' => 'TODO: please describe this field!',
  5471. 'type' => 'text',
  5472. 'not null' => '',
  5473. ),
  5474. 'rank' => array(
  5475. // 'description' => 'TODO: please describe this field!',
  5476. 'type' => 'int',
  5477. 'not null' => '1',
  5478. 'default' => '0',
  5479. ),
  5480. ),
  5481. 'primary key' => array(
  5482. '0' => 'stock_relationship_id',
  5483. ),
  5484. 'unique keys' => array(
  5485. 'stock_relationship_c1' => array(
  5486. '0' => 'subject_id',
  5487. '1' => 'object_id',
  5488. '2' => 'type_id',
  5489. '3' => 'rank',
  5490. ),
  5491. ),
  5492. 'indexes' => array(
  5493. 'stock_relationship_idx1' => array(
  5494. '0' => 'subject_id',
  5495. ),
  5496. 'stock_relationship_idx2' => array(
  5497. '0' => 'object_id',
  5498. ),
  5499. 'stock_relationship_idx3' => array(
  5500. '0' => 'type_id',
  5501. ),
  5502. ),
  5503. 'foreign keys' => array(
  5504. ),
  5505. );
  5506. return $description;
  5507. }
  5508. /**
  5509. * Implements hook_stock_relationship_pub_schema()
  5510. * Purpose: To describe the structure of stock_relationship_pub to tripal
  5511. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5512. * @see tripal_core.api.inc: tripal_core_chado_update()
  5513. * @see tripal_core.api.inc: tripal_core_chado_select()
  5514. *
  5515. * @return
  5516. * An array describing the current table
  5517. *
  5518. * @ingroup tripal_schema_api
  5519. *
  5520. */
  5521. function tripal_core_chado_stock_relationship_pub_schema () {
  5522. $description = array();
  5523. $description = array(
  5524. 'table' => 'stock_relationship_pub',
  5525. // 'description' => 'TODO: please describe this table!',
  5526. 'fields' => array(
  5527. 'stock_relationship_pub_id' => array(
  5528. // 'description' => 'TODO: please describe this field!',
  5529. 'type' => 'serial',
  5530. 'not null' => '1',
  5531. ),
  5532. 'stock_relationship_id' => array(
  5533. // 'description' => 'TODO: please describe this field!',
  5534. 'type' => 'int',
  5535. 'not null' => '1',
  5536. ),
  5537. 'pub_id' => array(
  5538. // 'description' => 'TODO: please describe this field!',
  5539. 'type' => 'int',
  5540. 'not null' => '1',
  5541. ),
  5542. ),
  5543. 'primary key' => array(
  5544. '0' => 'stock_relationship_pub_id',
  5545. ),
  5546. 'unique keys' => array(
  5547. 'stock_relationship_pub_c1' => array(
  5548. '0' => 'stock_relationship_id',
  5549. '1' => 'pub_id',
  5550. ),
  5551. ),
  5552. 'indexes' => array(
  5553. 'stock_relationship_pub_idx1' => array(
  5554. '0' => 'stock_relationship_id',
  5555. ),
  5556. 'stock_relationship_pub_idx2' => array(
  5557. '0' => 'pub_id',
  5558. ),
  5559. ),
  5560. 'foreign keys' => array(
  5561. ),
  5562. );
  5563. return $description;
  5564. }
  5565. /**
  5566. * Implements hook_stockcollection_schema()
  5567. * Purpose: To describe the structure of stockcollection to tripal
  5568. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5569. * @see tripal_core.api.inc: tripal_core_chado_update()
  5570. * @see tripal_core.api.inc: tripal_core_chado_select()
  5571. *
  5572. * @return
  5573. * An array describing the current table
  5574. *
  5575. * @ingroup tripal_schema_api
  5576. *
  5577. */
  5578. function tripal_core_chado_stockcollection_schema () {
  5579. $description = array();
  5580. $description = array(
  5581. 'table' => 'stockcollection',
  5582. // 'description' => 'TODO: please describe this table!',
  5583. 'fields' => array(
  5584. 'stockcollection_id' => array(
  5585. // 'description' => 'TODO: please describe this field!',
  5586. 'type' => 'serial',
  5587. 'not null' => '1',
  5588. ),
  5589. 'type_id' => array(
  5590. // 'description' => 'TODO: please describe this field!',
  5591. 'type' => 'int',
  5592. 'not null' => '1',
  5593. ),
  5594. 'contact_id' => array(
  5595. // 'description' => 'TODO: please describe this field!',
  5596. 'type' => 'int',
  5597. 'not null' => '',
  5598. ),
  5599. 'name' => array(
  5600. // 'description' => 'TODO: please describe this field!',
  5601. 'type' => 'varchar',
  5602. 'length' => '255',
  5603. 'not null' => '',
  5604. ),
  5605. 'uniquename' => array(
  5606. // 'description' => 'TODO: please describe this field!',
  5607. 'type' => 'text',
  5608. 'not null' => '1',
  5609. ),
  5610. ),
  5611. 'primary key' => array(
  5612. '0' => 'stockcollection_id',
  5613. ),
  5614. 'unique keys' => array(
  5615. 'stockcollection_c1' => array(
  5616. '0' => 'uniquename',
  5617. '1' => 'type_id',
  5618. ),
  5619. ),
  5620. 'indexes' => array(
  5621. 'stockcollection_idx1' => array(
  5622. '0' => 'contact_id',
  5623. ),
  5624. 'stockcollection_idx2' => array(
  5625. '0' => 'type_id',
  5626. ),
  5627. 'stockcollection_idx3' => array(
  5628. '0' => 'uniquename',
  5629. ),
  5630. 'stockcollection_name_ind1' => array(
  5631. '0' => 'name',
  5632. ),
  5633. ),
  5634. 'foreign keys' => array(
  5635. ),
  5636. );
  5637. return $description;
  5638. }
  5639. /**
  5640. * Implements hook_stock_genotype_schema()
  5641. * Purpose: To describe the structure of stock_genotype to tripal
  5642. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5643. * @see tripal_core.api.inc: tripal_core_chado_update()
  5644. * @see tripal_core.api.inc: tripal_core_chado_select()
  5645. *
  5646. * @return
  5647. * An array describing the current table
  5648. *
  5649. * @ingroup tripal_schema_api
  5650. *
  5651. */
  5652. function tripal_core_chado_stock_genotype_schema () {
  5653. $description = array();
  5654. $description = array(
  5655. 'table' => 'stock_genotype',
  5656. // 'description' => 'TODO: please describe this table!',
  5657. 'fields' => array(
  5658. 'stock_genotype_id' => array(
  5659. // 'description' => 'TODO: please describe this field!',
  5660. 'type' => 'serial',
  5661. 'not null' => '1',
  5662. ),
  5663. 'stock_id' => array(
  5664. // 'description' => 'TODO: please describe this field!',
  5665. 'type' => 'int',
  5666. 'not null' => '1',
  5667. ),
  5668. 'genotype_id' => array(
  5669. // 'description' => 'TODO: please describe this field!',
  5670. 'type' => 'int',
  5671. 'not null' => '1',
  5672. ),
  5673. ),
  5674. 'primary key' => array(
  5675. '0' => 'stock_genotype_id',
  5676. ),
  5677. 'unique keys' => array(
  5678. 'stock_genotype_c1' => array(
  5679. '0' => 'stock_id',
  5680. '1' => 'genotype_id',
  5681. ),
  5682. ),
  5683. 'indexes' => array(
  5684. 'stock_genotype_idx1' => array(
  5685. '0' => 'stock_id',
  5686. ),
  5687. 'stock_genotype_idx2' => array(
  5688. '0' => 'genotype_id',
  5689. ),
  5690. ),
  5691. 'foreign keys' => array(
  5692. ),
  5693. );
  5694. return $description;
  5695. }
  5696. /**
  5697. * Implements hook_stock_dbxref_schema()
  5698. * Purpose: To describe the structure of stock_dbxref to tripal
  5699. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5700. * @see tripal_core.api.inc: tripal_core_chado_update()
  5701. * @see tripal_core.api.inc: tripal_core_chado_select()
  5702. *
  5703. * @return
  5704. * An array describing the current table
  5705. *
  5706. * @ingroup tripal_schema_api
  5707. *
  5708. */
  5709. function tripal_core_chado_stock_dbxref_schema () {
  5710. $description = array();
  5711. $description = array(
  5712. 'table' => 'stock_dbxref',
  5713. // 'description' => 'TODO: please describe this table!',
  5714. 'fields' => array(
  5715. 'stock_dbxref_id' => array(
  5716. // 'description' => 'TODO: please describe this field!',
  5717. 'type' => 'serial',
  5718. 'not null' => '1',
  5719. ),
  5720. 'stock_id' => array(
  5721. // 'description' => 'TODO: please describe this field!',
  5722. 'type' => 'int',
  5723. 'not null' => '1',
  5724. ),
  5725. 'dbxref_id' => array(
  5726. // 'description' => 'TODO: please describe this field!',
  5727. 'type' => 'int',
  5728. 'not null' => '1',
  5729. ),
  5730. 'is_current' => array(
  5731. // 'description' => 'TODO: please describe this field!',
  5732. 'type' => 'boolean',
  5733. 'not null' => '1',
  5734. 'default' => 'ru',
  5735. ),
  5736. ),
  5737. 'primary key' => array(
  5738. '0' => 'stock_dbxref_id',
  5739. ),
  5740. 'unique keys' => array(
  5741. 'stock_dbxref_c1' => array(
  5742. '0' => 'stock_id',
  5743. '1' => 'dbxref_id',
  5744. ),
  5745. ),
  5746. 'indexes' => array(
  5747. 'stock_dbxref_idx1' => array(
  5748. '0' => 'stock_id',
  5749. ),
  5750. 'stock_dbxref_idx2' => array(
  5751. '0' => 'dbxref_id',
  5752. ),
  5753. ),
  5754. 'foreign keys' => array(
  5755. ),
  5756. );
  5757. return $description;
  5758. }
  5759. /**
  5760. * Implements hook_quantificationprop_schema()
  5761. * Purpose: To describe the structure of quantificationprop to tripal
  5762. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5763. * @see tripal_core.api.inc: tripal_core_chado_update()
  5764. * @see tripal_core.api.inc: tripal_core_chado_select()
  5765. *
  5766. * @return
  5767. * An array describing the current table
  5768. *
  5769. * @ingroup tripal_schema_api
  5770. *
  5771. */
  5772. function tripal_core_chado_quantificationprop_schema () {
  5773. $description = array();
  5774. $description = array(
  5775. 'table' => 'quantificationprop',
  5776. // 'description' => 'TODO: please describe this table!',
  5777. 'fields' => array(
  5778. 'quantificationprop_id' => array(
  5779. // 'description' => 'TODO: please describe this field!',
  5780. 'type' => 'serial',
  5781. 'not null' => '1',
  5782. ),
  5783. 'quantification_id' => array(
  5784. // 'description' => 'TODO: please describe this field!',
  5785. 'type' => 'int',
  5786. 'not null' => '1',
  5787. ),
  5788. 'type_id' => array(
  5789. // 'description' => 'TODO: please describe this field!',
  5790. 'type' => 'int',
  5791. 'not null' => '1',
  5792. ),
  5793. 'value' => array(
  5794. // 'description' => 'TODO: please describe this field!',
  5795. 'type' => 'text',
  5796. 'not null' => '',
  5797. ),
  5798. 'rank' => array(
  5799. // 'description' => 'TODO: please describe this field!',
  5800. 'type' => 'int',
  5801. 'not null' => '1',
  5802. 'default' => '0',
  5803. ),
  5804. ),
  5805. 'primary key' => array(
  5806. '0' => 'quantificationprop_id',
  5807. ),
  5808. 'unique keys' => array(
  5809. 'quantificationprop_c1' => array(
  5810. '0' => 'quantification_id',
  5811. '1' => 'type_id',
  5812. '2' => 'rank',
  5813. ),
  5814. ),
  5815. 'indexes' => array(
  5816. 'quantificationprop_idx1' => array(
  5817. '0' => 'quantification_id',
  5818. ),
  5819. 'quantificationprop_idx2' => array(
  5820. '0' => 'type_id',
  5821. ),
  5822. ),
  5823. 'foreign keys' => array(
  5824. ),
  5825. );
  5826. return $description;
  5827. }
  5828. /**
  5829. * Implements hook_stats_paths_to_root_schema()
  5830. * Purpose: To describe the structure of stats_paths_to_root to tripal
  5831. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5832. * @see tripal_core.api.inc: tripal_core_chado_update()
  5833. * @see tripal_core.api.inc: tripal_core_chado_select()
  5834. *
  5835. * @return
  5836. * An array describing the current table
  5837. *
  5838. * @ingroup tripal_schema_api
  5839. *
  5840. */
  5841. function tripal_core_chado_stats_paths_to_root_schema () {
  5842. $description = array();
  5843. $description = array(
  5844. 'table' => 'stats_paths_to_root',
  5845. // 'description' => 'TODO: please describe this table!',
  5846. 'fields' => array(
  5847. 'cvterm_id' => array(
  5848. // 'description' => 'TODO: please describe this field!',
  5849. 'type' => 'int',
  5850. 'not null' => '',
  5851. ),
  5852. 'total_paths' => array(
  5853. // 'description' => 'TODO: please describe this field!',
  5854. 'type' => 'int',
  5855. 'size' => 'big',
  5856. 'not null' => '',
  5857. ),
  5858. 'avg_distance' => array(
  5859. // 'description' => 'TODO: please describe this field!',
  5860. 'type' => 'numeric',
  5861. 'not null' => '',
  5862. 'precision' => '0',
  5863. 'scale' => '0',
  5864. ),
  5865. 'min_distance' => array(
  5866. // 'description' => 'TODO: please describe this field!',
  5867. 'type' => 'int',
  5868. 'not null' => '',
  5869. ),
  5870. 'max_distance' => array(
  5871. // 'description' => 'TODO: please describe this field!',
  5872. 'type' => 'int',
  5873. 'not null' => '',
  5874. ),
  5875. ),
  5876. 'primary key' => array(
  5877. ),
  5878. 'unique keys' => array(
  5879. ),
  5880. 'indexes' => array(
  5881. ),
  5882. 'foreign keys' => array(
  5883. ),
  5884. );
  5885. return $description;
  5886. }
  5887. /**
  5888. * Implements hook_stock_schema()
  5889. * Purpose: To describe the structure of stock to tripal
  5890. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5891. * @see tripal_core.api.inc: tripal_core_chado_update()
  5892. * @see tripal_core.api.inc: tripal_core_chado_select()
  5893. *
  5894. * @return
  5895. * An array describing the current table
  5896. *
  5897. * @ingroup tripal_schema_api
  5898. *
  5899. */
  5900. function tripal_core_chado_stock_schema () {
  5901. $description = array();
  5902. $description = array(
  5903. 'table' => 'stock',
  5904. // 'description' => 'TODO: please describe this table!',
  5905. 'fields' => array(
  5906. 'stock_id' => array(
  5907. // 'description' => 'TODO: please describe this field!',
  5908. 'type' => 'serial',
  5909. 'not null' => '1',
  5910. ),
  5911. 'dbxref_id' => array(
  5912. // 'description' => 'TODO: please describe this field!',
  5913. 'type' => 'int',
  5914. 'not null' => '',
  5915. ),
  5916. 'organism_id' => array(
  5917. // 'description' => 'TODO: please describe this field!',
  5918. 'type' => 'int',
  5919. 'not null' => '1',
  5920. ),
  5921. 'name' => array(
  5922. // 'description' => 'TODO: please describe this field!',
  5923. 'type' => 'varchar',
  5924. 'length' => '255',
  5925. 'not null' => '',
  5926. ),
  5927. 'uniquename' => array(
  5928. // 'description' => 'TODO: please describe this field!',
  5929. 'type' => 'text',
  5930. 'not null' => '1',
  5931. ),
  5932. 'description' => array(
  5933. // 'description' => 'TODO: please describe this field!',
  5934. 'type' => 'text',
  5935. 'not null' => '',
  5936. ),
  5937. 'type_id' => array(
  5938. // 'description' => 'TODO: please describe this field!',
  5939. 'type' => 'int',
  5940. 'not null' => '1',
  5941. ),
  5942. 'is_obsolete' => array(
  5943. // 'description' => 'TODO: please describe this field!',
  5944. 'type' => 'boolean',
  5945. 'not null' => '1',
  5946. 'default' => 'als',
  5947. ),
  5948. ),
  5949. 'primary key' => array(
  5950. '0' => 'stock_id',
  5951. ),
  5952. 'unique keys' => array(
  5953. 'stock_c1' => array(
  5954. '0' => 'organism_id',
  5955. '1' => 'uniquename',
  5956. '2' => 'type_id',
  5957. ),
  5958. ),
  5959. 'indexes' => array(
  5960. 'stock_idx1' => array(
  5961. '0' => 'dbxref_id',
  5962. ),
  5963. 'stock_idx2' => array(
  5964. '0' => 'organism_id',
  5965. ),
  5966. 'stock_idx3' => array(
  5967. '0' => 'type_id',
  5968. ),
  5969. 'stock_idx4' => array(
  5970. '0' => 'uniquename',
  5971. ),
  5972. 'stock_name_ind1' => array(
  5973. '0' => 'name',
  5974. ),
  5975. ),
  5976. 'foreign keys' => array(
  5977. ),
  5978. );
  5979. return $description;
  5980. }
  5981. /**
  5982. * Implements hook_stock_cvterm_schema()
  5983. * Purpose: To describe the structure of stock_cvterm to tripal
  5984. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5985. * @see tripal_core.api.inc: tripal_core_chado_update()
  5986. * @see tripal_core.api.inc: tripal_core_chado_select()
  5987. *
  5988. * @return
  5989. * An array describing the current table
  5990. *
  5991. * @ingroup tripal_schema_api
  5992. *
  5993. */
  5994. function tripal_core_chado_stock_cvterm_schema () {
  5995. $description = array();
  5996. $description = array(
  5997. 'table' => 'stock_cvterm',
  5998. // 'description' => 'TODO: please describe this table!',
  5999. 'fields' => array(
  6000. 'stock_cvterm_id' => array(
  6001. // 'description' => 'TODO: please describe this field!',
  6002. 'type' => 'serial',
  6003. 'not null' => '1',
  6004. ),
  6005. 'stock_id' => array(
  6006. // 'description' => 'TODO: please describe this field!',
  6007. 'type' => 'int',
  6008. 'not null' => '1',
  6009. ),
  6010. 'cvterm_id' => array(
  6011. // 'description' => 'TODO: please describe this field!',
  6012. 'type' => 'int',
  6013. 'not null' => '1',
  6014. ),
  6015. 'pub_id' => array(
  6016. // 'description' => 'TODO: please describe this field!',
  6017. 'type' => 'int',
  6018. 'not null' => '1',
  6019. ),
  6020. ),
  6021. 'primary key' => array(
  6022. '0' => 'stock_cvterm_id',
  6023. ),
  6024. 'unique keys' => array(
  6025. 'stock_cvterm_c1' => array(
  6026. '0' => 'stock_id',
  6027. '1' => 'cvterm_id',
  6028. '2' => 'pub_id',
  6029. ),
  6030. ),
  6031. 'indexes' => array(
  6032. 'stock_cvterm_idx1' => array(
  6033. '0' => 'stock_id',
  6034. ),
  6035. 'stock_cvterm_idx2' => array(
  6036. '0' => 'cvterm_id',
  6037. ),
  6038. 'stock_cvterm_idx3' => array(
  6039. '0' => 'pub_id',
  6040. ),
  6041. ),
  6042. 'foreign keys' => array(
  6043. ),
  6044. );
  6045. return $description;
  6046. }
  6047. /**
  6048. * Implements hook_feature_synonym_schema()
  6049. * Purpose: To describe the structure of feature_synonym to tripal
  6050. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6051. * @see tripal_core.api.inc: tripal_core_chado_update()
  6052. * @see tripal_core.api.inc: tripal_core_chado_select()
  6053. *
  6054. * @return
  6055. * An array describing the current table
  6056. *
  6057. * @ingroup tripal_schema_api
  6058. *
  6059. */
  6060. function tripal_core_chado_feature_synonym_schema () {
  6061. $description = array();
  6062. $description = array(
  6063. 'table' => 'feature_synonym',
  6064. // 'description' => 'TODO: please describe this table!',
  6065. 'fields' => array(
  6066. 'feature_synonym_id' => array(
  6067. // 'description' => 'TODO: please describe this field!',
  6068. 'type' => 'serial',
  6069. 'not null' => '1',
  6070. ),
  6071. 'synonym_id' => array(
  6072. // 'description' => 'TODO: please describe this field!',
  6073. 'type' => 'int',
  6074. 'not null' => '1',
  6075. ),
  6076. 'feature_id' => array(
  6077. // 'description' => 'TODO: please describe this field!',
  6078. 'type' => 'int',
  6079. 'not null' => '1',
  6080. ),
  6081. 'pub_id' => array(
  6082. // 'description' => 'TODO: please describe this field!',
  6083. 'type' => 'int',
  6084. 'not null' => '1',
  6085. ),
  6086. 'is_current' => array(
  6087. // 'description' => 'TODO: please describe this field!',
  6088. 'type' => 'boolean',
  6089. 'not null' => '1',
  6090. 'default' => 'als',
  6091. ),
  6092. 'is_internal' => array(
  6093. // 'description' => 'TODO: please describe this field!',
  6094. 'type' => 'boolean',
  6095. 'not null' => '1',
  6096. 'default' => 'als',
  6097. ),
  6098. ),
  6099. 'primary key' => array(
  6100. '0' => 'feature_synonym_id',
  6101. ),
  6102. 'unique keys' => array(
  6103. 'feature_synonym_c1' => array(
  6104. '0' => 'synonym_id',
  6105. '1' => 'feature_id',
  6106. '2' => 'pub_id',
  6107. ),
  6108. ),
  6109. 'indexes' => array(
  6110. 'feature_synonym_idx1' => array(
  6111. '0' => 'synonym_id',
  6112. ),
  6113. 'feature_synonym_idx2' => array(
  6114. '0' => 'feature_id',
  6115. ),
  6116. 'feature_synonym_idx3' => array(
  6117. '0' => 'pub_id',
  6118. ),
  6119. ),
  6120. 'foreign keys' => array(
  6121. ),
  6122. );
  6123. return $description;
  6124. }
  6125. /**
  6126. * Implements hook_feature_relationshipprop_pub_schema()
  6127. * Purpose: To describe the structure of feature_relationshipprop_pub to tripal
  6128. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6129. * @see tripal_core.api.inc: tripal_core_chado_update()
  6130. * @see tripal_core.api.inc: tripal_core_chado_select()
  6131. *
  6132. * @return
  6133. * An array describing the current table
  6134. *
  6135. * @ingroup tripal_schema_api
  6136. *
  6137. */
  6138. function tripal_core_chado_feature_relationshipprop_pub_schema () {
  6139. $description = array();
  6140. $description = array(
  6141. 'table' => 'feature_relationshipprop_pub',
  6142. // 'description' => 'TODO: please describe this table!',
  6143. 'fields' => array(
  6144. 'feature_relationshipprop_pub_id' => array(
  6145. // 'description' => 'TODO: please describe this field!',
  6146. 'type' => 'serial',
  6147. 'not null' => '1',
  6148. ),
  6149. 'feature_relationshipprop_id' => array(
  6150. // 'description' => 'TODO: please describe this field!',
  6151. 'type' => 'int',
  6152. 'not null' => '1',
  6153. ),
  6154. 'pub_id' => array(
  6155. // 'description' => 'TODO: please describe this field!',
  6156. 'type' => 'int',
  6157. 'not null' => '1',
  6158. ),
  6159. ),
  6160. 'primary key' => array(
  6161. '0' => 'feature_relationshipprop_pub_id',
  6162. ),
  6163. 'unique keys' => array(
  6164. 'feature_relationshipprop_pub_c1' => array(
  6165. '0' => 'feature_relationshipprop_id',
  6166. '1' => 'pub_id',
  6167. ),
  6168. ),
  6169. 'indexes' => array(
  6170. 'feature_relationshipprop_pub_idx1' => array(
  6171. '0' => 'feature_relationshipprop_id',
  6172. ),
  6173. 'feature_relationshipprop_pub_idx2' => array(
  6174. '0' => 'pub_id',
  6175. ),
  6176. ),
  6177. 'foreign keys' => array(
  6178. ),
  6179. );
  6180. return $description;
  6181. }
  6182. /**
  6183. * Implements hook_cell_line_relationship_schema()
  6184. * Purpose: To describe the structure of cell_line_relationship to tripal
  6185. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6186. * @see tripal_core.api.inc: tripal_core_chado_update()
  6187. * @see tripal_core.api.inc: tripal_core_chado_select()
  6188. *
  6189. * @return
  6190. * An array describing the current table
  6191. *
  6192. * @ingroup tripal_schema_api
  6193. *
  6194. */
  6195. function tripal_core_chado_cell_line_relationship_schema () {
  6196. $description = array();
  6197. $description = array(
  6198. 'table' => 'cell_line_relationship',
  6199. // 'description' => 'TODO: please describe this table!',
  6200. 'fields' => array(
  6201. 'cell_line_relationship_id' => array(
  6202. // 'description' => 'TODO: please describe this field!',
  6203. 'type' => 'serial',
  6204. 'not null' => '1',
  6205. ),
  6206. 'subject_id' => array(
  6207. // 'description' => 'TODO: please describe this field!',
  6208. 'type' => 'int',
  6209. 'not null' => '1',
  6210. ),
  6211. 'object_id' => array(
  6212. // 'description' => 'TODO: please describe this field!',
  6213. 'type' => 'int',
  6214. 'not null' => '1',
  6215. ),
  6216. 'type_id' => array(
  6217. // 'description' => 'TODO: please describe this field!',
  6218. 'type' => 'int',
  6219. 'not null' => '1',
  6220. ),
  6221. ),
  6222. 'primary key' => array(
  6223. '0' => 'cell_line_relationship_id',
  6224. ),
  6225. 'unique keys' => array(
  6226. 'cell_line_relationship_c1' => array(
  6227. '0' => 'subject_id',
  6228. '1' => 'object_id',
  6229. '2' => 'type_id',
  6230. ),
  6231. ),
  6232. 'indexes' => array(
  6233. ),
  6234. 'foreign keys' => array(
  6235. ),
  6236. );
  6237. return $description;
  6238. }
  6239. /**
  6240. * Implements hook_cell_line_pub_schema()
  6241. * Purpose: To describe the structure of cell_line_pub to tripal
  6242. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6243. * @see tripal_core.api.inc: tripal_core_chado_update()
  6244. * @see tripal_core.api.inc: tripal_core_chado_select()
  6245. *
  6246. * @return
  6247. * An array describing the current table
  6248. *
  6249. * @ingroup tripal_schema_api
  6250. *
  6251. */
  6252. function tripal_core_chado_cell_line_pub_schema () {
  6253. $description = array();
  6254. $description = array(
  6255. 'table' => 'cell_line_pub',
  6256. // 'description' => 'TODO: please describe this table!',
  6257. 'fields' => array(
  6258. 'cell_line_pub_id' => array(
  6259. // 'description' => 'TODO: please describe this field!',
  6260. 'type' => 'serial',
  6261. 'not null' => '1',
  6262. ),
  6263. 'cell_line_id' => array(
  6264. // 'description' => 'TODO: please describe this field!',
  6265. 'type' => 'int',
  6266. 'not null' => '1',
  6267. ),
  6268. 'pub_id' => array(
  6269. // 'description' => 'TODO: please describe this field!',
  6270. 'type' => 'int',
  6271. 'not null' => '1',
  6272. ),
  6273. ),
  6274. 'primary key' => array(
  6275. '0' => 'cell_line_pub_id',
  6276. ),
  6277. 'unique keys' => array(
  6278. 'cell_line_pub_c1' => array(
  6279. '0' => 'cell_line_id',
  6280. '1' => 'pub_id',
  6281. ),
  6282. ),
  6283. 'indexes' => array(
  6284. ),
  6285. 'foreign keys' => array(
  6286. ),
  6287. );
  6288. return $description;
  6289. }
  6290. /**
  6291. * Implements hook_cell_line_synonym_schema()
  6292. * Purpose: To describe the structure of cell_line_synonym to tripal
  6293. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6294. * @see tripal_core.api.inc: tripal_core_chado_update()
  6295. * @see tripal_core.api.inc: tripal_core_chado_select()
  6296. *
  6297. * @return
  6298. * An array describing the current table
  6299. *
  6300. * @ingroup tripal_schema_api
  6301. *
  6302. */
  6303. function tripal_core_chado_cell_line_synonym_schema () {
  6304. $description = array();
  6305. $description = array(
  6306. 'table' => 'cell_line_synonym',
  6307. // 'description' => 'TODO: please describe this table!',
  6308. 'fields' => array(
  6309. 'cell_line_synonym_id' => array(
  6310. // 'description' => 'TODO: please describe this field!',
  6311. 'type' => 'serial',
  6312. 'not null' => '1',
  6313. ),
  6314. 'cell_line_id' => array(
  6315. // 'description' => 'TODO: please describe this field!',
  6316. 'type' => 'int',
  6317. 'not null' => '1',
  6318. ),
  6319. 'synonym_id' => array(
  6320. // 'description' => 'TODO: please describe this field!',
  6321. 'type' => 'int',
  6322. 'not null' => '1',
  6323. ),
  6324. 'pub_id' => array(
  6325. // 'description' => 'TODO: please describe this field!',
  6326. 'type' => 'int',
  6327. 'not null' => '1',
  6328. ),
  6329. 'is_current' => array(
  6330. // 'description' => 'TODO: please describe this field!',
  6331. 'type' => 'boolean',
  6332. 'not null' => '1',
  6333. 'default' => 'als',
  6334. ),
  6335. 'is_internal' => array(
  6336. // 'description' => 'TODO: please describe this field!',
  6337. 'type' => 'boolean',
  6338. 'not null' => '1',
  6339. 'default' => 'als',
  6340. ),
  6341. ),
  6342. 'primary key' => array(
  6343. '0' => 'cell_line_synonym_id',
  6344. ),
  6345. 'unique keys' => array(
  6346. 'cell_line_synonym_c1' => array(
  6347. '0' => 'synonym_id',
  6348. '1' => 'cell_line_id',
  6349. '2' => 'pub_id',
  6350. ),
  6351. ),
  6352. 'indexes' => array(
  6353. ),
  6354. 'foreign keys' => array(
  6355. ),
  6356. );
  6357. return $description;
  6358. }
  6359. /**
  6360. * Implements hook_cell_lineprop_schema()
  6361. * Purpose: To describe the structure of cell_lineprop to tripal
  6362. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6363. * @see tripal_core.api.inc: tripal_core_chado_update()
  6364. * @see tripal_core.api.inc: tripal_core_chado_select()
  6365. *
  6366. * @return
  6367. * An array describing the current table
  6368. *
  6369. * @ingroup tripal_schema_api
  6370. *
  6371. */
  6372. function tripal_core_chado_cell_lineprop_schema () {
  6373. $description = array();
  6374. $description = array(
  6375. 'table' => 'cell_lineprop',
  6376. // 'description' => 'TODO: please describe this table!',
  6377. 'fields' => array(
  6378. 'cell_lineprop_id' => array(
  6379. // 'description' => 'TODO: please describe this field!',
  6380. 'type' => 'serial',
  6381. 'not null' => '1',
  6382. ),
  6383. 'cell_line_id' => array(
  6384. // 'description' => 'TODO: please describe this field!',
  6385. 'type' => 'int',
  6386. 'not null' => '1',
  6387. ),
  6388. 'type_id' => array(
  6389. // 'description' => 'TODO: please describe this field!',
  6390. 'type' => 'int',
  6391. 'not null' => '1',
  6392. ),
  6393. 'value' => array(
  6394. // 'description' => 'TODO: please describe this field!',
  6395. 'type' => 'text',
  6396. 'not null' => '',
  6397. ),
  6398. 'rank' => array(
  6399. // 'description' => 'TODO: please describe this field!',
  6400. 'type' => 'int',
  6401. 'not null' => '1',
  6402. 'default' => '0',
  6403. ),
  6404. ),
  6405. 'primary key' => array(
  6406. '0' => 'cell_lineprop_id',
  6407. ),
  6408. 'unique keys' => array(
  6409. 'cell_lineprop_c1' => array(
  6410. '0' => 'cell_line_id',
  6411. '1' => 'type_id',
  6412. '2' => 'rank',
  6413. ),
  6414. ),
  6415. 'indexes' => array(
  6416. ),
  6417. 'foreign keys' => array(
  6418. ),
  6419. );
  6420. return $description;
  6421. }
  6422. /**
  6423. * Implements hook_cell_lineprop_pub_schema()
  6424. * Purpose: To describe the structure of cell_lineprop_pub to tripal
  6425. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6426. * @see tripal_core.api.inc: tripal_core_chado_update()
  6427. * @see tripal_core.api.inc: tripal_core_chado_select()
  6428. *
  6429. * @return
  6430. * An array describing the current table
  6431. *
  6432. * @ingroup tripal_schema_api
  6433. *
  6434. */
  6435. function tripal_core_chado_cell_lineprop_pub_schema () {
  6436. $description = array();
  6437. $description = array(
  6438. 'table' => 'cell_lineprop_pub',
  6439. // 'description' => 'TODO: please describe this table!',
  6440. 'fields' => array(
  6441. 'cell_lineprop_pub_id' => array(
  6442. // 'description' => 'TODO: please describe this field!',
  6443. 'type' => 'serial',
  6444. 'not null' => '1',
  6445. ),
  6446. 'cell_lineprop_id' => array(
  6447. // 'description' => 'TODO: please describe this field!',
  6448. 'type' => 'int',
  6449. 'not null' => '1',
  6450. ),
  6451. 'pub_id' => array(
  6452. // 'description' => 'TODO: please describe this field!',
  6453. 'type' => 'int',
  6454. 'not null' => '1',
  6455. ),
  6456. ),
  6457. 'primary key' => array(
  6458. '0' => 'cell_lineprop_pub_id',
  6459. ),
  6460. 'unique keys' => array(
  6461. 'cell_lineprop_pub_c1' => array(
  6462. '0' => 'cell_lineprop_id',
  6463. '1' => 'pub_id',
  6464. ),
  6465. ),
  6466. 'indexes' => array(
  6467. ),
  6468. 'foreign keys' => array(
  6469. ),
  6470. );
  6471. return $description;
  6472. }
  6473. /**
  6474. * Implements hook_cell_line_library_schema()
  6475. * Purpose: To describe the structure of cell_line_library to tripal
  6476. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6477. * @see tripal_core.api.inc: tripal_core_chado_update()
  6478. * @see tripal_core.api.inc: tripal_core_chado_select()
  6479. *
  6480. * @return
  6481. * An array describing the current table
  6482. *
  6483. * @ingroup tripal_schema_api
  6484. *
  6485. */
  6486. function tripal_core_chado_cell_line_library_schema () {
  6487. $description = array();
  6488. $description = array(
  6489. 'table' => 'cell_line_library',
  6490. // 'description' => 'TODO: please describe this table!',
  6491. 'fields' => array(
  6492. 'cell_line_library_id' => array(
  6493. // 'description' => 'TODO: please describe this field!',
  6494. 'type' => 'serial',
  6495. 'not null' => '1',
  6496. ),
  6497. 'cell_line_id' => array(
  6498. // 'description' => 'TODO: please describe this field!',
  6499. 'type' => 'int',
  6500. 'not null' => '1',
  6501. ),
  6502. 'library_id' => array(
  6503. // 'description' => 'TODO: please describe this field!',
  6504. 'type' => 'int',
  6505. 'not null' => '1',
  6506. ),
  6507. 'pub_id' => array(
  6508. // 'description' => 'TODO: please describe this field!',
  6509. 'type' => 'int',
  6510. 'not null' => '1',
  6511. ),
  6512. ),
  6513. 'primary key' => array(
  6514. '0' => 'cell_line_library_id',
  6515. ),
  6516. 'unique keys' => array(
  6517. 'cell_line_library_c1' => array(
  6518. '0' => 'cell_line_id',
  6519. '1' => 'library_id',
  6520. '2' => 'pub_id',
  6521. ),
  6522. ),
  6523. 'indexes' => array(
  6524. ),
  6525. 'foreign keys' => array(
  6526. ),
  6527. );
  6528. return $description;
  6529. }
  6530. /**
  6531. * Implements hook_cell_line_feature_schema()
  6532. * Purpose: To describe the structure of cell_line_feature to tripal
  6533. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6534. * @see tripal_core.api.inc: tripal_core_chado_update()
  6535. * @see tripal_core.api.inc: tripal_core_chado_select()
  6536. *
  6537. * @return
  6538. * An array describing the current table
  6539. *
  6540. * @ingroup tripal_schema_api
  6541. *
  6542. */
  6543. function tripal_core_chado_cell_line_feature_schema () {
  6544. $description = array();
  6545. $description = array(
  6546. 'table' => 'cell_line_feature',
  6547. // 'description' => 'TODO: please describe this table!',
  6548. 'fields' => array(
  6549. 'cell_line_feature_id' => array(
  6550. // 'description' => 'TODO: please describe this field!',
  6551. 'type' => 'serial',
  6552. 'not null' => '1',
  6553. ),
  6554. 'cell_line_id' => array(
  6555. // 'description' => 'TODO: please describe this field!',
  6556. 'type' => 'int',
  6557. 'not null' => '1',
  6558. ),
  6559. 'feature_id' => array(
  6560. // 'description' => 'TODO: please describe this field!',
  6561. 'type' => 'int',
  6562. 'not null' => '1',
  6563. ),
  6564. 'pub_id' => array(
  6565. // 'description' => 'TODO: please describe this field!',
  6566. 'type' => 'int',
  6567. 'not null' => '1',
  6568. ),
  6569. ),
  6570. 'primary key' => array(
  6571. '0' => 'cell_line_feature_id',
  6572. ),
  6573. 'unique keys' => array(
  6574. 'cell_line_feature_c1' => array(
  6575. '0' => 'cell_line_id',
  6576. '1' => 'feature_id',
  6577. '2' => 'pub_id',
  6578. ),
  6579. ),
  6580. 'indexes' => array(
  6581. ),
  6582. 'foreign keys' => array(
  6583. ),
  6584. );
  6585. return $description;
  6586. }
  6587. /**
  6588. * Implements hook_cell_line_schema()
  6589. * Purpose: To describe the structure of cell_line to tripal
  6590. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6591. * @see tripal_core.api.inc: tripal_core_chado_update()
  6592. * @see tripal_core.api.inc: tripal_core_chado_select()
  6593. *
  6594. * @return
  6595. * An array describing the current table
  6596. *
  6597. * @ingroup tripal_schema_api
  6598. *
  6599. */
  6600. function tripal_core_chado_cell_line_schema () {
  6601. $description = array();
  6602. $description = array(
  6603. 'table' => 'cell_line',
  6604. // 'description' => 'TODO: please describe this table!',
  6605. 'fields' => array(
  6606. 'cell_line_id' => array(
  6607. // 'description' => 'TODO: please describe this field!',
  6608. 'type' => 'serial',
  6609. 'not null' => '1',
  6610. ),
  6611. 'name' => array(
  6612. // 'description' => 'TODO: please describe this field!',
  6613. 'type' => 'varchar',
  6614. 'length' => '255',
  6615. 'not null' => '',
  6616. ),
  6617. 'uniquename' => array(
  6618. // 'description' => 'TODO: please describe this field!',
  6619. 'type' => 'varchar',
  6620. 'length' => '255',
  6621. 'not null' => '1',
  6622. ),
  6623. 'organism_id' => array(
  6624. // 'description' => 'TODO: please describe this field!',
  6625. 'type' => 'int',
  6626. 'not null' => '1',
  6627. ),
  6628. 'timeaccessioned' => array(
  6629. // 'description' => 'TODO: please describe this field!',
  6630. 'type' => 'datetime',
  6631. 'not null' => '1',
  6632. 'default' => 'ow(',
  6633. ),
  6634. 'timelastmodified' => array(
  6635. // 'description' => 'TODO: please describe this field!',
  6636. 'type' => 'datetime',
  6637. 'not null' => '1',
  6638. 'default' => 'ow(',
  6639. ),
  6640. ),
  6641. 'primary key' => array(
  6642. '0' => 'cell_line_id',
  6643. ),
  6644. 'unique keys' => array(
  6645. 'cell_line_c1' => array(
  6646. '0' => 'uniquename',
  6647. '1' => 'organism_id',
  6648. ),
  6649. ),
  6650. 'indexes' => array(
  6651. ),
  6652. 'foreign keys' => array(
  6653. ),
  6654. );
  6655. return $description;
  6656. }
  6657. /**
  6658. * Implements hook_cell_line_cvterm_schema()
  6659. * Purpose: To describe the structure of cell_line_cvterm to tripal
  6660. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6661. * @see tripal_core.api.inc: tripal_core_chado_update()
  6662. * @see tripal_core.api.inc: tripal_core_chado_select()
  6663. *
  6664. * @return
  6665. * An array describing the current table
  6666. *
  6667. * @ingroup tripal_schema_api
  6668. *
  6669. */
  6670. function tripal_core_chado_cell_line_cvterm_schema () {
  6671. $description = array();
  6672. $description = array(
  6673. 'table' => 'cell_line_cvterm',
  6674. // 'description' => 'TODO: please describe this table!',
  6675. 'fields' => array(
  6676. 'cell_line_cvterm_id' => array(
  6677. // 'description' => 'TODO: please describe this field!',
  6678. 'type' => 'serial',
  6679. 'not null' => '1',
  6680. ),
  6681. 'cell_line_id' => array(
  6682. // 'description' => 'TODO: please describe this field!',
  6683. 'type' => 'int',
  6684. 'not null' => '1',
  6685. ),
  6686. 'cvterm_id' => array(
  6687. // 'description' => 'TODO: please describe this field!',
  6688. 'type' => 'int',
  6689. 'not null' => '1',
  6690. ),
  6691. 'pub_id' => array(
  6692. // 'description' => 'TODO: please describe this field!',
  6693. 'type' => 'int',
  6694. 'not null' => '1',
  6695. ),
  6696. 'rank' => array(
  6697. // 'description' => 'TODO: please describe this field!',
  6698. 'type' => 'int',
  6699. 'not null' => '1',
  6700. 'default' => '0',
  6701. ),
  6702. ),
  6703. 'primary key' => array(
  6704. '0' => 'cell_line_cvterm_id',
  6705. ),
  6706. 'unique keys' => array(
  6707. 'cell_line_cvterm_c1' => array(
  6708. '0' => 'cell_line_id',
  6709. '1' => 'cvterm_id',
  6710. '2' => 'pub_id',
  6711. '3' => 'rank',
  6712. ),
  6713. ),
  6714. 'indexes' => array(
  6715. ),
  6716. 'foreign keys' => array(
  6717. ),
  6718. );
  6719. return $description;
  6720. }
  6721. /**
  6722. * Implements hook_cell_line_cvtermprop_schema()
  6723. * Purpose: To describe the structure of cell_line_cvtermprop to tripal
  6724. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6725. * @see tripal_core.api.inc: tripal_core_chado_update()
  6726. * @see tripal_core.api.inc: tripal_core_chado_select()
  6727. *
  6728. * @return
  6729. * An array describing the current table
  6730. *
  6731. * @ingroup tripal_schema_api
  6732. *
  6733. */
  6734. function tripal_core_chado_cell_line_cvtermprop_schema () {
  6735. $description = array();
  6736. $description = array(
  6737. 'table' => 'cell_line_cvtermprop',
  6738. // 'description' => 'TODO: please describe this table!',
  6739. 'fields' => array(
  6740. 'cell_line_cvtermprop_id' => array(
  6741. // 'description' => 'TODO: please describe this field!',
  6742. 'type' => 'serial',
  6743. 'not null' => '1',
  6744. ),
  6745. 'cell_line_cvterm_id' => array(
  6746. // 'description' => 'TODO: please describe this field!',
  6747. 'type' => 'int',
  6748. 'not null' => '1',
  6749. ),
  6750. 'type_id' => array(
  6751. // 'description' => 'TODO: please describe this field!',
  6752. 'type' => 'int',
  6753. 'not null' => '1',
  6754. ),
  6755. 'value' => array(
  6756. // 'description' => 'TODO: please describe this field!',
  6757. 'type' => 'text',
  6758. 'not null' => '',
  6759. ),
  6760. 'rank' => array(
  6761. // 'description' => 'TODO: please describe this field!',
  6762. 'type' => 'int',
  6763. 'not null' => '1',
  6764. 'default' => '0',
  6765. ),
  6766. ),
  6767. 'primary key' => array(
  6768. '0' => 'cell_line_cvtermprop_id',
  6769. ),
  6770. 'unique keys' => array(
  6771. 'cell_line_cvtermprop_c1' => array(
  6772. '0' => 'cell_line_cvterm_id',
  6773. '1' => 'type_id',
  6774. '2' => 'rank',
  6775. ),
  6776. ),
  6777. 'indexes' => array(
  6778. ),
  6779. 'foreign keys' => array(
  6780. ),
  6781. );
  6782. return $description;
  6783. }
  6784. /**
  6785. * Implements hook_cell_line_dbxref_schema()
  6786. * Purpose: To describe the structure of cell_line_dbxref to tripal
  6787. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6788. * @see tripal_core.api.inc: tripal_core_chado_update()
  6789. * @see tripal_core.api.inc: tripal_core_chado_select()
  6790. *
  6791. * @return
  6792. * An array describing the current table
  6793. *
  6794. * @ingroup tripal_schema_api
  6795. *
  6796. */
  6797. function tripal_core_chado_cell_line_dbxref_schema () {
  6798. $description = array();
  6799. $description = array(
  6800. 'table' => 'cell_line_dbxref',
  6801. // 'description' => 'TODO: please describe this table!',
  6802. 'fields' => array(
  6803. 'cell_line_dbxref_id' => array(
  6804. // 'description' => 'TODO: please describe this field!',
  6805. 'type' => 'serial',
  6806. 'not null' => '1',
  6807. ),
  6808. 'cell_line_id' => array(
  6809. // 'description' => 'TODO: please describe this field!',
  6810. 'type' => 'int',
  6811. 'not null' => '1',
  6812. ),
  6813. 'dbxref_id' => array(
  6814. // 'description' => 'TODO: please describe this field!',
  6815. 'type' => 'int',
  6816. 'not null' => '1',
  6817. ),
  6818. 'is_current' => array(
  6819. // 'description' => 'TODO: please describe this field!',
  6820. 'type' => 'boolean',
  6821. 'not null' => '1',
  6822. 'default' => 'ru',
  6823. ),
  6824. ),
  6825. 'primary key' => array(
  6826. '0' => 'cell_line_dbxref_id',
  6827. ),
  6828. 'unique keys' => array(
  6829. 'cell_line_dbxref_c1' => array(
  6830. '0' => 'cell_line_id',
  6831. '1' => 'dbxref_id',
  6832. ),
  6833. ),
  6834. 'indexes' => array(
  6835. ),
  6836. 'foreign keys' => array(
  6837. ),
  6838. );
  6839. return $description;
  6840. }
  6841. /**
  6842. * Implements hook_channel_schema()
  6843. * Purpose: To describe the structure of channel to tripal
  6844. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6845. * @see tripal_core.api.inc: tripal_core_chado_update()
  6846. * @see tripal_core.api.inc: tripal_core_chado_select()
  6847. *
  6848. * @return
  6849. * An array describing the current table
  6850. *
  6851. * @ingroup tripal_schema_api
  6852. *
  6853. */
  6854. function tripal_core_chado_channel_schema () {
  6855. $description = array();
  6856. $description = array(
  6857. 'table' => 'channel',
  6858. // 'description' => 'TODO: please describe this table!',
  6859. 'fields' => array(
  6860. 'channel_id' => array(
  6861. // 'description' => 'TODO: please describe this field!',
  6862. 'type' => 'serial',
  6863. 'not null' => '1',
  6864. ),
  6865. 'name' => array(
  6866. // 'description' => 'TODO: please describe this field!',
  6867. 'type' => 'text',
  6868. 'not null' => '1',
  6869. ),
  6870. 'definition' => array(
  6871. // 'description' => 'TODO: please describe this field!',
  6872. 'type' => 'text',
  6873. 'not null' => '1',
  6874. ),
  6875. ),
  6876. 'primary key' => array(
  6877. '0' => 'channel_id',
  6878. ),
  6879. 'unique keys' => array(
  6880. 'channel_c1' => array(
  6881. '0' => 'name',
  6882. ),
  6883. ),
  6884. 'indexes' => array(
  6885. ),
  6886. 'foreign keys' => array(
  6887. ),
  6888. );
  6889. return $description;
  6890. }
  6891. /**
  6892. * Implements hook_common_ancestor_cvterm_schema()
  6893. * Purpose: To describe the structure of common_ancestor_cvterm to tripal
  6894. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6895. * @see tripal_core.api.inc: tripal_core_chado_update()
  6896. * @see tripal_core.api.inc: tripal_core_chado_select()
  6897. *
  6898. * @return
  6899. * An array describing the current table
  6900. *
  6901. * @ingroup tripal_schema_api
  6902. *
  6903. */
  6904. function tripal_core_chado_common_ancestor_cvterm_schema () {
  6905. $description = array();
  6906. $description = array(
  6907. 'table' => 'common_ancestor_cvterm',
  6908. // 'description' => 'TODO: please describe this table!',
  6909. 'fields' => array(
  6910. 'cvterm1_id' => array(
  6911. // 'description' => 'TODO: please describe this field!',
  6912. 'type' => 'int',
  6913. 'not null' => '',
  6914. ),
  6915. 'cvterm2_id' => array(
  6916. // 'description' => 'TODO: please describe this field!',
  6917. 'type' => 'int',
  6918. 'not null' => '',
  6919. ),
  6920. 'ancestor_cvterm_id' => array(
  6921. // 'description' => 'TODO: please describe this field!',
  6922. 'type' => 'int',
  6923. 'not null' => '',
  6924. ),
  6925. 'pathdistance1' => array(
  6926. // 'description' => 'TODO: please describe this field!',
  6927. 'type' => 'int',
  6928. 'not null' => '',
  6929. ),
  6930. 'pathdistance2' => array(
  6931. // 'description' => 'TODO: please describe this field!',
  6932. 'type' => 'int',
  6933. 'not null' => '',
  6934. ),
  6935. 'total_pathdistance' => array(
  6936. // 'description' => 'TODO: please describe this field!',
  6937. 'type' => 'int',
  6938. 'not null' => '',
  6939. ),
  6940. ),
  6941. 'primary key' => array(
  6942. ),
  6943. 'unique keys' => array(
  6944. ),
  6945. 'indexes' => array(
  6946. ),
  6947. 'foreign keys' => array(
  6948. ),
  6949. );
  6950. return $description;
  6951. }
  6952. /**
  6953. * Implements hook_cv_cvterm_count_with_obs_schema()
  6954. * Purpose: To describe the structure of cv_cvterm_count_with_obs to tripal
  6955. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6956. * @see tripal_core.api.inc: tripal_core_chado_update()
  6957. * @see tripal_core.api.inc: tripal_core_chado_select()
  6958. *
  6959. * @return
  6960. * An array describing the current table
  6961. *
  6962. * @ingroup tripal_schema_api
  6963. *
  6964. */
  6965. function tripal_core_chado_cv_cvterm_count_with_obs_schema () {
  6966. $description = array();
  6967. $description = array(
  6968. 'table' => 'cv_cvterm_count_with_obs',
  6969. // 'description' => 'TODO: please describe this table!',
  6970. 'fields' => array(
  6971. 'name' => array(
  6972. // 'description' => 'TODO: please describe this field!',
  6973. 'type' => 'varchar',
  6974. 'length' => '255',
  6975. 'not null' => '',
  6976. ),
  6977. 'num_terms_incl_obs' => array(
  6978. // 'description' => 'TODO: please describe this field!',
  6979. 'type' => 'int',
  6980. 'size' => 'big',
  6981. 'not null' => '',
  6982. ),
  6983. ),
  6984. 'primary key' => array(
  6985. ),
  6986. 'unique keys' => array(
  6987. ),
  6988. 'indexes' => array(
  6989. ),
  6990. 'foreign keys' => array(
  6991. ),
  6992. );
  6993. return $description;
  6994. }
  6995. /**
  6996. * Implements hook_cv_leaf_schema()
  6997. * Purpose: To describe the structure of cv_leaf to tripal
  6998. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6999. * @see tripal_core.api.inc: tripal_core_chado_update()
  7000. * @see tripal_core.api.inc: tripal_core_chado_select()
  7001. *
  7002. * @return
  7003. * An array describing the current table
  7004. *
  7005. * @ingroup tripal_schema_api
  7006. *
  7007. */
  7008. function tripal_core_chado_cv_leaf_schema () {
  7009. $description = array();
  7010. $description = array(
  7011. 'table' => 'cv_leaf',
  7012. // 'description' => 'TODO: please describe this table!',
  7013. 'fields' => array(
  7014. 'cv_id' => array(
  7015. // 'description' => 'TODO: please describe this field!',
  7016. 'type' => 'int',
  7017. 'not null' => '',
  7018. ),
  7019. 'cvterm_id' => array(
  7020. // 'description' => 'TODO: please describe this field!',
  7021. 'type' => 'int',
  7022. 'not null' => '',
  7023. ),
  7024. ),
  7025. 'primary key' => array(
  7026. ),
  7027. 'unique keys' => array(
  7028. ),
  7029. 'indexes' => array(
  7030. ),
  7031. 'foreign keys' => array(
  7032. ),
  7033. );
  7034. return $description;
  7035. }
  7036. /**
  7037. * Implements hook_cv_link_count_schema()
  7038. * Purpose: To describe the structure of cv_link_count to tripal
  7039. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7040. * @see tripal_core.api.inc: tripal_core_chado_update()
  7041. * @see tripal_core.api.inc: tripal_core_chado_select()
  7042. *
  7043. * @return
  7044. * An array describing the current table
  7045. *
  7046. * @ingroup tripal_schema_api
  7047. *
  7048. */
  7049. function tripal_core_chado_cv_link_count_schema () {
  7050. $description = array();
  7051. $description = array(
  7052. 'table' => 'cv_link_count',
  7053. // 'description' => 'TODO: please describe this table!',
  7054. 'fields' => array(
  7055. 'cv_name' => array(
  7056. // 'description' => 'TODO: please describe this field!',
  7057. 'type' => 'varchar',
  7058. 'length' => '255',
  7059. 'not null' => '',
  7060. ),
  7061. 'relation_name' => array(
  7062. // 'description' => 'TODO: please describe this field!',
  7063. 'type' => 'varchar',
  7064. 'length' => '1024',
  7065. 'not null' => '',
  7066. ),
  7067. 'relation_cv_name' => array(
  7068. // 'description' => 'TODO: please describe this field!',
  7069. 'type' => 'varchar',
  7070. 'length' => '255',
  7071. 'not null' => '',
  7072. ),
  7073. 'num_links' => array(
  7074. // 'description' => 'TODO: please describe this field!',
  7075. 'type' => 'int',
  7076. 'size' => 'big',
  7077. 'not null' => '',
  7078. ),
  7079. ),
  7080. 'primary key' => array(
  7081. ),
  7082. 'unique keys' => array(
  7083. ),
  7084. 'indexes' => array(
  7085. ),
  7086. 'foreign keys' => array(
  7087. ),
  7088. );
  7089. return $description;
  7090. }
  7091. /**
  7092. * Implements hook_cv_path_count_schema()
  7093. * Purpose: To describe the structure of cv_path_count to tripal
  7094. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7095. * @see tripal_core.api.inc: tripal_core_chado_update()
  7096. * @see tripal_core.api.inc: tripal_core_chado_select()
  7097. *
  7098. * @return
  7099. * An array describing the current table
  7100. *
  7101. * @ingroup tripal_schema_api
  7102. *
  7103. */
  7104. function tripal_core_chado_cv_path_count_schema () {
  7105. $description = array();
  7106. $description = array(
  7107. 'table' => 'cv_path_count',
  7108. // 'description' => 'TODO: please describe this table!',
  7109. 'fields' => array(
  7110. 'cv_name' => array(
  7111. // 'description' => 'TODO: please describe this field!',
  7112. 'type' => 'varchar',
  7113. 'length' => '255',
  7114. 'not null' => '',
  7115. ),
  7116. 'relation_name' => array(
  7117. // 'description' => 'TODO: please describe this field!',
  7118. 'type' => 'varchar',
  7119. 'length' => '1024',
  7120. 'not null' => '',
  7121. ),
  7122. 'relation_cv_name' => array(
  7123. // 'description' => 'TODO: please describe this field!',
  7124. 'type' => 'varchar',
  7125. 'length' => '255',
  7126. 'not null' => '',
  7127. ),
  7128. 'num_paths' => array(
  7129. // 'description' => 'TODO: please describe this field!',
  7130. 'type' => 'int',
  7131. 'size' => 'big',
  7132. 'not null' => '',
  7133. ),
  7134. ),
  7135. 'primary key' => array(
  7136. ),
  7137. 'unique keys' => array(
  7138. ),
  7139. 'indexes' => array(
  7140. ),
  7141. 'foreign keys' => array(
  7142. ),
  7143. );
  7144. return $description;
  7145. }
  7146. /**
  7147. * Implements hook_cv_cvterm_count_schema()
  7148. * Purpose: To describe the structure of cv_cvterm_count to tripal
  7149. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7150. * @see tripal_core.api.inc: tripal_core_chado_update()
  7151. * @see tripal_core.api.inc: tripal_core_chado_select()
  7152. *
  7153. * @return
  7154. * An array describing the current table
  7155. *
  7156. * @ingroup tripal_schema_api
  7157. *
  7158. */
  7159. function tripal_core_chado_cv_cvterm_count_schema () {
  7160. $description = array();
  7161. $description = array(
  7162. 'table' => 'cv_cvterm_count',
  7163. // 'description' => 'TODO: please describe this table!',
  7164. 'fields' => array(
  7165. 'name' => array(
  7166. // 'description' => 'TODO: please describe this field!',
  7167. 'type' => 'varchar',
  7168. 'length' => '255',
  7169. 'not null' => '',
  7170. ),
  7171. 'num_terms_excl_obs' => array(
  7172. // 'description' => 'TODO: please describe this field!',
  7173. 'type' => 'int',
  7174. 'size' => 'big',
  7175. 'not null' => '',
  7176. ),
  7177. ),
  7178. 'primary key' => array(
  7179. ),
  7180. 'unique keys' => array(
  7181. ),
  7182. 'indexes' => array(
  7183. ),
  7184. 'foreign keys' => array(
  7185. ),
  7186. );
  7187. return $description;
  7188. }
  7189. /**
  7190. * Implements hook_cv_schema()
  7191. * Purpose: To describe the structure of cv to tripal
  7192. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7193. * @see tripal_core.api.inc: tripal_core_chado_update()
  7194. * @see tripal_core.api.inc: tripal_core_chado_select()
  7195. *
  7196. * @return
  7197. * An array describing the current table
  7198. *
  7199. * @ingroup tripal_schema_api
  7200. *
  7201. */
  7202. function tripal_core_chado_cv_schema () {
  7203. $description = array();
  7204. $description = array(
  7205. 'table' => 'cv',
  7206. // 'description' => 'TODO: please describe this table!',
  7207. 'fields' => array(
  7208. 'cv_id' => array(
  7209. // 'description' => 'TODO: please describe this field!',
  7210. 'type' => 'serial',
  7211. 'not null' => '1',
  7212. ),
  7213. 'name' => array(
  7214. // 'description' => 'TODO: please describe this field!',
  7215. 'type' => 'varchar',
  7216. 'length' => '255',
  7217. 'not null' => '1',
  7218. ),
  7219. 'definition' => array(
  7220. // 'description' => 'TODO: please describe this field!',
  7221. 'type' => 'text',
  7222. 'not null' => '',
  7223. ),
  7224. ),
  7225. 'primary key' => array(
  7226. '0' => 'cv_id',
  7227. ),
  7228. 'unique keys' => array(
  7229. 'cv_c1' => array(
  7230. '0' => 'name',
  7231. ),
  7232. ),
  7233. 'indexes' => array(
  7234. ),
  7235. 'foreign keys' => array(
  7236. ),
  7237. );
  7238. return $description;
  7239. }
  7240. /**
  7241. * Implements hook_common_descendant_cvterm_schema()
  7242. * Purpose: To describe the structure of common_descendant_cvterm to tripal
  7243. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7244. * @see tripal_core.api.inc: tripal_core_chado_update()
  7245. * @see tripal_core.api.inc: tripal_core_chado_select()
  7246. *
  7247. * @return
  7248. * An array describing the current table
  7249. *
  7250. * @ingroup tripal_schema_api
  7251. *
  7252. */
  7253. function tripal_core_chado_common_descendant_cvterm_schema () {
  7254. $description = array();
  7255. $description = array(
  7256. 'table' => 'common_descendant_cvterm',
  7257. // 'description' => 'TODO: please describe this table!',
  7258. 'fields' => array(
  7259. 'cvterm1_id' => array(
  7260. // 'description' => 'TODO: please describe this field!',
  7261. 'type' => 'int',
  7262. 'not null' => '',
  7263. ),
  7264. 'cvterm2_id' => array(
  7265. // 'description' => 'TODO: please describe this field!',
  7266. 'type' => 'int',
  7267. 'not null' => '',
  7268. ),
  7269. 'ancestor_cvterm_id' => array(
  7270. // 'description' => 'TODO: please describe this field!',
  7271. 'type' => 'int',
  7272. 'not null' => '',
  7273. ),
  7274. 'pathdistance1' => array(
  7275. // 'description' => 'TODO: please describe this field!',
  7276. 'type' => 'int',
  7277. 'not null' => '',
  7278. ),
  7279. 'pathdistance2' => array(
  7280. // 'description' => 'TODO: please describe this field!',
  7281. 'type' => 'int',
  7282. 'not null' => '',
  7283. ),
  7284. 'total_pathdistance' => array(
  7285. // 'description' => 'TODO: please describe this field!',
  7286. 'type' => 'int',
  7287. 'not null' => '',
  7288. ),
  7289. ),
  7290. 'primary key' => array(
  7291. ),
  7292. 'unique keys' => array(
  7293. ),
  7294. 'indexes' => array(
  7295. ),
  7296. 'foreign keys' => array(
  7297. ),
  7298. );
  7299. return $description;
  7300. }
  7301. /**
  7302. * Implements hook_contact_schema()
  7303. * Purpose: To describe the structure of contact to tripal
  7304. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7305. * @see tripal_core.api.inc: tripal_core_chado_update()
  7306. * @see tripal_core.api.inc: tripal_core_chado_select()
  7307. *
  7308. * @return
  7309. * An array describing the current table
  7310. *
  7311. * @ingroup tripal_schema_api
  7312. *
  7313. */
  7314. function tripal_core_chado_contact_schema () {
  7315. $description = array();
  7316. $description = array(
  7317. 'table' => 'contact',
  7318. // 'description' => 'TODO: please describe this table!',
  7319. 'fields' => array(
  7320. 'contact_id' => array(
  7321. // 'description' => 'TODO: please describe this field!',
  7322. 'type' => 'serial',
  7323. 'not null' => '1',
  7324. ),
  7325. 'type_id' => array(
  7326. // 'description' => 'TODO: please describe this field!',
  7327. 'type' => 'int',
  7328. 'not null' => '',
  7329. ),
  7330. 'name' => array(
  7331. // 'description' => 'TODO: please describe this field!',
  7332. 'type' => 'varchar',
  7333. 'length' => '255',
  7334. 'not null' => '1',
  7335. ),
  7336. 'description' => array(
  7337. // 'description' => 'TODO: please describe this field!',
  7338. 'type' => 'varchar',
  7339. 'length' => '255',
  7340. 'not null' => '',
  7341. ),
  7342. ),
  7343. 'primary key' => array(
  7344. '0' => 'contact_id',
  7345. ),
  7346. 'unique keys' => array(
  7347. 'contact_c1' => array(
  7348. '0' => 'name',
  7349. ),
  7350. ),
  7351. 'indexes' => array(
  7352. ),
  7353. 'foreign keys' => array(
  7354. ),
  7355. );
  7356. return $description;
  7357. }
  7358. /**
  7359. * Implements hook_contact_relationship_schema()
  7360. * Purpose: To describe the structure of contact_relationship to tripal
  7361. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7362. * @see tripal_core.api.inc: tripal_core_chado_update()
  7363. * @see tripal_core.api.inc: tripal_core_chado_select()
  7364. *
  7365. * @return
  7366. * An array describing the current table
  7367. *
  7368. * @ingroup tripal_schema_api
  7369. *
  7370. */
  7371. function tripal_core_chado_contact_relationship_schema () {
  7372. $description = array();
  7373. $description = array(
  7374. 'table' => 'contact_relationship',
  7375. // 'description' => 'TODO: please describe this table!',
  7376. 'fields' => array(
  7377. 'contact_relationship_id' => array(
  7378. // 'description' => 'TODO: please describe this field!',
  7379. 'type' => 'serial',
  7380. 'not null' => '1',
  7381. ),
  7382. 'type_id' => array(
  7383. // 'description' => 'TODO: please describe this field!',
  7384. 'type' => 'int',
  7385. 'not null' => '1',
  7386. ),
  7387. 'subject_id' => array(
  7388. // 'description' => 'TODO: please describe this field!',
  7389. 'type' => 'int',
  7390. 'not null' => '1',
  7391. ),
  7392. 'object_id' => array(
  7393. // 'description' => 'TODO: please describe this field!',
  7394. 'type' => 'int',
  7395. 'not null' => '1',
  7396. ),
  7397. ),
  7398. 'primary key' => array(
  7399. '0' => 'contact_relationship_id',
  7400. ),
  7401. 'unique keys' => array(
  7402. 'contact_relationship_c1' => array(
  7403. '0' => 'subject_id',
  7404. '1' => 'object_id',
  7405. '2' => 'type_id',
  7406. ),
  7407. ),
  7408. 'indexes' => array(
  7409. 'contact_relationship_idx1' => array(
  7410. '0' => 'type_id',
  7411. ),
  7412. 'contact_relationship_idx2' => array(
  7413. '0' => 'subject_id',
  7414. ),
  7415. 'contact_relationship_idx3' => array(
  7416. '0' => 'object_id',
  7417. ),
  7418. ),
  7419. 'foreign keys' => array(
  7420. ),
  7421. );
  7422. return $description;
  7423. }
  7424. /**
  7425. * Implements hook_control_schema()
  7426. * Purpose: To describe the structure of control to tripal
  7427. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7428. * @see tripal_core.api.inc: tripal_core_chado_update()
  7429. * @see tripal_core.api.inc: tripal_core_chado_select()
  7430. *
  7431. * @return
  7432. * An array describing the current table
  7433. *
  7434. * @ingroup tripal_schema_api
  7435. *
  7436. */
  7437. function tripal_core_chado_control_schema () {
  7438. $description = array();
  7439. $description = array(
  7440. 'table' => 'control',
  7441. // 'description' => 'TODO: please describe this table!',
  7442. 'fields' => array(
  7443. 'control_id' => array(
  7444. // 'description' => 'TODO: please describe this field!',
  7445. 'type' => 'serial',
  7446. 'not null' => '1',
  7447. ),
  7448. 'type_id' => array(
  7449. // 'description' => 'TODO: please describe this field!',
  7450. 'type' => 'int',
  7451. 'not null' => '1',
  7452. ),
  7453. 'assay_id' => array(
  7454. // 'description' => 'TODO: please describe this field!',
  7455. 'type' => 'int',
  7456. 'not null' => '1',
  7457. ),
  7458. 'tableinfo_id' => array(
  7459. // 'description' => 'TODO: please describe this field!',
  7460. 'type' => 'int',
  7461. 'not null' => '1',
  7462. ),
  7463. 'row_id' => array(
  7464. // 'description' => 'TODO: please describe this field!',
  7465. 'type' => 'int',
  7466. 'not null' => '1',
  7467. ),
  7468. 'name' => array(
  7469. // 'description' => 'TODO: please describe this field!',
  7470. 'type' => 'text',
  7471. 'not null' => '',
  7472. ),
  7473. 'value' => array(
  7474. // 'description' => 'TODO: please describe this field!',
  7475. 'type' => 'text',
  7476. 'not null' => '',
  7477. ),
  7478. 'rank' => array(
  7479. // 'description' => 'TODO: please describe this field!',
  7480. 'type' => 'int',
  7481. 'not null' => '1',
  7482. 'default' => '0',
  7483. ),
  7484. ),
  7485. 'primary key' => array(
  7486. '0' => 'control_id',
  7487. ),
  7488. 'unique keys' => array(
  7489. ),
  7490. 'indexes' => array(
  7491. 'control_idx1' => array(
  7492. '0' => 'type_id',
  7493. ),
  7494. 'control_idx2' => array(
  7495. '0' => 'assay_id',
  7496. ),
  7497. 'control_idx3' => array(
  7498. '0' => 'tableinfo_id',
  7499. ),
  7500. 'control_idx4' => array(
  7501. '0' => 'row_id',
  7502. ),
  7503. ),
  7504. 'foreign keys' => array(
  7505. ),
  7506. );
  7507. return $description;
  7508. }
  7509. /**
  7510. * Implements hook_biomaterialprop_schema()
  7511. * Purpose: To describe the structure of biomaterialprop to tripal
  7512. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7513. * @see tripal_core.api.inc: tripal_core_chado_update()
  7514. * @see tripal_core.api.inc: tripal_core_chado_select()
  7515. *
  7516. * @return
  7517. * An array describing the current table
  7518. *
  7519. * @ingroup tripal_schema_api
  7520. *
  7521. */
  7522. function tripal_core_chado_biomaterialprop_schema () {
  7523. $description = array();
  7524. $description = array(
  7525. 'table' => 'biomaterialprop',
  7526. // 'description' => 'TODO: please describe this table!',
  7527. 'fields' => array(
  7528. 'biomaterialprop_id' => array(
  7529. // 'description' => 'TODO: please describe this field!',
  7530. 'type' => 'serial',
  7531. 'not null' => '1',
  7532. ),
  7533. 'biomaterial_id' => array(
  7534. // 'description' => 'TODO: please describe this field!',
  7535. 'type' => 'int',
  7536. 'not null' => '1',
  7537. ),
  7538. 'type_id' => array(
  7539. // 'description' => 'TODO: please describe this field!',
  7540. 'type' => 'int',
  7541. 'not null' => '1',
  7542. ),
  7543. 'value' => array(
  7544. // 'description' => 'TODO: please describe this field!',
  7545. 'type' => 'text',
  7546. 'not null' => '',
  7547. ),
  7548. 'rank' => array(
  7549. // 'description' => 'TODO: please describe this field!',
  7550. 'type' => 'int',
  7551. 'not null' => '1',
  7552. 'default' => '0',
  7553. ),
  7554. ),
  7555. 'primary key' => array(
  7556. '0' => 'biomaterialprop_id',
  7557. ),
  7558. 'unique keys' => array(
  7559. 'biomaterialprop_c1' => array(
  7560. '0' => 'biomaterial_id',
  7561. '1' => 'type_id',
  7562. '2' => 'rank',
  7563. ),
  7564. ),
  7565. 'indexes' => array(
  7566. 'biomaterialprop_idx1' => array(
  7567. '0' => 'biomaterial_id',
  7568. ),
  7569. 'biomaterialprop_idx2' => array(
  7570. '0' => 'type_id',
  7571. ),
  7572. ),
  7573. 'foreign keys' => array(
  7574. ),
  7575. );
  7576. return $description;
  7577. }
  7578. /**
  7579. * Implements hook_biomaterial_treatment_schema()
  7580. * Purpose: To describe the structure of biomaterial_treatment to tripal
  7581. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7582. * @see tripal_core.api.inc: tripal_core_chado_update()
  7583. * @see tripal_core.api.inc: tripal_core_chado_select()
  7584. *
  7585. * @return
  7586. * An array describing the current table
  7587. *
  7588. * @ingroup tripal_schema_api
  7589. *
  7590. */
  7591. function tripal_core_chado_biomaterial_treatment_schema () {
  7592. $description = array();
  7593. $description = array(
  7594. 'table' => 'biomaterial_treatment',
  7595. // 'description' => 'TODO: please describe this table!',
  7596. 'fields' => array(
  7597. 'biomaterial_treatment_id' => array(
  7598. // 'description' => 'TODO: please describe this field!',
  7599. 'type' => 'serial',
  7600. 'not null' => '1',
  7601. ),
  7602. 'biomaterial_id' => array(
  7603. // 'description' => 'TODO: please describe this field!',
  7604. 'type' => 'int',
  7605. 'not null' => '1',
  7606. ),
  7607. 'treatment_id' => array(
  7608. // 'description' => 'TODO: please describe this field!',
  7609. 'type' => 'int',
  7610. 'not null' => '1',
  7611. ),
  7612. 'unittype_id' => array(
  7613. // 'description' => 'TODO: please describe this field!',
  7614. 'type' => 'int',
  7615. 'not null' => '',
  7616. ),
  7617. 'value' => array(
  7618. // 'description' => 'TODO: please describe this field!',
  7619. 'type' => 'float',
  7620. 'not null' => '',
  7621. ),
  7622. 'rank' => array(
  7623. // 'description' => 'TODO: please describe this field!',
  7624. 'type' => 'int',
  7625. 'not null' => '1',
  7626. 'default' => '0',
  7627. ),
  7628. ),
  7629. 'primary key' => array(
  7630. '0' => 'biomaterial_treatment_id',
  7631. ),
  7632. 'unique keys' => array(
  7633. 'biomaterial_treatment_c1' => array(
  7634. '0' => 'biomaterial_id',
  7635. '1' => 'treatment_id',
  7636. ),
  7637. ),
  7638. 'indexes' => array(
  7639. 'biomaterial_treatment_idx1' => array(
  7640. '0' => 'biomaterial_id',
  7641. ),
  7642. 'biomaterial_treatment_idx2' => array(
  7643. '0' => 'treatment_id',
  7644. ),
  7645. 'biomaterial_treatment_idx3' => array(
  7646. '0' => 'unittype_id',
  7647. ),
  7648. ),
  7649. 'foreign keys' => array(
  7650. ),
  7651. );
  7652. return $description;
  7653. }
  7654. /**
  7655. * Implements hook_acquisition_relationship_schema()
  7656. * Purpose: To describe the structure of acquisition_relationship to tripal
  7657. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7658. * @see tripal_core.api.inc: tripal_core_chado_update()
  7659. * @see tripal_core.api.inc: tripal_core_chado_select()
  7660. *
  7661. * @return
  7662. * An array describing the current table
  7663. *
  7664. * @ingroup tripal_schema_api
  7665. *
  7666. */
  7667. function tripal_core_chado_acquisition_relationship_schema () {
  7668. $description = array();
  7669. $description = array(
  7670. 'table' => 'acquisition_relationship',
  7671. // 'description' => 'TODO: please describe this table!',
  7672. 'fields' => array(
  7673. 'acquisition_relationship_id' => array(
  7674. // 'description' => 'TODO: please describe this field!',
  7675. 'type' => 'serial',
  7676. 'not null' => '1',
  7677. ),
  7678. 'subject_id' => array(
  7679. // 'description' => 'TODO: please describe this field!',
  7680. 'type' => 'int',
  7681. 'not null' => '1',
  7682. ),
  7683. 'type_id' => array(
  7684. // 'description' => 'TODO: please describe this field!',
  7685. 'type' => 'int',
  7686. 'not null' => '1',
  7687. ),
  7688. 'object_id' => array(
  7689. // 'description' => 'TODO: please describe this field!',
  7690. 'type' => 'int',
  7691. 'not null' => '1',
  7692. ),
  7693. 'value' => array(
  7694. // 'description' => 'TODO: please describe this field!',
  7695. 'type' => 'text',
  7696. 'not null' => '',
  7697. ),
  7698. 'rank' => array(
  7699. // 'description' => 'TODO: please describe this field!',
  7700. 'type' => 'int',
  7701. 'not null' => '1',
  7702. 'default' => '0',
  7703. ),
  7704. ),
  7705. 'primary key' => array(
  7706. '0' => 'acquisition_relationship_id',
  7707. ),
  7708. 'unique keys' => array(
  7709. 'acquisition_relationship_c1' => array(
  7710. '0' => 'subject_id',
  7711. '1' => 'object_id',
  7712. '2' => 'type_id',
  7713. '3' => 'rank',
  7714. ),
  7715. ),
  7716. 'indexes' => array(
  7717. 'acquisition_relationship_idx1' => array(
  7718. '0' => 'subject_id',
  7719. ),
  7720. 'acquisition_relationship_idx2' => array(
  7721. '0' => 'type_id',
  7722. ),
  7723. 'acquisition_relationship_idx3' => array(
  7724. '0' => 'object_id',
  7725. ),
  7726. ),
  7727. 'foreign keys' => array(
  7728. ),
  7729. );
  7730. return $description;
  7731. }
  7732. /**
  7733. * Implements hook_acquisition_schema()
  7734. * Purpose: To describe the structure of acquisition to tripal
  7735. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7736. * @see tripal_core.api.inc: tripal_core_chado_update()
  7737. * @see tripal_core.api.inc: tripal_core_chado_select()
  7738. *
  7739. * @return
  7740. * An array describing the current table
  7741. *
  7742. * @ingroup tripal_schema_api
  7743. *
  7744. */
  7745. function tripal_core_chado_acquisition_schema () {
  7746. $description = array();
  7747. $description = array(
  7748. 'table' => 'acquisition',
  7749. // 'description' => 'TODO: please describe this table!',
  7750. 'fields' => array(
  7751. 'acquisition_id' => array(
  7752. // 'description' => 'TODO: please describe this field!',
  7753. 'type' => 'serial',
  7754. 'not null' => '1',
  7755. ),
  7756. 'assay_id' => array(
  7757. // 'description' => 'TODO: please describe this field!',
  7758. 'type' => 'int',
  7759. 'not null' => '1',
  7760. ),
  7761. 'protocol_id' => array(
  7762. // 'description' => 'TODO: please describe this field!',
  7763. 'type' => 'int',
  7764. 'not null' => '',
  7765. ),
  7766. 'channel_id' => array(
  7767. // 'description' => 'TODO: please describe this field!',
  7768. 'type' => 'int',
  7769. 'not null' => '',
  7770. ),
  7771. 'acquisitiondate' => array(
  7772. // 'description' => 'TODO: please describe this field!',
  7773. 'type' => 'datetime',
  7774. 'not null' => '',
  7775. 'default' => 'ow(',
  7776. ),
  7777. 'name' => array(
  7778. // 'description' => 'TODO: please describe this field!',
  7779. 'type' => 'text',
  7780. 'not null' => '',
  7781. ),
  7782. 'uri' => array(
  7783. // 'description' => 'TODO: please describe this field!',
  7784. 'type' => 'text',
  7785. 'not null' => '',
  7786. ),
  7787. ),
  7788. 'primary key' => array(
  7789. '0' => 'acquisition_id',
  7790. ),
  7791. 'unique keys' => array(
  7792. 'acquisition_c1' => array(
  7793. '0' => 'name',
  7794. ),
  7795. ),
  7796. 'indexes' => array(
  7797. 'acquisition_idx1' => array(
  7798. '0' => 'assay_id',
  7799. ),
  7800. 'acquisition_idx2' => array(
  7801. '0' => 'protocol_id',
  7802. ),
  7803. 'acquisition_idx3' => array(
  7804. '0' => 'channel_id',
  7805. ),
  7806. ),
  7807. 'foreign keys' => array(
  7808. ),
  7809. );
  7810. return $description;
  7811. }
  7812. /**
  7813. * Implements hook_acquisitionprop_schema()
  7814. * Purpose: To describe the structure of acquisitionprop to tripal
  7815. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7816. * @see tripal_core.api.inc: tripal_core_chado_update()
  7817. * @see tripal_core.api.inc: tripal_core_chado_select()
  7818. *
  7819. * @return
  7820. * An array describing the current table
  7821. *
  7822. * @ingroup tripal_schema_api
  7823. *
  7824. */
  7825. function tripal_core_chado_acquisitionprop_schema () {
  7826. $description = array();
  7827. $description = array(
  7828. 'table' => 'acquisitionprop',
  7829. // 'description' => 'TODO: please describe this table!',
  7830. 'fields' => array(
  7831. 'acquisitionprop_id' => array(
  7832. // 'description' => 'TODO: please describe this field!',
  7833. 'type' => 'serial',
  7834. 'not null' => '1',
  7835. ),
  7836. 'acquisition_id' => array(
  7837. // 'description' => 'TODO: please describe this field!',
  7838. 'type' => 'int',
  7839. 'not null' => '1',
  7840. ),
  7841. 'type_id' => array(
  7842. // 'description' => 'TODO: please describe this field!',
  7843. 'type' => 'int',
  7844. 'not null' => '1',
  7845. ),
  7846. 'value' => array(
  7847. // 'description' => 'TODO: please describe this field!',
  7848. 'type' => 'text',
  7849. 'not null' => '',
  7850. ),
  7851. 'rank' => array(
  7852. // 'description' => 'TODO: please describe this field!',
  7853. 'type' => 'int',
  7854. 'not null' => '1',
  7855. 'default' => '0',
  7856. ),
  7857. ),
  7858. 'primary key' => array(
  7859. '0' => 'acquisitionprop_id',
  7860. ),
  7861. 'unique keys' => array(
  7862. 'acquisitionprop_c1' => array(
  7863. '0' => 'acquisition_id',
  7864. '1' => 'type_id',
  7865. '2' => 'rank',
  7866. ),
  7867. ),
  7868. 'indexes' => array(
  7869. 'acquisitionprop_idx1' => array(
  7870. '0' => 'acquisition_id',
  7871. ),
  7872. 'acquisitionprop_idx2' => array(
  7873. '0' => 'type_id',
  7874. ),
  7875. ),
  7876. 'foreign keys' => array(
  7877. ),
  7878. );
  7879. return $description;
  7880. }
  7881. /**
  7882. * Implements hook_all_feature_names_schema()
  7883. * Purpose: To describe the structure of all_feature_names to tripal
  7884. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7885. * @see tripal_core.api.inc: tripal_core_chado_update()
  7886. * @see tripal_core.api.inc: tripal_core_chado_select()
  7887. *
  7888. * @return
  7889. * An array describing the current table
  7890. *
  7891. * @ingroup tripal_schema_api
  7892. *
  7893. */
  7894. function tripal_core_chado_all_feature_names_schema () {
  7895. $description = array();
  7896. $description = array(
  7897. 'table' => 'all_feature_names',
  7898. // 'description' => 'TODO: please describe this table!',
  7899. 'fields' => array(
  7900. 'feature_id' => array(
  7901. // 'description' => 'TODO: please describe this field!',
  7902. 'type' => 'int',
  7903. 'not null' => '',
  7904. ),
  7905. 'name' => array(
  7906. // 'description' => 'TODO: please describe this field!',
  7907. 'type' => 'varchar',
  7908. 'length' => '255',
  7909. 'not null' => '',
  7910. ),
  7911. 'organism_id' => array(
  7912. // 'description' => 'TODO: please describe this field!',
  7913. 'type' => 'int',
  7914. 'not null' => '',
  7915. ),
  7916. ),
  7917. 'primary key' => array(
  7918. ),
  7919. 'unique keys' => array(
  7920. ),
  7921. 'indexes' => array(
  7922. ),
  7923. 'foreign keys' => array(
  7924. ),
  7925. );
  7926. return $description;
  7927. }
  7928. /**
  7929. * Implements hook_analysis_schema()
  7930. * Purpose: To describe the structure of analysis to tripal
  7931. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7932. * @see tripal_core.api.inc: tripal_core_chado_update()
  7933. * @see tripal_core.api.inc: tripal_core_chado_select()
  7934. *
  7935. * @return
  7936. * An array describing the current table
  7937. *
  7938. * @ingroup tripal_schema_api
  7939. *
  7940. */
  7941. function tripal_core_chado_analysis_schema () {
  7942. $description = array();
  7943. $description = array(
  7944. 'table' => 'analysis',
  7945. // 'description' => 'TODO: please describe this table!',
  7946. 'fields' => array(
  7947. 'analysis_id' => array(
  7948. // 'description' => 'TODO: please describe this field!',
  7949. 'type' => 'serial',
  7950. 'not null' => '1',
  7951. ),
  7952. 'name' => array(
  7953. // 'description' => 'TODO: please describe this field!',
  7954. 'type' => 'varchar',
  7955. 'length' => '255',
  7956. 'not null' => '',
  7957. ),
  7958. 'description' => array(
  7959. // 'description' => 'TODO: please describe this field!',
  7960. 'type' => 'text',
  7961. 'not null' => '',
  7962. ),
  7963. 'program' => array(
  7964. // 'description' => 'TODO: please describe this field!',
  7965. 'type' => 'varchar',
  7966. 'length' => '255',
  7967. 'not null' => '1',
  7968. ),
  7969. 'programversion' => array(
  7970. // 'description' => 'TODO: please describe this field!',
  7971. 'type' => 'varchar',
  7972. 'length' => '255',
  7973. 'not null' => '1',
  7974. ),
  7975. 'algorithm' => array(
  7976. // 'description' => 'TODO: please describe this field!',
  7977. 'type' => 'varchar',
  7978. 'length' => '255',
  7979. 'not null' => '',
  7980. ),
  7981. 'sourcename' => array(
  7982. // 'description' => 'TODO: please describe this field!',
  7983. 'type' => 'varchar',
  7984. 'length' => '255',
  7985. 'not null' => '',
  7986. ),
  7987. 'sourceversion' => array(
  7988. // 'description' => 'TODO: please describe this field!',
  7989. 'type' => 'varchar',
  7990. 'length' => '255',
  7991. 'not null' => '',
  7992. ),
  7993. 'sourceuri' => array(
  7994. // 'description' => 'TODO: please describe this field!',
  7995. 'type' => 'text',
  7996. 'not null' => '',
  7997. ),
  7998. 'timeexecuted' => array(
  7999. // 'description' => 'TODO: please describe this field!',
  8000. 'type' => 'datetime',
  8001. 'not null' => '1',
  8002. 'default' => 'ow(',
  8003. ),
  8004. ),
  8005. 'primary key' => array(
  8006. '0' => 'analysis_id',
  8007. ),
  8008. 'unique keys' => array(
  8009. 'analysis_c1' => array(
  8010. '0' => 'program',
  8011. '1' => 'programversion',
  8012. '2' => 'sourcename',
  8013. ),
  8014. ),
  8015. 'indexes' => array(
  8016. ),
  8017. 'foreign keys' => array(
  8018. ),
  8019. );
  8020. return $description;
  8021. }
  8022. /**
  8023. * Implements hook_analysisfeature_schema()
  8024. * Purpose: To describe the structure of analysisfeature to tripal
  8025. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8026. * @see tripal_core.api.inc: tripal_core_chado_update()
  8027. * @see tripal_core.api.inc: tripal_core_chado_select()
  8028. *
  8029. * @return
  8030. * An array describing the current table
  8031. *
  8032. * @ingroup tripal_schema_api
  8033. *
  8034. */
  8035. function tripal_core_chado_analysisfeature_schema () {
  8036. $description = array();
  8037. $description = array(
  8038. 'table' => 'analysisfeature',
  8039. // 'description' => 'TODO: please describe this table!',
  8040. 'fields' => array(
  8041. 'analysisfeature_id' => array(
  8042. // 'description' => 'TODO: please describe this field!',
  8043. 'type' => 'serial',
  8044. 'not null' => '1',
  8045. ),
  8046. 'feature_id' => array(
  8047. // 'description' => 'TODO: please describe this field!',
  8048. 'type' => 'int',
  8049. 'not null' => '1',
  8050. ),
  8051. 'analysis_id' => array(
  8052. // 'description' => 'TODO: please describe this field!',
  8053. 'type' => 'int',
  8054. 'not null' => '1',
  8055. ),
  8056. 'rawscore' => array(
  8057. // 'description' => 'TODO: please describe this field!',
  8058. 'type' => 'float',
  8059. 'size' => 'big',
  8060. 'not null' => '',
  8061. ),
  8062. 'normscore' => array(
  8063. // 'description' => 'TODO: please describe this field!',
  8064. 'type' => 'float',
  8065. 'size' => 'big',
  8066. 'not null' => '',
  8067. ),
  8068. 'significance' => array(
  8069. // 'description' => 'TODO: please describe this field!',
  8070. 'type' => 'float',
  8071. 'size' => 'big',
  8072. 'not null' => '',
  8073. ),
  8074. 'identity' => array(
  8075. // 'description' => 'TODO: please describe this field!',
  8076. 'type' => 'float',
  8077. 'size' => 'big',
  8078. 'not null' => '',
  8079. ),
  8080. ),
  8081. 'primary key' => array(
  8082. '0' => 'analysisfeature_id',
  8083. ),
  8084. 'unique keys' => array(
  8085. 'analysisfeature_c1' => array(
  8086. '0' => 'feature_id',
  8087. '1' => 'analysis_id',
  8088. ),
  8089. ),
  8090. 'indexes' => array(
  8091. 'analysisfeature_idx1' => array(
  8092. '0' => 'feature_id',
  8093. ),
  8094. 'analysisfeature_idx2' => array(
  8095. '0' => 'analysis_id',
  8096. ),
  8097. ),
  8098. 'foreign keys' => array(
  8099. ),
  8100. );
  8101. return $description;
  8102. }
  8103. /**
  8104. * Implements hook_analysisfeatureprop_schema()
  8105. * Purpose: To describe the structure of analysisfeatureprop to tripal
  8106. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8107. * @see tripal_core.api.inc: tripal_core_chado_update()
  8108. * @see tripal_core.api.inc: tripal_core_chado_select()
  8109. *
  8110. * @return
  8111. * An array describing the current table
  8112. *
  8113. * @ingroup tripal_schema_api
  8114. *
  8115. */
  8116. function tripal_core_chado_analysisfeatureprop_schema () {
  8117. $description = array();
  8118. $description = array(
  8119. 'table' => 'analysisfeatureprop',
  8120. // 'description' => 'TODO: please describe this table!',
  8121. 'fields' => array(
  8122. 'analysisfeatureprop_id' => array(
  8123. // 'description' => 'TODO: please describe this field!',
  8124. 'type' => 'serial',
  8125. 'not null' => '1',
  8126. ),
  8127. 'analysisfeature_id' => array(
  8128. // 'description' => 'TODO: please describe this field!',
  8129. 'type' => 'int',
  8130. 'not null' => '1',
  8131. ),
  8132. 'type_id' => array(
  8133. // 'description' => 'TODO: please describe this field!',
  8134. 'type' => 'int',
  8135. 'not null' => '1',
  8136. ),
  8137. 'value' => array(
  8138. // 'description' => 'TODO: please describe this field!',
  8139. 'type' => 'text',
  8140. 'not null' => '',
  8141. ),
  8142. 'rank' => array(
  8143. // 'description' => 'TODO: please describe this field!',
  8144. 'type' => 'int',
  8145. 'not null' => '1',
  8146. ),
  8147. ),
  8148. 'primary key' => array(
  8149. '0' => 'analysisfeatureprop_id',
  8150. ),
  8151. 'unique keys' => array(
  8152. 'analysisfeature_id_type_id_rank' => array(
  8153. '0' => 'analysisfeature_id',
  8154. '1' => 'type_id',
  8155. '2' => 'rank',
  8156. ),
  8157. ),
  8158. 'indexes' => array(
  8159. ),
  8160. 'foreign keys' => array(
  8161. ),
  8162. );
  8163. return $description;
  8164. }
  8165. /**
  8166. * Implements hook_assayprop_schema()
  8167. * Purpose: To describe the structure of assayprop to tripal
  8168. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8169. * @see tripal_core.api.inc: tripal_core_chado_update()
  8170. * @see tripal_core.api.inc: tripal_core_chado_select()
  8171. *
  8172. * @return
  8173. * An array describing the current table
  8174. *
  8175. * @ingroup tripal_schema_api
  8176. *
  8177. */
  8178. function tripal_core_chado_assayprop_schema () {
  8179. $description = array();
  8180. $description = array(
  8181. 'table' => 'assayprop',
  8182. // 'description' => 'TODO: please describe this table!',
  8183. 'fields' => array(
  8184. 'assayprop_id' => array(
  8185. // 'description' => 'TODO: please describe this field!',
  8186. 'type' => 'serial',
  8187. 'not null' => '1',
  8188. ),
  8189. 'assay_id' => array(
  8190. // 'description' => 'TODO: please describe this field!',
  8191. 'type' => 'int',
  8192. 'not null' => '1',
  8193. ),
  8194. 'type_id' => array(
  8195. // 'description' => 'TODO: please describe this field!',
  8196. 'type' => 'int',
  8197. 'not null' => '1',
  8198. ),
  8199. 'value' => array(
  8200. // 'description' => 'TODO: please describe this field!',
  8201. 'type' => 'text',
  8202. 'not null' => '',
  8203. ),
  8204. 'rank' => array(
  8205. // 'description' => 'TODO: please describe this field!',
  8206. 'type' => 'int',
  8207. 'not null' => '1',
  8208. 'default' => '0',
  8209. ),
  8210. ),
  8211. 'primary key' => array(
  8212. '0' => 'assayprop_id',
  8213. ),
  8214. 'unique keys' => array(
  8215. 'assayprop_c1' => array(
  8216. '0' => 'assay_id',
  8217. '1' => 'type_id',
  8218. '2' => 'rank',
  8219. ),
  8220. ),
  8221. 'indexes' => array(
  8222. 'assayprop_idx1' => array(
  8223. '0' => 'assay_id',
  8224. ),
  8225. 'assayprop_idx2' => array(
  8226. '0' => 'type_id',
  8227. ),
  8228. ),
  8229. 'foreign keys' => array(
  8230. ),
  8231. );
  8232. return $description;
  8233. }
  8234. /**
  8235. * Implements hook_biomaterial_schema()
  8236. * Purpose: To describe the structure of biomaterial to tripal
  8237. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8238. * @see tripal_core.api.inc: tripal_core_chado_update()
  8239. * @see tripal_core.api.inc: tripal_core_chado_select()
  8240. *
  8241. * @return
  8242. * An array describing the current table
  8243. *
  8244. * @ingroup tripal_schema_api
  8245. *
  8246. */
  8247. function tripal_core_chado_biomaterial_schema () {
  8248. $description = array();
  8249. $description = array(
  8250. 'table' => 'biomaterial',
  8251. // 'description' => 'TODO: please describe this table!',
  8252. 'fields' => array(
  8253. 'biomaterial_id' => array(
  8254. // 'description' => 'TODO: please describe this field!',
  8255. 'type' => 'serial',
  8256. 'not null' => '1',
  8257. ),
  8258. 'taxon_id' => array(
  8259. // 'description' => 'TODO: please describe this field!',
  8260. 'type' => 'int',
  8261. 'not null' => '',
  8262. ),
  8263. 'biosourceprovider_id' => array(
  8264. // 'description' => 'TODO: please describe this field!',
  8265. 'type' => 'int',
  8266. 'not null' => '',
  8267. ),
  8268. 'dbxref_id' => array(
  8269. // 'description' => 'TODO: please describe this field!',
  8270. 'type' => 'int',
  8271. 'not null' => '',
  8272. ),
  8273. 'name' => array(
  8274. // 'description' => 'TODO: please describe this field!',
  8275. 'type' => 'text',
  8276. 'not null' => '',
  8277. ),
  8278. 'description' => array(
  8279. // 'description' => 'TODO: please describe this field!',
  8280. 'type' => 'text',
  8281. 'not null' => '',
  8282. ),
  8283. ),
  8284. 'primary key' => array(
  8285. '0' => 'biomaterial_id',
  8286. ),
  8287. 'unique keys' => array(
  8288. 'biomaterial_c1' => array(
  8289. '0' => 'name',
  8290. ),
  8291. ),
  8292. 'indexes' => array(
  8293. 'biomaterial_idx1' => array(
  8294. '0' => 'taxon_id',
  8295. ),
  8296. 'biomaterial_idx2' => array(
  8297. '0' => 'biosourceprovider_id',
  8298. ),
  8299. 'biomaterial_idx3' => array(
  8300. '0' => 'dbxref_id',
  8301. ),
  8302. ),
  8303. 'foreign keys' => array(
  8304. ),
  8305. );
  8306. return $description;
  8307. }
  8308. /**
  8309. * Implements hook_biomaterial_dbxref_schema()
  8310. * Purpose: To describe the structure of biomaterial_dbxref to tripal
  8311. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8312. * @see tripal_core.api.inc: tripal_core_chado_update()
  8313. * @see tripal_core.api.inc: tripal_core_chado_select()
  8314. *
  8315. * @return
  8316. * An array describing the current table
  8317. *
  8318. * @ingroup tripal_schema_api
  8319. *
  8320. */
  8321. function tripal_core_chado_biomaterial_dbxref_schema () {
  8322. $description = array();
  8323. $description = array(
  8324. 'table' => 'biomaterial_dbxref',
  8325. // 'description' => 'TODO: please describe this table!',
  8326. 'fields' => array(
  8327. 'biomaterial_dbxref_id' => array(
  8328. // 'description' => 'TODO: please describe this field!',
  8329. 'type' => 'serial',
  8330. 'not null' => '1',
  8331. ),
  8332. 'biomaterial_id' => array(
  8333. // 'description' => 'TODO: please describe this field!',
  8334. 'type' => 'int',
  8335. 'not null' => '1',
  8336. ),
  8337. 'dbxref_id' => array(
  8338. // 'description' => 'TODO: please describe this field!',
  8339. 'type' => 'int',
  8340. 'not null' => '1',
  8341. ),
  8342. ),
  8343. 'primary key' => array(
  8344. '0' => 'biomaterial_dbxref_id',
  8345. ),
  8346. 'unique keys' => array(
  8347. 'biomaterial_dbxref_c1' => array(
  8348. '0' => 'biomaterial_id',
  8349. '1' => 'dbxref_id',
  8350. ),
  8351. ),
  8352. 'indexes' => array(
  8353. 'biomaterial_dbxref_idx1' => array(
  8354. '0' => 'biomaterial_id',
  8355. ),
  8356. 'biomaterial_dbxref_idx2' => array(
  8357. '0' => 'dbxref_id',
  8358. ),
  8359. ),
  8360. 'foreign keys' => array(
  8361. ),
  8362. );
  8363. return $description;
  8364. }
  8365. /**
  8366. * Implements hook_biomaterial_relationship_schema()
  8367. * Purpose: To describe the structure of biomaterial_relationship to tripal
  8368. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8369. * @see tripal_core.api.inc: tripal_core_chado_update()
  8370. * @see tripal_core.api.inc: tripal_core_chado_select()
  8371. *
  8372. * @return
  8373. * An array describing the current table
  8374. *
  8375. * @ingroup tripal_schema_api
  8376. *
  8377. */
  8378. function tripal_core_chado_biomaterial_relationship_schema () {
  8379. $description = array();
  8380. $description = array(
  8381. 'table' => 'biomaterial_relationship',
  8382. // 'description' => 'TODO: please describe this table!',
  8383. 'fields' => array(
  8384. 'biomaterial_relationship_id' => array(
  8385. // 'description' => 'TODO: please describe this field!',
  8386. 'type' => 'serial',
  8387. 'not null' => '1',
  8388. ),
  8389. 'subject_id' => array(
  8390. // 'description' => 'TODO: please describe this field!',
  8391. 'type' => 'int',
  8392. 'not null' => '1',
  8393. ),
  8394. 'type_id' => array(
  8395. // 'description' => 'TODO: please describe this field!',
  8396. 'type' => 'int',
  8397. 'not null' => '1',
  8398. ),
  8399. 'object_id' => array(
  8400. // 'description' => 'TODO: please describe this field!',
  8401. 'type' => 'int',
  8402. 'not null' => '1',
  8403. ),
  8404. ),
  8405. 'primary key' => array(
  8406. '0' => 'biomaterial_relationship_id',
  8407. ),
  8408. 'unique keys' => array(
  8409. 'biomaterial_relationship_c1' => array(
  8410. '0' => 'subject_id',
  8411. '1' => 'object_id',
  8412. '2' => 'type_id',
  8413. ),
  8414. ),
  8415. 'indexes' => array(
  8416. 'biomaterial_relationship_idx1' => array(
  8417. '0' => 'subject_id',
  8418. ),
  8419. 'biomaterial_relationship_idx2' => array(
  8420. '0' => 'object_id',
  8421. ),
  8422. 'biomaterial_relationship_idx3' => array(
  8423. '0' => 'type_id',
  8424. ),
  8425. ),
  8426. 'foreign keys' => array(
  8427. ),
  8428. );
  8429. return $description;
  8430. }
  8431. /**
  8432. * Implements hook_assay_project_schema()
  8433. * Purpose: To describe the structure of assay_project to tripal
  8434. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8435. * @see tripal_core.api.inc: tripal_core_chado_update()
  8436. * @see tripal_core.api.inc: tripal_core_chado_select()
  8437. *
  8438. * @return
  8439. * An array describing the current table
  8440. *
  8441. * @ingroup tripal_schema_api
  8442. *
  8443. */
  8444. function tripal_core_chado_assay_project_schema () {
  8445. $description = array();
  8446. $description = array(
  8447. 'table' => 'assay_project',
  8448. // 'description' => 'TODO: please describe this table!',
  8449. 'fields' => array(
  8450. 'assay_project_id' => array(
  8451. // 'description' => 'TODO: please describe this field!',
  8452. 'type' => 'serial',
  8453. 'not null' => '1',
  8454. ),
  8455. 'assay_id' => array(
  8456. // 'description' => 'TODO: please describe this field!',
  8457. 'type' => 'int',
  8458. 'not null' => '1',
  8459. ),
  8460. 'project_id' => array(
  8461. // 'description' => 'TODO: please describe this field!',
  8462. 'type' => 'int',
  8463. 'not null' => '1',
  8464. ),
  8465. ),
  8466. 'primary key' => array(
  8467. '0' => 'assay_project_id',
  8468. ),
  8469. 'unique keys' => array(
  8470. 'assay_project_c1' => array(
  8471. '0' => 'assay_id',
  8472. '1' => 'project_id',
  8473. ),
  8474. ),
  8475. 'indexes' => array(
  8476. 'assay_project_idx1' => array(
  8477. '0' => 'assay_id',
  8478. ),
  8479. 'assay_project_idx2' => array(
  8480. '0' => 'project_id',
  8481. ),
  8482. ),
  8483. 'foreign keys' => array(
  8484. ),
  8485. );
  8486. return $description;
  8487. }
  8488. /**
  8489. * Implements hook_assay_biomaterial_schema()
  8490. * Purpose: To describe the structure of assay_biomaterial to tripal
  8491. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8492. * @see tripal_core.api.inc: tripal_core_chado_update()
  8493. * @see tripal_core.api.inc: tripal_core_chado_select()
  8494. *
  8495. * @return
  8496. * An array describing the current table
  8497. *
  8498. * @ingroup tripal_schema_api
  8499. *
  8500. */
  8501. function tripal_core_chado_assay_biomaterial_schema () {
  8502. $description = array();
  8503. $description = array(
  8504. 'table' => 'assay_biomaterial',
  8505. // 'description' => 'TODO: please describe this table!',
  8506. 'fields' => array(
  8507. 'assay_biomaterial_id' => array(
  8508. // 'description' => 'TODO: please describe this field!',
  8509. 'type' => 'serial',
  8510. 'not null' => '1',
  8511. ),
  8512. 'assay_id' => array(
  8513. // 'description' => 'TODO: please describe this field!',
  8514. 'type' => 'int',
  8515. 'not null' => '1',
  8516. ),
  8517. 'biomaterial_id' => array(
  8518. // 'description' => 'TODO: please describe this field!',
  8519. 'type' => 'int',
  8520. 'not null' => '1',
  8521. ),
  8522. 'channel_id' => array(
  8523. // 'description' => 'TODO: please describe this field!',
  8524. 'type' => 'int',
  8525. 'not null' => '',
  8526. ),
  8527. 'rank' => array(
  8528. // 'description' => 'TODO: please describe this field!',
  8529. 'type' => 'int',
  8530. 'not null' => '1',
  8531. 'default' => '0',
  8532. ),
  8533. ),
  8534. 'primary key' => array(
  8535. '0' => 'assay_biomaterial_id',
  8536. ),
  8537. 'unique keys' => array(
  8538. 'assay_biomaterial_c1' => array(
  8539. '0' => 'assay_id',
  8540. '1' => 'biomaterial_id',
  8541. '2' => 'channel_id',
  8542. '3' => 'rank',
  8543. ),
  8544. ),
  8545. 'indexes' => array(
  8546. 'assay_biomaterial_idx1' => array(
  8547. '0' => 'assay_id',
  8548. ),
  8549. 'assay_biomaterial_idx2' => array(
  8550. '0' => 'biomaterial_id',
  8551. ),
  8552. 'assay_biomaterial_idx3' => array(
  8553. '0' => 'channel_id',
  8554. ),
  8555. ),
  8556. 'foreign keys' => array(
  8557. ),
  8558. );
  8559. return $description;
  8560. }
  8561. /**
  8562. * Implements hook_analysisprop_schema()
  8563. * Purpose: To describe the structure of analysisprop to tripal
  8564. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8565. * @see tripal_core.api.inc: tripal_core_chado_update()
  8566. * @see tripal_core.api.inc: tripal_core_chado_select()
  8567. *
  8568. * @return
  8569. * An array describing the current table
  8570. *
  8571. * @ingroup tripal_schema_api
  8572. *
  8573. */
  8574. function tripal_core_chado_analysisprop_schema () {
  8575. $description = array();
  8576. $description = array(
  8577. 'table' => 'analysisprop',
  8578. // 'description' => 'TODO: please describe this table!',
  8579. 'fields' => array(
  8580. 'analysisprop_id' => array(
  8581. // 'description' => 'TODO: please describe this field!',
  8582. 'type' => 'serial',
  8583. 'not null' => '1',
  8584. ),
  8585. 'analysis_id' => array(
  8586. // 'description' => 'TODO: please describe this field!',
  8587. 'type' => 'int',
  8588. 'not null' => '1',
  8589. ),
  8590. 'type_id' => array(
  8591. // 'description' => 'TODO: please describe this field!',
  8592. 'type' => 'int',
  8593. 'not null' => '1',
  8594. ),
  8595. 'value' => array(
  8596. // 'description' => 'TODO: please describe this field!',
  8597. 'type' => 'text',
  8598. 'not null' => '',
  8599. ),
  8600. 'rank' => array(
  8601. // 'description' => 'TODO: please describe this field!',
  8602. 'type' => 'int',
  8603. 'not null' => '1',
  8604. 'default' => '0',
  8605. ),
  8606. ),
  8607. 'primary key' => array(
  8608. '0' => 'analysisprop_id',
  8609. ),
  8610. 'unique keys' => array(
  8611. 'analysisprop_c1' => array(
  8612. '0' => 'analysis_id',
  8613. '1' => 'type_id',
  8614. '2' => 'rank',
  8615. ),
  8616. ),
  8617. 'indexes' => array(
  8618. 'analysisprop_idx1' => array(
  8619. '0' => 'analysis_id',
  8620. ),
  8621. 'analysisprop_idx2' => array(
  8622. '0' => 'type_id',
  8623. ),
  8624. ),
  8625. 'foreign keys' => array(
  8626. ),
  8627. );
  8628. return $description;
  8629. }
  8630. /**
  8631. * Implements hook_arraydesign_schema()
  8632. * Purpose: To describe the structure of arraydesign to tripal
  8633. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8634. * @see tripal_core.api.inc: tripal_core_chado_update()
  8635. * @see tripal_core.api.inc: tripal_core_chado_select()
  8636. *
  8637. * @return
  8638. * An array describing the current table
  8639. *
  8640. * @ingroup tripal_schema_api
  8641. *
  8642. */
  8643. function tripal_core_chado_arraydesign_schema () {
  8644. $description = array();
  8645. $description = array(
  8646. 'table' => 'arraydesign',
  8647. // 'description' => 'TODO: please describe this table!',
  8648. 'fields' => array(
  8649. 'arraydesign_id' => array(
  8650. // 'description' => 'TODO: please describe this field!',
  8651. 'type' => 'serial',
  8652. 'not null' => '1',
  8653. ),
  8654. 'manufacturer_id' => array(
  8655. // 'description' => 'TODO: please describe this field!',
  8656. 'type' => 'int',
  8657. 'not null' => '1',
  8658. ),
  8659. 'platformtype_id' => array(
  8660. // 'description' => 'TODO: please describe this field!',
  8661. 'type' => 'int',
  8662. 'not null' => '1',
  8663. ),
  8664. 'substratetype_id' => array(
  8665. // 'description' => 'TODO: please describe this field!',
  8666. 'type' => 'int',
  8667. 'not null' => '',
  8668. ),
  8669. 'protocol_id' => array(
  8670. // 'description' => 'TODO: please describe this field!',
  8671. 'type' => 'int',
  8672. 'not null' => '',
  8673. ),
  8674. 'dbxref_id' => array(
  8675. // 'description' => 'TODO: please describe this field!',
  8676. 'type' => 'int',
  8677. 'not null' => '',
  8678. ),
  8679. 'name' => array(
  8680. // 'description' => 'TODO: please describe this field!',
  8681. 'type' => 'text',
  8682. 'not null' => '1',
  8683. ),
  8684. 'version' => array(
  8685. // 'description' => 'TODO: please describe this field!',
  8686. 'type' => 'text',
  8687. 'not null' => '',
  8688. ),
  8689. 'description' => array(
  8690. // 'description' => 'TODO: please describe this field!',
  8691. 'type' => 'text',
  8692. 'not null' => '',
  8693. ),
  8694. 'array_dimensions' => array(
  8695. // 'description' => 'TODO: please describe this field!',
  8696. 'type' => 'text',
  8697. 'not null' => '',
  8698. ),
  8699. 'element_dimensions' => array(
  8700. // 'description' => 'TODO: please describe this field!',
  8701. 'type' => 'text',
  8702. 'not null' => '',
  8703. ),
  8704. 'num_of_elements' => array(
  8705. // 'description' => 'TODO: please describe this field!',
  8706. 'type' => 'int',
  8707. 'not null' => '',
  8708. ),
  8709. 'num_array_columns' => array(
  8710. // 'description' => 'TODO: please describe this field!',
  8711. 'type' => 'int',
  8712. 'not null' => '',
  8713. ),
  8714. 'num_array_rows' => array(
  8715. // 'description' => 'TODO: please describe this field!',
  8716. 'type' => 'int',
  8717. 'not null' => '',
  8718. ),
  8719. 'num_grid_columns' => array(
  8720. // 'description' => 'TODO: please describe this field!',
  8721. 'type' => 'int',
  8722. 'not null' => '',
  8723. ),
  8724. 'num_grid_rows' => array(
  8725. // 'description' => 'TODO: please describe this field!',
  8726. 'type' => 'int',
  8727. 'not null' => '',
  8728. ),
  8729. 'num_sub_columns' => array(
  8730. // 'description' => 'TODO: please describe this field!',
  8731. 'type' => 'int',
  8732. 'not null' => '',
  8733. ),
  8734. 'num_sub_rows' => array(
  8735. // 'description' => 'TODO: please describe this field!',
  8736. 'type' => 'int',
  8737. 'not null' => '',
  8738. ),
  8739. ),
  8740. 'primary key' => array(
  8741. '0' => 'arraydesign_id',
  8742. ),
  8743. 'unique keys' => array(
  8744. 'arraydesign_c1' => array(
  8745. '0' => 'name',
  8746. ),
  8747. ),
  8748. 'indexes' => array(
  8749. 'arraydesign_idx1' => array(
  8750. '0' => 'manufacturer_id',
  8751. ),
  8752. 'arraydesign_idx2' => array(
  8753. '0' => 'platformtype_id',
  8754. ),
  8755. 'arraydesign_idx3' => array(
  8756. '0' => 'substratetype_id',
  8757. ),
  8758. 'arraydesign_idx4' => array(
  8759. '0' => 'protocol_id',
  8760. ),
  8761. 'arraydesign_idx5' => array(
  8762. '0' => 'dbxref_id',
  8763. ),
  8764. ),
  8765. 'foreign keys' => array(
  8766. ),
  8767. );
  8768. return $description;
  8769. }
  8770. /**
  8771. * Implements hook_arraydesignprop_schema()
  8772. * Purpose: To describe the structure of arraydesignprop to tripal
  8773. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8774. * @see tripal_core.api.inc: tripal_core_chado_update()
  8775. * @see tripal_core.api.inc: tripal_core_chado_select()
  8776. *
  8777. * @return
  8778. * An array describing the current table
  8779. *
  8780. * @ingroup tripal_schema_api
  8781. *
  8782. */
  8783. function tripal_core_chado_arraydesignprop_schema () {
  8784. $description = array();
  8785. $description = array(
  8786. 'table' => 'arraydesignprop',
  8787. // 'description' => 'TODO: please describe this table!',
  8788. 'fields' => array(
  8789. 'arraydesignprop_id' => array(
  8790. // 'description' => 'TODO: please describe this field!',
  8791. 'type' => 'serial',
  8792. 'not null' => '1',
  8793. ),
  8794. 'arraydesign_id' => array(
  8795. // 'description' => 'TODO: please describe this field!',
  8796. 'type' => 'int',
  8797. 'not null' => '1',
  8798. ),
  8799. 'type_id' => array(
  8800. // 'description' => 'TODO: please describe this field!',
  8801. 'type' => 'int',
  8802. 'not null' => '1',
  8803. ),
  8804. 'value' => array(
  8805. // 'description' => 'TODO: please describe this field!',
  8806. 'type' => 'text',
  8807. 'not null' => '',
  8808. ),
  8809. 'rank' => array(
  8810. // 'description' => 'TODO: please describe this field!',
  8811. 'type' => 'int',
  8812. 'not null' => '1',
  8813. 'default' => '0',
  8814. ),
  8815. ),
  8816. 'primary key' => array(
  8817. '0' => 'arraydesignprop_id',
  8818. ),
  8819. 'unique keys' => array(
  8820. 'arraydesignprop_c1' => array(
  8821. '0' => 'arraydesign_id',
  8822. '1' => 'type_id',
  8823. '2' => 'rank',
  8824. ),
  8825. ),
  8826. 'indexes' => array(
  8827. 'arraydesignprop_idx1' => array(
  8828. '0' => 'arraydesign_id',
  8829. ),
  8830. 'arraydesignprop_idx2' => array(
  8831. '0' => 'type_id',
  8832. ),
  8833. ),
  8834. 'foreign keys' => array(
  8835. ),
  8836. );
  8837. return $description;
  8838. }
  8839. /**
  8840. * Implements hook_assay_schema()
  8841. * Purpose: To describe the structure of assay to tripal
  8842. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8843. * @see tripal_core.api.inc: tripal_core_chado_update()
  8844. * @see tripal_core.api.inc: tripal_core_chado_select()
  8845. *
  8846. * @return
  8847. * An array describing the current table
  8848. *
  8849. * @ingroup tripal_schema_api
  8850. *
  8851. */
  8852. function tripal_core_chado_assay_schema () {
  8853. $description = array();
  8854. $description = array(
  8855. 'table' => 'assay',
  8856. // 'description' => 'TODO: please describe this table!',
  8857. 'fields' => array(
  8858. 'assay_id' => array(
  8859. // 'description' => 'TODO: please describe this field!',
  8860. 'type' => 'serial',
  8861. 'not null' => '1',
  8862. ),
  8863. 'arraydesign_id' => array(
  8864. // 'description' => 'TODO: please describe this field!',
  8865. 'type' => 'int',
  8866. 'not null' => '1',
  8867. ),
  8868. 'protocol_id' => array(
  8869. // 'description' => 'TODO: please describe this field!',
  8870. 'type' => 'int',
  8871. 'not null' => '',
  8872. ),
  8873. 'assaydate' => array(
  8874. // 'description' => 'TODO: please describe this field!',
  8875. 'type' => 'datetime',
  8876. 'not null' => '',
  8877. 'default' => 'ow(',
  8878. ),
  8879. 'arrayidentifier' => array(
  8880. // 'description' => 'TODO: please describe this field!',
  8881. 'type' => 'text',
  8882. 'not null' => '',
  8883. ),
  8884. 'arraybatchidentifier' => array(
  8885. // 'description' => 'TODO: please describe this field!',
  8886. 'type' => 'text',
  8887. 'not null' => '',
  8888. ),
  8889. 'operator_id' => array(
  8890. // 'description' => 'TODO: please describe this field!',
  8891. 'type' => 'int',
  8892. 'not null' => '1',
  8893. ),
  8894. 'dbxref_id' => array(
  8895. // 'description' => 'TODO: please describe this field!',
  8896. 'type' => 'int',
  8897. 'not null' => '',
  8898. ),
  8899. 'name' => array(
  8900. // 'description' => 'TODO: please describe this field!',
  8901. 'type' => 'text',
  8902. 'not null' => '',
  8903. ),
  8904. 'description' => array(
  8905. // 'description' => 'TODO: please describe this field!',
  8906. 'type' => 'text',
  8907. 'not null' => '',
  8908. ),
  8909. ),
  8910. 'primary key' => array(
  8911. '0' => 'assay_id',
  8912. ),
  8913. 'unique keys' => array(
  8914. 'assay_c1' => array(
  8915. '0' => 'name',
  8916. ),
  8917. ),
  8918. 'indexes' => array(
  8919. 'assay_idx1' => array(
  8920. '0' => 'arraydesign_id',
  8921. ),
  8922. 'assay_idx2' => array(
  8923. '0' => 'protocol_id',
  8924. ),
  8925. 'assay_idx3' => array(
  8926. '0' => 'operator_id',
  8927. ),
  8928. 'assay_idx4' => array(
  8929. '0' => 'dbxref_id',
  8930. ),
  8931. ),
  8932. 'foreign keys' => array(
  8933. ),
  8934. );
  8935. return $description;
  8936. }
  8937. /**
  8938. * Implements hook_cv_root_schema()
  8939. * Purpose: To describe the structure of cv_root to tripal
  8940. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8941. * @see tripal_core.api.inc: tripal_core_chado_update()
  8942. * @see tripal_core.api.inc: tripal_core_chado_select()
  8943. *
  8944. * @return
  8945. * An array describing the current table
  8946. *
  8947. * @ingroup tripal_schema_api
  8948. *
  8949. */
  8950. function tripal_core_chado_cv_root_schema () {
  8951. $description = array();
  8952. $description = array(
  8953. 'table' => 'cv_root',
  8954. // 'description' => 'TODO: please describe this table!',
  8955. 'fields' => array(
  8956. 'cv_id' => array(
  8957. // 'description' => 'TODO: please describe this field!',
  8958. 'type' => 'int',
  8959. 'not null' => '',
  8960. ),
  8961. 'root_cvterm_id' => array(
  8962. // 'description' => 'TODO: please describe this field!',
  8963. 'type' => 'int',
  8964. 'not null' => '',
  8965. ),
  8966. ),
  8967. 'primary key' => array(
  8968. ),
  8969. 'unique keys' => array(
  8970. ),
  8971. 'indexes' => array(
  8972. ),
  8973. 'foreign keys' => array(
  8974. ),
  8975. );
  8976. return $description;
  8977. }
  8978. /**
  8979. * Implements hook_cvterm_schema()
  8980. * Purpose: To describe the structure of cvterm to tripal
  8981. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8982. * @see tripal_core.api.inc: tripal_core_chado_update()
  8983. * @see tripal_core.api.inc: tripal_core_chado_select()
  8984. *
  8985. * @return
  8986. * An array describing the current table
  8987. *
  8988. * @ingroup tripal_schema_api
  8989. *
  8990. */
  8991. function tripal_core_chado_cvterm_schema () {
  8992. $description = array();
  8993. $description = array(
  8994. 'table' => 'cvterm',
  8995. // 'description' => 'TODO: please describe this table!',
  8996. 'fields' => array(
  8997. 'cvterm_id' => array(
  8998. // 'description' => 'TODO: please describe this field!',
  8999. 'type' => 'serial',
  9000. 'not null' => '1',
  9001. ),
  9002. 'cv_id' => array(
  9003. // 'description' => 'TODO: please describe this field!',
  9004. 'type' => 'int',
  9005. 'not null' => '1',
  9006. ),
  9007. 'name' => array(
  9008. // 'description' => 'TODO: please describe this field!',
  9009. 'type' => 'varchar',
  9010. 'length' => '1024',
  9011. 'not null' => '1',
  9012. ),
  9013. 'definition' => array(
  9014. // 'description' => 'TODO: please describe this field!',
  9015. 'type' => 'text',
  9016. 'not null' => '',
  9017. ),
  9018. 'dbxref_id' => array(
  9019. // 'description' => 'TODO: please describe this field!',
  9020. 'type' => 'int',
  9021. 'not null' => '1',
  9022. ),
  9023. 'is_obsolete' => array(
  9024. // 'description' => 'TODO: please describe this field!',
  9025. 'type' => 'int',
  9026. 'not null' => '1',
  9027. 'default' => '0',
  9028. ),
  9029. 'is_relationshiptype' => array(
  9030. // 'description' => 'TODO: please describe this field!',
  9031. 'type' => 'int',
  9032. 'not null' => '1',
  9033. 'default' => '0',
  9034. ),
  9035. ),
  9036. 'primary key' => array(
  9037. '0' => 'cvterm_id',
  9038. ),
  9039. 'unique keys' => array(
  9040. 'cvterm_c1' => array(
  9041. '0' => 'name',
  9042. '1' => 'cv_id',
  9043. '2' => 'is_obsolete',
  9044. ),
  9045. 'cvterm_c2' => array(
  9046. '0' => 'dbxref_id',
  9047. ),
  9048. ),
  9049. 'indexes' => array(
  9050. 'cvterm_idx1' => array(
  9051. '0' => 'cv_id',
  9052. ),
  9053. 'cvterm_idx2' => array(
  9054. '0' => 'name',
  9055. ),
  9056. 'cvterm_idx3' => array(
  9057. '0' => 'dbxref_id',
  9058. ),
  9059. ),
  9060. 'foreign keys' => array(
  9061. ),
  9062. );
  9063. return $description;
  9064. }
  9065. /**
  9066. * Implements hook_feature_dbxref_schema()
  9067. * Purpose: To describe the structure of feature_dbxref to tripal
  9068. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9069. * @see tripal_core.api.inc: tripal_core_chado_update()
  9070. * @see tripal_core.api.inc: tripal_core_chado_select()
  9071. *
  9072. * @return
  9073. * An array describing the current table
  9074. *
  9075. * @ingroup tripal_schema_api
  9076. *
  9077. */
  9078. function tripal_core_chado_feature_dbxref_schema () {
  9079. $description = array();
  9080. $description = array(
  9081. 'table' => 'feature_dbxref',
  9082. // 'description' => 'TODO: please describe this table!',
  9083. 'fields' => array(
  9084. 'feature_dbxref_id' => array(
  9085. // 'description' => 'TODO: please describe this field!',
  9086. 'type' => 'serial',
  9087. 'not null' => '1',
  9088. ),
  9089. 'feature_id' => array(
  9090. // 'description' => 'TODO: please describe this field!',
  9091. 'type' => 'int',
  9092. 'not null' => '1',
  9093. ),
  9094. 'dbxref_id' => array(
  9095. // 'description' => 'TODO: please describe this field!',
  9096. 'type' => 'int',
  9097. 'not null' => '1',
  9098. ),
  9099. 'is_current' => array(
  9100. // 'description' => 'TODO: please describe this field!',
  9101. 'type' => 'boolean',
  9102. 'not null' => '1',
  9103. 'default' => 'ru',
  9104. ),
  9105. ),
  9106. 'primary key' => array(
  9107. '0' => 'feature_dbxref_id',
  9108. ),
  9109. 'unique keys' => array(
  9110. 'feature_dbxref_c1' => array(
  9111. '0' => 'feature_id',
  9112. '1' => 'dbxref_id',
  9113. ),
  9114. ),
  9115. 'indexes' => array(
  9116. 'feature_dbxref_idx1' => array(
  9117. '0' => 'feature_id',
  9118. ),
  9119. 'feature_dbxref_idx2' => array(
  9120. '0' => 'dbxref_id',
  9121. ),
  9122. ),
  9123. 'foreign keys' => array(
  9124. ),
  9125. );
  9126. return $description;
  9127. }
  9128. /**
  9129. * Implements hook_feature_cvtermprop_schema()
  9130. * Purpose: To describe the structure of feature_cvtermprop to tripal
  9131. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9132. * @see tripal_core.api.inc: tripal_core_chado_update()
  9133. * @see tripal_core.api.inc: tripal_core_chado_select()
  9134. *
  9135. * @return
  9136. * An array describing the current table
  9137. *
  9138. * @ingroup tripal_schema_api
  9139. *
  9140. */
  9141. function tripal_core_chado_feature_cvtermprop_schema () {
  9142. $description = array();
  9143. $description = array(
  9144. 'table' => 'feature_cvtermprop',
  9145. // 'description' => 'TODO: please describe this table!',
  9146. 'fields' => array(
  9147. 'feature_cvtermprop_id' => array(
  9148. // 'description' => 'TODO: please describe this field!',
  9149. 'type' => 'serial',
  9150. 'not null' => '1',
  9151. ),
  9152. 'feature_cvterm_id' => array(
  9153. // 'description' => 'TODO: please describe this field!',
  9154. 'type' => 'int',
  9155. 'not null' => '1',
  9156. ),
  9157. 'type_id' => array(
  9158. // 'description' => 'TODO: please describe this field!',
  9159. 'type' => 'int',
  9160. 'not null' => '1',
  9161. ),
  9162. 'value' => array(
  9163. // 'description' => 'TODO: please describe this field!',
  9164. 'type' => 'text',
  9165. 'not null' => '',
  9166. ),
  9167. 'rank' => array(
  9168. // 'description' => 'TODO: please describe this field!',
  9169. 'type' => 'int',
  9170. 'not null' => '1',
  9171. 'default' => '0',
  9172. ),
  9173. ),
  9174. 'primary key' => array(
  9175. '0' => 'feature_cvtermprop_id',
  9176. ),
  9177. 'unique keys' => array(
  9178. 'feature_cvtermprop_c1' => array(
  9179. '0' => 'feature_cvterm_id',
  9180. '1' => 'type_id',
  9181. '2' => 'rank',
  9182. ),
  9183. ),
  9184. 'indexes' => array(
  9185. 'feature_cvtermprop_idx1' => array(
  9186. '0' => 'feature_cvterm_id',
  9187. ),
  9188. 'feature_cvtermprop_idx2' => array(
  9189. '0' => 'type_id',
  9190. ),
  9191. ),
  9192. 'foreign keys' => array(
  9193. ),
  9194. );
  9195. return $description;
  9196. }
  9197. /**
  9198. * Implements hook_feature_difference_schema()
  9199. * Purpose: To describe the structure of feature_difference to tripal
  9200. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9201. * @see tripal_core.api.inc: tripal_core_chado_update()
  9202. * @see tripal_core.api.inc: tripal_core_chado_select()
  9203. *
  9204. * @return
  9205. * An array describing the current table
  9206. *
  9207. * @ingroup tripal_schema_api
  9208. *
  9209. */
  9210. function tripal_core_chado_feature_difference_schema () {
  9211. $description = array();
  9212. $description = array(
  9213. 'table' => 'feature_difference',
  9214. // 'description' => 'TODO: please describe this table!',
  9215. 'fields' => array(
  9216. 'subject_id' => array(
  9217. // 'description' => 'TODO: please describe this field!',
  9218. 'type' => 'int',
  9219. 'not null' => '',
  9220. ),
  9221. 'object_id' => array(
  9222. // 'description' => 'TODO: please describe this field!',
  9223. 'type' => 'int',
  9224. 'not null' => '',
  9225. ),
  9226. 'srcfeature_id' => array(
  9227. // 'description' => 'TODO: please describe this field!',
  9228. 'type' => 'int',
  9229. 'size' => 'small',
  9230. 'not null' => '',
  9231. ),
  9232. 'fmin' => array(
  9233. // 'description' => 'TODO: please describe this field!',
  9234. 'type' => 'int',
  9235. 'not null' => '',
  9236. ),
  9237. 'fmax' => array(
  9238. // 'description' => 'TODO: please describe this field!',
  9239. 'type' => 'int',
  9240. 'not null' => '',
  9241. ),
  9242. 'strand' => array(
  9243. // 'description' => 'TODO: please describe this field!',
  9244. 'type' => 'int',
  9245. 'not null' => '',
  9246. ),
  9247. ),
  9248. 'primary key' => array(
  9249. ),
  9250. 'unique keys' => array(
  9251. ),
  9252. 'indexes' => array(
  9253. ),
  9254. 'foreign keys' => array(
  9255. ),
  9256. );
  9257. return $description;
  9258. }
  9259. /**
  9260. * Implements hook_feature_disjoint_schema()
  9261. * Purpose: To describe the structure of feature_disjoint to tripal
  9262. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9263. * @see tripal_core.api.inc: tripal_core_chado_update()
  9264. * @see tripal_core.api.inc: tripal_core_chado_select()
  9265. *
  9266. * @return
  9267. * An array describing the current table
  9268. *
  9269. * @ingroup tripal_schema_api
  9270. *
  9271. */
  9272. function tripal_core_chado_feature_disjoint_schema () {
  9273. $description = array();
  9274. $description = array(
  9275. 'table' => 'feature_disjoint',
  9276. // 'description' => 'TODO: please describe this table!',
  9277. 'fields' => array(
  9278. 'subject_id' => array(
  9279. // 'description' => 'TODO: please describe this field!',
  9280. 'type' => 'int',
  9281. 'not null' => '',
  9282. ),
  9283. 'object_id' => array(
  9284. // 'description' => 'TODO: please describe this field!',
  9285. 'type' => 'int',
  9286. 'not null' => '',
  9287. ),
  9288. ),
  9289. 'primary key' => array(
  9290. ),
  9291. 'unique keys' => array(
  9292. ),
  9293. 'indexes' => array(
  9294. ),
  9295. 'foreign keys' => array(
  9296. ),
  9297. );
  9298. return $description;
  9299. }
  9300. /**
  9301. * Implements hook_feature_distance_schema()
  9302. * Purpose: To describe the structure of feature_distance to tripal
  9303. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9304. * @see tripal_core.api.inc: tripal_core_chado_update()
  9305. * @see tripal_core.api.inc: tripal_core_chado_select()
  9306. *
  9307. * @return
  9308. * An array describing the current table
  9309. *
  9310. * @ingroup tripal_schema_api
  9311. *
  9312. */
  9313. function tripal_core_chado_feature_distance_schema () {
  9314. $description = array();
  9315. $description = array(
  9316. 'table' => 'feature_distance',
  9317. // 'description' => 'TODO: please describe this table!',
  9318. 'fields' => array(
  9319. 'subject_id' => array(
  9320. // 'description' => 'TODO: please describe this field!',
  9321. 'type' => 'int',
  9322. 'not null' => '',
  9323. ),
  9324. 'object_id' => array(
  9325. // 'description' => 'TODO: please describe this field!',
  9326. 'type' => 'int',
  9327. 'not null' => '',
  9328. ),
  9329. 'srcfeature_id' => array(
  9330. // 'description' => 'TODO: please describe this field!',
  9331. 'type' => 'int',
  9332. 'not null' => '',
  9333. ),
  9334. 'subject_strand' => array(
  9335. // 'description' => 'TODO: please describe this field!',
  9336. 'type' => 'int',
  9337. 'size' => 'small',
  9338. 'not null' => '',
  9339. ),
  9340. 'object_strand' => array(
  9341. // 'description' => 'TODO: please describe this field!',
  9342. 'type' => 'int',
  9343. 'size' => 'small',
  9344. 'not null' => '',
  9345. ),
  9346. 'distance' => array(
  9347. // 'description' => 'TODO: please describe this field!',
  9348. 'type' => 'int',
  9349. 'not null' => '',
  9350. ),
  9351. ),
  9352. 'primary key' => array(
  9353. ),
  9354. 'unique keys' => array(
  9355. ),
  9356. 'indexes' => array(
  9357. ),
  9358. 'foreign keys' => array(
  9359. ),
  9360. );
  9361. return $description;
  9362. }
  9363. /**
  9364. * Implements hook_feature_cvterm_pub_schema()
  9365. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  9366. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9367. * @see tripal_core.api.inc: tripal_core_chado_update()
  9368. * @see tripal_core.api.inc: tripal_core_chado_select()
  9369. *
  9370. * @return
  9371. * An array describing the current table
  9372. *
  9373. * @ingroup tripal_schema_api
  9374. *
  9375. */
  9376. function tripal_core_chado_feature_cvterm_pub_schema () {
  9377. $description = array();
  9378. $description = array(
  9379. 'table' => 'feature_cvterm_pub',
  9380. // 'description' => 'TODO: please describe this table!',
  9381. 'fields' => array(
  9382. 'feature_cvterm_pub_id' => array(
  9383. // 'description' => 'TODO: please describe this field!',
  9384. 'type' => 'serial',
  9385. 'not null' => '1',
  9386. ),
  9387. 'feature_cvterm_id' => array(
  9388. // 'description' => 'TODO: please describe this field!',
  9389. 'type' => 'int',
  9390. 'not null' => '1',
  9391. ),
  9392. 'pub_id' => array(
  9393. // 'description' => 'TODO: please describe this field!',
  9394. 'type' => 'int',
  9395. 'not null' => '1',
  9396. ),
  9397. ),
  9398. 'primary key' => array(
  9399. '0' => 'feature_cvterm_pub_id',
  9400. ),
  9401. 'unique keys' => array(
  9402. 'feature_cvterm_pub_c1' => array(
  9403. '0' => 'feature_cvterm_id',
  9404. '1' => 'pub_id',
  9405. ),
  9406. ),
  9407. 'indexes' => array(
  9408. 'feature_cvterm_pub_idx1' => array(
  9409. '0' => 'feature_cvterm_id',
  9410. ),
  9411. 'feature_cvterm_pub_idx2' => array(
  9412. '0' => 'pub_id',
  9413. ),
  9414. ),
  9415. 'foreign keys' => array(
  9416. ),
  9417. );
  9418. return $description;
  9419. }
  9420. /**
  9421. * Implements hook_feature_cvterm_dbxref_schema()
  9422. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  9423. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9424. * @see tripal_core.api.inc: tripal_core_chado_update()
  9425. * @see tripal_core.api.inc: tripal_core_chado_select()
  9426. *
  9427. * @return
  9428. * An array describing the current table
  9429. *
  9430. * @ingroup tripal_schema_api
  9431. *
  9432. */
  9433. function tripal_core_chado_feature_cvterm_dbxref_schema () {
  9434. $description = array();
  9435. $description = array(
  9436. 'table' => 'feature_cvterm_dbxref',
  9437. // 'description' => 'TODO: please describe this table!',
  9438. 'fields' => array(
  9439. 'feature_cvterm_dbxref_id' => array(
  9440. // 'description' => 'TODO: please describe this field!',
  9441. 'type' => 'serial',
  9442. 'not null' => '1',
  9443. ),
  9444. 'feature_cvterm_id' => array(
  9445. // 'description' => 'TODO: please describe this field!',
  9446. 'type' => 'int',
  9447. 'not null' => '1',
  9448. ),
  9449. 'dbxref_id' => array(
  9450. // 'description' => 'TODO: please describe this field!',
  9451. 'type' => 'int',
  9452. 'not null' => '1',
  9453. ),
  9454. ),
  9455. 'primary key' => array(
  9456. '0' => 'feature_cvterm_dbxref_id',
  9457. ),
  9458. 'unique keys' => array(
  9459. 'feature_cvterm_dbxref_c1' => array(
  9460. '0' => 'feature_cvterm_id',
  9461. '1' => 'dbxref_id',
  9462. ),
  9463. ),
  9464. 'indexes' => array(
  9465. 'feature_cvterm_dbxref_idx1' => array(
  9466. '0' => 'feature_cvterm_id',
  9467. ),
  9468. 'feature_cvterm_dbxref_idx2' => array(
  9469. '0' => 'dbxref_id',
  9470. ),
  9471. ),
  9472. 'foreign keys' => array(
  9473. ),
  9474. );
  9475. return $description;
  9476. }
  9477. /**
  9478. * Implements hook_f_type_schema()
  9479. * Purpose: To describe the structure of f_type to tripal
  9480. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9481. * @see tripal_core.api.inc: tripal_core_chado_update()
  9482. * @see tripal_core.api.inc: tripal_core_chado_select()
  9483. *
  9484. * @return
  9485. * An array describing the current table
  9486. *
  9487. * @ingroup tripal_schema_api
  9488. *
  9489. */
  9490. function tripal_core_chado_f_type_schema () {
  9491. $description = array();
  9492. $description = array(
  9493. 'table' => 'f_type',
  9494. // 'description' => 'TODO: please describe this table!',
  9495. 'fields' => array(
  9496. 'feature_id' => array(
  9497. // 'description' => 'TODO: please describe this field!',
  9498. 'type' => 'int',
  9499. 'not null' => '',
  9500. ),
  9501. 'name' => array(
  9502. // 'description' => 'TODO: please describe this field!',
  9503. 'type' => 'varchar',
  9504. 'length' => '255',
  9505. 'not null' => '',
  9506. ),
  9507. 'dbxref_id' => array(
  9508. // 'description' => 'TODO: please describe this field!',
  9509. 'type' => 'int',
  9510. 'not null' => '',
  9511. ),
  9512. 'type' => array(
  9513. // 'description' => 'TODO: please describe this field!',
  9514. 'type' => 'varchar',
  9515. 'length' => '1024',
  9516. 'not null' => '',
  9517. ),
  9518. 'residues' => array(
  9519. // 'description' => 'TODO: please describe this field!',
  9520. 'type' => 'text',
  9521. 'not null' => '',
  9522. ),
  9523. 'seqlen' => array(
  9524. // 'description' => 'TODO: please describe this field!',
  9525. 'type' => 'int',
  9526. 'not null' => '',
  9527. ),
  9528. 'md5checksum' => array(
  9529. // 'description' => 'TODO: please describe this field!',
  9530. 'type' => 'char',
  9531. 'length' => '32',
  9532. 'not null' => '',
  9533. ),
  9534. 'type_id' => array(
  9535. // 'description' => 'TODO: please describe this field!',
  9536. 'type' => 'int',
  9537. 'not null' => '',
  9538. ),
  9539. 'timeaccessioned' => array(
  9540. // 'description' => 'TODO: please describe this field!',
  9541. 'type' => 'datetime',
  9542. 'not null' => '',
  9543. ),
  9544. 'timelastmodified' => array(
  9545. // 'description' => 'TODO: please describe this field!',
  9546. 'type' => 'datetime',
  9547. 'not null' => '',
  9548. ),
  9549. ),
  9550. 'primary key' => array(
  9551. ),
  9552. 'unique keys' => array(
  9553. ),
  9554. 'indexes' => array(
  9555. ),
  9556. 'foreign keys' => array(
  9557. ),
  9558. );
  9559. return $description;
  9560. }
  9561. /**
  9562. * Implements hook_feature_schema()
  9563. * Purpose: To describe the structure of feature to tripal
  9564. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9565. * @see tripal_core.api.inc: tripal_core_chado_update()
  9566. * @see tripal_core.api.inc: tripal_core_chado_select()
  9567. *
  9568. * @return
  9569. * An array describing the current table
  9570. *
  9571. * @ingroup tripal_schema_api
  9572. *
  9573. */
  9574. function tripal_core_chado_feature_schema () {
  9575. $description = array();
  9576. $description = array(
  9577. 'table' => 'feature',
  9578. // 'description' => 'TODO: please describe this table!',
  9579. 'fields' => array(
  9580. 'feature_id' => array(
  9581. // 'description' => 'TODO: please describe this field!',
  9582. 'type' => 'serial',
  9583. 'not null' => '1',
  9584. ),
  9585. 'dbxref_id' => array(
  9586. // 'description' => 'TODO: please describe this field!',
  9587. 'type' => 'int',
  9588. 'not null' => '',
  9589. ),
  9590. 'organism_id' => array(
  9591. // 'description' => 'TODO: please describe this field!',
  9592. 'type' => 'int',
  9593. 'not null' => '1',
  9594. ),
  9595. 'name' => array(
  9596. // 'description' => 'TODO: please describe this field!',
  9597. 'type' => 'varchar',
  9598. 'length' => '255',
  9599. 'not null' => '',
  9600. ),
  9601. 'uniquename' => array(
  9602. // 'description' => 'TODO: please describe this field!',
  9603. 'type' => 'text',
  9604. 'not null' => '1',
  9605. ),
  9606. 'residues' => array(
  9607. // 'description' => 'TODO: please describe this field!',
  9608. 'type' => 'text',
  9609. 'not null' => '',
  9610. ),
  9611. 'seqlen' => array(
  9612. // 'description' => 'TODO: please describe this field!',
  9613. 'type' => 'int',
  9614. 'not null' => '',
  9615. ),
  9616. 'md5checksum' => array(
  9617. // 'description' => 'TODO: please describe this field!',
  9618. 'type' => 'char',
  9619. 'length' => '32',
  9620. 'not null' => '',
  9621. ),
  9622. 'type_id' => array(
  9623. // 'description' => 'TODO: please describe this field!',
  9624. 'type' => 'int',
  9625. 'not null' => '1',
  9626. ),
  9627. 'is_analysis' => array(
  9628. // 'description' => 'TODO: please describe this field!',
  9629. 'type' => 'boolean',
  9630. 'not null' => '1',
  9631. 'default' => 'als',
  9632. ),
  9633. 'is_obsolete' => array(
  9634. // 'description' => 'TODO: please describe this field!',
  9635. 'type' => 'boolean',
  9636. 'not null' => '1',
  9637. 'default' => 'als',
  9638. ),
  9639. 'timeaccessioned' => array(
  9640. // 'description' => 'TODO: please describe this field!',
  9641. 'type' => 'datetime',
  9642. 'not null' => '1',
  9643. 'default' => 'ow(',
  9644. ),
  9645. 'timelastmodified' => array(
  9646. // 'description' => 'TODO: please describe this field!',
  9647. 'type' => 'datetime',
  9648. 'not null' => '1',
  9649. 'default' => 'ow(',
  9650. ),
  9651. ),
  9652. 'primary key' => array(
  9653. '0' => 'feature_id',
  9654. ),
  9655. 'unique keys' => array(
  9656. 'feature_c1' => array(
  9657. '0' => 'organism_id',
  9658. '1' => 'uniquename',
  9659. '2' => 'type_id',
  9660. ),
  9661. ),
  9662. 'indexes' => array(
  9663. 'feature_idx1' => array(
  9664. '0' => 'dbxref_id',
  9665. ),
  9666. 'feature_idx2' => array(
  9667. '0' => 'organism_id',
  9668. ),
  9669. 'feature_idx3' => array(
  9670. '0' => 'type_id',
  9671. ),
  9672. 'feature_idx4' => array(
  9673. '0' => 'uniquename',
  9674. ),
  9675. 'feature_name_ind1' => array(
  9676. '0' => 'name',
  9677. ),
  9678. ),
  9679. 'foreign keys' => array(
  9680. ),
  9681. );
  9682. return $description;
  9683. }
  9684. /**
  9685. * Implements hook_feature_contains_schema()
  9686. * Purpose: To describe the structure of feature_contains to tripal
  9687. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9688. * @see tripal_core.api.inc: tripal_core_chado_update()
  9689. * @see tripal_core.api.inc: tripal_core_chado_select()
  9690. *
  9691. * @return
  9692. * An array describing the current table
  9693. *
  9694. * @ingroup tripal_schema_api
  9695. *
  9696. */
  9697. function tripal_core_chado_feature_contains_schema () {
  9698. $description = array();
  9699. $description = array(
  9700. 'table' => 'feature_contains',
  9701. // 'description' => 'TODO: please describe this table!',
  9702. 'fields' => array(
  9703. 'subject_id' => array(
  9704. // 'description' => 'TODO: please describe this field!',
  9705. 'type' => 'int',
  9706. 'not null' => '',
  9707. ),
  9708. 'object_id' => array(
  9709. // 'description' => 'TODO: please describe this field!',
  9710. 'type' => 'int',
  9711. 'not null' => '',
  9712. ),
  9713. ),
  9714. 'primary key' => array(
  9715. ),
  9716. 'unique keys' => array(
  9717. ),
  9718. 'indexes' => array(
  9719. ),
  9720. 'foreign keys' => array(
  9721. ),
  9722. );
  9723. return $description;
  9724. }
  9725. /**
  9726. * Implements hook_feature_cvterm_schema()
  9727. * Purpose: To describe the structure of feature_cvterm to tripal
  9728. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9729. * @see tripal_core.api.inc: tripal_core_chado_update()
  9730. * @see tripal_core.api.inc: tripal_core_chado_select()
  9731. *
  9732. * @return
  9733. * An array describing the current table
  9734. *
  9735. * @ingroup tripal_schema_api
  9736. *
  9737. */
  9738. function tripal_core_chado_feature_cvterm_schema () {
  9739. $description = array();
  9740. $description = array(
  9741. 'table' => 'feature_cvterm',
  9742. // 'description' => 'TODO: please describe this table!',
  9743. 'fields' => array(
  9744. 'feature_cvterm_id' => array(
  9745. // 'description' => 'TODO: please describe this field!',
  9746. 'type' => 'serial',
  9747. 'not null' => '1',
  9748. ),
  9749. 'feature_id' => array(
  9750. // 'description' => 'TODO: please describe this field!',
  9751. 'type' => 'int',
  9752. 'not null' => '1',
  9753. ),
  9754. 'cvterm_id' => array(
  9755. // 'description' => 'TODO: please describe this field!',
  9756. 'type' => 'int',
  9757. 'not null' => '1',
  9758. ),
  9759. 'pub_id' => array(
  9760. // 'description' => 'TODO: please describe this field!',
  9761. 'type' => 'int',
  9762. 'not null' => '1',
  9763. ),
  9764. 'is_not' => array(
  9765. // 'description' => 'TODO: please describe this field!',
  9766. 'type' => 'boolean',
  9767. 'not null' => '1',
  9768. 'default' => 'als',
  9769. ),
  9770. 'rank' => array(
  9771. // 'description' => 'TODO: please describe this field!',
  9772. 'type' => 'int',
  9773. 'not null' => '1',
  9774. 'default' => '0',
  9775. ),
  9776. ),
  9777. 'primary key' => array(
  9778. '0' => 'feature_cvterm_id',
  9779. ),
  9780. 'unique keys' => array(
  9781. 'feature_cvterm_c1' => array(
  9782. '0' => 'feature_id',
  9783. '1' => 'cvterm_id',
  9784. '2' => 'pub_id',
  9785. '3' => 'rank',
  9786. ),
  9787. ),
  9788. 'indexes' => array(
  9789. 'feature_cvterm_idx1' => array(
  9790. '0' => 'feature_id',
  9791. ),
  9792. 'feature_cvterm_idx2' => array(
  9793. '0' => 'cvterm_id',
  9794. ),
  9795. 'feature_cvterm_idx3' => array(
  9796. '0' => 'pub_id',
  9797. ),
  9798. ),
  9799. 'foreign keys' => array(
  9800. ),
  9801. );
  9802. return $description;
  9803. }
  9804. /**
  9805. * Implements hook_feature_expression_schema()
  9806. * Purpose: To describe the structure of feature_expression to tripal
  9807. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9808. * @see tripal_core.api.inc: tripal_core_chado_update()
  9809. * @see tripal_core.api.inc: tripal_core_chado_select()
  9810. *
  9811. * @return
  9812. * An array describing the current table
  9813. *
  9814. * @ingroup tripal_schema_api
  9815. *
  9816. */
  9817. function tripal_core_chado_feature_expression_schema () {
  9818. $description = array();
  9819. $description = array(
  9820. 'table' => 'feature_expression',
  9821. // 'description' => 'TODO: please describe this table!',
  9822. 'fields' => array(
  9823. 'feature_expression_id' => array(
  9824. // 'description' => 'TODO: please describe this field!',
  9825. 'type' => 'serial',
  9826. 'not null' => '1',
  9827. ),
  9828. 'expression_id' => array(
  9829. // 'description' => 'TODO: please describe this field!',
  9830. 'type' => 'int',
  9831. 'not null' => '1',
  9832. ),
  9833. 'feature_id' => array(
  9834. // 'description' => 'TODO: please describe this field!',
  9835. 'type' => 'int',
  9836. 'not null' => '1',
  9837. ),
  9838. 'pub_id' => array(
  9839. // 'description' => 'TODO: please describe this field!',
  9840. 'type' => 'int',
  9841. 'not null' => '1',
  9842. ),
  9843. ),
  9844. 'primary key' => array(
  9845. '0' => 'feature_expression_id',
  9846. ),
  9847. 'unique keys' => array(
  9848. 'feature_expression_c1' => array(
  9849. '0' => 'expression_id',
  9850. '1' => 'feature_id',
  9851. '2' => 'pub_id',
  9852. ),
  9853. ),
  9854. 'indexes' => array(
  9855. 'feature_expression_idx1' => array(
  9856. '0' => 'expression_id',
  9857. ),
  9858. 'feature_expression_idx2' => array(
  9859. '0' => 'feature_id',
  9860. ),
  9861. 'feature_expression_idx3' => array(
  9862. '0' => 'pub_id',
  9863. ),
  9864. ),
  9865. 'foreign keys' => array(
  9866. ),
  9867. );
  9868. return $description;
  9869. }
  9870. /**
  9871. * Implements hook_feature_expressionprop_schema()
  9872. * Purpose: To describe the structure of feature_expressionprop to tripal
  9873. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9874. * @see tripal_core.api.inc: tripal_core_chado_update()
  9875. * @see tripal_core.api.inc: tripal_core_chado_select()
  9876. *
  9877. * @return
  9878. * An array describing the current table
  9879. *
  9880. * @ingroup tripal_schema_api
  9881. *
  9882. */
  9883. function tripal_core_chado_feature_expressionprop_schema () {
  9884. $description = array();
  9885. $description = array(
  9886. 'table' => 'feature_expressionprop',
  9887. // 'description' => 'TODO: please describe this table!',
  9888. 'fields' => array(
  9889. 'feature_expressionprop_id' => array(
  9890. // 'description' => 'TODO: please describe this field!',
  9891. 'type' => 'serial',
  9892. 'not null' => '1',
  9893. ),
  9894. 'feature_expression_id' => array(
  9895. // 'description' => 'TODO: please describe this field!',
  9896. 'type' => 'int',
  9897. 'not null' => '1',
  9898. ),
  9899. 'type_id' => array(
  9900. // 'description' => 'TODO: please describe this field!',
  9901. 'type' => 'int',
  9902. 'not null' => '1',
  9903. ),
  9904. 'value' => array(
  9905. // 'description' => 'TODO: please describe this field!',
  9906. 'type' => 'text',
  9907. 'not null' => '',
  9908. ),
  9909. 'rank' => array(
  9910. // 'description' => 'TODO: please describe this field!',
  9911. 'type' => 'int',
  9912. 'not null' => '1',
  9913. 'default' => '0',
  9914. ),
  9915. ),
  9916. 'primary key' => array(
  9917. '0' => 'feature_expressionprop_id',
  9918. ),
  9919. 'unique keys' => array(
  9920. 'feature_expressionprop_c1' => array(
  9921. '0' => 'feature_expression_id',
  9922. '1' => 'type_id',
  9923. '2' => 'rank',
  9924. ),
  9925. ),
  9926. 'indexes' => array(
  9927. 'feature_expressionprop_idx1' => array(
  9928. '0' => 'feature_expression_id',
  9929. ),
  9930. 'feature_expressionprop_idx2' => array(
  9931. '0' => 'type_id',
  9932. ),
  9933. ),
  9934. 'foreign keys' => array(
  9935. ),
  9936. );
  9937. return $description;
  9938. }
  9939. /**
  9940. * Implements hook_feature_pubprop_schema()
  9941. * Purpose: To describe the structure of feature_pubprop to tripal
  9942. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9943. * @see tripal_core.api.inc: tripal_core_chado_update()
  9944. * @see tripal_core.api.inc: tripal_core_chado_select()
  9945. *
  9946. * @return
  9947. * An array describing the current table
  9948. *
  9949. * @ingroup tripal_schema_api
  9950. *
  9951. */
  9952. function tripal_core_chado_feature_pubprop_schema () {
  9953. $description = array();
  9954. $description = array(
  9955. 'table' => 'feature_pubprop',
  9956. // 'description' => 'TODO: please describe this table!',
  9957. 'fields' => array(
  9958. 'feature_pubprop_id' => array(
  9959. // 'description' => 'TODO: please describe this field!',
  9960. 'type' => 'serial',
  9961. 'not null' => '1',
  9962. ),
  9963. 'feature_pub_id' => array(
  9964. // 'description' => 'TODO: please describe this field!',
  9965. 'type' => 'int',
  9966. 'not null' => '1',
  9967. ),
  9968. 'type_id' => array(
  9969. // 'description' => 'TODO: please describe this field!',
  9970. 'type' => 'int',
  9971. 'not null' => '1',
  9972. ),
  9973. 'value' => array(
  9974. // 'description' => 'TODO: please describe this field!',
  9975. 'type' => 'text',
  9976. 'not null' => '',
  9977. ),
  9978. 'rank' => array(
  9979. // 'description' => 'TODO: please describe this field!',
  9980. 'type' => 'int',
  9981. 'not null' => '1',
  9982. 'default' => '0',
  9983. ),
  9984. ),
  9985. 'primary key' => array(
  9986. '0' => 'feature_pubprop_id',
  9987. ),
  9988. 'unique keys' => array(
  9989. 'feature_pubprop_c1' => array(
  9990. '0' => 'feature_pub_id',
  9991. '1' => 'type_id',
  9992. '2' => 'rank',
  9993. ),
  9994. ),
  9995. 'indexes' => array(
  9996. 'feature_pubprop_idx1' => array(
  9997. '0' => 'feature_pub_id',
  9998. ),
  9999. ),
  10000. 'foreign keys' => array(
  10001. ),
  10002. );
  10003. return $description;
  10004. }
  10005. /**
  10006. * Implements hook_feature_relationship_schema()
  10007. * Purpose: To describe the structure of feature_relationship to tripal
  10008. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10009. * @see tripal_core.api.inc: tripal_core_chado_update()
  10010. * @see tripal_core.api.inc: tripal_core_chado_select()
  10011. *
  10012. * @return
  10013. * An array describing the current table
  10014. *
  10015. * @ingroup tripal_schema_api
  10016. *
  10017. */
  10018. function tripal_core_chado_feature_relationship_schema () {
  10019. $description = array();
  10020. $description = array(
  10021. 'table' => 'feature_relationship',
  10022. // 'description' => 'TODO: please describe this table!',
  10023. 'fields' => array(
  10024. 'feature_relationship_id' => array(
  10025. // 'description' => 'TODO: please describe this field!',
  10026. 'type' => 'serial',
  10027. 'not null' => '1',
  10028. ),
  10029. 'subject_id' => array(
  10030. // 'description' => 'TODO: please describe this field!',
  10031. 'type' => 'int',
  10032. 'not null' => '1',
  10033. ),
  10034. 'object_id' => array(
  10035. // 'description' => 'TODO: please describe this field!',
  10036. 'type' => 'int',
  10037. 'not null' => '1',
  10038. ),
  10039. 'type_id' => array(
  10040. // 'description' => 'TODO: please describe this field!',
  10041. 'type' => 'int',
  10042. 'not null' => '1',
  10043. ),
  10044. 'value' => array(
  10045. // 'description' => 'TODO: please describe this field!',
  10046. 'type' => 'text',
  10047. 'not null' => '',
  10048. ),
  10049. 'rank' => array(
  10050. // 'description' => 'TODO: please describe this field!',
  10051. 'type' => 'int',
  10052. 'not null' => '1',
  10053. 'default' => '0',
  10054. ),
  10055. ),
  10056. 'primary key' => array(
  10057. '0' => 'feature_relationship_id',
  10058. ),
  10059. 'unique keys' => array(
  10060. 'feature_relationship_c1' => array(
  10061. '0' => 'subject_id',
  10062. '1' => 'object_id',
  10063. '2' => 'type_id',
  10064. '3' => 'rank',
  10065. ),
  10066. ),
  10067. 'indexes' => array(
  10068. 'feature_relationship_idx1' => array(
  10069. '0' => 'subject_id',
  10070. ),
  10071. 'feature_relationship_idx2' => array(
  10072. '0' => 'object_id',
  10073. ),
  10074. 'feature_relationship_idx3' => array(
  10075. '0' => 'type_id',
  10076. ),
  10077. ),
  10078. 'foreign keys' => array(
  10079. ),
  10080. );
  10081. return $description;
  10082. }
  10083. /**
  10084. * Implements hook_feature_relationship_pub_schema()
  10085. * Purpose: To describe the structure of feature_relationship_pub to tripal
  10086. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10087. * @see tripal_core.api.inc: tripal_core_chado_update()
  10088. * @see tripal_core.api.inc: tripal_core_chado_select()
  10089. *
  10090. * @return
  10091. * An array describing the current table
  10092. *
  10093. * @ingroup tripal_schema_api
  10094. *
  10095. */
  10096. function tripal_core_chado_feature_relationship_pub_schema () {
  10097. $description = array();
  10098. $description = array(
  10099. 'table' => 'feature_relationship_pub',
  10100. // 'description' => 'TODO: please describe this table!',
  10101. 'fields' => array(
  10102. 'feature_relationship_pub_id' => array(
  10103. // 'description' => 'TODO: please describe this field!',
  10104. 'type' => 'serial',
  10105. 'not null' => '1',
  10106. ),
  10107. 'feature_relationship_id' => array(
  10108. // 'description' => 'TODO: please describe this field!',
  10109. 'type' => 'int',
  10110. 'not null' => '1',
  10111. ),
  10112. 'pub_id' => array(
  10113. // 'description' => 'TODO: please describe this field!',
  10114. 'type' => 'int',
  10115. 'not null' => '1',
  10116. ),
  10117. ),
  10118. 'primary key' => array(
  10119. '0' => 'feature_relationship_pub_id',
  10120. ),
  10121. 'unique keys' => array(
  10122. 'feature_relationship_pub_c1' => array(
  10123. '0' => 'feature_relationship_id',
  10124. '1' => 'pub_id',
  10125. ),
  10126. ),
  10127. 'indexes' => array(
  10128. 'feature_relationship_pub_idx1' => array(
  10129. '0' => 'feature_relationship_id',
  10130. ),
  10131. 'feature_relationship_pub_idx2' => array(
  10132. '0' => 'pub_id',
  10133. ),
  10134. ),
  10135. 'foreign keys' => array(
  10136. ),
  10137. );
  10138. return $description;
  10139. }
  10140. /**
  10141. * Implements hook_feature_relationshipprop_schema()
  10142. * Purpose: To describe the structure of feature_relationshipprop to tripal
  10143. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10144. * @see tripal_core.api.inc: tripal_core_chado_update()
  10145. * @see tripal_core.api.inc: tripal_core_chado_select()
  10146. *
  10147. * @return
  10148. * An array describing the current table
  10149. *
  10150. * @ingroup tripal_schema_api
  10151. *
  10152. */
  10153. function tripal_core_chado_feature_relationshipprop_schema () {
  10154. $description = array();
  10155. $description = array(
  10156. 'table' => 'feature_relationshipprop',
  10157. // 'description' => 'TODO: please describe this table!',
  10158. 'fields' => array(
  10159. 'feature_relationshipprop_id' => array(
  10160. // 'description' => 'TODO: please describe this field!',
  10161. 'type' => 'serial',
  10162. 'not null' => '1',
  10163. ),
  10164. 'feature_relationship_id' => array(
  10165. // 'description' => 'TODO: please describe this field!',
  10166. 'type' => 'int',
  10167. 'not null' => '1',
  10168. ),
  10169. 'type_id' => array(
  10170. // 'description' => 'TODO: please describe this field!',
  10171. 'type' => 'int',
  10172. 'not null' => '1',
  10173. ),
  10174. 'value' => array(
  10175. // 'description' => 'TODO: please describe this field!',
  10176. 'type' => 'text',
  10177. 'not null' => '',
  10178. ),
  10179. 'rank' => array(
  10180. // 'description' => 'TODO: please describe this field!',
  10181. 'type' => 'int',
  10182. 'not null' => '1',
  10183. 'default' => '0',
  10184. ),
  10185. ),
  10186. 'primary key' => array(
  10187. '0' => 'feature_relationshipprop_id',
  10188. ),
  10189. 'unique keys' => array(
  10190. 'feature_relationshipprop_c1' => array(
  10191. '0' => 'feature_relationship_id',
  10192. '1' => 'type_id',
  10193. '2' => 'rank',
  10194. ),
  10195. ),
  10196. 'indexes' => array(
  10197. 'feature_relationshipprop_idx1' => array(
  10198. '0' => 'feature_relationship_id',
  10199. ),
  10200. 'feature_relationshipprop_idx2' => array(
  10201. '0' => 'type_id',
  10202. ),
  10203. ),
  10204. 'foreign keys' => array(
  10205. ),
  10206. );
  10207. return $description;
  10208. }
  10209. /**
  10210. * Implements hook_feature_pub_schema()
  10211. * Purpose: To describe the structure of feature_pub to tripal
  10212. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10213. * @see tripal_core.api.inc: tripal_core_chado_update()
  10214. * @see tripal_core.api.inc: tripal_core_chado_select()
  10215. *
  10216. * @return
  10217. * An array describing the current table
  10218. *
  10219. * @ingroup tripal_schema_api
  10220. *
  10221. */
  10222. function tripal_core_chado_feature_pub_schema () {
  10223. $description = array();
  10224. $description = array(
  10225. 'table' => 'feature_pub',
  10226. // 'description' => 'TODO: please describe this table!',
  10227. 'fields' => array(
  10228. 'feature_pub_id' => array(
  10229. // 'description' => 'TODO: please describe this field!',
  10230. 'type' => 'serial',
  10231. 'not null' => '1',
  10232. ),
  10233. 'feature_id' => array(
  10234. // 'description' => 'TODO: please describe this field!',
  10235. 'type' => 'int',
  10236. 'not null' => '1',
  10237. ),
  10238. 'pub_id' => array(
  10239. // 'description' => 'TODO: please describe this field!',
  10240. 'type' => 'int',
  10241. 'not null' => '1',
  10242. ),
  10243. ),
  10244. 'primary key' => array(
  10245. '0' => 'feature_pub_id',
  10246. ),
  10247. 'unique keys' => array(
  10248. 'feature_pub_c1' => array(
  10249. '0' => 'feature_id',
  10250. '1' => 'pub_id',
  10251. ),
  10252. ),
  10253. 'indexes' => array(
  10254. 'feature_pub_idx1' => array(
  10255. '0' => 'feature_id',
  10256. ),
  10257. 'feature_pub_idx2' => array(
  10258. '0' => 'pub_id',
  10259. ),
  10260. ),
  10261. 'foreign keys' => array(
  10262. ),
  10263. );
  10264. return $description;
  10265. }
  10266. /**
  10267. * Implements hook_feature_phenotype_schema()
  10268. * Purpose: To describe the structure of feature_phenotype to tripal
  10269. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10270. * @see tripal_core.api.inc: tripal_core_chado_update()
  10271. * @see tripal_core.api.inc: tripal_core_chado_select()
  10272. *
  10273. * @return
  10274. * An array describing the current table
  10275. *
  10276. * @ingroup tripal_schema_api
  10277. *
  10278. */
  10279. function tripal_core_chado_feature_phenotype_schema () {
  10280. $description = array();
  10281. $description = array(
  10282. 'table' => 'feature_phenotype',
  10283. // 'description' => 'TODO: please describe this table!',
  10284. 'fields' => array(
  10285. 'feature_phenotype_id' => array(
  10286. // 'description' => 'TODO: please describe this field!',
  10287. 'type' => 'serial',
  10288. 'not null' => '1',
  10289. ),
  10290. 'feature_id' => array(
  10291. // 'description' => 'TODO: please describe this field!',
  10292. 'type' => 'int',
  10293. 'not null' => '1',
  10294. ),
  10295. 'phenotype_id' => array(
  10296. // 'description' => 'TODO: please describe this field!',
  10297. 'type' => 'int',
  10298. 'not null' => '1',
  10299. ),
  10300. ),
  10301. 'primary key' => array(
  10302. '0' => 'feature_phenotype_id',
  10303. ),
  10304. 'unique keys' => array(
  10305. 'feature_phenotype_c1' => array(
  10306. '0' => 'feature_id',
  10307. '1' => 'phenotype_id',
  10308. ),
  10309. ),
  10310. 'indexes' => array(
  10311. 'feature_phenotype_idx1' => array(
  10312. '0' => 'feature_id',
  10313. ),
  10314. 'feature_phenotype_idx2' => array(
  10315. '0' => 'phenotype_id',
  10316. ),
  10317. ),
  10318. 'foreign keys' => array(
  10319. ),
  10320. );
  10321. return $description;
  10322. }
  10323. /**
  10324. * Implements hook_feature_genotype_schema()
  10325. * Purpose: To describe the structure of feature_genotype to tripal
  10326. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10327. * @see tripal_core.api.inc: tripal_core_chado_update()
  10328. * @see tripal_core.api.inc: tripal_core_chado_select()
  10329. *
  10330. * @return
  10331. * An array describing the current table
  10332. *
  10333. * @ingroup tripal_schema_api
  10334. *
  10335. */
  10336. function tripal_core_chado_feature_genotype_schema () {
  10337. $description = array();
  10338. $description = array(
  10339. 'table' => 'feature_genotype',
  10340. // 'description' => 'TODO: please describe this table!',
  10341. 'fields' => array(
  10342. 'feature_genotype_id' => array(
  10343. // 'description' => 'TODO: please describe this field!',
  10344. 'type' => 'serial',
  10345. 'not null' => '1',
  10346. ),
  10347. 'feature_id' => array(
  10348. // 'description' => 'TODO: please describe this field!',
  10349. 'type' => 'int',
  10350. 'not null' => '1',
  10351. ),
  10352. 'genotype_id' => array(
  10353. // 'description' => 'TODO: please describe this field!',
  10354. 'type' => 'int',
  10355. 'not null' => '1',
  10356. ),
  10357. 'chromosome_id' => array(
  10358. // 'description' => 'TODO: please describe this field!',
  10359. 'type' => 'int',
  10360. 'not null' => '',
  10361. ),
  10362. 'rank' => array(
  10363. // 'description' => 'TODO: please describe this field!',
  10364. 'type' => 'int',
  10365. 'not null' => '1',
  10366. ),
  10367. 'cgroup' => array(
  10368. // 'description' => 'TODO: please describe this field!',
  10369. 'type' => 'int',
  10370. 'not null' => '1',
  10371. ),
  10372. 'cvterm_id' => array(
  10373. // 'description' => 'TODO: please describe this field!',
  10374. 'type' => 'int',
  10375. 'not null' => '1',
  10376. ),
  10377. ),
  10378. 'primary key' => array(
  10379. '0' => 'feature_genotype_id',
  10380. ),
  10381. 'unique keys' => array(
  10382. 'feature_genotype_c1' => array(
  10383. '0' => 'feature_id',
  10384. '1' => 'genotype_id',
  10385. '2' => 'cvterm_id',
  10386. '3' => 'chromosome_id',
  10387. '4' => 'rank',
  10388. '5' => 'cgroup',
  10389. ),
  10390. ),
  10391. 'indexes' => array(
  10392. 'feature_genotype_idx1' => array(
  10393. '0' => 'feature_id',
  10394. ),
  10395. 'feature_genotype_idx2' => array(
  10396. '0' => 'genotype_id',
  10397. ),
  10398. ),
  10399. 'foreign keys' => array(
  10400. ),
  10401. );
  10402. return $description;
  10403. }
  10404. /**
  10405. * Implements hook_feature_intersection_schema()
  10406. * Purpose: To describe the structure of feature_intersection to tripal
  10407. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10408. * @see tripal_core.api.inc: tripal_core_chado_update()
  10409. * @see tripal_core.api.inc: tripal_core_chado_select()
  10410. *
  10411. * @return
  10412. * An array describing the current table
  10413. *
  10414. * @ingroup tripal_schema_api
  10415. *
  10416. */
  10417. function tripal_core_chado_feature_intersection_schema () {
  10418. $description = array();
  10419. $description = array(
  10420. 'table' => 'feature_intersection',
  10421. // 'description' => 'TODO: please describe this table!',
  10422. 'fields' => array(
  10423. 'subject_id' => array(
  10424. // 'description' => 'TODO: please describe this field!',
  10425. 'type' => 'int',
  10426. 'not null' => '',
  10427. ),
  10428. 'object_id' => array(
  10429. // 'description' => 'TODO: please describe this field!',
  10430. 'type' => 'int',
  10431. 'not null' => '',
  10432. ),
  10433. 'srcfeature_id' => array(
  10434. // 'description' => 'TODO: please describe this field!',
  10435. 'type' => 'int',
  10436. 'not null' => '',
  10437. ),
  10438. 'subject_strand' => array(
  10439. // 'description' => 'TODO: please describe this field!',
  10440. 'type' => 'int',
  10441. 'size' => 'small',
  10442. 'not null' => '',
  10443. ),
  10444. 'object_strand' => array(
  10445. // 'description' => 'TODO: please describe this field!',
  10446. 'type' => 'int',
  10447. 'size' => 'small',
  10448. 'not null' => '',
  10449. ),
  10450. 'fmin' => array(
  10451. // 'description' => 'TODO: please describe this field!',
  10452. 'type' => 'int',
  10453. 'not null' => '',
  10454. ),
  10455. 'fmax' => array(
  10456. // 'description' => 'TODO: please describe this field!',
  10457. 'type' => 'int',
  10458. 'not null' => '',
  10459. ),
  10460. ),
  10461. 'primary key' => array(
  10462. ),
  10463. 'unique keys' => array(
  10464. ),
  10465. 'indexes' => array(
  10466. ),
  10467. 'foreign keys' => array(
  10468. ),
  10469. );
  10470. return $description;
  10471. }
  10472. /**
  10473. * Implements hook_feature_meets_schema()
  10474. * Purpose: To describe the structure of feature_meets to tripal
  10475. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10476. * @see tripal_core.api.inc: tripal_core_chado_update()
  10477. * @see tripal_core.api.inc: tripal_core_chado_select()
  10478. *
  10479. * @return
  10480. * An array describing the current table
  10481. *
  10482. * @ingroup tripal_schema_api
  10483. *
  10484. */
  10485. function tripal_core_chado_feature_meets_schema () {
  10486. $description = array();
  10487. $description = array(
  10488. 'table' => 'feature_meets',
  10489. // 'description' => 'TODO: please describe this table!',
  10490. 'fields' => array(
  10491. 'subject_id' => array(
  10492. // 'description' => 'TODO: please describe this field!',
  10493. 'type' => 'int',
  10494. 'not null' => '',
  10495. ),
  10496. 'object_id' => array(
  10497. // 'description' => 'TODO: please describe this field!',
  10498. 'type' => 'int',
  10499. 'not null' => '',
  10500. ),
  10501. ),
  10502. 'primary key' => array(
  10503. ),
  10504. 'unique keys' => array(
  10505. ),
  10506. 'indexes' => array(
  10507. ),
  10508. 'foreign keys' => array(
  10509. ),
  10510. );
  10511. return $description;
  10512. }
  10513. /**
  10514. * Implements hook_feature_meets_on_same_strand_schema()
  10515. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10516. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10517. * @see tripal_core.api.inc: tripal_core_chado_update()
  10518. * @see tripal_core.api.inc: tripal_core_chado_select()
  10519. *
  10520. * @return
  10521. * An array describing the current table
  10522. *
  10523. * @ingroup tripal_schema_api
  10524. *
  10525. */
  10526. function tripal_core_chado_feature_meets_on_same_strand_schema () {
  10527. $description = array();
  10528. $description = array(
  10529. 'table' => 'feature_meets_on_same_strand',
  10530. // 'description' => 'TODO: please describe this table!',
  10531. 'fields' => array(
  10532. 'subject_id' => array(
  10533. // 'description' => 'TODO: please describe this field!',
  10534. 'type' => 'int',
  10535. 'not null' => '',
  10536. ),
  10537. 'object_id' => array(
  10538. // 'description' => 'TODO: please describe this field!',
  10539. 'type' => 'int',
  10540. 'not null' => '',
  10541. ),
  10542. ),
  10543. 'primary key' => array(
  10544. ),
  10545. 'unique keys' => array(
  10546. ),
  10547. 'indexes' => array(
  10548. ),
  10549. 'foreign keys' => array(
  10550. ),
  10551. );
  10552. return $description;
  10553. }
  10554. /**
  10555. * Implements hook_f_loc_schema()
  10556. * Purpose: To describe the structure of f_loc to tripal
  10557. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10558. * @see tripal_core.api.inc: tripal_core_chado_update()
  10559. * @see tripal_core.api.inc: tripal_core_chado_select()
  10560. *
  10561. * @return
  10562. * An array describing the current table
  10563. *
  10564. * @ingroup tripal_schema_api
  10565. *
  10566. */
  10567. function tripal_core_chado_f_loc_schema () {
  10568. $description = array();
  10569. $description = array(
  10570. 'table' => 'f_loc',
  10571. // 'description' => 'TODO: please describe this table!',
  10572. 'fields' => array(
  10573. 'feature_id' => array(
  10574. // 'description' => 'TODO: please describe this field!',
  10575. 'type' => 'int',
  10576. 'not null' => '',
  10577. ),
  10578. 'name' => array(
  10579. // 'description' => 'TODO: please describe this field!',
  10580. 'type' => 'varchar',
  10581. 'length' => '255',
  10582. 'not null' => '',
  10583. ),
  10584. 'dbxref_id' => array(
  10585. // 'description' => 'TODO: please describe this field!',
  10586. 'type' => 'int',
  10587. 'not null' => '',
  10588. ),
  10589. 'nbeg' => array(
  10590. // 'description' => 'TODO: please describe this field!',
  10591. 'type' => 'int',
  10592. 'not null' => '',
  10593. ),
  10594. 'nend' => array(
  10595. // 'description' => 'TODO: please describe this field!',
  10596. 'type' => 'int',
  10597. 'not null' => '',
  10598. ),
  10599. 'strand' => array(
  10600. // 'description' => 'TODO: please describe this field!',
  10601. 'type' => 'int',
  10602. 'size' => 'small',
  10603. 'not null' => '',
  10604. ),
  10605. ),
  10606. 'primary key' => array(
  10607. ),
  10608. 'unique keys' => array(
  10609. ),
  10610. 'indexes' => array(
  10611. ),
  10612. 'foreign keys' => array(
  10613. ),
  10614. );
  10615. return $description;
  10616. }
  10617. /**
  10618. * Implements hook_expressionprop_schema()
  10619. * Purpose: To describe the structure of expressionprop to tripal
  10620. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10621. * @see tripal_core.api.inc: tripal_core_chado_update()
  10622. * @see tripal_core.api.inc: tripal_core_chado_select()
  10623. *
  10624. * @return
  10625. * An array describing the current table
  10626. *
  10627. * @ingroup tripal_schema_api
  10628. *
  10629. */
  10630. function tripal_core_chado_expressionprop_schema () {
  10631. $description = array();
  10632. $description = array(
  10633. 'table' => 'expressionprop',
  10634. // 'description' => 'TODO: please describe this table!',
  10635. 'fields' => array(
  10636. 'expressionprop_id' => array(
  10637. // 'description' => 'TODO: please describe this field!',
  10638. 'type' => 'serial',
  10639. 'not null' => '1',
  10640. ),
  10641. 'expression_id' => array(
  10642. // 'description' => 'TODO: please describe this field!',
  10643. 'type' => 'int',
  10644. 'not null' => '1',
  10645. ),
  10646. 'type_id' => array(
  10647. // 'description' => 'TODO: please describe this field!',
  10648. 'type' => 'int',
  10649. 'not null' => '1',
  10650. ),
  10651. 'value' => array(
  10652. // 'description' => 'TODO: please describe this field!',
  10653. 'type' => 'text',
  10654. 'not null' => '',
  10655. ),
  10656. 'rank' => array(
  10657. // 'description' => 'TODO: please describe this field!',
  10658. 'type' => 'int',
  10659. 'not null' => '1',
  10660. 'default' => '0',
  10661. ),
  10662. ),
  10663. 'primary key' => array(
  10664. '0' => 'expressionprop_id',
  10665. ),
  10666. 'unique keys' => array(
  10667. 'expressionprop_c1' => array(
  10668. '0' => 'expression_id',
  10669. '1' => 'type_id',
  10670. '2' => 'rank',
  10671. ),
  10672. ),
  10673. 'indexes' => array(
  10674. 'expressionprop_idx1' => array(
  10675. '0' => 'expression_id',
  10676. ),
  10677. 'expressionprop_idx2' => array(
  10678. '0' => 'type_id',
  10679. ),
  10680. ),
  10681. 'foreign keys' => array(
  10682. ),
  10683. );
  10684. return $description;
  10685. }
  10686. /**
  10687. * Implements hook_db_dbxref_count_schema()
  10688. * Purpose: To describe the structure of db_dbxref_count to tripal
  10689. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10690. * @see tripal_core.api.inc: tripal_core_chado_update()
  10691. * @see tripal_core.api.inc: tripal_core_chado_select()
  10692. *
  10693. * @return
  10694. * An array describing the current table
  10695. *
  10696. * @ingroup tripal_schema_api
  10697. *
  10698. */
  10699. function tripal_core_chado_db_dbxref_count_schema () {
  10700. $description = array();
  10701. $description = array(
  10702. 'table' => 'db_dbxref_count',
  10703. // 'description' => 'TODO: please describe this table!',
  10704. 'fields' => array(
  10705. 'name' => array(
  10706. // 'description' => 'TODO: please describe this field!',
  10707. 'type' => 'varchar',
  10708. 'length' => '255',
  10709. 'not null' => '',
  10710. ),
  10711. 'num_dbxrefs' => array(
  10712. // 'description' => 'TODO: please describe this field!',
  10713. 'type' => 'int',
  10714. 'size' => 'big',
  10715. 'not null' => '',
  10716. ),
  10717. ),
  10718. 'primary key' => array(
  10719. ),
  10720. 'unique keys' => array(
  10721. ),
  10722. 'indexes' => array(
  10723. ),
  10724. 'foreign keys' => array(
  10725. ),
  10726. );
  10727. return $description;
  10728. }
  10729. /**
  10730. * Implements hook_dbxref_schema()
  10731. * Purpose: To describe the structure of dbxref to tripal
  10732. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10733. * @see tripal_core.api.inc: tripal_core_chado_update()
  10734. * @see tripal_core.api.inc: tripal_core_chado_select()
  10735. *
  10736. * @return
  10737. * An array describing the current table
  10738. *
  10739. * @ingroup tripal_schema_api
  10740. *
  10741. */
  10742. function tripal_core_chado_dbxref_schema () {
  10743. $description = array();
  10744. $description = array(
  10745. 'table' => 'dbxref',
  10746. // 'description' => 'TODO: please describe this table!',
  10747. 'fields' => array(
  10748. 'dbxref_id' => array(
  10749. // 'description' => 'TODO: please describe this field!',
  10750. 'type' => 'serial',
  10751. 'not null' => '1',
  10752. ),
  10753. 'db_id' => array(
  10754. // 'description' => 'TODO: please describe this field!',
  10755. 'type' => 'int',
  10756. 'not null' => '1',
  10757. ),
  10758. 'accession' => array(
  10759. // 'description' => 'TODO: please describe this field!',
  10760. 'type' => 'varchar',
  10761. 'length' => '255',
  10762. 'not null' => '1',
  10763. ),
  10764. 'version' => array(
  10765. // 'description' => 'TODO: please describe this field!',
  10766. 'type' => 'varchar',
  10767. 'length' => '255',
  10768. 'not null' => '1',
  10769. 'default' => '',
  10770. ),
  10771. 'description' => array(
  10772. // 'description' => 'TODO: please describe this field!',
  10773. 'type' => 'text',
  10774. 'not null' => '',
  10775. ),
  10776. ),
  10777. 'primary key' => array(
  10778. '0' => 'dbxref_id',
  10779. ),
  10780. 'unique keys' => array(
  10781. 'dbxref_c1' => array(
  10782. '0' => 'db_id',
  10783. '1' => 'accession',
  10784. '2' => 'version',
  10785. ),
  10786. ),
  10787. 'indexes' => array(
  10788. 'dbxref_idx1' => array(
  10789. '0' => 'db_id',
  10790. ),
  10791. 'dbxref_idx2' => array(
  10792. '0' => 'accession',
  10793. ),
  10794. 'dbxref_idx3' => array(
  10795. '0' => 'version',
  10796. ),
  10797. ),
  10798. 'foreign keys' => array(
  10799. ),
  10800. );
  10801. return $description;
  10802. }
  10803. /**
  10804. * Implements hook_dbxrefprop_schema()
  10805. * Purpose: To describe the structure of dbxrefprop to tripal
  10806. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10807. * @see tripal_core.api.inc: tripal_core_chado_update()
  10808. * @see tripal_core.api.inc: tripal_core_chado_select()
  10809. *
  10810. * @return
  10811. * An array describing the current table
  10812. *
  10813. * @ingroup tripal_schema_api
  10814. *
  10815. */
  10816. function tripal_core_chado_dbxrefprop_schema () {
  10817. $description = array();
  10818. $description = array(
  10819. 'table' => 'dbxrefprop',
  10820. // 'description' => 'TODO: please describe this table!',
  10821. 'fields' => array(
  10822. 'dbxrefprop_id' => array(
  10823. // 'description' => 'TODO: please describe this field!',
  10824. 'type' => 'serial',
  10825. 'not null' => '1',
  10826. ),
  10827. 'dbxref_id' => array(
  10828. // 'description' => 'TODO: please describe this field!',
  10829. 'type' => 'int',
  10830. 'not null' => '1',
  10831. ),
  10832. 'type_id' => array(
  10833. // 'description' => 'TODO: please describe this field!',
  10834. 'type' => 'int',
  10835. 'not null' => '1',
  10836. ),
  10837. 'value' => array(
  10838. // 'description' => 'TODO: please describe this field!',
  10839. 'type' => 'text',
  10840. 'not null' => '1',
  10841. 'default' => '',
  10842. ),
  10843. 'rank' => array(
  10844. // 'description' => 'TODO: please describe this field!',
  10845. 'type' => 'int',
  10846. 'not null' => '1',
  10847. 'default' => '0',
  10848. ),
  10849. ),
  10850. 'primary key' => array(
  10851. '0' => 'dbxrefprop_id',
  10852. ),
  10853. 'unique keys' => array(
  10854. 'dbxrefprop_c1' => array(
  10855. '0' => 'dbxref_id',
  10856. '1' => 'type_id',
  10857. '2' => 'rank',
  10858. ),
  10859. ),
  10860. 'indexes' => array(
  10861. 'dbxrefprop_idx1' => array(
  10862. '0' => 'dbxref_id',
  10863. ),
  10864. 'dbxrefprop_idx2' => array(
  10865. '0' => 'type_id',
  10866. ),
  10867. ),
  10868. 'foreign keys' => array(
  10869. ),
  10870. );
  10871. return $description;
  10872. }
  10873. /**
  10874. * Implements hook_dfeatureloc_schema()
  10875. * Purpose: To describe the structure of dfeatureloc to tripal
  10876. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10877. * @see tripal_core.api.inc: tripal_core_chado_update()
  10878. * @see tripal_core.api.inc: tripal_core_chado_select()
  10879. *
  10880. * @return
  10881. * An array describing the current table
  10882. *
  10883. * @ingroup tripal_schema_api
  10884. *
  10885. */
  10886. function tripal_core_chado_dfeatureloc_schema () {
  10887. $description = array();
  10888. $description = array(
  10889. 'table' => 'dfeatureloc',
  10890. // 'description' => 'TODO: please describe this table!',
  10891. 'fields' => array(
  10892. 'featureloc_id' => array(
  10893. // 'description' => 'TODO: please describe this field!',
  10894. 'type' => 'int',
  10895. 'not null' => '',
  10896. ),
  10897. 'feature_id' => array(
  10898. // 'description' => 'TODO: please describe this field!',
  10899. 'type' => 'int',
  10900. 'not null' => '',
  10901. ),
  10902. 'srcfeature_id' => array(
  10903. // 'description' => 'TODO: please describe this field!',
  10904. 'type' => 'int',
  10905. 'not null' => '',
  10906. ),
  10907. 'nbeg' => array(
  10908. // 'description' => 'TODO: please describe this field!',
  10909. 'type' => 'int',
  10910. 'not null' => '',
  10911. ),
  10912. 'is_nbeg_partial' => array(
  10913. // 'description' => 'TODO: please describe this field!',
  10914. 'type' => 'boolean',
  10915. 'not null' => '',
  10916. ),
  10917. 'nend' => array(
  10918. // 'description' => 'TODO: please describe this field!',
  10919. 'type' => 'int',
  10920. 'not null' => '',
  10921. ),
  10922. 'is_nend_partial' => array(
  10923. // 'description' => 'TODO: please describe this field!',
  10924. 'type' => 'boolean',
  10925. 'not null' => '',
  10926. ),
  10927. 'strand' => array(
  10928. // 'description' => 'TODO: please describe this field!',
  10929. 'type' => 'int',
  10930. 'size' => 'small',
  10931. 'not null' => '',
  10932. ),
  10933. 'phase' => array(
  10934. // 'description' => 'TODO: please describe this field!',
  10935. 'type' => 'int',
  10936. 'not null' => '',
  10937. ),
  10938. 'residue_info' => array(
  10939. // 'description' => 'TODO: please describe this field!',
  10940. 'type' => 'text',
  10941. 'not null' => '',
  10942. ),
  10943. 'locgroup' => array(
  10944. // 'description' => 'TODO: please describe this field!',
  10945. 'type' => 'int',
  10946. 'not null' => '',
  10947. ),
  10948. 'rank' => array(
  10949. // 'description' => 'TODO: please describe this field!',
  10950. 'type' => 'int',
  10951. 'not null' => '',
  10952. ),
  10953. ),
  10954. 'primary key' => array(
  10955. ),
  10956. 'unique keys' => array(
  10957. ),
  10958. 'indexes' => array(
  10959. ),
  10960. 'foreign keys' => array(
  10961. ),
  10962. );
  10963. return $description;
  10964. }
  10965. /**
  10966. * Implements hook_db_schema()
  10967. * Purpose: To describe the structure of db to tripal
  10968. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10969. * @see tripal_core.api.inc: tripal_core_chado_update()
  10970. * @see tripal_core.api.inc: tripal_core_chado_select()
  10971. *
  10972. * @return
  10973. * An array describing the current table
  10974. *
  10975. * @ingroup tripal_schema_api
  10976. *
  10977. */
  10978. function tripal_core_chado_db_schema () {
  10979. $description = array();
  10980. $description = array(
  10981. 'table' => 'db',
  10982. // 'description' => 'TODO: please describe this table!',
  10983. 'fields' => array(
  10984. 'db_id' => array(
  10985. // 'description' => 'TODO: please describe this field!',
  10986. 'type' => 'serial',
  10987. 'not null' => '1',
  10988. ),
  10989. 'name' => array(
  10990. // 'description' => 'TODO: please describe this field!',
  10991. 'type' => 'varchar',
  10992. 'length' => '255',
  10993. 'not null' => '1',
  10994. ),
  10995. 'description' => array(
  10996. // 'description' => 'TODO: please describe this field!',
  10997. 'type' => 'varchar',
  10998. 'length' => '255',
  10999. 'not null' => '',
  11000. ),
  11001. 'urlprefix' => array(
  11002. // 'description' => 'TODO: please describe this field!',
  11003. 'type' => 'varchar',
  11004. 'length' => '255',
  11005. 'not null' => '',
  11006. ),
  11007. 'url' => array(
  11008. // 'description' => 'TODO: please describe this field!',
  11009. 'type' => 'varchar',
  11010. 'length' => '255',
  11011. 'not null' => '',
  11012. ),
  11013. ),
  11014. 'primary key' => array(
  11015. '0' => 'db_id',
  11016. ),
  11017. 'unique keys' => array(
  11018. 'db_c1' => array(
  11019. '0' => 'name',
  11020. ),
  11021. ),
  11022. 'indexes' => array(
  11023. ),
  11024. 'foreign keys' => array(
  11025. ),
  11026. );
  11027. return $description;
  11028. }
  11029. /**
  11030. * Implements hook_cvtermsynonym_schema()
  11031. * Purpose: To describe the structure of cvtermsynonym to tripal
  11032. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11033. * @see tripal_core.api.inc: tripal_core_chado_update()
  11034. * @see tripal_core.api.inc: tripal_core_chado_select()
  11035. *
  11036. * @return
  11037. * An array describing the current table
  11038. *
  11039. * @ingroup tripal_schema_api
  11040. *
  11041. */
  11042. function tripal_core_chado_cvtermsynonym_schema () {
  11043. $description = array();
  11044. $description = array(
  11045. 'table' => 'cvtermsynonym',
  11046. // 'description' => 'TODO: please describe this table!',
  11047. 'fields' => array(
  11048. 'cvtermsynonym_id' => array(
  11049. // 'description' => 'TODO: please describe this field!',
  11050. 'type' => 'serial',
  11051. 'not null' => '1',
  11052. ),
  11053. 'cvterm_id' => array(
  11054. // 'description' => 'TODO: please describe this field!',
  11055. 'type' => 'int',
  11056. 'not null' => '1',
  11057. ),
  11058. 'synonym' => array(
  11059. // 'description' => 'TODO: please describe this field!',
  11060. 'type' => 'varchar',
  11061. 'length' => '1024',
  11062. 'not null' => '1',
  11063. ),
  11064. 'type_id' => array(
  11065. // 'description' => 'TODO: please describe this field!',
  11066. 'type' => 'int',
  11067. 'not null' => '',
  11068. ),
  11069. ),
  11070. 'primary key' => array(
  11071. '0' => 'cvtermsynonym_id',
  11072. ),
  11073. 'unique keys' => array(
  11074. 'cvtermsynonym_c1' => array(
  11075. '0' => 'cvterm_id',
  11076. '1' => 'synonym',
  11077. ),
  11078. ),
  11079. 'indexes' => array(
  11080. 'cvtermsynonym_idx1' => array(
  11081. '0' => 'cvterm_id',
  11082. ),
  11083. ),
  11084. 'foreign keys' => array(
  11085. ),
  11086. );
  11087. return $description;
  11088. }
  11089. /**
  11090. * Implements hook_cvterm_dbxref_schema()
  11091. * Purpose: To describe the structure of cvterm_dbxref to tripal
  11092. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11093. * @see tripal_core.api.inc: tripal_core_chado_update()
  11094. * @see tripal_core.api.inc: tripal_core_chado_select()
  11095. *
  11096. * @return
  11097. * An array describing the current table
  11098. *
  11099. * @ingroup tripal_schema_api
  11100. *
  11101. */
  11102. function tripal_core_chado_cvterm_dbxref_schema () {
  11103. $description = array();
  11104. $description = array(
  11105. 'table' => 'cvterm_dbxref',
  11106. // 'description' => 'TODO: please describe this table!',
  11107. 'fields' => array(
  11108. 'cvterm_dbxref_id' => array(
  11109. // 'description' => 'TODO: please describe this field!',
  11110. 'type' => 'serial',
  11111. 'not null' => '1',
  11112. ),
  11113. 'cvterm_id' => array(
  11114. // 'description' => 'TODO: please describe this field!',
  11115. 'type' => 'int',
  11116. 'not null' => '1',
  11117. ),
  11118. 'dbxref_id' => array(
  11119. // 'description' => 'TODO: please describe this field!',
  11120. 'type' => 'int',
  11121. 'not null' => '1',
  11122. ),
  11123. 'is_for_definition' => array(
  11124. // 'description' => 'TODO: please describe this field!',
  11125. 'type' => 'int',
  11126. 'not null' => '1',
  11127. 'default' => '0',
  11128. ),
  11129. ),
  11130. 'primary key' => array(
  11131. '0' => 'cvterm_dbxref_id',
  11132. ),
  11133. 'unique keys' => array(
  11134. 'cvterm_dbxref_c1' => array(
  11135. '0' => 'cvterm_id',
  11136. '1' => 'dbxref_id',
  11137. ),
  11138. ),
  11139. 'indexes' => array(
  11140. 'cvterm_dbxref_idx1' => array(
  11141. '0' => 'cvterm_id',
  11142. ),
  11143. 'cvterm_dbxref_idx2' => array(
  11144. '0' => 'dbxref_id',
  11145. ),
  11146. ),
  11147. 'foreign keys' => array(
  11148. ),
  11149. );
  11150. return $description;
  11151. }
  11152. /**
  11153. * Implements hook_cvterm_relationship_schema()
  11154. * Purpose: To describe the structure of cvterm_relationship to tripal
  11155. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11156. * @see tripal_core.api.inc: tripal_core_chado_update()
  11157. * @see tripal_core.api.inc: tripal_core_chado_select()
  11158. *
  11159. * @return
  11160. * An array describing the current table
  11161. *
  11162. * @ingroup tripal_schema_api
  11163. *
  11164. */
  11165. function tripal_core_chado_cvterm_relationship_schema () {
  11166. $description = array();
  11167. $description = array(
  11168. 'table' => 'cvterm_relationship',
  11169. // 'description' => 'TODO: please describe this table!',
  11170. 'fields' => array(
  11171. 'cvterm_relationship_id' => array(
  11172. // 'description' => 'TODO: please describe this field!',
  11173. 'type' => 'serial',
  11174. 'not null' => '1',
  11175. ),
  11176. 'type_id' => array(
  11177. // 'description' => 'TODO: please describe this field!',
  11178. 'type' => 'int',
  11179. 'not null' => '1',
  11180. ),
  11181. 'subject_id' => array(
  11182. // 'description' => 'TODO: please describe this field!',
  11183. 'type' => 'int',
  11184. 'not null' => '1',
  11185. ),
  11186. 'object_id' => array(
  11187. // 'description' => 'TODO: please describe this field!',
  11188. 'type' => 'int',
  11189. 'not null' => '1',
  11190. ),
  11191. ),
  11192. 'primary key' => array(
  11193. '0' => 'cvterm_relationship_id',
  11194. ),
  11195. 'unique keys' => array(
  11196. 'cvterm_relationship_c1' => array(
  11197. '0' => 'subject_id',
  11198. '1' => 'object_id',
  11199. '2' => 'type_id',
  11200. ),
  11201. ),
  11202. 'indexes' => array(
  11203. 'cvterm_relationship_idx1' => array(
  11204. '0' => 'type_id',
  11205. ),
  11206. 'cvterm_relationship_idx2' => array(
  11207. '0' => 'subject_id',
  11208. ),
  11209. 'cvterm_relationship_idx3' => array(
  11210. '0' => 'object_id',
  11211. ),
  11212. ),
  11213. 'foreign keys' => array(
  11214. ),
  11215. );
  11216. return $description;
  11217. }
  11218. /**
  11219. * Implements hook_cvtermpath_schema()
  11220. * Purpose: To describe the structure of cvtermpath to tripal
  11221. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11222. * @see tripal_core.api.inc: tripal_core_chado_update()
  11223. * @see tripal_core.api.inc: tripal_core_chado_select()
  11224. *
  11225. * @return
  11226. * An array describing the current table
  11227. *
  11228. * @ingroup tripal_schema_api
  11229. *
  11230. */
  11231. function tripal_core_chado_cvtermpath_schema () {
  11232. $description = array();
  11233. $description = array(
  11234. 'table' => 'cvtermpath',
  11235. // 'description' => 'TODO: please describe this table!',
  11236. 'fields' => array(
  11237. 'cvtermpath_id' => array(
  11238. // 'description' => 'TODO: please describe this field!',
  11239. 'type' => 'serial',
  11240. 'not null' => '1',
  11241. ),
  11242. 'type_id' => array(
  11243. // 'description' => 'TODO: please describe this field!',
  11244. 'type' => 'int',
  11245. 'not null' => '',
  11246. ),
  11247. 'subject_id' => array(
  11248. // 'description' => 'TODO: please describe this field!',
  11249. 'type' => 'int',
  11250. 'not null' => '1',
  11251. ),
  11252. 'object_id' => array(
  11253. // 'description' => 'TODO: please describe this field!',
  11254. 'type' => 'int',
  11255. 'not null' => '1',
  11256. ),
  11257. 'cv_id' => array(
  11258. // 'description' => 'TODO: please describe this field!',
  11259. 'type' => 'int',
  11260. 'not null' => '1',
  11261. ),
  11262. 'pathdistance' => array(
  11263. // 'description' => 'TODO: please describe this field!',
  11264. 'type' => 'int',
  11265. 'not null' => '',
  11266. ),
  11267. ),
  11268. 'primary key' => array(
  11269. '0' => 'cvtermpath_id',
  11270. ),
  11271. 'unique keys' => array(
  11272. 'cvtermpath_c1' => array(
  11273. '0' => 'subject_id',
  11274. '1' => 'object_id',
  11275. '2' => 'type_id',
  11276. '3' => 'pathdistance',
  11277. ),
  11278. ),
  11279. 'indexes' => array(
  11280. 'cvtermpath_idx1' => array(
  11281. '0' => 'type_id',
  11282. ),
  11283. 'cvtermpath_idx2' => array(
  11284. '0' => 'subject_id',
  11285. ),
  11286. 'cvtermpath_idx3' => array(
  11287. '0' => 'object_id',
  11288. ),
  11289. 'cvtermpath_idx4' => array(
  11290. '0' => 'cv_id',
  11291. ),
  11292. ),
  11293. 'foreign keys' => array(
  11294. ),
  11295. );
  11296. return $description;
  11297. }
  11298. /**
  11299. * Implements hook_cvtermprop_schema()
  11300. * Purpose: To describe the structure of cvtermprop to tripal
  11301. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11302. * @see tripal_core.api.inc: tripal_core_chado_update()
  11303. * @see tripal_core.api.inc: tripal_core_chado_select()
  11304. *
  11305. * @return
  11306. * An array describing the current table
  11307. *
  11308. * @ingroup tripal_schema_api
  11309. *
  11310. */
  11311. function tripal_core_chado_cvtermprop_schema () {
  11312. $description = array();
  11313. $description = array(
  11314. 'table' => 'cvtermprop',
  11315. // 'description' => 'TODO: please describe this table!',
  11316. 'fields' => array(
  11317. 'cvtermprop_id' => array(
  11318. // 'description' => 'TODO: please describe this field!',
  11319. 'type' => 'serial',
  11320. 'not null' => '1',
  11321. ),
  11322. 'cvterm_id' => array(
  11323. // 'description' => 'TODO: please describe this field!',
  11324. 'type' => 'int',
  11325. 'not null' => '1',
  11326. ),
  11327. 'type_id' => array(
  11328. // 'description' => 'TODO: please describe this field!',
  11329. 'type' => 'int',
  11330. 'not null' => '1',
  11331. ),
  11332. 'value' => array(
  11333. // 'description' => 'TODO: please describe this field!',
  11334. 'type' => 'text',
  11335. 'not null' => '1',
  11336. 'default' => '',
  11337. ),
  11338. 'rank' => array(
  11339. // 'description' => 'TODO: please describe this field!',
  11340. 'type' => 'int',
  11341. 'not null' => '1',
  11342. 'default' => '0',
  11343. ),
  11344. ),
  11345. 'primary key' => array(
  11346. '0' => 'cvtermprop_id',
  11347. ),
  11348. 'unique keys' => array(
  11349. 'cvterm_id' => array(
  11350. '0' => 'cvterm_id',
  11351. '1' => 'type_id',
  11352. '2' => 'value',
  11353. '3' => 'rank',
  11354. ),
  11355. ),
  11356. 'indexes' => array(
  11357. 'cvtermprop_idx1' => array(
  11358. '0' => 'cvterm_id',
  11359. ),
  11360. 'cvtermprop_idx2' => array(
  11361. '0' => 'type_id',
  11362. ),
  11363. ),
  11364. 'foreign keys' => array(
  11365. ),
  11366. );
  11367. return $description;
  11368. }
  11369. /**
  11370. * Implements hook_eimage_schema()
  11371. * Purpose: To describe the structure of eimage to tripal
  11372. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11373. * @see tripal_core.api.inc: tripal_core_chado_update()
  11374. * @see tripal_core.api.inc: tripal_core_chado_select()
  11375. *
  11376. * @return
  11377. * An array describing the current table
  11378. *
  11379. * @ingroup tripal_schema_api
  11380. *
  11381. */
  11382. function tripal_core_chado_eimage_schema () {
  11383. $description = array();
  11384. $description = array(
  11385. 'table' => 'eimage',
  11386. // 'description' => 'TODO: please describe this table!',
  11387. 'fields' => array(
  11388. 'eimage_id' => array(
  11389. // 'description' => 'TODO: please describe this field!',
  11390. 'type' => 'serial',
  11391. 'not null' => '1',
  11392. ),
  11393. 'eimage_data' => array(
  11394. // 'description' => 'TODO: please describe this field!',
  11395. 'type' => 'text',
  11396. 'not null' => '',
  11397. ),
  11398. 'eimage_type' => array(
  11399. // 'description' => 'TODO: please describe this field!',
  11400. 'type' => 'varchar',
  11401. 'length' => '255',
  11402. 'not null' => '1',
  11403. ),
  11404. 'image_uri' => array(
  11405. // 'description' => 'TODO: please describe this field!',
  11406. 'type' => 'varchar',
  11407. 'length' => '255',
  11408. 'not null' => '',
  11409. ),
  11410. ),
  11411. 'primary key' => array(
  11412. '0' => 'eimage_id',
  11413. ),
  11414. 'unique keys' => array(
  11415. ),
  11416. 'indexes' => array(
  11417. ),
  11418. 'foreign keys' => array(
  11419. ),
  11420. );
  11421. return $description;
  11422. }
  11423. /**
  11424. * Implements hook_element_schema()
  11425. * Purpose: To describe the structure of element to tripal
  11426. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11427. * @see tripal_core.api.inc: tripal_core_chado_update()
  11428. * @see tripal_core.api.inc: tripal_core_chado_select()
  11429. *
  11430. * @return
  11431. * An array describing the current table
  11432. *
  11433. * @ingroup tripal_schema_api
  11434. *
  11435. */
  11436. function tripal_core_chado_element_schema () {
  11437. $description = array();
  11438. $description = array(
  11439. 'table' => 'element',
  11440. // 'description' => 'TODO: please describe this table!',
  11441. 'fields' => array(
  11442. 'element_id' => array(
  11443. // 'description' => 'TODO: please describe this field!',
  11444. 'type' => 'serial',
  11445. 'not null' => '1',
  11446. ),
  11447. 'feature_id' => array(
  11448. // 'description' => 'TODO: please describe this field!',
  11449. 'type' => 'int',
  11450. 'not null' => '',
  11451. ),
  11452. 'arraydesign_id' => array(
  11453. // 'description' => 'TODO: please describe this field!',
  11454. 'type' => 'int',
  11455. 'not null' => '1',
  11456. ),
  11457. 'type_id' => array(
  11458. // 'description' => 'TODO: please describe this field!',
  11459. 'type' => 'int',
  11460. 'not null' => '',
  11461. ),
  11462. 'dbxref_id' => array(
  11463. // 'description' => 'TODO: please describe this field!',
  11464. 'type' => 'int',
  11465. 'not null' => '',
  11466. ),
  11467. ),
  11468. 'primary key' => array(
  11469. '0' => 'element_id',
  11470. ),
  11471. 'unique keys' => array(
  11472. 'element_c1' => array(
  11473. '0' => 'feature_id',
  11474. '1' => 'arraydesign_id',
  11475. ),
  11476. ),
  11477. 'indexes' => array(
  11478. 'element_idx1' => array(
  11479. '0' => 'feature_id',
  11480. ),
  11481. 'element_idx2' => array(
  11482. '0' => 'arraydesign_id',
  11483. ),
  11484. 'element_idx3' => array(
  11485. '0' => 'type_id',
  11486. ),
  11487. 'element_idx4' => array(
  11488. '0' => 'dbxref_id',
  11489. ),
  11490. ),
  11491. 'foreign keys' => array(
  11492. ),
  11493. );
  11494. return $description;
  11495. }
  11496. /**
  11497. * Implements hook_expression_cvterm_schema()
  11498. * Purpose: To describe the structure of expression_cvterm to tripal
  11499. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11500. * @see tripal_core.api.inc: tripal_core_chado_update()
  11501. * @see tripal_core.api.inc: tripal_core_chado_select()
  11502. *
  11503. * @return
  11504. * An array describing the current table
  11505. *
  11506. * @ingroup tripal_schema_api
  11507. *
  11508. */
  11509. function tripal_core_chado_expression_cvterm_schema () {
  11510. $description = array();
  11511. $description = array(
  11512. 'table' => 'expression_cvterm',
  11513. // 'description' => 'TODO: please describe this table!',
  11514. 'fields' => array(
  11515. 'expression_cvterm_id' => array(
  11516. // 'description' => 'TODO: please describe this field!',
  11517. 'type' => 'serial',
  11518. 'not null' => '1',
  11519. ),
  11520. 'expression_id' => array(
  11521. // 'description' => 'TODO: please describe this field!',
  11522. 'type' => 'int',
  11523. 'not null' => '1',
  11524. ),
  11525. 'cvterm_id' => array(
  11526. // 'description' => 'TODO: please describe this field!',
  11527. 'type' => 'int',
  11528. 'not null' => '1',
  11529. ),
  11530. 'rank' => array(
  11531. // 'description' => 'TODO: please describe this field!',
  11532. 'type' => 'int',
  11533. 'not null' => '1',
  11534. 'default' => '0',
  11535. ),
  11536. 'cvterm_type_id' => array(
  11537. // 'description' => 'TODO: please describe this field!',
  11538. 'type' => 'int',
  11539. 'not null' => '1',
  11540. ),
  11541. ),
  11542. 'primary key' => array(
  11543. '0' => 'expression_cvterm_id',
  11544. ),
  11545. 'unique keys' => array(
  11546. 'expression_cvterm_c1' => array(
  11547. '0' => 'expression_id',
  11548. '1' => 'cvterm_id',
  11549. '2' => 'cvterm_type_id',
  11550. ),
  11551. ),
  11552. 'indexes' => array(
  11553. 'expression_cvterm_idx1' => array(
  11554. '0' => 'expression_id',
  11555. ),
  11556. 'expression_cvterm_idx2' => array(
  11557. '0' => 'cvterm_id',
  11558. ),
  11559. 'expression_cvterm_idx3' => array(
  11560. '0' => 'cvterm_type_id',
  11561. ),
  11562. ),
  11563. 'foreign keys' => array(
  11564. ),
  11565. );
  11566. return $description;
  11567. }
  11568. /**
  11569. * Implements hook_expression_cvtermprop_schema()
  11570. * Purpose: To describe the structure of expression_cvtermprop to tripal
  11571. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11572. * @see tripal_core.api.inc: tripal_core_chado_update()
  11573. * @see tripal_core.api.inc: tripal_core_chado_select()
  11574. *
  11575. * @return
  11576. * An array describing the current table
  11577. *
  11578. * @ingroup tripal_schema_api
  11579. *
  11580. */
  11581. function tripal_core_chado_expression_cvtermprop_schema () {
  11582. $description = array();
  11583. $description = array(
  11584. 'table' => 'expression_cvtermprop',
  11585. // 'description' => 'TODO: please describe this table!',
  11586. 'fields' => array(
  11587. 'expression_cvtermprop_id' => array(
  11588. // 'description' => 'TODO: please describe this field!',
  11589. 'type' => 'serial',
  11590. 'not null' => '1',
  11591. ),
  11592. 'expression_cvterm_id' => array(
  11593. // 'description' => 'TODO: please describe this field!',
  11594. 'type' => 'int',
  11595. 'not null' => '1',
  11596. ),
  11597. 'type_id' => array(
  11598. // 'description' => 'TODO: please describe this field!',
  11599. 'type' => 'int',
  11600. 'not null' => '1',
  11601. ),
  11602. 'value' => array(
  11603. // 'description' => 'TODO: please describe this field!',
  11604. 'type' => 'text',
  11605. 'not null' => '',
  11606. ),
  11607. 'rank' => array(
  11608. // 'description' => 'TODO: please describe this field!',
  11609. 'type' => 'int',
  11610. 'not null' => '1',
  11611. 'default' => '0',
  11612. ),
  11613. ),
  11614. 'primary key' => array(
  11615. '0' => 'expression_cvtermprop_id',
  11616. ),
  11617. 'unique keys' => array(
  11618. 'expression_cvtermprop_c1' => array(
  11619. '0' => 'expression_cvterm_id',
  11620. '1' => 'type_id',
  11621. '2' => 'rank',
  11622. ),
  11623. ),
  11624. 'indexes' => array(
  11625. 'expression_cvtermprop_idx1' => array(
  11626. '0' => 'expression_cvterm_id',
  11627. ),
  11628. 'expression_cvtermprop_idx2' => array(
  11629. '0' => 'type_id',
  11630. ),
  11631. ),
  11632. 'foreign keys' => array(
  11633. ),
  11634. );
  11635. return $description;
  11636. }
  11637. /**
  11638. * Implements hook_expression_image_schema()
  11639. * Purpose: To describe the structure of expression_image to tripal
  11640. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11641. * @see tripal_core.api.inc: tripal_core_chado_update()
  11642. * @see tripal_core.api.inc: tripal_core_chado_select()
  11643. *
  11644. * @return
  11645. * An array describing the current table
  11646. *
  11647. * @ingroup tripal_schema_api
  11648. *
  11649. */
  11650. function tripal_core_chado_expression_image_schema () {
  11651. $description = array();
  11652. $description = array(
  11653. 'table' => 'expression_image',
  11654. // 'description' => 'TODO: please describe this table!',
  11655. 'fields' => array(
  11656. 'expression_image_id' => array(
  11657. // 'description' => 'TODO: please describe this field!',
  11658. 'type' => 'serial',
  11659. 'not null' => '1',
  11660. ),
  11661. 'expression_id' => array(
  11662. // 'description' => 'TODO: please describe this field!',
  11663. 'type' => 'int',
  11664. 'not null' => '1',
  11665. ),
  11666. 'eimage_id' => array(
  11667. // 'description' => 'TODO: please describe this field!',
  11668. 'type' => 'int',
  11669. 'not null' => '1',
  11670. ),
  11671. ),
  11672. 'primary key' => array(
  11673. '0' => 'expression_image_id',
  11674. ),
  11675. 'unique keys' => array(
  11676. 'expression_image_c1' => array(
  11677. '0' => 'expression_id',
  11678. '1' => 'eimage_id',
  11679. ),
  11680. ),
  11681. 'indexes' => array(
  11682. 'expression_image_idx1' => array(
  11683. '0' => 'expression_id',
  11684. ),
  11685. 'expression_image_idx2' => array(
  11686. '0' => 'eimage_id',
  11687. ),
  11688. ),
  11689. 'foreign keys' => array(
  11690. ),
  11691. );
  11692. return $description;
  11693. }
  11694. /**
  11695. * Implements hook_expression_pub_schema()
  11696. * Purpose: To describe the structure of expression_pub to tripal
  11697. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11698. * @see tripal_core.api.inc: tripal_core_chado_update()
  11699. * @see tripal_core.api.inc: tripal_core_chado_select()
  11700. *
  11701. * @return
  11702. * An array describing the current table
  11703. *
  11704. * @ingroup tripal_schema_api
  11705. *
  11706. */
  11707. function tripal_core_chado_expression_pub_schema () {
  11708. $description = array();
  11709. $description = array(
  11710. 'table' => 'expression_pub',
  11711. // 'description' => 'TODO: please describe this table!',
  11712. 'fields' => array(
  11713. 'expression_pub_id' => array(
  11714. // 'description' => 'TODO: please describe this field!',
  11715. 'type' => 'serial',
  11716. 'not null' => '1',
  11717. ),
  11718. 'expression_id' => array(
  11719. // 'description' => 'TODO: please describe this field!',
  11720. 'type' => 'int',
  11721. 'not null' => '1',
  11722. ),
  11723. 'pub_id' => array(
  11724. // 'description' => 'TODO: please describe this field!',
  11725. 'type' => 'int',
  11726. 'not null' => '1',
  11727. ),
  11728. ),
  11729. 'primary key' => array(
  11730. '0' => 'expression_pub_id',
  11731. ),
  11732. 'unique keys' => array(
  11733. 'expression_pub_c1' => array(
  11734. '0' => 'expression_id',
  11735. '1' => 'pub_id',
  11736. ),
  11737. ),
  11738. 'indexes' => array(
  11739. 'expression_pub_idx1' => array(
  11740. '0' => 'expression_id',
  11741. ),
  11742. 'expression_pub_idx2' => array(
  11743. '0' => 'pub_id',
  11744. ),
  11745. ),
  11746. 'foreign keys' => array(
  11747. ),
  11748. );
  11749. return $description;
  11750. }
  11751. /**
  11752. * Implements hook_expression_schema()
  11753. * Purpose: To describe the structure of expression to tripal
  11754. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11755. * @see tripal_core.api.inc: tripal_core_chado_update()
  11756. * @see tripal_core.api.inc: tripal_core_chado_select()
  11757. *
  11758. * @return
  11759. * An array describing the current table
  11760. *
  11761. * @ingroup tripal_schema_api
  11762. *
  11763. */
  11764. function tripal_core_chado_expression_schema () {
  11765. $description = array();
  11766. $description = array(
  11767. 'table' => 'expression',
  11768. // 'description' => 'TODO: please describe this table!',
  11769. 'fields' => array(
  11770. 'expression_id' => array(
  11771. // 'description' => 'TODO: please describe this field!',
  11772. 'type' => 'serial',
  11773. 'not null' => '1',
  11774. ),
  11775. 'uniquename' => array(
  11776. // 'description' => 'TODO: please describe this field!',
  11777. 'type' => 'text',
  11778. 'not null' => '1',
  11779. ),
  11780. 'md5checksum' => array(
  11781. // 'description' => 'TODO: please describe this field!',
  11782. 'type' => 'char',
  11783. 'length' => '32',
  11784. 'not null' => '',
  11785. ),
  11786. 'description' => array(
  11787. // 'description' => 'TODO: please describe this field!',
  11788. 'type' => 'text',
  11789. 'not null' => '',
  11790. ),
  11791. ),
  11792. 'primary key' => array(
  11793. '0' => 'expression_id',
  11794. ),
  11795. 'unique keys' => array(
  11796. 'expression_c1' => array(
  11797. '0' => 'uniquename',
  11798. ),
  11799. ),
  11800. 'indexes' => array(
  11801. ),
  11802. 'foreign keys' => array(
  11803. ),
  11804. );
  11805. return $description;
  11806. }
  11807. /**
  11808. * Implements hook_environment_cvterm_schema()
  11809. * Purpose: To describe the structure of environment_cvterm to tripal
  11810. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11811. * @see tripal_core.api.inc: tripal_core_chado_update()
  11812. * @see tripal_core.api.inc: tripal_core_chado_select()
  11813. *
  11814. * @return
  11815. * An array describing the current table
  11816. *
  11817. * @ingroup tripal_schema_api
  11818. *
  11819. */
  11820. function tripal_core_chado_environment_cvterm_schema () {
  11821. $description = array();
  11822. $description = array(
  11823. 'table' => 'environment_cvterm',
  11824. // 'description' => 'TODO: please describe this table!',
  11825. 'fields' => array(
  11826. 'environment_cvterm_id' => array(
  11827. // 'description' => 'TODO: please describe this field!',
  11828. 'type' => 'serial',
  11829. 'not null' => '1',
  11830. ),
  11831. 'environment_id' => array(
  11832. // 'description' => 'TODO: please describe this field!',
  11833. 'type' => 'int',
  11834. 'not null' => '1',
  11835. ),
  11836. 'cvterm_id' => array(
  11837. // 'description' => 'TODO: please describe this field!',
  11838. 'type' => 'int',
  11839. 'not null' => '1',
  11840. ),
  11841. ),
  11842. 'primary key' => array(
  11843. '0' => 'environment_cvterm_id',
  11844. ),
  11845. 'unique keys' => array(
  11846. 'environment_cvterm_c1' => array(
  11847. '0' => 'environment_id',
  11848. '1' => 'cvterm_id',
  11849. ),
  11850. ),
  11851. 'indexes' => array(
  11852. 'environment_cvterm_idx1' => array(
  11853. '0' => 'environment_id',
  11854. ),
  11855. 'environment_cvterm_idx2' => array(
  11856. '0' => 'cvterm_id',
  11857. ),
  11858. ),
  11859. 'foreign keys' => array(
  11860. ),
  11861. );
  11862. return $description;
  11863. }
  11864. /**
  11865. * Implements hook_element_relationship_schema()
  11866. * Purpose: To describe the structure of element_relationship to tripal
  11867. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11868. * @see tripal_core.api.inc: tripal_core_chado_update()
  11869. * @see tripal_core.api.inc: tripal_core_chado_select()
  11870. *
  11871. * @return
  11872. * An array describing the current table
  11873. *
  11874. * @ingroup tripal_schema_api
  11875. *
  11876. */
  11877. function tripal_core_chado_element_relationship_schema () {
  11878. $description = array();
  11879. $description = array(
  11880. 'table' => 'element_relationship',
  11881. // 'description' => 'TODO: please describe this table!',
  11882. 'fields' => array(
  11883. 'element_relationship_id' => array(
  11884. // 'description' => 'TODO: please describe this field!',
  11885. 'type' => 'serial',
  11886. 'not null' => '1',
  11887. ),
  11888. 'subject_id' => array(
  11889. // 'description' => 'TODO: please describe this field!',
  11890. 'type' => 'int',
  11891. 'not null' => '1',
  11892. ),
  11893. 'type_id' => array(
  11894. // 'description' => 'TODO: please describe this field!',
  11895. 'type' => 'int',
  11896. 'not null' => '1',
  11897. ),
  11898. 'object_id' => array(
  11899. // 'description' => 'TODO: please describe this field!',
  11900. 'type' => 'int',
  11901. 'not null' => '1',
  11902. ),
  11903. 'value' => array(
  11904. // 'description' => 'TODO: please describe this field!',
  11905. 'type' => 'text',
  11906. 'not null' => '',
  11907. ),
  11908. 'rank' => array(
  11909. // 'description' => 'TODO: please describe this field!',
  11910. 'type' => 'int',
  11911. 'not null' => '1',
  11912. 'default' => '0',
  11913. ),
  11914. ),
  11915. 'primary key' => array(
  11916. '0' => 'element_relationship_id',
  11917. ),
  11918. 'unique keys' => array(
  11919. 'element_relationship_c1' => array(
  11920. '0' => 'subject_id',
  11921. '1' => 'object_id',
  11922. '2' => 'type_id',
  11923. '3' => 'rank',
  11924. ),
  11925. ),
  11926. 'indexes' => array(
  11927. 'element_relationship_idx1' => array(
  11928. '0' => 'subject_id',
  11929. ),
  11930. 'element_relationship_idx2' => array(
  11931. '0' => 'type_id',
  11932. ),
  11933. 'element_relationship_idx3' => array(
  11934. '0' => 'object_id',
  11935. ),
  11936. 'element_relationship_idx4' => array(
  11937. '0' => 'value',
  11938. ),
  11939. ),
  11940. 'foreign keys' => array(
  11941. ),
  11942. );
  11943. return $description;
  11944. }
  11945. /**
  11946. * Implements hook_elementresult_schema()
  11947. * Purpose: To describe the structure of elementresult to tripal
  11948. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11949. * @see tripal_core.api.inc: tripal_core_chado_update()
  11950. * @see tripal_core.api.inc: tripal_core_chado_select()
  11951. *
  11952. * @return
  11953. * An array describing the current table
  11954. *
  11955. * @ingroup tripal_schema_api
  11956. *
  11957. */
  11958. function tripal_core_chado_elementresult_schema () {
  11959. $description = array();
  11960. $description = array(
  11961. 'table' => 'elementresult',
  11962. // 'description' => 'TODO: please describe this table!',
  11963. 'fields' => array(
  11964. 'elementresult_id' => array(
  11965. // 'description' => 'TODO: please describe this field!',
  11966. 'type' => 'serial',
  11967. 'not null' => '1',
  11968. ),
  11969. 'element_id' => array(
  11970. // 'description' => 'TODO: please describe this field!',
  11971. 'type' => 'int',
  11972. 'not null' => '1',
  11973. ),
  11974. 'quantification_id' => array(
  11975. // 'description' => 'TODO: please describe this field!',
  11976. 'type' => 'int',
  11977. 'not null' => '1',
  11978. ),
  11979. 'signal' => array(
  11980. // 'description' => 'TODO: please describe this field!',
  11981. 'type' => 'float',
  11982. 'size' => 'big',
  11983. 'not null' => '1',
  11984. ),
  11985. ),
  11986. 'primary key' => array(
  11987. '0' => 'elementresult_id',
  11988. ),
  11989. 'unique keys' => array(
  11990. 'elementresult_c1' => array(
  11991. '0' => 'element_id',
  11992. '1' => 'quantification_id',
  11993. ),
  11994. ),
  11995. 'indexes' => array(
  11996. 'elementresult_idx1' => array(
  11997. '0' => 'element_id',
  11998. ),
  11999. 'elementresult_idx2' => array(
  12000. '0' => 'quantification_id',
  12001. ),
  12002. 'elementresult_idx3' => array(
  12003. '0' => 'signal',
  12004. ),
  12005. ),
  12006. 'foreign keys' => array(
  12007. ),
  12008. );
  12009. return $description;
  12010. }
  12011. /**
  12012. * Implements hook_elementresult_relationship_schema()
  12013. * Purpose: To describe the structure of elementresult_relationship to tripal
  12014. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12015. * @see tripal_core.api.inc: tripal_core_chado_update()
  12016. * @see tripal_core.api.inc: tripal_core_chado_select()
  12017. *
  12018. * @return
  12019. * An array describing the current table
  12020. *
  12021. * @ingroup tripal_schema_api
  12022. *
  12023. */
  12024. function tripal_core_chado_elementresult_relationship_schema () {
  12025. $description = array();
  12026. $description = array(
  12027. 'table' => 'elementresult_relationship',
  12028. // 'description' => 'TODO: please describe this table!',
  12029. 'fields' => array(
  12030. 'elementresult_relationship_id' => array(
  12031. // 'description' => 'TODO: please describe this field!',
  12032. 'type' => 'serial',
  12033. 'not null' => '1',
  12034. ),
  12035. 'subject_id' => array(
  12036. // 'description' => 'TODO: please describe this field!',
  12037. 'type' => 'int',
  12038. 'not null' => '1',
  12039. ),
  12040. 'type_id' => array(
  12041. // 'description' => 'TODO: please describe this field!',
  12042. 'type' => 'int',
  12043. 'not null' => '1',
  12044. ),
  12045. 'object_id' => array(
  12046. // 'description' => 'TODO: please describe this field!',
  12047. 'type' => 'int',
  12048. 'not null' => '1',
  12049. ),
  12050. 'value' => array(
  12051. // 'description' => 'TODO: please describe this field!',
  12052. 'type' => 'text',
  12053. 'not null' => '',
  12054. ),
  12055. 'rank' => array(
  12056. // 'description' => 'TODO: please describe this field!',
  12057. 'type' => 'int',
  12058. 'not null' => '1',
  12059. 'default' => '0',
  12060. ),
  12061. ),
  12062. 'primary key' => array(
  12063. '0' => 'elementresult_relationship_id',
  12064. ),
  12065. 'unique keys' => array(
  12066. 'elementresult_relationship_c1' => array(
  12067. '0' => 'subject_id',
  12068. '1' => 'object_id',
  12069. '2' => 'type_id',
  12070. '3' => 'rank',
  12071. ),
  12072. ),
  12073. 'indexes' => array(
  12074. 'elementresult_relationship_idx1' => array(
  12075. '0' => 'subject_id',
  12076. ),
  12077. 'elementresult_relationship_idx2' => array(
  12078. '0' => 'type_id',
  12079. ),
  12080. 'elementresult_relationship_idx3' => array(
  12081. '0' => 'object_id',
  12082. ),
  12083. 'elementresult_relationship_idx4' => array(
  12084. '0' => 'value',
  12085. ),
  12086. ),
  12087. 'foreign keys' => array(
  12088. ),
  12089. );
  12090. return $description;
  12091. }
  12092. /**
  12093. * Implements hook_environment_schema()
  12094. * Purpose: To describe the structure of environment to tripal
  12095. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12096. * @see tripal_core.api.inc: tripal_core_chado_update()
  12097. * @see tripal_core.api.inc: tripal_core_chado_select()
  12098. *
  12099. * @return
  12100. * An array describing the current table
  12101. *
  12102. * @ingroup tripal_schema_api
  12103. *
  12104. */
  12105. function tripal_core_chado_environment_schema () {
  12106. $description = array();
  12107. $description = array(
  12108. 'table' => 'environment',
  12109. // 'description' => 'TODO: please describe this table!',
  12110. 'fields' => array(
  12111. 'environment_id' => array(
  12112. // 'description' => 'TODO: please describe this field!',
  12113. 'type' => 'serial',
  12114. 'not null' => '1',
  12115. ),
  12116. 'uniquename' => array(
  12117. // 'description' => 'TODO: please describe this field!',
  12118. 'type' => 'text',
  12119. 'not null' => '1',
  12120. ),
  12121. 'description' => array(
  12122. // 'description' => 'TODO: please describe this field!',
  12123. 'type' => 'text',
  12124. 'not null' => '',
  12125. ),
  12126. ),
  12127. 'primary key' => array(
  12128. '0' => 'environment_id',
  12129. ),
  12130. 'unique keys' => array(
  12131. 'environment_c1' => array(
  12132. '0' => 'uniquename',
  12133. ),
  12134. ),
  12135. 'indexes' => array(
  12136. 'environment_idx1' => array(
  12137. '0' => 'uniquename',
  12138. ),
  12139. ),
  12140. 'foreign keys' => array(
  12141. ),
  12142. );
  12143. return $description;
  12144. }