tripal_core.schema.api.inc 333 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125
  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. * Implements hook_organism_dbxref_schema()
  10. * Purpose: To describe the structure of organism_dbxref to tripal
  11. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12. * @see tripal_core.api.inc: tripal_core_chado_update()
  13. * @see tripal_core.api.inc: tripal_core_chado_select()
  14. *
  15. * @return
  16. * An array describing the current table
  17. */
  18. function tripal_core_chado_organism_dbxref_schema () {
  19. $description = array();
  20. $description = array(
  21. 'table' => 'organism_dbxref',
  22. // 'description' => 'TODO: please describe this table!',
  23. 'fields' => array(
  24. 'organism_dbxref_id' => array(
  25. // 'description' => 'TODO: please describe this field!',
  26. 'type' => 'serial',
  27. 'not null' => '1',
  28. ),
  29. 'organism_id' => array(
  30. // 'description' => 'TODO: please describe this field!',
  31. 'type' => 'int',
  32. 'not null' => '1',
  33. ),
  34. 'dbxref_id' => array(
  35. // 'description' => 'TODO: please describe this field!',
  36. 'type' => 'int',
  37. 'not null' => '1',
  38. ),
  39. ),
  40. 'primary key' => array(
  41. '0' => 'organism_dbxref_id',
  42. ),
  43. 'unique keys' => array(
  44. 'organism_dbxref_c1' => array(
  45. '0' => 'organism_id',
  46. '1' => 'dbxref_id',
  47. ),
  48. ),
  49. 'indexes' => array(
  50. 'organism_dbxref_idx1' => array(
  51. '0' => 'organism_id',
  52. ),
  53. 'organism_dbxref_idx2' => array(
  54. '0' => 'dbxref_id',
  55. ),
  56. ),
  57. 'foreign keys' => array(
  58. ),
  59. );
  60. return $description;
  61. }
  62. /****************************************************************************
  63. * Implements hook_organismprop_schema()
  64. * Purpose: To describe the structure of organismprop to tripal
  65. * @see tripal_core.api.inc: tripal_core_chado_insert()
  66. * @see tripal_core.api.inc: tripal_core_chado_update()
  67. * @see tripal_core.api.inc: tripal_core_chado_select()
  68. *
  69. * @return
  70. * An array describing the current table
  71. */
  72. function tripal_core_chado_organismprop_schema () {
  73. $description = array();
  74. $description = array(
  75. 'table' => 'organismprop',
  76. // 'description' => 'TODO: please describe this table!',
  77. 'fields' => array(
  78. 'organismprop_id' => array(
  79. // 'description' => 'TODO: please describe this field!',
  80. 'type' => 'serial',
  81. 'not null' => '1',
  82. ),
  83. 'organism_id' => array(
  84. // 'description' => 'TODO: please describe this field!',
  85. 'type' => 'int',
  86. 'not null' => '1',
  87. ),
  88. 'type_id' => array(
  89. // 'description' => 'TODO: please describe this field!',
  90. 'type' => 'int',
  91. 'not null' => '1',
  92. ),
  93. 'value' => array(
  94. // 'description' => 'TODO: please describe this field!',
  95. 'type' => 'text',
  96. 'not null' => '',
  97. ),
  98. 'rank' => array(
  99. // 'description' => 'TODO: please describe this field!',
  100. 'type' => 'int',
  101. 'not null' => '1',
  102. 'default' => '0',
  103. ),
  104. ),
  105. 'primary key' => array(
  106. '0' => 'organismprop_id',
  107. ),
  108. 'unique keys' => array(
  109. 'organismprop_c1' => array(
  110. '0' => 'organism_id',
  111. '1' => 'type_id',
  112. '2' => 'rank',
  113. ),
  114. ),
  115. 'indexes' => array(
  116. 'organismprop_idx1' => array(
  117. '0' => 'organism_id',
  118. ),
  119. 'organismprop_idx2' => array(
  120. '0' => 'type_id',
  121. ),
  122. ),
  123. 'foreign keys' => array(
  124. ),
  125. );
  126. return $description;
  127. }
  128. /****************************************************************************
  129. * Implements hook_phendesc_schema()
  130. * Purpose: To describe the structure of phendesc to tripal
  131. * @see tripal_core.api.inc: tripal_core_chado_insert()
  132. * @see tripal_core.api.inc: tripal_core_chado_update()
  133. * @see tripal_core.api.inc: tripal_core_chado_select()
  134. *
  135. * @return
  136. * An array describing the current table
  137. */
  138. function tripal_core_chado_phendesc_schema () {
  139. $description = array();
  140. $description = array(
  141. 'table' => 'phendesc',
  142. // 'description' => 'TODO: please describe this table!',
  143. 'fields' => array(
  144. 'phendesc_id' => array(
  145. // 'description' => 'TODO: please describe this field!',
  146. 'type' => 'serial',
  147. 'not null' => '1',
  148. ),
  149. 'genotype_id' => array(
  150. // 'description' => 'TODO: please describe this field!',
  151. 'type' => 'int',
  152. 'not null' => '1',
  153. ),
  154. 'environment_id' => array(
  155. // 'description' => 'TODO: please describe this field!',
  156. 'type' => 'int',
  157. 'not null' => '1',
  158. ),
  159. 'description' => array(
  160. // 'description' => 'TODO: please describe this field!',
  161. 'type' => 'text',
  162. 'not null' => '1',
  163. ),
  164. 'type_id' => array(
  165. // 'description' => 'TODO: please describe this field!',
  166. 'type' => 'int',
  167. 'not null' => '1',
  168. ),
  169. 'pub_id' => array(
  170. // 'description' => 'TODO: please describe this field!',
  171. 'type' => 'int',
  172. 'not null' => '1',
  173. ),
  174. ),
  175. 'primary key' => array(
  176. '0' => 'phendesc_id',
  177. ),
  178. 'unique keys' => array(
  179. 'phendesc_c1' => array(
  180. '0' => 'genotype_id',
  181. '1' => 'environment_id',
  182. '2' => 'type_id',
  183. '3' => 'pub_id',
  184. ),
  185. ),
  186. 'indexes' => array(
  187. 'phendesc_idx1' => array(
  188. '0' => 'genotype_id',
  189. ),
  190. 'phendesc_idx2' => array(
  191. '0' => 'environment_id',
  192. ),
  193. 'phendesc_idx3' => array(
  194. '0' => 'pub_id',
  195. ),
  196. ),
  197. 'foreign keys' => array(
  198. ),
  199. );
  200. return $description;
  201. }
  202. /****************************************************************************
  203. * Implements hook_phenotype_schema()
  204. * Purpose: To describe the structure of phenotype to tripal
  205. * @see tripal_core.api.inc: tripal_core_chado_insert()
  206. * @see tripal_core.api.inc: tripal_core_chado_update()
  207. * @see tripal_core.api.inc: tripal_core_chado_select()
  208. *
  209. * @return
  210. * An array describing the current table
  211. */
  212. function tripal_core_chado_phenotype_schema () {
  213. $description = array();
  214. $description = array(
  215. 'table' => 'phenotype',
  216. // 'description' => 'TODO: please describe this table!',
  217. 'fields' => array(
  218. 'phenotype_id' => array(
  219. // 'description' => 'TODO: please describe this field!',
  220. 'type' => 'serial',
  221. 'not null' => '1',
  222. ),
  223. 'uniquename' => array(
  224. // 'description' => 'TODO: please describe this field!',
  225. 'type' => 'text',
  226. 'not null' => '1',
  227. ),
  228. 'observable_id' => array(
  229. // 'description' => 'TODO: please describe this field!',
  230. 'type' => 'int',
  231. 'not null' => '',
  232. ),
  233. 'attr_id' => array(
  234. // 'description' => 'TODO: please describe this field!',
  235. 'type' => 'int',
  236. 'not null' => '',
  237. ),
  238. 'value' => array(
  239. // 'description' => 'TODO: please describe this field!',
  240. 'type' => 'text',
  241. 'not null' => '',
  242. ),
  243. 'cvalue_id' => array(
  244. // 'description' => 'TODO: please describe this field!',
  245. 'type' => 'int',
  246. 'not null' => '',
  247. ),
  248. 'assay_id' => array(
  249. // 'description' => 'TODO: please describe this field!',
  250. 'type' => 'int',
  251. 'not null' => '',
  252. ),
  253. ),
  254. 'primary key' => array(
  255. '0' => 'phenotype_id',
  256. ),
  257. 'unique keys' => array(
  258. 'phenotype_c1' => array(
  259. '0' => 'uniquename',
  260. ),
  261. ),
  262. 'indexes' => array(
  263. 'phenotype_idx1' => array(
  264. '0' => 'cvalue_id',
  265. ),
  266. 'phenotype_idx2' => array(
  267. '0' => 'observable_id',
  268. ),
  269. 'phenotype_idx3' => array(
  270. '0' => 'attr_id',
  271. ),
  272. ),
  273. 'foreign keys' => array(
  274. ),
  275. );
  276. return $description;
  277. }
  278. /****************************************************************************
  279. * Implements hook_organism_schema()
  280. * Purpose: To describe the structure of organism to tripal
  281. * @see tripal_core.api.inc: tripal_core_chado_insert()
  282. * @see tripal_core.api.inc: tripal_core_chado_update()
  283. * @see tripal_core.api.inc: tripal_core_chado_select()
  284. *
  285. * @return
  286. * An array describing the current table
  287. */
  288. function tripal_core_chado_organism_schema () {
  289. $description = array();
  290. $description = array(
  291. 'table' => 'organism',
  292. // 'description' => 'TODO: please describe this table!',
  293. 'fields' => array(
  294. 'organism_id' => array(
  295. // 'description' => 'TODO: please describe this field!',
  296. 'type' => 'serial',
  297. 'not null' => '1',
  298. ),
  299. 'abbreviation' => array(
  300. // 'description' => 'TODO: please describe this field!',
  301. 'type' => 'varchar',
  302. 'length' => '255',
  303. 'not null' => '',
  304. ),
  305. 'genus' => array(
  306. // 'description' => 'TODO: please describe this field!',
  307. 'type' => 'varchar',
  308. 'length' => '255',
  309. 'not null' => '1',
  310. ),
  311. 'species' => array(
  312. // 'description' => 'TODO: please describe this field!',
  313. 'type' => 'varchar',
  314. 'length' => '255',
  315. 'not null' => '1',
  316. ),
  317. 'common_name' => array(
  318. // 'description' => 'TODO: please describe this field!',
  319. 'type' => 'varchar',
  320. 'length' => '255',
  321. 'not null' => '',
  322. ),
  323. 'comment' => array(
  324. // 'description' => 'TODO: please describe this field!',
  325. 'type' => 'text',
  326. 'not null' => '',
  327. ),
  328. ),
  329. 'primary key' => array(
  330. '0' => 'organism_id',
  331. ),
  332. 'unique keys' => array(
  333. 'organism_c1' => array(
  334. '0' => 'genus',
  335. '1' => 'species',
  336. ),
  337. ),
  338. 'indexes' => array(
  339. ),
  340. 'foreign keys' => array(
  341. ),
  342. );
  343. return $description;
  344. }
  345. /****************************************************************************
  346. * Implements hook_materialized_view_schema()
  347. * Purpose: To describe the structure of materialized_view to tripal
  348. * @see tripal_core.api.inc: tripal_core_chado_insert()
  349. * @see tripal_core.api.inc: tripal_core_chado_update()
  350. * @see tripal_core.api.inc: tripal_core_chado_select()
  351. *
  352. * @return
  353. * An array describing the current table
  354. */
  355. function tripal_core_chado_materialized_view_schema () {
  356. $description = array();
  357. $description = array(
  358. 'table' => 'materialized_view',
  359. // 'description' => 'TODO: please describe this table!',
  360. 'fields' => array(
  361. 'materialized_view_id' => array(
  362. // 'description' => 'TODO: please describe this field!',
  363. 'type' => 'serial',
  364. 'not null' => '1',
  365. ),
  366. 'last_update' => array(
  367. // 'description' => 'TODO: please describe this field!',
  368. 'type' => 'datetime',
  369. 'not null' => '',
  370. ),
  371. 'refresh_time' => array(
  372. // 'description' => 'TODO: please describe this field!',
  373. 'type' => 'int',
  374. 'not null' => '',
  375. ),
  376. 'name' => array(
  377. // 'description' => 'TODO: please describe this field!',
  378. 'type' => 'varchar',
  379. 'length' => '64',
  380. 'not null' => '',
  381. ),
  382. 'mv_schema' => array(
  383. // 'description' => 'TODO: please describe this field!',
  384. 'type' => 'varchar',
  385. 'length' => '64',
  386. 'not null' => '',
  387. ),
  388. 'mv_table' => array(
  389. // 'description' => 'TODO: please describe this field!',
  390. 'type' => 'varchar',
  391. 'length' => '128',
  392. 'not null' => '',
  393. ),
  394. 'mv_specs' => array(
  395. // 'description' => 'TODO: please describe this field!',
  396. 'type' => 'text',
  397. 'not null' => '',
  398. ),
  399. 'indexed' => array(
  400. // 'description' => 'TODO: please describe this field!',
  401. 'type' => 'text',
  402. 'not null' => '',
  403. ),
  404. 'query' => array(
  405. // 'description' => 'TODO: please describe this field!',
  406. 'type' => 'text',
  407. 'not null' => '',
  408. ),
  409. 'special_index' => array(
  410. // 'description' => 'TODO: please describe this field!',
  411. 'type' => 'text',
  412. 'not null' => '',
  413. ),
  414. ),
  415. 'primary key' => array(
  416. ),
  417. 'unique keys' => array(
  418. 'name' => array(
  419. '0' => 'name',
  420. ),
  421. ),
  422. 'indexes' => array(
  423. ),
  424. 'foreign keys' => array(
  425. ),
  426. );
  427. return $description;
  428. }
  429. /****************************************************************************
  430. * Implements hook_libraryprop_schema()
  431. * Purpose: To describe the structure of libraryprop to tripal
  432. * @see tripal_core.api.inc: tripal_core_chado_insert()
  433. * @see tripal_core.api.inc: tripal_core_chado_update()
  434. * @see tripal_core.api.inc: tripal_core_chado_select()
  435. *
  436. * @return
  437. * An array describing the current table
  438. */
  439. function tripal_core_chado_libraryprop_schema () {
  440. $description = array();
  441. $description = array(
  442. 'table' => 'libraryprop',
  443. // 'description' => 'TODO: please describe this table!',
  444. 'fields' => array(
  445. 'libraryprop_id' => array(
  446. // 'description' => 'TODO: please describe this field!',
  447. 'type' => 'serial',
  448. 'not null' => '1',
  449. ),
  450. 'library_id' => array(
  451. // 'description' => 'TODO: please describe this field!',
  452. 'type' => 'int',
  453. 'not null' => '1',
  454. ),
  455. 'type_id' => array(
  456. // 'description' => 'TODO: please describe this field!',
  457. 'type' => 'int',
  458. 'not null' => '1',
  459. ),
  460. 'value' => array(
  461. // 'description' => 'TODO: please describe this field!',
  462. 'type' => 'text',
  463. 'not null' => '',
  464. ),
  465. 'rank' => array(
  466. // 'description' => 'TODO: please describe this field!',
  467. 'type' => 'int',
  468. 'not null' => '1',
  469. 'default' => '0',
  470. ),
  471. ),
  472. 'primary key' => array(
  473. '0' => 'libraryprop_id',
  474. ),
  475. 'unique keys' => array(
  476. 'libraryprop_c1' => array(
  477. '0' => 'library_id',
  478. '1' => 'type_id',
  479. '2' => 'rank',
  480. ),
  481. ),
  482. 'indexes' => array(
  483. 'libraryprop_idx1' => array(
  484. '0' => 'library_id',
  485. ),
  486. 'libraryprop_idx2' => array(
  487. '0' => 'type_id',
  488. ),
  489. ),
  490. 'foreign keys' => array(
  491. ),
  492. );
  493. return $description;
  494. }
  495. /****************************************************************************
  496. * Implements hook_libraryprop_pub_schema()
  497. * Purpose: To describe the structure of libraryprop_pub to tripal
  498. * @see tripal_core.api.inc: tripal_core_chado_insert()
  499. * @see tripal_core.api.inc: tripal_core_chado_update()
  500. * @see tripal_core.api.inc: tripal_core_chado_select()
  501. *
  502. * @return
  503. * An array describing the current table
  504. */
  505. function tripal_core_chado_libraryprop_pub_schema () {
  506. $description = array();
  507. $description = array(
  508. 'table' => 'libraryprop_pub',
  509. // 'description' => 'TODO: please describe this table!',
  510. 'fields' => array(
  511. 'libraryprop_pub_id' => array(
  512. // 'description' => 'TODO: please describe this field!',
  513. 'type' => 'serial',
  514. 'not null' => '1',
  515. ),
  516. 'libraryprop_id' => array(
  517. // 'description' => 'TODO: please describe this field!',
  518. 'type' => 'int',
  519. 'not null' => '1',
  520. ),
  521. 'pub_id' => array(
  522. // 'description' => 'TODO: please describe this field!',
  523. 'type' => 'int',
  524. 'not null' => '1',
  525. ),
  526. ),
  527. 'primary key' => array(
  528. '0' => 'libraryprop_pub_id',
  529. ),
  530. 'unique keys' => array(
  531. 'libraryprop_pub_c1' => array(
  532. '0' => 'libraryprop_id',
  533. '1' => 'pub_id',
  534. ),
  535. ),
  536. 'indexes' => array(
  537. 'libraryprop_pub_idx1' => array(
  538. '0' => 'libraryprop_id',
  539. ),
  540. 'libraryprop_pub_idx2' => array(
  541. '0' => 'pub_id',
  542. ),
  543. ),
  544. 'foreign keys' => array(
  545. ),
  546. );
  547. return $description;
  548. }
  549. /****************************************************************************
  550. * Implements hook_magedocumentation_schema()
  551. * Purpose: To describe the structure of magedocumentation to tripal
  552. * @see tripal_core.api.inc: tripal_core_chado_insert()
  553. * @see tripal_core.api.inc: tripal_core_chado_update()
  554. * @see tripal_core.api.inc: tripal_core_chado_select()
  555. *
  556. * @return
  557. * An array describing the current table
  558. */
  559. function tripal_core_chado_magedocumentation_schema () {
  560. $description = array();
  561. $description = array(
  562. 'table' => 'magedocumentation',
  563. // 'description' => 'TODO: please describe this table!',
  564. 'fields' => array(
  565. 'magedocumentation_id' => array(
  566. // 'description' => 'TODO: please describe this field!',
  567. 'type' => 'serial',
  568. 'not null' => '1',
  569. ),
  570. 'mageml_id' => array(
  571. // 'description' => 'TODO: please describe this field!',
  572. 'type' => 'int',
  573. 'not null' => '1',
  574. ),
  575. 'tableinfo_id' => array(
  576. // 'description' => 'TODO: please describe this field!',
  577. 'type' => 'int',
  578. 'not null' => '1',
  579. ),
  580. 'row_id' => array(
  581. // 'description' => 'TODO: please describe this field!',
  582. 'type' => 'int',
  583. 'not null' => '1',
  584. ),
  585. 'mageidentifier' => array(
  586. // 'description' => 'TODO: please describe this field!',
  587. 'type' => 'text',
  588. 'not null' => '1',
  589. ),
  590. ),
  591. 'primary key' => array(
  592. '0' => 'magedocumentation_id',
  593. ),
  594. 'unique keys' => array(
  595. ),
  596. 'indexes' => array(
  597. 'magedocumentation_idx1' => array(
  598. '0' => 'mageml_id',
  599. ),
  600. 'magedocumentation_idx2' => array(
  601. '0' => 'tableinfo_id',
  602. ),
  603. 'magedocumentation_idx3' => array(
  604. '0' => 'row_id',
  605. ),
  606. ),
  607. 'foreign keys' => array(
  608. ),
  609. );
  610. return $description;
  611. }
  612. /****************************************************************************
  613. * Implements hook_mageml_schema()
  614. * Purpose: To describe the structure of mageml to tripal
  615. * @see tripal_core.api.inc: tripal_core_chado_insert()
  616. * @see tripal_core.api.inc: tripal_core_chado_update()
  617. * @see tripal_core.api.inc: tripal_core_chado_select()
  618. *
  619. * @return
  620. * An array describing the current table
  621. */
  622. function tripal_core_chado_mageml_schema () {
  623. $description = array();
  624. $description = array(
  625. 'table' => 'mageml',
  626. // 'description' => 'TODO: please describe this table!',
  627. 'fields' => array(
  628. 'mageml_id' => array(
  629. // 'description' => 'TODO: please describe this field!',
  630. 'type' => 'serial',
  631. 'not null' => '1',
  632. ),
  633. 'mage_package' => array(
  634. // 'description' => 'TODO: please describe this field!',
  635. 'type' => 'text',
  636. 'not null' => '1',
  637. ),
  638. 'mage_ml' => array(
  639. // 'description' => 'TODO: please describe this field!',
  640. 'type' => 'text',
  641. 'not null' => '1',
  642. ),
  643. ),
  644. 'primary key' => array(
  645. '0' => 'mageml_id',
  646. ),
  647. 'unique keys' => array(
  648. ),
  649. 'indexes' => array(
  650. ),
  651. 'foreign keys' => array(
  652. ),
  653. );
  654. return $description;
  655. }
  656. /****************************************************************************
  657. * Implements hook_phenotype_comparison_schema()
  658. * Purpose: To describe the structure of phenotype_comparison to tripal
  659. * @see tripal_core.api.inc: tripal_core_chado_insert()
  660. * @see tripal_core.api.inc: tripal_core_chado_update()
  661. * @see tripal_core.api.inc: tripal_core_chado_select()
  662. *
  663. * @return
  664. * An array describing the current table
  665. */
  666. function tripal_core_chado_phenotype_comparison_schema () {
  667. $description = array();
  668. $description = array(
  669. 'table' => 'phenotype_comparison',
  670. // 'description' => 'TODO: please describe this table!',
  671. 'fields' => array(
  672. 'phenotype_comparison_id' => array(
  673. // 'description' => 'TODO: please describe this field!',
  674. 'type' => 'serial',
  675. 'not null' => '1',
  676. ),
  677. 'genotype1_id' => array(
  678. // 'description' => 'TODO: please describe this field!',
  679. 'type' => 'int',
  680. 'not null' => '1',
  681. ),
  682. 'environment1_id' => array(
  683. // 'description' => 'TODO: please describe this field!',
  684. 'type' => 'int',
  685. 'not null' => '1',
  686. ),
  687. 'genotype2_id' => array(
  688. // 'description' => 'TODO: please describe this field!',
  689. 'type' => 'int',
  690. 'not null' => '1',
  691. ),
  692. 'environment2_id' => array(
  693. // 'description' => 'TODO: please describe this field!',
  694. 'type' => 'int',
  695. 'not null' => '1',
  696. ),
  697. 'phenotype1_id' => array(
  698. // 'description' => 'TODO: please describe this field!',
  699. 'type' => 'int',
  700. 'not null' => '1',
  701. ),
  702. 'phenotype2_id' => array(
  703. // 'description' => 'TODO: please describe this field!',
  704. 'type' => 'int',
  705. 'not null' => '',
  706. ),
  707. 'pub_id' => array(
  708. // 'description' => 'TODO: please describe this field!',
  709. 'type' => 'int',
  710. 'not null' => '1',
  711. ),
  712. 'organism_id' => array(
  713. // 'description' => 'TODO: please describe this field!',
  714. 'type' => 'int',
  715. 'not null' => '1',
  716. ),
  717. ),
  718. 'primary key' => array(
  719. '0' => 'phenotype_comparison_id',
  720. ),
  721. 'unique keys' => array(
  722. 'phenotype_comparison_c1' => array(
  723. '0' => 'genotype1_id',
  724. '1' => 'environment1_id',
  725. '2' => 'genotype2_id',
  726. '3' => 'environment2_id',
  727. '4' => 'phenotype1_id',
  728. '5' => 'pub_id',
  729. ),
  730. ),
  731. 'indexes' => array(
  732. 'phenotype_comparison_idx1' => array(
  733. '0' => 'genotype1_id',
  734. ),
  735. 'phenotype_comparison_idx2' => array(
  736. '0' => 'genotype2_id',
  737. ),
  738. 'phenotype_comparison_idx4' => array(
  739. '0' => 'pub_id',
  740. ),
  741. ),
  742. 'foreign keys' => array(
  743. ),
  744. );
  745. return $description;
  746. }
  747. /****************************************************************************
  748. * Implements hook_phenotype_comparison_cvterm_schema()
  749. * Purpose: To describe the structure of phenotype_comparison_cvterm to tripal
  750. * @see tripal_core.api.inc: tripal_core_chado_insert()
  751. * @see tripal_core.api.inc: tripal_core_chado_update()
  752. * @see tripal_core.api.inc: tripal_core_chado_select()
  753. *
  754. * @return
  755. * An array describing the current table
  756. */
  757. function tripal_core_chado_phenotype_comparison_cvterm_schema () {
  758. $description = array();
  759. $description = array(
  760. 'table' => 'phenotype_comparison_cvterm',
  761. // 'description' => 'TODO: please describe this table!',
  762. 'fields' => array(
  763. 'phenotype_comparison_cvterm_id' => array(
  764. // 'description' => 'TODO: please describe this field!',
  765. 'type' => 'serial',
  766. 'not null' => '1',
  767. ),
  768. 'phenotype_comparison_id' => array(
  769. // 'description' => 'TODO: please describe this field!',
  770. 'type' => 'int',
  771. 'not null' => '1',
  772. ),
  773. 'cvterm_id' => array(
  774. // 'description' => 'TODO: please describe this field!',
  775. 'type' => 'int',
  776. 'not null' => '1',
  777. ),
  778. 'pub_id' => array(
  779. // 'description' => 'TODO: please describe this field!',
  780. 'type' => 'int',
  781. 'not null' => '1',
  782. ),
  783. 'rank' => array(
  784. // 'description' => 'TODO: please describe this field!',
  785. 'type' => 'int',
  786. 'not null' => '1',
  787. 'default' => '0',
  788. ),
  789. ),
  790. 'primary key' => array(
  791. '0' => 'phenotype_comparison_cvterm_id',
  792. ),
  793. 'unique keys' => array(
  794. 'phenotype_comparison_cvterm_c1' => array(
  795. '0' => 'phenotype_comparison_id',
  796. '1' => 'cvterm_id',
  797. ),
  798. ),
  799. 'indexes' => array(
  800. 'phenotype_comparison_cvterm_idx1' => array(
  801. '0' => 'phenotype_comparison_id',
  802. ),
  803. 'phenotype_comparison_cvterm_idx2' => array(
  804. '0' => 'cvterm_id',
  805. ),
  806. ),
  807. 'foreign keys' => array(
  808. ),
  809. );
  810. return $description;
  811. }
  812. /****************************************************************************
  813. * Implements hook_phylonode_relationship_schema()
  814. * Purpose: To describe the structure of phylonode_relationship to tripal
  815. * @see tripal_core.api.inc: tripal_core_chado_insert()
  816. * @see tripal_core.api.inc: tripal_core_chado_update()
  817. * @see tripal_core.api.inc: tripal_core_chado_select()
  818. *
  819. * @return
  820. * An array describing the current table
  821. */
  822. function tripal_core_chado_phylonode_relationship_schema () {
  823. $description = array();
  824. $description = array(
  825. 'table' => 'phylonode_relationship',
  826. // 'description' => 'TODO: please describe this table!',
  827. 'fields' => array(
  828. 'phylonode_relationship_id' => array(
  829. // 'description' => 'TODO: please describe this field!',
  830. 'type' => 'serial',
  831. 'not null' => '1',
  832. ),
  833. 'subject_id' => array(
  834. // 'description' => 'TODO: please describe this field!',
  835. 'type' => 'int',
  836. 'not null' => '1',
  837. ),
  838. 'object_id' => array(
  839. // 'description' => 'TODO: please describe this field!',
  840. 'type' => 'int',
  841. 'not null' => '1',
  842. ),
  843. 'type_id' => array(
  844. // 'description' => 'TODO: please describe this field!',
  845. 'type' => 'int',
  846. 'not null' => '1',
  847. ),
  848. 'rank' => array(
  849. // 'description' => 'TODO: please describe this field!',
  850. 'type' => 'int',
  851. 'not null' => '',
  852. ),
  853. 'phylotree_id' => array(
  854. // 'description' => 'TODO: please describe this field!',
  855. 'type' => 'int',
  856. 'not null' => '1',
  857. ),
  858. ),
  859. 'primary key' => array(
  860. '0' => 'phylonode_relationship_id',
  861. ),
  862. 'unique keys' => array(
  863. 'subject_id' => array(
  864. '0' => 'subject_id',
  865. '1' => 'object_id',
  866. '2' => 'type_id',
  867. ),
  868. ),
  869. 'indexes' => array(
  870. 'phylonode_relationship_idx1' => array(
  871. '0' => 'subject_id',
  872. ),
  873. 'phylonode_relationship_idx2' => array(
  874. '0' => 'object_id',
  875. ),
  876. 'phylonode_relationship_idx3' => array(
  877. '0' => 'type_id',
  878. ),
  879. ),
  880. 'foreign keys' => array(
  881. ),
  882. );
  883. return $description;
  884. }
  885. /****************************************************************************
  886. * Implements hook_phylonodeprop_schema()
  887. * Purpose: To describe the structure of phylonodeprop to tripal
  888. * @see tripal_core.api.inc: tripal_core_chado_insert()
  889. * @see tripal_core.api.inc: tripal_core_chado_update()
  890. * @see tripal_core.api.inc: tripal_core_chado_select()
  891. *
  892. * @return
  893. * An array describing the current table
  894. */
  895. function tripal_core_chado_phylonodeprop_schema () {
  896. $description = array();
  897. $description = array(
  898. 'table' => 'phylonodeprop',
  899. // 'description' => 'TODO: please describe this table!',
  900. 'fields' => array(
  901. 'phylonodeprop_id' => array(
  902. // 'description' => 'TODO: please describe this field!',
  903. 'type' => 'serial',
  904. 'not null' => '1',
  905. ),
  906. 'phylonode_id' => array(
  907. // 'description' => 'TODO: please describe this field!',
  908. 'type' => 'int',
  909. 'not null' => '1',
  910. ),
  911. 'type_id' => array(
  912. // 'description' => 'TODO: please describe this field!',
  913. 'type' => 'int',
  914. 'not null' => '1',
  915. ),
  916. 'value' => array(
  917. // 'description' => 'TODO: please describe this field!',
  918. 'type' => 'text',
  919. 'not null' => '1',
  920. 'default' => '',
  921. ),
  922. 'rank' => array(
  923. // 'description' => 'TODO: please describe this field!',
  924. 'type' => 'int',
  925. 'not null' => '1',
  926. 'default' => '0',
  927. ),
  928. ),
  929. 'primary key' => array(
  930. '0' => 'phylonodeprop_id',
  931. ),
  932. 'unique keys' => array(
  933. 'phylonode_id' => array(
  934. '0' => 'phylonode_id',
  935. '1' => 'type_id',
  936. '2' => 'value',
  937. '3' => 'rank',
  938. ),
  939. ),
  940. 'indexes' => array(
  941. 'phylonodeprop_idx1' => array(
  942. '0' => 'phylonode_id',
  943. ),
  944. 'phylonodeprop_idx2' => array(
  945. '0' => 'type_id',
  946. ),
  947. ),
  948. 'foreign keys' => array(
  949. ),
  950. );
  951. return $description;
  952. }
  953. /****************************************************************************
  954. * Implements hook_phylotree_schema()
  955. * Purpose: To describe the structure of phylotree to tripal
  956. * @see tripal_core.api.inc: tripal_core_chado_insert()
  957. * @see tripal_core.api.inc: tripal_core_chado_update()
  958. * @see tripal_core.api.inc: tripal_core_chado_select()
  959. *
  960. * @return
  961. * An array describing the current table
  962. */
  963. function tripal_core_chado_phylotree_schema () {
  964. $description = array();
  965. $description = array(
  966. 'table' => 'phylotree',
  967. // 'description' => 'TODO: please describe this table!',
  968. 'fields' => array(
  969. 'phylotree_id' => array(
  970. // 'description' => 'TODO: please describe this field!',
  971. 'type' => 'serial',
  972. 'not null' => '1',
  973. ),
  974. 'dbxref_id' => array(
  975. // 'description' => 'TODO: please describe this field!',
  976. 'type' => 'int',
  977. 'not null' => '1',
  978. ),
  979. 'name' => array(
  980. // 'description' => 'TODO: please describe this field!',
  981. 'type' => 'varchar',
  982. 'length' => '255',
  983. 'not null' => '',
  984. ),
  985. 'type_id' => array(
  986. // 'description' => 'TODO: please describe this field!',
  987. 'type' => 'int',
  988. 'not null' => '',
  989. ),
  990. 'analysis_id' => array(
  991. // 'description' => 'TODO: please describe this field!',
  992. 'type' => 'int',
  993. 'not null' => '',
  994. ),
  995. 'comment' => array(
  996. // 'description' => 'TODO: please describe this field!',
  997. 'type' => 'text',
  998. 'not null' => '',
  999. ),
  1000. ),
  1001. 'primary key' => array(
  1002. '0' => 'phylotree_id',
  1003. ),
  1004. 'unique keys' => array(
  1005. ),
  1006. 'indexes' => array(
  1007. 'phylotree_idx1' => array(
  1008. '0' => 'phylotree_id',
  1009. ),
  1010. ),
  1011. 'foreign keys' => array(
  1012. ),
  1013. );
  1014. return $description;
  1015. }
  1016. /****************************************************************************
  1017. * Implements hook_phylotree_pub_schema()
  1018. * Purpose: To describe the structure of phylotree_pub to tripal
  1019. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1020. * @see tripal_core.api.inc: tripal_core_chado_update()
  1021. * @see tripal_core.api.inc: tripal_core_chado_select()
  1022. *
  1023. * @return
  1024. * An array describing the current table
  1025. */
  1026. function tripal_core_chado_phylotree_pub_schema () {
  1027. $description = array();
  1028. $description = array(
  1029. 'table' => 'phylotree_pub',
  1030. // 'description' => 'TODO: please describe this table!',
  1031. 'fields' => array(
  1032. 'phylotree_pub_id' => array(
  1033. // 'description' => 'TODO: please describe this field!',
  1034. 'type' => 'serial',
  1035. 'not null' => '1',
  1036. ),
  1037. 'phylotree_id' => array(
  1038. // 'description' => 'TODO: please describe this field!',
  1039. 'type' => 'int',
  1040. 'not null' => '1',
  1041. ),
  1042. 'pub_id' => array(
  1043. // 'description' => 'TODO: please describe this field!',
  1044. 'type' => 'int',
  1045. 'not null' => '1',
  1046. ),
  1047. ),
  1048. 'primary key' => array(
  1049. '0' => 'phylotree_pub_id',
  1050. ),
  1051. 'unique keys' => array(
  1052. 'phylotree_id' => array(
  1053. '0' => 'phylotree_id',
  1054. '1' => 'pub_id',
  1055. ),
  1056. ),
  1057. 'indexes' => array(
  1058. 'phylotree_pub_idx1' => array(
  1059. '0' => 'phylotree_id',
  1060. ),
  1061. 'phylotree_pub_idx2' => array(
  1062. '0' => 'pub_id',
  1063. ),
  1064. ),
  1065. 'foreign keys' => array(
  1066. ),
  1067. );
  1068. return $description;
  1069. }
  1070. /****************************************************************************
  1071. * Implements hook_phylonode_pub_schema()
  1072. * Purpose: To describe the structure of phylonode_pub to tripal
  1073. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1074. * @see tripal_core.api.inc: tripal_core_chado_update()
  1075. * @see tripal_core.api.inc: tripal_core_chado_select()
  1076. *
  1077. * @return
  1078. * An array describing the current table
  1079. */
  1080. function tripal_core_chado_phylonode_pub_schema () {
  1081. $description = array();
  1082. $description = array(
  1083. 'table' => 'phylonode_pub',
  1084. // 'description' => 'TODO: please describe this table!',
  1085. 'fields' => array(
  1086. 'phylonode_pub_id' => array(
  1087. // 'description' => 'TODO: please describe this field!',
  1088. 'type' => 'serial',
  1089. 'not null' => '1',
  1090. ),
  1091. 'phylonode_id' => array(
  1092. // 'description' => 'TODO: please describe this field!',
  1093. 'type' => 'int',
  1094. 'not null' => '1',
  1095. ),
  1096. 'pub_id' => array(
  1097. // 'description' => 'TODO: please describe this field!',
  1098. 'type' => 'int',
  1099. 'not null' => '1',
  1100. ),
  1101. ),
  1102. 'primary key' => array(
  1103. '0' => 'phylonode_pub_id',
  1104. ),
  1105. 'unique keys' => array(
  1106. 'phylonode_id' => array(
  1107. '0' => 'phylonode_id',
  1108. '1' => 'pub_id',
  1109. ),
  1110. ),
  1111. 'indexes' => array(
  1112. 'phylonode_pub_idx1' => array(
  1113. '0' => 'phylonode_id',
  1114. ),
  1115. 'phylonode_pub_idx2' => array(
  1116. '0' => 'pub_id',
  1117. ),
  1118. ),
  1119. 'foreign keys' => array(
  1120. ),
  1121. );
  1122. return $description;
  1123. }
  1124. /****************************************************************************
  1125. * Implements hook_phylonode_organism_schema()
  1126. * Purpose: To describe the structure of phylonode_organism to tripal
  1127. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1128. * @see tripal_core.api.inc: tripal_core_chado_update()
  1129. * @see tripal_core.api.inc: tripal_core_chado_select()
  1130. *
  1131. * @return
  1132. * An array describing the current table
  1133. */
  1134. function tripal_core_chado_phylonode_organism_schema () {
  1135. $description = array();
  1136. $description = array(
  1137. 'table' => 'phylonode_organism',
  1138. // 'description' => 'TODO: please describe this table!',
  1139. 'fields' => array(
  1140. 'phylonode_organism_id' => array(
  1141. // 'description' => 'TODO: please describe this field!',
  1142. 'type' => 'serial',
  1143. 'not null' => '1',
  1144. ),
  1145. 'phylonode_id' => array(
  1146. // 'description' => 'TODO: please describe this field!',
  1147. 'type' => 'int',
  1148. 'not null' => '1',
  1149. ),
  1150. 'organism_id' => array(
  1151. // 'description' => 'TODO: please describe this field!',
  1152. 'type' => 'int',
  1153. 'not null' => '1',
  1154. ),
  1155. ),
  1156. 'primary key' => array(
  1157. '0' => 'phylonode_organism_id',
  1158. ),
  1159. 'unique keys' => array(
  1160. 'phylonode_id' => array(
  1161. '0' => 'phylonode_id',
  1162. ),
  1163. ),
  1164. 'indexes' => array(
  1165. 'phylonode_organism_idx1' => array(
  1166. '0' => 'phylonode_id',
  1167. ),
  1168. 'phylonode_organism_idx2' => array(
  1169. '0' => 'organism_id',
  1170. ),
  1171. ),
  1172. 'foreign keys' => array(
  1173. ),
  1174. );
  1175. return $description;
  1176. }
  1177. /****************************************************************************
  1178. * Implements hook_phenotype_cvterm_schema()
  1179. * Purpose: To describe the structure of phenotype_cvterm to tripal
  1180. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1181. * @see tripal_core.api.inc: tripal_core_chado_update()
  1182. * @see tripal_core.api.inc: tripal_core_chado_select()
  1183. *
  1184. * @return
  1185. * An array describing the current table
  1186. */
  1187. function tripal_core_chado_phenotype_cvterm_schema () {
  1188. $description = array();
  1189. $description = array(
  1190. 'table' => 'phenotype_cvterm',
  1191. // 'description' => 'TODO: please describe this table!',
  1192. 'fields' => array(
  1193. 'phenotype_cvterm_id' => array(
  1194. // 'description' => 'TODO: please describe this field!',
  1195. 'type' => 'serial',
  1196. 'not null' => '1',
  1197. ),
  1198. 'phenotype_id' => array(
  1199. // 'description' => 'TODO: please describe this field!',
  1200. 'type' => 'int',
  1201. 'not null' => '1',
  1202. ),
  1203. 'cvterm_id' => array(
  1204. // 'description' => 'TODO: please describe this field!',
  1205. 'type' => 'int',
  1206. 'not null' => '1',
  1207. ),
  1208. 'rank' => array(
  1209. // 'description' => 'TODO: please describe this field!',
  1210. 'type' => 'int',
  1211. 'not null' => '1',
  1212. 'default' => '0',
  1213. ),
  1214. ),
  1215. 'primary key' => array(
  1216. '0' => 'phenotype_cvterm_id',
  1217. ),
  1218. 'unique keys' => array(
  1219. 'phenotype_cvterm_c1' => array(
  1220. '0' => 'phenotype_id',
  1221. '1' => 'cvterm_id',
  1222. '2' => 'rank',
  1223. ),
  1224. ),
  1225. 'indexes' => array(
  1226. 'phenotype_cvterm_idx1' => array(
  1227. '0' => 'phenotype_id',
  1228. ),
  1229. 'phenotype_cvterm_idx2' => array(
  1230. '0' => 'cvterm_id',
  1231. ),
  1232. ),
  1233. 'foreign keys' => array(
  1234. ),
  1235. );
  1236. return $description;
  1237. }
  1238. /****************************************************************************
  1239. * Implements hook_phenstatement_schema()
  1240. * Purpose: To describe the structure of phenstatement to tripal
  1241. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1242. * @see tripal_core.api.inc: tripal_core_chado_update()
  1243. * @see tripal_core.api.inc: tripal_core_chado_select()
  1244. *
  1245. * @return
  1246. * An array describing the current table
  1247. */
  1248. function tripal_core_chado_phenstatement_schema () {
  1249. $description = array();
  1250. $description = array(
  1251. 'table' => 'phenstatement',
  1252. // 'description' => 'TODO: please describe this table!',
  1253. 'fields' => array(
  1254. 'phenstatement_id' => array(
  1255. // 'description' => 'TODO: please describe this field!',
  1256. 'type' => 'serial',
  1257. 'not null' => '1',
  1258. ),
  1259. 'genotype_id' => array(
  1260. // 'description' => 'TODO: please describe this field!',
  1261. 'type' => 'int',
  1262. 'not null' => '1',
  1263. ),
  1264. 'environment_id' => array(
  1265. // 'description' => 'TODO: please describe this field!',
  1266. 'type' => 'int',
  1267. 'not null' => '1',
  1268. ),
  1269. 'phenotype_id' => array(
  1270. // 'description' => 'TODO: please describe this field!',
  1271. 'type' => 'int',
  1272. 'not null' => '1',
  1273. ),
  1274. 'type_id' => array(
  1275. // 'description' => 'TODO: please describe this field!',
  1276. 'type' => 'int',
  1277. 'not null' => '1',
  1278. ),
  1279. 'pub_id' => array(
  1280. // 'description' => 'TODO: please describe this field!',
  1281. 'type' => 'int',
  1282. 'not null' => '1',
  1283. ),
  1284. ),
  1285. 'primary key' => array(
  1286. '0' => 'phenstatement_id',
  1287. ),
  1288. 'unique keys' => array(
  1289. 'phenstatement_c1' => array(
  1290. '0' => 'genotype_id',
  1291. '1' => 'phenotype_id',
  1292. '2' => 'environment_id',
  1293. '3' => 'type_id',
  1294. '4' => 'pub_id',
  1295. ),
  1296. ),
  1297. 'indexes' => array(
  1298. 'phenstatement_idx1' => array(
  1299. '0' => 'genotype_id',
  1300. ),
  1301. 'phenstatement_idx2' => array(
  1302. '0' => 'phenotype_id',
  1303. ),
  1304. ),
  1305. 'foreign keys' => array(
  1306. ),
  1307. );
  1308. return $description;
  1309. }
  1310. /****************************************************************************
  1311. * Implements hook_phylonode_schema()
  1312. * Purpose: To describe the structure of phylonode to tripal
  1313. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1314. * @see tripal_core.api.inc: tripal_core_chado_update()
  1315. * @see tripal_core.api.inc: tripal_core_chado_select()
  1316. *
  1317. * @return
  1318. * An array describing the current table
  1319. */
  1320. function tripal_core_chado_phylonode_schema () {
  1321. $description = array();
  1322. $description = array(
  1323. 'table' => 'phylonode',
  1324. // 'description' => 'TODO: please describe this table!',
  1325. 'fields' => array(
  1326. 'phylonode_id' => array(
  1327. // 'description' => 'TODO: please describe this field!',
  1328. 'type' => 'serial',
  1329. 'not null' => '1',
  1330. ),
  1331. 'phylotree_id' => array(
  1332. // 'description' => 'TODO: please describe this field!',
  1333. 'type' => 'int',
  1334. 'not null' => '1',
  1335. ),
  1336. 'parent_phylonode_id' => array(
  1337. // 'description' => 'TODO: please describe this field!',
  1338. 'type' => 'int',
  1339. 'not null' => '',
  1340. ),
  1341. 'left_idx' => array(
  1342. // 'description' => 'TODO: please describe this field!',
  1343. 'type' => 'int',
  1344. 'not null' => '1',
  1345. ),
  1346. 'right_idx' => array(
  1347. // 'description' => 'TODO: please describe this field!',
  1348. 'type' => 'int',
  1349. 'not null' => '1',
  1350. ),
  1351. 'type_id' => array(
  1352. // 'description' => 'TODO: please describe this field!',
  1353. 'type' => 'int',
  1354. 'not null' => '',
  1355. ),
  1356. 'feature_id' => array(
  1357. // 'description' => 'TODO: please describe this field!',
  1358. 'type' => 'int',
  1359. 'not null' => '',
  1360. ),
  1361. 'label' => array(
  1362. // 'description' => 'TODO: please describe this field!',
  1363. 'type' => 'varchar',
  1364. 'length' => '255',
  1365. 'not null' => '',
  1366. ),
  1367. 'distance' => array(
  1368. // 'description' => 'TODO: please describe this field!',
  1369. 'type' => 'float',
  1370. 'size' => 'big',
  1371. 'not null' => '',
  1372. ),
  1373. ),
  1374. 'primary key' => array(
  1375. '0' => 'phylonode_id',
  1376. ),
  1377. 'unique keys' => array(
  1378. 'phylotree_id' => array(
  1379. '0' => 'phylotree_id',
  1380. '1' => 'left_idx',
  1381. ),
  1382. 'phylonode_phylotree_id_key1' => array(
  1383. '0' => 'phylotree_id',
  1384. '1' => 'right_idx',
  1385. ),
  1386. ),
  1387. 'indexes' => array(
  1388. ),
  1389. 'foreign keys' => array(
  1390. ),
  1391. );
  1392. return $description;
  1393. }
  1394. /****************************************************************************
  1395. * Implements hook_phylonode_dbxref_schema()
  1396. * Purpose: To describe the structure of phylonode_dbxref to tripal
  1397. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1398. * @see tripal_core.api.inc: tripal_core_chado_update()
  1399. * @see tripal_core.api.inc: tripal_core_chado_select()
  1400. *
  1401. * @return
  1402. * An array describing the current table
  1403. */
  1404. function tripal_core_chado_phylonode_dbxref_schema () {
  1405. $description = array();
  1406. $description = array(
  1407. 'table' => 'phylonode_dbxref',
  1408. // 'description' => 'TODO: please describe this table!',
  1409. 'fields' => array(
  1410. 'phylonode_dbxref_id' => array(
  1411. // 'description' => 'TODO: please describe this field!',
  1412. 'type' => 'serial',
  1413. 'not null' => '1',
  1414. ),
  1415. 'phylonode_id' => array(
  1416. // 'description' => 'TODO: please describe this field!',
  1417. 'type' => 'int',
  1418. 'not null' => '1',
  1419. ),
  1420. 'dbxref_id' => array(
  1421. // 'description' => 'TODO: please describe this field!',
  1422. 'type' => 'int',
  1423. 'not null' => '1',
  1424. ),
  1425. ),
  1426. 'primary key' => array(
  1427. '0' => 'phylonode_dbxref_id',
  1428. ),
  1429. 'unique keys' => array(
  1430. 'phylonode_id' => array(
  1431. '0' => 'phylonode_id',
  1432. '1' => 'dbxref_id',
  1433. ),
  1434. ),
  1435. 'indexes' => array(
  1436. 'phylonode_dbxref_idx1' => array(
  1437. '0' => 'phylonode_id',
  1438. ),
  1439. 'phylonode_dbxref_idx2' => array(
  1440. '0' => 'dbxref_id',
  1441. ),
  1442. ),
  1443. 'foreign keys' => array(
  1444. ),
  1445. );
  1446. return $description;
  1447. }
  1448. /****************************************************************************
  1449. * Implements hook_library_synonym_schema()
  1450. * Purpose: To describe the structure of library_synonym to tripal
  1451. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1452. * @see tripal_core.api.inc: tripal_core_chado_update()
  1453. * @see tripal_core.api.inc: tripal_core_chado_select()
  1454. *
  1455. * @return
  1456. * An array describing the current table
  1457. */
  1458. function tripal_core_chado_library_synonym_schema () {
  1459. $description = array();
  1460. $description = array(
  1461. 'table' => 'library_synonym',
  1462. // 'description' => 'TODO: please describe this table!',
  1463. 'fields' => array(
  1464. 'library_synonym_id' => array(
  1465. // 'description' => 'TODO: please describe this field!',
  1466. 'type' => 'serial',
  1467. 'not null' => '1',
  1468. ),
  1469. 'synonym_id' => array(
  1470. // 'description' => 'TODO: please describe this field!',
  1471. 'type' => 'int',
  1472. 'not null' => '1',
  1473. ),
  1474. 'library_id' => array(
  1475. // 'description' => 'TODO: please describe this field!',
  1476. 'type' => 'int',
  1477. 'not null' => '1',
  1478. ),
  1479. 'pub_id' => array(
  1480. // 'description' => 'TODO: please describe this field!',
  1481. 'type' => 'int',
  1482. 'not null' => '1',
  1483. ),
  1484. 'is_current' => array(
  1485. // 'description' => 'TODO: please describe this field!',
  1486. 'type' => 'boolean',
  1487. 'not null' => '1',
  1488. 'default' => 'ru',
  1489. ),
  1490. 'is_internal' => array(
  1491. // 'description' => 'TODO: please describe this field!',
  1492. 'type' => 'boolean',
  1493. 'not null' => '1',
  1494. 'default' => 'als',
  1495. ),
  1496. ),
  1497. 'primary key' => array(
  1498. '0' => 'library_synonym_id',
  1499. ),
  1500. 'unique keys' => array(
  1501. 'library_synonym_c1' => array(
  1502. '0' => 'synonym_id',
  1503. '1' => 'library_id',
  1504. '2' => 'pub_id',
  1505. ),
  1506. ),
  1507. 'indexes' => array(
  1508. 'library_synonym_idx1' => array(
  1509. '0' => 'synonym_id',
  1510. ),
  1511. 'library_synonym_idx2' => array(
  1512. '0' => 'library_id',
  1513. ),
  1514. 'library_synonym_idx3' => array(
  1515. '0' => 'pub_id',
  1516. ),
  1517. ),
  1518. 'foreign keys' => array(
  1519. ),
  1520. );
  1521. return $description;
  1522. }
  1523. /****************************************************************************
  1524. * Implements hook_library_pub_schema()
  1525. * Purpose: To describe the structure of library_pub to tripal
  1526. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1527. * @see tripal_core.api.inc: tripal_core_chado_update()
  1528. * @see tripal_core.api.inc: tripal_core_chado_select()
  1529. *
  1530. * @return
  1531. * An array describing the current table
  1532. */
  1533. function tripal_core_chado_library_pub_schema () {
  1534. $description = array();
  1535. $description = array(
  1536. 'table' => 'library_pub',
  1537. // 'description' => 'TODO: please describe this table!',
  1538. 'fields' => array(
  1539. 'library_pub_id' => array(
  1540. // 'description' => 'TODO: please describe this field!',
  1541. 'type' => 'serial',
  1542. 'not null' => '1',
  1543. ),
  1544. 'library_id' => array(
  1545. // 'description' => 'TODO: please describe this field!',
  1546. 'type' => 'int',
  1547. 'not null' => '1',
  1548. ),
  1549. 'pub_id' => array(
  1550. // 'description' => 'TODO: please describe this field!',
  1551. 'type' => 'int',
  1552. 'not null' => '1',
  1553. ),
  1554. ),
  1555. 'primary key' => array(
  1556. '0' => 'library_pub_id',
  1557. ),
  1558. 'unique keys' => array(
  1559. 'library_pub_c1' => array(
  1560. '0' => 'library_id',
  1561. '1' => 'pub_id',
  1562. ),
  1563. ),
  1564. 'indexes' => array(
  1565. 'library_pub_idx1' => array(
  1566. '0' => 'library_id',
  1567. ),
  1568. 'library_pub_idx2' => array(
  1569. '0' => 'pub_id',
  1570. ),
  1571. ),
  1572. 'foreign keys' => array(
  1573. ),
  1574. );
  1575. return $description;
  1576. }
  1577. /****************************************************************************
  1578. * Implements hook_featureprop_pub_schema()
  1579. * Purpose: To describe the structure of featureprop_pub to tripal
  1580. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1581. * @see tripal_core.api.inc: tripal_core_chado_update()
  1582. * @see tripal_core.api.inc: tripal_core_chado_select()
  1583. *
  1584. * @return
  1585. * An array describing the current table
  1586. */
  1587. function tripal_core_chado_featureprop_pub_schema () {
  1588. $description = array();
  1589. $description = array(
  1590. 'table' => 'featureprop_pub',
  1591. // 'description' => 'TODO: please describe this table!',
  1592. 'fields' => array(
  1593. 'featureprop_pub_id' => array(
  1594. // 'description' => 'TODO: please describe this field!',
  1595. 'type' => 'serial',
  1596. 'not null' => '1',
  1597. ),
  1598. 'featureprop_id' => array(
  1599. // 'description' => 'TODO: please describe this field!',
  1600. 'type' => 'int',
  1601. 'not null' => '1',
  1602. ),
  1603. 'pub_id' => array(
  1604. // 'description' => 'TODO: please describe this field!',
  1605. 'type' => 'int',
  1606. 'not null' => '1',
  1607. ),
  1608. ),
  1609. 'primary key' => array(
  1610. '0' => 'featureprop_pub_id',
  1611. ),
  1612. 'unique keys' => array(
  1613. 'featureprop_pub_c1' => array(
  1614. '0' => 'featureprop_id',
  1615. '1' => 'pub_id',
  1616. ),
  1617. ),
  1618. 'indexes' => array(
  1619. 'featureprop_pub_idx1' => array(
  1620. '0' => 'featureprop_id',
  1621. ),
  1622. 'featureprop_pub_idx2' => array(
  1623. '0' => 'pub_id',
  1624. ),
  1625. ),
  1626. 'foreign keys' => array(
  1627. ),
  1628. );
  1629. return $description;
  1630. }
  1631. /****************************************************************************
  1632. * Implements hook_featureprop_schema()
  1633. * Purpose: To describe the structure of featureprop to tripal
  1634. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1635. * @see tripal_core.api.inc: tripal_core_chado_update()
  1636. * @see tripal_core.api.inc: tripal_core_chado_select()
  1637. *
  1638. * @return
  1639. * An array describing the current table
  1640. */
  1641. function tripal_core_chado_featureprop_schema () {
  1642. $description = array();
  1643. $description = array(
  1644. 'table' => 'featureprop',
  1645. // 'description' => 'TODO: please describe this table!',
  1646. 'fields' => array(
  1647. 'featureprop_id' => array(
  1648. // 'description' => 'TODO: please describe this field!',
  1649. 'type' => 'serial',
  1650. 'not null' => '1',
  1651. ),
  1652. 'feature_id' => array(
  1653. // 'description' => 'TODO: please describe this field!',
  1654. 'type' => 'int',
  1655. 'not null' => '1',
  1656. ),
  1657. 'type_id' => array(
  1658. // 'description' => 'TODO: please describe this field!',
  1659. 'type' => 'int',
  1660. 'not null' => '1',
  1661. ),
  1662. 'value' => array(
  1663. // 'description' => 'TODO: please describe this field!',
  1664. 'type' => 'text',
  1665. 'not null' => '',
  1666. ),
  1667. 'rank' => array(
  1668. // 'description' => 'TODO: please describe this field!',
  1669. 'type' => 'int',
  1670. 'not null' => '1',
  1671. 'default' => '0',
  1672. ),
  1673. ),
  1674. 'primary key' => array(
  1675. '0' => 'featureprop_id',
  1676. ),
  1677. 'unique keys' => array(
  1678. 'featureprop_c1' => array(
  1679. '0' => 'feature_id',
  1680. '1' => 'type_id',
  1681. '2' => 'rank',
  1682. ),
  1683. ),
  1684. 'indexes' => array(
  1685. 'featureprop_idx1' => array(
  1686. '0' => 'feature_id',
  1687. ),
  1688. 'featureprop_idx2' => array(
  1689. '0' => 'type_id',
  1690. ),
  1691. ),
  1692. 'foreign keys' => array(
  1693. ),
  1694. );
  1695. return $description;
  1696. }
  1697. /****************************************************************************
  1698. * Implements hook_featurerange_schema()
  1699. * Purpose: To describe the structure of featurerange to tripal
  1700. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1701. * @see tripal_core.api.inc: tripal_core_chado_update()
  1702. * @see tripal_core.api.inc: tripal_core_chado_select()
  1703. *
  1704. * @return
  1705. * An array describing the current table
  1706. */
  1707. function tripal_core_chado_featurerange_schema () {
  1708. $description = array();
  1709. $description = array(
  1710. 'table' => 'featurerange',
  1711. // 'description' => 'TODO: please describe this table!',
  1712. 'fields' => array(
  1713. 'featurerange_id' => array(
  1714. // 'description' => 'TODO: please describe this field!',
  1715. 'type' => 'serial',
  1716. 'not null' => '1',
  1717. ),
  1718. 'featuremap_id' => array(
  1719. // 'description' => 'TODO: please describe this field!',
  1720. 'type' => 'int',
  1721. 'not null' => '1',
  1722. ),
  1723. 'feature_id' => array(
  1724. // 'description' => 'TODO: please describe this field!',
  1725. 'type' => 'int',
  1726. 'not null' => '1',
  1727. ),
  1728. 'leftstartf_id' => array(
  1729. // 'description' => 'TODO: please describe this field!',
  1730. 'type' => 'int',
  1731. 'not null' => '1',
  1732. ),
  1733. 'leftendf_id' => array(
  1734. // 'description' => 'TODO: please describe this field!',
  1735. 'type' => 'int',
  1736. 'not null' => '',
  1737. ),
  1738. 'rightstartf_id' => array(
  1739. // 'description' => 'TODO: please describe this field!',
  1740. 'type' => 'int',
  1741. 'not null' => '',
  1742. ),
  1743. 'rightendf_id' => array(
  1744. // 'description' => 'TODO: please describe this field!',
  1745. 'type' => 'int',
  1746. 'not null' => '1',
  1747. ),
  1748. 'rangestr' => array(
  1749. // 'description' => 'TODO: please describe this field!',
  1750. 'type' => 'varchar',
  1751. 'length' => '255',
  1752. 'not null' => '',
  1753. ),
  1754. ),
  1755. 'primary key' => array(
  1756. '0' => 'featurerange_id',
  1757. ),
  1758. 'unique keys' => array(
  1759. ),
  1760. 'indexes' => array(
  1761. 'featurerange_idx1' => array(
  1762. '0' => 'featuremap_id',
  1763. ),
  1764. 'featurerange_idx2' => array(
  1765. '0' => 'feature_id',
  1766. ),
  1767. 'featurerange_idx3' => array(
  1768. '0' => 'leftstartf_id',
  1769. ),
  1770. 'featurerange_idx4' => array(
  1771. '0' => 'leftendf_id',
  1772. ),
  1773. 'featurerange_idx5' => array(
  1774. '0' => 'rightstartf_id',
  1775. ),
  1776. 'featurerange_idx6' => array(
  1777. '0' => 'rightendf_id',
  1778. ),
  1779. ),
  1780. 'foreign keys' => array(
  1781. ),
  1782. );
  1783. return $description;
  1784. }
  1785. /****************************************************************************
  1786. * Implements hook_featureset_meets_schema()
  1787. * Purpose: To describe the structure of featureset_meets to tripal
  1788. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1789. * @see tripal_core.api.inc: tripal_core_chado_update()
  1790. * @see tripal_core.api.inc: tripal_core_chado_select()
  1791. *
  1792. * @return
  1793. * An array describing the current table
  1794. */
  1795. function tripal_core_chado_featureset_meets_schema () {
  1796. $description = array();
  1797. $description = array(
  1798. 'table' => 'featureset_meets',
  1799. // 'description' => 'TODO: please describe this table!',
  1800. 'fields' => array(
  1801. 'subject_id' => array(
  1802. // 'description' => 'TODO: please describe this field!',
  1803. 'type' => 'int',
  1804. 'not null' => '',
  1805. ),
  1806. 'object_id' => array(
  1807. // 'description' => 'TODO: please describe this field!',
  1808. 'type' => 'int',
  1809. 'not null' => '',
  1810. ),
  1811. ),
  1812. 'primary key' => array(
  1813. ),
  1814. 'unique keys' => array(
  1815. ),
  1816. 'indexes' => array(
  1817. ),
  1818. 'foreign keys' => array(
  1819. ),
  1820. );
  1821. return $description;
  1822. }
  1823. /****************************************************************************
  1824. * Implements hook_fnr_type_schema()
  1825. * Purpose: To describe the structure of fnr_type to tripal
  1826. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1827. * @see tripal_core.api.inc: tripal_core_chado_update()
  1828. * @see tripal_core.api.inc: tripal_core_chado_select()
  1829. *
  1830. * @return
  1831. * An array describing the current table
  1832. */
  1833. function tripal_core_chado_fnr_type_schema () {
  1834. $description = array();
  1835. $description = array(
  1836. 'table' => 'fnr_type',
  1837. // 'description' => 'TODO: please describe this table!',
  1838. 'fields' => array(
  1839. 'feature_id' => array(
  1840. // 'description' => 'TODO: please describe this field!',
  1841. 'type' => 'int',
  1842. 'not null' => '',
  1843. ),
  1844. 'name' => array(
  1845. // 'description' => 'TODO: please describe this field!',
  1846. 'type' => 'varchar',
  1847. 'length' => '255',
  1848. 'not null' => '',
  1849. ),
  1850. 'dbxref_id' => array(
  1851. // 'description' => 'TODO: please describe this field!',
  1852. 'type' => 'int',
  1853. 'not null' => '',
  1854. ),
  1855. 'type' => array(
  1856. // 'description' => 'TODO: please describe this field!',
  1857. 'type' => 'varchar',
  1858. 'length' => '1024',
  1859. 'not null' => '',
  1860. ),
  1861. 'residues' => array(
  1862. // 'description' => 'TODO: please describe this field!',
  1863. 'type' => 'text',
  1864. 'not null' => '',
  1865. ),
  1866. 'seqlen' => array(
  1867. // 'description' => 'TODO: please describe this field!',
  1868. 'type' => 'int',
  1869. 'not null' => '',
  1870. ),
  1871. 'md5checksum' => array(
  1872. // 'description' => 'TODO: please describe this field!',
  1873. 'type' => 'char',
  1874. 'length' => '32',
  1875. 'not null' => '',
  1876. ),
  1877. 'type_id' => array(
  1878. // 'description' => 'TODO: please describe this field!',
  1879. 'type' => 'int',
  1880. 'not null' => '',
  1881. ),
  1882. 'timeaccessioned' => array(
  1883. // 'description' => 'TODO: please describe this field!',
  1884. 'type' => 'datetime',
  1885. 'not null' => '',
  1886. ),
  1887. 'timelastmodified' => array(
  1888. // 'description' => 'TODO: please describe this field!',
  1889. 'type' => 'datetime',
  1890. 'not null' => '',
  1891. ),
  1892. ),
  1893. 'primary key' => array(
  1894. ),
  1895. 'unique keys' => array(
  1896. ),
  1897. 'indexes' => array(
  1898. ),
  1899. 'foreign keys' => array(
  1900. ),
  1901. );
  1902. return $description;
  1903. }
  1904. /****************************************************************************
  1905. * Implements hook_featurepos_schema()
  1906. * Purpose: To describe the structure of featurepos to tripal
  1907. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1908. * @see tripal_core.api.inc: tripal_core_chado_update()
  1909. * @see tripal_core.api.inc: tripal_core_chado_select()
  1910. *
  1911. * @return
  1912. * An array describing the current table
  1913. */
  1914. function tripal_core_chado_featurepos_schema () {
  1915. $description = array();
  1916. $description = array(
  1917. 'table' => 'featurepos',
  1918. // 'description' => 'TODO: please describe this table!',
  1919. 'fields' => array(
  1920. 'featurepos_id' => array(
  1921. // 'description' => 'TODO: please describe this field!',
  1922. 'type' => 'serial',
  1923. 'not null' => '1',
  1924. ),
  1925. 'featuremap_id' => array(
  1926. // 'description' => 'TODO: please describe this field!',
  1927. 'type' => 'serial',
  1928. 'not null' => '1',
  1929. ),
  1930. 'feature_id' => array(
  1931. // 'description' => 'TODO: please describe this field!',
  1932. 'type' => 'int',
  1933. 'not null' => '1',
  1934. ),
  1935. 'map_feature_id' => array(
  1936. // 'description' => 'TODO: please describe this field!',
  1937. 'type' => 'int',
  1938. 'not null' => '1',
  1939. ),
  1940. 'mappos' => array(
  1941. // 'description' => 'TODO: please describe this field!',
  1942. 'type' => 'float',
  1943. 'size' => 'big',
  1944. 'not null' => '1',
  1945. ),
  1946. ),
  1947. 'primary key' => array(
  1948. '0' => 'featurepos_id',
  1949. ),
  1950. 'unique keys' => array(
  1951. ),
  1952. 'indexes' => array(
  1953. 'featurepos_idx1' => array(
  1954. '0' => 'featuremap_id',
  1955. ),
  1956. 'featurepos_idx2' => array(
  1957. '0' => 'feature_id',
  1958. ),
  1959. 'featurepos_idx3' => array(
  1960. '0' => 'map_feature_id',
  1961. ),
  1962. ),
  1963. 'foreign keys' => array(
  1964. ),
  1965. );
  1966. return $description;
  1967. }
  1968. /****************************************************************************
  1969. * Implements hook_featuremap_pub_schema()
  1970. * Purpose: To describe the structure of featuremap_pub to tripal
  1971. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1972. * @see tripal_core.api.inc: tripal_core_chado_update()
  1973. * @see tripal_core.api.inc: tripal_core_chado_select()
  1974. *
  1975. * @return
  1976. * An array describing the current table
  1977. */
  1978. function tripal_core_chado_featuremap_pub_schema () {
  1979. $description = array();
  1980. $description = array(
  1981. 'table' => 'featuremap_pub',
  1982. // 'description' => 'TODO: please describe this table!',
  1983. 'fields' => array(
  1984. 'featuremap_pub_id' => array(
  1985. // 'description' => 'TODO: please describe this field!',
  1986. 'type' => 'serial',
  1987. 'not null' => '1',
  1988. ),
  1989. 'featuremap_id' => array(
  1990. // 'description' => 'TODO: please describe this field!',
  1991. 'type' => 'int',
  1992. 'not null' => '1',
  1993. ),
  1994. 'pub_id' => array(
  1995. // 'description' => 'TODO: please describe this field!',
  1996. 'type' => 'int',
  1997. 'not null' => '1',
  1998. ),
  1999. ),
  2000. 'primary key' => array(
  2001. '0' => 'featuremap_pub_id',
  2002. ),
  2003. 'unique keys' => array(
  2004. ),
  2005. 'indexes' => array(
  2006. 'featuremap_pub_idx1' => array(
  2007. '0' => 'featuremap_id',
  2008. ),
  2009. 'featuremap_pub_idx2' => array(
  2010. '0' => 'pub_id',
  2011. ),
  2012. ),
  2013. 'foreign keys' => array(
  2014. ),
  2015. );
  2016. return $description;
  2017. }
  2018. /****************************************************************************
  2019. * Implements hook_feature_union_schema()
  2020. * Purpose: To describe the structure of feature_union to tripal
  2021. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2022. * @see tripal_core.api.inc: tripal_core_chado_update()
  2023. * @see tripal_core.api.inc: tripal_core_chado_select()
  2024. *
  2025. * @return
  2026. * An array describing the current table
  2027. */
  2028. function tripal_core_chado_feature_union_schema () {
  2029. $description = array();
  2030. $description = array(
  2031. 'table' => 'feature_union',
  2032. // 'description' => 'TODO: please describe this table!',
  2033. 'fields' => array(
  2034. 'subject_id' => array(
  2035. // 'description' => 'TODO: please describe this field!',
  2036. 'type' => 'int',
  2037. 'not null' => '',
  2038. ),
  2039. 'object_id' => array(
  2040. // 'description' => 'TODO: please describe this field!',
  2041. 'type' => 'int',
  2042. 'not null' => '',
  2043. ),
  2044. 'srcfeature_id' => array(
  2045. // 'description' => 'TODO: please describe this field!',
  2046. 'type' => 'int',
  2047. 'not null' => '',
  2048. ),
  2049. 'subject_strand' => array(
  2050. // 'description' => 'TODO: please describe this field!',
  2051. 'type' => 'int',
  2052. 'size' => 'small',
  2053. 'not null' => '',
  2054. ),
  2055. 'object_strand' => array(
  2056. // 'description' => 'TODO: please describe this field!',
  2057. 'type' => 'int',
  2058. 'size' => 'small',
  2059. 'not null' => '',
  2060. ),
  2061. 'fmin' => array(
  2062. // 'description' => 'TODO: please describe this field!',
  2063. 'type' => 'int',
  2064. 'not null' => '',
  2065. ),
  2066. 'fmax' => array(
  2067. // 'description' => 'TODO: please describe this field!',
  2068. 'type' => 'int',
  2069. 'not null' => '',
  2070. ),
  2071. ),
  2072. 'primary key' => array(
  2073. ),
  2074. 'unique keys' => array(
  2075. ),
  2076. 'indexes' => array(
  2077. ),
  2078. 'foreign keys' => array(
  2079. ),
  2080. );
  2081. return $description;
  2082. }
  2083. /****************************************************************************
  2084. * Implements hook_featureloc_schema()
  2085. * Purpose: To describe the structure of featureloc to tripal
  2086. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2087. * @see tripal_core.api.inc: tripal_core_chado_update()
  2088. * @see tripal_core.api.inc: tripal_core_chado_select()
  2089. *
  2090. * @return
  2091. * An array describing the current table
  2092. */
  2093. function tripal_core_chado_featureloc_schema () {
  2094. $description = array();
  2095. $description = array(
  2096. 'table' => 'featureloc',
  2097. // 'description' => 'TODO: please describe this table!',
  2098. 'fields' => array(
  2099. 'featureloc_id' => array(
  2100. // 'description' => 'TODO: please describe this field!',
  2101. 'type' => 'serial',
  2102. 'not null' => '1',
  2103. ),
  2104. 'feature_id' => array(
  2105. // 'description' => 'TODO: please describe this field!',
  2106. 'type' => 'int',
  2107. 'not null' => '1',
  2108. ),
  2109. 'srcfeature_id' => array(
  2110. // 'description' => 'TODO: please describe this field!',
  2111. 'type' => 'int',
  2112. 'not null' => '',
  2113. ),
  2114. 'fmin' => array(
  2115. // 'description' => 'TODO: please describe this field!',
  2116. 'type' => 'int',
  2117. 'not null' => '',
  2118. ),
  2119. 'is_fmin_partial' => array(
  2120. // 'description' => 'TODO: please describe this field!',
  2121. 'type' => 'boolean',
  2122. 'not null' => '1',
  2123. 'default' => 'als',
  2124. ),
  2125. 'fmax' => array(
  2126. // 'description' => 'TODO: please describe this field!',
  2127. 'type' => 'int',
  2128. 'not null' => '',
  2129. ),
  2130. 'is_fmax_partial' => array(
  2131. // 'description' => 'TODO: please describe this field!',
  2132. 'type' => 'boolean',
  2133. 'not null' => '1',
  2134. 'default' => 'als',
  2135. ),
  2136. 'strand' => array(
  2137. // 'description' => 'TODO: please describe this field!',
  2138. 'type' => 'int',
  2139. 'size' => 'small',
  2140. 'not null' => '',
  2141. ),
  2142. 'phase' => array(
  2143. // 'description' => 'TODO: please describe this field!',
  2144. 'type' => 'int',
  2145. 'not null' => '',
  2146. ),
  2147. 'residue_info' => array(
  2148. // 'description' => 'TODO: please describe this field!',
  2149. 'type' => 'text',
  2150. 'not null' => '',
  2151. ),
  2152. 'locgroup' => array(
  2153. // 'description' => 'TODO: please describe this field!',
  2154. 'type' => 'int',
  2155. 'not null' => '1',
  2156. 'default' => '0',
  2157. ),
  2158. 'rank' => array(
  2159. // 'description' => 'TODO: please describe this field!',
  2160. 'type' => 'int',
  2161. 'not null' => '1',
  2162. 'default' => '0',
  2163. ),
  2164. ),
  2165. 'primary key' => array(
  2166. '0' => 'featureloc_id',
  2167. ),
  2168. 'unique keys' => array(
  2169. 'featureloc_c1' => array(
  2170. '0' => 'feature_id',
  2171. '1' => 'locgroup',
  2172. '2' => 'rank',
  2173. ),
  2174. ),
  2175. 'indexes' => array(
  2176. 'binloc_boxrange' => array(
  2177. '0' => 'fmin',
  2178. ),
  2179. 'binloc_boxrange_src' => array(
  2180. '0' => 'srcfeature_id',
  2181. '1' => 'fmin',
  2182. ),
  2183. 'featureloc_idx1' => array(
  2184. '0' => 'feature_id',
  2185. ),
  2186. 'featureloc_idx2' => array(
  2187. '0' => 'srcfeature_id',
  2188. ),
  2189. 'featureloc_idx3' => array(
  2190. '0' => 'srcfeature_id',
  2191. '1' => 'fmin',
  2192. '2' => 'fmax',
  2193. ),
  2194. ),
  2195. 'foreign keys' => array(
  2196. ),
  2197. );
  2198. return $description;
  2199. }
  2200. /****************************************************************************
  2201. * Implements hook_featureloc_pub_schema()
  2202. * Purpose: To describe the structure of featureloc_pub to tripal
  2203. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2204. * @see tripal_core.api.inc: tripal_core_chado_update()
  2205. * @see tripal_core.api.inc: tripal_core_chado_select()
  2206. *
  2207. * @return
  2208. * An array describing the current table
  2209. */
  2210. function tripal_core_chado_featureloc_pub_schema () {
  2211. $description = array();
  2212. $description = array(
  2213. 'table' => 'featureloc_pub',
  2214. // 'description' => 'TODO: please describe this table!',
  2215. 'fields' => array(
  2216. 'featureloc_pub_id' => array(
  2217. // 'description' => 'TODO: please describe this field!',
  2218. 'type' => 'serial',
  2219. 'not null' => '1',
  2220. ),
  2221. 'featureloc_id' => array(
  2222. // 'description' => 'TODO: please describe this field!',
  2223. 'type' => 'int',
  2224. 'not null' => '1',
  2225. ),
  2226. 'pub_id' => array(
  2227. // 'description' => 'TODO: please describe this field!',
  2228. 'type' => 'int',
  2229. 'not null' => '1',
  2230. ),
  2231. ),
  2232. 'primary key' => array(
  2233. '0' => 'featureloc_pub_id',
  2234. ),
  2235. 'unique keys' => array(
  2236. 'featureloc_pub_c1' => array(
  2237. '0' => 'featureloc_id',
  2238. '1' => 'pub_id',
  2239. ),
  2240. ),
  2241. 'indexes' => array(
  2242. 'featureloc_pub_idx1' => array(
  2243. '0' => 'featureloc_id',
  2244. ),
  2245. 'featureloc_pub_idx2' => array(
  2246. '0' => 'pub_id',
  2247. ),
  2248. ),
  2249. 'foreign keys' => array(
  2250. ),
  2251. );
  2252. return $description;
  2253. }
  2254. /****************************************************************************
  2255. * Implements hook_featuremap_schema()
  2256. * Purpose: To describe the structure of featuremap to tripal
  2257. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2258. * @see tripal_core.api.inc: tripal_core_chado_update()
  2259. * @see tripal_core.api.inc: tripal_core_chado_select()
  2260. *
  2261. * @return
  2262. * An array describing the current table
  2263. */
  2264. function tripal_core_chado_featuremap_schema () {
  2265. $description = array();
  2266. $description = array(
  2267. 'table' => 'featuremap',
  2268. // 'description' => 'TODO: please describe this table!',
  2269. 'fields' => array(
  2270. 'featuremap_id' => array(
  2271. // 'description' => 'TODO: please describe this field!',
  2272. 'type' => 'serial',
  2273. 'not null' => '1',
  2274. ),
  2275. 'name' => array(
  2276. // 'description' => 'TODO: please describe this field!',
  2277. 'type' => 'varchar',
  2278. 'length' => '255',
  2279. 'not null' => '',
  2280. ),
  2281. 'description' => array(
  2282. // 'description' => 'TODO: please describe this field!',
  2283. 'type' => 'text',
  2284. 'not null' => '',
  2285. ),
  2286. 'unittype_id' => array(
  2287. // 'description' => 'TODO: please describe this field!',
  2288. 'type' => 'int',
  2289. 'not null' => '',
  2290. ),
  2291. ),
  2292. 'primary key' => array(
  2293. '0' => 'featuremap_id',
  2294. ),
  2295. 'unique keys' => array(
  2296. 'featuremap_c1' => array(
  2297. '0' => 'name',
  2298. ),
  2299. ),
  2300. 'indexes' => array(
  2301. ),
  2302. 'foreign keys' => array(
  2303. ),
  2304. );
  2305. return $description;
  2306. }
  2307. /****************************************************************************
  2308. * Implements hook_fp_key_schema()
  2309. * Purpose: To describe the structure of fp_key to tripal
  2310. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2311. * @see tripal_core.api.inc: tripal_core_chado_update()
  2312. * @see tripal_core.api.inc: tripal_core_chado_select()
  2313. *
  2314. * @return
  2315. * An array describing the current table
  2316. */
  2317. function tripal_core_chado_fp_key_schema () {
  2318. $description = array();
  2319. $description = array(
  2320. 'table' => 'fp_key',
  2321. // 'description' => 'TODO: please describe this table!',
  2322. 'fields' => array(
  2323. 'feature_id' => array(
  2324. // 'description' => 'TODO: please describe this field!',
  2325. 'type' => 'int',
  2326. 'not null' => '',
  2327. ),
  2328. 'pkey' => array(
  2329. // 'description' => 'TODO: please describe this field!',
  2330. 'type' => 'varchar',
  2331. 'length' => '1024',
  2332. 'not null' => '',
  2333. ),
  2334. 'value' => array(
  2335. // 'description' => 'TODO: please describe this field!',
  2336. 'type' => 'text',
  2337. 'not null' => '',
  2338. ),
  2339. ),
  2340. 'primary key' => array(
  2341. ),
  2342. 'unique keys' => array(
  2343. ),
  2344. 'indexes' => array(
  2345. ),
  2346. 'foreign keys' => array(
  2347. ),
  2348. );
  2349. return $description;
  2350. }
  2351. /****************************************************************************
  2352. * Implements hook_genotype_schema()
  2353. * Purpose: To describe the structure of genotype to tripal
  2354. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2355. * @see tripal_core.api.inc: tripal_core_chado_update()
  2356. * @see tripal_core.api.inc: tripal_core_chado_select()
  2357. *
  2358. * @return
  2359. * An array describing the current table
  2360. */
  2361. function tripal_core_chado_genotype_schema () {
  2362. $description = array();
  2363. $description = array(
  2364. 'table' => 'genotype',
  2365. // 'description' => 'TODO: please describe this table!',
  2366. 'fields' => array(
  2367. 'genotype_id' => array(
  2368. // 'description' => 'TODO: please describe this field!',
  2369. 'type' => 'serial',
  2370. 'not null' => '1',
  2371. ),
  2372. 'name' => array(
  2373. // 'description' => 'TODO: please describe this field!',
  2374. 'type' => 'text',
  2375. 'not null' => '',
  2376. ),
  2377. 'uniquename' => array(
  2378. // 'description' => 'TODO: please describe this field!',
  2379. 'type' => 'text',
  2380. 'not null' => '1',
  2381. ),
  2382. 'description' => array(
  2383. // 'description' => 'TODO: please describe this field!',
  2384. 'type' => 'varchar',
  2385. 'length' => '255',
  2386. 'not null' => '',
  2387. ),
  2388. ),
  2389. 'primary key' => array(
  2390. '0' => 'genotype_id',
  2391. ),
  2392. 'unique keys' => array(
  2393. 'genotype_c1' => array(
  2394. '0' => 'uniquename',
  2395. ),
  2396. ),
  2397. 'indexes' => array(
  2398. 'genotype_idx1' => array(
  2399. '0' => 'uniquename',
  2400. ),
  2401. 'genotype_idx2' => array(
  2402. '0' => 'name',
  2403. ),
  2404. ),
  2405. 'foreign keys' => array(
  2406. ),
  2407. );
  2408. return $description;
  2409. }
  2410. /****************************************************************************
  2411. * Implements hook_library_cvterm_schema()
  2412. * Purpose: To describe the structure of library_cvterm to tripal
  2413. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2414. * @see tripal_core.api.inc: tripal_core_chado_update()
  2415. * @see tripal_core.api.inc: tripal_core_chado_select()
  2416. *
  2417. * @return
  2418. * An array describing the current table
  2419. */
  2420. function tripal_core_chado_library_cvterm_schema () {
  2421. $description = array();
  2422. $description = array(
  2423. 'table' => 'library_cvterm',
  2424. // 'description' => 'TODO: please describe this table!',
  2425. 'fields' => array(
  2426. 'library_cvterm_id' => array(
  2427. // 'description' => 'TODO: please describe this field!',
  2428. 'type' => 'serial',
  2429. 'not null' => '1',
  2430. ),
  2431. 'library_id' => array(
  2432. // 'description' => 'TODO: please describe this field!',
  2433. 'type' => 'int',
  2434. 'not null' => '1',
  2435. ),
  2436. 'cvterm_id' => array(
  2437. // 'description' => 'TODO: please describe this field!',
  2438. 'type' => 'int',
  2439. 'not null' => '1',
  2440. ),
  2441. 'pub_id' => array(
  2442. // 'description' => 'TODO: please describe this field!',
  2443. 'type' => 'int',
  2444. 'not null' => '1',
  2445. ),
  2446. ),
  2447. 'primary key' => array(
  2448. '0' => 'library_cvterm_id',
  2449. ),
  2450. 'unique keys' => array(
  2451. 'library_cvterm_c1' => array(
  2452. '0' => 'library_id',
  2453. '1' => 'cvterm_id',
  2454. '2' => 'pub_id',
  2455. ),
  2456. ),
  2457. 'indexes' => array(
  2458. 'library_cvterm_idx1' => array(
  2459. '0' => 'library_id',
  2460. ),
  2461. 'library_cvterm_idx2' => array(
  2462. '0' => 'cvterm_id',
  2463. ),
  2464. 'library_cvterm_idx3' => array(
  2465. '0' => 'pub_id',
  2466. ),
  2467. ),
  2468. 'foreign keys' => array(
  2469. ),
  2470. );
  2471. return $description;
  2472. }
  2473. /****************************************************************************
  2474. * Implements hook_library_dbxref_schema()
  2475. * Purpose: To describe the structure of library_dbxref to tripal
  2476. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2477. * @see tripal_core.api.inc: tripal_core_chado_update()
  2478. * @see tripal_core.api.inc: tripal_core_chado_select()
  2479. *
  2480. * @return
  2481. * An array describing the current table
  2482. */
  2483. function tripal_core_chado_library_dbxref_schema () {
  2484. $description = array();
  2485. $description = array(
  2486. 'table' => 'library_dbxref',
  2487. // 'description' => 'TODO: please describe this table!',
  2488. 'fields' => array(
  2489. 'library_dbxref_id' => array(
  2490. // 'description' => 'TODO: please describe this field!',
  2491. 'type' => 'serial',
  2492. 'not null' => '1',
  2493. ),
  2494. 'library_id' => array(
  2495. // 'description' => 'TODO: please describe this field!',
  2496. 'type' => 'int',
  2497. 'not null' => '1',
  2498. ),
  2499. 'dbxref_id' => array(
  2500. // 'description' => 'TODO: please describe this field!',
  2501. 'type' => 'int',
  2502. 'not null' => '1',
  2503. ),
  2504. 'is_current' => array(
  2505. // 'description' => 'TODO: please describe this field!',
  2506. 'type' => 'boolean',
  2507. 'not null' => '1',
  2508. 'default' => 'ru',
  2509. ),
  2510. ),
  2511. 'primary key' => array(
  2512. '0' => 'library_dbxref_id',
  2513. ),
  2514. 'unique keys' => array(
  2515. 'library_dbxref_c1' => array(
  2516. '0' => 'library_id',
  2517. '1' => 'dbxref_id',
  2518. ),
  2519. ),
  2520. 'indexes' => array(
  2521. 'library_dbxref_idx1' => array(
  2522. '0' => 'library_id',
  2523. ),
  2524. 'library_dbxref_idx2' => array(
  2525. '0' => 'dbxref_id',
  2526. ),
  2527. ),
  2528. 'foreign keys' => array(
  2529. ),
  2530. );
  2531. return $description;
  2532. }
  2533. /****************************************************************************
  2534. * Implements hook_library_feature_schema()
  2535. * Purpose: To describe the structure of library_feature to tripal
  2536. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2537. * @see tripal_core.api.inc: tripal_core_chado_update()
  2538. * @see tripal_core.api.inc: tripal_core_chado_select()
  2539. *
  2540. * @return
  2541. * An array describing the current table
  2542. */
  2543. function tripal_core_chado_library_feature_schema () {
  2544. $description = array();
  2545. $description = array(
  2546. 'table' => 'library_feature',
  2547. // 'description' => 'TODO: please describe this table!',
  2548. 'fields' => array(
  2549. 'library_feature_id' => array(
  2550. // 'description' => 'TODO: please describe this field!',
  2551. 'type' => 'serial',
  2552. 'not null' => '1',
  2553. ),
  2554. 'library_id' => array(
  2555. // 'description' => 'TODO: please describe this field!',
  2556. 'type' => 'int',
  2557. 'not null' => '1',
  2558. ),
  2559. 'feature_id' => array(
  2560. // 'description' => 'TODO: please describe this field!',
  2561. 'type' => 'int',
  2562. 'not null' => '1',
  2563. ),
  2564. ),
  2565. 'primary key' => array(
  2566. '0' => 'library_feature_id',
  2567. ),
  2568. 'unique keys' => array(
  2569. 'library_feature_c1' => array(
  2570. '0' => 'library_id',
  2571. '1' => 'feature_id',
  2572. ),
  2573. ),
  2574. 'indexes' => array(
  2575. 'library_feature_idx1' => array(
  2576. '0' => 'library_id',
  2577. ),
  2578. 'library_feature_idx2' => array(
  2579. '0' => 'feature_id',
  2580. ),
  2581. ),
  2582. 'foreign keys' => array(
  2583. ),
  2584. );
  2585. return $description;
  2586. }
  2587. /****************************************************************************
  2588. * Implements hook_library_feature_count_schema()
  2589. * Purpose: To describe the structure of library_feature_count to tripal
  2590. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2591. * @see tripal_core.api.inc: tripal_core_chado_update()
  2592. * @see tripal_core.api.inc: tripal_core_chado_select()
  2593. *
  2594. * @return
  2595. * An array describing the current table
  2596. */
  2597. function tripal_core_chado_library_feature_count_schema () {
  2598. $description = array();
  2599. $description = array(
  2600. 'table' => 'library_feature_count',
  2601. // 'description' => 'TODO: please describe this table!',
  2602. 'fields' => array(
  2603. 'library_id' => array(
  2604. // 'description' => 'TODO: please describe this field!',
  2605. 'type' => 'int',
  2606. 'not null' => '',
  2607. ),
  2608. 'name' => array(
  2609. // 'description' => 'TODO: please describe this field!',
  2610. 'type' => 'varchar',
  2611. 'length' => '255',
  2612. 'not null' => '',
  2613. ),
  2614. 'num_features' => array(
  2615. // 'description' => 'TODO: please describe this field!',
  2616. 'type' => 'int',
  2617. 'not null' => '',
  2618. ),
  2619. 'feature_type' => array(
  2620. // 'description' => 'TODO: please describe this field!',
  2621. 'type' => 'varchar',
  2622. 'length' => '255',
  2623. 'not null' => '',
  2624. ),
  2625. ),
  2626. 'primary key' => array(
  2627. ),
  2628. 'unique keys' => array(
  2629. 'library_feature_count_index' => array(
  2630. '0' => 'library_id',
  2631. ),
  2632. ),
  2633. 'indexes' => array(
  2634. ),
  2635. 'foreign keys' => array(
  2636. ),
  2637. );
  2638. return $description;
  2639. }
  2640. /****************************************************************************
  2641. * Implements hook_library_schema()
  2642. * Purpose: To describe the structure of library to tripal
  2643. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2644. * @see tripal_core.api.inc: tripal_core_chado_update()
  2645. * @see tripal_core.api.inc: tripal_core_chado_select()
  2646. *
  2647. * @return
  2648. * An array describing the current table
  2649. */
  2650. function tripal_core_chado_library_schema () {
  2651. $description = array();
  2652. $description = array(
  2653. 'table' => 'library',
  2654. // 'description' => 'TODO: please describe this table!',
  2655. 'fields' => array(
  2656. 'library_id' => array(
  2657. // 'description' => 'TODO: please describe this field!',
  2658. 'type' => 'serial',
  2659. 'not null' => '1',
  2660. ),
  2661. 'organism_id' => array(
  2662. // 'description' => 'TODO: please describe this field!',
  2663. 'type' => 'int',
  2664. 'not null' => '1',
  2665. ),
  2666. 'name' => array(
  2667. // 'description' => 'TODO: please describe this field!',
  2668. 'type' => 'varchar',
  2669. 'length' => '255',
  2670. 'not null' => '',
  2671. ),
  2672. 'uniquename' => array(
  2673. // 'description' => 'TODO: please describe this field!',
  2674. 'type' => 'text',
  2675. 'not null' => '1',
  2676. ),
  2677. 'type_id' => array(
  2678. // 'description' => 'TODO: please describe this field!',
  2679. 'type' => 'int',
  2680. 'not null' => '1',
  2681. ),
  2682. 'is_obsolete' => array(
  2683. // 'description' => 'TODO: please describe this field!',
  2684. 'type' => 'int',
  2685. 'not null' => '1',
  2686. 'default' => '0',
  2687. ),
  2688. 'timeaccessioned' => array(
  2689. // 'description' => 'TODO: please describe this field!',
  2690. 'type' => 'datetime',
  2691. 'not null' => '1',
  2692. 'default' => 'ow(',
  2693. ),
  2694. 'timelastmodified' => array(
  2695. // 'description' => 'TODO: please describe this field!',
  2696. 'type' => 'datetime',
  2697. 'not null' => '1',
  2698. 'default' => 'ow(',
  2699. ),
  2700. ),
  2701. 'primary key' => array(
  2702. '0' => 'library_id',
  2703. ),
  2704. 'unique keys' => array(
  2705. 'library_c1' => array(
  2706. '0' => 'organism_id',
  2707. '1' => 'uniquename',
  2708. '2' => 'type_id',
  2709. ),
  2710. ),
  2711. 'indexes' => array(
  2712. 'library_idx1' => array(
  2713. '0' => 'organism_id',
  2714. ),
  2715. 'library_idx2' => array(
  2716. '0' => 'type_id',
  2717. ),
  2718. 'library_idx3' => array(
  2719. '0' => 'uniquename',
  2720. ),
  2721. 'library_name_ind1' => array(
  2722. '0' => 'name',
  2723. ),
  2724. ),
  2725. 'foreign keys' => array(
  2726. ),
  2727. );
  2728. return $description;
  2729. }
  2730. /****************************************************************************
  2731. * Implements hook_intronloc_view_schema()
  2732. * Purpose: To describe the structure of intronloc_view to tripal
  2733. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2734. * @see tripal_core.api.inc: tripal_core_chado_update()
  2735. * @see tripal_core.api.inc: tripal_core_chado_select()
  2736. *
  2737. * @return
  2738. * An array describing the current table
  2739. */
  2740. function tripal_core_chado_intronloc_view_schema () {
  2741. $description = array();
  2742. $description = array(
  2743. 'table' => 'intronloc_view',
  2744. // 'description' => 'TODO: please describe this table!',
  2745. 'fields' => array(
  2746. 'exon1_id' => array(
  2747. // 'description' => 'TODO: please describe this field!',
  2748. 'type' => 'int',
  2749. 'not null' => '',
  2750. ),
  2751. 'exon2_id' => array(
  2752. // 'description' => 'TODO: please describe this field!',
  2753. 'type' => 'int',
  2754. 'not null' => '',
  2755. ),
  2756. 'fmin' => array(
  2757. // 'description' => 'TODO: please describe this field!',
  2758. 'type' => 'int',
  2759. 'not null' => '',
  2760. ),
  2761. 'fmax' => array(
  2762. // 'description' => 'TODO: please describe this field!',
  2763. 'type' => 'int',
  2764. 'not null' => '',
  2765. ),
  2766. 'strand' => array(
  2767. // 'description' => 'TODO: please describe this field!',
  2768. 'type' => 'int',
  2769. 'size' => 'small',
  2770. 'not null' => '',
  2771. ),
  2772. 'srcfeature_id' => array(
  2773. // 'description' => 'TODO: please describe this field!',
  2774. 'type' => 'int',
  2775. 'not null' => '',
  2776. ),
  2777. ),
  2778. 'primary key' => array(
  2779. ),
  2780. 'unique keys' => array(
  2781. ),
  2782. 'indexes' => array(
  2783. ),
  2784. 'foreign keys' => array(
  2785. ),
  2786. );
  2787. return $description;
  2788. }
  2789. /****************************************************************************
  2790. * Implements hook_gff3atts_schema()
  2791. * Purpose: To describe the structure of gff3atts to tripal
  2792. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2793. * @see tripal_core.api.inc: tripal_core_chado_update()
  2794. * @see tripal_core.api.inc: tripal_core_chado_select()
  2795. *
  2796. * @return
  2797. * An array describing the current table
  2798. */
  2799. function tripal_core_chado_gff3atts_schema () {
  2800. $description = array();
  2801. $description = array(
  2802. 'table' => 'gff3atts',
  2803. // 'description' => 'TODO: please describe this table!',
  2804. 'fields' => array(
  2805. 'feature_id' => array(
  2806. // 'description' => 'TODO: please describe this field!',
  2807. 'type' => 'int',
  2808. 'not null' => '',
  2809. ),
  2810. 'type' => array(
  2811. // 'description' => 'TODO: please describe this field!',
  2812. 'type' => 'text',
  2813. 'not null' => '',
  2814. ),
  2815. 'attribute' => array(
  2816. // 'description' => 'TODO: please describe this field!',
  2817. 'type' => 'varchar',
  2818. 'not null' => '',
  2819. ),
  2820. ),
  2821. 'primary key' => array(
  2822. ),
  2823. 'unique keys' => array(
  2824. ),
  2825. 'indexes' => array(
  2826. ),
  2827. 'foreign keys' => array(
  2828. ),
  2829. );
  2830. return $description;
  2831. }
  2832. /****************************************************************************
  2833. * Implements hook_gff3view_schema()
  2834. * Purpose: To describe the structure of gff3view to tripal
  2835. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2836. * @see tripal_core.api.inc: tripal_core_chado_update()
  2837. * @see tripal_core.api.inc: tripal_core_chado_select()
  2838. *
  2839. * @return
  2840. * An array describing the current table
  2841. */
  2842. function tripal_core_chado_gff3view_schema () {
  2843. $description = array();
  2844. $description = array(
  2845. 'table' => 'gff3view',
  2846. // 'description' => 'TODO: please describe this table!',
  2847. 'fields' => array(
  2848. 'feature_id' => array(
  2849. // 'description' => 'TODO: please describe this field!',
  2850. 'type' => 'int',
  2851. 'not null' => '',
  2852. ),
  2853. 'ref' => array(
  2854. // 'description' => 'TODO: please describe this field!',
  2855. 'type' => 'varchar',
  2856. 'length' => '255',
  2857. 'not null' => '',
  2858. ),
  2859. 'source' => array(
  2860. // 'description' => 'TODO: please describe this field!',
  2861. 'type' => 'varchar',
  2862. 'length' => '255',
  2863. 'not null' => '',
  2864. ),
  2865. 'type' => array(
  2866. // 'description' => 'TODO: please describe this field!',
  2867. 'type' => 'varchar',
  2868. 'length' => '1024',
  2869. 'not null' => '',
  2870. ),
  2871. 'fstart' => array(
  2872. // 'description' => 'TODO: please describe this field!',
  2873. 'type' => 'int',
  2874. 'not null' => '',
  2875. ),
  2876. 'fend' => array(
  2877. // 'description' => 'TODO: please describe this field!',
  2878. 'type' => 'int',
  2879. 'not null' => '',
  2880. ),
  2881. 'score' => array(
  2882. // 'description' => 'TODO: please describe this field!',
  2883. 'type' => 'float',
  2884. 'size' => 'big',
  2885. 'not null' => '',
  2886. ),
  2887. 'strand' => array(
  2888. // 'description' => 'TODO: please describe this field!',
  2889. 'type' => 'int',
  2890. 'size' => 'small',
  2891. 'not null' => '',
  2892. ),
  2893. 'phase' => array(
  2894. // 'description' => 'TODO: please describe this field!',
  2895. 'type' => 'int',
  2896. 'not null' => '',
  2897. ),
  2898. 'seqlen' => array(
  2899. // 'description' => 'TODO: please describe this field!',
  2900. 'type' => 'int',
  2901. 'not null' => '',
  2902. ),
  2903. 'name' => array(
  2904. // 'description' => 'TODO: please describe this field!',
  2905. 'type' => 'varchar',
  2906. 'length' => '255',
  2907. 'not null' => '',
  2908. ),
  2909. 'organism_id' => array(
  2910. // 'description' => 'TODO: please describe this field!',
  2911. 'type' => 'int',
  2912. 'not null' => '',
  2913. ),
  2914. ),
  2915. 'primary key' => array(
  2916. ),
  2917. 'unique keys' => array(
  2918. ),
  2919. 'indexes' => array(
  2920. ),
  2921. 'foreign keys' => array(
  2922. ),
  2923. );
  2924. return $description;
  2925. }
  2926. /****************************************************************************
  2927. * Implements hook_gffatts_schema()
  2928. * Purpose: To describe the structure of gffatts to tripal
  2929. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2930. * @see tripal_core.api.inc: tripal_core_chado_update()
  2931. * @see tripal_core.api.inc: tripal_core_chado_select()
  2932. *
  2933. * @return
  2934. * An array describing the current table
  2935. */
  2936. function tripal_core_chado_gffatts_schema () {
  2937. $description = array();
  2938. $description = array(
  2939. 'table' => 'gffatts',
  2940. // 'description' => 'TODO: please describe this table!',
  2941. 'fields' => array(
  2942. 'feature_id' => array(
  2943. // 'description' => 'TODO: please describe this field!',
  2944. 'type' => 'int',
  2945. 'not null' => '',
  2946. ),
  2947. 'type' => array(
  2948. // 'description' => 'TODO: please describe this field!',
  2949. 'type' => 'text',
  2950. 'not null' => '',
  2951. ),
  2952. 'attribute' => array(
  2953. // 'description' => 'TODO: please describe this field!',
  2954. 'type' => 'varchar',
  2955. 'not null' => '',
  2956. ),
  2957. ),
  2958. 'primary key' => array(
  2959. ),
  2960. 'unique keys' => array(
  2961. ),
  2962. 'indexes' => array(
  2963. ),
  2964. 'foreign keys' => array(
  2965. ),
  2966. );
  2967. return $description;
  2968. }
  2969. /****************************************************************************
  2970. * Implements hook_intron_combined_view_schema()
  2971. * Purpose: To describe the structure of intron_combined_view to tripal
  2972. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2973. * @see tripal_core.api.inc: tripal_core_chado_update()
  2974. * @see tripal_core.api.inc: tripal_core_chado_select()
  2975. *
  2976. * @return
  2977. * An array describing the current table
  2978. */
  2979. function tripal_core_chado_intron_combined_view_schema () {
  2980. $description = array();
  2981. $description = array(
  2982. 'table' => 'intron_combined_view',
  2983. // 'description' => 'TODO: please describe this table!',
  2984. 'fields' => array(
  2985. 'exon1_id' => array(
  2986. // 'description' => 'TODO: please describe this field!',
  2987. 'type' => 'int',
  2988. 'not null' => '',
  2989. ),
  2990. 'exon2_id' => array(
  2991. // 'description' => 'TODO: please describe this field!',
  2992. 'type' => 'int',
  2993. 'not null' => '',
  2994. ),
  2995. 'fmin' => array(
  2996. // 'description' => 'TODO: please describe this field!',
  2997. 'type' => 'int',
  2998. 'not null' => '',
  2999. ),
  3000. 'fmax' => array(
  3001. // 'description' => 'TODO: please describe this field!',
  3002. 'type' => 'int',
  3003. 'not null' => '',
  3004. ),
  3005. 'strand' => array(
  3006. // 'description' => 'TODO: please describe this field!',
  3007. 'type' => 'int',
  3008. 'size' => 'small',
  3009. 'not null' => '',
  3010. ),
  3011. 'srcfeature_id' => array(
  3012. // 'description' => 'TODO: please describe this field!',
  3013. 'type' => 'int',
  3014. 'not null' => '',
  3015. ),
  3016. 'intron_rank' => array(
  3017. // 'description' => 'TODO: please describe this field!',
  3018. 'type' => 'int',
  3019. 'not null' => '',
  3020. ),
  3021. 'transcript_id' => array(
  3022. // 'description' => 'TODO: please describe this field!',
  3023. 'type' => 'int',
  3024. 'not null' => '',
  3025. ),
  3026. ),
  3027. 'primary key' => array(
  3028. ),
  3029. 'unique keys' => array(
  3030. ),
  3031. 'indexes' => array(
  3032. ),
  3033. 'foreign keys' => array(
  3034. ),
  3035. );
  3036. return $description;
  3037. }
  3038. /****************************************************************************
  3039. * Implements hook_project_schema()
  3040. * Purpose: To describe the structure of project to tripal
  3041. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3042. * @see tripal_core.api.inc: tripal_core_chado_update()
  3043. * @see tripal_core.api.inc: tripal_core_chado_select()
  3044. *
  3045. * @return
  3046. * An array describing the current table
  3047. */
  3048. function tripal_core_chado_project_schema () {
  3049. $description = array();
  3050. $description = array(
  3051. 'table' => 'project',
  3052. // 'description' => 'TODO: please describe this table!',
  3053. 'fields' => array(
  3054. 'project_id' => array(
  3055. // 'description' => 'TODO: please describe this field!',
  3056. 'type' => 'serial',
  3057. 'not null' => '1',
  3058. ),
  3059. 'name' => array(
  3060. // 'description' => 'TODO: please describe this field!',
  3061. 'type' => 'varchar',
  3062. 'length' => '255',
  3063. 'not null' => '1',
  3064. ),
  3065. 'description' => array(
  3066. // 'description' => 'TODO: please describe this field!',
  3067. 'type' => 'varchar',
  3068. 'length' => '255',
  3069. 'not null' => '1',
  3070. ),
  3071. ),
  3072. 'primary key' => array(
  3073. '0' => 'project_id',
  3074. ),
  3075. 'unique keys' => array(
  3076. 'project_c1' => array(
  3077. '0' => 'name',
  3078. ),
  3079. ),
  3080. 'indexes' => array(
  3081. ),
  3082. 'foreign keys' => array(
  3083. ),
  3084. );
  3085. return $description;
  3086. }
  3087. /****************************************************************************
  3088. * Implements hook_protein_coding_gene_schema()
  3089. * Purpose: To describe the structure of protein_coding_gene to tripal
  3090. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3091. * @see tripal_core.api.inc: tripal_core_chado_update()
  3092. * @see tripal_core.api.inc: tripal_core_chado_select()
  3093. *
  3094. * @return
  3095. * An array describing the current table
  3096. */
  3097. function tripal_core_chado_protein_coding_gene_schema () {
  3098. $description = array();
  3099. $description = array(
  3100. 'table' => 'protein_coding_gene',
  3101. // 'description' => 'TODO: please describe this table!',
  3102. 'fields' => array(
  3103. 'feature_id' => array(
  3104. // 'description' => 'TODO: please describe this field!',
  3105. 'type' => 'int',
  3106. 'not null' => '',
  3107. ),
  3108. 'dbxref_id' => array(
  3109. // 'description' => 'TODO: please describe this field!',
  3110. 'type' => 'int',
  3111. 'not null' => '',
  3112. ),
  3113. 'organism_id' => array(
  3114. // 'description' => 'TODO: please describe this field!',
  3115. 'type' => 'int',
  3116. 'not null' => '',
  3117. ),
  3118. 'name' => array(
  3119. // 'description' => 'TODO: please describe this field!',
  3120. 'type' => 'varchar',
  3121. 'length' => '255',
  3122. 'not null' => '',
  3123. ),
  3124. 'uniquename' => array(
  3125. // 'description' => 'TODO: please describe this field!',
  3126. 'type' => 'text',
  3127. 'not null' => '',
  3128. ),
  3129. 'residues' => array(
  3130. // 'description' => 'TODO: please describe this field!',
  3131. 'type' => 'text',
  3132. 'not null' => '',
  3133. ),
  3134. 'seqlen' => array(
  3135. // 'description' => 'TODO: please describe this field!',
  3136. 'type' => 'int',
  3137. 'not null' => '',
  3138. ),
  3139. 'md5checksum' => array(
  3140. // 'description' => 'TODO: please describe this field!',
  3141. 'type' => 'char',
  3142. 'length' => '32',
  3143. 'not null' => '',
  3144. ),
  3145. 'type_id' => array(
  3146. // 'description' => 'TODO: please describe this field!',
  3147. 'type' => 'int',
  3148. 'not null' => '',
  3149. ),
  3150. 'is_analysis' => array(
  3151. // 'description' => 'TODO: please describe this field!',
  3152. 'type' => 'boolean',
  3153. 'not null' => '',
  3154. ),
  3155. 'is_obsolete' => array(
  3156. // 'description' => 'TODO: please describe this field!',
  3157. 'type' => 'boolean',
  3158. 'not null' => '',
  3159. ),
  3160. 'timeaccessioned' => array(
  3161. // 'description' => 'TODO: please describe this field!',
  3162. 'type' => 'datetime',
  3163. 'not null' => '',
  3164. ),
  3165. 'timelastmodified' => array(
  3166. // 'description' => 'TODO: please describe this field!',
  3167. 'type' => 'datetime',
  3168. 'not null' => '',
  3169. ),
  3170. ),
  3171. 'primary key' => array(
  3172. ),
  3173. 'unique keys' => array(
  3174. ),
  3175. 'indexes' => array(
  3176. ),
  3177. 'foreign keys' => array(
  3178. ),
  3179. );
  3180. return $description;
  3181. }
  3182. /****************************************************************************
  3183. * Implements hook_studyfactorvalue_schema()
  3184. * Purpose: To describe the structure of studyfactorvalue to tripal
  3185. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3186. * @see tripal_core.api.inc: tripal_core_chado_update()
  3187. * @see tripal_core.api.inc: tripal_core_chado_select()
  3188. *
  3189. * @return
  3190. * An array describing the current table
  3191. */
  3192. function tripal_core_chado_studyfactorvalue_schema () {
  3193. $description = array();
  3194. $description = array(
  3195. 'table' => 'studyfactorvalue',
  3196. // 'description' => 'TODO: please describe this table!',
  3197. 'fields' => array(
  3198. 'studyfactorvalue_id' => array(
  3199. // 'description' => 'TODO: please describe this field!',
  3200. 'type' => 'serial',
  3201. 'not null' => '1',
  3202. ),
  3203. 'studyfactor_id' => array(
  3204. // 'description' => 'TODO: please describe this field!',
  3205. 'type' => 'int',
  3206. 'not null' => '1',
  3207. ),
  3208. 'assay_id' => array(
  3209. // 'description' => 'TODO: please describe this field!',
  3210. 'type' => 'int',
  3211. 'not null' => '1',
  3212. ),
  3213. 'factorvalue' => array(
  3214. // 'description' => 'TODO: please describe this field!',
  3215. 'type' => 'text',
  3216. 'not null' => '',
  3217. ),
  3218. 'name' => array(
  3219. // 'description' => 'TODO: please describe this field!',
  3220. 'type' => 'text',
  3221. 'not null' => '',
  3222. ),
  3223. 'rank' => array(
  3224. // 'description' => 'TODO: please describe this field!',
  3225. 'type' => 'int',
  3226. 'not null' => '1',
  3227. 'default' => '0',
  3228. ),
  3229. ),
  3230. 'primary key' => array(
  3231. '0' => 'studyfactorvalue_id',
  3232. ),
  3233. 'unique keys' => array(
  3234. ),
  3235. 'indexes' => array(
  3236. 'studyfactorvalue_idx1' => array(
  3237. '0' => 'studyfactor_id',
  3238. ),
  3239. 'studyfactorvalue_idx2' => array(
  3240. '0' => 'assay_id',
  3241. ),
  3242. ),
  3243. 'foreign keys' => array(
  3244. ),
  3245. );
  3246. return $description;
  3247. }
  3248. /****************************************************************************
  3249. * Implements hook_studyfactor_schema()
  3250. * Purpose: To describe the structure of studyfactor to tripal
  3251. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3252. * @see tripal_core.api.inc: tripal_core_chado_update()
  3253. * @see tripal_core.api.inc: tripal_core_chado_select()
  3254. *
  3255. * @return
  3256. * An array describing the current table
  3257. */
  3258. function tripal_core_chado_studyfactor_schema () {
  3259. $description = array();
  3260. $description = array(
  3261. 'table' => 'studyfactor',
  3262. // 'description' => 'TODO: please describe this table!',
  3263. 'fields' => array(
  3264. 'studyfactor_id' => array(
  3265. // 'description' => 'TODO: please describe this field!',
  3266. 'type' => 'serial',
  3267. 'not null' => '1',
  3268. ),
  3269. 'studydesign_id' => array(
  3270. // 'description' => 'TODO: please describe this field!',
  3271. 'type' => 'int',
  3272. 'not null' => '1',
  3273. ),
  3274. 'type_id' => array(
  3275. // 'description' => 'TODO: please describe this field!',
  3276. 'type' => 'int',
  3277. 'not null' => '',
  3278. ),
  3279. 'name' => array(
  3280. // 'description' => 'TODO: please describe this field!',
  3281. 'type' => 'text',
  3282. 'not null' => '1',
  3283. ),
  3284. 'description' => array(
  3285. // 'description' => 'TODO: please describe this field!',
  3286. 'type' => 'text',
  3287. 'not null' => '',
  3288. ),
  3289. ),
  3290. 'primary key' => array(
  3291. '0' => 'studyfactor_id',
  3292. ),
  3293. 'unique keys' => array(
  3294. ),
  3295. 'indexes' => array(
  3296. 'studyfactor_idx1' => array(
  3297. '0' => 'studydesign_id',
  3298. ),
  3299. 'studyfactor_idx2' => array(
  3300. '0' => 'type_id',
  3301. ),
  3302. ),
  3303. 'foreign keys' => array(
  3304. ),
  3305. );
  3306. return $description;
  3307. }
  3308. /****************************************************************************
  3309. * Implements hook_studyprop_schema()
  3310. * Purpose: To describe the structure of studyprop to tripal
  3311. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3312. * @see tripal_core.api.inc: tripal_core_chado_update()
  3313. * @see tripal_core.api.inc: tripal_core_chado_select()
  3314. *
  3315. * @return
  3316. * An array describing the current table
  3317. */
  3318. function tripal_core_chado_studyprop_schema () {
  3319. $description = array();
  3320. $description = array(
  3321. 'table' => 'studyprop',
  3322. // 'description' => 'TODO: please describe this table!',
  3323. 'fields' => array(
  3324. 'studyprop_id' => array(
  3325. // 'description' => 'TODO: please describe this field!',
  3326. 'type' => 'serial',
  3327. 'not null' => '1',
  3328. ),
  3329. 'study_id' => array(
  3330. // 'description' => 'TODO: please describe this field!',
  3331. 'type' => 'int',
  3332. 'not null' => '1',
  3333. ),
  3334. 'type_id' => array(
  3335. // 'description' => 'TODO: please describe this field!',
  3336. 'type' => 'int',
  3337. 'not null' => '1',
  3338. ),
  3339. 'value' => array(
  3340. // 'description' => 'TODO: please describe this field!',
  3341. 'type' => 'text',
  3342. 'not null' => '',
  3343. ),
  3344. 'rank' => array(
  3345. // 'description' => 'TODO: please describe this field!',
  3346. 'type' => 'int',
  3347. 'not null' => '1',
  3348. 'default' => '0',
  3349. ),
  3350. ),
  3351. 'primary key' => array(
  3352. '0' => 'studyprop_id',
  3353. ),
  3354. 'unique keys' => array(
  3355. 'study_id' => array(
  3356. '0' => 'study_id',
  3357. '1' => 'type_id',
  3358. '2' => 'rank',
  3359. ),
  3360. ),
  3361. 'indexes' => array(
  3362. 'studyprop_idx1' => array(
  3363. '0' => 'study_id',
  3364. ),
  3365. 'studyprop_idx2' => array(
  3366. '0' => 'type_id',
  3367. ),
  3368. ),
  3369. 'foreign keys' => array(
  3370. ),
  3371. );
  3372. return $description;
  3373. }
  3374. /****************************************************************************
  3375. * Implements hook_studyprop_feature_schema()
  3376. * Purpose: To describe the structure of studyprop_feature to tripal
  3377. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3378. * @see tripal_core.api.inc: tripal_core_chado_update()
  3379. * @see tripal_core.api.inc: tripal_core_chado_select()
  3380. *
  3381. * @return
  3382. * An array describing the current table
  3383. */
  3384. function tripal_core_chado_studyprop_feature_schema () {
  3385. $description = array();
  3386. $description = array(
  3387. 'table' => 'studyprop_feature',
  3388. // 'description' => 'TODO: please describe this table!',
  3389. 'fields' => array(
  3390. 'studyprop_feature_id' => array(
  3391. // 'description' => 'TODO: please describe this field!',
  3392. 'type' => 'serial',
  3393. 'not null' => '1',
  3394. ),
  3395. 'studyprop_id' => array(
  3396. // 'description' => 'TODO: please describe this field!',
  3397. 'type' => 'int',
  3398. 'not null' => '1',
  3399. ),
  3400. 'feature_id' => array(
  3401. // 'description' => 'TODO: please describe this field!',
  3402. 'type' => 'int',
  3403. 'not null' => '1',
  3404. ),
  3405. 'type_id' => array(
  3406. // 'description' => 'TODO: please describe this field!',
  3407. 'type' => 'int',
  3408. 'not null' => '',
  3409. ),
  3410. ),
  3411. 'primary key' => array(
  3412. '0' => 'studyprop_feature_id',
  3413. ),
  3414. 'unique keys' => array(
  3415. 'studyprop_id' => array(
  3416. '0' => 'studyprop_id',
  3417. '1' => 'feature_id',
  3418. ),
  3419. ),
  3420. 'indexes' => array(
  3421. 'studyprop_feature_idx1' => array(
  3422. '0' => 'studyprop_id',
  3423. ),
  3424. 'studyprop_feature_idx2' => array(
  3425. '0' => 'feature_id',
  3426. ),
  3427. ),
  3428. 'foreign keys' => array(
  3429. ),
  3430. );
  3431. return $description;
  3432. }
  3433. /****************************************************************************
  3434. * Implements hook_synonym_schema()
  3435. * Purpose: To describe the structure of synonym to tripal
  3436. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3437. * @see tripal_core.api.inc: tripal_core_chado_update()
  3438. * @see tripal_core.api.inc: tripal_core_chado_select()
  3439. *
  3440. * @return
  3441. * An array describing the current table
  3442. */
  3443. function tripal_core_chado_synonym_schema () {
  3444. $description = array();
  3445. $description = array(
  3446. 'table' => 'synonym',
  3447. // 'description' => 'TODO: please describe this table!',
  3448. 'fields' => array(
  3449. 'synonym_id' => array(
  3450. // 'description' => 'TODO: please describe this field!',
  3451. 'type' => 'serial',
  3452. 'not null' => '1',
  3453. ),
  3454. 'name' => array(
  3455. // 'description' => 'TODO: please describe this field!',
  3456. 'type' => 'varchar',
  3457. 'length' => '255',
  3458. 'not null' => '1',
  3459. ),
  3460. 'type_id' => array(
  3461. // 'description' => 'TODO: please describe this field!',
  3462. 'type' => 'int',
  3463. 'not null' => '1',
  3464. ),
  3465. 'synonym_sgml' => array(
  3466. // 'description' => 'TODO: please describe this field!',
  3467. 'type' => 'varchar',
  3468. 'length' => '255',
  3469. 'not null' => '1',
  3470. ),
  3471. ),
  3472. 'primary key' => array(
  3473. '0' => 'synonym_id',
  3474. ),
  3475. 'unique keys' => array(
  3476. 'synonym_c1' => array(
  3477. '0' => 'name',
  3478. '1' => 'type_id',
  3479. ),
  3480. ),
  3481. 'indexes' => array(
  3482. 'synonym_idx1' => array(
  3483. '0' => 'type_id',
  3484. ),
  3485. ),
  3486. 'foreign keys' => array(
  3487. ),
  3488. );
  3489. return $description;
  3490. }
  3491. /****************************************************************************
  3492. * Implements hook_studydesignprop_schema()
  3493. * Purpose: To describe the structure of studydesignprop to tripal
  3494. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3495. * @see tripal_core.api.inc: tripal_core_chado_update()
  3496. * @see tripal_core.api.inc: tripal_core_chado_select()
  3497. *
  3498. * @return
  3499. * An array describing the current table
  3500. */
  3501. function tripal_core_chado_studydesignprop_schema () {
  3502. $description = array();
  3503. $description = array(
  3504. 'table' => 'studydesignprop',
  3505. // 'description' => 'TODO: please describe this table!',
  3506. 'fields' => array(
  3507. 'studydesignprop_id' => array(
  3508. // 'description' => 'TODO: please describe this field!',
  3509. 'type' => 'serial',
  3510. 'not null' => '1',
  3511. ),
  3512. 'studydesign_id' => array(
  3513. // 'description' => 'TODO: please describe this field!',
  3514. 'type' => 'int',
  3515. 'not null' => '1',
  3516. ),
  3517. 'type_id' => array(
  3518. // 'description' => 'TODO: please describe this field!',
  3519. 'type' => 'int',
  3520. 'not null' => '1',
  3521. ),
  3522. 'value' => array(
  3523. // 'description' => 'TODO: please describe this field!',
  3524. 'type' => 'text',
  3525. 'not null' => '',
  3526. ),
  3527. 'rank' => array(
  3528. // 'description' => 'TODO: please describe this field!',
  3529. 'type' => 'int',
  3530. 'not null' => '1',
  3531. 'default' => '0',
  3532. ),
  3533. ),
  3534. 'primary key' => array(
  3535. '0' => 'studydesignprop_id',
  3536. ),
  3537. 'unique keys' => array(
  3538. 'studydesignprop_c1' => array(
  3539. '0' => 'studydesign_id',
  3540. '1' => 'type_id',
  3541. '2' => 'rank',
  3542. ),
  3543. ),
  3544. 'indexes' => array(
  3545. 'studydesignprop_idx1' => array(
  3546. '0' => 'studydesign_id',
  3547. ),
  3548. 'studydesignprop_idx2' => array(
  3549. '0' => 'type_id',
  3550. ),
  3551. ),
  3552. 'foreign keys' => array(
  3553. ),
  3554. );
  3555. return $description;
  3556. }
  3557. /****************************************************************************
  3558. * Implements hook_studydesign_schema()
  3559. * Purpose: To describe the structure of studydesign to tripal
  3560. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3561. * @see tripal_core.api.inc: tripal_core_chado_update()
  3562. * @see tripal_core.api.inc: tripal_core_chado_select()
  3563. *
  3564. * @return
  3565. * An array describing the current table
  3566. */
  3567. function tripal_core_chado_studydesign_schema () {
  3568. $description = array();
  3569. $description = array(
  3570. 'table' => 'studydesign',
  3571. // 'description' => 'TODO: please describe this table!',
  3572. 'fields' => array(
  3573. 'studydesign_id' => array(
  3574. // 'description' => 'TODO: please describe this field!',
  3575. 'type' => 'serial',
  3576. 'not null' => '1',
  3577. ),
  3578. 'study_id' => array(
  3579. // 'description' => 'TODO: please describe this field!',
  3580. 'type' => 'int',
  3581. 'not null' => '1',
  3582. ),
  3583. 'description' => array(
  3584. // 'description' => 'TODO: please describe this field!',
  3585. 'type' => 'text',
  3586. 'not null' => '',
  3587. ),
  3588. ),
  3589. 'primary key' => array(
  3590. '0' => 'studydesign_id',
  3591. ),
  3592. 'unique keys' => array(
  3593. ),
  3594. 'indexes' => array(
  3595. 'studydesign_idx1' => array(
  3596. '0' => 'study_id',
  3597. ),
  3598. ),
  3599. 'foreign keys' => array(
  3600. ),
  3601. );
  3602. return $description;
  3603. }
  3604. /****************************************************************************
  3605. * Implements hook_stockprop_schema()
  3606. * Purpose: To describe the structure of stockprop to tripal
  3607. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3608. * @see tripal_core.api.inc: tripal_core_chado_update()
  3609. * @see tripal_core.api.inc: tripal_core_chado_select()
  3610. *
  3611. * @return
  3612. * An array describing the current table
  3613. */
  3614. function tripal_core_chado_stockprop_schema () {
  3615. $description = array();
  3616. $description = array(
  3617. 'table' => 'stockprop',
  3618. // 'description' => 'TODO: please describe this table!',
  3619. 'fields' => array(
  3620. 'stockprop_id' => array(
  3621. // 'description' => 'TODO: please describe this field!',
  3622. 'type' => 'serial',
  3623. 'not null' => '1',
  3624. ),
  3625. 'stock_id' => array(
  3626. // 'description' => 'TODO: please describe this field!',
  3627. 'type' => 'int',
  3628. 'not null' => '1',
  3629. ),
  3630. 'type_id' => array(
  3631. // 'description' => 'TODO: please describe this field!',
  3632. 'type' => 'int',
  3633. 'not null' => '1',
  3634. ),
  3635. 'value' => array(
  3636. // 'description' => 'TODO: please describe this field!',
  3637. 'type' => 'text',
  3638. 'not null' => '',
  3639. ),
  3640. 'rank' => array(
  3641. // 'description' => 'TODO: please describe this field!',
  3642. 'type' => 'int',
  3643. 'not null' => '1',
  3644. 'default' => '0',
  3645. ),
  3646. ),
  3647. 'primary key' => array(
  3648. '0' => 'stockprop_id',
  3649. ),
  3650. 'unique keys' => array(
  3651. 'stockprop_c1' => array(
  3652. '0' => 'stock_id',
  3653. '1' => 'type_id',
  3654. '2' => 'rank',
  3655. ),
  3656. ),
  3657. 'indexes' => array(
  3658. 'stockprop_idx1' => array(
  3659. '0' => 'stock_id',
  3660. ),
  3661. 'stockprop_idx2' => array(
  3662. '0' => 'type_id',
  3663. ),
  3664. ),
  3665. 'foreign keys' => array(
  3666. ),
  3667. );
  3668. return $description;
  3669. }
  3670. /****************************************************************************
  3671. * Implements hook_stockprop_pub_schema()
  3672. * Purpose: To describe the structure of stockprop_pub to tripal
  3673. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3674. * @see tripal_core.api.inc: tripal_core_chado_update()
  3675. * @see tripal_core.api.inc: tripal_core_chado_select()
  3676. *
  3677. * @return
  3678. * An array describing the current table
  3679. */
  3680. function tripal_core_chado_stockprop_pub_schema () {
  3681. $description = array();
  3682. $description = array(
  3683. 'table' => 'stockprop_pub',
  3684. // 'description' => 'TODO: please describe this table!',
  3685. 'fields' => array(
  3686. 'stockprop_pub_id' => array(
  3687. // 'description' => 'TODO: please describe this field!',
  3688. 'type' => 'serial',
  3689. 'not null' => '1',
  3690. ),
  3691. 'stockprop_id' => array(
  3692. // 'description' => 'TODO: please describe this field!',
  3693. 'type' => 'int',
  3694. 'not null' => '1',
  3695. ),
  3696. 'pub_id' => array(
  3697. // 'description' => 'TODO: please describe this field!',
  3698. 'type' => 'int',
  3699. 'not null' => '1',
  3700. ),
  3701. ),
  3702. 'primary key' => array(
  3703. '0' => 'stockprop_pub_id',
  3704. ),
  3705. 'unique keys' => array(
  3706. 'stockprop_pub_c1' => array(
  3707. '0' => 'stockprop_id',
  3708. '1' => 'pub_id',
  3709. ),
  3710. ),
  3711. 'indexes' => array(
  3712. 'stockprop_pub_idx1' => array(
  3713. '0' => 'stockprop_id',
  3714. ),
  3715. 'stockprop_pub_idx2' => array(
  3716. '0' => 'pub_id',
  3717. ),
  3718. ),
  3719. 'foreign keys' => array(
  3720. ),
  3721. );
  3722. return $description;
  3723. }
  3724. /****************************************************************************
  3725. * Implements hook_study_schema()
  3726. * Purpose: To describe the structure of study to tripal
  3727. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3728. * @see tripal_core.api.inc: tripal_core_chado_update()
  3729. * @see tripal_core.api.inc: tripal_core_chado_select()
  3730. *
  3731. * @return
  3732. * An array describing the current table
  3733. */
  3734. function tripal_core_chado_study_schema () {
  3735. $description = array();
  3736. $description = array(
  3737. 'table' => 'study',
  3738. // 'description' => 'TODO: please describe this table!',
  3739. 'fields' => array(
  3740. 'study_id' => array(
  3741. // 'description' => 'TODO: please describe this field!',
  3742. 'type' => 'serial',
  3743. 'not null' => '1',
  3744. ),
  3745. 'contact_id' => array(
  3746. // 'description' => 'TODO: please describe this field!',
  3747. 'type' => 'int',
  3748. 'not null' => '1',
  3749. ),
  3750. 'pub_id' => array(
  3751. // 'description' => 'TODO: please describe this field!',
  3752. 'type' => 'int',
  3753. 'not null' => '',
  3754. ),
  3755. 'dbxref_id' => array(
  3756. // 'description' => 'TODO: please describe this field!',
  3757. 'type' => 'int',
  3758. 'not null' => '',
  3759. ),
  3760. 'name' => array(
  3761. // 'description' => 'TODO: please describe this field!',
  3762. 'type' => 'text',
  3763. 'not null' => '1',
  3764. ),
  3765. 'description' => array(
  3766. // 'description' => 'TODO: please describe this field!',
  3767. 'type' => 'text',
  3768. 'not null' => '',
  3769. ),
  3770. ),
  3771. 'primary key' => array(
  3772. '0' => 'study_id',
  3773. ),
  3774. 'unique keys' => array(
  3775. 'study_c1' => array(
  3776. '0' => 'name',
  3777. ),
  3778. ),
  3779. 'indexes' => array(
  3780. 'study_idx1' => array(
  3781. '0' => 'contact_id',
  3782. ),
  3783. 'study_idx2' => array(
  3784. '0' => 'pub_id',
  3785. ),
  3786. 'study_idx3' => array(
  3787. '0' => 'dbxref_id',
  3788. ),
  3789. ),
  3790. 'foreign keys' => array(
  3791. ),
  3792. );
  3793. return $description;
  3794. }
  3795. /****************************************************************************
  3796. * Implements hook_study_assay_schema()
  3797. * Purpose: To describe the structure of study_assay to tripal
  3798. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3799. * @see tripal_core.api.inc: tripal_core_chado_update()
  3800. * @see tripal_core.api.inc: tripal_core_chado_select()
  3801. *
  3802. * @return
  3803. * An array describing the current table
  3804. */
  3805. function tripal_core_chado_study_assay_schema () {
  3806. $description = array();
  3807. $description = array(
  3808. 'table' => 'study_assay',
  3809. // 'description' => 'TODO: please describe this table!',
  3810. 'fields' => array(
  3811. 'study_assay_id' => array(
  3812. // 'description' => 'TODO: please describe this field!',
  3813. 'type' => 'serial',
  3814. 'not null' => '1',
  3815. ),
  3816. 'study_id' => array(
  3817. // 'description' => 'TODO: please describe this field!',
  3818. 'type' => 'int',
  3819. 'not null' => '1',
  3820. ),
  3821. 'assay_id' => array(
  3822. // 'description' => 'TODO: please describe this field!',
  3823. 'type' => 'int',
  3824. 'not null' => '1',
  3825. ),
  3826. ),
  3827. 'primary key' => array(
  3828. '0' => 'study_assay_id',
  3829. ),
  3830. 'unique keys' => array(
  3831. 'study_assay_c1' => array(
  3832. '0' => 'study_id',
  3833. '1' => 'assay_id',
  3834. ),
  3835. ),
  3836. 'indexes' => array(
  3837. 'study_assay_idx1' => array(
  3838. '0' => 'study_id',
  3839. ),
  3840. 'study_assay_idx2' => array(
  3841. '0' => 'assay_id',
  3842. ),
  3843. ),
  3844. 'foreign keys' => array(
  3845. ),
  3846. );
  3847. return $description;
  3848. }
  3849. /****************************************************************************
  3850. * Implements hook_tableinfo_schema()
  3851. * Purpose: To describe the structure of tableinfo to tripal
  3852. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3853. * @see tripal_core.api.inc: tripal_core_chado_update()
  3854. * @see tripal_core.api.inc: tripal_core_chado_select()
  3855. *
  3856. * @return
  3857. * An array describing the current table
  3858. */
  3859. function tripal_core_chado_tableinfo_schema () {
  3860. $description = array();
  3861. $description = array(
  3862. 'table' => 'tableinfo',
  3863. // 'description' => 'TODO: please describe this table!',
  3864. 'fields' => array(
  3865. 'tableinfo_id' => array(
  3866. // 'description' => 'TODO: please describe this field!',
  3867. 'type' => 'serial',
  3868. 'not null' => '1',
  3869. ),
  3870. 'name' => array(
  3871. // 'description' => 'TODO: please describe this field!',
  3872. 'type' => 'varchar',
  3873. 'length' => '30',
  3874. 'not null' => '1',
  3875. ),
  3876. 'primary_key_column' => array(
  3877. // 'description' => 'TODO: please describe this field!',
  3878. 'type' => 'varchar',
  3879. 'length' => '30',
  3880. 'not null' => '',
  3881. ),
  3882. 'is_view' => array(
  3883. // 'description' => 'TODO: please describe this field!',
  3884. 'type' => 'int',
  3885. 'not null' => '1',
  3886. 'default' => '0',
  3887. ),
  3888. 'view_on_table_id' => array(
  3889. // 'description' => 'TODO: please describe this field!',
  3890. 'type' => 'int',
  3891. 'not null' => '',
  3892. ),
  3893. 'superclass_table_id' => array(
  3894. // 'description' => 'TODO: please describe this field!',
  3895. 'type' => 'int',
  3896. 'not null' => '',
  3897. ),
  3898. 'is_updateable' => array(
  3899. // 'description' => 'TODO: please describe this field!',
  3900. 'type' => 'int',
  3901. 'not null' => '1',
  3902. 'default' => '1',
  3903. ),
  3904. 'modification_date' => array(
  3905. // 'description' => 'TODO: please describe this field!',
  3906. 'type' => 'date',
  3907. 'not null' => '1',
  3908. 'default' => 'ow(',
  3909. ),
  3910. ),
  3911. 'primary key' => array(
  3912. '0' => 'tableinfo_id',
  3913. ),
  3914. 'unique keys' => array(
  3915. 'tableinfo_c1' => array(
  3916. '0' => 'name',
  3917. ),
  3918. ),
  3919. 'indexes' => array(
  3920. ),
  3921. 'foreign keys' => array(
  3922. ),
  3923. );
  3924. return $description;
  3925. }
  3926. /****************************************************************************
  3927. * Implements hook_treatment_schema()
  3928. * Purpose: To describe the structure of treatment to tripal
  3929. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3930. * @see tripal_core.api.inc: tripal_core_chado_update()
  3931. * @see tripal_core.api.inc: tripal_core_chado_select()
  3932. *
  3933. * @return
  3934. * An array describing the current table
  3935. */
  3936. function tripal_core_chado_treatment_schema () {
  3937. $description = array();
  3938. $description = array(
  3939. 'table' => 'treatment',
  3940. // 'description' => 'TODO: please describe this table!',
  3941. 'fields' => array(
  3942. 'treatment_id' => array(
  3943. // 'description' => 'TODO: please describe this field!',
  3944. 'type' => 'serial',
  3945. 'not null' => '1',
  3946. ),
  3947. 'rank' => array(
  3948. // 'description' => 'TODO: please describe this field!',
  3949. 'type' => 'int',
  3950. 'not null' => '1',
  3951. 'default' => '0',
  3952. ),
  3953. 'biomaterial_id' => array(
  3954. // 'description' => 'TODO: please describe this field!',
  3955. 'type' => 'int',
  3956. 'not null' => '1',
  3957. ),
  3958. 'type_id' => array(
  3959. // 'description' => 'TODO: please describe this field!',
  3960. 'type' => 'int',
  3961. 'not null' => '1',
  3962. ),
  3963. 'protocol_id' => array(
  3964. // 'description' => 'TODO: please describe this field!',
  3965. 'type' => 'int',
  3966. 'not null' => '',
  3967. ),
  3968. 'name' => array(
  3969. // 'description' => 'TODO: please describe this field!',
  3970. 'type' => 'text',
  3971. 'not null' => '',
  3972. ),
  3973. ),
  3974. 'primary key' => array(
  3975. '0' => 'treatment_id',
  3976. ),
  3977. 'unique keys' => array(
  3978. ),
  3979. 'indexes' => array(
  3980. 'treatment_idx1' => array(
  3981. '0' => 'biomaterial_id',
  3982. ),
  3983. 'treatment_idx2' => array(
  3984. '0' => 'type_id',
  3985. ),
  3986. 'treatment_idx3' => array(
  3987. '0' => 'protocol_id',
  3988. ),
  3989. ),
  3990. 'foreign keys' => array(
  3991. ),
  3992. );
  3993. return $description;
  3994. }
  3995. /****************************************************************************
  3996. * Implements hook_tripal_obo_schema()
  3997. * Purpose: To describe the structure of tripal_obo to tripal
  3998. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3999. * @see tripal_core.api.inc: tripal_core_chado_update()
  4000. * @see tripal_core.api.inc: tripal_core_chado_select()
  4001. *
  4002. * @return
  4003. * An array describing the current table
  4004. */
  4005. function tripal_core_chado_tripal_obo_schema () {
  4006. $description = array();
  4007. $description = array(
  4008. 'table' => 'tripal_obo',
  4009. // 'description' => 'TODO: please describe this table!',
  4010. 'fields' => array(
  4011. 'cv_id' => array(
  4012. // 'description' => 'TODO: please describe this field!',
  4013. 'type' => 'int',
  4014. 'unsigned' => '1',
  4015. 'not null' => '1',
  4016. 'default' => '0',
  4017. ),
  4018. 'file' => array(
  4019. // 'description' => 'TODO: please describe this field!',
  4020. 'type' => 'varchar',
  4021. 'length' => '1024',
  4022. 'not null' => '',
  4023. ),
  4024. 'url' => array(
  4025. // 'description' => 'TODO: please describe this field!',
  4026. 'type' => 'varchar',
  4027. 'length' => '1024',
  4028. 'not null' => '',
  4029. ),
  4030. ),
  4031. 'primary key' => array(
  4032. '0' => 'cv_id',
  4033. ),
  4034. 'unique keys' => array(
  4035. ),
  4036. 'indexes' => array(
  4037. 'cv_id' => array(
  4038. '0' => 'cv_id',
  4039. ),
  4040. ),
  4041. 'foreign keys' => array(
  4042. ),
  4043. );
  4044. return $description;
  4045. }
  4046. /****************************************************************************
  4047. * Implements hook_tripal_organism_views_common_name_schema()
  4048. * Purpose: To describe the structure of tripal_organism_views_common_name to tripal
  4049. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4050. * @see tripal_core.api.inc: tripal_core_chado_update()
  4051. * @see tripal_core.api.inc: tripal_core_chado_select()
  4052. *
  4053. * @return
  4054. * An array describing the current table
  4055. */
  4056. function tripal_core_chado_tripal_organism_views_common_name_schema () {
  4057. $description = array();
  4058. $description = array(
  4059. 'table' => 'tripal_organism_views_common_name',
  4060. // 'description' => 'TODO: please describe this table!',
  4061. 'fields' => array(
  4062. 'nid' => array(
  4063. // 'description' => 'TODO: please describe this field!',
  4064. 'type' => 'int',
  4065. 'unsigned' => '1',
  4066. 'not null' => '1',
  4067. 'default' => '0',
  4068. ),
  4069. 'common_name' => array(
  4070. // 'description' => 'TODO: please describe this field!',
  4071. 'type' => 'varchar',
  4072. 'length' => '255',
  4073. 'not null' => '1',
  4074. 'default' => 'NA',
  4075. ),
  4076. ),
  4077. 'primary key' => array(
  4078. ),
  4079. 'unique keys' => array(
  4080. ),
  4081. 'indexes' => array(
  4082. ),
  4083. 'foreign keys' => array(
  4084. ),
  4085. );
  4086. return $description;
  4087. }
  4088. /****************************************************************************
  4089. * Implements hook_type_feature_count_schema()
  4090. * Purpose: To describe the structure of type_feature_count to tripal
  4091. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4092. * @see tripal_core.api.inc: tripal_core_chado_update()
  4093. * @see tripal_core.api.inc: tripal_core_chado_select()
  4094. *
  4095. * @return
  4096. * An array describing the current table
  4097. */
  4098. function tripal_core_chado_type_feature_count_schema () {
  4099. $description = array();
  4100. $description = array(
  4101. 'table' => 'type_feature_count',
  4102. // 'description' => 'TODO: please describe this table!',
  4103. 'fields' => array(
  4104. 'type' => array(
  4105. // 'description' => 'TODO: please describe this field!',
  4106. 'type' => 'varchar',
  4107. 'length' => '1024',
  4108. 'not null' => '',
  4109. ),
  4110. 'num_features' => array(
  4111. // 'description' => 'TODO: please describe this field!',
  4112. 'type' => 'int',
  4113. 'size' => 'big',
  4114. 'not null' => '',
  4115. ),
  4116. ),
  4117. 'primary key' => array(
  4118. ),
  4119. 'unique keys' => array(
  4120. ),
  4121. 'indexes' => array(
  4122. ),
  4123. 'foreign keys' => array(
  4124. ),
  4125. );
  4126. return $description;
  4127. }
  4128. /****************************************************************************
  4129. * Implements hook_stockcollectionprop_schema()
  4130. * Purpose: To describe the structure of stockcollectionprop to tripal
  4131. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4132. * @see tripal_core.api.inc: tripal_core_chado_update()
  4133. * @see tripal_core.api.inc: tripal_core_chado_select()
  4134. *
  4135. * @return
  4136. * An array describing the current table
  4137. */
  4138. function tripal_core_chado_stockcollectionprop_schema () {
  4139. $description = array();
  4140. $description = array(
  4141. 'table' => 'stockcollectionprop',
  4142. // 'description' => 'TODO: please describe this table!',
  4143. 'fields' => array(
  4144. 'stockcollectionprop_id' => array(
  4145. // 'description' => 'TODO: please describe this field!',
  4146. 'type' => 'serial',
  4147. 'not null' => '1',
  4148. ),
  4149. 'stockcollection_id' => array(
  4150. // 'description' => 'TODO: please describe this field!',
  4151. 'type' => 'int',
  4152. 'not null' => '1',
  4153. ),
  4154. 'type_id' => array(
  4155. // 'description' => 'TODO: please describe this field!',
  4156. 'type' => 'int',
  4157. 'not null' => '1',
  4158. ),
  4159. 'value' => array(
  4160. // 'description' => 'TODO: please describe this field!',
  4161. 'type' => 'text',
  4162. 'not null' => '',
  4163. ),
  4164. 'rank' => array(
  4165. // 'description' => 'TODO: please describe this field!',
  4166. 'type' => 'int',
  4167. 'not null' => '1',
  4168. 'default' => '0',
  4169. ),
  4170. ),
  4171. 'primary key' => array(
  4172. '0' => 'stockcollectionprop_id',
  4173. ),
  4174. 'unique keys' => array(
  4175. 'stockcollectionprop_c1' => array(
  4176. '0' => 'stockcollection_id',
  4177. '1' => 'type_id',
  4178. '2' => 'rank',
  4179. ),
  4180. ),
  4181. 'indexes' => array(
  4182. 'stockcollectionprop_idx1' => array(
  4183. '0' => 'stockcollection_id',
  4184. ),
  4185. 'stockcollectionprop_idx2' => array(
  4186. '0' => 'type_id',
  4187. ),
  4188. ),
  4189. 'foreign keys' => array(
  4190. ),
  4191. );
  4192. return $description;
  4193. }
  4194. /****************************************************************************
  4195. * Implements hook_stockcollection_stock_schema()
  4196. * Purpose: To describe the structure of stockcollection_stock to tripal
  4197. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4198. * @see tripal_core.api.inc: tripal_core_chado_update()
  4199. * @see tripal_core.api.inc: tripal_core_chado_select()
  4200. *
  4201. * @return
  4202. * An array describing the current table
  4203. */
  4204. function tripal_core_chado_stockcollection_stock_schema () {
  4205. $description = array();
  4206. $description = array(
  4207. 'table' => 'stockcollection_stock',
  4208. // 'description' => 'TODO: please describe this table!',
  4209. 'fields' => array(
  4210. 'stockcollection_stock_id' => array(
  4211. // 'description' => 'TODO: please describe this field!',
  4212. 'type' => 'serial',
  4213. 'not null' => '1',
  4214. ),
  4215. 'stockcollection_id' => array(
  4216. // 'description' => 'TODO: please describe this field!',
  4217. 'type' => 'int',
  4218. 'not null' => '1',
  4219. ),
  4220. 'stock_id' => array(
  4221. // 'description' => 'TODO: please describe this field!',
  4222. 'type' => 'int',
  4223. 'not null' => '1',
  4224. ),
  4225. ),
  4226. 'primary key' => array(
  4227. '0' => 'stockcollection_stock_id',
  4228. ),
  4229. 'unique keys' => array(
  4230. 'stockcollection_stock_c1' => array(
  4231. '0' => 'stockcollection_id',
  4232. '1' => 'stock_id',
  4233. ),
  4234. ),
  4235. 'indexes' => array(
  4236. 'stockcollection_stock_idx1' => array(
  4237. '0' => 'stockcollection_id',
  4238. ),
  4239. 'stockcollection_stock_idx2' => array(
  4240. '0' => 'stock_id',
  4241. ),
  4242. ),
  4243. 'foreign keys' => array(
  4244. ),
  4245. );
  4246. return $description;
  4247. }
  4248. /****************************************************************************
  4249. * Implements hook_public_feature_schema()
  4250. * Purpose: To describe the structure of public_feature to tripal
  4251. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4252. * @see tripal_core.api.inc: tripal_core_chado_update()
  4253. * @see tripal_core.api.inc: tripal_core_chado_select()
  4254. *
  4255. * @return
  4256. * An array describing the current table
  4257. */
  4258. function tripal_core_chado_public_feature_schema () {
  4259. $description = array();
  4260. $description = array(
  4261. 'table' => 'public_feature',
  4262. // 'description' => 'TODO: please describe this table!',
  4263. 'fields' => array(
  4264. 'vid' => array(
  4265. // 'description' => 'TODO: please describe this field!',
  4266. 'type' => 'int',
  4267. 'unsigned' => '1',
  4268. 'not null' => '1',
  4269. 'default' => '0',
  4270. ),
  4271. 'nid' => array(
  4272. // 'description' => 'TODO: please describe this field!',
  4273. 'type' => 'int',
  4274. 'unsigned' => '1',
  4275. 'not null' => '1',
  4276. 'default' => '0',
  4277. ),
  4278. 'feature_id' => array(
  4279. // 'description' => 'TODO: please describe this field!',
  4280. 'type' => 'int',
  4281. 'not null' => '1',
  4282. 'default' => '0',
  4283. ),
  4284. 'sync_date' => array(
  4285. // 'description' => 'TODO: please describe this field!',
  4286. 'type' => 'int',
  4287. 'not null' => '',
  4288. ),
  4289. ),
  4290. 'primary key' => array(
  4291. '0' => 'nid',
  4292. ),
  4293. 'unique keys' => array(
  4294. 'nid_vid' => array(
  4295. '0' => 'nid',
  4296. '1' => 'vid',
  4297. ),
  4298. 'vid' => array(
  4299. '0' => 'vid',
  4300. ),
  4301. ),
  4302. 'indexes' => array(
  4303. 'feature_id' => array(
  4304. '0' => 'feature_id',
  4305. ),
  4306. ),
  4307. 'foreign keys' => array(
  4308. ),
  4309. );
  4310. return $description;
  4311. }
  4312. /****************************************************************************
  4313. * Implements hook_public_library_schema()
  4314. * Purpose: To describe the structure of public_library to tripal
  4315. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4316. * @see tripal_core.api.inc: tripal_core_chado_update()
  4317. * @see tripal_core.api.inc: tripal_core_chado_select()
  4318. *
  4319. * @return
  4320. * An array describing the current table
  4321. */
  4322. function tripal_core_chado_public_library_schema () {
  4323. $description = array();
  4324. $description = array(
  4325. 'table' => 'public_library',
  4326. // 'description' => 'TODO: please describe this table!',
  4327. 'fields' => array(
  4328. 'vid' => array(
  4329. // 'description' => 'TODO: please describe this field!',
  4330. 'type' => 'int',
  4331. 'unsigned' => '1',
  4332. 'not null' => '1',
  4333. 'default' => '0',
  4334. ),
  4335. 'nid' => array(
  4336. // 'description' => 'TODO: please describe this field!',
  4337. 'type' => 'int',
  4338. 'unsigned' => '1',
  4339. 'not null' => '1',
  4340. 'default' => '0',
  4341. ),
  4342. 'library_id' => array(
  4343. // 'description' => 'TODO: please describe this field!',
  4344. 'type' => 'int',
  4345. 'not null' => '1',
  4346. 'default' => '0',
  4347. ),
  4348. ),
  4349. 'primary key' => array(
  4350. '0' => 'nid',
  4351. ),
  4352. 'unique keys' => array(
  4353. 'nid_vid' => array(
  4354. '0' => 'nid',
  4355. '1' => 'vid',
  4356. ),
  4357. 'vid' => array(
  4358. '0' => 'vid',
  4359. ),
  4360. ),
  4361. 'indexes' => array(
  4362. 'library_id' => array(
  4363. '0' => 'library_id',
  4364. ),
  4365. ),
  4366. 'foreign keys' => array(
  4367. ),
  4368. );
  4369. return $description;
  4370. }
  4371. /****************************************************************************
  4372. * Implements hook_public_organism_schema()
  4373. * Purpose: To describe the structure of public_organism to tripal
  4374. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4375. * @see tripal_core.api.inc: tripal_core_chado_update()
  4376. * @see tripal_core.api.inc: tripal_core_chado_select()
  4377. *
  4378. * @return
  4379. * An array describing the current table
  4380. */
  4381. function tripal_core_chado_public_organism_schema () {
  4382. $description = array();
  4383. $description = array(
  4384. 'table' => 'public_organism',
  4385. // 'description' => 'TODO: please describe this table!',
  4386. 'fields' => array(
  4387. 'vid' => array(
  4388. // 'description' => 'TODO: please describe this field!',
  4389. 'type' => 'int',
  4390. 'unsigned' => '1',
  4391. 'not null' => '1',
  4392. 'default' => '0',
  4393. ),
  4394. 'nid' => array(
  4395. // 'description' => 'TODO: please describe this field!',
  4396. 'type' => 'int',
  4397. 'unsigned' => '1',
  4398. 'not null' => '1',
  4399. 'default' => '0',
  4400. ),
  4401. 'organism_id' => array(
  4402. // 'description' => 'TODO: please describe this field!',
  4403. 'type' => 'int',
  4404. 'not null' => '1',
  4405. 'default' => '0',
  4406. ),
  4407. ),
  4408. 'primary key' => array(
  4409. '0' => 'nid',
  4410. ),
  4411. 'unique keys' => array(
  4412. 'nid_vid' => array(
  4413. '0' => 'nid',
  4414. '1' => 'vid',
  4415. ),
  4416. 'vid' => array(
  4417. '0' => 'vid',
  4418. ),
  4419. ),
  4420. 'indexes' => array(
  4421. 'organism_id' => array(
  4422. '0' => 'organism_id',
  4423. ),
  4424. ),
  4425. 'foreign keys' => array(
  4426. ),
  4427. );
  4428. return $description;
  4429. }
  4430. /****************************************************************************
  4431. * Implements hook_pubprop_schema()
  4432. * Purpose: To describe the structure of pubprop to tripal
  4433. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4434. * @see tripal_core.api.inc: tripal_core_chado_update()
  4435. * @see tripal_core.api.inc: tripal_core_chado_select()
  4436. *
  4437. * @return
  4438. * An array describing the current table
  4439. */
  4440. function tripal_core_chado_pubprop_schema () {
  4441. $description = array();
  4442. $description = array(
  4443. 'table' => 'pubprop',
  4444. // 'description' => 'TODO: please describe this table!',
  4445. 'fields' => array(
  4446. 'pubprop_id' => array(
  4447. // 'description' => 'TODO: please describe this field!',
  4448. 'type' => 'serial',
  4449. 'not null' => '1',
  4450. ),
  4451. 'pub_id' => array(
  4452. // 'description' => 'TODO: please describe this field!',
  4453. 'type' => 'int',
  4454. 'not null' => '1',
  4455. ),
  4456. 'type_id' => array(
  4457. // 'description' => 'TODO: please describe this field!',
  4458. 'type' => 'int',
  4459. 'not null' => '1',
  4460. ),
  4461. 'value' => array(
  4462. // 'description' => 'TODO: please describe this field!',
  4463. 'type' => 'text',
  4464. 'not null' => '1',
  4465. ),
  4466. 'rank' => array(
  4467. // 'description' => 'TODO: please describe this field!',
  4468. 'type' => 'int',
  4469. 'not null' => '',
  4470. ),
  4471. ),
  4472. 'primary key' => array(
  4473. '0' => 'pubprop_id',
  4474. ),
  4475. 'unique keys' => array(
  4476. 'pubprop_c1' => array(
  4477. '0' => 'pub_id',
  4478. '1' => 'type_id',
  4479. '2' => 'rank',
  4480. ),
  4481. ),
  4482. 'indexes' => array(
  4483. 'pubprop_idx1' => array(
  4484. '0' => 'pub_id',
  4485. ),
  4486. 'pubprop_idx2' => array(
  4487. '0' => 'type_id',
  4488. ),
  4489. ),
  4490. 'foreign keys' => array(
  4491. ),
  4492. );
  4493. return $description;
  4494. }
  4495. /****************************************************************************
  4496. * Implements hook_pubauthor_schema()
  4497. * Purpose: To describe the structure of pubauthor to tripal
  4498. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4499. * @see tripal_core.api.inc: tripal_core_chado_update()
  4500. * @see tripal_core.api.inc: tripal_core_chado_select()
  4501. *
  4502. * @return
  4503. * An array describing the current table
  4504. */
  4505. function tripal_core_chado_pubauthor_schema () {
  4506. $description = array();
  4507. $description = array(
  4508. 'table' => 'pubauthor',
  4509. // 'description' => 'TODO: please describe this table!',
  4510. 'fields' => array(
  4511. 'pubauthor_id' => array(
  4512. // 'description' => 'TODO: please describe this field!',
  4513. 'type' => 'serial',
  4514. 'not null' => '1',
  4515. ),
  4516. 'pub_id' => array(
  4517. // 'description' => 'TODO: please describe this field!',
  4518. 'type' => 'int',
  4519. 'not null' => '1',
  4520. ),
  4521. 'rank' => array(
  4522. // 'description' => 'TODO: please describe this field!',
  4523. 'type' => 'int',
  4524. 'not null' => '1',
  4525. ),
  4526. 'editor' => array(
  4527. // 'description' => 'TODO: please describe this field!',
  4528. 'type' => 'boolean',
  4529. 'not null' => '',
  4530. 'default' => 'als',
  4531. ),
  4532. 'surname' => array(
  4533. // 'description' => 'TODO: please describe this field!',
  4534. 'type' => 'varchar',
  4535. 'length' => '100',
  4536. 'not null' => '1',
  4537. ),
  4538. 'givennames' => array(
  4539. // 'description' => 'TODO: please describe this field!',
  4540. 'type' => 'varchar',
  4541. 'length' => '100',
  4542. 'not null' => '',
  4543. ),
  4544. 'suffix' => array(
  4545. // 'description' => 'TODO: please describe this field!',
  4546. 'type' => 'varchar',
  4547. 'length' => '100',
  4548. 'not null' => '',
  4549. ),
  4550. ),
  4551. 'primary key' => array(
  4552. '0' => 'pubauthor_id',
  4553. ),
  4554. 'unique keys' => array(
  4555. 'pubauthor_c1' => array(
  4556. '0' => 'pub_id',
  4557. '1' => 'rank',
  4558. ),
  4559. ),
  4560. 'indexes' => array(
  4561. 'pubauthor_idx2' => array(
  4562. '0' => 'pub_id',
  4563. ),
  4564. ),
  4565. 'foreign keys' => array(
  4566. ),
  4567. );
  4568. return $description;
  4569. }
  4570. /****************************************************************************
  4571. * Implements hook_pub_relationship_schema()
  4572. * Purpose: To describe the structure of pub_relationship to tripal
  4573. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4574. * @see tripal_core.api.inc: tripal_core_chado_update()
  4575. * @see tripal_core.api.inc: tripal_core_chado_select()
  4576. *
  4577. * @return
  4578. * An array describing the current table
  4579. */
  4580. function tripal_core_chado_pub_relationship_schema () {
  4581. $description = array();
  4582. $description = array(
  4583. 'table' => 'pub_relationship',
  4584. // 'description' => 'TODO: please describe this table!',
  4585. 'fields' => array(
  4586. 'pub_relationship_id' => array(
  4587. // 'description' => 'TODO: please describe this field!',
  4588. 'type' => 'serial',
  4589. 'not null' => '1',
  4590. ),
  4591. 'subject_id' => array(
  4592. // 'description' => 'TODO: please describe this field!',
  4593. 'type' => 'int',
  4594. 'not null' => '1',
  4595. ),
  4596. 'object_id' => array(
  4597. // 'description' => 'TODO: please describe this field!',
  4598. 'type' => 'int',
  4599. 'not null' => '1',
  4600. ),
  4601. 'type_id' => array(
  4602. // 'description' => 'TODO: please describe this field!',
  4603. 'type' => 'int',
  4604. 'not null' => '1',
  4605. ),
  4606. ),
  4607. 'primary key' => array(
  4608. '0' => 'pub_relationship_id',
  4609. ),
  4610. 'unique keys' => array(
  4611. 'pub_relationship_c1' => array(
  4612. '0' => 'subject_id',
  4613. '1' => 'object_id',
  4614. '2' => 'type_id',
  4615. ),
  4616. ),
  4617. 'indexes' => array(
  4618. 'pub_relationship_idx1' => array(
  4619. '0' => 'subject_id',
  4620. ),
  4621. 'pub_relationship_idx2' => array(
  4622. '0' => 'object_id',
  4623. ),
  4624. 'pub_relationship_idx3' => array(
  4625. '0' => 'type_id',
  4626. ),
  4627. ),
  4628. 'foreign keys' => array(
  4629. ),
  4630. );
  4631. return $description;
  4632. }
  4633. /****************************************************************************
  4634. * Implements hook_protocol_schema()
  4635. * Purpose: To describe the structure of protocol to tripal
  4636. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4637. * @see tripal_core.api.inc: tripal_core_chado_update()
  4638. * @see tripal_core.api.inc: tripal_core_chado_select()
  4639. *
  4640. * @return
  4641. * An array describing the current table
  4642. */
  4643. function tripal_core_chado_protocol_schema () {
  4644. $description = array();
  4645. $description = array(
  4646. 'table' => 'protocol',
  4647. // 'description' => 'TODO: please describe this table!',
  4648. 'fields' => array(
  4649. 'protocol_id' => array(
  4650. // 'description' => 'TODO: please describe this field!',
  4651. 'type' => 'serial',
  4652. 'not null' => '1',
  4653. ),
  4654. 'type_id' => array(
  4655. // 'description' => 'TODO: please describe this field!',
  4656. 'type' => 'int',
  4657. 'not null' => '1',
  4658. ),
  4659. 'pub_id' => array(
  4660. // 'description' => 'TODO: please describe this field!',
  4661. 'type' => 'int',
  4662. 'not null' => '',
  4663. ),
  4664. 'dbxref_id' => array(
  4665. // 'description' => 'TODO: please describe this field!',
  4666. 'type' => 'int',
  4667. 'not null' => '',
  4668. ),
  4669. 'name' => array(
  4670. // 'description' => 'TODO: please describe this field!',
  4671. 'type' => 'text',
  4672. 'not null' => '1',
  4673. ),
  4674. 'uri' => array(
  4675. // 'description' => 'TODO: please describe this field!',
  4676. 'type' => 'text',
  4677. 'not null' => '',
  4678. ),
  4679. 'protocoldescription' => array(
  4680. // 'description' => 'TODO: please describe this field!',
  4681. 'type' => 'text',
  4682. 'not null' => '',
  4683. ),
  4684. 'hardwaredescription' => array(
  4685. // 'description' => 'TODO: please describe this field!',
  4686. 'type' => 'text',
  4687. 'not null' => '',
  4688. ),
  4689. 'softwaredescription' => array(
  4690. // 'description' => 'TODO: please describe this field!',
  4691. 'type' => 'text',
  4692. 'not null' => '',
  4693. ),
  4694. ),
  4695. 'primary key' => array(
  4696. '0' => 'protocol_id',
  4697. ),
  4698. 'unique keys' => array(
  4699. 'protocol_c1' => array(
  4700. '0' => 'name',
  4701. ),
  4702. ),
  4703. 'indexes' => array(
  4704. 'protocol_idx1' => array(
  4705. '0' => 'type_id',
  4706. ),
  4707. 'protocol_idx2' => array(
  4708. '0' => 'pub_id',
  4709. ),
  4710. 'protocol_idx3' => array(
  4711. '0' => 'dbxref_id',
  4712. ),
  4713. ),
  4714. 'foreign keys' => array(
  4715. ),
  4716. );
  4717. return $description;
  4718. }
  4719. /****************************************************************************
  4720. * Implements hook_protocolparam_schema()
  4721. * Purpose: To describe the structure of protocolparam to tripal
  4722. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4723. * @see tripal_core.api.inc: tripal_core_chado_update()
  4724. * @see tripal_core.api.inc: tripal_core_chado_select()
  4725. *
  4726. * @return
  4727. * An array describing the current table
  4728. */
  4729. function tripal_core_chado_protocolparam_schema () {
  4730. $description = array();
  4731. $description = array(
  4732. 'table' => 'protocolparam',
  4733. // 'description' => 'TODO: please describe this table!',
  4734. 'fields' => array(
  4735. 'protocolparam_id' => array(
  4736. // 'description' => 'TODO: please describe this field!',
  4737. 'type' => 'serial',
  4738. 'not null' => '1',
  4739. ),
  4740. 'protocol_id' => array(
  4741. // 'description' => 'TODO: please describe this field!',
  4742. 'type' => 'int',
  4743. 'not null' => '1',
  4744. ),
  4745. 'name' => array(
  4746. // 'description' => 'TODO: please describe this field!',
  4747. 'type' => 'text',
  4748. 'not null' => '1',
  4749. ),
  4750. 'datatype_id' => array(
  4751. // 'description' => 'TODO: please describe this field!',
  4752. 'type' => 'int',
  4753. 'not null' => '',
  4754. ),
  4755. 'unittype_id' => array(
  4756. // 'description' => 'TODO: please describe this field!',
  4757. 'type' => 'int',
  4758. 'not null' => '',
  4759. ),
  4760. 'value' => array(
  4761. // 'description' => 'TODO: please describe this field!',
  4762. 'type' => 'text',
  4763. 'not null' => '',
  4764. ),
  4765. 'rank' => array(
  4766. // 'description' => 'TODO: please describe this field!',
  4767. 'type' => 'int',
  4768. 'not null' => '1',
  4769. 'default' => '0',
  4770. ),
  4771. ),
  4772. 'primary key' => array(
  4773. '0' => 'protocolparam_id',
  4774. ),
  4775. 'unique keys' => array(
  4776. ),
  4777. 'indexes' => array(
  4778. 'protocolparam_idx1' => array(
  4779. '0' => 'protocol_id',
  4780. ),
  4781. 'protocolparam_idx2' => array(
  4782. '0' => 'datatype_id',
  4783. ),
  4784. 'protocolparam_idx3' => array(
  4785. '0' => 'unittype_id',
  4786. ),
  4787. ),
  4788. 'foreign keys' => array(
  4789. ),
  4790. );
  4791. return $description;
  4792. }
  4793. /****************************************************************************
  4794. * Implements hook_pub_schema()
  4795. * Purpose: To describe the structure of pub to tripal
  4796. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4797. * @see tripal_core.api.inc: tripal_core_chado_update()
  4798. * @see tripal_core.api.inc: tripal_core_chado_select()
  4799. *
  4800. * @return
  4801. * An array describing the current table
  4802. */
  4803. function tripal_core_chado_pub_schema () {
  4804. $description = array();
  4805. $description = array(
  4806. 'table' => 'pub',
  4807. // 'description' => 'TODO: please describe this table!',
  4808. 'fields' => array(
  4809. 'pub_id' => array(
  4810. // 'description' => 'TODO: please describe this field!',
  4811. 'type' => 'serial',
  4812. 'not null' => '1',
  4813. ),
  4814. 'title' => array(
  4815. // 'description' => 'TODO: please describe this field!',
  4816. 'type' => 'text',
  4817. 'not null' => '',
  4818. ),
  4819. 'volumetitle' => array(
  4820. // 'description' => 'TODO: please describe this field!',
  4821. 'type' => 'text',
  4822. 'not null' => '',
  4823. ),
  4824. 'volume' => array(
  4825. // 'description' => 'TODO: please describe this field!',
  4826. 'type' => 'varchar',
  4827. 'length' => '255',
  4828. 'not null' => '',
  4829. ),
  4830. 'series_name' => array(
  4831. // 'description' => 'TODO: please describe this field!',
  4832. 'type' => 'varchar',
  4833. 'length' => '255',
  4834. 'not null' => '',
  4835. ),
  4836. 'issue' => array(
  4837. // 'description' => 'TODO: please describe this field!',
  4838. 'type' => 'varchar',
  4839. 'length' => '255',
  4840. 'not null' => '',
  4841. ),
  4842. 'pyear' => array(
  4843. // 'description' => 'TODO: please describe this field!',
  4844. 'type' => 'varchar',
  4845. 'length' => '255',
  4846. 'not null' => '',
  4847. ),
  4848. 'pages' => array(
  4849. // 'description' => 'TODO: please describe this field!',
  4850. 'type' => 'varchar',
  4851. 'length' => '255',
  4852. 'not null' => '',
  4853. ),
  4854. 'miniref' => array(
  4855. // 'description' => 'TODO: please describe this field!',
  4856. 'type' => 'varchar',
  4857. 'length' => '255',
  4858. 'not null' => '',
  4859. ),
  4860. 'uniquename' => array(
  4861. // 'description' => 'TODO: please describe this field!',
  4862. 'type' => 'text',
  4863. 'not null' => '1',
  4864. ),
  4865. 'type_id' => array(
  4866. // 'description' => 'TODO: please describe this field!',
  4867. 'type' => 'int',
  4868. 'not null' => '1',
  4869. ),
  4870. 'is_obsolete' => array(
  4871. // 'description' => 'TODO: please describe this field!',
  4872. 'type' => 'boolean',
  4873. 'not null' => '',
  4874. 'default' => 'als',
  4875. ),
  4876. 'publisher' => array(
  4877. // 'description' => 'TODO: please describe this field!',
  4878. 'type' => 'varchar',
  4879. 'length' => '255',
  4880. 'not null' => '',
  4881. ),
  4882. 'pubplace' => array(
  4883. // 'description' => 'TODO: please describe this field!',
  4884. 'type' => 'varchar',
  4885. 'length' => '255',
  4886. 'not null' => '',
  4887. ),
  4888. ),
  4889. 'primary key' => array(
  4890. '0' => 'pub_id',
  4891. ),
  4892. 'unique keys' => array(
  4893. 'pub_c1' => array(
  4894. '0' => 'uniquename',
  4895. ),
  4896. ),
  4897. 'indexes' => array(
  4898. 'pub_idx1' => array(
  4899. '0' => 'type_id',
  4900. ),
  4901. ),
  4902. 'foreign keys' => array(
  4903. ),
  4904. );
  4905. return $description;
  4906. }
  4907. /****************************************************************************
  4908. * Implements hook_pub_dbxref_schema()
  4909. * Purpose: To describe the structure of pub_dbxref to tripal
  4910. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4911. * @see tripal_core.api.inc: tripal_core_chado_update()
  4912. * @see tripal_core.api.inc: tripal_core_chado_select()
  4913. *
  4914. * @return
  4915. * An array describing the current table
  4916. */
  4917. function tripal_core_chado_pub_dbxref_schema () {
  4918. $description = array();
  4919. $description = array(
  4920. 'table' => 'pub_dbxref',
  4921. // 'description' => 'TODO: please describe this table!',
  4922. 'fields' => array(
  4923. 'pub_dbxref_id' => array(
  4924. // 'description' => 'TODO: please describe this field!',
  4925. 'type' => 'serial',
  4926. 'not null' => '1',
  4927. ),
  4928. 'pub_id' => array(
  4929. // 'description' => 'TODO: please describe this field!',
  4930. 'type' => 'int',
  4931. 'not null' => '1',
  4932. ),
  4933. 'dbxref_id' => array(
  4934. // 'description' => 'TODO: please describe this field!',
  4935. 'type' => 'int',
  4936. 'not null' => '1',
  4937. ),
  4938. 'is_current' => array(
  4939. // 'description' => 'TODO: please describe this field!',
  4940. 'type' => 'boolean',
  4941. 'not null' => '1',
  4942. 'default' => 'ru',
  4943. ),
  4944. ),
  4945. 'primary key' => array(
  4946. '0' => 'pub_dbxref_id',
  4947. ),
  4948. 'unique keys' => array(
  4949. 'pub_dbxref_c1' => array(
  4950. '0' => 'pub_id',
  4951. '1' => 'dbxref_id',
  4952. ),
  4953. ),
  4954. 'indexes' => array(
  4955. 'pub_dbxref_idx1' => array(
  4956. '0' => 'pub_id',
  4957. ),
  4958. 'pub_dbxref_idx2' => array(
  4959. '0' => 'dbxref_id',
  4960. ),
  4961. ),
  4962. 'foreign keys' => array(
  4963. ),
  4964. );
  4965. return $description;
  4966. }
  4967. /****************************************************************************
  4968. * Implements hook_quantification_schema()
  4969. * Purpose: To describe the structure of quantification to tripal
  4970. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4971. * @see tripal_core.api.inc: tripal_core_chado_update()
  4972. * @see tripal_core.api.inc: tripal_core_chado_select()
  4973. *
  4974. * @return
  4975. * An array describing the current table
  4976. */
  4977. function tripal_core_chado_quantification_schema () {
  4978. $description = array();
  4979. $description = array(
  4980. 'table' => 'quantification',
  4981. // 'description' => 'TODO: please describe this table!',
  4982. 'fields' => array(
  4983. 'quantification_id' => array(
  4984. // 'description' => 'TODO: please describe this field!',
  4985. 'type' => 'serial',
  4986. 'not null' => '1',
  4987. ),
  4988. 'acquisition_id' => array(
  4989. // 'description' => 'TODO: please describe this field!',
  4990. 'type' => 'int',
  4991. 'not null' => '1',
  4992. ),
  4993. 'operator_id' => array(
  4994. // 'description' => 'TODO: please describe this field!',
  4995. 'type' => 'int',
  4996. 'not null' => '',
  4997. ),
  4998. 'protocol_id' => array(
  4999. // 'description' => 'TODO: please describe this field!',
  5000. 'type' => 'int',
  5001. 'not null' => '',
  5002. ),
  5003. 'analysis_id' => array(
  5004. // 'description' => 'TODO: please describe this field!',
  5005. 'type' => 'int',
  5006. 'not null' => '1',
  5007. ),
  5008. 'quantificationdate' => array(
  5009. // 'description' => 'TODO: please describe this field!',
  5010. 'type' => 'datetime',
  5011. 'not null' => '',
  5012. 'default' => 'ow(',
  5013. ),
  5014. 'name' => array(
  5015. // 'description' => 'TODO: please describe this field!',
  5016. 'type' => 'text',
  5017. 'not null' => '',
  5018. ),
  5019. 'uri' => array(
  5020. // 'description' => 'TODO: please describe this field!',
  5021. 'type' => 'text',
  5022. 'not null' => '',
  5023. ),
  5024. ),
  5025. 'primary key' => array(
  5026. '0' => 'quantification_id',
  5027. ),
  5028. 'unique keys' => array(
  5029. 'quantification_c1' => array(
  5030. '0' => 'name',
  5031. '1' => 'analysis_id',
  5032. ),
  5033. ),
  5034. 'indexes' => array(
  5035. 'quantification_idx1' => array(
  5036. '0' => 'acquisition_id',
  5037. ),
  5038. 'quantification_idx2' => array(
  5039. '0' => 'operator_id',
  5040. ),
  5041. 'quantification_idx3' => array(
  5042. '0' => 'protocol_id',
  5043. ),
  5044. 'quantification_idx4' => array(
  5045. '0' => 'analysis_id',
  5046. ),
  5047. ),
  5048. 'foreign keys' => array(
  5049. ),
  5050. );
  5051. return $description;
  5052. }
  5053. /****************************************************************************
  5054. * Implements hook_quantification_relationship_schema()
  5055. * Purpose: To describe the structure of quantification_relationship to tripal
  5056. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5057. * @see tripal_core.api.inc: tripal_core_chado_update()
  5058. * @see tripal_core.api.inc: tripal_core_chado_select()
  5059. *
  5060. * @return
  5061. * An array describing the current table
  5062. */
  5063. function tripal_core_chado_quantification_relationship_schema () {
  5064. $description = array();
  5065. $description = array(
  5066. 'table' => 'quantification_relationship',
  5067. // 'description' => 'TODO: please describe this table!',
  5068. 'fields' => array(
  5069. 'quantification_relationship_id' => array(
  5070. // 'description' => 'TODO: please describe this field!',
  5071. 'type' => 'serial',
  5072. 'not null' => '1',
  5073. ),
  5074. 'subject_id' => array(
  5075. // 'description' => 'TODO: please describe this field!',
  5076. 'type' => 'int',
  5077. 'not null' => '1',
  5078. ),
  5079. 'type_id' => array(
  5080. // 'description' => 'TODO: please describe this field!',
  5081. 'type' => 'int',
  5082. 'not null' => '1',
  5083. ),
  5084. 'object_id' => array(
  5085. // 'description' => 'TODO: please describe this field!',
  5086. 'type' => 'int',
  5087. 'not null' => '1',
  5088. ),
  5089. ),
  5090. 'primary key' => array(
  5091. '0' => 'quantification_relationship_id',
  5092. ),
  5093. 'unique keys' => array(
  5094. 'quantification_relationship_c1' => array(
  5095. '0' => 'subject_id',
  5096. '1' => 'object_id',
  5097. '2' => 'type_id',
  5098. ),
  5099. ),
  5100. 'indexes' => array(
  5101. 'quantification_relationship_idx1' => array(
  5102. '0' => 'subject_id',
  5103. ),
  5104. 'quantification_relationship_idx2' => array(
  5105. '0' => 'type_id',
  5106. ),
  5107. 'quantification_relationship_idx3' => array(
  5108. '0' => 'object_id',
  5109. ),
  5110. ),
  5111. 'foreign keys' => array(
  5112. ),
  5113. );
  5114. return $description;
  5115. }
  5116. /****************************************************************************
  5117. * Implements hook_stock_pub_schema()
  5118. * Purpose: To describe the structure of stock_pub to tripal
  5119. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5120. * @see tripal_core.api.inc: tripal_core_chado_update()
  5121. * @see tripal_core.api.inc: tripal_core_chado_select()
  5122. *
  5123. * @return
  5124. * An array describing the current table
  5125. */
  5126. function tripal_core_chado_stock_pub_schema () {
  5127. $description = array();
  5128. $description = array(
  5129. 'table' => 'stock_pub',
  5130. // 'description' => 'TODO: please describe this table!',
  5131. 'fields' => array(
  5132. 'stock_pub_id' => array(
  5133. // 'description' => 'TODO: please describe this field!',
  5134. 'type' => 'serial',
  5135. 'not null' => '1',
  5136. ),
  5137. 'stock_id' => array(
  5138. // 'description' => 'TODO: please describe this field!',
  5139. 'type' => 'int',
  5140. 'not null' => '1',
  5141. ),
  5142. 'pub_id' => array(
  5143. // 'description' => 'TODO: please describe this field!',
  5144. 'type' => 'int',
  5145. 'not null' => '1',
  5146. ),
  5147. ),
  5148. 'primary key' => array(
  5149. '0' => 'stock_pub_id',
  5150. ),
  5151. 'unique keys' => array(
  5152. 'stock_pub_c1' => array(
  5153. '0' => 'stock_id',
  5154. '1' => 'pub_id',
  5155. ),
  5156. ),
  5157. 'indexes' => array(
  5158. 'stock_pub_idx1' => array(
  5159. '0' => 'stock_id',
  5160. ),
  5161. 'stock_pub_idx2' => array(
  5162. '0' => 'pub_id',
  5163. ),
  5164. ),
  5165. 'foreign keys' => array(
  5166. ),
  5167. );
  5168. return $description;
  5169. }
  5170. /****************************************************************************
  5171. * Implements hook_stock_relationship_schema()
  5172. * Purpose: To describe the structure of stock_relationship to tripal
  5173. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5174. * @see tripal_core.api.inc: tripal_core_chado_update()
  5175. * @see tripal_core.api.inc: tripal_core_chado_select()
  5176. *
  5177. * @return
  5178. * An array describing the current table
  5179. */
  5180. function tripal_core_chado_stock_relationship_schema () {
  5181. $description = array();
  5182. $description = array(
  5183. 'table' => 'stock_relationship',
  5184. // 'description' => 'TODO: please describe this table!',
  5185. 'fields' => array(
  5186. 'stock_relationship_id' => array(
  5187. // 'description' => 'TODO: please describe this field!',
  5188. 'type' => 'serial',
  5189. 'not null' => '1',
  5190. ),
  5191. 'subject_id' => array(
  5192. // 'description' => 'TODO: please describe this field!',
  5193. 'type' => 'int',
  5194. 'not null' => '1',
  5195. ),
  5196. 'object_id' => array(
  5197. // 'description' => 'TODO: please describe this field!',
  5198. 'type' => 'int',
  5199. 'not null' => '1',
  5200. ),
  5201. 'type_id' => array(
  5202. // 'description' => 'TODO: please describe this field!',
  5203. 'type' => 'int',
  5204. 'not null' => '1',
  5205. ),
  5206. 'value' => array(
  5207. // 'description' => 'TODO: please describe this field!',
  5208. 'type' => 'text',
  5209. 'not null' => '',
  5210. ),
  5211. 'rank' => array(
  5212. // 'description' => 'TODO: please describe this field!',
  5213. 'type' => 'int',
  5214. 'not null' => '1',
  5215. 'default' => '0',
  5216. ),
  5217. ),
  5218. 'primary key' => array(
  5219. '0' => 'stock_relationship_id',
  5220. ),
  5221. 'unique keys' => array(
  5222. 'stock_relationship_c1' => array(
  5223. '0' => 'subject_id',
  5224. '1' => 'object_id',
  5225. '2' => 'type_id',
  5226. '3' => 'rank',
  5227. ),
  5228. ),
  5229. 'indexes' => array(
  5230. 'stock_relationship_idx1' => array(
  5231. '0' => 'subject_id',
  5232. ),
  5233. 'stock_relationship_idx2' => array(
  5234. '0' => 'object_id',
  5235. ),
  5236. 'stock_relationship_idx3' => array(
  5237. '0' => 'type_id',
  5238. ),
  5239. ),
  5240. 'foreign keys' => array(
  5241. ),
  5242. );
  5243. return $description;
  5244. }
  5245. /****************************************************************************
  5246. * Implements hook_stock_relationship_pub_schema()
  5247. * Purpose: To describe the structure of stock_relationship_pub to tripal
  5248. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5249. * @see tripal_core.api.inc: tripal_core_chado_update()
  5250. * @see tripal_core.api.inc: tripal_core_chado_select()
  5251. *
  5252. * @return
  5253. * An array describing the current table
  5254. */
  5255. function tripal_core_chado_stock_relationship_pub_schema () {
  5256. $description = array();
  5257. $description = array(
  5258. 'table' => 'stock_relationship_pub',
  5259. // 'description' => 'TODO: please describe this table!',
  5260. 'fields' => array(
  5261. 'stock_relationship_pub_id' => array(
  5262. // 'description' => 'TODO: please describe this field!',
  5263. 'type' => 'serial',
  5264. 'not null' => '1',
  5265. ),
  5266. 'stock_relationship_id' => array(
  5267. // 'description' => 'TODO: please describe this field!',
  5268. 'type' => 'int',
  5269. 'not null' => '1',
  5270. ),
  5271. 'pub_id' => array(
  5272. // 'description' => 'TODO: please describe this field!',
  5273. 'type' => 'int',
  5274. 'not null' => '1',
  5275. ),
  5276. ),
  5277. 'primary key' => array(
  5278. '0' => 'stock_relationship_pub_id',
  5279. ),
  5280. 'unique keys' => array(
  5281. 'stock_relationship_pub_c1' => array(
  5282. '0' => 'stock_relationship_id',
  5283. '1' => 'pub_id',
  5284. ),
  5285. ),
  5286. 'indexes' => array(
  5287. 'stock_relationship_pub_idx1' => array(
  5288. '0' => 'stock_relationship_id',
  5289. ),
  5290. 'stock_relationship_pub_idx2' => array(
  5291. '0' => 'pub_id',
  5292. ),
  5293. ),
  5294. 'foreign keys' => array(
  5295. ),
  5296. );
  5297. return $description;
  5298. }
  5299. /****************************************************************************
  5300. * Implements hook_stockcollection_schema()
  5301. * Purpose: To describe the structure of stockcollection to tripal
  5302. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5303. * @see tripal_core.api.inc: tripal_core_chado_update()
  5304. * @see tripal_core.api.inc: tripal_core_chado_select()
  5305. *
  5306. * @return
  5307. * An array describing the current table
  5308. */
  5309. function tripal_core_chado_stockcollection_schema () {
  5310. $description = array();
  5311. $description = array(
  5312. 'table' => 'stockcollection',
  5313. // 'description' => 'TODO: please describe this table!',
  5314. 'fields' => array(
  5315. 'stockcollection_id' => array(
  5316. // 'description' => 'TODO: please describe this field!',
  5317. 'type' => 'serial',
  5318. 'not null' => '1',
  5319. ),
  5320. 'type_id' => array(
  5321. // 'description' => 'TODO: please describe this field!',
  5322. 'type' => 'int',
  5323. 'not null' => '1',
  5324. ),
  5325. 'contact_id' => array(
  5326. // 'description' => 'TODO: please describe this field!',
  5327. 'type' => 'int',
  5328. 'not null' => '',
  5329. ),
  5330. 'name' => array(
  5331. // 'description' => 'TODO: please describe this field!',
  5332. 'type' => 'varchar',
  5333. 'length' => '255',
  5334. 'not null' => '',
  5335. ),
  5336. 'uniquename' => array(
  5337. // 'description' => 'TODO: please describe this field!',
  5338. 'type' => 'text',
  5339. 'not null' => '1',
  5340. ),
  5341. ),
  5342. 'primary key' => array(
  5343. '0' => 'stockcollection_id',
  5344. ),
  5345. 'unique keys' => array(
  5346. 'stockcollection_c1' => array(
  5347. '0' => 'uniquename',
  5348. '1' => 'type_id',
  5349. ),
  5350. ),
  5351. 'indexes' => array(
  5352. 'stockcollection_idx1' => array(
  5353. '0' => 'contact_id',
  5354. ),
  5355. 'stockcollection_idx2' => array(
  5356. '0' => 'type_id',
  5357. ),
  5358. 'stockcollection_idx3' => array(
  5359. '0' => 'uniquename',
  5360. ),
  5361. 'stockcollection_name_ind1' => array(
  5362. '0' => 'name',
  5363. ),
  5364. ),
  5365. 'foreign keys' => array(
  5366. ),
  5367. );
  5368. return $description;
  5369. }
  5370. /****************************************************************************
  5371. * Implements hook_stock_genotype_schema()
  5372. * Purpose: To describe the structure of stock_genotype to tripal
  5373. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5374. * @see tripal_core.api.inc: tripal_core_chado_update()
  5375. * @see tripal_core.api.inc: tripal_core_chado_select()
  5376. *
  5377. * @return
  5378. * An array describing the current table
  5379. */
  5380. function tripal_core_chado_stock_genotype_schema () {
  5381. $description = array();
  5382. $description = array(
  5383. 'table' => 'stock_genotype',
  5384. // 'description' => 'TODO: please describe this table!',
  5385. 'fields' => array(
  5386. 'stock_genotype_id' => array(
  5387. // 'description' => 'TODO: please describe this field!',
  5388. 'type' => 'serial',
  5389. 'not null' => '1',
  5390. ),
  5391. 'stock_id' => array(
  5392. // 'description' => 'TODO: please describe this field!',
  5393. 'type' => 'int',
  5394. 'not null' => '1',
  5395. ),
  5396. 'genotype_id' => array(
  5397. // 'description' => 'TODO: please describe this field!',
  5398. 'type' => 'int',
  5399. 'not null' => '1',
  5400. ),
  5401. ),
  5402. 'primary key' => array(
  5403. '0' => 'stock_genotype_id',
  5404. ),
  5405. 'unique keys' => array(
  5406. 'stock_genotype_c1' => array(
  5407. '0' => 'stock_id',
  5408. '1' => 'genotype_id',
  5409. ),
  5410. ),
  5411. 'indexes' => array(
  5412. 'stock_genotype_idx1' => array(
  5413. '0' => 'stock_id',
  5414. ),
  5415. 'stock_genotype_idx2' => array(
  5416. '0' => 'genotype_id',
  5417. ),
  5418. ),
  5419. 'foreign keys' => array(
  5420. ),
  5421. );
  5422. return $description;
  5423. }
  5424. /****************************************************************************
  5425. * Implements hook_stock_dbxref_schema()
  5426. * Purpose: To describe the structure of stock_dbxref to tripal
  5427. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5428. * @see tripal_core.api.inc: tripal_core_chado_update()
  5429. * @see tripal_core.api.inc: tripal_core_chado_select()
  5430. *
  5431. * @return
  5432. * An array describing the current table
  5433. */
  5434. function tripal_core_chado_stock_dbxref_schema () {
  5435. $description = array();
  5436. $description = array(
  5437. 'table' => 'stock_dbxref',
  5438. // 'description' => 'TODO: please describe this table!',
  5439. 'fields' => array(
  5440. 'stock_dbxref_id' => array(
  5441. // 'description' => 'TODO: please describe this field!',
  5442. 'type' => 'serial',
  5443. 'not null' => '1',
  5444. ),
  5445. 'stock_id' => array(
  5446. // 'description' => 'TODO: please describe this field!',
  5447. 'type' => 'int',
  5448. 'not null' => '1',
  5449. ),
  5450. 'dbxref_id' => array(
  5451. // 'description' => 'TODO: please describe this field!',
  5452. 'type' => 'int',
  5453. 'not null' => '1',
  5454. ),
  5455. 'is_current' => array(
  5456. // 'description' => 'TODO: please describe this field!',
  5457. 'type' => 'boolean',
  5458. 'not null' => '1',
  5459. 'default' => 'ru',
  5460. ),
  5461. ),
  5462. 'primary key' => array(
  5463. '0' => 'stock_dbxref_id',
  5464. ),
  5465. 'unique keys' => array(
  5466. 'stock_dbxref_c1' => array(
  5467. '0' => 'stock_id',
  5468. '1' => 'dbxref_id',
  5469. ),
  5470. ),
  5471. 'indexes' => array(
  5472. 'stock_dbxref_idx1' => array(
  5473. '0' => 'stock_id',
  5474. ),
  5475. 'stock_dbxref_idx2' => array(
  5476. '0' => 'dbxref_id',
  5477. ),
  5478. ),
  5479. 'foreign keys' => array(
  5480. ),
  5481. );
  5482. return $description;
  5483. }
  5484. /****************************************************************************
  5485. * Implements hook_quantificationprop_schema()
  5486. * Purpose: To describe the structure of quantificationprop to tripal
  5487. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5488. * @see tripal_core.api.inc: tripal_core_chado_update()
  5489. * @see tripal_core.api.inc: tripal_core_chado_select()
  5490. *
  5491. * @return
  5492. * An array describing the current table
  5493. */
  5494. function tripal_core_chado_quantificationprop_schema () {
  5495. $description = array();
  5496. $description = array(
  5497. 'table' => 'quantificationprop',
  5498. // 'description' => 'TODO: please describe this table!',
  5499. 'fields' => array(
  5500. 'quantificationprop_id' => array(
  5501. // 'description' => 'TODO: please describe this field!',
  5502. 'type' => 'serial',
  5503. 'not null' => '1',
  5504. ),
  5505. 'quantification_id' => array(
  5506. // 'description' => 'TODO: please describe this field!',
  5507. 'type' => 'int',
  5508. 'not null' => '1',
  5509. ),
  5510. 'type_id' => array(
  5511. // 'description' => 'TODO: please describe this field!',
  5512. 'type' => 'int',
  5513. 'not null' => '1',
  5514. ),
  5515. 'value' => array(
  5516. // 'description' => 'TODO: please describe this field!',
  5517. 'type' => 'text',
  5518. 'not null' => '',
  5519. ),
  5520. 'rank' => array(
  5521. // 'description' => 'TODO: please describe this field!',
  5522. 'type' => 'int',
  5523. 'not null' => '1',
  5524. 'default' => '0',
  5525. ),
  5526. ),
  5527. 'primary key' => array(
  5528. '0' => 'quantificationprop_id',
  5529. ),
  5530. 'unique keys' => array(
  5531. 'quantificationprop_c1' => array(
  5532. '0' => 'quantification_id',
  5533. '1' => 'type_id',
  5534. '2' => 'rank',
  5535. ),
  5536. ),
  5537. 'indexes' => array(
  5538. 'quantificationprop_idx1' => array(
  5539. '0' => 'quantification_id',
  5540. ),
  5541. 'quantificationprop_idx2' => array(
  5542. '0' => 'type_id',
  5543. ),
  5544. ),
  5545. 'foreign keys' => array(
  5546. ),
  5547. );
  5548. return $description;
  5549. }
  5550. /****************************************************************************
  5551. * Implements hook_stats_paths_to_root_schema()
  5552. * Purpose: To describe the structure of stats_paths_to_root to tripal
  5553. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5554. * @see tripal_core.api.inc: tripal_core_chado_update()
  5555. * @see tripal_core.api.inc: tripal_core_chado_select()
  5556. *
  5557. * @return
  5558. * An array describing the current table
  5559. */
  5560. function tripal_core_chado_stats_paths_to_root_schema () {
  5561. $description = array();
  5562. $description = array(
  5563. 'table' => 'stats_paths_to_root',
  5564. // 'description' => 'TODO: please describe this table!',
  5565. 'fields' => array(
  5566. 'cvterm_id' => array(
  5567. // 'description' => 'TODO: please describe this field!',
  5568. 'type' => 'int',
  5569. 'not null' => '',
  5570. ),
  5571. 'total_paths' => array(
  5572. // 'description' => 'TODO: please describe this field!',
  5573. 'type' => 'int',
  5574. 'size' => 'big',
  5575. 'not null' => '',
  5576. ),
  5577. 'avg_distance' => array(
  5578. // 'description' => 'TODO: please describe this field!',
  5579. 'type' => 'numeric',
  5580. 'not null' => '',
  5581. 'precision' => '0',
  5582. 'scale' => '0',
  5583. ),
  5584. 'min_distance' => array(
  5585. // 'description' => 'TODO: please describe this field!',
  5586. 'type' => 'int',
  5587. 'not null' => '',
  5588. ),
  5589. 'max_distance' => array(
  5590. // 'description' => 'TODO: please describe this field!',
  5591. 'type' => 'int',
  5592. 'not null' => '',
  5593. ),
  5594. ),
  5595. 'primary key' => array(
  5596. ),
  5597. 'unique keys' => array(
  5598. ),
  5599. 'indexes' => array(
  5600. ),
  5601. 'foreign keys' => array(
  5602. ),
  5603. );
  5604. return $description;
  5605. }
  5606. /****************************************************************************
  5607. * Implements hook_stock_schema()
  5608. * Purpose: To describe the structure of stock to tripal
  5609. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5610. * @see tripal_core.api.inc: tripal_core_chado_update()
  5611. * @see tripal_core.api.inc: tripal_core_chado_select()
  5612. *
  5613. * @return
  5614. * An array describing the current table
  5615. */
  5616. function tripal_core_chado_stock_schema () {
  5617. $description = array();
  5618. $description = array(
  5619. 'table' => 'stock',
  5620. // 'description' => 'TODO: please describe this table!',
  5621. 'fields' => array(
  5622. 'stock_id' => array(
  5623. // 'description' => 'TODO: please describe this field!',
  5624. 'type' => 'serial',
  5625. 'not null' => '1',
  5626. ),
  5627. 'dbxref_id' => array(
  5628. // 'description' => 'TODO: please describe this field!',
  5629. 'type' => 'int',
  5630. 'not null' => '',
  5631. ),
  5632. 'organism_id' => array(
  5633. // 'description' => 'TODO: please describe this field!',
  5634. 'type' => 'int',
  5635. 'not null' => '1',
  5636. ),
  5637. 'name' => array(
  5638. // 'description' => 'TODO: please describe this field!',
  5639. 'type' => 'varchar',
  5640. 'length' => '255',
  5641. 'not null' => '',
  5642. ),
  5643. 'uniquename' => array(
  5644. // 'description' => 'TODO: please describe this field!',
  5645. 'type' => 'text',
  5646. 'not null' => '1',
  5647. ),
  5648. 'description' => array(
  5649. // 'description' => 'TODO: please describe this field!',
  5650. 'type' => 'text',
  5651. 'not null' => '',
  5652. ),
  5653. 'type_id' => array(
  5654. // 'description' => 'TODO: please describe this field!',
  5655. 'type' => 'int',
  5656. 'not null' => '1',
  5657. ),
  5658. 'is_obsolete' => array(
  5659. // 'description' => 'TODO: please describe this field!',
  5660. 'type' => 'boolean',
  5661. 'not null' => '1',
  5662. 'default' => 'als',
  5663. ),
  5664. ),
  5665. 'primary key' => array(
  5666. '0' => 'stock_id',
  5667. ),
  5668. 'unique keys' => array(
  5669. 'stock_c1' => array(
  5670. '0' => 'organism_id',
  5671. '1' => 'uniquename',
  5672. '2' => 'type_id',
  5673. ),
  5674. ),
  5675. 'indexes' => array(
  5676. 'stock_idx1' => array(
  5677. '0' => 'dbxref_id',
  5678. ),
  5679. 'stock_idx2' => array(
  5680. '0' => 'organism_id',
  5681. ),
  5682. 'stock_idx3' => array(
  5683. '0' => 'type_id',
  5684. ),
  5685. 'stock_idx4' => array(
  5686. '0' => 'uniquename',
  5687. ),
  5688. 'stock_name_ind1' => array(
  5689. '0' => 'name',
  5690. ),
  5691. ),
  5692. 'foreign keys' => array(
  5693. ),
  5694. );
  5695. return $description;
  5696. }
  5697. /****************************************************************************
  5698. * Implements hook_stock_cvterm_schema()
  5699. * Purpose: To describe the structure of stock_cvterm to tripal
  5700. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5701. * @see tripal_core.api.inc: tripal_core_chado_update()
  5702. * @see tripal_core.api.inc: tripal_core_chado_select()
  5703. *
  5704. * @return
  5705. * An array describing the current table
  5706. */
  5707. function tripal_core_chado_stock_cvterm_schema () {
  5708. $description = array();
  5709. $description = array(
  5710. 'table' => 'stock_cvterm',
  5711. // 'description' => 'TODO: please describe this table!',
  5712. 'fields' => array(
  5713. 'stock_cvterm_id' => array(
  5714. // 'description' => 'TODO: please describe this field!',
  5715. 'type' => 'serial',
  5716. 'not null' => '1',
  5717. ),
  5718. 'stock_id' => array(
  5719. // 'description' => 'TODO: please describe this field!',
  5720. 'type' => 'int',
  5721. 'not null' => '1',
  5722. ),
  5723. 'cvterm_id' => array(
  5724. // 'description' => 'TODO: please describe this field!',
  5725. 'type' => 'int',
  5726. 'not null' => '1',
  5727. ),
  5728. 'pub_id' => array(
  5729. // 'description' => 'TODO: please describe this field!',
  5730. 'type' => 'int',
  5731. 'not null' => '1',
  5732. ),
  5733. ),
  5734. 'primary key' => array(
  5735. '0' => 'stock_cvterm_id',
  5736. ),
  5737. 'unique keys' => array(
  5738. 'stock_cvterm_c1' => array(
  5739. '0' => 'stock_id',
  5740. '1' => 'cvterm_id',
  5741. '2' => 'pub_id',
  5742. ),
  5743. ),
  5744. 'indexes' => array(
  5745. 'stock_cvterm_idx1' => array(
  5746. '0' => 'stock_id',
  5747. ),
  5748. 'stock_cvterm_idx2' => array(
  5749. '0' => 'cvterm_id',
  5750. ),
  5751. 'stock_cvterm_idx3' => array(
  5752. '0' => 'pub_id',
  5753. ),
  5754. ),
  5755. 'foreign keys' => array(
  5756. ),
  5757. );
  5758. return $description;
  5759. }
  5760. /****************************************************************************
  5761. * Implements hook_feature_synonym_schema()
  5762. * Purpose: To describe the structure of feature_synonym to tripal
  5763. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5764. * @see tripal_core.api.inc: tripal_core_chado_update()
  5765. * @see tripal_core.api.inc: tripal_core_chado_select()
  5766. *
  5767. * @return
  5768. * An array describing the current table
  5769. */
  5770. function tripal_core_chado_feature_synonym_schema () {
  5771. $description = array();
  5772. $description = array(
  5773. 'table' => 'feature_synonym',
  5774. // 'description' => 'TODO: please describe this table!',
  5775. 'fields' => array(
  5776. 'feature_synonym_id' => array(
  5777. // 'description' => 'TODO: please describe this field!',
  5778. 'type' => 'serial',
  5779. 'not null' => '1',
  5780. ),
  5781. 'synonym_id' => array(
  5782. // 'description' => 'TODO: please describe this field!',
  5783. 'type' => 'int',
  5784. 'not null' => '1',
  5785. ),
  5786. 'feature_id' => array(
  5787. // 'description' => 'TODO: please describe this field!',
  5788. 'type' => 'int',
  5789. 'not null' => '1',
  5790. ),
  5791. 'pub_id' => array(
  5792. // 'description' => 'TODO: please describe this field!',
  5793. 'type' => 'int',
  5794. 'not null' => '1',
  5795. ),
  5796. 'is_current' => array(
  5797. // 'description' => 'TODO: please describe this field!',
  5798. 'type' => 'boolean',
  5799. 'not null' => '1',
  5800. 'default' => 'als',
  5801. ),
  5802. 'is_internal' => array(
  5803. // 'description' => 'TODO: please describe this field!',
  5804. 'type' => 'boolean',
  5805. 'not null' => '1',
  5806. 'default' => 'als',
  5807. ),
  5808. ),
  5809. 'primary key' => array(
  5810. '0' => 'feature_synonym_id',
  5811. ),
  5812. 'unique keys' => array(
  5813. 'feature_synonym_c1' => array(
  5814. '0' => 'synonym_id',
  5815. '1' => 'feature_id',
  5816. '2' => 'pub_id',
  5817. ),
  5818. ),
  5819. 'indexes' => array(
  5820. 'feature_synonym_idx1' => array(
  5821. '0' => 'synonym_id',
  5822. ),
  5823. 'feature_synonym_idx2' => array(
  5824. '0' => 'feature_id',
  5825. ),
  5826. 'feature_synonym_idx3' => array(
  5827. '0' => 'pub_id',
  5828. ),
  5829. ),
  5830. 'foreign keys' => array(
  5831. ),
  5832. );
  5833. return $description;
  5834. }
  5835. /****************************************************************************
  5836. * Implements hook_feature_relationshipprop_pub_schema()
  5837. * Purpose: To describe the structure of feature_relationshipprop_pub to tripal
  5838. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5839. * @see tripal_core.api.inc: tripal_core_chado_update()
  5840. * @see tripal_core.api.inc: tripal_core_chado_select()
  5841. *
  5842. * @return
  5843. * An array describing the current table
  5844. */
  5845. function tripal_core_chado_feature_relationshipprop_pub_schema () {
  5846. $description = array();
  5847. $description = array(
  5848. 'table' => 'feature_relationshipprop_pub',
  5849. // 'description' => 'TODO: please describe this table!',
  5850. 'fields' => array(
  5851. 'feature_relationshipprop_pub_id' => array(
  5852. // 'description' => 'TODO: please describe this field!',
  5853. 'type' => 'serial',
  5854. 'not null' => '1',
  5855. ),
  5856. 'feature_relationshipprop_id' => array(
  5857. // 'description' => 'TODO: please describe this field!',
  5858. 'type' => 'int',
  5859. 'not null' => '1',
  5860. ),
  5861. 'pub_id' => array(
  5862. // 'description' => 'TODO: please describe this field!',
  5863. 'type' => 'int',
  5864. 'not null' => '1',
  5865. ),
  5866. ),
  5867. 'primary key' => array(
  5868. '0' => 'feature_relationshipprop_pub_id',
  5869. ),
  5870. 'unique keys' => array(
  5871. 'feature_relationshipprop_pub_c1' => array(
  5872. '0' => 'feature_relationshipprop_id',
  5873. '1' => 'pub_id',
  5874. ),
  5875. ),
  5876. 'indexes' => array(
  5877. 'feature_relationshipprop_pub_idx1' => array(
  5878. '0' => 'feature_relationshipprop_id',
  5879. ),
  5880. 'feature_relationshipprop_pub_idx2' => array(
  5881. '0' => 'pub_id',
  5882. ),
  5883. ),
  5884. 'foreign keys' => array(
  5885. ),
  5886. );
  5887. return $description;
  5888. }
  5889. /****************************************************************************
  5890. * Implements hook_cell_line_relationship_schema()
  5891. * Purpose: To describe the structure of cell_line_relationship to tripal
  5892. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5893. * @see tripal_core.api.inc: tripal_core_chado_update()
  5894. * @see tripal_core.api.inc: tripal_core_chado_select()
  5895. *
  5896. * @return
  5897. * An array describing the current table
  5898. */
  5899. function tripal_core_chado_cell_line_relationship_schema () {
  5900. $description = array();
  5901. $description = array(
  5902. 'table' => 'cell_line_relationship',
  5903. // 'description' => 'TODO: please describe this table!',
  5904. 'fields' => array(
  5905. 'cell_line_relationship_id' => array(
  5906. // 'description' => 'TODO: please describe this field!',
  5907. 'type' => 'serial',
  5908. 'not null' => '1',
  5909. ),
  5910. 'subject_id' => array(
  5911. // 'description' => 'TODO: please describe this field!',
  5912. 'type' => 'int',
  5913. 'not null' => '1',
  5914. ),
  5915. 'object_id' => array(
  5916. // 'description' => 'TODO: please describe this field!',
  5917. 'type' => 'int',
  5918. 'not null' => '1',
  5919. ),
  5920. 'type_id' => array(
  5921. // 'description' => 'TODO: please describe this field!',
  5922. 'type' => 'int',
  5923. 'not null' => '1',
  5924. ),
  5925. ),
  5926. 'primary key' => array(
  5927. '0' => 'cell_line_relationship_id',
  5928. ),
  5929. 'unique keys' => array(
  5930. 'cell_line_relationship_c1' => array(
  5931. '0' => 'subject_id',
  5932. '1' => 'object_id',
  5933. '2' => 'type_id',
  5934. ),
  5935. ),
  5936. 'indexes' => array(
  5937. ),
  5938. 'foreign keys' => array(
  5939. ),
  5940. );
  5941. return $description;
  5942. }
  5943. /****************************************************************************
  5944. * Implements hook_cell_line_pub_schema()
  5945. * Purpose: To describe the structure of cell_line_pub to tripal
  5946. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5947. * @see tripal_core.api.inc: tripal_core_chado_update()
  5948. * @see tripal_core.api.inc: tripal_core_chado_select()
  5949. *
  5950. * @return
  5951. * An array describing the current table
  5952. */
  5953. function tripal_core_chado_cell_line_pub_schema () {
  5954. $description = array();
  5955. $description = array(
  5956. 'table' => 'cell_line_pub',
  5957. // 'description' => 'TODO: please describe this table!',
  5958. 'fields' => array(
  5959. 'cell_line_pub_id' => array(
  5960. // 'description' => 'TODO: please describe this field!',
  5961. 'type' => 'serial',
  5962. 'not null' => '1',
  5963. ),
  5964. 'cell_line_id' => array(
  5965. // 'description' => 'TODO: please describe this field!',
  5966. 'type' => 'int',
  5967. 'not null' => '1',
  5968. ),
  5969. 'pub_id' => array(
  5970. // 'description' => 'TODO: please describe this field!',
  5971. 'type' => 'int',
  5972. 'not null' => '1',
  5973. ),
  5974. ),
  5975. 'primary key' => array(
  5976. '0' => 'cell_line_pub_id',
  5977. ),
  5978. 'unique keys' => array(
  5979. 'cell_line_pub_c1' => array(
  5980. '0' => 'cell_line_id',
  5981. '1' => 'pub_id',
  5982. ),
  5983. ),
  5984. 'indexes' => array(
  5985. ),
  5986. 'foreign keys' => array(
  5987. ),
  5988. );
  5989. return $description;
  5990. }
  5991. /****************************************************************************
  5992. * Implements hook_cell_line_synonym_schema()
  5993. * Purpose: To describe the structure of cell_line_synonym to tripal
  5994. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5995. * @see tripal_core.api.inc: tripal_core_chado_update()
  5996. * @see tripal_core.api.inc: tripal_core_chado_select()
  5997. *
  5998. * @return
  5999. * An array describing the current table
  6000. */
  6001. function tripal_core_chado_cell_line_synonym_schema () {
  6002. $description = array();
  6003. $description = array(
  6004. 'table' => 'cell_line_synonym',
  6005. // 'description' => 'TODO: please describe this table!',
  6006. 'fields' => array(
  6007. 'cell_line_synonym_id' => array(
  6008. // 'description' => 'TODO: please describe this field!',
  6009. 'type' => 'serial',
  6010. 'not null' => '1',
  6011. ),
  6012. 'cell_line_id' => array(
  6013. // 'description' => 'TODO: please describe this field!',
  6014. 'type' => 'int',
  6015. 'not null' => '1',
  6016. ),
  6017. 'synonym_id' => array(
  6018. // 'description' => 'TODO: please describe this field!',
  6019. 'type' => 'int',
  6020. 'not null' => '1',
  6021. ),
  6022. 'pub_id' => array(
  6023. // 'description' => 'TODO: please describe this field!',
  6024. 'type' => 'int',
  6025. 'not null' => '1',
  6026. ),
  6027. 'is_current' => array(
  6028. // 'description' => 'TODO: please describe this field!',
  6029. 'type' => 'boolean',
  6030. 'not null' => '1',
  6031. 'default' => 'als',
  6032. ),
  6033. 'is_internal' => array(
  6034. // 'description' => 'TODO: please describe this field!',
  6035. 'type' => 'boolean',
  6036. 'not null' => '1',
  6037. 'default' => 'als',
  6038. ),
  6039. ),
  6040. 'primary key' => array(
  6041. '0' => 'cell_line_synonym_id',
  6042. ),
  6043. 'unique keys' => array(
  6044. 'cell_line_synonym_c1' => array(
  6045. '0' => 'synonym_id',
  6046. '1' => 'cell_line_id',
  6047. '2' => 'pub_id',
  6048. ),
  6049. ),
  6050. 'indexes' => array(
  6051. ),
  6052. 'foreign keys' => array(
  6053. ),
  6054. );
  6055. return $description;
  6056. }
  6057. /****************************************************************************
  6058. * Implements hook_cell_lineprop_schema()
  6059. * Purpose: To describe the structure of cell_lineprop to tripal
  6060. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6061. * @see tripal_core.api.inc: tripal_core_chado_update()
  6062. * @see tripal_core.api.inc: tripal_core_chado_select()
  6063. *
  6064. * @return
  6065. * An array describing the current table
  6066. */
  6067. function tripal_core_chado_cell_lineprop_schema () {
  6068. $description = array();
  6069. $description = array(
  6070. 'table' => 'cell_lineprop',
  6071. // 'description' => 'TODO: please describe this table!',
  6072. 'fields' => array(
  6073. 'cell_lineprop_id' => array(
  6074. // 'description' => 'TODO: please describe this field!',
  6075. 'type' => 'serial',
  6076. 'not null' => '1',
  6077. ),
  6078. 'cell_line_id' => array(
  6079. // 'description' => 'TODO: please describe this field!',
  6080. 'type' => 'int',
  6081. 'not null' => '1',
  6082. ),
  6083. 'type_id' => array(
  6084. // 'description' => 'TODO: please describe this field!',
  6085. 'type' => 'int',
  6086. 'not null' => '1',
  6087. ),
  6088. 'value' => array(
  6089. // 'description' => 'TODO: please describe this field!',
  6090. 'type' => 'text',
  6091. 'not null' => '',
  6092. ),
  6093. 'rank' => array(
  6094. // 'description' => 'TODO: please describe this field!',
  6095. 'type' => 'int',
  6096. 'not null' => '1',
  6097. 'default' => '0',
  6098. ),
  6099. ),
  6100. 'primary key' => array(
  6101. '0' => 'cell_lineprop_id',
  6102. ),
  6103. 'unique keys' => array(
  6104. 'cell_lineprop_c1' => array(
  6105. '0' => 'cell_line_id',
  6106. '1' => 'type_id',
  6107. '2' => 'rank',
  6108. ),
  6109. ),
  6110. 'indexes' => array(
  6111. ),
  6112. 'foreign keys' => array(
  6113. ),
  6114. );
  6115. return $description;
  6116. }
  6117. /****************************************************************************
  6118. * Implements hook_cell_lineprop_pub_schema()
  6119. * Purpose: To describe the structure of cell_lineprop_pub to tripal
  6120. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6121. * @see tripal_core.api.inc: tripal_core_chado_update()
  6122. * @see tripal_core.api.inc: tripal_core_chado_select()
  6123. *
  6124. * @return
  6125. * An array describing the current table
  6126. */
  6127. function tripal_core_chado_cell_lineprop_pub_schema () {
  6128. $description = array();
  6129. $description = array(
  6130. 'table' => 'cell_lineprop_pub',
  6131. // 'description' => 'TODO: please describe this table!',
  6132. 'fields' => array(
  6133. 'cell_lineprop_pub_id' => array(
  6134. // 'description' => 'TODO: please describe this field!',
  6135. 'type' => 'serial',
  6136. 'not null' => '1',
  6137. ),
  6138. 'cell_lineprop_id' => array(
  6139. // 'description' => 'TODO: please describe this field!',
  6140. 'type' => 'int',
  6141. 'not null' => '1',
  6142. ),
  6143. 'pub_id' => array(
  6144. // 'description' => 'TODO: please describe this field!',
  6145. 'type' => 'int',
  6146. 'not null' => '1',
  6147. ),
  6148. ),
  6149. 'primary key' => array(
  6150. '0' => 'cell_lineprop_pub_id',
  6151. ),
  6152. 'unique keys' => array(
  6153. 'cell_lineprop_pub_c1' => array(
  6154. '0' => 'cell_lineprop_id',
  6155. '1' => 'pub_id',
  6156. ),
  6157. ),
  6158. 'indexes' => array(
  6159. ),
  6160. 'foreign keys' => array(
  6161. ),
  6162. );
  6163. return $description;
  6164. }
  6165. /****************************************************************************
  6166. * Implements hook_cell_line_library_schema()
  6167. * Purpose: To describe the structure of cell_line_library to tripal
  6168. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6169. * @see tripal_core.api.inc: tripal_core_chado_update()
  6170. * @see tripal_core.api.inc: tripal_core_chado_select()
  6171. *
  6172. * @return
  6173. * An array describing the current table
  6174. */
  6175. function tripal_core_chado_cell_line_library_schema () {
  6176. $description = array();
  6177. $description = array(
  6178. 'table' => 'cell_line_library',
  6179. // 'description' => 'TODO: please describe this table!',
  6180. 'fields' => array(
  6181. 'cell_line_library_id' => array(
  6182. // 'description' => 'TODO: please describe this field!',
  6183. 'type' => 'serial',
  6184. 'not null' => '1',
  6185. ),
  6186. 'cell_line_id' => array(
  6187. // 'description' => 'TODO: please describe this field!',
  6188. 'type' => 'int',
  6189. 'not null' => '1',
  6190. ),
  6191. 'library_id' => array(
  6192. // 'description' => 'TODO: please describe this field!',
  6193. 'type' => 'int',
  6194. 'not null' => '1',
  6195. ),
  6196. 'pub_id' => array(
  6197. // 'description' => 'TODO: please describe this field!',
  6198. 'type' => 'int',
  6199. 'not null' => '1',
  6200. ),
  6201. ),
  6202. 'primary key' => array(
  6203. '0' => 'cell_line_library_id',
  6204. ),
  6205. 'unique keys' => array(
  6206. 'cell_line_library_c1' => array(
  6207. '0' => 'cell_line_id',
  6208. '1' => 'library_id',
  6209. '2' => 'pub_id',
  6210. ),
  6211. ),
  6212. 'indexes' => array(
  6213. ),
  6214. 'foreign keys' => array(
  6215. ),
  6216. );
  6217. return $description;
  6218. }
  6219. /****************************************************************************
  6220. * Implements hook_cell_line_feature_schema()
  6221. * Purpose: To describe the structure of cell_line_feature to tripal
  6222. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6223. * @see tripal_core.api.inc: tripal_core_chado_update()
  6224. * @see tripal_core.api.inc: tripal_core_chado_select()
  6225. *
  6226. * @return
  6227. * An array describing the current table
  6228. */
  6229. function tripal_core_chado_cell_line_feature_schema () {
  6230. $description = array();
  6231. $description = array(
  6232. 'table' => 'cell_line_feature',
  6233. // 'description' => 'TODO: please describe this table!',
  6234. 'fields' => array(
  6235. 'cell_line_feature_id' => array(
  6236. // 'description' => 'TODO: please describe this field!',
  6237. 'type' => 'serial',
  6238. 'not null' => '1',
  6239. ),
  6240. 'cell_line_id' => array(
  6241. // 'description' => 'TODO: please describe this field!',
  6242. 'type' => 'int',
  6243. 'not null' => '1',
  6244. ),
  6245. 'feature_id' => array(
  6246. // 'description' => 'TODO: please describe this field!',
  6247. 'type' => 'int',
  6248. 'not null' => '1',
  6249. ),
  6250. 'pub_id' => array(
  6251. // 'description' => 'TODO: please describe this field!',
  6252. 'type' => 'int',
  6253. 'not null' => '1',
  6254. ),
  6255. ),
  6256. 'primary key' => array(
  6257. '0' => 'cell_line_feature_id',
  6258. ),
  6259. 'unique keys' => array(
  6260. 'cell_line_feature_c1' => array(
  6261. '0' => 'cell_line_id',
  6262. '1' => 'feature_id',
  6263. '2' => 'pub_id',
  6264. ),
  6265. ),
  6266. 'indexes' => array(
  6267. ),
  6268. 'foreign keys' => array(
  6269. ),
  6270. );
  6271. return $description;
  6272. }
  6273. /****************************************************************************
  6274. * Implements hook_cell_line_schema()
  6275. * Purpose: To describe the structure of cell_line to tripal
  6276. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6277. * @see tripal_core.api.inc: tripal_core_chado_update()
  6278. * @see tripal_core.api.inc: tripal_core_chado_select()
  6279. *
  6280. * @return
  6281. * An array describing the current table
  6282. */
  6283. function tripal_core_chado_cell_line_schema () {
  6284. $description = array();
  6285. $description = array(
  6286. 'table' => 'cell_line',
  6287. // 'description' => 'TODO: please describe this table!',
  6288. 'fields' => array(
  6289. 'cell_line_id' => array(
  6290. // 'description' => 'TODO: please describe this field!',
  6291. 'type' => 'serial',
  6292. 'not null' => '1',
  6293. ),
  6294. 'name' => array(
  6295. // 'description' => 'TODO: please describe this field!',
  6296. 'type' => 'varchar',
  6297. 'length' => '255',
  6298. 'not null' => '',
  6299. ),
  6300. 'uniquename' => array(
  6301. // 'description' => 'TODO: please describe this field!',
  6302. 'type' => 'varchar',
  6303. 'length' => '255',
  6304. 'not null' => '1',
  6305. ),
  6306. 'organism_id' => array(
  6307. // 'description' => 'TODO: please describe this field!',
  6308. 'type' => 'int',
  6309. 'not null' => '1',
  6310. ),
  6311. 'timeaccessioned' => array(
  6312. // 'description' => 'TODO: please describe this field!',
  6313. 'type' => 'datetime',
  6314. 'not null' => '1',
  6315. 'default' => 'ow(',
  6316. ),
  6317. 'timelastmodified' => array(
  6318. // 'description' => 'TODO: please describe this field!',
  6319. 'type' => 'datetime',
  6320. 'not null' => '1',
  6321. 'default' => 'ow(',
  6322. ),
  6323. ),
  6324. 'primary key' => array(
  6325. '0' => 'cell_line_id',
  6326. ),
  6327. 'unique keys' => array(
  6328. 'cell_line_c1' => array(
  6329. '0' => 'uniquename',
  6330. '1' => 'organism_id',
  6331. ),
  6332. ),
  6333. 'indexes' => array(
  6334. ),
  6335. 'foreign keys' => array(
  6336. ),
  6337. );
  6338. return $description;
  6339. }
  6340. /****************************************************************************
  6341. * Implements hook_cell_line_cvterm_schema()
  6342. * Purpose: To describe the structure of cell_line_cvterm to tripal
  6343. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6344. * @see tripal_core.api.inc: tripal_core_chado_update()
  6345. * @see tripal_core.api.inc: tripal_core_chado_select()
  6346. *
  6347. * @return
  6348. * An array describing the current table
  6349. */
  6350. function tripal_core_chado_cell_line_cvterm_schema () {
  6351. $description = array();
  6352. $description = array(
  6353. 'table' => 'cell_line_cvterm',
  6354. // 'description' => 'TODO: please describe this table!',
  6355. 'fields' => array(
  6356. 'cell_line_cvterm_id' => array(
  6357. // 'description' => 'TODO: please describe this field!',
  6358. 'type' => 'serial',
  6359. 'not null' => '1',
  6360. ),
  6361. 'cell_line_id' => array(
  6362. // 'description' => 'TODO: please describe this field!',
  6363. 'type' => 'int',
  6364. 'not null' => '1',
  6365. ),
  6366. 'cvterm_id' => array(
  6367. // 'description' => 'TODO: please describe this field!',
  6368. 'type' => 'int',
  6369. 'not null' => '1',
  6370. ),
  6371. 'pub_id' => array(
  6372. // 'description' => 'TODO: please describe this field!',
  6373. 'type' => 'int',
  6374. 'not null' => '1',
  6375. ),
  6376. 'rank' => array(
  6377. // 'description' => 'TODO: please describe this field!',
  6378. 'type' => 'int',
  6379. 'not null' => '1',
  6380. 'default' => '0',
  6381. ),
  6382. ),
  6383. 'primary key' => array(
  6384. '0' => 'cell_line_cvterm_id',
  6385. ),
  6386. 'unique keys' => array(
  6387. 'cell_line_cvterm_c1' => array(
  6388. '0' => 'cell_line_id',
  6389. '1' => 'cvterm_id',
  6390. '2' => 'pub_id',
  6391. '3' => 'rank',
  6392. ),
  6393. ),
  6394. 'indexes' => array(
  6395. ),
  6396. 'foreign keys' => array(
  6397. ),
  6398. );
  6399. return $description;
  6400. }
  6401. /****************************************************************************
  6402. * Implements hook_cell_line_cvtermprop_schema()
  6403. * Purpose: To describe the structure of cell_line_cvtermprop to tripal
  6404. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6405. * @see tripal_core.api.inc: tripal_core_chado_update()
  6406. * @see tripal_core.api.inc: tripal_core_chado_select()
  6407. *
  6408. * @return
  6409. * An array describing the current table
  6410. */
  6411. function tripal_core_chado_cell_line_cvtermprop_schema () {
  6412. $description = array();
  6413. $description = array(
  6414. 'table' => 'cell_line_cvtermprop',
  6415. // 'description' => 'TODO: please describe this table!',
  6416. 'fields' => array(
  6417. 'cell_line_cvtermprop_id' => array(
  6418. // 'description' => 'TODO: please describe this field!',
  6419. 'type' => 'serial',
  6420. 'not null' => '1',
  6421. ),
  6422. 'cell_line_cvterm_id' => array(
  6423. // 'description' => 'TODO: please describe this field!',
  6424. 'type' => 'int',
  6425. 'not null' => '1',
  6426. ),
  6427. 'type_id' => array(
  6428. // 'description' => 'TODO: please describe this field!',
  6429. 'type' => 'int',
  6430. 'not null' => '1',
  6431. ),
  6432. 'value' => array(
  6433. // 'description' => 'TODO: please describe this field!',
  6434. 'type' => 'text',
  6435. 'not null' => '',
  6436. ),
  6437. 'rank' => array(
  6438. // 'description' => 'TODO: please describe this field!',
  6439. 'type' => 'int',
  6440. 'not null' => '1',
  6441. 'default' => '0',
  6442. ),
  6443. ),
  6444. 'primary key' => array(
  6445. '0' => 'cell_line_cvtermprop_id',
  6446. ),
  6447. 'unique keys' => array(
  6448. 'cell_line_cvtermprop_c1' => array(
  6449. '0' => 'cell_line_cvterm_id',
  6450. '1' => 'type_id',
  6451. '2' => 'rank',
  6452. ),
  6453. ),
  6454. 'indexes' => array(
  6455. ),
  6456. 'foreign keys' => array(
  6457. ),
  6458. );
  6459. return $description;
  6460. }
  6461. /****************************************************************************
  6462. * Implements hook_cell_line_dbxref_schema()
  6463. * Purpose: To describe the structure of cell_line_dbxref to tripal
  6464. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6465. * @see tripal_core.api.inc: tripal_core_chado_update()
  6466. * @see tripal_core.api.inc: tripal_core_chado_select()
  6467. *
  6468. * @return
  6469. * An array describing the current table
  6470. */
  6471. function tripal_core_chado_cell_line_dbxref_schema () {
  6472. $description = array();
  6473. $description = array(
  6474. 'table' => 'cell_line_dbxref',
  6475. // 'description' => 'TODO: please describe this table!',
  6476. 'fields' => array(
  6477. 'cell_line_dbxref_id' => array(
  6478. // 'description' => 'TODO: please describe this field!',
  6479. 'type' => 'serial',
  6480. 'not null' => '1',
  6481. ),
  6482. 'cell_line_id' => array(
  6483. // 'description' => 'TODO: please describe this field!',
  6484. 'type' => 'int',
  6485. 'not null' => '1',
  6486. ),
  6487. 'dbxref_id' => array(
  6488. // 'description' => 'TODO: please describe this field!',
  6489. 'type' => 'int',
  6490. 'not null' => '1',
  6491. ),
  6492. 'is_current' => array(
  6493. // 'description' => 'TODO: please describe this field!',
  6494. 'type' => 'boolean',
  6495. 'not null' => '1',
  6496. 'default' => 'ru',
  6497. ),
  6498. ),
  6499. 'primary key' => array(
  6500. '0' => 'cell_line_dbxref_id',
  6501. ),
  6502. 'unique keys' => array(
  6503. 'cell_line_dbxref_c1' => array(
  6504. '0' => 'cell_line_id',
  6505. '1' => 'dbxref_id',
  6506. ),
  6507. ),
  6508. 'indexes' => array(
  6509. ),
  6510. 'foreign keys' => array(
  6511. ),
  6512. );
  6513. return $description;
  6514. }
  6515. /****************************************************************************
  6516. * Implements hook_channel_schema()
  6517. * Purpose: To describe the structure of channel to tripal
  6518. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6519. * @see tripal_core.api.inc: tripal_core_chado_update()
  6520. * @see tripal_core.api.inc: tripal_core_chado_select()
  6521. *
  6522. * @return
  6523. * An array describing the current table
  6524. */
  6525. function tripal_core_chado_channel_schema () {
  6526. $description = array();
  6527. $description = array(
  6528. 'table' => 'channel',
  6529. // 'description' => 'TODO: please describe this table!',
  6530. 'fields' => array(
  6531. 'channel_id' => array(
  6532. // 'description' => 'TODO: please describe this field!',
  6533. 'type' => 'serial',
  6534. 'not null' => '1',
  6535. ),
  6536. 'name' => array(
  6537. // 'description' => 'TODO: please describe this field!',
  6538. 'type' => 'text',
  6539. 'not null' => '1',
  6540. ),
  6541. 'definition' => array(
  6542. // 'description' => 'TODO: please describe this field!',
  6543. 'type' => 'text',
  6544. 'not null' => '1',
  6545. ),
  6546. ),
  6547. 'primary key' => array(
  6548. '0' => 'channel_id',
  6549. ),
  6550. 'unique keys' => array(
  6551. 'channel_c1' => array(
  6552. '0' => 'name',
  6553. ),
  6554. ),
  6555. 'indexes' => array(
  6556. ),
  6557. 'foreign keys' => array(
  6558. ),
  6559. );
  6560. return $description;
  6561. }
  6562. /****************************************************************************
  6563. * Implements hook_common_ancestor_cvterm_schema()
  6564. * Purpose: To describe the structure of common_ancestor_cvterm to tripal
  6565. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6566. * @see tripal_core.api.inc: tripal_core_chado_update()
  6567. * @see tripal_core.api.inc: tripal_core_chado_select()
  6568. *
  6569. * @return
  6570. * An array describing the current table
  6571. */
  6572. function tripal_core_chado_common_ancestor_cvterm_schema () {
  6573. $description = array();
  6574. $description = array(
  6575. 'table' => 'common_ancestor_cvterm',
  6576. // 'description' => 'TODO: please describe this table!',
  6577. 'fields' => array(
  6578. 'cvterm1_id' => array(
  6579. // 'description' => 'TODO: please describe this field!',
  6580. 'type' => 'int',
  6581. 'not null' => '',
  6582. ),
  6583. 'cvterm2_id' => array(
  6584. // 'description' => 'TODO: please describe this field!',
  6585. 'type' => 'int',
  6586. 'not null' => '',
  6587. ),
  6588. 'ancestor_cvterm_id' => array(
  6589. // 'description' => 'TODO: please describe this field!',
  6590. 'type' => 'int',
  6591. 'not null' => '',
  6592. ),
  6593. 'pathdistance1' => array(
  6594. // 'description' => 'TODO: please describe this field!',
  6595. 'type' => 'int',
  6596. 'not null' => '',
  6597. ),
  6598. 'pathdistance2' => array(
  6599. // 'description' => 'TODO: please describe this field!',
  6600. 'type' => 'int',
  6601. 'not null' => '',
  6602. ),
  6603. 'total_pathdistance' => array(
  6604. // 'description' => 'TODO: please describe this field!',
  6605. 'type' => 'int',
  6606. 'not null' => '',
  6607. ),
  6608. ),
  6609. 'primary key' => array(
  6610. ),
  6611. 'unique keys' => array(
  6612. ),
  6613. 'indexes' => array(
  6614. ),
  6615. 'foreign keys' => array(
  6616. ),
  6617. );
  6618. return $description;
  6619. }
  6620. /****************************************************************************
  6621. * Implements hook_cv_cvterm_count_with_obs_schema()
  6622. * Purpose: To describe the structure of cv_cvterm_count_with_obs to tripal
  6623. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6624. * @see tripal_core.api.inc: tripal_core_chado_update()
  6625. * @see tripal_core.api.inc: tripal_core_chado_select()
  6626. *
  6627. * @return
  6628. * An array describing the current table
  6629. */
  6630. function tripal_core_chado_cv_cvterm_count_with_obs_schema () {
  6631. $description = array();
  6632. $description = array(
  6633. 'table' => 'cv_cvterm_count_with_obs',
  6634. // 'description' => 'TODO: please describe this table!',
  6635. 'fields' => array(
  6636. 'name' => array(
  6637. // 'description' => 'TODO: please describe this field!',
  6638. 'type' => 'varchar',
  6639. 'length' => '255',
  6640. 'not null' => '',
  6641. ),
  6642. 'num_terms_incl_obs' => array(
  6643. // 'description' => 'TODO: please describe this field!',
  6644. 'type' => 'int',
  6645. 'size' => 'big',
  6646. 'not null' => '',
  6647. ),
  6648. ),
  6649. 'primary key' => array(
  6650. ),
  6651. 'unique keys' => array(
  6652. ),
  6653. 'indexes' => array(
  6654. ),
  6655. 'foreign keys' => array(
  6656. ),
  6657. );
  6658. return $description;
  6659. }
  6660. /****************************************************************************
  6661. * Implements hook_cv_leaf_schema()
  6662. * Purpose: To describe the structure of cv_leaf to tripal
  6663. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6664. * @see tripal_core.api.inc: tripal_core_chado_update()
  6665. * @see tripal_core.api.inc: tripal_core_chado_select()
  6666. *
  6667. * @return
  6668. * An array describing the current table
  6669. */
  6670. function tripal_core_chado_cv_leaf_schema () {
  6671. $description = array();
  6672. $description = array(
  6673. 'table' => 'cv_leaf',
  6674. // 'description' => 'TODO: please describe this table!',
  6675. 'fields' => array(
  6676. 'cv_id' => array(
  6677. // 'description' => 'TODO: please describe this field!',
  6678. 'type' => 'int',
  6679. 'not null' => '',
  6680. ),
  6681. 'cvterm_id' => array(
  6682. // 'description' => 'TODO: please describe this field!',
  6683. 'type' => 'int',
  6684. 'not null' => '',
  6685. ),
  6686. ),
  6687. 'primary key' => array(
  6688. ),
  6689. 'unique keys' => array(
  6690. ),
  6691. 'indexes' => array(
  6692. ),
  6693. 'foreign keys' => array(
  6694. ),
  6695. );
  6696. return $description;
  6697. }
  6698. /****************************************************************************
  6699. * Implements hook_cv_link_count_schema()
  6700. * Purpose: To describe the structure of cv_link_count to tripal
  6701. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6702. * @see tripal_core.api.inc: tripal_core_chado_update()
  6703. * @see tripal_core.api.inc: tripal_core_chado_select()
  6704. *
  6705. * @return
  6706. * An array describing the current table
  6707. */
  6708. function tripal_core_chado_cv_link_count_schema () {
  6709. $description = array();
  6710. $description = array(
  6711. 'table' => 'cv_link_count',
  6712. // 'description' => 'TODO: please describe this table!',
  6713. 'fields' => array(
  6714. 'cv_name' => array(
  6715. // 'description' => 'TODO: please describe this field!',
  6716. 'type' => 'varchar',
  6717. 'length' => '255',
  6718. 'not null' => '',
  6719. ),
  6720. 'relation_name' => array(
  6721. // 'description' => 'TODO: please describe this field!',
  6722. 'type' => 'varchar',
  6723. 'length' => '1024',
  6724. 'not null' => '',
  6725. ),
  6726. 'relation_cv_name' => array(
  6727. // 'description' => 'TODO: please describe this field!',
  6728. 'type' => 'varchar',
  6729. 'length' => '255',
  6730. 'not null' => '',
  6731. ),
  6732. 'num_links' => array(
  6733. // 'description' => 'TODO: please describe this field!',
  6734. 'type' => 'int',
  6735. 'size' => 'big',
  6736. 'not null' => '',
  6737. ),
  6738. ),
  6739. 'primary key' => array(
  6740. ),
  6741. 'unique keys' => array(
  6742. ),
  6743. 'indexes' => array(
  6744. ),
  6745. 'foreign keys' => array(
  6746. ),
  6747. );
  6748. return $description;
  6749. }
  6750. /****************************************************************************
  6751. * Implements hook_cv_path_count_schema()
  6752. * Purpose: To describe the structure of cv_path_count to tripal
  6753. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6754. * @see tripal_core.api.inc: tripal_core_chado_update()
  6755. * @see tripal_core.api.inc: tripal_core_chado_select()
  6756. *
  6757. * @return
  6758. * An array describing the current table
  6759. */
  6760. function tripal_core_chado_cv_path_count_schema () {
  6761. $description = array();
  6762. $description = array(
  6763. 'table' => 'cv_path_count',
  6764. // 'description' => 'TODO: please describe this table!',
  6765. 'fields' => array(
  6766. 'cv_name' => array(
  6767. // 'description' => 'TODO: please describe this field!',
  6768. 'type' => 'varchar',
  6769. 'length' => '255',
  6770. 'not null' => '',
  6771. ),
  6772. 'relation_name' => array(
  6773. // 'description' => 'TODO: please describe this field!',
  6774. 'type' => 'varchar',
  6775. 'length' => '1024',
  6776. 'not null' => '',
  6777. ),
  6778. 'relation_cv_name' => array(
  6779. // 'description' => 'TODO: please describe this field!',
  6780. 'type' => 'varchar',
  6781. 'length' => '255',
  6782. 'not null' => '',
  6783. ),
  6784. 'num_paths' => array(
  6785. // 'description' => 'TODO: please describe this field!',
  6786. 'type' => 'int',
  6787. 'size' => 'big',
  6788. 'not null' => '',
  6789. ),
  6790. ),
  6791. 'primary key' => array(
  6792. ),
  6793. 'unique keys' => array(
  6794. ),
  6795. 'indexes' => array(
  6796. ),
  6797. 'foreign keys' => array(
  6798. ),
  6799. );
  6800. return $description;
  6801. }
  6802. /****************************************************************************
  6803. * Implements hook_cv_cvterm_count_schema()
  6804. * Purpose: To describe the structure of cv_cvterm_count to tripal
  6805. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6806. * @see tripal_core.api.inc: tripal_core_chado_update()
  6807. * @see tripal_core.api.inc: tripal_core_chado_select()
  6808. *
  6809. * @return
  6810. * An array describing the current table
  6811. */
  6812. function tripal_core_chado_cv_cvterm_count_schema () {
  6813. $description = array();
  6814. $description = array(
  6815. 'table' => 'cv_cvterm_count',
  6816. // 'description' => 'TODO: please describe this table!',
  6817. 'fields' => array(
  6818. 'name' => array(
  6819. // 'description' => 'TODO: please describe this field!',
  6820. 'type' => 'varchar',
  6821. 'length' => '255',
  6822. 'not null' => '',
  6823. ),
  6824. 'num_terms_excl_obs' => array(
  6825. // 'description' => 'TODO: please describe this field!',
  6826. 'type' => 'int',
  6827. 'size' => 'big',
  6828. 'not null' => '',
  6829. ),
  6830. ),
  6831. 'primary key' => array(
  6832. ),
  6833. 'unique keys' => array(
  6834. ),
  6835. 'indexes' => array(
  6836. ),
  6837. 'foreign keys' => array(
  6838. ),
  6839. );
  6840. return $description;
  6841. }
  6842. /****************************************************************************
  6843. * Implements hook_cv_schema()
  6844. * Purpose: To describe the structure of cv to tripal
  6845. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6846. * @see tripal_core.api.inc: tripal_core_chado_update()
  6847. * @see tripal_core.api.inc: tripal_core_chado_select()
  6848. *
  6849. * @return
  6850. * An array describing the current table
  6851. */
  6852. function tripal_core_chado_cv_schema () {
  6853. $description = array();
  6854. $description = array(
  6855. 'table' => 'cv',
  6856. // 'description' => 'TODO: please describe this table!',
  6857. 'fields' => array(
  6858. 'cv_id' => array(
  6859. // 'description' => 'TODO: please describe this field!',
  6860. 'type' => 'serial',
  6861. 'not null' => '1',
  6862. ),
  6863. 'name' => array(
  6864. // 'description' => 'TODO: please describe this field!',
  6865. 'type' => 'varchar',
  6866. 'length' => '255',
  6867. 'not null' => '1',
  6868. ),
  6869. 'definition' => array(
  6870. // 'description' => 'TODO: please describe this field!',
  6871. 'type' => 'text',
  6872. 'not null' => '',
  6873. ),
  6874. ),
  6875. 'primary key' => array(
  6876. '0' => 'cv_id',
  6877. ),
  6878. 'unique keys' => array(
  6879. 'cv_c1' => array(
  6880. '0' => 'name',
  6881. ),
  6882. ),
  6883. 'indexes' => array(
  6884. ),
  6885. 'foreign keys' => array(
  6886. ),
  6887. );
  6888. return $description;
  6889. }
  6890. /****************************************************************************
  6891. * Implements hook_common_descendant_cvterm_schema()
  6892. * Purpose: To describe the structure of common_descendant_cvterm to tripal
  6893. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6894. * @see tripal_core.api.inc: tripal_core_chado_update()
  6895. * @see tripal_core.api.inc: tripal_core_chado_select()
  6896. *
  6897. * @return
  6898. * An array describing the current table
  6899. */
  6900. function tripal_core_chado_common_descendant_cvterm_schema () {
  6901. $description = array();
  6902. $description = array(
  6903. 'table' => 'common_descendant_cvterm',
  6904. // 'description' => 'TODO: please describe this table!',
  6905. 'fields' => array(
  6906. 'cvterm1_id' => array(
  6907. // 'description' => 'TODO: please describe this field!',
  6908. 'type' => 'int',
  6909. 'not null' => '',
  6910. ),
  6911. 'cvterm2_id' => array(
  6912. // 'description' => 'TODO: please describe this field!',
  6913. 'type' => 'int',
  6914. 'not null' => '',
  6915. ),
  6916. 'ancestor_cvterm_id' => array(
  6917. // 'description' => 'TODO: please describe this field!',
  6918. 'type' => 'int',
  6919. 'not null' => '',
  6920. ),
  6921. 'pathdistance1' => array(
  6922. // 'description' => 'TODO: please describe this field!',
  6923. 'type' => 'int',
  6924. 'not null' => '',
  6925. ),
  6926. 'pathdistance2' => array(
  6927. // 'description' => 'TODO: please describe this field!',
  6928. 'type' => 'int',
  6929. 'not null' => '',
  6930. ),
  6931. 'total_pathdistance' => array(
  6932. // 'description' => 'TODO: please describe this field!',
  6933. 'type' => 'int',
  6934. 'not null' => '',
  6935. ),
  6936. ),
  6937. 'primary key' => array(
  6938. ),
  6939. 'unique keys' => array(
  6940. ),
  6941. 'indexes' => array(
  6942. ),
  6943. 'foreign keys' => array(
  6944. ),
  6945. );
  6946. return $description;
  6947. }
  6948. /****************************************************************************
  6949. * Implements hook_contact_schema()
  6950. * Purpose: To describe the structure of contact to tripal
  6951. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6952. * @see tripal_core.api.inc: tripal_core_chado_update()
  6953. * @see tripal_core.api.inc: tripal_core_chado_select()
  6954. *
  6955. * @return
  6956. * An array describing the current table
  6957. */
  6958. function tripal_core_chado_contact_schema () {
  6959. $description = array();
  6960. $description = array(
  6961. 'table' => 'contact',
  6962. // 'description' => 'TODO: please describe this table!',
  6963. 'fields' => array(
  6964. 'contact_id' => array(
  6965. // 'description' => 'TODO: please describe this field!',
  6966. 'type' => 'serial',
  6967. 'not null' => '1',
  6968. ),
  6969. 'type_id' => array(
  6970. // 'description' => 'TODO: please describe this field!',
  6971. 'type' => 'int',
  6972. 'not null' => '',
  6973. ),
  6974. 'name' => array(
  6975. // 'description' => 'TODO: please describe this field!',
  6976. 'type' => 'varchar',
  6977. 'length' => '255',
  6978. 'not null' => '1',
  6979. ),
  6980. 'description' => array(
  6981. // 'description' => 'TODO: please describe this field!',
  6982. 'type' => 'varchar',
  6983. 'length' => '255',
  6984. 'not null' => '',
  6985. ),
  6986. ),
  6987. 'primary key' => array(
  6988. '0' => 'contact_id',
  6989. ),
  6990. 'unique keys' => array(
  6991. 'contact_c1' => array(
  6992. '0' => 'name',
  6993. ),
  6994. ),
  6995. 'indexes' => array(
  6996. ),
  6997. 'foreign keys' => array(
  6998. ),
  6999. );
  7000. return $description;
  7001. }
  7002. /****************************************************************************
  7003. * Implements hook_contact_relationship_schema()
  7004. * Purpose: To describe the structure of contact_relationship to tripal
  7005. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7006. * @see tripal_core.api.inc: tripal_core_chado_update()
  7007. * @see tripal_core.api.inc: tripal_core_chado_select()
  7008. *
  7009. * @return
  7010. * An array describing the current table
  7011. */
  7012. function tripal_core_chado_contact_relationship_schema () {
  7013. $description = array();
  7014. $description = array(
  7015. 'table' => 'contact_relationship',
  7016. // 'description' => 'TODO: please describe this table!',
  7017. 'fields' => array(
  7018. 'contact_relationship_id' => array(
  7019. // 'description' => 'TODO: please describe this field!',
  7020. 'type' => 'serial',
  7021. 'not null' => '1',
  7022. ),
  7023. 'type_id' => array(
  7024. // 'description' => 'TODO: please describe this field!',
  7025. 'type' => 'int',
  7026. 'not null' => '1',
  7027. ),
  7028. 'subject_id' => array(
  7029. // 'description' => 'TODO: please describe this field!',
  7030. 'type' => 'int',
  7031. 'not null' => '1',
  7032. ),
  7033. 'object_id' => array(
  7034. // 'description' => 'TODO: please describe this field!',
  7035. 'type' => 'int',
  7036. 'not null' => '1',
  7037. ),
  7038. ),
  7039. 'primary key' => array(
  7040. '0' => 'contact_relationship_id',
  7041. ),
  7042. 'unique keys' => array(
  7043. 'contact_relationship_c1' => array(
  7044. '0' => 'subject_id',
  7045. '1' => 'object_id',
  7046. '2' => 'type_id',
  7047. ),
  7048. ),
  7049. 'indexes' => array(
  7050. 'contact_relationship_idx1' => array(
  7051. '0' => 'type_id',
  7052. ),
  7053. 'contact_relationship_idx2' => array(
  7054. '0' => 'subject_id',
  7055. ),
  7056. 'contact_relationship_idx3' => array(
  7057. '0' => 'object_id',
  7058. ),
  7059. ),
  7060. 'foreign keys' => array(
  7061. ),
  7062. );
  7063. return $description;
  7064. }
  7065. /****************************************************************************
  7066. * Implements hook_control_schema()
  7067. * Purpose: To describe the structure of control to tripal
  7068. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7069. * @see tripal_core.api.inc: tripal_core_chado_update()
  7070. * @see tripal_core.api.inc: tripal_core_chado_select()
  7071. *
  7072. * @return
  7073. * An array describing the current table
  7074. */
  7075. function tripal_core_chado_control_schema () {
  7076. $description = array();
  7077. $description = array(
  7078. 'table' => 'control',
  7079. // 'description' => 'TODO: please describe this table!',
  7080. 'fields' => array(
  7081. 'control_id' => array(
  7082. // 'description' => 'TODO: please describe this field!',
  7083. 'type' => 'serial',
  7084. 'not null' => '1',
  7085. ),
  7086. 'type_id' => array(
  7087. // 'description' => 'TODO: please describe this field!',
  7088. 'type' => 'int',
  7089. 'not null' => '1',
  7090. ),
  7091. 'assay_id' => array(
  7092. // 'description' => 'TODO: please describe this field!',
  7093. 'type' => 'int',
  7094. 'not null' => '1',
  7095. ),
  7096. 'tableinfo_id' => array(
  7097. // 'description' => 'TODO: please describe this field!',
  7098. 'type' => 'int',
  7099. 'not null' => '1',
  7100. ),
  7101. 'row_id' => array(
  7102. // 'description' => 'TODO: please describe this field!',
  7103. 'type' => 'int',
  7104. 'not null' => '1',
  7105. ),
  7106. 'name' => array(
  7107. // 'description' => 'TODO: please describe this field!',
  7108. 'type' => 'text',
  7109. 'not null' => '',
  7110. ),
  7111. 'value' => array(
  7112. // 'description' => 'TODO: please describe this field!',
  7113. 'type' => 'text',
  7114. 'not null' => '',
  7115. ),
  7116. 'rank' => array(
  7117. // 'description' => 'TODO: please describe this field!',
  7118. 'type' => 'int',
  7119. 'not null' => '1',
  7120. 'default' => '0',
  7121. ),
  7122. ),
  7123. 'primary key' => array(
  7124. '0' => 'control_id',
  7125. ),
  7126. 'unique keys' => array(
  7127. ),
  7128. 'indexes' => array(
  7129. 'control_idx1' => array(
  7130. '0' => 'type_id',
  7131. ),
  7132. 'control_idx2' => array(
  7133. '0' => 'assay_id',
  7134. ),
  7135. 'control_idx3' => array(
  7136. '0' => 'tableinfo_id',
  7137. ),
  7138. 'control_idx4' => array(
  7139. '0' => 'row_id',
  7140. ),
  7141. ),
  7142. 'foreign keys' => array(
  7143. ),
  7144. );
  7145. return $description;
  7146. }
  7147. /****************************************************************************
  7148. * Implements hook_biomaterialprop_schema()
  7149. * Purpose: To describe the structure of biomaterialprop to tripal
  7150. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7151. * @see tripal_core.api.inc: tripal_core_chado_update()
  7152. * @see tripal_core.api.inc: tripal_core_chado_select()
  7153. *
  7154. * @return
  7155. * An array describing the current table
  7156. */
  7157. function tripal_core_chado_biomaterialprop_schema () {
  7158. $description = array();
  7159. $description = array(
  7160. 'table' => 'biomaterialprop',
  7161. // 'description' => 'TODO: please describe this table!',
  7162. 'fields' => array(
  7163. 'biomaterialprop_id' => array(
  7164. // 'description' => 'TODO: please describe this field!',
  7165. 'type' => 'serial',
  7166. 'not null' => '1',
  7167. ),
  7168. 'biomaterial_id' => array(
  7169. // 'description' => 'TODO: please describe this field!',
  7170. 'type' => 'int',
  7171. 'not null' => '1',
  7172. ),
  7173. 'type_id' => array(
  7174. // 'description' => 'TODO: please describe this field!',
  7175. 'type' => 'int',
  7176. 'not null' => '1',
  7177. ),
  7178. 'value' => array(
  7179. // 'description' => 'TODO: please describe this field!',
  7180. 'type' => 'text',
  7181. 'not null' => '',
  7182. ),
  7183. 'rank' => array(
  7184. // 'description' => 'TODO: please describe this field!',
  7185. 'type' => 'int',
  7186. 'not null' => '1',
  7187. 'default' => '0',
  7188. ),
  7189. ),
  7190. 'primary key' => array(
  7191. '0' => 'biomaterialprop_id',
  7192. ),
  7193. 'unique keys' => array(
  7194. 'biomaterialprop_c1' => array(
  7195. '0' => 'biomaterial_id',
  7196. '1' => 'type_id',
  7197. '2' => 'rank',
  7198. ),
  7199. ),
  7200. 'indexes' => array(
  7201. 'biomaterialprop_idx1' => array(
  7202. '0' => 'biomaterial_id',
  7203. ),
  7204. 'biomaterialprop_idx2' => array(
  7205. '0' => 'type_id',
  7206. ),
  7207. ),
  7208. 'foreign keys' => array(
  7209. ),
  7210. );
  7211. return $description;
  7212. }
  7213. /****************************************************************************
  7214. * Implements hook_biomaterial_treatment_schema()
  7215. * Purpose: To describe the structure of biomaterial_treatment to tripal
  7216. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7217. * @see tripal_core.api.inc: tripal_core_chado_update()
  7218. * @see tripal_core.api.inc: tripal_core_chado_select()
  7219. *
  7220. * @return
  7221. * An array describing the current table
  7222. */
  7223. function tripal_core_chado_biomaterial_treatment_schema () {
  7224. $description = array();
  7225. $description = array(
  7226. 'table' => 'biomaterial_treatment',
  7227. // 'description' => 'TODO: please describe this table!',
  7228. 'fields' => array(
  7229. 'biomaterial_treatment_id' => array(
  7230. // 'description' => 'TODO: please describe this field!',
  7231. 'type' => 'serial',
  7232. 'not null' => '1',
  7233. ),
  7234. 'biomaterial_id' => array(
  7235. // 'description' => 'TODO: please describe this field!',
  7236. 'type' => 'int',
  7237. 'not null' => '1',
  7238. ),
  7239. 'treatment_id' => array(
  7240. // 'description' => 'TODO: please describe this field!',
  7241. 'type' => 'int',
  7242. 'not null' => '1',
  7243. ),
  7244. 'unittype_id' => array(
  7245. // 'description' => 'TODO: please describe this field!',
  7246. 'type' => 'int',
  7247. 'not null' => '',
  7248. ),
  7249. 'value' => array(
  7250. // 'description' => 'TODO: please describe this field!',
  7251. 'type' => 'float',
  7252. 'not null' => '',
  7253. ),
  7254. 'rank' => array(
  7255. // 'description' => 'TODO: please describe this field!',
  7256. 'type' => 'int',
  7257. 'not null' => '1',
  7258. 'default' => '0',
  7259. ),
  7260. ),
  7261. 'primary key' => array(
  7262. '0' => 'biomaterial_treatment_id',
  7263. ),
  7264. 'unique keys' => array(
  7265. 'biomaterial_treatment_c1' => array(
  7266. '0' => 'biomaterial_id',
  7267. '1' => 'treatment_id',
  7268. ),
  7269. ),
  7270. 'indexes' => array(
  7271. 'biomaterial_treatment_idx1' => array(
  7272. '0' => 'biomaterial_id',
  7273. ),
  7274. 'biomaterial_treatment_idx2' => array(
  7275. '0' => 'treatment_id',
  7276. ),
  7277. 'biomaterial_treatment_idx3' => array(
  7278. '0' => 'unittype_id',
  7279. ),
  7280. ),
  7281. 'foreign keys' => array(
  7282. ),
  7283. );
  7284. return $description;
  7285. }
  7286. /****************************************************************************
  7287. * Implements hook_acquisition_relationship_schema()
  7288. * Purpose: To describe the structure of acquisition_relationship to tripal
  7289. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7290. * @see tripal_core.api.inc: tripal_core_chado_update()
  7291. * @see tripal_core.api.inc: tripal_core_chado_select()
  7292. *
  7293. * @return
  7294. * An array describing the current table
  7295. */
  7296. function tripal_core_chado_acquisition_relationship_schema () {
  7297. $description = array();
  7298. $description = array(
  7299. 'table' => 'acquisition_relationship',
  7300. // 'description' => 'TODO: please describe this table!',
  7301. 'fields' => array(
  7302. 'acquisition_relationship_id' => array(
  7303. // 'description' => 'TODO: please describe this field!',
  7304. 'type' => 'serial',
  7305. 'not null' => '1',
  7306. ),
  7307. 'subject_id' => array(
  7308. // 'description' => 'TODO: please describe this field!',
  7309. 'type' => 'int',
  7310. 'not null' => '1',
  7311. ),
  7312. 'type_id' => array(
  7313. // 'description' => 'TODO: please describe this field!',
  7314. 'type' => 'int',
  7315. 'not null' => '1',
  7316. ),
  7317. 'object_id' => array(
  7318. // 'description' => 'TODO: please describe this field!',
  7319. 'type' => 'int',
  7320. 'not null' => '1',
  7321. ),
  7322. 'value' => array(
  7323. // 'description' => 'TODO: please describe this field!',
  7324. 'type' => 'text',
  7325. 'not null' => '',
  7326. ),
  7327. 'rank' => array(
  7328. // 'description' => 'TODO: please describe this field!',
  7329. 'type' => 'int',
  7330. 'not null' => '1',
  7331. 'default' => '0',
  7332. ),
  7333. ),
  7334. 'primary key' => array(
  7335. '0' => 'acquisition_relationship_id',
  7336. ),
  7337. 'unique keys' => array(
  7338. 'acquisition_relationship_c1' => array(
  7339. '0' => 'subject_id',
  7340. '1' => 'object_id',
  7341. '2' => 'type_id',
  7342. '3' => 'rank',
  7343. ),
  7344. ),
  7345. 'indexes' => array(
  7346. 'acquisition_relationship_idx1' => array(
  7347. '0' => 'subject_id',
  7348. ),
  7349. 'acquisition_relationship_idx2' => array(
  7350. '0' => 'type_id',
  7351. ),
  7352. 'acquisition_relationship_idx3' => array(
  7353. '0' => 'object_id',
  7354. ),
  7355. ),
  7356. 'foreign keys' => array(
  7357. ),
  7358. );
  7359. return $description;
  7360. }
  7361. /****************************************************************************
  7362. * Implements hook_acquisition_schema()
  7363. * Purpose: To describe the structure of acquisition to tripal
  7364. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7365. * @see tripal_core.api.inc: tripal_core_chado_update()
  7366. * @see tripal_core.api.inc: tripal_core_chado_select()
  7367. *
  7368. * @return
  7369. * An array describing the current table
  7370. */
  7371. function tripal_core_chado_acquisition_schema () {
  7372. $description = array();
  7373. $description = array(
  7374. 'table' => 'acquisition',
  7375. // 'description' => 'TODO: please describe this table!',
  7376. 'fields' => array(
  7377. 'acquisition_id' => array(
  7378. // 'description' => 'TODO: please describe this field!',
  7379. 'type' => 'serial',
  7380. 'not null' => '1',
  7381. ),
  7382. 'assay_id' => array(
  7383. // 'description' => 'TODO: please describe this field!',
  7384. 'type' => 'int',
  7385. 'not null' => '1',
  7386. ),
  7387. 'protocol_id' => array(
  7388. // 'description' => 'TODO: please describe this field!',
  7389. 'type' => 'int',
  7390. 'not null' => '',
  7391. ),
  7392. 'channel_id' => array(
  7393. // 'description' => 'TODO: please describe this field!',
  7394. 'type' => 'int',
  7395. 'not null' => '',
  7396. ),
  7397. 'acquisitiondate' => array(
  7398. // 'description' => 'TODO: please describe this field!',
  7399. 'type' => 'datetime',
  7400. 'not null' => '',
  7401. 'default' => 'ow(',
  7402. ),
  7403. 'name' => array(
  7404. // 'description' => 'TODO: please describe this field!',
  7405. 'type' => 'text',
  7406. 'not null' => '',
  7407. ),
  7408. 'uri' => array(
  7409. // 'description' => 'TODO: please describe this field!',
  7410. 'type' => 'text',
  7411. 'not null' => '',
  7412. ),
  7413. ),
  7414. 'primary key' => array(
  7415. '0' => 'acquisition_id',
  7416. ),
  7417. 'unique keys' => array(
  7418. 'acquisition_c1' => array(
  7419. '0' => 'name',
  7420. ),
  7421. ),
  7422. 'indexes' => array(
  7423. 'acquisition_idx1' => array(
  7424. '0' => 'assay_id',
  7425. ),
  7426. 'acquisition_idx2' => array(
  7427. '0' => 'protocol_id',
  7428. ),
  7429. 'acquisition_idx3' => array(
  7430. '0' => 'channel_id',
  7431. ),
  7432. ),
  7433. 'foreign keys' => array(
  7434. ),
  7435. );
  7436. return $description;
  7437. }
  7438. /****************************************************************************
  7439. * Implements hook_acquisitionprop_schema()
  7440. * Purpose: To describe the structure of acquisitionprop to tripal
  7441. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7442. * @see tripal_core.api.inc: tripal_core_chado_update()
  7443. * @see tripal_core.api.inc: tripal_core_chado_select()
  7444. *
  7445. * @return
  7446. * An array describing the current table
  7447. */
  7448. function tripal_core_chado_acquisitionprop_schema () {
  7449. $description = array();
  7450. $description = array(
  7451. 'table' => 'acquisitionprop',
  7452. // 'description' => 'TODO: please describe this table!',
  7453. 'fields' => array(
  7454. 'acquisitionprop_id' => array(
  7455. // 'description' => 'TODO: please describe this field!',
  7456. 'type' => 'serial',
  7457. 'not null' => '1',
  7458. ),
  7459. 'acquisition_id' => array(
  7460. // 'description' => 'TODO: please describe this field!',
  7461. 'type' => 'int',
  7462. 'not null' => '1',
  7463. ),
  7464. 'type_id' => array(
  7465. // 'description' => 'TODO: please describe this field!',
  7466. 'type' => 'int',
  7467. 'not null' => '1',
  7468. ),
  7469. 'value' => array(
  7470. // 'description' => 'TODO: please describe this field!',
  7471. 'type' => 'text',
  7472. 'not null' => '',
  7473. ),
  7474. 'rank' => array(
  7475. // 'description' => 'TODO: please describe this field!',
  7476. 'type' => 'int',
  7477. 'not null' => '1',
  7478. 'default' => '0',
  7479. ),
  7480. ),
  7481. 'primary key' => array(
  7482. '0' => 'acquisitionprop_id',
  7483. ),
  7484. 'unique keys' => array(
  7485. 'acquisitionprop_c1' => array(
  7486. '0' => 'acquisition_id',
  7487. '1' => 'type_id',
  7488. '2' => 'rank',
  7489. ),
  7490. ),
  7491. 'indexes' => array(
  7492. 'acquisitionprop_idx1' => array(
  7493. '0' => 'acquisition_id',
  7494. ),
  7495. 'acquisitionprop_idx2' => array(
  7496. '0' => 'type_id',
  7497. ),
  7498. ),
  7499. 'foreign keys' => array(
  7500. ),
  7501. );
  7502. return $description;
  7503. }
  7504. /****************************************************************************
  7505. * Implements hook_all_feature_names_schema()
  7506. * Purpose: To describe the structure of all_feature_names to tripal
  7507. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7508. * @see tripal_core.api.inc: tripal_core_chado_update()
  7509. * @see tripal_core.api.inc: tripal_core_chado_select()
  7510. *
  7511. * @return
  7512. * An array describing the current table
  7513. */
  7514. function tripal_core_chado_all_feature_names_schema () {
  7515. $description = array();
  7516. $description = array(
  7517. 'table' => 'all_feature_names',
  7518. // 'description' => 'TODO: please describe this table!',
  7519. 'fields' => array(
  7520. 'feature_id' => array(
  7521. // 'description' => 'TODO: please describe this field!',
  7522. 'type' => 'int',
  7523. 'not null' => '',
  7524. ),
  7525. 'name' => array(
  7526. // 'description' => 'TODO: please describe this field!',
  7527. 'type' => 'varchar',
  7528. 'length' => '255',
  7529. 'not null' => '',
  7530. ),
  7531. 'organism_id' => array(
  7532. // 'description' => 'TODO: please describe this field!',
  7533. 'type' => 'int',
  7534. 'not null' => '',
  7535. ),
  7536. ),
  7537. 'primary key' => array(
  7538. ),
  7539. 'unique keys' => array(
  7540. ),
  7541. 'indexes' => array(
  7542. ),
  7543. 'foreign keys' => array(
  7544. ),
  7545. );
  7546. return $description;
  7547. }
  7548. /****************************************************************************
  7549. * Implements hook_analysis_schema()
  7550. * Purpose: To describe the structure of analysis to tripal
  7551. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7552. * @see tripal_core.api.inc: tripal_core_chado_update()
  7553. * @see tripal_core.api.inc: tripal_core_chado_select()
  7554. *
  7555. * @return
  7556. * An array describing the current table
  7557. */
  7558. function tripal_core_chado_analysis_schema () {
  7559. $description = array();
  7560. $description = array(
  7561. 'table' => 'analysis',
  7562. // 'description' => 'TODO: please describe this table!',
  7563. 'fields' => array(
  7564. 'analysis_id' => array(
  7565. // 'description' => 'TODO: please describe this field!',
  7566. 'type' => 'serial',
  7567. 'not null' => '1',
  7568. ),
  7569. 'name' => array(
  7570. // 'description' => 'TODO: please describe this field!',
  7571. 'type' => 'varchar',
  7572. 'length' => '255',
  7573. 'not null' => '',
  7574. ),
  7575. 'description' => array(
  7576. // 'description' => 'TODO: please describe this field!',
  7577. 'type' => 'text',
  7578. 'not null' => '',
  7579. ),
  7580. 'program' => array(
  7581. // 'description' => 'TODO: please describe this field!',
  7582. 'type' => 'varchar',
  7583. 'length' => '255',
  7584. 'not null' => '1',
  7585. ),
  7586. 'programversion' => array(
  7587. // 'description' => 'TODO: please describe this field!',
  7588. 'type' => 'varchar',
  7589. 'length' => '255',
  7590. 'not null' => '1',
  7591. ),
  7592. 'algorithm' => array(
  7593. // 'description' => 'TODO: please describe this field!',
  7594. 'type' => 'varchar',
  7595. 'length' => '255',
  7596. 'not null' => '',
  7597. ),
  7598. 'sourcename' => array(
  7599. // 'description' => 'TODO: please describe this field!',
  7600. 'type' => 'varchar',
  7601. 'length' => '255',
  7602. 'not null' => '',
  7603. ),
  7604. 'sourceversion' => array(
  7605. // 'description' => 'TODO: please describe this field!',
  7606. 'type' => 'varchar',
  7607. 'length' => '255',
  7608. 'not null' => '',
  7609. ),
  7610. 'sourceuri' => array(
  7611. // 'description' => 'TODO: please describe this field!',
  7612. 'type' => 'text',
  7613. 'not null' => '',
  7614. ),
  7615. 'timeexecuted' => array(
  7616. // 'description' => 'TODO: please describe this field!',
  7617. 'type' => 'datetime',
  7618. 'not null' => '1',
  7619. 'default' => 'ow(',
  7620. ),
  7621. ),
  7622. 'primary key' => array(
  7623. '0' => 'analysis_id',
  7624. ),
  7625. 'unique keys' => array(
  7626. 'analysis_c1' => array(
  7627. '0' => 'program',
  7628. '1' => 'programversion',
  7629. '2' => 'sourcename',
  7630. ),
  7631. ),
  7632. 'indexes' => array(
  7633. ),
  7634. 'foreign keys' => array(
  7635. ),
  7636. );
  7637. return $description;
  7638. }
  7639. /****************************************************************************
  7640. * Implements hook_analysisfeature_schema()
  7641. * Purpose: To describe the structure of analysisfeature to tripal
  7642. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7643. * @see tripal_core.api.inc: tripal_core_chado_update()
  7644. * @see tripal_core.api.inc: tripal_core_chado_select()
  7645. *
  7646. * @return
  7647. * An array describing the current table
  7648. */
  7649. function tripal_core_chado_analysisfeature_schema () {
  7650. $description = array();
  7651. $description = array(
  7652. 'table' => 'analysisfeature',
  7653. // 'description' => 'TODO: please describe this table!',
  7654. 'fields' => array(
  7655. 'analysisfeature_id' => array(
  7656. // 'description' => 'TODO: please describe this field!',
  7657. 'type' => 'serial',
  7658. 'not null' => '1',
  7659. ),
  7660. 'feature_id' => array(
  7661. // 'description' => 'TODO: please describe this field!',
  7662. 'type' => 'int',
  7663. 'not null' => '1',
  7664. ),
  7665. 'analysis_id' => array(
  7666. // 'description' => 'TODO: please describe this field!',
  7667. 'type' => 'int',
  7668. 'not null' => '1',
  7669. ),
  7670. 'rawscore' => array(
  7671. // 'description' => 'TODO: please describe this field!',
  7672. 'type' => 'float',
  7673. 'size' => 'big',
  7674. 'not null' => '',
  7675. ),
  7676. 'normscore' => array(
  7677. // 'description' => 'TODO: please describe this field!',
  7678. 'type' => 'float',
  7679. 'size' => 'big',
  7680. 'not null' => '',
  7681. ),
  7682. 'significance' => array(
  7683. // 'description' => 'TODO: please describe this field!',
  7684. 'type' => 'float',
  7685. 'size' => 'big',
  7686. 'not null' => '',
  7687. ),
  7688. 'identity' => array(
  7689. // 'description' => 'TODO: please describe this field!',
  7690. 'type' => 'float',
  7691. 'size' => 'big',
  7692. 'not null' => '',
  7693. ),
  7694. ),
  7695. 'primary key' => array(
  7696. '0' => 'analysisfeature_id',
  7697. ),
  7698. 'unique keys' => array(
  7699. 'analysisfeature_c1' => array(
  7700. '0' => 'feature_id',
  7701. '1' => 'analysis_id',
  7702. ),
  7703. ),
  7704. 'indexes' => array(
  7705. 'analysisfeature_idx1' => array(
  7706. '0' => 'feature_id',
  7707. ),
  7708. 'analysisfeature_idx2' => array(
  7709. '0' => 'analysis_id',
  7710. ),
  7711. ),
  7712. 'foreign keys' => array(
  7713. ),
  7714. );
  7715. return $description;
  7716. }
  7717. /****************************************************************************
  7718. * Implements hook_analysisfeatureprop_schema()
  7719. * Purpose: To describe the structure of analysisfeatureprop to tripal
  7720. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7721. * @see tripal_core.api.inc: tripal_core_chado_update()
  7722. * @see tripal_core.api.inc: tripal_core_chado_select()
  7723. *
  7724. * @return
  7725. * An array describing the current table
  7726. */
  7727. function tripal_core_chado_analysisfeatureprop_schema () {
  7728. $description = array();
  7729. $description = array(
  7730. 'table' => 'analysisfeatureprop',
  7731. // 'description' => 'TODO: please describe this table!',
  7732. 'fields' => array(
  7733. 'analysisfeatureprop_id' => array(
  7734. // 'description' => 'TODO: please describe this field!',
  7735. 'type' => 'serial',
  7736. 'not null' => '1',
  7737. ),
  7738. 'analysisfeature_id' => array(
  7739. // 'description' => 'TODO: please describe this field!',
  7740. 'type' => 'int',
  7741. 'not null' => '1',
  7742. ),
  7743. 'type_id' => array(
  7744. // 'description' => 'TODO: please describe this field!',
  7745. 'type' => 'int',
  7746. 'not null' => '1',
  7747. ),
  7748. 'value' => array(
  7749. // 'description' => 'TODO: please describe this field!',
  7750. 'type' => 'text',
  7751. 'not null' => '',
  7752. ),
  7753. 'rank' => array(
  7754. // 'description' => 'TODO: please describe this field!',
  7755. 'type' => 'int',
  7756. 'not null' => '1',
  7757. ),
  7758. ),
  7759. 'primary key' => array(
  7760. '0' => 'analysisfeatureprop_id',
  7761. ),
  7762. 'unique keys' => array(
  7763. 'analysisfeature_id_type_id_rank' => array(
  7764. '0' => 'analysisfeature_id',
  7765. '1' => 'type_id',
  7766. '2' => 'rank',
  7767. ),
  7768. ),
  7769. 'indexes' => array(
  7770. ),
  7771. 'foreign keys' => array(
  7772. ),
  7773. );
  7774. return $description;
  7775. }
  7776. /****************************************************************************
  7777. * Implements hook_assayprop_schema()
  7778. * Purpose: To describe the structure of assayprop to tripal
  7779. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7780. * @see tripal_core.api.inc: tripal_core_chado_update()
  7781. * @see tripal_core.api.inc: tripal_core_chado_select()
  7782. *
  7783. * @return
  7784. * An array describing the current table
  7785. */
  7786. function tripal_core_chado_assayprop_schema () {
  7787. $description = array();
  7788. $description = array(
  7789. 'table' => 'assayprop',
  7790. // 'description' => 'TODO: please describe this table!',
  7791. 'fields' => array(
  7792. 'assayprop_id' => array(
  7793. // 'description' => 'TODO: please describe this field!',
  7794. 'type' => 'serial',
  7795. 'not null' => '1',
  7796. ),
  7797. 'assay_id' => array(
  7798. // 'description' => 'TODO: please describe this field!',
  7799. 'type' => 'int',
  7800. 'not null' => '1',
  7801. ),
  7802. 'type_id' => array(
  7803. // 'description' => 'TODO: please describe this field!',
  7804. 'type' => 'int',
  7805. 'not null' => '1',
  7806. ),
  7807. 'value' => array(
  7808. // 'description' => 'TODO: please describe this field!',
  7809. 'type' => 'text',
  7810. 'not null' => '',
  7811. ),
  7812. 'rank' => array(
  7813. // 'description' => 'TODO: please describe this field!',
  7814. 'type' => 'int',
  7815. 'not null' => '1',
  7816. 'default' => '0',
  7817. ),
  7818. ),
  7819. 'primary key' => array(
  7820. '0' => 'assayprop_id',
  7821. ),
  7822. 'unique keys' => array(
  7823. 'assayprop_c1' => array(
  7824. '0' => 'assay_id',
  7825. '1' => 'type_id',
  7826. '2' => 'rank',
  7827. ),
  7828. ),
  7829. 'indexes' => array(
  7830. 'assayprop_idx1' => array(
  7831. '0' => 'assay_id',
  7832. ),
  7833. 'assayprop_idx2' => array(
  7834. '0' => 'type_id',
  7835. ),
  7836. ),
  7837. 'foreign keys' => array(
  7838. ),
  7839. );
  7840. return $description;
  7841. }
  7842. /****************************************************************************
  7843. * Implements hook_biomaterial_schema()
  7844. * Purpose: To describe the structure of biomaterial to tripal
  7845. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7846. * @see tripal_core.api.inc: tripal_core_chado_update()
  7847. * @see tripal_core.api.inc: tripal_core_chado_select()
  7848. *
  7849. * @return
  7850. * An array describing the current table
  7851. */
  7852. function tripal_core_chado_biomaterial_schema () {
  7853. $description = array();
  7854. $description = array(
  7855. 'table' => 'biomaterial',
  7856. // 'description' => 'TODO: please describe this table!',
  7857. 'fields' => array(
  7858. 'biomaterial_id' => array(
  7859. // 'description' => 'TODO: please describe this field!',
  7860. 'type' => 'serial',
  7861. 'not null' => '1',
  7862. ),
  7863. 'taxon_id' => array(
  7864. // 'description' => 'TODO: please describe this field!',
  7865. 'type' => 'int',
  7866. 'not null' => '',
  7867. ),
  7868. 'biosourceprovider_id' => array(
  7869. // 'description' => 'TODO: please describe this field!',
  7870. 'type' => 'int',
  7871. 'not null' => '',
  7872. ),
  7873. 'dbxref_id' => array(
  7874. // 'description' => 'TODO: please describe this field!',
  7875. 'type' => 'int',
  7876. 'not null' => '',
  7877. ),
  7878. 'name' => array(
  7879. // 'description' => 'TODO: please describe this field!',
  7880. 'type' => 'text',
  7881. 'not null' => '',
  7882. ),
  7883. 'description' => array(
  7884. // 'description' => 'TODO: please describe this field!',
  7885. 'type' => 'text',
  7886. 'not null' => '',
  7887. ),
  7888. ),
  7889. 'primary key' => array(
  7890. '0' => 'biomaterial_id',
  7891. ),
  7892. 'unique keys' => array(
  7893. 'biomaterial_c1' => array(
  7894. '0' => 'name',
  7895. ),
  7896. ),
  7897. 'indexes' => array(
  7898. 'biomaterial_idx1' => array(
  7899. '0' => 'taxon_id',
  7900. ),
  7901. 'biomaterial_idx2' => array(
  7902. '0' => 'biosourceprovider_id',
  7903. ),
  7904. 'biomaterial_idx3' => array(
  7905. '0' => 'dbxref_id',
  7906. ),
  7907. ),
  7908. 'foreign keys' => array(
  7909. ),
  7910. );
  7911. return $description;
  7912. }
  7913. /****************************************************************************
  7914. * Implements hook_biomaterial_dbxref_schema()
  7915. * Purpose: To describe the structure of biomaterial_dbxref to tripal
  7916. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7917. * @see tripal_core.api.inc: tripal_core_chado_update()
  7918. * @see tripal_core.api.inc: tripal_core_chado_select()
  7919. *
  7920. * @return
  7921. * An array describing the current table
  7922. */
  7923. function tripal_core_chado_biomaterial_dbxref_schema () {
  7924. $description = array();
  7925. $description = array(
  7926. 'table' => 'biomaterial_dbxref',
  7927. // 'description' => 'TODO: please describe this table!',
  7928. 'fields' => array(
  7929. 'biomaterial_dbxref_id' => array(
  7930. // 'description' => 'TODO: please describe this field!',
  7931. 'type' => 'serial',
  7932. 'not null' => '1',
  7933. ),
  7934. 'biomaterial_id' => array(
  7935. // 'description' => 'TODO: please describe this field!',
  7936. 'type' => 'int',
  7937. 'not null' => '1',
  7938. ),
  7939. 'dbxref_id' => array(
  7940. // 'description' => 'TODO: please describe this field!',
  7941. 'type' => 'int',
  7942. 'not null' => '1',
  7943. ),
  7944. ),
  7945. 'primary key' => array(
  7946. '0' => 'biomaterial_dbxref_id',
  7947. ),
  7948. 'unique keys' => array(
  7949. 'biomaterial_dbxref_c1' => array(
  7950. '0' => 'biomaterial_id',
  7951. '1' => 'dbxref_id',
  7952. ),
  7953. ),
  7954. 'indexes' => array(
  7955. 'biomaterial_dbxref_idx1' => array(
  7956. '0' => 'biomaterial_id',
  7957. ),
  7958. 'biomaterial_dbxref_idx2' => array(
  7959. '0' => 'dbxref_id',
  7960. ),
  7961. ),
  7962. 'foreign keys' => array(
  7963. ),
  7964. );
  7965. return $description;
  7966. }
  7967. /****************************************************************************
  7968. * Implements hook_biomaterial_relationship_schema()
  7969. * Purpose: To describe the structure of biomaterial_relationship to tripal
  7970. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7971. * @see tripal_core.api.inc: tripal_core_chado_update()
  7972. * @see tripal_core.api.inc: tripal_core_chado_select()
  7973. *
  7974. * @return
  7975. * An array describing the current table
  7976. */
  7977. function tripal_core_chado_biomaterial_relationship_schema () {
  7978. $description = array();
  7979. $description = array(
  7980. 'table' => 'biomaterial_relationship',
  7981. // 'description' => 'TODO: please describe this table!',
  7982. 'fields' => array(
  7983. 'biomaterial_relationship_id' => array(
  7984. // 'description' => 'TODO: please describe this field!',
  7985. 'type' => 'serial',
  7986. 'not null' => '1',
  7987. ),
  7988. 'subject_id' => array(
  7989. // 'description' => 'TODO: please describe this field!',
  7990. 'type' => 'int',
  7991. 'not null' => '1',
  7992. ),
  7993. 'type_id' => array(
  7994. // 'description' => 'TODO: please describe this field!',
  7995. 'type' => 'int',
  7996. 'not null' => '1',
  7997. ),
  7998. 'object_id' => array(
  7999. // 'description' => 'TODO: please describe this field!',
  8000. 'type' => 'int',
  8001. 'not null' => '1',
  8002. ),
  8003. ),
  8004. 'primary key' => array(
  8005. '0' => 'biomaterial_relationship_id',
  8006. ),
  8007. 'unique keys' => array(
  8008. 'biomaterial_relationship_c1' => array(
  8009. '0' => 'subject_id',
  8010. '1' => 'object_id',
  8011. '2' => 'type_id',
  8012. ),
  8013. ),
  8014. 'indexes' => array(
  8015. 'biomaterial_relationship_idx1' => array(
  8016. '0' => 'subject_id',
  8017. ),
  8018. 'biomaterial_relationship_idx2' => array(
  8019. '0' => 'object_id',
  8020. ),
  8021. 'biomaterial_relationship_idx3' => array(
  8022. '0' => 'type_id',
  8023. ),
  8024. ),
  8025. 'foreign keys' => array(
  8026. ),
  8027. );
  8028. return $description;
  8029. }
  8030. /****************************************************************************
  8031. * Implements hook_assay_project_schema()
  8032. * Purpose: To describe the structure of assay_project to tripal
  8033. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8034. * @see tripal_core.api.inc: tripal_core_chado_update()
  8035. * @see tripal_core.api.inc: tripal_core_chado_select()
  8036. *
  8037. * @return
  8038. * An array describing the current table
  8039. */
  8040. function tripal_core_chado_assay_project_schema () {
  8041. $description = array();
  8042. $description = array(
  8043. 'table' => 'assay_project',
  8044. // 'description' => 'TODO: please describe this table!',
  8045. 'fields' => array(
  8046. 'assay_project_id' => array(
  8047. // 'description' => 'TODO: please describe this field!',
  8048. 'type' => 'serial',
  8049. 'not null' => '1',
  8050. ),
  8051. 'assay_id' => array(
  8052. // 'description' => 'TODO: please describe this field!',
  8053. 'type' => 'int',
  8054. 'not null' => '1',
  8055. ),
  8056. 'project_id' => array(
  8057. // 'description' => 'TODO: please describe this field!',
  8058. 'type' => 'int',
  8059. 'not null' => '1',
  8060. ),
  8061. ),
  8062. 'primary key' => array(
  8063. '0' => 'assay_project_id',
  8064. ),
  8065. 'unique keys' => array(
  8066. 'assay_project_c1' => array(
  8067. '0' => 'assay_id',
  8068. '1' => 'project_id',
  8069. ),
  8070. ),
  8071. 'indexes' => array(
  8072. 'assay_project_idx1' => array(
  8073. '0' => 'assay_id',
  8074. ),
  8075. 'assay_project_idx2' => array(
  8076. '0' => 'project_id',
  8077. ),
  8078. ),
  8079. 'foreign keys' => array(
  8080. ),
  8081. );
  8082. return $description;
  8083. }
  8084. /****************************************************************************
  8085. * Implements hook_assay_biomaterial_schema()
  8086. * Purpose: To describe the structure of assay_biomaterial to tripal
  8087. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8088. * @see tripal_core.api.inc: tripal_core_chado_update()
  8089. * @see tripal_core.api.inc: tripal_core_chado_select()
  8090. *
  8091. * @return
  8092. * An array describing the current table
  8093. */
  8094. function tripal_core_chado_assay_biomaterial_schema () {
  8095. $description = array();
  8096. $description = array(
  8097. 'table' => 'assay_biomaterial',
  8098. // 'description' => 'TODO: please describe this table!',
  8099. 'fields' => array(
  8100. 'assay_biomaterial_id' => array(
  8101. // 'description' => 'TODO: please describe this field!',
  8102. 'type' => 'serial',
  8103. 'not null' => '1',
  8104. ),
  8105. 'assay_id' => array(
  8106. // 'description' => 'TODO: please describe this field!',
  8107. 'type' => 'int',
  8108. 'not null' => '1',
  8109. ),
  8110. 'biomaterial_id' => array(
  8111. // 'description' => 'TODO: please describe this field!',
  8112. 'type' => 'int',
  8113. 'not null' => '1',
  8114. ),
  8115. 'channel_id' => array(
  8116. // 'description' => 'TODO: please describe this field!',
  8117. 'type' => 'int',
  8118. 'not null' => '',
  8119. ),
  8120. 'rank' => array(
  8121. // 'description' => 'TODO: please describe this field!',
  8122. 'type' => 'int',
  8123. 'not null' => '1',
  8124. 'default' => '0',
  8125. ),
  8126. ),
  8127. 'primary key' => array(
  8128. '0' => 'assay_biomaterial_id',
  8129. ),
  8130. 'unique keys' => array(
  8131. 'assay_biomaterial_c1' => array(
  8132. '0' => 'assay_id',
  8133. '1' => 'biomaterial_id',
  8134. '2' => 'channel_id',
  8135. '3' => 'rank',
  8136. ),
  8137. ),
  8138. 'indexes' => array(
  8139. 'assay_biomaterial_idx1' => array(
  8140. '0' => 'assay_id',
  8141. ),
  8142. 'assay_biomaterial_idx2' => array(
  8143. '0' => 'biomaterial_id',
  8144. ),
  8145. 'assay_biomaterial_idx3' => array(
  8146. '0' => 'channel_id',
  8147. ),
  8148. ),
  8149. 'foreign keys' => array(
  8150. ),
  8151. );
  8152. return $description;
  8153. }
  8154. /****************************************************************************
  8155. * Implements hook_analysisprop_schema()
  8156. * Purpose: To describe the structure of analysisprop to tripal
  8157. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8158. * @see tripal_core.api.inc: tripal_core_chado_update()
  8159. * @see tripal_core.api.inc: tripal_core_chado_select()
  8160. *
  8161. * @return
  8162. * An array describing the current table
  8163. */
  8164. function tripal_core_chado_analysisprop_schema () {
  8165. $description = array();
  8166. $description = array(
  8167. 'table' => 'analysisprop',
  8168. // 'description' => 'TODO: please describe this table!',
  8169. 'fields' => array(
  8170. 'analysisprop_id' => array(
  8171. // 'description' => 'TODO: please describe this field!',
  8172. 'type' => 'serial',
  8173. 'not null' => '1',
  8174. ),
  8175. 'analysis_id' => array(
  8176. // 'description' => 'TODO: please describe this field!',
  8177. 'type' => 'int',
  8178. 'not null' => '1',
  8179. ),
  8180. 'type_id' => array(
  8181. // 'description' => 'TODO: please describe this field!',
  8182. 'type' => 'int',
  8183. 'not null' => '1',
  8184. ),
  8185. 'value' => array(
  8186. // 'description' => 'TODO: please describe this field!',
  8187. 'type' => 'text',
  8188. 'not null' => '',
  8189. ),
  8190. 'rank' => array(
  8191. // 'description' => 'TODO: please describe this field!',
  8192. 'type' => 'int',
  8193. 'not null' => '1',
  8194. 'default' => '0',
  8195. ),
  8196. ),
  8197. 'primary key' => array(
  8198. '0' => 'analysisprop_id',
  8199. ),
  8200. 'unique keys' => array(
  8201. 'analysisprop_c1' => array(
  8202. '0' => 'analysis_id',
  8203. '1' => 'type_id',
  8204. '2' => 'rank',
  8205. ),
  8206. ),
  8207. 'indexes' => array(
  8208. 'analysisprop_idx1' => array(
  8209. '0' => 'analysis_id',
  8210. ),
  8211. 'analysisprop_idx2' => array(
  8212. '0' => 'type_id',
  8213. ),
  8214. ),
  8215. 'foreign keys' => array(
  8216. ),
  8217. );
  8218. return $description;
  8219. }
  8220. /****************************************************************************
  8221. * Implements hook_arraydesign_schema()
  8222. * Purpose: To describe the structure of arraydesign to tripal
  8223. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8224. * @see tripal_core.api.inc: tripal_core_chado_update()
  8225. * @see tripal_core.api.inc: tripal_core_chado_select()
  8226. *
  8227. * @return
  8228. * An array describing the current table
  8229. */
  8230. function tripal_core_chado_arraydesign_schema () {
  8231. $description = array();
  8232. $description = array(
  8233. 'table' => 'arraydesign',
  8234. // 'description' => 'TODO: please describe this table!',
  8235. 'fields' => array(
  8236. 'arraydesign_id' => array(
  8237. // 'description' => 'TODO: please describe this field!',
  8238. 'type' => 'serial',
  8239. 'not null' => '1',
  8240. ),
  8241. 'manufacturer_id' => array(
  8242. // 'description' => 'TODO: please describe this field!',
  8243. 'type' => 'int',
  8244. 'not null' => '1',
  8245. ),
  8246. 'platformtype_id' => array(
  8247. // 'description' => 'TODO: please describe this field!',
  8248. 'type' => 'int',
  8249. 'not null' => '1',
  8250. ),
  8251. 'substratetype_id' => array(
  8252. // 'description' => 'TODO: please describe this field!',
  8253. 'type' => 'int',
  8254. 'not null' => '',
  8255. ),
  8256. 'protocol_id' => array(
  8257. // 'description' => 'TODO: please describe this field!',
  8258. 'type' => 'int',
  8259. 'not null' => '',
  8260. ),
  8261. 'dbxref_id' => array(
  8262. // 'description' => 'TODO: please describe this field!',
  8263. 'type' => 'int',
  8264. 'not null' => '',
  8265. ),
  8266. 'name' => array(
  8267. // 'description' => 'TODO: please describe this field!',
  8268. 'type' => 'text',
  8269. 'not null' => '1',
  8270. ),
  8271. 'version' => array(
  8272. // 'description' => 'TODO: please describe this field!',
  8273. 'type' => 'text',
  8274. 'not null' => '',
  8275. ),
  8276. 'description' => array(
  8277. // 'description' => 'TODO: please describe this field!',
  8278. 'type' => 'text',
  8279. 'not null' => '',
  8280. ),
  8281. 'array_dimensions' => array(
  8282. // 'description' => 'TODO: please describe this field!',
  8283. 'type' => 'text',
  8284. 'not null' => '',
  8285. ),
  8286. 'element_dimensions' => array(
  8287. // 'description' => 'TODO: please describe this field!',
  8288. 'type' => 'text',
  8289. 'not null' => '',
  8290. ),
  8291. 'num_of_elements' => array(
  8292. // 'description' => 'TODO: please describe this field!',
  8293. 'type' => 'int',
  8294. 'not null' => '',
  8295. ),
  8296. 'num_array_columns' => array(
  8297. // 'description' => 'TODO: please describe this field!',
  8298. 'type' => 'int',
  8299. 'not null' => '',
  8300. ),
  8301. 'num_array_rows' => array(
  8302. // 'description' => 'TODO: please describe this field!',
  8303. 'type' => 'int',
  8304. 'not null' => '',
  8305. ),
  8306. 'num_grid_columns' => array(
  8307. // 'description' => 'TODO: please describe this field!',
  8308. 'type' => 'int',
  8309. 'not null' => '',
  8310. ),
  8311. 'num_grid_rows' => array(
  8312. // 'description' => 'TODO: please describe this field!',
  8313. 'type' => 'int',
  8314. 'not null' => '',
  8315. ),
  8316. 'num_sub_columns' => array(
  8317. // 'description' => 'TODO: please describe this field!',
  8318. 'type' => 'int',
  8319. 'not null' => '',
  8320. ),
  8321. 'num_sub_rows' => array(
  8322. // 'description' => 'TODO: please describe this field!',
  8323. 'type' => 'int',
  8324. 'not null' => '',
  8325. ),
  8326. ),
  8327. 'primary key' => array(
  8328. '0' => 'arraydesign_id',
  8329. ),
  8330. 'unique keys' => array(
  8331. 'arraydesign_c1' => array(
  8332. '0' => 'name',
  8333. ),
  8334. ),
  8335. 'indexes' => array(
  8336. 'arraydesign_idx1' => array(
  8337. '0' => 'manufacturer_id',
  8338. ),
  8339. 'arraydesign_idx2' => array(
  8340. '0' => 'platformtype_id',
  8341. ),
  8342. 'arraydesign_idx3' => array(
  8343. '0' => 'substratetype_id',
  8344. ),
  8345. 'arraydesign_idx4' => array(
  8346. '0' => 'protocol_id',
  8347. ),
  8348. 'arraydesign_idx5' => array(
  8349. '0' => 'dbxref_id',
  8350. ),
  8351. ),
  8352. 'foreign keys' => array(
  8353. ),
  8354. );
  8355. return $description;
  8356. }
  8357. /****************************************************************************
  8358. * Implements hook_arraydesignprop_schema()
  8359. * Purpose: To describe the structure of arraydesignprop to tripal
  8360. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8361. * @see tripal_core.api.inc: tripal_core_chado_update()
  8362. * @see tripal_core.api.inc: tripal_core_chado_select()
  8363. *
  8364. * @return
  8365. * An array describing the current table
  8366. */
  8367. function tripal_core_chado_arraydesignprop_schema () {
  8368. $description = array();
  8369. $description = array(
  8370. 'table' => 'arraydesignprop',
  8371. // 'description' => 'TODO: please describe this table!',
  8372. 'fields' => array(
  8373. 'arraydesignprop_id' => array(
  8374. // 'description' => 'TODO: please describe this field!',
  8375. 'type' => 'serial',
  8376. 'not null' => '1',
  8377. ),
  8378. 'arraydesign_id' => array(
  8379. // 'description' => 'TODO: please describe this field!',
  8380. 'type' => 'int',
  8381. 'not null' => '1',
  8382. ),
  8383. 'type_id' => array(
  8384. // 'description' => 'TODO: please describe this field!',
  8385. 'type' => 'int',
  8386. 'not null' => '1',
  8387. ),
  8388. 'value' => array(
  8389. // 'description' => 'TODO: please describe this field!',
  8390. 'type' => 'text',
  8391. 'not null' => '',
  8392. ),
  8393. 'rank' => array(
  8394. // 'description' => 'TODO: please describe this field!',
  8395. 'type' => 'int',
  8396. 'not null' => '1',
  8397. 'default' => '0',
  8398. ),
  8399. ),
  8400. 'primary key' => array(
  8401. '0' => 'arraydesignprop_id',
  8402. ),
  8403. 'unique keys' => array(
  8404. 'arraydesignprop_c1' => array(
  8405. '0' => 'arraydesign_id',
  8406. '1' => 'type_id',
  8407. '2' => 'rank',
  8408. ),
  8409. ),
  8410. 'indexes' => array(
  8411. 'arraydesignprop_idx1' => array(
  8412. '0' => 'arraydesign_id',
  8413. ),
  8414. 'arraydesignprop_idx2' => array(
  8415. '0' => 'type_id',
  8416. ),
  8417. ),
  8418. 'foreign keys' => array(
  8419. ),
  8420. );
  8421. return $description;
  8422. }
  8423. /****************************************************************************
  8424. * Implements hook_assay_schema()
  8425. * Purpose: To describe the structure of assay to tripal
  8426. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8427. * @see tripal_core.api.inc: tripal_core_chado_update()
  8428. * @see tripal_core.api.inc: tripal_core_chado_select()
  8429. *
  8430. * @return
  8431. * An array describing the current table
  8432. */
  8433. function tripal_core_chado_assay_schema () {
  8434. $description = array();
  8435. $description = array(
  8436. 'table' => 'assay',
  8437. // 'description' => 'TODO: please describe this table!',
  8438. 'fields' => array(
  8439. 'assay_id' => array(
  8440. // 'description' => 'TODO: please describe this field!',
  8441. 'type' => 'serial',
  8442. 'not null' => '1',
  8443. ),
  8444. 'arraydesign_id' => array(
  8445. // 'description' => 'TODO: please describe this field!',
  8446. 'type' => 'int',
  8447. 'not null' => '1',
  8448. ),
  8449. 'protocol_id' => array(
  8450. // 'description' => 'TODO: please describe this field!',
  8451. 'type' => 'int',
  8452. 'not null' => '',
  8453. ),
  8454. 'assaydate' => array(
  8455. // 'description' => 'TODO: please describe this field!',
  8456. 'type' => 'datetime',
  8457. 'not null' => '',
  8458. 'default' => 'ow(',
  8459. ),
  8460. 'arrayidentifier' => array(
  8461. // 'description' => 'TODO: please describe this field!',
  8462. 'type' => 'text',
  8463. 'not null' => '',
  8464. ),
  8465. 'arraybatchidentifier' => array(
  8466. // 'description' => 'TODO: please describe this field!',
  8467. 'type' => 'text',
  8468. 'not null' => '',
  8469. ),
  8470. 'operator_id' => array(
  8471. // 'description' => 'TODO: please describe this field!',
  8472. 'type' => 'int',
  8473. 'not null' => '1',
  8474. ),
  8475. 'dbxref_id' => array(
  8476. // 'description' => 'TODO: please describe this field!',
  8477. 'type' => 'int',
  8478. 'not null' => '',
  8479. ),
  8480. 'name' => array(
  8481. // 'description' => 'TODO: please describe this field!',
  8482. 'type' => 'text',
  8483. 'not null' => '',
  8484. ),
  8485. 'description' => array(
  8486. // 'description' => 'TODO: please describe this field!',
  8487. 'type' => 'text',
  8488. 'not null' => '',
  8489. ),
  8490. ),
  8491. 'primary key' => array(
  8492. '0' => 'assay_id',
  8493. ),
  8494. 'unique keys' => array(
  8495. 'assay_c1' => array(
  8496. '0' => 'name',
  8497. ),
  8498. ),
  8499. 'indexes' => array(
  8500. 'assay_idx1' => array(
  8501. '0' => 'arraydesign_id',
  8502. ),
  8503. 'assay_idx2' => array(
  8504. '0' => 'protocol_id',
  8505. ),
  8506. 'assay_idx3' => array(
  8507. '0' => 'operator_id',
  8508. ),
  8509. 'assay_idx4' => array(
  8510. '0' => 'dbxref_id',
  8511. ),
  8512. ),
  8513. 'foreign keys' => array(
  8514. ),
  8515. );
  8516. return $description;
  8517. }
  8518. /****************************************************************************
  8519. * Implements hook_cv_root_schema()
  8520. * Purpose: To describe the structure of cv_root to tripal
  8521. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8522. * @see tripal_core.api.inc: tripal_core_chado_update()
  8523. * @see tripal_core.api.inc: tripal_core_chado_select()
  8524. *
  8525. * @return
  8526. * An array describing the current table
  8527. */
  8528. function tripal_core_chado_cv_root_schema () {
  8529. $description = array();
  8530. $description = array(
  8531. 'table' => 'cv_root',
  8532. // 'description' => 'TODO: please describe this table!',
  8533. 'fields' => array(
  8534. 'cv_id' => array(
  8535. // 'description' => 'TODO: please describe this field!',
  8536. 'type' => 'int',
  8537. 'not null' => '',
  8538. ),
  8539. 'root_cvterm_id' => array(
  8540. // 'description' => 'TODO: please describe this field!',
  8541. 'type' => 'int',
  8542. 'not null' => '',
  8543. ),
  8544. ),
  8545. 'primary key' => array(
  8546. ),
  8547. 'unique keys' => array(
  8548. ),
  8549. 'indexes' => array(
  8550. ),
  8551. 'foreign keys' => array(
  8552. ),
  8553. );
  8554. return $description;
  8555. }
  8556. /****************************************************************************
  8557. * Implements hook_cvterm_schema()
  8558. * Purpose: To describe the structure of cvterm to tripal
  8559. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8560. * @see tripal_core.api.inc: tripal_core_chado_update()
  8561. * @see tripal_core.api.inc: tripal_core_chado_select()
  8562. *
  8563. * @return
  8564. * An array describing the current table
  8565. */
  8566. function tripal_core_chado_cvterm_schema () {
  8567. $description = array();
  8568. $description = array(
  8569. 'table' => 'cvterm',
  8570. // 'description' => 'TODO: please describe this table!',
  8571. 'fields' => array(
  8572. 'cvterm_id' => array(
  8573. // 'description' => 'TODO: please describe this field!',
  8574. 'type' => 'serial',
  8575. 'not null' => '1',
  8576. ),
  8577. 'cv_id' => array(
  8578. // 'description' => 'TODO: please describe this field!',
  8579. 'type' => 'int',
  8580. 'not null' => '1',
  8581. ),
  8582. 'name' => array(
  8583. // 'description' => 'TODO: please describe this field!',
  8584. 'type' => 'varchar',
  8585. 'length' => '1024',
  8586. 'not null' => '1',
  8587. ),
  8588. 'definition' => array(
  8589. // 'description' => 'TODO: please describe this field!',
  8590. 'type' => 'text',
  8591. 'not null' => '',
  8592. ),
  8593. 'dbxref_id' => array(
  8594. // 'description' => 'TODO: please describe this field!',
  8595. 'type' => 'int',
  8596. 'not null' => '1',
  8597. ),
  8598. 'is_obsolete' => array(
  8599. // 'description' => 'TODO: please describe this field!',
  8600. 'type' => 'int',
  8601. 'not null' => '1',
  8602. 'default' => '0',
  8603. ),
  8604. 'is_relationshiptype' => array(
  8605. // 'description' => 'TODO: please describe this field!',
  8606. 'type' => 'int',
  8607. 'not null' => '1',
  8608. 'default' => '0',
  8609. ),
  8610. ),
  8611. 'primary key' => array(
  8612. '0' => 'cvterm_id',
  8613. ),
  8614. 'unique keys' => array(
  8615. 'cvterm_c1' => array(
  8616. '0' => 'name',
  8617. '1' => 'cv_id',
  8618. '2' => 'is_obsolete',
  8619. ),
  8620. 'cvterm_c2' => array(
  8621. '0' => 'dbxref_id',
  8622. ),
  8623. ),
  8624. 'indexes' => array(
  8625. 'cvterm_idx1' => array(
  8626. '0' => 'cv_id',
  8627. ),
  8628. 'cvterm_idx2' => array(
  8629. '0' => 'name',
  8630. ),
  8631. 'cvterm_idx3' => array(
  8632. '0' => 'dbxref_id',
  8633. ),
  8634. ),
  8635. 'foreign keys' => array(
  8636. ),
  8637. );
  8638. return $description;
  8639. }
  8640. /****************************************************************************
  8641. * Implements hook_feature_dbxref_schema()
  8642. * Purpose: To describe the structure of feature_dbxref to tripal
  8643. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8644. * @see tripal_core.api.inc: tripal_core_chado_update()
  8645. * @see tripal_core.api.inc: tripal_core_chado_select()
  8646. *
  8647. * @return
  8648. * An array describing the current table
  8649. */
  8650. function tripal_core_chado_feature_dbxref_schema () {
  8651. $description = array();
  8652. $description = array(
  8653. 'table' => 'feature_dbxref',
  8654. // 'description' => 'TODO: please describe this table!',
  8655. 'fields' => array(
  8656. 'feature_dbxref_id' => array(
  8657. // 'description' => 'TODO: please describe this field!',
  8658. 'type' => 'serial',
  8659. 'not null' => '1',
  8660. ),
  8661. 'feature_id' => array(
  8662. // 'description' => 'TODO: please describe this field!',
  8663. 'type' => 'int',
  8664. 'not null' => '1',
  8665. ),
  8666. 'dbxref_id' => array(
  8667. // 'description' => 'TODO: please describe this field!',
  8668. 'type' => 'int',
  8669. 'not null' => '1',
  8670. ),
  8671. 'is_current' => array(
  8672. // 'description' => 'TODO: please describe this field!',
  8673. 'type' => 'boolean',
  8674. 'not null' => '1',
  8675. 'default' => 'ru',
  8676. ),
  8677. ),
  8678. 'primary key' => array(
  8679. '0' => 'feature_dbxref_id',
  8680. ),
  8681. 'unique keys' => array(
  8682. 'feature_dbxref_c1' => array(
  8683. '0' => 'feature_id',
  8684. '1' => 'dbxref_id',
  8685. ),
  8686. ),
  8687. 'indexes' => array(
  8688. 'feature_dbxref_idx1' => array(
  8689. '0' => 'feature_id',
  8690. ),
  8691. 'feature_dbxref_idx2' => array(
  8692. '0' => 'dbxref_id',
  8693. ),
  8694. ),
  8695. 'foreign keys' => array(
  8696. ),
  8697. );
  8698. return $description;
  8699. }
  8700. /****************************************************************************
  8701. * Implements hook_feature_cvtermprop_schema()
  8702. * Purpose: To describe the structure of feature_cvtermprop to tripal
  8703. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8704. * @see tripal_core.api.inc: tripal_core_chado_update()
  8705. * @see tripal_core.api.inc: tripal_core_chado_select()
  8706. *
  8707. * @return
  8708. * An array describing the current table
  8709. */
  8710. function tripal_core_chado_feature_cvtermprop_schema () {
  8711. $description = array();
  8712. $description = array(
  8713. 'table' => 'feature_cvtermprop',
  8714. // 'description' => 'TODO: please describe this table!',
  8715. 'fields' => array(
  8716. 'feature_cvtermprop_id' => array(
  8717. // 'description' => 'TODO: please describe this field!',
  8718. 'type' => 'serial',
  8719. 'not null' => '1',
  8720. ),
  8721. 'feature_cvterm_id' => array(
  8722. // 'description' => 'TODO: please describe this field!',
  8723. 'type' => 'int',
  8724. 'not null' => '1',
  8725. ),
  8726. 'type_id' => array(
  8727. // 'description' => 'TODO: please describe this field!',
  8728. 'type' => 'int',
  8729. 'not null' => '1',
  8730. ),
  8731. 'value' => array(
  8732. // 'description' => 'TODO: please describe this field!',
  8733. 'type' => 'text',
  8734. 'not null' => '',
  8735. ),
  8736. 'rank' => array(
  8737. // 'description' => 'TODO: please describe this field!',
  8738. 'type' => 'int',
  8739. 'not null' => '1',
  8740. 'default' => '0',
  8741. ),
  8742. ),
  8743. 'primary key' => array(
  8744. '0' => 'feature_cvtermprop_id',
  8745. ),
  8746. 'unique keys' => array(
  8747. 'feature_cvtermprop_c1' => array(
  8748. '0' => 'feature_cvterm_id',
  8749. '1' => 'type_id',
  8750. '2' => 'rank',
  8751. ),
  8752. ),
  8753. 'indexes' => array(
  8754. 'feature_cvtermprop_idx1' => array(
  8755. '0' => 'feature_cvterm_id',
  8756. ),
  8757. 'feature_cvtermprop_idx2' => array(
  8758. '0' => 'type_id',
  8759. ),
  8760. ),
  8761. 'foreign keys' => array(
  8762. ),
  8763. );
  8764. return $description;
  8765. }
  8766. /****************************************************************************
  8767. * Implements hook_feature_difference_schema()
  8768. * Purpose: To describe the structure of feature_difference to tripal
  8769. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8770. * @see tripal_core.api.inc: tripal_core_chado_update()
  8771. * @see tripal_core.api.inc: tripal_core_chado_select()
  8772. *
  8773. * @return
  8774. * An array describing the current table
  8775. */
  8776. function tripal_core_chado_feature_difference_schema () {
  8777. $description = array();
  8778. $description = array(
  8779. 'table' => 'feature_difference',
  8780. // 'description' => 'TODO: please describe this table!',
  8781. 'fields' => array(
  8782. 'subject_id' => array(
  8783. // 'description' => 'TODO: please describe this field!',
  8784. 'type' => 'int',
  8785. 'not null' => '',
  8786. ),
  8787. 'object_id' => array(
  8788. // 'description' => 'TODO: please describe this field!',
  8789. 'type' => 'int',
  8790. 'not null' => '',
  8791. ),
  8792. 'srcfeature_id' => array(
  8793. // 'description' => 'TODO: please describe this field!',
  8794. 'type' => 'int',
  8795. 'size' => 'small',
  8796. 'not null' => '',
  8797. ),
  8798. 'fmin' => array(
  8799. // 'description' => 'TODO: please describe this field!',
  8800. 'type' => 'int',
  8801. 'not null' => '',
  8802. ),
  8803. 'fmax' => array(
  8804. // 'description' => 'TODO: please describe this field!',
  8805. 'type' => 'int',
  8806. 'not null' => '',
  8807. ),
  8808. 'strand' => array(
  8809. // 'description' => 'TODO: please describe this field!',
  8810. 'type' => 'int',
  8811. 'not null' => '',
  8812. ),
  8813. ),
  8814. 'primary key' => array(
  8815. ),
  8816. 'unique keys' => array(
  8817. ),
  8818. 'indexes' => array(
  8819. ),
  8820. 'foreign keys' => array(
  8821. ),
  8822. );
  8823. return $description;
  8824. }
  8825. /****************************************************************************
  8826. * Implements hook_feature_disjoint_schema()
  8827. * Purpose: To describe the structure of feature_disjoint to tripal
  8828. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8829. * @see tripal_core.api.inc: tripal_core_chado_update()
  8830. * @see tripal_core.api.inc: tripal_core_chado_select()
  8831. *
  8832. * @return
  8833. * An array describing the current table
  8834. */
  8835. function tripal_core_chado_feature_disjoint_schema () {
  8836. $description = array();
  8837. $description = array(
  8838. 'table' => 'feature_disjoint',
  8839. // 'description' => 'TODO: please describe this table!',
  8840. 'fields' => array(
  8841. 'subject_id' => array(
  8842. // 'description' => 'TODO: please describe this field!',
  8843. 'type' => 'int',
  8844. 'not null' => '',
  8845. ),
  8846. 'object_id' => array(
  8847. // 'description' => 'TODO: please describe this field!',
  8848. 'type' => 'int',
  8849. 'not null' => '',
  8850. ),
  8851. ),
  8852. 'primary key' => array(
  8853. ),
  8854. 'unique keys' => array(
  8855. ),
  8856. 'indexes' => array(
  8857. ),
  8858. 'foreign keys' => array(
  8859. ),
  8860. );
  8861. return $description;
  8862. }
  8863. /****************************************************************************
  8864. * Implements hook_feature_distance_schema()
  8865. * Purpose: To describe the structure of feature_distance to tripal
  8866. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8867. * @see tripal_core.api.inc: tripal_core_chado_update()
  8868. * @see tripal_core.api.inc: tripal_core_chado_select()
  8869. *
  8870. * @return
  8871. * An array describing the current table
  8872. */
  8873. function tripal_core_chado_feature_distance_schema () {
  8874. $description = array();
  8875. $description = array(
  8876. 'table' => 'feature_distance',
  8877. // 'description' => 'TODO: please describe this table!',
  8878. 'fields' => array(
  8879. 'subject_id' => array(
  8880. // 'description' => 'TODO: please describe this field!',
  8881. 'type' => 'int',
  8882. 'not null' => '',
  8883. ),
  8884. 'object_id' => array(
  8885. // 'description' => 'TODO: please describe this field!',
  8886. 'type' => 'int',
  8887. 'not null' => '',
  8888. ),
  8889. 'srcfeature_id' => array(
  8890. // 'description' => 'TODO: please describe this field!',
  8891. 'type' => 'int',
  8892. 'not null' => '',
  8893. ),
  8894. 'subject_strand' => array(
  8895. // 'description' => 'TODO: please describe this field!',
  8896. 'type' => 'int',
  8897. 'size' => 'small',
  8898. 'not null' => '',
  8899. ),
  8900. 'object_strand' => array(
  8901. // 'description' => 'TODO: please describe this field!',
  8902. 'type' => 'int',
  8903. 'size' => 'small',
  8904. 'not null' => '',
  8905. ),
  8906. 'distance' => array(
  8907. // 'description' => 'TODO: please describe this field!',
  8908. 'type' => 'int',
  8909. 'not null' => '',
  8910. ),
  8911. ),
  8912. 'primary key' => array(
  8913. ),
  8914. 'unique keys' => array(
  8915. ),
  8916. 'indexes' => array(
  8917. ),
  8918. 'foreign keys' => array(
  8919. ),
  8920. );
  8921. return $description;
  8922. }
  8923. /****************************************************************************
  8924. * Implements hook_feature_cvterm_pub_schema()
  8925. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  8926. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8927. * @see tripal_core.api.inc: tripal_core_chado_update()
  8928. * @see tripal_core.api.inc: tripal_core_chado_select()
  8929. *
  8930. * @return
  8931. * An array describing the current table
  8932. */
  8933. function tripal_core_chado_feature_cvterm_pub_schema () {
  8934. $description = array();
  8935. $description = array(
  8936. 'table' => 'feature_cvterm_pub',
  8937. // 'description' => 'TODO: please describe this table!',
  8938. 'fields' => array(
  8939. 'feature_cvterm_pub_id' => array(
  8940. // 'description' => 'TODO: please describe this field!',
  8941. 'type' => 'serial',
  8942. 'not null' => '1',
  8943. ),
  8944. 'feature_cvterm_id' => array(
  8945. // 'description' => 'TODO: please describe this field!',
  8946. 'type' => 'int',
  8947. 'not null' => '1',
  8948. ),
  8949. 'pub_id' => array(
  8950. // 'description' => 'TODO: please describe this field!',
  8951. 'type' => 'int',
  8952. 'not null' => '1',
  8953. ),
  8954. ),
  8955. 'primary key' => array(
  8956. '0' => 'feature_cvterm_pub_id',
  8957. ),
  8958. 'unique keys' => array(
  8959. 'feature_cvterm_pub_c1' => array(
  8960. '0' => 'feature_cvterm_id',
  8961. '1' => 'pub_id',
  8962. ),
  8963. ),
  8964. 'indexes' => array(
  8965. 'feature_cvterm_pub_idx1' => array(
  8966. '0' => 'feature_cvterm_id',
  8967. ),
  8968. 'feature_cvterm_pub_idx2' => array(
  8969. '0' => 'pub_id',
  8970. ),
  8971. ),
  8972. 'foreign keys' => array(
  8973. ),
  8974. );
  8975. return $description;
  8976. }
  8977. /****************************************************************************
  8978. * Implements hook_feature_cvterm_dbxref_schema()
  8979. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  8980. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8981. * @see tripal_core.api.inc: tripal_core_chado_update()
  8982. * @see tripal_core.api.inc: tripal_core_chado_select()
  8983. *
  8984. * @return
  8985. * An array describing the current table
  8986. */
  8987. function tripal_core_chado_feature_cvterm_dbxref_schema () {
  8988. $description = array();
  8989. $description = array(
  8990. 'table' => 'feature_cvterm_dbxref',
  8991. // 'description' => 'TODO: please describe this table!',
  8992. 'fields' => array(
  8993. 'feature_cvterm_dbxref_id' => array(
  8994. // 'description' => 'TODO: please describe this field!',
  8995. 'type' => 'serial',
  8996. 'not null' => '1',
  8997. ),
  8998. 'feature_cvterm_id' => array(
  8999. // 'description' => 'TODO: please describe this field!',
  9000. 'type' => 'int',
  9001. 'not null' => '1',
  9002. ),
  9003. 'dbxref_id' => array(
  9004. // 'description' => 'TODO: please describe this field!',
  9005. 'type' => 'int',
  9006. 'not null' => '1',
  9007. ),
  9008. ),
  9009. 'primary key' => array(
  9010. '0' => 'feature_cvterm_dbxref_id',
  9011. ),
  9012. 'unique keys' => array(
  9013. 'feature_cvterm_dbxref_c1' => array(
  9014. '0' => 'feature_cvterm_id',
  9015. '1' => 'dbxref_id',
  9016. ),
  9017. ),
  9018. 'indexes' => array(
  9019. 'feature_cvterm_dbxref_idx1' => array(
  9020. '0' => 'feature_cvterm_id',
  9021. ),
  9022. 'feature_cvterm_dbxref_idx2' => array(
  9023. '0' => 'dbxref_id',
  9024. ),
  9025. ),
  9026. 'foreign keys' => array(
  9027. ),
  9028. );
  9029. return $description;
  9030. }
  9031. /****************************************************************************
  9032. * Implements hook_f_type_schema()
  9033. * Purpose: To describe the structure of f_type to tripal
  9034. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9035. * @see tripal_core.api.inc: tripal_core_chado_update()
  9036. * @see tripal_core.api.inc: tripal_core_chado_select()
  9037. *
  9038. * @return
  9039. * An array describing the current table
  9040. */
  9041. function tripal_core_chado_f_type_schema () {
  9042. $description = array();
  9043. $description = array(
  9044. 'table' => 'f_type',
  9045. // 'description' => 'TODO: please describe this table!',
  9046. 'fields' => array(
  9047. 'feature_id' => array(
  9048. // 'description' => 'TODO: please describe this field!',
  9049. 'type' => 'int',
  9050. 'not null' => '',
  9051. ),
  9052. 'name' => array(
  9053. // 'description' => 'TODO: please describe this field!',
  9054. 'type' => 'varchar',
  9055. 'length' => '255',
  9056. 'not null' => '',
  9057. ),
  9058. 'dbxref_id' => array(
  9059. // 'description' => 'TODO: please describe this field!',
  9060. 'type' => 'int',
  9061. 'not null' => '',
  9062. ),
  9063. 'type' => array(
  9064. // 'description' => 'TODO: please describe this field!',
  9065. 'type' => 'varchar',
  9066. 'length' => '1024',
  9067. 'not null' => '',
  9068. ),
  9069. 'residues' => array(
  9070. // 'description' => 'TODO: please describe this field!',
  9071. 'type' => 'text',
  9072. 'not null' => '',
  9073. ),
  9074. 'seqlen' => array(
  9075. // 'description' => 'TODO: please describe this field!',
  9076. 'type' => 'int',
  9077. 'not null' => '',
  9078. ),
  9079. 'md5checksum' => array(
  9080. // 'description' => 'TODO: please describe this field!',
  9081. 'type' => 'char',
  9082. 'length' => '32',
  9083. 'not null' => '',
  9084. ),
  9085. 'type_id' => array(
  9086. // 'description' => 'TODO: please describe this field!',
  9087. 'type' => 'int',
  9088. 'not null' => '',
  9089. ),
  9090. 'timeaccessioned' => array(
  9091. // 'description' => 'TODO: please describe this field!',
  9092. 'type' => 'datetime',
  9093. 'not null' => '',
  9094. ),
  9095. 'timelastmodified' => array(
  9096. // 'description' => 'TODO: please describe this field!',
  9097. 'type' => 'datetime',
  9098. 'not null' => '',
  9099. ),
  9100. ),
  9101. 'primary key' => array(
  9102. ),
  9103. 'unique keys' => array(
  9104. ),
  9105. 'indexes' => array(
  9106. ),
  9107. 'foreign keys' => array(
  9108. ),
  9109. );
  9110. return $description;
  9111. }
  9112. /****************************************************************************
  9113. * Implements hook_feature_schema()
  9114. * Purpose: To describe the structure of feature to tripal
  9115. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9116. * @see tripal_core.api.inc: tripal_core_chado_update()
  9117. * @see tripal_core.api.inc: tripal_core_chado_select()
  9118. *
  9119. * @return
  9120. * An array describing the current table
  9121. */
  9122. function tripal_core_chado_feature_schema () {
  9123. $description = array();
  9124. $description = array(
  9125. 'table' => 'feature',
  9126. // 'description' => 'TODO: please describe this table!',
  9127. 'fields' => array(
  9128. 'feature_id' => array(
  9129. // 'description' => 'TODO: please describe this field!',
  9130. 'type' => 'serial',
  9131. 'not null' => '1',
  9132. ),
  9133. 'dbxref_id' => array(
  9134. // 'description' => 'TODO: please describe this field!',
  9135. 'type' => 'int',
  9136. 'not null' => '',
  9137. ),
  9138. 'organism_id' => array(
  9139. // 'description' => 'TODO: please describe this field!',
  9140. 'type' => 'int',
  9141. 'not null' => '1',
  9142. ),
  9143. 'name' => array(
  9144. // 'description' => 'TODO: please describe this field!',
  9145. 'type' => 'varchar',
  9146. 'length' => '255',
  9147. 'not null' => '',
  9148. ),
  9149. 'uniquename' => array(
  9150. // 'description' => 'TODO: please describe this field!',
  9151. 'type' => 'text',
  9152. 'not null' => '1',
  9153. ),
  9154. 'residues' => array(
  9155. // 'description' => 'TODO: please describe this field!',
  9156. 'type' => 'text',
  9157. 'not null' => '',
  9158. ),
  9159. 'seqlen' => array(
  9160. // 'description' => 'TODO: please describe this field!',
  9161. 'type' => 'int',
  9162. 'not null' => '',
  9163. ),
  9164. 'md5checksum' => array(
  9165. // 'description' => 'TODO: please describe this field!',
  9166. 'type' => 'char',
  9167. 'length' => '32',
  9168. 'not null' => '',
  9169. ),
  9170. 'type_id' => array(
  9171. // 'description' => 'TODO: please describe this field!',
  9172. 'type' => 'int',
  9173. 'not null' => '1',
  9174. ),
  9175. 'is_analysis' => array(
  9176. // 'description' => 'TODO: please describe this field!',
  9177. 'type' => 'boolean',
  9178. 'not null' => '1',
  9179. 'default' => 'als',
  9180. ),
  9181. 'is_obsolete' => array(
  9182. // 'description' => 'TODO: please describe this field!',
  9183. 'type' => 'boolean',
  9184. 'not null' => '1',
  9185. 'default' => 'als',
  9186. ),
  9187. 'timeaccessioned' => array(
  9188. // 'description' => 'TODO: please describe this field!',
  9189. 'type' => 'datetime',
  9190. 'not null' => '1',
  9191. 'default' => 'ow(',
  9192. ),
  9193. 'timelastmodified' => array(
  9194. // 'description' => 'TODO: please describe this field!',
  9195. 'type' => 'datetime',
  9196. 'not null' => '1',
  9197. 'default' => 'ow(',
  9198. ),
  9199. ),
  9200. 'primary key' => array(
  9201. '0' => 'feature_id',
  9202. ),
  9203. 'unique keys' => array(
  9204. 'feature_c1' => array(
  9205. '0' => 'organism_id',
  9206. '1' => 'uniquename',
  9207. '2' => 'type_id',
  9208. ),
  9209. ),
  9210. 'indexes' => array(
  9211. 'feature_idx1' => array(
  9212. '0' => 'dbxref_id',
  9213. ),
  9214. 'feature_idx2' => array(
  9215. '0' => 'organism_id',
  9216. ),
  9217. 'feature_idx3' => array(
  9218. '0' => 'type_id',
  9219. ),
  9220. 'feature_idx4' => array(
  9221. '0' => 'uniquename',
  9222. ),
  9223. 'feature_name_ind1' => array(
  9224. '0' => 'name',
  9225. ),
  9226. ),
  9227. 'foreign keys' => array(
  9228. ),
  9229. );
  9230. return $description;
  9231. }
  9232. /****************************************************************************
  9233. * Implements hook_feature_contains_schema()
  9234. * Purpose: To describe the structure of feature_contains to tripal
  9235. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9236. * @see tripal_core.api.inc: tripal_core_chado_update()
  9237. * @see tripal_core.api.inc: tripal_core_chado_select()
  9238. *
  9239. * @return
  9240. * An array describing the current table
  9241. */
  9242. function tripal_core_chado_feature_contains_schema () {
  9243. $description = array();
  9244. $description = array(
  9245. 'table' => 'feature_contains',
  9246. // 'description' => 'TODO: please describe this table!',
  9247. 'fields' => array(
  9248. 'subject_id' => array(
  9249. // 'description' => 'TODO: please describe this field!',
  9250. 'type' => 'int',
  9251. 'not null' => '',
  9252. ),
  9253. 'object_id' => array(
  9254. // 'description' => 'TODO: please describe this field!',
  9255. 'type' => 'int',
  9256. 'not null' => '',
  9257. ),
  9258. ),
  9259. 'primary key' => array(
  9260. ),
  9261. 'unique keys' => array(
  9262. ),
  9263. 'indexes' => array(
  9264. ),
  9265. 'foreign keys' => array(
  9266. ),
  9267. );
  9268. return $description;
  9269. }
  9270. /****************************************************************************
  9271. * Implements hook_feature_cvterm_schema()
  9272. * Purpose: To describe the structure of feature_cvterm to tripal
  9273. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9274. * @see tripal_core.api.inc: tripal_core_chado_update()
  9275. * @see tripal_core.api.inc: tripal_core_chado_select()
  9276. *
  9277. * @return
  9278. * An array describing the current table
  9279. */
  9280. function tripal_core_chado_feature_cvterm_schema () {
  9281. $description = array();
  9282. $description = array(
  9283. 'table' => 'feature_cvterm',
  9284. // 'description' => 'TODO: please describe this table!',
  9285. 'fields' => array(
  9286. 'feature_cvterm_id' => array(
  9287. // 'description' => 'TODO: please describe this field!',
  9288. 'type' => 'serial',
  9289. 'not null' => '1',
  9290. ),
  9291. 'feature_id' => array(
  9292. // 'description' => 'TODO: please describe this field!',
  9293. 'type' => 'int',
  9294. 'not null' => '1',
  9295. ),
  9296. 'cvterm_id' => array(
  9297. // 'description' => 'TODO: please describe this field!',
  9298. 'type' => 'int',
  9299. 'not null' => '1',
  9300. ),
  9301. 'pub_id' => array(
  9302. // 'description' => 'TODO: please describe this field!',
  9303. 'type' => 'int',
  9304. 'not null' => '1',
  9305. ),
  9306. 'is_not' => array(
  9307. // 'description' => 'TODO: please describe this field!',
  9308. 'type' => 'boolean',
  9309. 'not null' => '1',
  9310. 'default' => 'als',
  9311. ),
  9312. 'rank' => array(
  9313. // 'description' => 'TODO: please describe this field!',
  9314. 'type' => 'int',
  9315. 'not null' => '1',
  9316. 'default' => '0',
  9317. ),
  9318. ),
  9319. 'primary key' => array(
  9320. '0' => 'feature_cvterm_id',
  9321. ),
  9322. 'unique keys' => array(
  9323. 'feature_cvterm_c1' => array(
  9324. '0' => 'feature_id',
  9325. '1' => 'cvterm_id',
  9326. '2' => 'pub_id',
  9327. '3' => 'rank',
  9328. ),
  9329. ),
  9330. 'indexes' => array(
  9331. 'feature_cvterm_idx1' => array(
  9332. '0' => 'feature_id',
  9333. ),
  9334. 'feature_cvterm_idx2' => array(
  9335. '0' => 'cvterm_id',
  9336. ),
  9337. 'feature_cvterm_idx3' => array(
  9338. '0' => 'pub_id',
  9339. ),
  9340. ),
  9341. 'foreign keys' => array(
  9342. ),
  9343. );
  9344. return $description;
  9345. }
  9346. /****************************************************************************
  9347. * Implements hook_feature_expression_schema()
  9348. * Purpose: To describe the structure of feature_expression to tripal
  9349. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9350. * @see tripal_core.api.inc: tripal_core_chado_update()
  9351. * @see tripal_core.api.inc: tripal_core_chado_select()
  9352. *
  9353. * @return
  9354. * An array describing the current table
  9355. */
  9356. function tripal_core_chado_feature_expression_schema () {
  9357. $description = array();
  9358. $description = array(
  9359. 'table' => 'feature_expression',
  9360. // 'description' => 'TODO: please describe this table!',
  9361. 'fields' => array(
  9362. 'feature_expression_id' => array(
  9363. // 'description' => 'TODO: please describe this field!',
  9364. 'type' => 'serial',
  9365. 'not null' => '1',
  9366. ),
  9367. 'expression_id' => array(
  9368. // 'description' => 'TODO: please describe this field!',
  9369. 'type' => 'int',
  9370. 'not null' => '1',
  9371. ),
  9372. 'feature_id' => array(
  9373. // 'description' => 'TODO: please describe this field!',
  9374. 'type' => 'int',
  9375. 'not null' => '1',
  9376. ),
  9377. 'pub_id' => array(
  9378. // 'description' => 'TODO: please describe this field!',
  9379. 'type' => 'int',
  9380. 'not null' => '1',
  9381. ),
  9382. ),
  9383. 'primary key' => array(
  9384. '0' => 'feature_expression_id',
  9385. ),
  9386. 'unique keys' => array(
  9387. 'feature_expression_c1' => array(
  9388. '0' => 'expression_id',
  9389. '1' => 'feature_id',
  9390. '2' => 'pub_id',
  9391. ),
  9392. ),
  9393. 'indexes' => array(
  9394. 'feature_expression_idx1' => array(
  9395. '0' => 'expression_id',
  9396. ),
  9397. 'feature_expression_idx2' => array(
  9398. '0' => 'feature_id',
  9399. ),
  9400. 'feature_expression_idx3' => array(
  9401. '0' => 'pub_id',
  9402. ),
  9403. ),
  9404. 'foreign keys' => array(
  9405. ),
  9406. );
  9407. return $description;
  9408. }
  9409. /****************************************************************************
  9410. * Implements hook_feature_expressionprop_schema()
  9411. * Purpose: To describe the structure of feature_expressionprop to tripal
  9412. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9413. * @see tripal_core.api.inc: tripal_core_chado_update()
  9414. * @see tripal_core.api.inc: tripal_core_chado_select()
  9415. *
  9416. * @return
  9417. * An array describing the current table
  9418. */
  9419. function tripal_core_chado_feature_expressionprop_schema () {
  9420. $description = array();
  9421. $description = array(
  9422. 'table' => 'feature_expressionprop',
  9423. // 'description' => 'TODO: please describe this table!',
  9424. 'fields' => array(
  9425. 'feature_expressionprop_id' => array(
  9426. // 'description' => 'TODO: please describe this field!',
  9427. 'type' => 'serial',
  9428. 'not null' => '1',
  9429. ),
  9430. 'feature_expression_id' => array(
  9431. // 'description' => 'TODO: please describe this field!',
  9432. 'type' => 'int',
  9433. 'not null' => '1',
  9434. ),
  9435. 'type_id' => array(
  9436. // 'description' => 'TODO: please describe this field!',
  9437. 'type' => 'int',
  9438. 'not null' => '1',
  9439. ),
  9440. 'value' => array(
  9441. // 'description' => 'TODO: please describe this field!',
  9442. 'type' => 'text',
  9443. 'not null' => '',
  9444. ),
  9445. 'rank' => array(
  9446. // 'description' => 'TODO: please describe this field!',
  9447. 'type' => 'int',
  9448. 'not null' => '1',
  9449. 'default' => '0',
  9450. ),
  9451. ),
  9452. 'primary key' => array(
  9453. '0' => 'feature_expressionprop_id',
  9454. ),
  9455. 'unique keys' => array(
  9456. 'feature_expressionprop_c1' => array(
  9457. '0' => 'feature_expression_id',
  9458. '1' => 'type_id',
  9459. '2' => 'rank',
  9460. ),
  9461. ),
  9462. 'indexes' => array(
  9463. 'feature_expressionprop_idx1' => array(
  9464. '0' => 'feature_expression_id',
  9465. ),
  9466. 'feature_expressionprop_idx2' => array(
  9467. '0' => 'type_id',
  9468. ),
  9469. ),
  9470. 'foreign keys' => array(
  9471. ),
  9472. );
  9473. return $description;
  9474. }
  9475. /****************************************************************************
  9476. * Implements hook_feature_pubprop_schema()
  9477. * Purpose: To describe the structure of feature_pubprop to tripal
  9478. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9479. * @see tripal_core.api.inc: tripal_core_chado_update()
  9480. * @see tripal_core.api.inc: tripal_core_chado_select()
  9481. *
  9482. * @return
  9483. * An array describing the current table
  9484. */
  9485. function tripal_core_chado_feature_pubprop_schema () {
  9486. $description = array();
  9487. $description = array(
  9488. 'table' => 'feature_pubprop',
  9489. // 'description' => 'TODO: please describe this table!',
  9490. 'fields' => array(
  9491. 'feature_pubprop_id' => array(
  9492. // 'description' => 'TODO: please describe this field!',
  9493. 'type' => 'serial',
  9494. 'not null' => '1',
  9495. ),
  9496. 'feature_pub_id' => array(
  9497. // 'description' => 'TODO: please describe this field!',
  9498. 'type' => 'int',
  9499. 'not null' => '1',
  9500. ),
  9501. 'type_id' => array(
  9502. // 'description' => 'TODO: please describe this field!',
  9503. 'type' => 'int',
  9504. 'not null' => '1',
  9505. ),
  9506. 'value' => array(
  9507. // 'description' => 'TODO: please describe this field!',
  9508. 'type' => 'text',
  9509. 'not null' => '',
  9510. ),
  9511. 'rank' => array(
  9512. // 'description' => 'TODO: please describe this field!',
  9513. 'type' => 'int',
  9514. 'not null' => '1',
  9515. 'default' => '0',
  9516. ),
  9517. ),
  9518. 'primary key' => array(
  9519. '0' => 'feature_pubprop_id',
  9520. ),
  9521. 'unique keys' => array(
  9522. 'feature_pubprop_c1' => array(
  9523. '0' => 'feature_pub_id',
  9524. '1' => 'type_id',
  9525. '2' => 'rank',
  9526. ),
  9527. ),
  9528. 'indexes' => array(
  9529. 'feature_pubprop_idx1' => array(
  9530. '0' => 'feature_pub_id',
  9531. ),
  9532. ),
  9533. 'foreign keys' => array(
  9534. ),
  9535. );
  9536. return $description;
  9537. }
  9538. /****************************************************************************
  9539. * Implements hook_feature_relationship_schema()
  9540. * Purpose: To describe the structure of feature_relationship to tripal
  9541. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9542. * @see tripal_core.api.inc: tripal_core_chado_update()
  9543. * @see tripal_core.api.inc: tripal_core_chado_select()
  9544. *
  9545. * @return
  9546. * An array describing the current table
  9547. */
  9548. function tripal_core_chado_feature_relationship_schema () {
  9549. $description = array();
  9550. $description = array(
  9551. 'table' => 'feature_relationship',
  9552. // 'description' => 'TODO: please describe this table!',
  9553. 'fields' => array(
  9554. 'feature_relationship_id' => array(
  9555. // 'description' => 'TODO: please describe this field!',
  9556. 'type' => 'serial',
  9557. 'not null' => '1',
  9558. ),
  9559. 'subject_id' => array(
  9560. // 'description' => 'TODO: please describe this field!',
  9561. 'type' => 'int',
  9562. 'not null' => '1',
  9563. ),
  9564. 'object_id' => array(
  9565. // 'description' => 'TODO: please describe this field!',
  9566. 'type' => 'int',
  9567. 'not null' => '1',
  9568. ),
  9569. 'type_id' => array(
  9570. // 'description' => 'TODO: please describe this field!',
  9571. 'type' => 'int',
  9572. 'not null' => '1',
  9573. ),
  9574. 'value' => array(
  9575. // 'description' => 'TODO: please describe this field!',
  9576. 'type' => 'text',
  9577. 'not null' => '',
  9578. ),
  9579. 'rank' => array(
  9580. // 'description' => 'TODO: please describe this field!',
  9581. 'type' => 'int',
  9582. 'not null' => '1',
  9583. 'default' => '0',
  9584. ),
  9585. ),
  9586. 'primary key' => array(
  9587. '0' => 'feature_relationship_id',
  9588. ),
  9589. 'unique keys' => array(
  9590. 'feature_relationship_c1' => array(
  9591. '0' => 'subject_id',
  9592. '1' => 'object_id',
  9593. '2' => 'type_id',
  9594. '3' => 'rank',
  9595. ),
  9596. ),
  9597. 'indexes' => array(
  9598. 'feature_relationship_idx1' => array(
  9599. '0' => 'subject_id',
  9600. ),
  9601. 'feature_relationship_idx2' => array(
  9602. '0' => 'object_id',
  9603. ),
  9604. 'feature_relationship_idx3' => array(
  9605. '0' => 'type_id',
  9606. ),
  9607. ),
  9608. 'foreign keys' => array(
  9609. ),
  9610. );
  9611. return $description;
  9612. }
  9613. /****************************************************************************
  9614. * Implements hook_feature_relationship_pub_schema()
  9615. * Purpose: To describe the structure of feature_relationship_pub to tripal
  9616. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9617. * @see tripal_core.api.inc: tripal_core_chado_update()
  9618. * @see tripal_core.api.inc: tripal_core_chado_select()
  9619. *
  9620. * @return
  9621. * An array describing the current table
  9622. */
  9623. function tripal_core_chado_feature_relationship_pub_schema () {
  9624. $description = array();
  9625. $description = array(
  9626. 'table' => 'feature_relationship_pub',
  9627. // 'description' => 'TODO: please describe this table!',
  9628. 'fields' => array(
  9629. 'feature_relationship_pub_id' => array(
  9630. // 'description' => 'TODO: please describe this field!',
  9631. 'type' => 'serial',
  9632. 'not null' => '1',
  9633. ),
  9634. 'feature_relationship_id' => array(
  9635. // 'description' => 'TODO: please describe this field!',
  9636. 'type' => 'int',
  9637. 'not null' => '1',
  9638. ),
  9639. 'pub_id' => array(
  9640. // 'description' => 'TODO: please describe this field!',
  9641. 'type' => 'int',
  9642. 'not null' => '1',
  9643. ),
  9644. ),
  9645. 'primary key' => array(
  9646. '0' => 'feature_relationship_pub_id',
  9647. ),
  9648. 'unique keys' => array(
  9649. 'feature_relationship_pub_c1' => array(
  9650. '0' => 'feature_relationship_id',
  9651. '1' => 'pub_id',
  9652. ),
  9653. ),
  9654. 'indexes' => array(
  9655. 'feature_relationship_pub_idx1' => array(
  9656. '0' => 'feature_relationship_id',
  9657. ),
  9658. 'feature_relationship_pub_idx2' => array(
  9659. '0' => 'pub_id',
  9660. ),
  9661. ),
  9662. 'foreign keys' => array(
  9663. ),
  9664. );
  9665. return $description;
  9666. }
  9667. /****************************************************************************
  9668. * Implements hook_feature_relationshipprop_schema()
  9669. * Purpose: To describe the structure of feature_relationshipprop to tripal
  9670. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9671. * @see tripal_core.api.inc: tripal_core_chado_update()
  9672. * @see tripal_core.api.inc: tripal_core_chado_select()
  9673. *
  9674. * @return
  9675. * An array describing the current table
  9676. */
  9677. function tripal_core_chado_feature_relationshipprop_schema () {
  9678. $description = array();
  9679. $description = array(
  9680. 'table' => 'feature_relationshipprop',
  9681. // 'description' => 'TODO: please describe this table!',
  9682. 'fields' => array(
  9683. 'feature_relationshipprop_id' => array(
  9684. // 'description' => 'TODO: please describe this field!',
  9685. 'type' => 'serial',
  9686. 'not null' => '1',
  9687. ),
  9688. 'feature_relationship_id' => array(
  9689. // 'description' => 'TODO: please describe this field!',
  9690. 'type' => 'int',
  9691. 'not null' => '1',
  9692. ),
  9693. 'type_id' => array(
  9694. // 'description' => 'TODO: please describe this field!',
  9695. 'type' => 'int',
  9696. 'not null' => '1',
  9697. ),
  9698. 'value' => array(
  9699. // 'description' => 'TODO: please describe this field!',
  9700. 'type' => 'text',
  9701. 'not null' => '',
  9702. ),
  9703. 'rank' => array(
  9704. // 'description' => 'TODO: please describe this field!',
  9705. 'type' => 'int',
  9706. 'not null' => '1',
  9707. 'default' => '0',
  9708. ),
  9709. ),
  9710. 'primary key' => array(
  9711. '0' => 'feature_relationshipprop_id',
  9712. ),
  9713. 'unique keys' => array(
  9714. 'feature_relationshipprop_c1' => array(
  9715. '0' => 'feature_relationship_id',
  9716. '1' => 'type_id',
  9717. '2' => 'rank',
  9718. ),
  9719. ),
  9720. 'indexes' => array(
  9721. 'feature_relationshipprop_idx1' => array(
  9722. '0' => 'feature_relationship_id',
  9723. ),
  9724. 'feature_relationshipprop_idx2' => array(
  9725. '0' => 'type_id',
  9726. ),
  9727. ),
  9728. 'foreign keys' => array(
  9729. ),
  9730. );
  9731. return $description;
  9732. }
  9733. /****************************************************************************
  9734. * Implements hook_feature_pub_schema()
  9735. * Purpose: To describe the structure of feature_pub to tripal
  9736. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9737. * @see tripal_core.api.inc: tripal_core_chado_update()
  9738. * @see tripal_core.api.inc: tripal_core_chado_select()
  9739. *
  9740. * @return
  9741. * An array describing the current table
  9742. */
  9743. function tripal_core_chado_feature_pub_schema () {
  9744. $description = array();
  9745. $description = array(
  9746. 'table' => 'feature_pub',
  9747. // 'description' => 'TODO: please describe this table!',
  9748. 'fields' => array(
  9749. 'feature_pub_id' => array(
  9750. // 'description' => 'TODO: please describe this field!',
  9751. 'type' => 'serial',
  9752. 'not null' => '1',
  9753. ),
  9754. 'feature_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. ),
  9765. 'primary key' => array(
  9766. '0' => 'feature_pub_id',
  9767. ),
  9768. 'unique keys' => array(
  9769. 'feature_pub_c1' => array(
  9770. '0' => 'feature_id',
  9771. '1' => 'pub_id',
  9772. ),
  9773. ),
  9774. 'indexes' => array(
  9775. 'feature_pub_idx1' => array(
  9776. '0' => 'feature_id',
  9777. ),
  9778. 'feature_pub_idx2' => array(
  9779. '0' => 'pub_id',
  9780. ),
  9781. ),
  9782. 'foreign keys' => array(
  9783. ),
  9784. );
  9785. return $description;
  9786. }
  9787. /****************************************************************************
  9788. * Implements hook_feature_phenotype_schema()
  9789. * Purpose: To describe the structure of feature_phenotype to tripal
  9790. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9791. * @see tripal_core.api.inc: tripal_core_chado_update()
  9792. * @see tripal_core.api.inc: tripal_core_chado_select()
  9793. *
  9794. * @return
  9795. * An array describing the current table
  9796. */
  9797. function tripal_core_chado_feature_phenotype_schema () {
  9798. $description = array();
  9799. $description = array(
  9800. 'table' => 'feature_phenotype',
  9801. // 'description' => 'TODO: please describe this table!',
  9802. 'fields' => array(
  9803. 'feature_phenotype_id' => array(
  9804. // 'description' => 'TODO: please describe this field!',
  9805. 'type' => 'serial',
  9806. 'not null' => '1',
  9807. ),
  9808. 'feature_id' => array(
  9809. // 'description' => 'TODO: please describe this field!',
  9810. 'type' => 'int',
  9811. 'not null' => '1',
  9812. ),
  9813. 'phenotype_id' => array(
  9814. // 'description' => 'TODO: please describe this field!',
  9815. 'type' => 'int',
  9816. 'not null' => '1',
  9817. ),
  9818. ),
  9819. 'primary key' => array(
  9820. '0' => 'feature_phenotype_id',
  9821. ),
  9822. 'unique keys' => array(
  9823. 'feature_phenotype_c1' => array(
  9824. '0' => 'feature_id',
  9825. '1' => 'phenotype_id',
  9826. ),
  9827. ),
  9828. 'indexes' => array(
  9829. 'feature_phenotype_idx1' => array(
  9830. '0' => 'feature_id',
  9831. ),
  9832. 'feature_phenotype_idx2' => array(
  9833. '0' => 'phenotype_id',
  9834. ),
  9835. ),
  9836. 'foreign keys' => array(
  9837. ),
  9838. );
  9839. return $description;
  9840. }
  9841. /****************************************************************************
  9842. * Implements hook_feature_genotype_schema()
  9843. * Purpose: To describe the structure of feature_genotype to tripal
  9844. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9845. * @see tripal_core.api.inc: tripal_core_chado_update()
  9846. * @see tripal_core.api.inc: tripal_core_chado_select()
  9847. *
  9848. * @return
  9849. * An array describing the current table
  9850. */
  9851. function tripal_core_chado_feature_genotype_schema () {
  9852. $description = array();
  9853. $description = array(
  9854. 'table' => 'feature_genotype',
  9855. // 'description' => 'TODO: please describe this table!',
  9856. 'fields' => array(
  9857. 'feature_genotype_id' => array(
  9858. // 'description' => 'TODO: please describe this field!',
  9859. 'type' => 'serial',
  9860. 'not null' => '1',
  9861. ),
  9862. 'feature_id' => array(
  9863. // 'description' => 'TODO: please describe this field!',
  9864. 'type' => 'int',
  9865. 'not null' => '1',
  9866. ),
  9867. 'genotype_id' => array(
  9868. // 'description' => 'TODO: please describe this field!',
  9869. 'type' => 'int',
  9870. 'not null' => '1',
  9871. ),
  9872. 'chromosome_id' => array(
  9873. // 'description' => 'TODO: please describe this field!',
  9874. 'type' => 'int',
  9875. 'not null' => '',
  9876. ),
  9877. 'rank' => array(
  9878. // 'description' => 'TODO: please describe this field!',
  9879. 'type' => 'int',
  9880. 'not null' => '1',
  9881. ),
  9882. 'cgroup' => array(
  9883. // 'description' => 'TODO: please describe this field!',
  9884. 'type' => 'int',
  9885. 'not null' => '1',
  9886. ),
  9887. 'cvterm_id' => array(
  9888. // 'description' => 'TODO: please describe this field!',
  9889. 'type' => 'int',
  9890. 'not null' => '1',
  9891. ),
  9892. ),
  9893. 'primary key' => array(
  9894. '0' => 'feature_genotype_id',
  9895. ),
  9896. 'unique keys' => array(
  9897. 'feature_genotype_c1' => array(
  9898. '0' => 'feature_id',
  9899. '1' => 'genotype_id',
  9900. '2' => 'cvterm_id',
  9901. '3' => 'chromosome_id',
  9902. '4' => 'rank',
  9903. '5' => 'cgroup',
  9904. ),
  9905. ),
  9906. 'indexes' => array(
  9907. 'feature_genotype_idx1' => array(
  9908. '0' => 'feature_id',
  9909. ),
  9910. 'feature_genotype_idx2' => array(
  9911. '0' => 'genotype_id',
  9912. ),
  9913. ),
  9914. 'foreign keys' => array(
  9915. ),
  9916. );
  9917. return $description;
  9918. }
  9919. /****************************************************************************
  9920. * Implements hook_feature_intersection_schema()
  9921. * Purpose: To describe the structure of feature_intersection to tripal
  9922. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9923. * @see tripal_core.api.inc: tripal_core_chado_update()
  9924. * @see tripal_core.api.inc: tripal_core_chado_select()
  9925. *
  9926. * @return
  9927. * An array describing the current table
  9928. */
  9929. function tripal_core_chado_feature_intersection_schema () {
  9930. $description = array();
  9931. $description = array(
  9932. 'table' => 'feature_intersection',
  9933. // 'description' => 'TODO: please describe this table!',
  9934. 'fields' => array(
  9935. 'subject_id' => array(
  9936. // 'description' => 'TODO: please describe this field!',
  9937. 'type' => 'int',
  9938. 'not null' => '',
  9939. ),
  9940. 'object_id' => array(
  9941. // 'description' => 'TODO: please describe this field!',
  9942. 'type' => 'int',
  9943. 'not null' => '',
  9944. ),
  9945. 'srcfeature_id' => array(
  9946. // 'description' => 'TODO: please describe this field!',
  9947. 'type' => 'int',
  9948. 'not null' => '',
  9949. ),
  9950. 'subject_strand' => array(
  9951. // 'description' => 'TODO: please describe this field!',
  9952. 'type' => 'int',
  9953. 'size' => 'small',
  9954. 'not null' => '',
  9955. ),
  9956. 'object_strand' => array(
  9957. // 'description' => 'TODO: please describe this field!',
  9958. 'type' => 'int',
  9959. 'size' => 'small',
  9960. 'not null' => '',
  9961. ),
  9962. 'fmin' => array(
  9963. // 'description' => 'TODO: please describe this field!',
  9964. 'type' => 'int',
  9965. 'not null' => '',
  9966. ),
  9967. 'fmax' => array(
  9968. // 'description' => 'TODO: please describe this field!',
  9969. 'type' => 'int',
  9970. 'not null' => '',
  9971. ),
  9972. ),
  9973. 'primary key' => array(
  9974. ),
  9975. 'unique keys' => array(
  9976. ),
  9977. 'indexes' => array(
  9978. ),
  9979. 'foreign keys' => array(
  9980. ),
  9981. );
  9982. return $description;
  9983. }
  9984. /****************************************************************************
  9985. * Implements hook_feature_meets_schema()
  9986. * Purpose: To describe the structure of feature_meets to tripal
  9987. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9988. * @see tripal_core.api.inc: tripal_core_chado_update()
  9989. * @see tripal_core.api.inc: tripal_core_chado_select()
  9990. *
  9991. * @return
  9992. * An array describing the current table
  9993. */
  9994. function tripal_core_chado_feature_meets_schema () {
  9995. $description = array();
  9996. $description = array(
  9997. 'table' => 'feature_meets',
  9998. // 'description' => 'TODO: please describe this table!',
  9999. 'fields' => array(
  10000. 'subject_id' => array(
  10001. // 'description' => 'TODO: please describe this field!',
  10002. 'type' => 'int',
  10003. 'not null' => '',
  10004. ),
  10005. 'object_id' => array(
  10006. // 'description' => 'TODO: please describe this field!',
  10007. 'type' => 'int',
  10008. 'not null' => '',
  10009. ),
  10010. ),
  10011. 'primary key' => array(
  10012. ),
  10013. 'unique keys' => array(
  10014. ),
  10015. 'indexes' => array(
  10016. ),
  10017. 'foreign keys' => array(
  10018. ),
  10019. );
  10020. return $description;
  10021. }
  10022. /****************************************************************************
  10023. * Implements hook_feature_meets_on_same_strand_schema()
  10024. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10025. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10026. * @see tripal_core.api.inc: tripal_core_chado_update()
  10027. * @see tripal_core.api.inc: tripal_core_chado_select()
  10028. *
  10029. * @return
  10030. * An array describing the current table
  10031. */
  10032. function tripal_core_chado_feature_meets_on_same_strand_schema () {
  10033. $description = array();
  10034. $description = array(
  10035. 'table' => 'feature_meets_on_same_strand',
  10036. // 'description' => 'TODO: please describe this table!',
  10037. 'fields' => array(
  10038. 'subject_id' => array(
  10039. // 'description' => 'TODO: please describe this field!',
  10040. 'type' => 'int',
  10041. 'not null' => '',
  10042. ),
  10043. 'object_id' => array(
  10044. // 'description' => 'TODO: please describe this field!',
  10045. 'type' => 'int',
  10046. 'not null' => '',
  10047. ),
  10048. ),
  10049. 'primary key' => array(
  10050. ),
  10051. 'unique keys' => array(
  10052. ),
  10053. 'indexes' => array(
  10054. ),
  10055. 'foreign keys' => array(
  10056. ),
  10057. );
  10058. return $description;
  10059. }
  10060. /****************************************************************************
  10061. * Implements hook_f_loc_schema()
  10062. * Purpose: To describe the structure of f_loc to tripal
  10063. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10064. * @see tripal_core.api.inc: tripal_core_chado_update()
  10065. * @see tripal_core.api.inc: tripal_core_chado_select()
  10066. *
  10067. * @return
  10068. * An array describing the current table
  10069. */
  10070. function tripal_core_chado_f_loc_schema () {
  10071. $description = array();
  10072. $description = array(
  10073. 'table' => 'f_loc',
  10074. // 'description' => 'TODO: please describe this table!',
  10075. 'fields' => array(
  10076. 'feature_id' => array(
  10077. // 'description' => 'TODO: please describe this field!',
  10078. 'type' => 'int',
  10079. 'not null' => '',
  10080. ),
  10081. 'name' => array(
  10082. // 'description' => 'TODO: please describe this field!',
  10083. 'type' => 'varchar',
  10084. 'length' => '255',
  10085. 'not null' => '',
  10086. ),
  10087. 'dbxref_id' => array(
  10088. // 'description' => 'TODO: please describe this field!',
  10089. 'type' => 'int',
  10090. 'not null' => '',
  10091. ),
  10092. 'nbeg' => array(
  10093. // 'description' => 'TODO: please describe this field!',
  10094. 'type' => 'int',
  10095. 'not null' => '',
  10096. ),
  10097. 'nend' => array(
  10098. // 'description' => 'TODO: please describe this field!',
  10099. 'type' => 'int',
  10100. 'not null' => '',
  10101. ),
  10102. 'strand' => array(
  10103. // 'description' => 'TODO: please describe this field!',
  10104. 'type' => 'int',
  10105. 'size' => 'small',
  10106. 'not null' => '',
  10107. ),
  10108. ),
  10109. 'primary key' => array(
  10110. ),
  10111. 'unique keys' => array(
  10112. ),
  10113. 'indexes' => array(
  10114. ),
  10115. 'foreign keys' => array(
  10116. ),
  10117. );
  10118. return $description;
  10119. }
  10120. /****************************************************************************
  10121. * Implements hook_expressionprop_schema()
  10122. * Purpose: To describe the structure of expressionprop to tripal
  10123. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10124. * @see tripal_core.api.inc: tripal_core_chado_update()
  10125. * @see tripal_core.api.inc: tripal_core_chado_select()
  10126. *
  10127. * @return
  10128. * An array describing the current table
  10129. */
  10130. function tripal_core_chado_expressionprop_schema () {
  10131. $description = array();
  10132. $description = array(
  10133. 'table' => 'expressionprop',
  10134. // 'description' => 'TODO: please describe this table!',
  10135. 'fields' => array(
  10136. 'expressionprop_id' => array(
  10137. // 'description' => 'TODO: please describe this field!',
  10138. 'type' => 'serial',
  10139. 'not null' => '1',
  10140. ),
  10141. 'expression_id' => array(
  10142. // 'description' => 'TODO: please describe this field!',
  10143. 'type' => 'int',
  10144. 'not null' => '1',
  10145. ),
  10146. 'type_id' => array(
  10147. // 'description' => 'TODO: please describe this field!',
  10148. 'type' => 'int',
  10149. 'not null' => '1',
  10150. ),
  10151. 'value' => array(
  10152. // 'description' => 'TODO: please describe this field!',
  10153. 'type' => 'text',
  10154. 'not null' => '',
  10155. ),
  10156. 'rank' => array(
  10157. // 'description' => 'TODO: please describe this field!',
  10158. 'type' => 'int',
  10159. 'not null' => '1',
  10160. 'default' => '0',
  10161. ),
  10162. ),
  10163. 'primary key' => array(
  10164. '0' => 'expressionprop_id',
  10165. ),
  10166. 'unique keys' => array(
  10167. 'expressionprop_c1' => array(
  10168. '0' => 'expression_id',
  10169. '1' => 'type_id',
  10170. '2' => 'rank',
  10171. ),
  10172. ),
  10173. 'indexes' => array(
  10174. 'expressionprop_idx1' => array(
  10175. '0' => 'expression_id',
  10176. ),
  10177. 'expressionprop_idx2' => array(
  10178. '0' => 'type_id',
  10179. ),
  10180. ),
  10181. 'foreign keys' => array(
  10182. ),
  10183. );
  10184. return $description;
  10185. }
  10186. /****************************************************************************
  10187. * Implements hook_db_dbxref_count_schema()
  10188. * Purpose: To describe the structure of db_dbxref_count to tripal
  10189. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10190. * @see tripal_core.api.inc: tripal_core_chado_update()
  10191. * @see tripal_core.api.inc: tripal_core_chado_select()
  10192. *
  10193. * @return
  10194. * An array describing the current table
  10195. */
  10196. function tripal_core_chado_db_dbxref_count_schema () {
  10197. $description = array();
  10198. $description = array(
  10199. 'table' => 'db_dbxref_count',
  10200. // 'description' => 'TODO: please describe this table!',
  10201. 'fields' => array(
  10202. 'name' => array(
  10203. // 'description' => 'TODO: please describe this field!',
  10204. 'type' => 'varchar',
  10205. 'length' => '255',
  10206. 'not null' => '',
  10207. ),
  10208. 'num_dbxrefs' => array(
  10209. // 'description' => 'TODO: please describe this field!',
  10210. 'type' => 'int',
  10211. 'size' => 'big',
  10212. 'not null' => '',
  10213. ),
  10214. ),
  10215. 'primary key' => array(
  10216. ),
  10217. 'unique keys' => array(
  10218. ),
  10219. 'indexes' => array(
  10220. ),
  10221. 'foreign keys' => array(
  10222. ),
  10223. );
  10224. return $description;
  10225. }
  10226. /****************************************************************************
  10227. * Implements hook_dbxref_schema()
  10228. * Purpose: To describe the structure of dbxref to tripal
  10229. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10230. * @see tripal_core.api.inc: tripal_core_chado_update()
  10231. * @see tripal_core.api.inc: tripal_core_chado_select()
  10232. *
  10233. * @return
  10234. * An array describing the current table
  10235. */
  10236. function tripal_core_chado_dbxref_schema () {
  10237. $description = array();
  10238. $description = array(
  10239. 'table' => 'dbxref',
  10240. // 'description' => 'TODO: please describe this table!',
  10241. 'fields' => array(
  10242. 'dbxref_id' => array(
  10243. // 'description' => 'TODO: please describe this field!',
  10244. 'type' => 'serial',
  10245. 'not null' => '1',
  10246. ),
  10247. 'db_id' => array(
  10248. // 'description' => 'TODO: please describe this field!',
  10249. 'type' => 'int',
  10250. 'not null' => '1',
  10251. ),
  10252. 'accession' => array(
  10253. // 'description' => 'TODO: please describe this field!',
  10254. 'type' => 'varchar',
  10255. 'length' => '255',
  10256. 'not null' => '1',
  10257. ),
  10258. 'version' => array(
  10259. // 'description' => 'TODO: please describe this field!',
  10260. 'type' => 'varchar',
  10261. 'length' => '255',
  10262. 'not null' => '1',
  10263. 'default' => '',
  10264. ),
  10265. 'description' => array(
  10266. // 'description' => 'TODO: please describe this field!',
  10267. 'type' => 'text',
  10268. 'not null' => '',
  10269. ),
  10270. ),
  10271. 'primary key' => array(
  10272. '0' => 'dbxref_id',
  10273. ),
  10274. 'unique keys' => array(
  10275. 'dbxref_c1' => array(
  10276. '0' => 'db_id',
  10277. '1' => 'accession',
  10278. '2' => 'version',
  10279. ),
  10280. ),
  10281. 'indexes' => array(
  10282. 'dbxref_idx1' => array(
  10283. '0' => 'db_id',
  10284. ),
  10285. 'dbxref_idx2' => array(
  10286. '0' => 'accession',
  10287. ),
  10288. 'dbxref_idx3' => array(
  10289. '0' => 'version',
  10290. ),
  10291. ),
  10292. 'foreign keys' => array(
  10293. ),
  10294. );
  10295. return $description;
  10296. }
  10297. /****************************************************************************
  10298. * Implements hook_dbxrefprop_schema()
  10299. * Purpose: To describe the structure of dbxrefprop to tripal
  10300. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10301. * @see tripal_core.api.inc: tripal_core_chado_update()
  10302. * @see tripal_core.api.inc: tripal_core_chado_select()
  10303. *
  10304. * @return
  10305. * An array describing the current table
  10306. */
  10307. function tripal_core_chado_dbxrefprop_schema () {
  10308. $description = array();
  10309. $description = array(
  10310. 'table' => 'dbxrefprop',
  10311. // 'description' => 'TODO: please describe this table!',
  10312. 'fields' => array(
  10313. 'dbxrefprop_id' => array(
  10314. // 'description' => 'TODO: please describe this field!',
  10315. 'type' => 'serial',
  10316. 'not null' => '1',
  10317. ),
  10318. 'dbxref_id' => array(
  10319. // 'description' => 'TODO: please describe this field!',
  10320. 'type' => 'int',
  10321. 'not null' => '1',
  10322. ),
  10323. 'type_id' => array(
  10324. // 'description' => 'TODO: please describe this field!',
  10325. 'type' => 'int',
  10326. 'not null' => '1',
  10327. ),
  10328. 'value' => array(
  10329. // 'description' => 'TODO: please describe this field!',
  10330. 'type' => 'text',
  10331. 'not null' => '1',
  10332. 'default' => '',
  10333. ),
  10334. 'rank' => array(
  10335. // 'description' => 'TODO: please describe this field!',
  10336. 'type' => 'int',
  10337. 'not null' => '1',
  10338. 'default' => '0',
  10339. ),
  10340. ),
  10341. 'primary key' => array(
  10342. '0' => 'dbxrefprop_id',
  10343. ),
  10344. 'unique keys' => array(
  10345. 'dbxrefprop_c1' => array(
  10346. '0' => 'dbxref_id',
  10347. '1' => 'type_id',
  10348. '2' => 'rank',
  10349. ),
  10350. ),
  10351. 'indexes' => array(
  10352. 'dbxrefprop_idx1' => array(
  10353. '0' => 'dbxref_id',
  10354. ),
  10355. 'dbxrefprop_idx2' => array(
  10356. '0' => 'type_id',
  10357. ),
  10358. ),
  10359. 'foreign keys' => array(
  10360. ),
  10361. );
  10362. return $description;
  10363. }
  10364. /****************************************************************************
  10365. * Implements hook_dfeatureloc_schema()
  10366. * Purpose: To describe the structure of dfeatureloc to tripal
  10367. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10368. * @see tripal_core.api.inc: tripal_core_chado_update()
  10369. * @see tripal_core.api.inc: tripal_core_chado_select()
  10370. *
  10371. * @return
  10372. * An array describing the current table
  10373. */
  10374. function tripal_core_chado_dfeatureloc_schema () {
  10375. $description = array();
  10376. $description = array(
  10377. 'table' => 'dfeatureloc',
  10378. // 'description' => 'TODO: please describe this table!',
  10379. 'fields' => array(
  10380. 'featureloc_id' => array(
  10381. // 'description' => 'TODO: please describe this field!',
  10382. 'type' => 'int',
  10383. 'not null' => '',
  10384. ),
  10385. 'feature_id' => array(
  10386. // 'description' => 'TODO: please describe this field!',
  10387. 'type' => 'int',
  10388. 'not null' => '',
  10389. ),
  10390. 'srcfeature_id' => array(
  10391. // 'description' => 'TODO: please describe this field!',
  10392. 'type' => 'int',
  10393. 'not null' => '',
  10394. ),
  10395. 'nbeg' => array(
  10396. // 'description' => 'TODO: please describe this field!',
  10397. 'type' => 'int',
  10398. 'not null' => '',
  10399. ),
  10400. 'is_nbeg_partial' => array(
  10401. // 'description' => 'TODO: please describe this field!',
  10402. 'type' => 'boolean',
  10403. 'not null' => '',
  10404. ),
  10405. 'nend' => array(
  10406. // 'description' => 'TODO: please describe this field!',
  10407. 'type' => 'int',
  10408. 'not null' => '',
  10409. ),
  10410. 'is_nend_partial' => array(
  10411. // 'description' => 'TODO: please describe this field!',
  10412. 'type' => 'boolean',
  10413. 'not null' => '',
  10414. ),
  10415. 'strand' => array(
  10416. // 'description' => 'TODO: please describe this field!',
  10417. 'type' => 'int',
  10418. 'size' => 'small',
  10419. 'not null' => '',
  10420. ),
  10421. 'phase' => array(
  10422. // 'description' => 'TODO: please describe this field!',
  10423. 'type' => 'int',
  10424. 'not null' => '',
  10425. ),
  10426. 'residue_info' => array(
  10427. // 'description' => 'TODO: please describe this field!',
  10428. 'type' => 'text',
  10429. 'not null' => '',
  10430. ),
  10431. 'locgroup' => array(
  10432. // 'description' => 'TODO: please describe this field!',
  10433. 'type' => 'int',
  10434. 'not null' => '',
  10435. ),
  10436. 'rank' => array(
  10437. // 'description' => 'TODO: please describe this field!',
  10438. 'type' => 'int',
  10439. 'not null' => '',
  10440. ),
  10441. ),
  10442. 'primary key' => array(
  10443. ),
  10444. 'unique keys' => array(
  10445. ),
  10446. 'indexes' => array(
  10447. ),
  10448. 'foreign keys' => array(
  10449. ),
  10450. );
  10451. return $description;
  10452. }
  10453. /****************************************************************************
  10454. * Implements hook_db_schema()
  10455. * Purpose: To describe the structure of db to tripal
  10456. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10457. * @see tripal_core.api.inc: tripal_core_chado_update()
  10458. * @see tripal_core.api.inc: tripal_core_chado_select()
  10459. *
  10460. * @return
  10461. * An array describing the current table
  10462. */
  10463. function tripal_core_chado_db_schema () {
  10464. $description = array();
  10465. $description = array(
  10466. 'table' => 'db',
  10467. // 'description' => 'TODO: please describe this table!',
  10468. 'fields' => array(
  10469. 'db_id' => array(
  10470. // 'description' => 'TODO: please describe this field!',
  10471. 'type' => 'serial',
  10472. 'not null' => '1',
  10473. ),
  10474. 'name' => array(
  10475. // 'description' => 'TODO: please describe this field!',
  10476. 'type' => 'varchar',
  10477. 'length' => '255',
  10478. 'not null' => '1',
  10479. ),
  10480. 'description' => array(
  10481. // 'description' => 'TODO: please describe this field!',
  10482. 'type' => 'varchar',
  10483. 'length' => '255',
  10484. 'not null' => '',
  10485. ),
  10486. 'urlprefix' => array(
  10487. // 'description' => 'TODO: please describe this field!',
  10488. 'type' => 'varchar',
  10489. 'length' => '255',
  10490. 'not null' => '',
  10491. ),
  10492. 'url' => array(
  10493. // 'description' => 'TODO: please describe this field!',
  10494. 'type' => 'varchar',
  10495. 'length' => '255',
  10496. 'not null' => '',
  10497. ),
  10498. ),
  10499. 'primary key' => array(
  10500. '0' => 'db_id',
  10501. ),
  10502. 'unique keys' => array(
  10503. 'db_c1' => array(
  10504. '0' => 'name',
  10505. ),
  10506. ),
  10507. 'indexes' => array(
  10508. ),
  10509. 'foreign keys' => array(
  10510. ),
  10511. );
  10512. return $description;
  10513. }
  10514. /****************************************************************************
  10515. * Implements hook_cvtermsynonym_schema()
  10516. * Purpose: To describe the structure of cvtermsynonym to tripal
  10517. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10518. * @see tripal_core.api.inc: tripal_core_chado_update()
  10519. * @see tripal_core.api.inc: tripal_core_chado_select()
  10520. *
  10521. * @return
  10522. * An array describing the current table
  10523. */
  10524. function tripal_core_chado_cvtermsynonym_schema () {
  10525. $description = array();
  10526. $description = array(
  10527. 'table' => 'cvtermsynonym',
  10528. // 'description' => 'TODO: please describe this table!',
  10529. 'fields' => array(
  10530. 'cvtermsynonym_id' => array(
  10531. // 'description' => 'TODO: please describe this field!',
  10532. 'type' => 'serial',
  10533. 'not null' => '1',
  10534. ),
  10535. 'cvterm_id' => array(
  10536. // 'description' => 'TODO: please describe this field!',
  10537. 'type' => 'int',
  10538. 'not null' => '1',
  10539. ),
  10540. 'synonym' => array(
  10541. // 'description' => 'TODO: please describe this field!',
  10542. 'type' => 'varchar',
  10543. 'length' => '1024',
  10544. 'not null' => '1',
  10545. ),
  10546. 'type_id' => array(
  10547. // 'description' => 'TODO: please describe this field!',
  10548. 'type' => 'int',
  10549. 'not null' => '',
  10550. ),
  10551. ),
  10552. 'primary key' => array(
  10553. '0' => 'cvtermsynonym_id',
  10554. ),
  10555. 'unique keys' => array(
  10556. 'cvtermsynonym_c1' => array(
  10557. '0' => 'cvterm_id',
  10558. '1' => 'synonym',
  10559. ),
  10560. ),
  10561. 'indexes' => array(
  10562. 'cvtermsynonym_idx1' => array(
  10563. '0' => 'cvterm_id',
  10564. ),
  10565. ),
  10566. 'foreign keys' => array(
  10567. ),
  10568. );
  10569. return $description;
  10570. }
  10571. /****************************************************************************
  10572. * Implements hook_cvterm_dbxref_schema()
  10573. * Purpose: To describe the structure of cvterm_dbxref to tripal
  10574. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10575. * @see tripal_core.api.inc: tripal_core_chado_update()
  10576. * @see tripal_core.api.inc: tripal_core_chado_select()
  10577. *
  10578. * @return
  10579. * An array describing the current table
  10580. */
  10581. function tripal_core_chado_cvterm_dbxref_schema () {
  10582. $description = array();
  10583. $description = array(
  10584. 'table' => 'cvterm_dbxref',
  10585. // 'description' => 'TODO: please describe this table!',
  10586. 'fields' => array(
  10587. 'cvterm_dbxref_id' => array(
  10588. // 'description' => 'TODO: please describe this field!',
  10589. 'type' => 'serial',
  10590. 'not null' => '1',
  10591. ),
  10592. 'cvterm_id' => array(
  10593. // 'description' => 'TODO: please describe this field!',
  10594. 'type' => 'int',
  10595. 'not null' => '1',
  10596. ),
  10597. 'dbxref_id' => array(
  10598. // 'description' => 'TODO: please describe this field!',
  10599. 'type' => 'int',
  10600. 'not null' => '1',
  10601. ),
  10602. 'is_for_definition' => array(
  10603. // 'description' => 'TODO: please describe this field!',
  10604. 'type' => 'int',
  10605. 'not null' => '1',
  10606. 'default' => '0',
  10607. ),
  10608. ),
  10609. 'primary key' => array(
  10610. '0' => 'cvterm_dbxref_id',
  10611. ),
  10612. 'unique keys' => array(
  10613. 'cvterm_dbxref_c1' => array(
  10614. '0' => 'cvterm_id',
  10615. '1' => 'dbxref_id',
  10616. ),
  10617. ),
  10618. 'indexes' => array(
  10619. 'cvterm_dbxref_idx1' => array(
  10620. '0' => 'cvterm_id',
  10621. ),
  10622. 'cvterm_dbxref_idx2' => array(
  10623. '0' => 'dbxref_id',
  10624. ),
  10625. ),
  10626. 'foreign keys' => array(
  10627. ),
  10628. );
  10629. return $description;
  10630. }
  10631. /****************************************************************************
  10632. * Implements hook_cvterm_relationship_schema()
  10633. * Purpose: To describe the structure of cvterm_relationship to tripal
  10634. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10635. * @see tripal_core.api.inc: tripal_core_chado_update()
  10636. * @see tripal_core.api.inc: tripal_core_chado_select()
  10637. *
  10638. * @return
  10639. * An array describing the current table
  10640. */
  10641. function tripal_core_chado_cvterm_relationship_schema () {
  10642. $description = array();
  10643. $description = array(
  10644. 'table' => 'cvterm_relationship',
  10645. // 'description' => 'TODO: please describe this table!',
  10646. 'fields' => array(
  10647. 'cvterm_relationship_id' => array(
  10648. // 'description' => 'TODO: please describe this field!',
  10649. 'type' => 'serial',
  10650. 'not null' => '1',
  10651. ),
  10652. 'type_id' => array(
  10653. // 'description' => 'TODO: please describe this field!',
  10654. 'type' => 'int',
  10655. 'not null' => '1',
  10656. ),
  10657. 'subject_id' => array(
  10658. // 'description' => 'TODO: please describe this field!',
  10659. 'type' => 'int',
  10660. 'not null' => '1',
  10661. ),
  10662. 'object_id' => array(
  10663. // 'description' => 'TODO: please describe this field!',
  10664. 'type' => 'int',
  10665. 'not null' => '1',
  10666. ),
  10667. ),
  10668. 'primary key' => array(
  10669. '0' => 'cvterm_relationship_id',
  10670. ),
  10671. 'unique keys' => array(
  10672. 'cvterm_relationship_c1' => array(
  10673. '0' => 'subject_id',
  10674. '1' => 'object_id',
  10675. '2' => 'type_id',
  10676. ),
  10677. ),
  10678. 'indexes' => array(
  10679. 'cvterm_relationship_idx1' => array(
  10680. '0' => 'type_id',
  10681. ),
  10682. 'cvterm_relationship_idx2' => array(
  10683. '0' => 'subject_id',
  10684. ),
  10685. 'cvterm_relationship_idx3' => array(
  10686. '0' => 'object_id',
  10687. ),
  10688. ),
  10689. 'foreign keys' => array(
  10690. ),
  10691. );
  10692. return $description;
  10693. }
  10694. /****************************************************************************
  10695. * Implements hook_cvtermpath_schema()
  10696. * Purpose: To describe the structure of cvtermpath to tripal
  10697. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10698. * @see tripal_core.api.inc: tripal_core_chado_update()
  10699. * @see tripal_core.api.inc: tripal_core_chado_select()
  10700. *
  10701. * @return
  10702. * An array describing the current table
  10703. */
  10704. function tripal_core_chado_cvtermpath_schema () {
  10705. $description = array();
  10706. $description = array(
  10707. 'table' => 'cvtermpath',
  10708. // 'description' => 'TODO: please describe this table!',
  10709. 'fields' => array(
  10710. 'cvtermpath_id' => array(
  10711. // 'description' => 'TODO: please describe this field!',
  10712. 'type' => 'serial',
  10713. 'not null' => '1',
  10714. ),
  10715. 'type_id' => array(
  10716. // 'description' => 'TODO: please describe this field!',
  10717. 'type' => 'int',
  10718. 'not null' => '',
  10719. ),
  10720. 'subject_id' => array(
  10721. // 'description' => 'TODO: please describe this field!',
  10722. 'type' => 'int',
  10723. 'not null' => '1',
  10724. ),
  10725. 'object_id' => array(
  10726. // 'description' => 'TODO: please describe this field!',
  10727. 'type' => 'int',
  10728. 'not null' => '1',
  10729. ),
  10730. 'cv_id' => array(
  10731. // 'description' => 'TODO: please describe this field!',
  10732. 'type' => 'int',
  10733. 'not null' => '1',
  10734. ),
  10735. 'pathdistance' => array(
  10736. // 'description' => 'TODO: please describe this field!',
  10737. 'type' => 'int',
  10738. 'not null' => '',
  10739. ),
  10740. ),
  10741. 'primary key' => array(
  10742. '0' => 'cvtermpath_id',
  10743. ),
  10744. 'unique keys' => array(
  10745. 'cvtermpath_c1' => array(
  10746. '0' => 'subject_id',
  10747. '1' => 'object_id',
  10748. '2' => 'type_id',
  10749. '3' => 'pathdistance',
  10750. ),
  10751. ),
  10752. 'indexes' => array(
  10753. 'cvtermpath_idx1' => array(
  10754. '0' => 'type_id',
  10755. ),
  10756. 'cvtermpath_idx2' => array(
  10757. '0' => 'subject_id',
  10758. ),
  10759. 'cvtermpath_idx3' => array(
  10760. '0' => 'object_id',
  10761. ),
  10762. 'cvtermpath_idx4' => array(
  10763. '0' => 'cv_id',
  10764. ),
  10765. ),
  10766. 'foreign keys' => array(
  10767. ),
  10768. );
  10769. return $description;
  10770. }
  10771. /****************************************************************************
  10772. * Implements hook_cvtermprop_schema()
  10773. * Purpose: To describe the structure of cvtermprop to tripal
  10774. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10775. * @see tripal_core.api.inc: tripal_core_chado_update()
  10776. * @see tripal_core.api.inc: tripal_core_chado_select()
  10777. *
  10778. * @return
  10779. * An array describing the current table
  10780. */
  10781. function tripal_core_chado_cvtermprop_schema () {
  10782. $description = array();
  10783. $description = array(
  10784. 'table' => 'cvtermprop',
  10785. // 'description' => 'TODO: please describe this table!',
  10786. 'fields' => array(
  10787. 'cvtermprop_id' => array(
  10788. // 'description' => 'TODO: please describe this field!',
  10789. 'type' => 'serial',
  10790. 'not null' => '1',
  10791. ),
  10792. 'cvterm_id' => array(
  10793. // 'description' => 'TODO: please describe this field!',
  10794. 'type' => 'int',
  10795. 'not null' => '1',
  10796. ),
  10797. 'type_id' => array(
  10798. // 'description' => 'TODO: please describe this field!',
  10799. 'type' => 'int',
  10800. 'not null' => '1',
  10801. ),
  10802. 'value' => array(
  10803. // 'description' => 'TODO: please describe this field!',
  10804. 'type' => 'text',
  10805. 'not null' => '1',
  10806. 'default' => '',
  10807. ),
  10808. 'rank' => array(
  10809. // 'description' => 'TODO: please describe this field!',
  10810. 'type' => 'int',
  10811. 'not null' => '1',
  10812. 'default' => '0',
  10813. ),
  10814. ),
  10815. 'primary key' => array(
  10816. '0' => 'cvtermprop_id',
  10817. ),
  10818. 'unique keys' => array(
  10819. 'cvterm_id' => array(
  10820. '0' => 'cvterm_id',
  10821. '1' => 'type_id',
  10822. '2' => 'value',
  10823. '3' => 'rank',
  10824. ),
  10825. ),
  10826. 'indexes' => array(
  10827. 'cvtermprop_idx1' => array(
  10828. '0' => 'cvterm_id',
  10829. ),
  10830. 'cvtermprop_idx2' => array(
  10831. '0' => 'type_id',
  10832. ),
  10833. ),
  10834. 'foreign keys' => array(
  10835. ),
  10836. );
  10837. return $description;
  10838. }
  10839. /****************************************************************************
  10840. * Implements hook_eimage_schema()
  10841. * Purpose: To describe the structure of eimage to tripal
  10842. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10843. * @see tripal_core.api.inc: tripal_core_chado_update()
  10844. * @see tripal_core.api.inc: tripal_core_chado_select()
  10845. *
  10846. * @return
  10847. * An array describing the current table
  10848. */
  10849. function tripal_core_chado_eimage_schema () {
  10850. $description = array();
  10851. $description = array(
  10852. 'table' => 'eimage',
  10853. // 'description' => 'TODO: please describe this table!',
  10854. 'fields' => array(
  10855. 'eimage_id' => array(
  10856. // 'description' => 'TODO: please describe this field!',
  10857. 'type' => 'serial',
  10858. 'not null' => '1',
  10859. ),
  10860. 'eimage_data' => array(
  10861. // 'description' => 'TODO: please describe this field!',
  10862. 'type' => 'text',
  10863. 'not null' => '',
  10864. ),
  10865. 'eimage_type' => array(
  10866. // 'description' => 'TODO: please describe this field!',
  10867. 'type' => 'varchar',
  10868. 'length' => '255',
  10869. 'not null' => '1',
  10870. ),
  10871. 'image_uri' => array(
  10872. // 'description' => 'TODO: please describe this field!',
  10873. 'type' => 'varchar',
  10874. 'length' => '255',
  10875. 'not null' => '',
  10876. ),
  10877. ),
  10878. 'primary key' => array(
  10879. '0' => 'eimage_id',
  10880. ),
  10881. 'unique keys' => array(
  10882. ),
  10883. 'indexes' => array(
  10884. ),
  10885. 'foreign keys' => array(
  10886. ),
  10887. );
  10888. return $description;
  10889. }
  10890. /****************************************************************************
  10891. * Implements hook_element_schema()
  10892. * Purpose: To describe the structure of element to tripal
  10893. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10894. * @see tripal_core.api.inc: tripal_core_chado_update()
  10895. * @see tripal_core.api.inc: tripal_core_chado_select()
  10896. *
  10897. * @return
  10898. * An array describing the current table
  10899. */
  10900. function tripal_core_chado_element_schema () {
  10901. $description = array();
  10902. $description = array(
  10903. 'table' => 'element',
  10904. // 'description' => 'TODO: please describe this table!',
  10905. 'fields' => array(
  10906. 'element_id' => array(
  10907. // 'description' => 'TODO: please describe this field!',
  10908. 'type' => 'serial',
  10909. 'not null' => '1',
  10910. ),
  10911. 'feature_id' => array(
  10912. // 'description' => 'TODO: please describe this field!',
  10913. 'type' => 'int',
  10914. 'not null' => '',
  10915. ),
  10916. 'arraydesign_id' => array(
  10917. // 'description' => 'TODO: please describe this field!',
  10918. 'type' => 'int',
  10919. 'not null' => '1',
  10920. ),
  10921. 'type_id' => array(
  10922. // 'description' => 'TODO: please describe this field!',
  10923. 'type' => 'int',
  10924. 'not null' => '',
  10925. ),
  10926. 'dbxref_id' => array(
  10927. // 'description' => 'TODO: please describe this field!',
  10928. 'type' => 'int',
  10929. 'not null' => '',
  10930. ),
  10931. ),
  10932. 'primary key' => array(
  10933. '0' => 'element_id',
  10934. ),
  10935. 'unique keys' => array(
  10936. 'element_c1' => array(
  10937. '0' => 'feature_id',
  10938. '1' => 'arraydesign_id',
  10939. ),
  10940. ),
  10941. 'indexes' => array(
  10942. 'element_idx1' => array(
  10943. '0' => 'feature_id',
  10944. ),
  10945. 'element_idx2' => array(
  10946. '0' => 'arraydesign_id',
  10947. ),
  10948. 'element_idx3' => array(
  10949. '0' => 'type_id',
  10950. ),
  10951. 'element_idx4' => array(
  10952. '0' => 'dbxref_id',
  10953. ),
  10954. ),
  10955. 'foreign keys' => array(
  10956. ),
  10957. );
  10958. return $description;
  10959. }
  10960. /****************************************************************************
  10961. * Implements hook_expression_cvterm_schema()
  10962. * Purpose: To describe the structure of expression_cvterm to tripal
  10963. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10964. * @see tripal_core.api.inc: tripal_core_chado_update()
  10965. * @see tripal_core.api.inc: tripal_core_chado_select()
  10966. *
  10967. * @return
  10968. * An array describing the current table
  10969. */
  10970. function tripal_core_chado_expression_cvterm_schema () {
  10971. $description = array();
  10972. $description = array(
  10973. 'table' => 'expression_cvterm',
  10974. // 'description' => 'TODO: please describe this table!',
  10975. 'fields' => array(
  10976. 'expression_cvterm_id' => array(
  10977. // 'description' => 'TODO: please describe this field!',
  10978. 'type' => 'serial',
  10979. 'not null' => '1',
  10980. ),
  10981. 'expression_id' => array(
  10982. // 'description' => 'TODO: please describe this field!',
  10983. 'type' => 'int',
  10984. 'not null' => '1',
  10985. ),
  10986. 'cvterm_id' => array(
  10987. // 'description' => 'TODO: please describe this field!',
  10988. 'type' => 'int',
  10989. 'not null' => '1',
  10990. ),
  10991. 'rank' => array(
  10992. // 'description' => 'TODO: please describe this field!',
  10993. 'type' => 'int',
  10994. 'not null' => '1',
  10995. 'default' => '0',
  10996. ),
  10997. 'cvterm_type_id' => array(
  10998. // 'description' => 'TODO: please describe this field!',
  10999. 'type' => 'int',
  11000. 'not null' => '1',
  11001. ),
  11002. ),
  11003. 'primary key' => array(
  11004. '0' => 'expression_cvterm_id',
  11005. ),
  11006. 'unique keys' => array(
  11007. 'expression_cvterm_c1' => array(
  11008. '0' => 'expression_id',
  11009. '1' => 'cvterm_id',
  11010. '2' => 'cvterm_type_id',
  11011. ),
  11012. ),
  11013. 'indexes' => array(
  11014. 'expression_cvterm_idx1' => array(
  11015. '0' => 'expression_id',
  11016. ),
  11017. 'expression_cvterm_idx2' => array(
  11018. '0' => 'cvterm_id',
  11019. ),
  11020. 'expression_cvterm_idx3' => array(
  11021. '0' => 'cvterm_type_id',
  11022. ),
  11023. ),
  11024. 'foreign keys' => array(
  11025. ),
  11026. );
  11027. return $description;
  11028. }
  11029. /****************************************************************************
  11030. * Implements hook_expression_cvtermprop_schema()
  11031. * Purpose: To describe the structure of expression_cvtermprop 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. function tripal_core_chado_expression_cvtermprop_schema () {
  11040. $description = array();
  11041. $description = array(
  11042. 'table' => 'expression_cvtermprop',
  11043. // 'description' => 'TODO: please describe this table!',
  11044. 'fields' => array(
  11045. 'expression_cvtermprop_id' => array(
  11046. // 'description' => 'TODO: please describe this field!',
  11047. 'type' => 'serial',
  11048. 'not null' => '1',
  11049. ),
  11050. 'expression_cvterm_id' => array(
  11051. // 'description' => 'TODO: please describe this field!',
  11052. 'type' => 'int',
  11053. 'not null' => '1',
  11054. ),
  11055. 'type_id' => array(
  11056. // 'description' => 'TODO: please describe this field!',
  11057. 'type' => 'int',
  11058. 'not null' => '1',
  11059. ),
  11060. 'value' => array(
  11061. // 'description' => 'TODO: please describe this field!',
  11062. 'type' => 'text',
  11063. 'not null' => '',
  11064. ),
  11065. 'rank' => array(
  11066. // 'description' => 'TODO: please describe this field!',
  11067. 'type' => 'int',
  11068. 'not null' => '1',
  11069. 'default' => '0',
  11070. ),
  11071. ),
  11072. 'primary key' => array(
  11073. '0' => 'expression_cvtermprop_id',
  11074. ),
  11075. 'unique keys' => array(
  11076. 'expression_cvtermprop_c1' => array(
  11077. '0' => 'expression_cvterm_id',
  11078. '1' => 'type_id',
  11079. '2' => 'rank',
  11080. ),
  11081. ),
  11082. 'indexes' => array(
  11083. 'expression_cvtermprop_idx1' => array(
  11084. '0' => 'expression_cvterm_id',
  11085. ),
  11086. 'expression_cvtermprop_idx2' => array(
  11087. '0' => 'type_id',
  11088. ),
  11089. ),
  11090. 'foreign keys' => array(
  11091. ),
  11092. );
  11093. return $description;
  11094. }
  11095. /****************************************************************************
  11096. * Implements hook_expression_image_schema()
  11097. * Purpose: To describe the structure of expression_image to tripal
  11098. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11099. * @see tripal_core.api.inc: tripal_core_chado_update()
  11100. * @see tripal_core.api.inc: tripal_core_chado_select()
  11101. *
  11102. * @return
  11103. * An array describing the current table
  11104. */
  11105. function tripal_core_chado_expression_image_schema () {
  11106. $description = array();
  11107. $description = array(
  11108. 'table' => 'expression_image',
  11109. // 'description' => 'TODO: please describe this table!',
  11110. 'fields' => array(
  11111. 'expression_image_id' => array(
  11112. // 'description' => 'TODO: please describe this field!',
  11113. 'type' => 'serial',
  11114. 'not null' => '1',
  11115. ),
  11116. 'expression_id' => array(
  11117. // 'description' => 'TODO: please describe this field!',
  11118. 'type' => 'int',
  11119. 'not null' => '1',
  11120. ),
  11121. 'eimage_id' => array(
  11122. // 'description' => 'TODO: please describe this field!',
  11123. 'type' => 'int',
  11124. 'not null' => '1',
  11125. ),
  11126. ),
  11127. 'primary key' => array(
  11128. '0' => 'expression_image_id',
  11129. ),
  11130. 'unique keys' => array(
  11131. 'expression_image_c1' => array(
  11132. '0' => 'expression_id',
  11133. '1' => 'eimage_id',
  11134. ),
  11135. ),
  11136. 'indexes' => array(
  11137. 'expression_image_idx1' => array(
  11138. '0' => 'expression_id',
  11139. ),
  11140. 'expression_image_idx2' => array(
  11141. '0' => 'eimage_id',
  11142. ),
  11143. ),
  11144. 'foreign keys' => array(
  11145. ),
  11146. );
  11147. return $description;
  11148. }
  11149. /****************************************************************************
  11150. * Implements hook_expression_pub_schema()
  11151. * Purpose: To describe the structure of expression_pub to tripal
  11152. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11153. * @see tripal_core.api.inc: tripal_core_chado_update()
  11154. * @see tripal_core.api.inc: tripal_core_chado_select()
  11155. *
  11156. * @return
  11157. * An array describing the current table
  11158. */
  11159. function tripal_core_chado_expression_pub_schema () {
  11160. $description = array();
  11161. $description = array(
  11162. 'table' => 'expression_pub',
  11163. // 'description' => 'TODO: please describe this table!',
  11164. 'fields' => array(
  11165. 'expression_pub_id' => array(
  11166. // 'description' => 'TODO: please describe this field!',
  11167. 'type' => 'serial',
  11168. 'not null' => '1',
  11169. ),
  11170. 'expression_id' => array(
  11171. // 'description' => 'TODO: please describe this field!',
  11172. 'type' => 'int',
  11173. 'not null' => '1',
  11174. ),
  11175. 'pub_id' => array(
  11176. // 'description' => 'TODO: please describe this field!',
  11177. 'type' => 'int',
  11178. 'not null' => '1',
  11179. ),
  11180. ),
  11181. 'primary key' => array(
  11182. '0' => 'expression_pub_id',
  11183. ),
  11184. 'unique keys' => array(
  11185. 'expression_pub_c1' => array(
  11186. '0' => 'expression_id',
  11187. '1' => 'pub_id',
  11188. ),
  11189. ),
  11190. 'indexes' => array(
  11191. 'expression_pub_idx1' => array(
  11192. '0' => 'expression_id',
  11193. ),
  11194. 'expression_pub_idx2' => array(
  11195. '0' => 'pub_id',
  11196. ),
  11197. ),
  11198. 'foreign keys' => array(
  11199. ),
  11200. );
  11201. return $description;
  11202. }
  11203. /****************************************************************************
  11204. * Implements hook_expression_schema()
  11205. * Purpose: To describe the structure of expression to tripal
  11206. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11207. * @see tripal_core.api.inc: tripal_core_chado_update()
  11208. * @see tripal_core.api.inc: tripal_core_chado_select()
  11209. *
  11210. * @return
  11211. * An array describing the current table
  11212. */
  11213. function tripal_core_chado_expression_schema () {
  11214. $description = array();
  11215. $description = array(
  11216. 'table' => 'expression',
  11217. // 'description' => 'TODO: please describe this table!',
  11218. 'fields' => array(
  11219. 'expression_id' => array(
  11220. // 'description' => 'TODO: please describe this field!',
  11221. 'type' => 'serial',
  11222. 'not null' => '1',
  11223. ),
  11224. 'uniquename' => array(
  11225. // 'description' => 'TODO: please describe this field!',
  11226. 'type' => 'text',
  11227. 'not null' => '1',
  11228. ),
  11229. 'md5checksum' => array(
  11230. // 'description' => 'TODO: please describe this field!',
  11231. 'type' => 'char',
  11232. 'length' => '32',
  11233. 'not null' => '',
  11234. ),
  11235. 'description' => array(
  11236. // 'description' => 'TODO: please describe this field!',
  11237. 'type' => 'text',
  11238. 'not null' => '',
  11239. ),
  11240. ),
  11241. 'primary key' => array(
  11242. '0' => 'expression_id',
  11243. ),
  11244. 'unique keys' => array(
  11245. 'expression_c1' => array(
  11246. '0' => 'uniquename',
  11247. ),
  11248. ),
  11249. 'indexes' => array(
  11250. ),
  11251. 'foreign keys' => array(
  11252. ),
  11253. );
  11254. return $description;
  11255. }
  11256. /****************************************************************************
  11257. * Implements hook_environment_cvterm_schema()
  11258. * Purpose: To describe the structure of environment_cvterm to tripal
  11259. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11260. * @see tripal_core.api.inc: tripal_core_chado_update()
  11261. * @see tripal_core.api.inc: tripal_core_chado_select()
  11262. *
  11263. * @return
  11264. * An array describing the current table
  11265. */
  11266. function tripal_core_chado_environment_cvterm_schema () {
  11267. $description = array();
  11268. $description = array(
  11269. 'table' => 'environment_cvterm',
  11270. // 'description' => 'TODO: please describe this table!',
  11271. 'fields' => array(
  11272. 'environment_cvterm_id' => array(
  11273. // 'description' => 'TODO: please describe this field!',
  11274. 'type' => 'serial',
  11275. 'not null' => '1',
  11276. ),
  11277. 'environment_id' => array(
  11278. // 'description' => 'TODO: please describe this field!',
  11279. 'type' => 'int',
  11280. 'not null' => '1',
  11281. ),
  11282. 'cvterm_id' => array(
  11283. // 'description' => 'TODO: please describe this field!',
  11284. 'type' => 'int',
  11285. 'not null' => '1',
  11286. ),
  11287. ),
  11288. 'primary key' => array(
  11289. '0' => 'environment_cvterm_id',
  11290. ),
  11291. 'unique keys' => array(
  11292. 'environment_cvterm_c1' => array(
  11293. '0' => 'environment_id',
  11294. '1' => 'cvterm_id',
  11295. ),
  11296. ),
  11297. 'indexes' => array(
  11298. 'environment_cvterm_idx1' => array(
  11299. '0' => 'environment_id',
  11300. ),
  11301. 'environment_cvterm_idx2' => array(
  11302. '0' => 'cvterm_id',
  11303. ),
  11304. ),
  11305. 'foreign keys' => array(
  11306. ),
  11307. );
  11308. return $description;
  11309. }
  11310. /****************************************************************************
  11311. * Implements hook_element_relationship_schema()
  11312. * Purpose: To describe the structure of element_relationship to tripal
  11313. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11314. * @see tripal_core.api.inc: tripal_core_chado_update()
  11315. * @see tripal_core.api.inc: tripal_core_chado_select()
  11316. *
  11317. * @return
  11318. * An array describing the current table
  11319. */
  11320. function tripal_core_chado_element_relationship_schema () {
  11321. $description = array();
  11322. $description = array(
  11323. 'table' => 'element_relationship',
  11324. // 'description' => 'TODO: please describe this table!',
  11325. 'fields' => array(
  11326. 'element_relationship_id' => array(
  11327. // 'description' => 'TODO: please describe this field!',
  11328. 'type' => 'serial',
  11329. 'not null' => '1',
  11330. ),
  11331. 'subject_id' => array(
  11332. // 'description' => 'TODO: please describe this field!',
  11333. 'type' => 'int',
  11334. 'not null' => '1',
  11335. ),
  11336. 'type_id' => array(
  11337. // 'description' => 'TODO: please describe this field!',
  11338. 'type' => 'int',
  11339. 'not null' => '1',
  11340. ),
  11341. 'object_id' => array(
  11342. // 'description' => 'TODO: please describe this field!',
  11343. 'type' => 'int',
  11344. 'not null' => '1',
  11345. ),
  11346. 'value' => array(
  11347. // 'description' => 'TODO: please describe this field!',
  11348. 'type' => 'text',
  11349. 'not null' => '',
  11350. ),
  11351. 'rank' => array(
  11352. // 'description' => 'TODO: please describe this field!',
  11353. 'type' => 'int',
  11354. 'not null' => '1',
  11355. 'default' => '0',
  11356. ),
  11357. ),
  11358. 'primary key' => array(
  11359. '0' => 'element_relationship_id',
  11360. ),
  11361. 'unique keys' => array(
  11362. 'element_relationship_c1' => array(
  11363. '0' => 'subject_id',
  11364. '1' => 'object_id',
  11365. '2' => 'type_id',
  11366. '3' => 'rank',
  11367. ),
  11368. ),
  11369. 'indexes' => array(
  11370. 'element_relationship_idx1' => array(
  11371. '0' => 'subject_id',
  11372. ),
  11373. 'element_relationship_idx2' => array(
  11374. '0' => 'type_id',
  11375. ),
  11376. 'element_relationship_idx3' => array(
  11377. '0' => 'object_id',
  11378. ),
  11379. 'element_relationship_idx4' => array(
  11380. '0' => 'value',
  11381. ),
  11382. ),
  11383. 'foreign keys' => array(
  11384. ),
  11385. );
  11386. return $description;
  11387. }
  11388. /****************************************************************************
  11389. * Implements hook_elementresult_schema()
  11390. * Purpose: To describe the structure of elementresult to tripal
  11391. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11392. * @see tripal_core.api.inc: tripal_core_chado_update()
  11393. * @see tripal_core.api.inc: tripal_core_chado_select()
  11394. *
  11395. * @return
  11396. * An array describing the current table
  11397. */
  11398. function tripal_core_chado_elementresult_schema () {
  11399. $description = array();
  11400. $description = array(
  11401. 'table' => 'elementresult',
  11402. // 'description' => 'TODO: please describe this table!',
  11403. 'fields' => array(
  11404. 'elementresult_id' => array(
  11405. // 'description' => 'TODO: please describe this field!',
  11406. 'type' => 'serial',
  11407. 'not null' => '1',
  11408. ),
  11409. 'element_id' => array(
  11410. // 'description' => 'TODO: please describe this field!',
  11411. 'type' => 'int',
  11412. 'not null' => '1',
  11413. ),
  11414. 'quantification_id' => array(
  11415. // 'description' => 'TODO: please describe this field!',
  11416. 'type' => 'int',
  11417. 'not null' => '1',
  11418. ),
  11419. 'signal' => array(
  11420. // 'description' => 'TODO: please describe this field!',
  11421. 'type' => 'float',
  11422. 'size' => 'big',
  11423. 'not null' => '1',
  11424. ),
  11425. ),
  11426. 'primary key' => array(
  11427. '0' => 'elementresult_id',
  11428. ),
  11429. 'unique keys' => array(
  11430. 'elementresult_c1' => array(
  11431. '0' => 'element_id',
  11432. '1' => 'quantification_id',
  11433. ),
  11434. ),
  11435. 'indexes' => array(
  11436. 'elementresult_idx1' => array(
  11437. '0' => 'element_id',
  11438. ),
  11439. 'elementresult_idx2' => array(
  11440. '0' => 'quantification_id',
  11441. ),
  11442. 'elementresult_idx3' => array(
  11443. '0' => 'signal',
  11444. ),
  11445. ),
  11446. 'foreign keys' => array(
  11447. ),
  11448. );
  11449. return $description;
  11450. }
  11451. /****************************************************************************
  11452. * Implements hook_elementresult_relationship_schema()
  11453. * Purpose: To describe the structure of elementresult_relationship to tripal
  11454. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11455. * @see tripal_core.api.inc: tripal_core_chado_update()
  11456. * @see tripal_core.api.inc: tripal_core_chado_select()
  11457. *
  11458. * @return
  11459. * An array describing the current table
  11460. */
  11461. function tripal_core_chado_elementresult_relationship_schema () {
  11462. $description = array();
  11463. $description = array(
  11464. 'table' => 'elementresult_relationship',
  11465. // 'description' => 'TODO: please describe this table!',
  11466. 'fields' => array(
  11467. 'elementresult_relationship_id' => array(
  11468. // 'description' => 'TODO: please describe this field!',
  11469. 'type' => 'serial',
  11470. 'not null' => '1',
  11471. ),
  11472. 'subject_id' => array(
  11473. // 'description' => 'TODO: please describe this field!',
  11474. 'type' => 'int',
  11475. 'not null' => '1',
  11476. ),
  11477. 'type_id' => array(
  11478. // 'description' => 'TODO: please describe this field!',
  11479. 'type' => 'int',
  11480. 'not null' => '1',
  11481. ),
  11482. 'object_id' => array(
  11483. // 'description' => 'TODO: please describe this field!',
  11484. 'type' => 'int',
  11485. 'not null' => '1',
  11486. ),
  11487. 'value' => array(
  11488. // 'description' => 'TODO: please describe this field!',
  11489. 'type' => 'text',
  11490. 'not null' => '',
  11491. ),
  11492. 'rank' => array(
  11493. // 'description' => 'TODO: please describe this field!',
  11494. 'type' => 'int',
  11495. 'not null' => '1',
  11496. 'default' => '0',
  11497. ),
  11498. ),
  11499. 'primary key' => array(
  11500. '0' => 'elementresult_relationship_id',
  11501. ),
  11502. 'unique keys' => array(
  11503. 'elementresult_relationship_c1' => array(
  11504. '0' => 'subject_id',
  11505. '1' => 'object_id',
  11506. '2' => 'type_id',
  11507. '3' => 'rank',
  11508. ),
  11509. ),
  11510. 'indexes' => array(
  11511. 'elementresult_relationship_idx1' => array(
  11512. '0' => 'subject_id',
  11513. ),
  11514. 'elementresult_relationship_idx2' => array(
  11515. '0' => 'type_id',
  11516. ),
  11517. 'elementresult_relationship_idx3' => array(
  11518. '0' => 'object_id',
  11519. ),
  11520. 'elementresult_relationship_idx4' => array(
  11521. '0' => 'value',
  11522. ),
  11523. ),
  11524. 'foreign keys' => array(
  11525. ),
  11526. );
  11527. return $description;
  11528. }
  11529. /****************************************************************************
  11530. * Implements hook_environment_schema()
  11531. * Purpose: To describe the structure of environment to tripal
  11532. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11533. * @see tripal_core.api.inc: tripal_core_chado_update()
  11534. * @see tripal_core.api.inc: tripal_core_chado_select()
  11535. *
  11536. * @return
  11537. * An array describing the current table
  11538. */
  11539. function tripal_core_chado_environment_schema () {
  11540. $description = array();
  11541. $description = array(
  11542. 'table' => 'environment',
  11543. // 'description' => 'TODO: please describe this table!',
  11544. 'fields' => array(
  11545. 'environment_id' => array(
  11546. // 'description' => 'TODO: please describe this field!',
  11547. 'type' => 'serial',
  11548. 'not null' => '1',
  11549. ),
  11550. 'uniquename' => array(
  11551. // 'description' => 'TODO: please describe this field!',
  11552. 'type' => 'text',
  11553. 'not null' => '1',
  11554. ),
  11555. 'description' => array(
  11556. // 'description' => 'TODO: please describe this field!',
  11557. 'type' => 'text',
  11558. 'not null' => '',
  11559. ),
  11560. ),
  11561. 'primary key' => array(
  11562. '0' => 'environment_id',
  11563. ),
  11564. 'unique keys' => array(
  11565. 'environment_c1' => array(
  11566. '0' => 'uniquename',
  11567. ),
  11568. ),
  11569. 'indexes' => array(
  11570. 'environment_idx1' => array(
  11571. '0' => 'uniquename',
  11572. ),
  11573. ),
  11574. 'foreign keys' => array(
  11575. ),
  11576. );
  11577. return $description;
  11578. }