tripal_core.schema.api.inc 328 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737
  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. * @defgroup tripal_schema_api Core Module Schema API
  10. * @{
  11. * Provides an application programming interface (API) for describing Chado tables.
  12. * This API consists of a set of functions, one for each table in Chado. Each
  13. * function simply returns a Drupal style array that defines the table.
  14. *
  15. * Because Drupal 6 does not handle foreign key relationships, a separate
  16. * hook is used to define the foreign key relationships for each table. As
  17. * of version 0.3b of Tripal, not all foreign key relationships have been
  18. * defined. Therefore, if you need a foreign key you must create the appropriate
  19. * hook. Hooks are named hook_chado_table_schema() where 'hook' is replaced
  20. * with the module name, and 'table' is replaced by the Chado table name.
  21. *
  22. * The functions provided in this documentation should not be called as is, but if you need
  23. * the Drupal-style array definition for any table, use the following function
  24. * call:
  25. *
  26. * $table_desc = module_invoke_all('chado_'.$table.'_schema');
  27. *
  28. * where the variable $table contains the name of the table you want to
  29. * retireve. The function call above uses the Drupal hook infrastructure to
  30. * call the appropriate function in the Schema API as well as the appropriate
  31. * hook to add in any foreign key relationships.
  32. *
  33. * @}
  34. * @ingroup tripal_api
  35. */
  36. /**
  37. * Retrieves the list tables in the Chado schema. By default it only retursn
  38. * the default Chado tables, but may also return custom tables added to the
  39. * Chado schema as well.
  40. *
  41. * @param $include_custom
  42. * Optional. Set as TRUE to include any custom tables created in the
  43. * Chado schema. Custom tables are added to Chado using the
  44. * tripal_core_chado_create_table() function.
  45. *
  46. * @returns
  47. * An associative array where the key and value pairs are the Chado table names.
  48. * @ingroup tripal_schema_api
  49. */
  50. function tripal_core_get_chado_tables($include_custom = NULL) {
  51. if(is_array($db_url) and array_key_exists('chado',$db_url)){
  52. $previous_db = tripal_db_set_active('chado');
  53. $sql = 'SELECT tablename FROM pg_tables';
  54. $resource = db_query($sql);
  55. tripal_db_set_active($previous_db);
  56. } else {
  57. $sql = "SELECT tablename FROM pg_tables WHERE schemaname='chado'";
  58. $resource = db_query($sql);
  59. }
  60. $tables = array();
  61. while ($r = db_fetch_object($resource)) {
  62. $tables[$r->tablename] = $r->tablename;
  63. }
  64. // now add in the custom tables too
  65. if($include_custom){
  66. $sql = "SELECT table_name FROM tripal_custom_tables";
  67. $resource = db_query($sql);
  68. }
  69. while ($r = db_fetch_object($resource)) {
  70. $tables[$r->table_name] = $r->table_name;
  71. }
  72. asort($tables);
  73. return $tables;
  74. }
  75. /**
  76. * Implements hook_organism_dbxref_schema()
  77. * Purpose: To describe the structure of organism_dbxref to tripal
  78. * @see tripal_core.api.inc: tripal_core_chado_insert()
  79. * @see tripal_core.api.inc: tripal_core_chado_update()
  80. * @see tripal_core.api.inc: tripal_core_chado_select()
  81. *
  82. * @return
  83. * An array describing the current table
  84. *
  85. * @ingroup tripal_schema_api
  86. *
  87. */
  88. function tripal_core_chado_organism_dbxref_schema () {
  89. $description = array();
  90. $description = array(
  91. 'table' => 'organism_dbxref',
  92. // 'description' => 'TODO: please describe this table!',
  93. 'fields' => array(
  94. 'organism_dbxref_id' => array(
  95. // 'description' => 'TODO: please describe this field!',
  96. 'type' => 'serial',
  97. 'not null' => '1',
  98. ),
  99. 'organism_id' => array(
  100. // 'description' => 'TODO: please describe this field!',
  101. 'type' => 'int',
  102. 'not null' => '1',
  103. ),
  104. 'dbxref_id' => array(
  105. // 'description' => 'TODO: please describe this field!',
  106. 'type' => 'int',
  107. 'not null' => '1',
  108. ),
  109. ),
  110. 'primary key' => array(
  111. '0' => 'organism_dbxref_id',
  112. ),
  113. 'unique keys' => array(
  114. 'organism_dbxref_c1' => array(
  115. '0' => 'organism_id',
  116. '1' => 'dbxref_id',
  117. ),
  118. ),
  119. 'indexes' => array(
  120. 'organism_dbxref_idx1' => array(
  121. '0' => 'organism_id',
  122. ),
  123. 'organism_dbxref_idx2' => array(
  124. '0' => 'dbxref_id',
  125. ),
  126. ),
  127. 'foreign keys' => array(
  128. ),
  129. );
  130. return $description;
  131. }
  132. /**
  133. * Implements hook_organismprop_schema()
  134. * Purpose: To describe the structure of organismprop to tripal
  135. * @see tripal_core.api.inc: tripal_core_chado_insert()
  136. * @see tripal_core.api.inc: tripal_core_chado_update()
  137. * @see tripal_core.api.inc: tripal_core_chado_select()
  138. *
  139. * @return
  140. * An array describing the current table
  141. *
  142. * @ingroup tripal_schema_api
  143. *
  144. */
  145. function tripal_core_chado_organismprop_schema () {
  146. $description = array();
  147. $description = array(
  148. 'table' => 'organismprop',
  149. // 'description' => 'TODO: please describe this table!',
  150. 'fields' => array(
  151. 'organismprop_id' => array(
  152. // 'description' => 'TODO: please describe this field!',
  153. 'type' => 'serial',
  154. 'not null' => '1',
  155. ),
  156. 'organism_id' => array(
  157. // 'description' => 'TODO: please describe this field!',
  158. 'type' => 'int',
  159. 'not null' => '1',
  160. ),
  161. 'type_id' => array(
  162. // 'description' => 'TODO: please describe this field!',
  163. 'type' => 'int',
  164. 'not null' => '1',
  165. ),
  166. 'value' => array(
  167. // 'description' => 'TODO: please describe this field!',
  168. 'type' => 'text',
  169. 'not null' => '',
  170. ),
  171. 'rank' => array(
  172. // 'description' => 'TODO: please describe this field!',
  173. 'type' => 'int',
  174. 'not null' => '1',
  175. 'default' => '0',
  176. ),
  177. ),
  178. 'primary key' => array(
  179. '0' => 'organismprop_id',
  180. ),
  181. 'unique keys' => array(
  182. 'organismprop_c1' => array(
  183. '0' => 'organism_id',
  184. '1' => 'type_id',
  185. '2' => 'rank',
  186. ),
  187. ),
  188. 'indexes' => array(
  189. 'organismprop_idx1' => array(
  190. '0' => 'organism_id',
  191. ),
  192. 'organismprop_idx2' => array(
  193. '0' => 'type_id',
  194. ),
  195. ),
  196. 'foreign keys' => array(
  197. ),
  198. );
  199. return $description;
  200. }
  201. /**
  202. * Implements hook_phendesc_schema()
  203. * Purpose: To describe the structure of phendesc to tripal
  204. * @see tripal_core.api.inc: tripal_core_chado_insert()
  205. * @see tripal_core.api.inc: tripal_core_chado_update()
  206. * @see tripal_core.api.inc: tripal_core_chado_select()
  207. *
  208. * @return
  209. * An array describing the current table
  210. *
  211. * @ingroup tripal_schema_api
  212. *
  213. */
  214. function tripal_core_chado_phendesc_schema () {
  215. $description = array();
  216. $description = array(
  217. 'table' => 'phendesc',
  218. // 'description' => 'TODO: please describe this table!',
  219. 'fields' => array(
  220. 'phendesc_id' => array(
  221. // 'description' => 'TODO: please describe this field!',
  222. 'type' => 'serial',
  223. 'not null' => '1',
  224. ),
  225. 'genotype_id' => array(
  226. // 'description' => 'TODO: please describe this field!',
  227. 'type' => 'int',
  228. 'not null' => '1',
  229. ),
  230. 'environment_id' => array(
  231. // 'description' => 'TODO: please describe this field!',
  232. 'type' => 'int',
  233. 'not null' => '1',
  234. ),
  235. 'description' => array(
  236. // 'description' => 'TODO: please describe this field!',
  237. 'type' => 'text',
  238. 'not null' => '1',
  239. ),
  240. 'type_id' => array(
  241. // 'description' => 'TODO: please describe this field!',
  242. 'type' => 'int',
  243. 'not null' => '1',
  244. ),
  245. 'pub_id' => array(
  246. // 'description' => 'TODO: please describe this field!',
  247. 'type' => 'int',
  248. 'not null' => '1',
  249. ),
  250. ),
  251. 'primary key' => array(
  252. '0' => 'phendesc_id',
  253. ),
  254. 'unique keys' => array(
  255. 'phendesc_c1' => array(
  256. '0' => 'genotype_id',
  257. '1' => 'environment_id',
  258. '2' => 'type_id',
  259. '3' => 'pub_id',
  260. ),
  261. ),
  262. 'indexes' => array(
  263. 'phendesc_idx1' => array(
  264. '0' => 'genotype_id',
  265. ),
  266. 'phendesc_idx2' => array(
  267. '0' => 'environment_id',
  268. ),
  269. 'phendesc_idx3' => array(
  270. '0' => 'pub_id',
  271. ),
  272. ),
  273. 'foreign keys' => array(
  274. ),
  275. );
  276. return $description;
  277. }
  278. /**
  279. * Implements hook_phenotype_schema()
  280. * Purpose: To describe the structure of phenotype 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. * @ingroup tripal_schema_api
  289. *
  290. */
  291. function tripal_core_chado_phenotype_schema () {
  292. $description = array();
  293. $description = array(
  294. 'table' => 'phenotype',
  295. // 'description' => 'TODO: please describe this table!',
  296. 'fields' => array(
  297. 'phenotype_id' => array(
  298. // 'description' => 'TODO: please describe this field!',
  299. 'type' => 'serial',
  300. 'not null' => '1',
  301. ),
  302. 'uniquename' => array(
  303. // 'description' => 'TODO: please describe this field!',
  304. 'type' => 'text',
  305. 'not null' => '1',
  306. ),
  307. 'observable_id' => array(
  308. // 'description' => 'TODO: please describe this field!',
  309. 'type' => 'int',
  310. 'not null' => '',
  311. ),
  312. 'attr_id' => array(
  313. // 'description' => 'TODO: please describe this field!',
  314. 'type' => 'int',
  315. 'not null' => '',
  316. ),
  317. 'value' => array(
  318. // 'description' => 'TODO: please describe this field!',
  319. 'type' => 'text',
  320. 'not null' => '',
  321. ),
  322. 'cvalue_id' => array(
  323. // 'description' => 'TODO: please describe this field!',
  324. 'type' => 'int',
  325. 'not null' => '',
  326. ),
  327. 'assay_id' => array(
  328. // 'description' => 'TODO: please describe this field!',
  329. 'type' => 'int',
  330. 'not null' => '',
  331. ),
  332. ),
  333. 'primary key' => array(
  334. '0' => 'phenotype_id',
  335. ),
  336. 'unique keys' => array(
  337. 'phenotype_c1' => array(
  338. '0' => 'uniquename',
  339. ),
  340. ),
  341. 'indexes' => array(
  342. 'phenotype_idx1' => array(
  343. '0' => 'cvalue_id',
  344. ),
  345. 'phenotype_idx2' => array(
  346. '0' => 'observable_id',
  347. ),
  348. 'phenotype_idx3' => array(
  349. '0' => 'attr_id',
  350. ),
  351. ),
  352. 'foreign keys' => array(
  353. ),
  354. );
  355. return $description;
  356. }
  357. /**
  358. * Implements hook_organism_schema()
  359. * Purpose: To describe the structure of organism to tripal
  360. * @see tripal_core.api.inc: tripal_core_chado_insert()
  361. * @see tripal_core.api.inc: tripal_core_chado_update()
  362. * @see tripal_core.api.inc: tripal_core_chado_select()
  363. *
  364. * @return
  365. * An array describing the current table
  366. *
  367. * @ingroup tripal_schema_api
  368. *
  369. */
  370. function tripal_core_chado_organism_schema () {
  371. $description = array();
  372. $description = array(
  373. 'table' => 'organism',
  374. // 'description' => 'TODO: please describe this table!',
  375. 'fields' => array(
  376. 'organism_id' => array(
  377. // 'description' => 'TODO: please describe this field!',
  378. 'type' => 'serial',
  379. 'not null' => '1',
  380. ),
  381. 'abbreviation' => array(
  382. // 'description' => 'TODO: please describe this field!',
  383. 'type' => 'varchar',
  384. 'length' => '255',
  385. 'not null' => '',
  386. ),
  387. 'genus' => array(
  388. // 'description' => 'TODO: please describe this field!',
  389. 'type' => 'varchar',
  390. 'length' => '255',
  391. 'not null' => '1',
  392. ),
  393. 'species' => array(
  394. // 'description' => 'TODO: please describe this field!',
  395. 'type' => 'varchar',
  396. 'length' => '255',
  397. 'not null' => '1',
  398. ),
  399. 'common_name' => array(
  400. // 'description' => 'TODO: please describe this field!',
  401. 'type' => 'varchar',
  402. 'length' => '255',
  403. 'not null' => '',
  404. ),
  405. 'comment' => array(
  406. // 'description' => 'TODO: please describe this field!',
  407. 'type' => 'text',
  408. 'not null' => '',
  409. ),
  410. ),
  411. 'primary key' => array(
  412. '0' => 'organism_id',
  413. ),
  414. 'unique keys' => array(
  415. 'organism_c1' => array(
  416. '0' => 'genus',
  417. '1' => 'species',
  418. ),
  419. ),
  420. 'indexes' => array(
  421. ),
  422. 'foreign keys' => array(
  423. ),
  424. );
  425. return $description;
  426. }
  427. /**
  428. * Implements hook_materialized_view_schema()
  429. * Purpose: To describe the structure of materialized_view to tripal
  430. * @see tripal_core.api.inc: tripal_core_chado_insert()
  431. * @see tripal_core.api.inc: tripal_core_chado_update()
  432. * @see tripal_core.api.inc: tripal_core_chado_select()
  433. *
  434. * @return
  435. * An array describing the current table
  436. *
  437. * @ingroup tripal_schema_api
  438. *
  439. */
  440. function tripal_core_chado_materialized_view_schema () {
  441. $description = array();
  442. $description = array(
  443. 'table' => 'materialized_view',
  444. // 'description' => 'TODO: please describe this table!',
  445. 'fields' => array(
  446. 'materialized_view_id' => array(
  447. // 'description' => 'TODO: please describe this field!',
  448. 'type' => 'serial',
  449. 'not null' => '1',
  450. ),
  451. 'last_update' => array(
  452. // 'description' => 'TODO: please describe this field!',
  453. 'type' => 'datetime',
  454. 'not null' => '',
  455. ),
  456. 'refresh_time' => array(
  457. // 'description' => 'TODO: please describe this field!',
  458. 'type' => 'int',
  459. 'not null' => '',
  460. ),
  461. 'name' => array(
  462. // 'description' => 'TODO: please describe this field!',
  463. 'type' => 'varchar',
  464. 'length' => '64',
  465. 'not null' => '',
  466. ),
  467. 'mv_schema' => array(
  468. // 'description' => 'TODO: please describe this field!',
  469. 'type' => 'varchar',
  470. 'length' => '64',
  471. 'not null' => '',
  472. ),
  473. 'mv_table' => array(
  474. // 'description' => 'TODO: please describe this field!',
  475. 'type' => 'varchar',
  476. 'length' => '128',
  477. 'not null' => '',
  478. ),
  479. 'mv_specs' => array(
  480. // 'description' => 'TODO: please describe this field!',
  481. 'type' => 'text',
  482. 'not null' => '',
  483. ),
  484. 'indexed' => array(
  485. // 'description' => 'TODO: please describe this field!',
  486. 'type' => 'text',
  487. 'not null' => '',
  488. ),
  489. 'query' => array(
  490. // 'description' => 'TODO: please describe this field!',
  491. 'type' => 'text',
  492. 'not null' => '',
  493. ),
  494. 'special_index' => array(
  495. // 'description' => 'TODO: please describe this field!',
  496. 'type' => 'text',
  497. 'not null' => '',
  498. ),
  499. ),
  500. 'primary key' => array(
  501. ),
  502. 'unique keys' => array(
  503. 'name' => array(
  504. '0' => 'name',
  505. ),
  506. ),
  507. 'indexes' => array(
  508. ),
  509. 'foreign keys' => array(
  510. ),
  511. );
  512. return $description;
  513. }
  514. /**
  515. * Implements hook_libraryprop_schema()
  516. * Purpose: To describe the structure of libraryprop to tripal
  517. * @see tripal_core.api.inc: tripal_core_chado_insert()
  518. * @see tripal_core.api.inc: tripal_core_chado_update()
  519. * @see tripal_core.api.inc: tripal_core_chado_select()
  520. *
  521. * @return
  522. * An array describing the current table
  523. *
  524. * @ingroup tripal_schema_api
  525. *
  526. */
  527. function tripal_core_chado_libraryprop_schema () {
  528. $description = array();
  529. $description = array(
  530. 'table' => 'libraryprop',
  531. // 'description' => 'TODO: please describe this table!',
  532. 'fields' => array(
  533. 'libraryprop_id' => array(
  534. // 'description' => 'TODO: please describe this field!',
  535. 'type' => 'serial',
  536. 'not null' => '1',
  537. ),
  538. 'library_id' => array(
  539. // 'description' => 'TODO: please describe this field!',
  540. 'type' => 'int',
  541. 'not null' => '1',
  542. ),
  543. 'type_id' => array(
  544. // 'description' => 'TODO: please describe this field!',
  545. 'type' => 'int',
  546. 'not null' => '1',
  547. ),
  548. 'value' => array(
  549. // 'description' => 'TODO: please describe this field!',
  550. 'type' => 'text',
  551. 'not null' => '',
  552. ),
  553. 'rank' => array(
  554. // 'description' => 'TODO: please describe this field!',
  555. 'type' => 'int',
  556. 'not null' => '1',
  557. 'default' => '0',
  558. ),
  559. ),
  560. 'primary key' => array(
  561. '0' => 'libraryprop_id',
  562. ),
  563. 'unique keys' => array(
  564. 'libraryprop_c1' => array(
  565. '0' => 'library_id',
  566. '1' => 'type_id',
  567. '2' => 'rank',
  568. ),
  569. ),
  570. 'indexes' => array(
  571. 'libraryprop_idx1' => array(
  572. '0' => 'library_id',
  573. ),
  574. 'libraryprop_idx2' => array(
  575. '0' => 'type_id',
  576. ),
  577. ),
  578. 'foreign keys' => array(
  579. ),
  580. );
  581. return $description;
  582. }
  583. /**
  584. * Implements hook_libraryprop_pub_schema()
  585. * Purpose: To describe the structure of libraryprop_pub to tripal
  586. * @see tripal_core.api.inc: tripal_core_chado_insert()
  587. * @see tripal_core.api.inc: tripal_core_chado_update()
  588. * @see tripal_core.api.inc: tripal_core_chado_select()
  589. *
  590. * @return
  591. * An array describing the current table
  592. *
  593. * @ingroup tripal_schema_api
  594. *
  595. */
  596. function tripal_core_chado_libraryprop_pub_schema () {
  597. $description = array();
  598. $description = array(
  599. 'table' => 'libraryprop_pub',
  600. // 'description' => 'TODO: please describe this table!',
  601. 'fields' => array(
  602. 'libraryprop_pub_id' => array(
  603. // 'description' => 'TODO: please describe this field!',
  604. 'type' => 'serial',
  605. 'not null' => '1',
  606. ),
  607. 'libraryprop_id' => array(
  608. // 'description' => 'TODO: please describe this field!',
  609. 'type' => 'int',
  610. 'not null' => '1',
  611. ),
  612. 'pub_id' => array(
  613. // 'description' => 'TODO: please describe this field!',
  614. 'type' => 'int',
  615. 'not null' => '1',
  616. ),
  617. ),
  618. 'primary key' => array(
  619. '0' => 'libraryprop_pub_id',
  620. ),
  621. 'unique keys' => array(
  622. 'libraryprop_pub_c1' => array(
  623. '0' => 'libraryprop_id',
  624. '1' => 'pub_id',
  625. ),
  626. ),
  627. 'indexes' => array(
  628. 'libraryprop_pub_idx1' => array(
  629. '0' => 'libraryprop_id',
  630. ),
  631. 'libraryprop_pub_idx2' => array(
  632. '0' => 'pub_id',
  633. ),
  634. ),
  635. 'foreign keys' => array(
  636. ),
  637. );
  638. return $description;
  639. }
  640. /**
  641. * Implements hook_magedocumentation_schema()
  642. * Purpose: To describe the structure of magedocumentation to tripal
  643. * @see tripal_core.api.inc: tripal_core_chado_insert()
  644. * @see tripal_core.api.inc: tripal_core_chado_update()
  645. * @see tripal_core.api.inc: tripal_core_chado_select()
  646. *
  647. * @return
  648. * An array describing the current table
  649. *
  650. * @ingroup tripal_schema_api
  651. *
  652. */
  653. function tripal_core_chado_magedocumentation_schema () {
  654. $description = array();
  655. $description = array(
  656. 'table' => 'magedocumentation',
  657. // 'description' => 'TODO: please describe this table!',
  658. 'fields' => array(
  659. 'magedocumentation_id' => array(
  660. // 'description' => 'TODO: please describe this field!',
  661. 'type' => 'serial',
  662. 'not null' => '1',
  663. ),
  664. 'mageml_id' => array(
  665. // 'description' => 'TODO: please describe this field!',
  666. 'type' => 'int',
  667. 'not null' => '1',
  668. ),
  669. 'tableinfo_id' => array(
  670. // 'description' => 'TODO: please describe this field!',
  671. 'type' => 'int',
  672. 'not null' => '1',
  673. ),
  674. 'row_id' => array(
  675. // 'description' => 'TODO: please describe this field!',
  676. 'type' => 'int',
  677. 'not null' => '1',
  678. ),
  679. 'mageidentifier' => array(
  680. // 'description' => 'TODO: please describe this field!',
  681. 'type' => 'text',
  682. 'not null' => '1',
  683. ),
  684. ),
  685. 'primary key' => array(
  686. '0' => 'magedocumentation_id',
  687. ),
  688. 'unique keys' => array(
  689. ),
  690. 'indexes' => array(
  691. 'magedocumentation_idx1' => array(
  692. '0' => 'mageml_id',
  693. ),
  694. 'magedocumentation_idx2' => array(
  695. '0' => 'tableinfo_id',
  696. ),
  697. 'magedocumentation_idx3' => array(
  698. '0' => 'row_id',
  699. ),
  700. ),
  701. 'foreign keys' => array(
  702. ),
  703. );
  704. return $description;
  705. }
  706. /**
  707. * Implements hook_mageml_schema()
  708. * Purpose: To describe the structure of mageml to tripal
  709. * @see tripal_core.api.inc: tripal_core_chado_insert()
  710. * @see tripal_core.api.inc: tripal_core_chado_update()
  711. * @see tripal_core.api.inc: tripal_core_chado_select()
  712. *
  713. * @return
  714. * An array describing the current table
  715. *
  716. * @ingroup tripal_schema_api
  717. *
  718. */
  719. function tripal_core_chado_mageml_schema () {
  720. $description = array();
  721. $description = array(
  722. 'table' => 'mageml',
  723. // 'description' => 'TODO: please describe this table!',
  724. 'fields' => array(
  725. 'mageml_id' => array(
  726. // 'description' => 'TODO: please describe this field!',
  727. 'type' => 'serial',
  728. 'not null' => '1',
  729. ),
  730. 'mage_package' => array(
  731. // 'description' => 'TODO: please describe this field!',
  732. 'type' => 'text',
  733. 'not null' => '1',
  734. ),
  735. 'mage_ml' => array(
  736. // 'description' => 'TODO: please describe this field!',
  737. 'type' => 'text',
  738. 'not null' => '1',
  739. ),
  740. ),
  741. 'primary key' => array(
  742. '0' => 'mageml_id',
  743. ),
  744. 'unique keys' => array(
  745. ),
  746. 'indexes' => array(
  747. ),
  748. 'foreign keys' => array(
  749. ),
  750. );
  751. return $description;
  752. }
  753. /**
  754. * Implements hook_phenotype_comparison_schema()
  755. * Purpose: To describe the structure of phenotype_comparison to tripal
  756. * @see tripal_core.api.inc: tripal_core_chado_insert()
  757. * @see tripal_core.api.inc: tripal_core_chado_update()
  758. * @see tripal_core.api.inc: tripal_core_chado_select()
  759. *
  760. * @return
  761. * An array describing the current table
  762. *
  763. * @ingroup tripal_schema_api
  764. *
  765. */
  766. function tripal_core_chado_phenotype_comparison_schema () {
  767. $description = array();
  768. $description = array(
  769. 'table' => 'phenotype_comparison',
  770. // 'description' => 'TODO: please describe this table!',
  771. 'fields' => array(
  772. 'phenotype_comparison_id' => array(
  773. // 'description' => 'TODO: please describe this field!',
  774. 'type' => 'serial',
  775. 'not null' => '1',
  776. ),
  777. 'genotype1_id' => array(
  778. // 'description' => 'TODO: please describe this field!',
  779. 'type' => 'int',
  780. 'not null' => '1',
  781. ),
  782. 'environment1_id' => array(
  783. // 'description' => 'TODO: please describe this field!',
  784. 'type' => 'int',
  785. 'not null' => '1',
  786. ),
  787. 'genotype2_id' => array(
  788. // 'description' => 'TODO: please describe this field!',
  789. 'type' => 'int',
  790. 'not null' => '1',
  791. ),
  792. 'environment2_id' => array(
  793. // 'description' => 'TODO: please describe this field!',
  794. 'type' => 'int',
  795. 'not null' => '1',
  796. ),
  797. 'phenotype1_id' => array(
  798. // 'description' => 'TODO: please describe this field!',
  799. 'type' => 'int',
  800. 'not null' => '1',
  801. ),
  802. 'phenotype2_id' => array(
  803. // 'description' => 'TODO: please describe this field!',
  804. 'type' => 'int',
  805. 'not null' => '',
  806. ),
  807. 'pub_id' => array(
  808. // 'description' => 'TODO: please describe this field!',
  809. 'type' => 'int',
  810. 'not null' => '1',
  811. ),
  812. 'organism_id' => array(
  813. // 'description' => 'TODO: please describe this field!',
  814. 'type' => 'int',
  815. 'not null' => '1',
  816. ),
  817. ),
  818. 'primary key' => array(
  819. '0' => 'phenotype_comparison_id',
  820. ),
  821. 'unique keys' => array(
  822. 'phenotype_comparison_c1' => array(
  823. '0' => 'genotype1_id',
  824. '1' => 'environment1_id',
  825. '2' => 'genotype2_id',
  826. '3' => 'environment2_id',
  827. '4' => 'phenotype1_id',
  828. '5' => 'pub_id',
  829. ),
  830. ),
  831. 'indexes' => array(
  832. 'phenotype_comparison_idx1' => array(
  833. '0' => 'genotype1_id',
  834. ),
  835. 'phenotype_comparison_idx2' => array(
  836. '0' => 'genotype2_id',
  837. ),
  838. 'phenotype_comparison_idx4' => array(
  839. '0' => 'pub_id',
  840. ),
  841. ),
  842. 'foreign keys' => array(
  843. ),
  844. );
  845. return $description;
  846. }
  847. /**
  848. * Implements hook_phenotype_comparison_cvterm_schema()
  849. * Purpose: To describe the structure of phenotype_comparison_cvterm to tripal
  850. * @see tripal_core.api.inc: tripal_core_chado_insert()
  851. * @see tripal_core.api.inc: tripal_core_chado_update()
  852. * @see tripal_core.api.inc: tripal_core_chado_select()
  853. *
  854. * @return
  855. * An array describing the current table
  856. *
  857. * @ingroup tripal_schema_api
  858. *
  859. */
  860. function tripal_core_chado_phenotype_comparison_cvterm_schema () {
  861. $description = array();
  862. $description = array(
  863. 'table' => 'phenotype_comparison_cvterm',
  864. // 'description' => 'TODO: please describe this table!',
  865. 'fields' => array(
  866. 'phenotype_comparison_cvterm_id' => array(
  867. // 'description' => 'TODO: please describe this field!',
  868. 'type' => 'serial',
  869. 'not null' => '1',
  870. ),
  871. 'phenotype_comparison_id' => array(
  872. // 'description' => 'TODO: please describe this field!',
  873. 'type' => 'int',
  874. 'not null' => '1',
  875. ),
  876. 'cvterm_id' => array(
  877. // 'description' => 'TODO: please describe this field!',
  878. 'type' => 'int',
  879. 'not null' => '1',
  880. ),
  881. 'pub_id' => array(
  882. // 'description' => 'TODO: please describe this field!',
  883. 'type' => 'int',
  884. 'not null' => '1',
  885. ),
  886. 'rank' => array(
  887. // 'description' => 'TODO: please describe this field!',
  888. 'type' => 'int',
  889. 'not null' => '1',
  890. 'default' => '0',
  891. ),
  892. ),
  893. 'primary key' => array(
  894. '0' => 'phenotype_comparison_cvterm_id',
  895. ),
  896. 'unique keys' => array(
  897. 'phenotype_comparison_cvterm_c1' => array(
  898. '0' => 'phenotype_comparison_id',
  899. '1' => 'cvterm_id',
  900. ),
  901. ),
  902. 'indexes' => array(
  903. 'phenotype_comparison_cvterm_idx1' => array(
  904. '0' => 'phenotype_comparison_id',
  905. ),
  906. 'phenotype_comparison_cvterm_idx2' => array(
  907. '0' => 'cvterm_id',
  908. ),
  909. ),
  910. 'foreign keys' => array(
  911. ),
  912. );
  913. return $description;
  914. }
  915. /**
  916. * Implements hook_phylonode_relationship_schema()
  917. * Purpose: To describe the structure of phylonode_relationship to tripal
  918. * @see tripal_core.api.inc: tripal_core_chado_insert()
  919. * @see tripal_core.api.inc: tripal_core_chado_update()
  920. * @see tripal_core.api.inc: tripal_core_chado_select()
  921. *
  922. * @return
  923. * An array describing the current table
  924. *
  925. * @ingroup tripal_schema_api
  926. *
  927. */
  928. function tripal_core_chado_phylonode_relationship_schema () {
  929. $description = array();
  930. $description = array(
  931. 'table' => 'phylonode_relationship',
  932. // 'description' => 'TODO: please describe this table!',
  933. 'fields' => array(
  934. 'phylonode_relationship_id' => array(
  935. // 'description' => 'TODO: please describe this field!',
  936. 'type' => 'serial',
  937. 'not null' => '1',
  938. ),
  939. 'subject_id' => array(
  940. // 'description' => 'TODO: please describe this field!',
  941. 'type' => 'int',
  942. 'not null' => '1',
  943. ),
  944. 'object_id' => array(
  945. // 'description' => 'TODO: please describe this field!',
  946. 'type' => 'int',
  947. 'not null' => '1',
  948. ),
  949. 'type_id' => array(
  950. // 'description' => 'TODO: please describe this field!',
  951. 'type' => 'int',
  952. 'not null' => '1',
  953. ),
  954. 'rank' => array(
  955. // 'description' => 'TODO: please describe this field!',
  956. 'type' => 'int',
  957. 'not null' => '',
  958. ),
  959. 'phylotree_id' => array(
  960. // 'description' => 'TODO: please describe this field!',
  961. 'type' => 'int',
  962. 'not null' => '1',
  963. ),
  964. ),
  965. 'primary key' => array(
  966. '0' => 'phylonode_relationship_id',
  967. ),
  968. 'unique keys' => array(
  969. 'subject_id' => array(
  970. '0' => 'subject_id',
  971. '1' => 'object_id',
  972. '2' => 'type_id',
  973. ),
  974. ),
  975. 'indexes' => array(
  976. 'phylonode_relationship_idx1' => array(
  977. '0' => 'subject_id',
  978. ),
  979. 'phylonode_relationship_idx2' => array(
  980. '0' => 'object_id',
  981. ),
  982. 'phylonode_relationship_idx3' => array(
  983. '0' => 'type_id',
  984. ),
  985. ),
  986. 'foreign keys' => array(
  987. ),
  988. );
  989. return $description;
  990. }
  991. /**
  992. * Implements hook_phylonodeprop_schema()
  993. * Purpose: To describe the structure of phylonodeprop to tripal
  994. * @see tripal_core.api.inc: tripal_core_chado_insert()
  995. * @see tripal_core.api.inc: tripal_core_chado_update()
  996. * @see tripal_core.api.inc: tripal_core_chado_select()
  997. *
  998. * @return
  999. * An array describing the current table
  1000. *
  1001. * @ingroup tripal_schema_api
  1002. *
  1003. */
  1004. function tripal_core_chado_phylonodeprop_schema () {
  1005. $description = array();
  1006. $description = array(
  1007. 'table' => 'phylonodeprop',
  1008. // 'description' => 'TODO: please describe this table!',
  1009. 'fields' => array(
  1010. 'phylonodeprop_id' => array(
  1011. // 'description' => 'TODO: please describe this field!',
  1012. 'type' => 'serial',
  1013. 'not null' => '1',
  1014. ),
  1015. 'phylonode_id' => array(
  1016. // 'description' => 'TODO: please describe this field!',
  1017. 'type' => 'int',
  1018. 'not null' => '1',
  1019. ),
  1020. 'type_id' => array(
  1021. // 'description' => 'TODO: please describe this field!',
  1022. 'type' => 'int',
  1023. 'not null' => '1',
  1024. ),
  1025. 'value' => array(
  1026. // 'description' => 'TODO: please describe this field!',
  1027. 'type' => 'text',
  1028. 'not null' => '1',
  1029. 'default' => '',
  1030. ),
  1031. 'rank' => array(
  1032. // 'description' => 'TODO: please describe this field!',
  1033. 'type' => 'int',
  1034. 'not null' => '1',
  1035. 'default' => '0',
  1036. ),
  1037. ),
  1038. 'primary key' => array(
  1039. '0' => 'phylonodeprop_id',
  1040. ),
  1041. 'unique keys' => array(
  1042. 'phylonode_id' => array(
  1043. '0' => 'phylonode_id',
  1044. '1' => 'type_id',
  1045. '2' => 'value',
  1046. '3' => 'rank',
  1047. ),
  1048. ),
  1049. 'indexes' => array(
  1050. 'phylonodeprop_idx1' => array(
  1051. '0' => 'phylonode_id',
  1052. ),
  1053. 'phylonodeprop_idx2' => array(
  1054. '0' => 'type_id',
  1055. ),
  1056. ),
  1057. 'foreign keys' => array(
  1058. ),
  1059. );
  1060. return $description;
  1061. }
  1062. /**
  1063. * Implements hook_phylotree_schema()
  1064. * Purpose: To describe the structure of phylotree to tripal
  1065. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1066. * @see tripal_core.api.inc: tripal_core_chado_update()
  1067. * @see tripal_core.api.inc: tripal_core_chado_select()
  1068. *
  1069. * @return
  1070. * An array describing the current table
  1071. *
  1072. * @ingroup tripal_schema_api
  1073. *
  1074. */
  1075. function tripal_core_chado_phylotree_schema () {
  1076. $description = array();
  1077. $description = array(
  1078. 'table' => 'phylotree',
  1079. // 'description' => 'TODO: please describe this table!',
  1080. 'fields' => array(
  1081. 'phylotree_id' => array(
  1082. // 'description' => 'TODO: please describe this field!',
  1083. 'type' => 'serial',
  1084. 'not null' => '1',
  1085. ),
  1086. 'dbxref_id' => array(
  1087. // 'description' => 'TODO: please describe this field!',
  1088. 'type' => 'int',
  1089. 'not null' => '1',
  1090. ),
  1091. 'name' => array(
  1092. // 'description' => 'TODO: please describe this field!',
  1093. 'type' => 'varchar',
  1094. 'length' => '255',
  1095. 'not null' => '',
  1096. ),
  1097. 'type_id' => array(
  1098. // 'description' => 'TODO: please describe this field!',
  1099. 'type' => 'int',
  1100. 'not null' => '',
  1101. ),
  1102. 'analysis_id' => array(
  1103. // 'description' => 'TODO: please describe this field!',
  1104. 'type' => 'int',
  1105. 'not null' => '',
  1106. ),
  1107. 'comment' => array(
  1108. // 'description' => 'TODO: please describe this field!',
  1109. 'type' => 'text',
  1110. 'not null' => '',
  1111. ),
  1112. ),
  1113. 'primary key' => array(
  1114. '0' => 'phylotree_id',
  1115. ),
  1116. 'unique keys' => array(
  1117. ),
  1118. 'indexes' => array(
  1119. 'phylotree_idx1' => array(
  1120. '0' => 'phylotree_id',
  1121. ),
  1122. ),
  1123. 'foreign keys' => array(
  1124. ),
  1125. );
  1126. return $description;
  1127. }
  1128. /**
  1129. * Implements hook_phylotree_pub_schema()
  1130. * Purpose: To describe the structure of phylotree_pub to tripal
  1131. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1132. * @see tripal_core.api.inc: tripal_core_chado_update()
  1133. * @see tripal_core.api.inc: tripal_core_chado_select()
  1134. *
  1135. * @return
  1136. * An array describing the current table
  1137. *
  1138. * @ingroup tripal_schema_api
  1139. *
  1140. */
  1141. function tripal_core_chado_phylotree_pub_schema () {
  1142. $description = array();
  1143. $description = array(
  1144. 'table' => 'phylotree_pub',
  1145. // 'description' => 'TODO: please describe this table!',
  1146. 'fields' => array(
  1147. 'phylotree_pub_id' => array(
  1148. // 'description' => 'TODO: please describe this field!',
  1149. 'type' => 'serial',
  1150. 'not null' => '1',
  1151. ),
  1152. 'phylotree_id' => array(
  1153. // 'description' => 'TODO: please describe this field!',
  1154. 'type' => 'int',
  1155. 'not null' => '1',
  1156. ),
  1157. 'pub_id' => array(
  1158. // 'description' => 'TODO: please describe this field!',
  1159. 'type' => 'int',
  1160. 'not null' => '1',
  1161. ),
  1162. ),
  1163. 'primary key' => array(
  1164. '0' => 'phylotree_pub_id',
  1165. ),
  1166. 'unique keys' => array(
  1167. 'phylotree_id' => array(
  1168. '0' => 'phylotree_id',
  1169. '1' => 'pub_id',
  1170. ),
  1171. ),
  1172. 'indexes' => array(
  1173. 'phylotree_pub_idx1' => array(
  1174. '0' => 'phylotree_id',
  1175. ),
  1176. 'phylotree_pub_idx2' => array(
  1177. '0' => 'pub_id',
  1178. ),
  1179. ),
  1180. 'foreign keys' => array(
  1181. ),
  1182. );
  1183. return $description;
  1184. }
  1185. /**
  1186. * Implements hook_phylonode_pub_schema()
  1187. * Purpose: To describe the structure of phylonode_pub to tripal
  1188. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1189. * @see tripal_core.api.inc: tripal_core_chado_update()
  1190. * @see tripal_core.api.inc: tripal_core_chado_select()
  1191. *
  1192. * @return
  1193. * An array describing the current table
  1194. *
  1195. * @ingroup tripal_schema_api
  1196. *
  1197. */
  1198. function tripal_core_chado_phylonode_pub_schema () {
  1199. $description = array();
  1200. $description = array(
  1201. 'table' => 'phylonode_pub',
  1202. // 'description' => 'TODO: please describe this table!',
  1203. 'fields' => array(
  1204. 'phylonode_pub_id' => array(
  1205. // 'description' => 'TODO: please describe this field!',
  1206. 'type' => 'serial',
  1207. 'not null' => '1',
  1208. ),
  1209. 'phylonode_id' => array(
  1210. // 'description' => 'TODO: please describe this field!',
  1211. 'type' => 'int',
  1212. 'not null' => '1',
  1213. ),
  1214. 'pub_id' => array(
  1215. // 'description' => 'TODO: please describe this field!',
  1216. 'type' => 'int',
  1217. 'not null' => '1',
  1218. ),
  1219. ),
  1220. 'primary key' => array(
  1221. '0' => 'phylonode_pub_id',
  1222. ),
  1223. 'unique keys' => array(
  1224. 'phylonode_id' => array(
  1225. '0' => 'phylonode_id',
  1226. '1' => 'pub_id',
  1227. ),
  1228. ),
  1229. 'indexes' => array(
  1230. 'phylonode_pub_idx1' => array(
  1231. '0' => 'phylonode_id',
  1232. ),
  1233. 'phylonode_pub_idx2' => array(
  1234. '0' => 'pub_id',
  1235. ),
  1236. ),
  1237. 'foreign keys' => array(
  1238. ),
  1239. );
  1240. return $description;
  1241. }
  1242. /**
  1243. * Implements hook_phylonode_organism_schema()
  1244. * Purpose: To describe the structure of phylonode_organism to tripal
  1245. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1246. * @see tripal_core.api.inc: tripal_core_chado_update()
  1247. * @see tripal_core.api.inc: tripal_core_chado_select()
  1248. *
  1249. * @return
  1250. * An array describing the current table
  1251. *
  1252. * @ingroup tripal_schema_api
  1253. *
  1254. */
  1255. function tripal_core_chado_phylonode_organism_schema () {
  1256. $description = array();
  1257. $description = array(
  1258. 'table' => 'phylonode_organism',
  1259. // 'description' => 'TODO: please describe this table!',
  1260. 'fields' => array(
  1261. 'phylonode_organism_id' => array(
  1262. // 'description' => 'TODO: please describe this field!',
  1263. 'type' => 'serial',
  1264. 'not null' => '1',
  1265. ),
  1266. 'phylonode_id' => array(
  1267. // 'description' => 'TODO: please describe this field!',
  1268. 'type' => 'int',
  1269. 'not null' => '1',
  1270. ),
  1271. 'organism_id' => array(
  1272. // 'description' => 'TODO: please describe this field!',
  1273. 'type' => 'int',
  1274. 'not null' => '1',
  1275. ),
  1276. ),
  1277. 'primary key' => array(
  1278. '0' => 'phylonode_organism_id',
  1279. ),
  1280. 'unique keys' => array(
  1281. 'phylonode_id' => array(
  1282. '0' => 'phylonode_id',
  1283. ),
  1284. ),
  1285. 'indexes' => array(
  1286. 'phylonode_organism_idx1' => array(
  1287. '0' => 'phylonode_id',
  1288. ),
  1289. 'phylonode_organism_idx2' => array(
  1290. '0' => 'organism_id',
  1291. ),
  1292. ),
  1293. 'foreign keys' => array(
  1294. ),
  1295. );
  1296. return $description;
  1297. }
  1298. /**
  1299. * Implements hook_phenotype_cvterm_schema()
  1300. * Purpose: To describe the structure of phenotype_cvterm to tripal
  1301. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1302. * @see tripal_core.api.inc: tripal_core_chado_update()
  1303. * @see tripal_core.api.inc: tripal_core_chado_select()
  1304. *
  1305. * @return
  1306. * An array describing the current table
  1307. *
  1308. * @ingroup tripal_schema_api
  1309. *
  1310. */
  1311. function tripal_core_chado_phenotype_cvterm_schema () {
  1312. $description = array();
  1313. $description = array(
  1314. 'table' => 'phenotype_cvterm',
  1315. // 'description' => 'TODO: please describe this table!',
  1316. 'fields' => array(
  1317. 'phenotype_cvterm_id' => array(
  1318. // 'description' => 'TODO: please describe this field!',
  1319. 'type' => 'serial',
  1320. 'not null' => '1',
  1321. ),
  1322. 'phenotype_id' => array(
  1323. // 'description' => 'TODO: please describe this field!',
  1324. 'type' => 'int',
  1325. 'not null' => '1',
  1326. ),
  1327. 'cvterm_id' => array(
  1328. // 'description' => 'TODO: please describe this field!',
  1329. 'type' => 'int',
  1330. 'not null' => '1',
  1331. ),
  1332. 'rank' => array(
  1333. // 'description' => 'TODO: please describe this field!',
  1334. 'type' => 'int',
  1335. 'not null' => '1',
  1336. 'default' => '0',
  1337. ),
  1338. ),
  1339. 'primary key' => array(
  1340. '0' => 'phenotype_cvterm_id',
  1341. ),
  1342. 'unique keys' => array(
  1343. 'phenotype_cvterm_c1' => array(
  1344. '0' => 'phenotype_id',
  1345. '1' => 'cvterm_id',
  1346. '2' => 'rank',
  1347. ),
  1348. ),
  1349. 'indexes' => array(
  1350. 'phenotype_cvterm_idx1' => array(
  1351. '0' => 'phenotype_id',
  1352. ),
  1353. 'phenotype_cvterm_idx2' => array(
  1354. '0' => 'cvterm_id',
  1355. ),
  1356. ),
  1357. 'foreign keys' => array(
  1358. ),
  1359. );
  1360. return $description;
  1361. }
  1362. /**
  1363. * Implements hook_phenstatement_schema()
  1364. * Purpose: To describe the structure of phenstatement to tripal
  1365. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1366. * @see tripal_core.api.inc: tripal_core_chado_update()
  1367. * @see tripal_core.api.inc: tripal_core_chado_select()
  1368. *
  1369. * @return
  1370. * An array describing the current table
  1371. *
  1372. * @ingroup tripal_schema_api
  1373. *
  1374. */
  1375. function tripal_core_chado_phenstatement_schema () {
  1376. $description = array();
  1377. $description = array(
  1378. 'table' => 'phenstatement',
  1379. // 'description' => 'TODO: please describe this table!',
  1380. 'fields' => array(
  1381. 'phenstatement_id' => array(
  1382. // 'description' => 'TODO: please describe this field!',
  1383. 'type' => 'serial',
  1384. 'not null' => '1',
  1385. ),
  1386. 'genotype_id' => array(
  1387. // 'description' => 'TODO: please describe this field!',
  1388. 'type' => 'int',
  1389. 'not null' => '1',
  1390. ),
  1391. 'environment_id' => array(
  1392. // 'description' => 'TODO: please describe this field!',
  1393. 'type' => 'int',
  1394. 'not null' => '1',
  1395. ),
  1396. 'phenotype_id' => array(
  1397. // 'description' => 'TODO: please describe this field!',
  1398. 'type' => 'int',
  1399. 'not null' => '1',
  1400. ),
  1401. 'type_id' => array(
  1402. // 'description' => 'TODO: please describe this field!',
  1403. 'type' => 'int',
  1404. 'not null' => '1',
  1405. ),
  1406. 'pub_id' => array(
  1407. // 'description' => 'TODO: please describe this field!',
  1408. 'type' => 'int',
  1409. 'not null' => '1',
  1410. ),
  1411. ),
  1412. 'primary key' => array(
  1413. '0' => 'phenstatement_id',
  1414. ),
  1415. 'unique keys' => array(
  1416. 'phenstatement_c1' => array(
  1417. '0' => 'genotype_id',
  1418. '1' => 'phenotype_id',
  1419. '2' => 'environment_id',
  1420. '3' => 'type_id',
  1421. '4' => 'pub_id',
  1422. ),
  1423. ),
  1424. 'indexes' => array(
  1425. 'phenstatement_idx1' => array(
  1426. '0' => 'genotype_id',
  1427. ),
  1428. 'phenstatement_idx2' => array(
  1429. '0' => 'phenotype_id',
  1430. ),
  1431. ),
  1432. 'foreign keys' => array(
  1433. ),
  1434. );
  1435. return $description;
  1436. }
  1437. /**
  1438. * Implements hook_phylonode_schema()
  1439. * Purpose: To describe the structure of phylonode to tripal
  1440. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1441. * @see tripal_core.api.inc: tripal_core_chado_update()
  1442. * @see tripal_core.api.inc: tripal_core_chado_select()
  1443. *
  1444. * @return
  1445. * An array describing the current table
  1446. *
  1447. * @ingroup tripal_schema_api
  1448. *
  1449. */
  1450. function tripal_core_chado_phylonode_schema () {
  1451. $description = array();
  1452. $description = array(
  1453. 'table' => 'phylonode',
  1454. // 'description' => 'TODO: please describe this table!',
  1455. 'fields' => array(
  1456. 'phylonode_id' => array(
  1457. // 'description' => 'TODO: please describe this field!',
  1458. 'type' => 'serial',
  1459. 'not null' => '1',
  1460. ),
  1461. 'phylotree_id' => array(
  1462. // 'description' => 'TODO: please describe this field!',
  1463. 'type' => 'int',
  1464. 'not null' => '1',
  1465. ),
  1466. 'parent_phylonode_id' => array(
  1467. // 'description' => 'TODO: please describe this field!',
  1468. 'type' => 'int',
  1469. 'not null' => '',
  1470. ),
  1471. 'left_idx' => array(
  1472. // 'description' => 'TODO: please describe this field!',
  1473. 'type' => 'int',
  1474. 'not null' => '1',
  1475. ),
  1476. 'right_idx' => array(
  1477. // 'description' => 'TODO: please describe this field!',
  1478. 'type' => 'int',
  1479. 'not null' => '1',
  1480. ),
  1481. 'type_id' => array(
  1482. // 'description' => 'TODO: please describe this field!',
  1483. 'type' => 'int',
  1484. 'not null' => '',
  1485. ),
  1486. 'feature_id' => array(
  1487. // 'description' => 'TODO: please describe this field!',
  1488. 'type' => 'int',
  1489. 'not null' => '',
  1490. ),
  1491. 'label' => array(
  1492. // 'description' => 'TODO: please describe this field!',
  1493. 'type' => 'varchar',
  1494. 'length' => '255',
  1495. 'not null' => '',
  1496. ),
  1497. 'distance' => array(
  1498. // 'description' => 'TODO: please describe this field!',
  1499. 'type' => 'float',
  1500. 'size' => 'big',
  1501. 'not null' => '',
  1502. ),
  1503. ),
  1504. 'primary key' => array(
  1505. '0' => 'phylonode_id',
  1506. ),
  1507. 'unique keys' => array(
  1508. 'phylotree_id' => array(
  1509. '0' => 'phylotree_id',
  1510. '1' => 'left_idx',
  1511. ),
  1512. 'phylonode_phylotree_id_key1' => array(
  1513. '0' => 'phylotree_id',
  1514. '1' => 'right_idx',
  1515. ),
  1516. ),
  1517. 'indexes' => array(
  1518. ),
  1519. 'foreign keys' => array(
  1520. ),
  1521. );
  1522. return $description;
  1523. }
  1524. /**
  1525. * Implements hook_phylonode_dbxref_schema()
  1526. * Purpose: To describe the structure of phylonode_dbxref to tripal
  1527. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1528. * @see tripal_core.api.inc: tripal_core_chado_update()
  1529. * @see tripal_core.api.inc: tripal_core_chado_select()
  1530. *
  1531. * @return
  1532. * An array describing the current table
  1533. *
  1534. * @ingroup tripal_schema_api
  1535. *
  1536. */
  1537. function tripal_core_chado_phylonode_dbxref_schema () {
  1538. $description = array();
  1539. $description = array(
  1540. 'table' => 'phylonode_dbxref',
  1541. // 'description' => 'TODO: please describe this table!',
  1542. 'fields' => array(
  1543. 'phylonode_dbxref_id' => array(
  1544. // 'description' => 'TODO: please describe this field!',
  1545. 'type' => 'serial',
  1546. 'not null' => '1',
  1547. ),
  1548. 'phylonode_id' => array(
  1549. // 'description' => 'TODO: please describe this field!',
  1550. 'type' => 'int',
  1551. 'not null' => '1',
  1552. ),
  1553. 'dbxref_id' => array(
  1554. // 'description' => 'TODO: please describe this field!',
  1555. 'type' => 'int',
  1556. 'not null' => '1',
  1557. ),
  1558. ),
  1559. 'primary key' => array(
  1560. '0' => 'phylonode_dbxref_id',
  1561. ),
  1562. 'unique keys' => array(
  1563. 'phylonode_id' => array(
  1564. '0' => 'phylonode_id',
  1565. '1' => 'dbxref_id',
  1566. ),
  1567. ),
  1568. 'indexes' => array(
  1569. 'phylonode_dbxref_idx1' => array(
  1570. '0' => 'phylonode_id',
  1571. ),
  1572. 'phylonode_dbxref_idx2' => array(
  1573. '0' => 'dbxref_id',
  1574. ),
  1575. ),
  1576. 'foreign keys' => array(
  1577. ),
  1578. );
  1579. return $description;
  1580. }
  1581. /**
  1582. * Implements hook_library_synonym_schema()
  1583. * Purpose: To describe the structure of library_synonym to tripal
  1584. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1585. * @see tripal_core.api.inc: tripal_core_chado_update()
  1586. * @see tripal_core.api.inc: tripal_core_chado_select()
  1587. *
  1588. * @return
  1589. * An array describing the current table
  1590. *
  1591. * @ingroup tripal_schema_api
  1592. *
  1593. */
  1594. function tripal_core_chado_library_synonym_schema () {
  1595. $description = array();
  1596. $description = array(
  1597. 'table' => 'library_synonym',
  1598. // 'description' => 'TODO: please describe this table!',
  1599. 'fields' => array(
  1600. 'library_synonym_id' => array(
  1601. // 'description' => 'TODO: please describe this field!',
  1602. 'type' => 'serial',
  1603. 'not null' => '1',
  1604. ),
  1605. 'synonym_id' => array(
  1606. // 'description' => 'TODO: please describe this field!',
  1607. 'type' => 'int',
  1608. 'not null' => '1',
  1609. ),
  1610. 'library_id' => array(
  1611. // 'description' => 'TODO: please describe this field!',
  1612. 'type' => 'int',
  1613. 'not null' => '1',
  1614. ),
  1615. 'pub_id' => array(
  1616. // 'description' => 'TODO: please describe this field!',
  1617. 'type' => 'int',
  1618. 'not null' => '1',
  1619. ),
  1620. 'is_current' => array(
  1621. // 'description' => 'TODO: please describe this field!',
  1622. 'type' => 'boolean',
  1623. 'not null' => '1',
  1624. 'default' => 'ru',
  1625. ),
  1626. 'is_internal' => array(
  1627. // 'description' => 'TODO: please describe this field!',
  1628. 'type' => 'boolean',
  1629. 'not null' => '1',
  1630. 'default' => 'als',
  1631. ),
  1632. ),
  1633. 'primary key' => array(
  1634. '0' => 'library_synonym_id',
  1635. ),
  1636. 'unique keys' => array(
  1637. 'library_synonym_c1' => array(
  1638. '0' => 'synonym_id',
  1639. '1' => 'library_id',
  1640. '2' => 'pub_id',
  1641. ),
  1642. ),
  1643. 'indexes' => array(
  1644. 'library_synonym_idx1' => array(
  1645. '0' => 'synonym_id',
  1646. ),
  1647. 'library_synonym_idx2' => array(
  1648. '0' => 'library_id',
  1649. ),
  1650. 'library_synonym_idx3' => array(
  1651. '0' => 'pub_id',
  1652. ),
  1653. ),
  1654. 'foreign keys' => array(
  1655. ),
  1656. );
  1657. return $description;
  1658. }
  1659. /**
  1660. * Implements hook_library_pub_schema()
  1661. * Purpose: To describe the structure of library_pub to tripal
  1662. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1663. * @see tripal_core.api.inc: tripal_core_chado_update()
  1664. * @see tripal_core.api.inc: tripal_core_chado_select()
  1665. *
  1666. * @return
  1667. * An array describing the current table
  1668. *
  1669. * @ingroup tripal_schema_api
  1670. *
  1671. */
  1672. function tripal_core_chado_library_pub_schema () {
  1673. $description = array();
  1674. $description = array(
  1675. 'table' => 'library_pub',
  1676. // 'description' => 'TODO: please describe this table!',
  1677. 'fields' => array(
  1678. 'library_pub_id' => array(
  1679. // 'description' => 'TODO: please describe this field!',
  1680. 'type' => 'serial',
  1681. 'not null' => '1',
  1682. ),
  1683. 'library_id' => array(
  1684. // 'description' => 'TODO: please describe this field!',
  1685. 'type' => 'int',
  1686. 'not null' => '1',
  1687. ),
  1688. 'pub_id' => array(
  1689. // 'description' => 'TODO: please describe this field!',
  1690. 'type' => 'int',
  1691. 'not null' => '1',
  1692. ),
  1693. ),
  1694. 'primary key' => array(
  1695. '0' => 'library_pub_id',
  1696. ),
  1697. 'unique keys' => array(
  1698. 'library_pub_c1' => array(
  1699. '0' => 'library_id',
  1700. '1' => 'pub_id',
  1701. ),
  1702. ),
  1703. 'indexes' => array(
  1704. 'library_pub_idx1' => array(
  1705. '0' => 'library_id',
  1706. ),
  1707. 'library_pub_idx2' => array(
  1708. '0' => 'pub_id',
  1709. ),
  1710. ),
  1711. 'foreign keys' => array(
  1712. ),
  1713. );
  1714. return $description;
  1715. }
  1716. /**
  1717. * Implements hook_featureprop_pub_schema()
  1718. * Purpose: To describe the structure of featureprop_pub to tripal
  1719. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1720. * @see tripal_core.api.inc: tripal_core_chado_update()
  1721. * @see tripal_core.api.inc: tripal_core_chado_select()
  1722. *
  1723. * @return
  1724. * An array describing the current table
  1725. *
  1726. * @ingroup tripal_schema_api
  1727. *
  1728. */
  1729. function tripal_core_chado_featureprop_pub_schema () {
  1730. $description = array();
  1731. $description = array(
  1732. 'table' => 'featureprop_pub',
  1733. // 'description' => 'TODO: please describe this table!',
  1734. 'fields' => array(
  1735. 'featureprop_pub_id' => array(
  1736. // 'description' => 'TODO: please describe this field!',
  1737. 'type' => 'serial',
  1738. 'not null' => '1',
  1739. ),
  1740. 'featureprop_id' => array(
  1741. // 'description' => 'TODO: please describe this field!',
  1742. 'type' => 'int',
  1743. 'not null' => '1',
  1744. ),
  1745. 'pub_id' => array(
  1746. // 'description' => 'TODO: please describe this field!',
  1747. 'type' => 'int',
  1748. 'not null' => '1',
  1749. ),
  1750. ),
  1751. 'primary key' => array(
  1752. '0' => 'featureprop_pub_id',
  1753. ),
  1754. 'unique keys' => array(
  1755. 'featureprop_pub_c1' => array(
  1756. '0' => 'featureprop_id',
  1757. '1' => 'pub_id',
  1758. ),
  1759. ),
  1760. 'indexes' => array(
  1761. 'featureprop_pub_idx1' => array(
  1762. '0' => 'featureprop_id',
  1763. ),
  1764. 'featureprop_pub_idx2' => array(
  1765. '0' => 'pub_id',
  1766. ),
  1767. ),
  1768. 'foreign keys' => array(
  1769. ),
  1770. );
  1771. return $description;
  1772. }
  1773. /**
  1774. * Implements hook_featureprop_schema()
  1775. * Purpose: To describe the structure of featureprop to tripal
  1776. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1777. * @see tripal_core.api.inc: tripal_core_chado_update()
  1778. * @see tripal_core.api.inc: tripal_core_chado_select()
  1779. *
  1780. * @return
  1781. * An array describing the current table
  1782. *
  1783. * @ingroup tripal_schema_api
  1784. *
  1785. */
  1786. function tripal_core_chado_featureprop_schema () {
  1787. $description = array();
  1788. $description = array(
  1789. 'table' => 'featureprop',
  1790. // 'description' => 'TODO: please describe this table!',
  1791. 'fields' => array(
  1792. 'featureprop_id' => array(
  1793. // 'description' => 'TODO: please describe this field!',
  1794. 'type' => 'serial',
  1795. 'not null' => '1',
  1796. ),
  1797. 'feature_id' => array(
  1798. // 'description' => 'TODO: please describe this field!',
  1799. 'type' => 'int',
  1800. 'not null' => '1',
  1801. ),
  1802. 'type_id' => array(
  1803. // 'description' => 'TODO: please describe this field!',
  1804. 'type' => 'int',
  1805. 'not null' => '1',
  1806. ),
  1807. 'value' => array(
  1808. // 'description' => 'TODO: please describe this field!',
  1809. 'type' => 'text',
  1810. 'not null' => '',
  1811. ),
  1812. 'rank' => array(
  1813. // 'description' => 'TODO: please describe this field!',
  1814. 'type' => 'int',
  1815. 'not null' => '1',
  1816. 'default' => '0',
  1817. ),
  1818. ),
  1819. 'primary key' => array(
  1820. '0' => 'featureprop_id',
  1821. ),
  1822. 'unique keys' => array(
  1823. 'featureprop_c1' => array(
  1824. '0' => 'feature_id',
  1825. '1' => 'type_id',
  1826. '2' => 'rank',
  1827. ),
  1828. ),
  1829. 'indexes' => array(
  1830. 'featureprop_idx1' => array(
  1831. '0' => 'feature_id',
  1832. ),
  1833. 'featureprop_idx2' => array(
  1834. '0' => 'type_id',
  1835. ),
  1836. ),
  1837. 'foreign keys' => array(
  1838. ),
  1839. );
  1840. return $description;
  1841. }
  1842. /**
  1843. * Implements hook_featurerange_schema()
  1844. * Purpose: To describe the structure of featurerange to tripal
  1845. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1846. * @see tripal_core.api.inc: tripal_core_chado_update()
  1847. * @see tripal_core.api.inc: tripal_core_chado_select()
  1848. *
  1849. * @return
  1850. * An array describing the current table
  1851. *
  1852. * @ingroup tripal_schema_api
  1853. *
  1854. */
  1855. function tripal_core_chado_featurerange_schema () {
  1856. $description = array();
  1857. $description = array(
  1858. 'table' => 'featurerange',
  1859. // 'description' => 'TODO: please describe this table!',
  1860. 'fields' => array(
  1861. 'featurerange_id' => array(
  1862. // 'description' => 'TODO: please describe this field!',
  1863. 'type' => 'serial',
  1864. 'not null' => '1',
  1865. ),
  1866. 'featuremap_id' => array(
  1867. // 'description' => 'TODO: please describe this field!',
  1868. 'type' => 'int',
  1869. 'not null' => '1',
  1870. ),
  1871. 'feature_id' => array(
  1872. // 'description' => 'TODO: please describe this field!',
  1873. 'type' => 'int',
  1874. 'not null' => '1',
  1875. ),
  1876. 'leftstartf_id' => array(
  1877. // 'description' => 'TODO: please describe this field!',
  1878. 'type' => 'int',
  1879. 'not null' => '1',
  1880. ),
  1881. 'leftendf_id' => array(
  1882. // 'description' => 'TODO: please describe this field!',
  1883. 'type' => 'int',
  1884. 'not null' => '',
  1885. ),
  1886. 'rightstartf_id' => array(
  1887. // 'description' => 'TODO: please describe this field!',
  1888. 'type' => 'int',
  1889. 'not null' => '',
  1890. ),
  1891. 'rightendf_id' => array(
  1892. // 'description' => 'TODO: please describe this field!',
  1893. 'type' => 'int',
  1894. 'not null' => '1',
  1895. ),
  1896. 'rangestr' => array(
  1897. // 'description' => 'TODO: please describe this field!',
  1898. 'type' => 'varchar',
  1899. 'length' => '255',
  1900. 'not null' => '',
  1901. ),
  1902. ),
  1903. 'primary key' => array(
  1904. '0' => 'featurerange_id',
  1905. ),
  1906. 'unique keys' => array(
  1907. ),
  1908. 'indexes' => array(
  1909. 'featurerange_idx1' => array(
  1910. '0' => 'featuremap_id',
  1911. ),
  1912. 'featurerange_idx2' => array(
  1913. '0' => 'feature_id',
  1914. ),
  1915. 'featurerange_idx3' => array(
  1916. '0' => 'leftstartf_id',
  1917. ),
  1918. 'featurerange_idx4' => array(
  1919. '0' => 'leftendf_id',
  1920. ),
  1921. 'featurerange_idx5' => array(
  1922. '0' => 'rightstartf_id',
  1923. ),
  1924. 'featurerange_idx6' => array(
  1925. '0' => 'rightendf_id',
  1926. ),
  1927. ),
  1928. 'foreign keys' => array(
  1929. ),
  1930. );
  1931. return $description;
  1932. }
  1933. /**
  1934. * Implements hook_featureset_meets_schema()
  1935. * Purpose: To describe the structure of featureset_meets to tripal
  1936. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1937. * @see tripal_core.api.inc: tripal_core_chado_update()
  1938. * @see tripal_core.api.inc: tripal_core_chado_select()
  1939. *
  1940. * @return
  1941. * An array describing the current table
  1942. *
  1943. * @ingroup tripal_schema_api
  1944. *
  1945. */
  1946. function tripal_core_chado_featureset_meets_schema () {
  1947. $description = array();
  1948. $description = array(
  1949. 'table' => 'featureset_meets',
  1950. // 'description' => 'TODO: please describe this table!',
  1951. 'fields' => array(
  1952. 'subject_id' => array(
  1953. // 'description' => 'TODO: please describe this field!',
  1954. 'type' => 'int',
  1955. 'not null' => '',
  1956. ),
  1957. 'object_id' => array(
  1958. // 'description' => 'TODO: please describe this field!',
  1959. 'type' => 'int',
  1960. 'not null' => '',
  1961. ),
  1962. ),
  1963. 'primary key' => array(
  1964. ),
  1965. 'unique keys' => array(
  1966. ),
  1967. 'indexes' => array(
  1968. ),
  1969. 'foreign keys' => array(
  1970. ),
  1971. );
  1972. return $description;
  1973. }
  1974. /**
  1975. * Implements hook_fnr_type_schema()
  1976. * Purpose: To describe the structure of fnr_type to tripal
  1977. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1978. * @see tripal_core.api.inc: tripal_core_chado_update()
  1979. * @see tripal_core.api.inc: tripal_core_chado_select()
  1980. *
  1981. * @return
  1982. * An array describing the current table
  1983. *
  1984. * @ingroup tripal_schema_api
  1985. *
  1986. */
  1987. function tripal_core_chado_fnr_type_schema () {
  1988. $description = array();
  1989. $description = array(
  1990. 'table' => 'fnr_type',
  1991. // 'description' => 'TODO: please describe this table!',
  1992. 'fields' => array(
  1993. 'feature_id' => array(
  1994. // 'description' => 'TODO: please describe this field!',
  1995. 'type' => 'int',
  1996. 'not null' => '',
  1997. ),
  1998. 'name' => array(
  1999. // 'description' => 'TODO: please describe this field!',
  2000. 'type' => 'varchar',
  2001. 'length' => '255',
  2002. 'not null' => '',
  2003. ),
  2004. 'dbxref_id' => array(
  2005. // 'description' => 'TODO: please describe this field!',
  2006. 'type' => 'int',
  2007. 'not null' => '',
  2008. ),
  2009. 'type' => array(
  2010. // 'description' => 'TODO: please describe this field!',
  2011. 'type' => 'varchar',
  2012. 'length' => '1024',
  2013. 'not null' => '',
  2014. ),
  2015. 'residues' => array(
  2016. // 'description' => 'TODO: please describe this field!',
  2017. 'type' => 'text',
  2018. 'not null' => '',
  2019. ),
  2020. 'seqlen' => array(
  2021. // 'description' => 'TODO: please describe this field!',
  2022. 'type' => 'int',
  2023. 'not null' => '',
  2024. ),
  2025. 'md5checksum' => array(
  2026. // 'description' => 'TODO: please describe this field!',
  2027. 'type' => 'char',
  2028. 'length' => '32',
  2029. 'not null' => '',
  2030. ),
  2031. 'type_id' => array(
  2032. // 'description' => 'TODO: please describe this field!',
  2033. 'type' => 'int',
  2034. 'not null' => '',
  2035. ),
  2036. 'timeaccessioned' => array(
  2037. // 'description' => 'TODO: please describe this field!',
  2038. 'type' => 'datetime',
  2039. 'not null' => '',
  2040. ),
  2041. 'timelastmodified' => array(
  2042. // 'description' => 'TODO: please describe this field!',
  2043. 'type' => 'datetime',
  2044. 'not null' => '',
  2045. ),
  2046. ),
  2047. 'primary key' => array(
  2048. ),
  2049. 'unique keys' => array(
  2050. ),
  2051. 'indexes' => array(
  2052. ),
  2053. 'foreign keys' => array(
  2054. ),
  2055. );
  2056. return $description;
  2057. }
  2058. /**
  2059. * Implements hook_featurepos_schema()
  2060. * Purpose: To describe the structure of featurepos to tripal
  2061. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2062. * @see tripal_core.api.inc: tripal_core_chado_update()
  2063. * @see tripal_core.api.inc: tripal_core_chado_select()
  2064. *
  2065. * @return
  2066. * An array describing the current table
  2067. *
  2068. * @ingroup tripal_schema_api
  2069. *
  2070. */
  2071. function tripal_core_chado_featurepos_schema () {
  2072. $description = array();
  2073. $description = array(
  2074. 'table' => 'featurepos',
  2075. // 'description' => 'TODO: please describe this table!',
  2076. 'fields' => array(
  2077. 'featurepos_id' => array(
  2078. // 'description' => 'TODO: please describe this field!',
  2079. 'type' => 'serial',
  2080. 'not null' => '1',
  2081. ),
  2082. 'featuremap_id' => array(
  2083. // 'description' => 'TODO: please describe this field!',
  2084. 'type' => 'serial',
  2085. 'not null' => '1',
  2086. ),
  2087. 'feature_id' => array(
  2088. // 'description' => 'TODO: please describe this field!',
  2089. 'type' => 'int',
  2090. 'not null' => '1',
  2091. ),
  2092. 'map_feature_id' => array(
  2093. // 'description' => 'TODO: please describe this field!',
  2094. 'type' => 'int',
  2095. 'not null' => '1',
  2096. ),
  2097. 'mappos' => array(
  2098. // 'description' => 'TODO: please describe this field!',
  2099. 'type' => 'float',
  2100. 'size' => 'big',
  2101. 'not null' => '1',
  2102. ),
  2103. ),
  2104. 'primary key' => array(
  2105. '0' => 'featurepos_id',
  2106. ),
  2107. 'unique keys' => array(
  2108. ),
  2109. 'indexes' => array(
  2110. 'featurepos_idx1' => array(
  2111. '0' => 'featuremap_id',
  2112. ),
  2113. 'featurepos_idx2' => array(
  2114. '0' => 'feature_id',
  2115. ),
  2116. 'featurepos_idx3' => array(
  2117. '0' => 'map_feature_id',
  2118. ),
  2119. ),
  2120. 'foreign keys' => array(
  2121. ),
  2122. );
  2123. return $description;
  2124. }
  2125. /**
  2126. * Implements hook_featuremap_pub_schema()
  2127. * Purpose: To describe the structure of featuremap_pub to tripal
  2128. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2129. * @see tripal_core.api.inc: tripal_core_chado_update()
  2130. * @see tripal_core.api.inc: tripal_core_chado_select()
  2131. *
  2132. * @return
  2133. * An array describing the current table
  2134. *
  2135. * @ingroup tripal_schema_api
  2136. *
  2137. */
  2138. function tripal_core_chado_featuremap_pub_schema () {
  2139. $description = array();
  2140. $description = array(
  2141. 'table' => 'featuremap_pub',
  2142. // 'description' => 'TODO: please describe this table!',
  2143. 'fields' => array(
  2144. 'featuremap_pub_id' => array(
  2145. // 'description' => 'TODO: please describe this field!',
  2146. 'type' => 'serial',
  2147. 'not null' => '1',
  2148. ),
  2149. 'featuremap_id' => array(
  2150. // 'description' => 'TODO: please describe this field!',
  2151. 'type' => 'int',
  2152. 'not null' => '1',
  2153. ),
  2154. 'pub_id' => array(
  2155. // 'description' => 'TODO: please describe this field!',
  2156. 'type' => 'int',
  2157. 'not null' => '1',
  2158. ),
  2159. ),
  2160. 'primary key' => array(
  2161. '0' => 'featuremap_pub_id',
  2162. ),
  2163. 'unique keys' => array(
  2164. ),
  2165. 'indexes' => array(
  2166. 'featuremap_pub_idx1' => array(
  2167. '0' => 'featuremap_id',
  2168. ),
  2169. 'featuremap_pub_idx2' => array(
  2170. '0' => 'pub_id',
  2171. ),
  2172. ),
  2173. 'foreign keys' => array(
  2174. ),
  2175. );
  2176. return $description;
  2177. }
  2178. /**
  2179. * Implements hook_feature_union_schema()
  2180. * Purpose: To describe the structure of feature_union to tripal
  2181. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2182. * @see tripal_core.api.inc: tripal_core_chado_update()
  2183. * @see tripal_core.api.inc: tripal_core_chado_select()
  2184. *
  2185. * @return
  2186. * An array describing the current table
  2187. *
  2188. * @ingroup tripal_schema_api
  2189. *
  2190. */
  2191. function tripal_core_chado_feature_union_schema () {
  2192. $description = array();
  2193. $description = array(
  2194. 'table' => 'feature_union',
  2195. // 'description' => 'TODO: please describe this table!',
  2196. 'fields' => array(
  2197. 'subject_id' => array(
  2198. // 'description' => 'TODO: please describe this field!',
  2199. 'type' => 'int',
  2200. 'not null' => '',
  2201. ),
  2202. 'object_id' => array(
  2203. // 'description' => 'TODO: please describe this field!',
  2204. 'type' => 'int',
  2205. 'not null' => '',
  2206. ),
  2207. 'srcfeature_id' => array(
  2208. // 'description' => 'TODO: please describe this field!',
  2209. 'type' => 'int',
  2210. 'not null' => '',
  2211. ),
  2212. 'subject_strand' => array(
  2213. // 'description' => 'TODO: please describe this field!',
  2214. 'type' => 'int',
  2215. 'size' => 'small',
  2216. 'not null' => '',
  2217. ),
  2218. 'object_strand' => array(
  2219. // 'description' => 'TODO: please describe this field!',
  2220. 'type' => 'int',
  2221. 'size' => 'small',
  2222. 'not null' => '',
  2223. ),
  2224. 'fmin' => array(
  2225. // 'description' => 'TODO: please describe this field!',
  2226. 'type' => 'int',
  2227. 'not null' => '',
  2228. ),
  2229. 'fmax' => array(
  2230. // 'description' => 'TODO: please describe this field!',
  2231. 'type' => 'int',
  2232. 'not null' => '',
  2233. ),
  2234. ),
  2235. 'primary key' => array(
  2236. ),
  2237. 'unique keys' => array(
  2238. ),
  2239. 'indexes' => array(
  2240. ),
  2241. 'foreign keys' => array(
  2242. ),
  2243. );
  2244. return $description;
  2245. }
  2246. /**
  2247. * Implements hook_featureloc_schema()
  2248. * Purpose: To describe the structure of featureloc to tripal
  2249. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2250. * @see tripal_core.api.inc: tripal_core_chado_update()
  2251. * @see tripal_core.api.inc: tripal_core_chado_select()
  2252. *
  2253. * @return
  2254. * An array describing the current table
  2255. *
  2256. * @ingroup tripal_schema_api
  2257. *
  2258. */
  2259. function tripal_core_chado_featureloc_schema () {
  2260. $description = array();
  2261. $description = array(
  2262. 'table' => 'featureloc',
  2263. // 'description' => 'TODO: please describe this table!',
  2264. 'fields' => array(
  2265. 'featureloc_id' => array(
  2266. // 'description' => 'TODO: please describe this field!',
  2267. 'type' => 'serial',
  2268. 'not null' => '1',
  2269. ),
  2270. 'feature_id' => array(
  2271. // 'description' => 'TODO: please describe this field!',
  2272. 'type' => 'int',
  2273. 'not null' => '1',
  2274. ),
  2275. 'srcfeature_id' => array(
  2276. // 'description' => 'TODO: please describe this field!',
  2277. 'type' => 'int',
  2278. 'not null' => '',
  2279. ),
  2280. 'fmin' => array(
  2281. // 'description' => 'TODO: please describe this field!',
  2282. 'type' => 'int',
  2283. 'not null' => '',
  2284. ),
  2285. 'is_fmin_partial' => array(
  2286. // 'description' => 'TODO: please describe this field!',
  2287. 'type' => 'boolean',
  2288. 'not null' => '1',
  2289. 'default' => 'als',
  2290. ),
  2291. 'fmax' => array(
  2292. // 'description' => 'TODO: please describe this field!',
  2293. 'type' => 'int',
  2294. 'not null' => '',
  2295. ),
  2296. 'is_fmax_partial' => array(
  2297. // 'description' => 'TODO: please describe this field!',
  2298. 'type' => 'boolean',
  2299. 'not null' => '1',
  2300. 'default' => 'als',
  2301. ),
  2302. 'strand' => array(
  2303. // 'description' => 'TODO: please describe this field!',
  2304. 'type' => 'int',
  2305. 'size' => 'small',
  2306. 'not null' => '',
  2307. ),
  2308. 'phase' => array(
  2309. // 'description' => 'TODO: please describe this field!',
  2310. 'type' => 'int',
  2311. 'not null' => '',
  2312. ),
  2313. 'residue_info' => array(
  2314. // 'description' => 'TODO: please describe this field!',
  2315. 'type' => 'text',
  2316. 'not null' => '',
  2317. ),
  2318. 'locgroup' => array(
  2319. // 'description' => 'TODO: please describe this field!',
  2320. 'type' => 'int',
  2321. 'not null' => '1',
  2322. 'default' => '0',
  2323. ),
  2324. 'rank' => array(
  2325. // 'description' => 'TODO: please describe this field!',
  2326. 'type' => 'int',
  2327. 'not null' => '1',
  2328. 'default' => '0',
  2329. ),
  2330. ),
  2331. 'primary key' => array(
  2332. '0' => 'featureloc_id',
  2333. ),
  2334. 'unique keys' => array(
  2335. 'featureloc_c1' => array(
  2336. '0' => 'feature_id',
  2337. '1' => 'locgroup',
  2338. '2' => 'rank',
  2339. ),
  2340. ),
  2341. 'indexes' => array(
  2342. 'binloc_boxrange' => array(
  2343. '0' => 'fmin',
  2344. ),
  2345. 'binloc_boxrange_src' => array(
  2346. '0' => 'srcfeature_id',
  2347. '1' => 'fmin',
  2348. ),
  2349. 'featureloc_idx1' => array(
  2350. '0' => 'feature_id',
  2351. ),
  2352. 'featureloc_idx2' => array(
  2353. '0' => 'srcfeature_id',
  2354. ),
  2355. 'featureloc_idx3' => array(
  2356. '0' => 'srcfeature_id',
  2357. '1' => 'fmin',
  2358. '2' => 'fmax',
  2359. ),
  2360. ),
  2361. 'foreign keys' => array(
  2362. ),
  2363. );
  2364. return $description;
  2365. }
  2366. /**
  2367. * Implements hook_featureloc_pub_schema()
  2368. * Purpose: To describe the structure of featureloc_pub to tripal
  2369. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2370. * @see tripal_core.api.inc: tripal_core_chado_update()
  2371. * @see tripal_core.api.inc: tripal_core_chado_select()
  2372. *
  2373. * @return
  2374. * An array describing the current table
  2375. *
  2376. * @ingroup tripal_schema_api
  2377. *
  2378. */
  2379. function tripal_core_chado_featureloc_pub_schema () {
  2380. $description = array();
  2381. $description = array(
  2382. 'table' => 'featureloc_pub',
  2383. // 'description' => 'TODO: please describe this table!',
  2384. 'fields' => array(
  2385. 'featureloc_pub_id' => array(
  2386. // 'description' => 'TODO: please describe this field!',
  2387. 'type' => 'serial',
  2388. 'not null' => '1',
  2389. ),
  2390. 'featureloc_id' => array(
  2391. // 'description' => 'TODO: please describe this field!',
  2392. 'type' => 'int',
  2393. 'not null' => '1',
  2394. ),
  2395. 'pub_id' => array(
  2396. // 'description' => 'TODO: please describe this field!',
  2397. 'type' => 'int',
  2398. 'not null' => '1',
  2399. ),
  2400. ),
  2401. 'primary key' => array(
  2402. '0' => 'featureloc_pub_id',
  2403. ),
  2404. 'unique keys' => array(
  2405. 'featureloc_pub_c1' => array(
  2406. '0' => 'featureloc_id',
  2407. '1' => 'pub_id',
  2408. ),
  2409. ),
  2410. 'indexes' => array(
  2411. 'featureloc_pub_idx1' => array(
  2412. '0' => 'featureloc_id',
  2413. ),
  2414. 'featureloc_pub_idx2' => array(
  2415. '0' => 'pub_id',
  2416. ),
  2417. ),
  2418. 'foreign keys' => array(
  2419. ),
  2420. );
  2421. return $description;
  2422. }
  2423. /**
  2424. * Implements hook_featuremap_schema()
  2425. * Purpose: To describe the structure of featuremap to tripal
  2426. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2427. * @see tripal_core.api.inc: tripal_core_chado_update()
  2428. * @see tripal_core.api.inc: tripal_core_chado_select()
  2429. *
  2430. * @return
  2431. * An array describing the current table
  2432. *
  2433. * @ingroup tripal_schema_api
  2434. *
  2435. */
  2436. function tripal_core_chado_featuremap_schema () {
  2437. $description = array();
  2438. $description = array(
  2439. 'table' => 'featuremap',
  2440. // 'description' => 'TODO: please describe this table!',
  2441. 'fields' => array(
  2442. 'featuremap_id' => array(
  2443. // 'description' => 'TODO: please describe this field!',
  2444. 'type' => 'serial',
  2445. 'not null' => '1',
  2446. ),
  2447. 'name' => array(
  2448. // 'description' => 'TODO: please describe this field!',
  2449. 'type' => 'varchar',
  2450. 'length' => '255',
  2451. 'not null' => '',
  2452. ),
  2453. 'description' => array(
  2454. // 'description' => 'TODO: please describe this field!',
  2455. 'type' => 'text',
  2456. 'not null' => '',
  2457. ),
  2458. 'unittype_id' => array(
  2459. // 'description' => 'TODO: please describe this field!',
  2460. 'type' => 'int',
  2461. 'not null' => '',
  2462. ),
  2463. ),
  2464. 'primary key' => array(
  2465. '0' => 'featuremap_id',
  2466. ),
  2467. 'unique keys' => array(
  2468. 'featuremap_c1' => array(
  2469. '0' => 'name',
  2470. ),
  2471. ),
  2472. 'indexes' => array(
  2473. ),
  2474. 'foreign keys' => array(
  2475. ),
  2476. );
  2477. return $description;
  2478. }
  2479. /**
  2480. * Implements hook_fp_key_schema()
  2481. * Purpose: To describe the structure of fp_key to tripal
  2482. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2483. * @see tripal_core.api.inc: tripal_core_chado_update()
  2484. * @see tripal_core.api.inc: tripal_core_chado_select()
  2485. *
  2486. * @return
  2487. * An array describing the current table
  2488. *
  2489. * @ingroup tripal_schema_api
  2490. *
  2491. */
  2492. function tripal_core_chado_fp_key_schema () {
  2493. $description = array();
  2494. $description = array(
  2495. 'table' => 'fp_key',
  2496. // 'description' => 'TODO: please describe this table!',
  2497. 'fields' => array(
  2498. 'feature_id' => array(
  2499. // 'description' => 'TODO: please describe this field!',
  2500. 'type' => 'int',
  2501. 'not null' => '',
  2502. ),
  2503. 'pkey' => array(
  2504. // 'description' => 'TODO: please describe this field!',
  2505. 'type' => 'varchar',
  2506. 'length' => '1024',
  2507. 'not null' => '',
  2508. ),
  2509. 'value' => array(
  2510. // 'description' => 'TODO: please describe this field!',
  2511. 'type' => 'text',
  2512. 'not null' => '',
  2513. ),
  2514. ),
  2515. 'primary key' => array(
  2516. ),
  2517. 'unique keys' => array(
  2518. ),
  2519. 'indexes' => array(
  2520. ),
  2521. 'foreign keys' => array(
  2522. ),
  2523. );
  2524. return $description;
  2525. }
  2526. /**
  2527. * Implements hook_genotype_schema()
  2528. * Purpose: To describe the structure of genotype to tripal
  2529. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2530. * @see tripal_core.api.inc: tripal_core_chado_update()
  2531. * @see tripal_core.api.inc: tripal_core_chado_select()
  2532. *
  2533. * @return
  2534. * An array describing the current table
  2535. *
  2536. * @ingroup tripal_schema_api
  2537. *
  2538. */
  2539. function tripal_core_chado_genotype_schema () {
  2540. $description = array();
  2541. $description = array(
  2542. 'table' => 'genotype',
  2543. // 'description' => 'TODO: please describe this table!',
  2544. 'fields' => array(
  2545. 'genotype_id' => array(
  2546. // 'description' => 'TODO: please describe this field!',
  2547. 'type' => 'serial',
  2548. 'not null' => '1',
  2549. ),
  2550. 'name' => array(
  2551. // 'description' => 'TODO: please describe this field!',
  2552. 'type' => 'text',
  2553. 'not null' => '',
  2554. ),
  2555. 'uniquename' => array(
  2556. // 'description' => 'TODO: please describe this field!',
  2557. 'type' => 'text',
  2558. 'not null' => '1',
  2559. ),
  2560. 'description' => array(
  2561. // 'description' => 'TODO: please describe this field!',
  2562. 'type' => 'varchar',
  2563. 'length' => '255',
  2564. 'not null' => '',
  2565. ),
  2566. ),
  2567. 'primary key' => array(
  2568. '0' => 'genotype_id',
  2569. ),
  2570. 'unique keys' => array(
  2571. 'genotype_c1' => array(
  2572. '0' => 'uniquename',
  2573. ),
  2574. ),
  2575. 'indexes' => array(
  2576. 'genotype_idx1' => array(
  2577. '0' => 'uniquename',
  2578. ),
  2579. 'genotype_idx2' => array(
  2580. '0' => 'name',
  2581. ),
  2582. ),
  2583. 'foreign keys' => array(
  2584. ),
  2585. );
  2586. return $description;
  2587. }
  2588. /**
  2589. * Implements hook_library_cvterm_schema()
  2590. * Purpose: To describe the structure of library_cvterm to tripal
  2591. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2592. * @see tripal_core.api.inc: tripal_core_chado_update()
  2593. * @see tripal_core.api.inc: tripal_core_chado_select()
  2594. *
  2595. * @return
  2596. * An array describing the current table
  2597. *
  2598. * @ingroup tripal_schema_api
  2599. *
  2600. */
  2601. function tripal_core_chado_library_cvterm_schema () {
  2602. $description = array();
  2603. $description = array(
  2604. 'table' => 'library_cvterm',
  2605. // 'description' => 'TODO: please describe this table!',
  2606. 'fields' => array(
  2607. 'library_cvterm_id' => array(
  2608. // 'description' => 'TODO: please describe this field!',
  2609. 'type' => 'serial',
  2610. 'not null' => '1',
  2611. ),
  2612. 'library_id' => array(
  2613. // 'description' => 'TODO: please describe this field!',
  2614. 'type' => 'int',
  2615. 'not null' => '1',
  2616. ),
  2617. 'cvterm_id' => array(
  2618. // 'description' => 'TODO: please describe this field!',
  2619. 'type' => 'int',
  2620. 'not null' => '1',
  2621. ),
  2622. 'pub_id' => array(
  2623. // 'description' => 'TODO: please describe this field!',
  2624. 'type' => 'int',
  2625. 'not null' => '1',
  2626. ),
  2627. ),
  2628. 'primary key' => array(
  2629. '0' => 'library_cvterm_id',
  2630. ),
  2631. 'unique keys' => array(
  2632. 'library_cvterm_c1' => array(
  2633. '0' => 'library_id',
  2634. '1' => 'cvterm_id',
  2635. '2' => 'pub_id',
  2636. ),
  2637. ),
  2638. 'indexes' => array(
  2639. 'library_cvterm_idx1' => array(
  2640. '0' => 'library_id',
  2641. ),
  2642. 'library_cvterm_idx2' => array(
  2643. '0' => 'cvterm_id',
  2644. ),
  2645. 'library_cvterm_idx3' => array(
  2646. '0' => 'pub_id',
  2647. ),
  2648. ),
  2649. 'foreign keys' => array(
  2650. ),
  2651. );
  2652. return $description;
  2653. }
  2654. /**
  2655. * Implements hook_library_dbxref_schema()
  2656. * Purpose: To describe the structure of library_dbxref to tripal
  2657. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2658. * @see tripal_core.api.inc: tripal_core_chado_update()
  2659. * @see tripal_core.api.inc: tripal_core_chado_select()
  2660. *
  2661. * @return
  2662. * An array describing the current table
  2663. *
  2664. * @ingroup tripal_schema_api
  2665. *
  2666. */
  2667. function tripal_core_chado_library_dbxref_schema () {
  2668. $description = array();
  2669. $description = array(
  2670. 'table' => 'library_dbxref',
  2671. // 'description' => 'TODO: please describe this table!',
  2672. 'fields' => array(
  2673. 'library_dbxref_id' => array(
  2674. // 'description' => 'TODO: please describe this field!',
  2675. 'type' => 'serial',
  2676. 'not null' => '1',
  2677. ),
  2678. 'library_id' => array(
  2679. // 'description' => 'TODO: please describe this field!',
  2680. 'type' => 'int',
  2681. 'not null' => '1',
  2682. ),
  2683. 'dbxref_id' => array(
  2684. // 'description' => 'TODO: please describe this field!',
  2685. 'type' => 'int',
  2686. 'not null' => '1',
  2687. ),
  2688. 'is_current' => array(
  2689. // 'description' => 'TODO: please describe this field!',
  2690. 'type' => 'boolean',
  2691. 'not null' => '1',
  2692. 'default' => 'ru',
  2693. ),
  2694. ),
  2695. 'primary key' => array(
  2696. '0' => 'library_dbxref_id',
  2697. ),
  2698. 'unique keys' => array(
  2699. 'library_dbxref_c1' => array(
  2700. '0' => 'library_id',
  2701. '1' => 'dbxref_id',
  2702. ),
  2703. ),
  2704. 'indexes' => array(
  2705. 'library_dbxref_idx1' => array(
  2706. '0' => 'library_id',
  2707. ),
  2708. 'library_dbxref_idx2' => array(
  2709. '0' => 'dbxref_id',
  2710. ),
  2711. ),
  2712. 'foreign keys' => array(
  2713. ),
  2714. );
  2715. return $description;
  2716. }
  2717. /**
  2718. * Implements hook_library_feature_schema()
  2719. * Purpose: To describe the structure of library_feature to tripal
  2720. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2721. * @see tripal_core.api.inc: tripal_core_chado_update()
  2722. * @see tripal_core.api.inc: tripal_core_chado_select()
  2723. *
  2724. * @return
  2725. * An array describing the current table
  2726. *
  2727. * @ingroup tripal_schema_api
  2728. *
  2729. */
  2730. function tripal_core_chado_library_feature_schema () {
  2731. $description = array();
  2732. $description = array(
  2733. 'table' => 'library_feature',
  2734. // 'description' => 'TODO: please describe this table!',
  2735. 'fields' => array(
  2736. 'library_feature_id' => array(
  2737. // 'description' => 'TODO: please describe this field!',
  2738. 'type' => 'serial',
  2739. 'not null' => '1',
  2740. ),
  2741. 'library_id' => array(
  2742. // 'description' => 'TODO: please describe this field!',
  2743. 'type' => 'int',
  2744. 'not null' => '1',
  2745. ),
  2746. 'feature_id' => array(
  2747. // 'description' => 'TODO: please describe this field!',
  2748. 'type' => 'int',
  2749. 'not null' => '1',
  2750. ),
  2751. ),
  2752. 'primary key' => array(
  2753. '0' => 'library_feature_id',
  2754. ),
  2755. 'unique keys' => array(
  2756. 'library_feature_c1' => array(
  2757. '0' => 'library_id',
  2758. '1' => 'feature_id',
  2759. ),
  2760. ),
  2761. 'indexes' => array(
  2762. 'library_feature_idx1' => array(
  2763. '0' => 'library_id',
  2764. ),
  2765. 'library_feature_idx2' => array(
  2766. '0' => 'feature_id',
  2767. ),
  2768. ),
  2769. 'foreign keys' => array(
  2770. ),
  2771. );
  2772. return $description;
  2773. }
  2774. /**
  2775. * Implements hook_library_feature_count_schema()
  2776. * Purpose: To describe the structure of library_feature_count to tripal
  2777. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2778. * @see tripal_core.api.inc: tripal_core_chado_update()
  2779. * @see tripal_core.api.inc: tripal_core_chado_select()
  2780. *
  2781. * @return
  2782. * An array describing the current table
  2783. *
  2784. * @ingroup tripal_schema_api
  2785. *
  2786. */
  2787. function tripal_core_chado_library_feature_count_schema () {
  2788. $description = array();
  2789. $description = array(
  2790. 'table' => 'library_feature_count',
  2791. // 'description' => 'TODO: please describe this table!',
  2792. 'fields' => array(
  2793. 'library_id' => array(
  2794. // 'description' => 'TODO: please describe this field!',
  2795. 'type' => 'int',
  2796. 'not null' => '',
  2797. ),
  2798. 'name' => array(
  2799. // 'description' => 'TODO: please describe this field!',
  2800. 'type' => 'varchar',
  2801. 'length' => '255',
  2802. 'not null' => '',
  2803. ),
  2804. 'num_features' => array(
  2805. // 'description' => 'TODO: please describe this field!',
  2806. 'type' => 'int',
  2807. 'not null' => '',
  2808. ),
  2809. 'feature_type' => array(
  2810. // 'description' => 'TODO: please describe this field!',
  2811. 'type' => 'varchar',
  2812. 'length' => '255',
  2813. 'not null' => '',
  2814. ),
  2815. ),
  2816. 'primary key' => array(
  2817. ),
  2818. 'unique keys' => array(
  2819. 'library_feature_count_index' => array(
  2820. '0' => 'library_id',
  2821. ),
  2822. ),
  2823. 'indexes' => array(
  2824. ),
  2825. 'foreign keys' => array(
  2826. ),
  2827. );
  2828. return $description;
  2829. }
  2830. /**
  2831. * Implements hook_library_schema()
  2832. * Purpose: To describe the structure of library to tripal
  2833. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2834. * @see tripal_core.api.inc: tripal_core_chado_update()
  2835. * @see tripal_core.api.inc: tripal_core_chado_select()
  2836. *
  2837. * @return
  2838. * An array describing the current table
  2839. *
  2840. * @ingroup tripal_schema_api
  2841. *
  2842. */
  2843. function tripal_core_chado_library_schema () {
  2844. $description = array();
  2845. $description = array(
  2846. 'table' => 'library',
  2847. // 'description' => 'TODO: please describe this table!',
  2848. 'fields' => array(
  2849. 'library_id' => array(
  2850. // 'description' => 'TODO: please describe this field!',
  2851. 'type' => 'serial',
  2852. 'not null' => '1',
  2853. ),
  2854. 'organism_id' => array(
  2855. // 'description' => 'TODO: please describe this field!',
  2856. 'type' => 'int',
  2857. 'not null' => '1',
  2858. ),
  2859. 'name' => array(
  2860. // 'description' => 'TODO: please describe this field!',
  2861. 'type' => 'varchar',
  2862. 'length' => '255',
  2863. 'not null' => '',
  2864. ),
  2865. 'uniquename' => array(
  2866. // 'description' => 'TODO: please describe this field!',
  2867. 'type' => 'text',
  2868. 'not null' => '1',
  2869. ),
  2870. 'type_id' => array(
  2871. // 'description' => 'TODO: please describe this field!',
  2872. 'type' => 'int',
  2873. 'not null' => '1',
  2874. ),
  2875. 'is_obsolete' => array(
  2876. // 'description' => 'TODO: please describe this field!',
  2877. 'type' => 'int',
  2878. 'not null' => '1',
  2879. 'default' => '0',
  2880. ),
  2881. 'timeaccessioned' => array(
  2882. // 'description' => 'TODO: please describe this field!',
  2883. 'type' => 'datetime',
  2884. 'not null' => '1',
  2885. 'default' => 'ow(',
  2886. ),
  2887. 'timelastmodified' => array(
  2888. // 'description' => 'TODO: please describe this field!',
  2889. 'type' => 'datetime',
  2890. 'not null' => '1',
  2891. 'default' => 'ow(',
  2892. ),
  2893. ),
  2894. 'primary key' => array(
  2895. '0' => 'library_id',
  2896. ),
  2897. 'unique keys' => array(
  2898. 'library_c1' => array(
  2899. '0' => 'organism_id',
  2900. '1' => 'uniquename',
  2901. '2' => 'type_id',
  2902. ),
  2903. ),
  2904. 'indexes' => array(
  2905. 'library_idx1' => array(
  2906. '0' => 'organism_id',
  2907. ),
  2908. 'library_idx2' => array(
  2909. '0' => 'type_id',
  2910. ),
  2911. 'library_idx3' => array(
  2912. '0' => 'uniquename',
  2913. ),
  2914. 'library_name_ind1' => array(
  2915. '0' => 'name',
  2916. ),
  2917. ),
  2918. 'foreign keys' => array(
  2919. ),
  2920. );
  2921. return $description;
  2922. }
  2923. /**
  2924. * Implements hook_intronloc_view_schema()
  2925. * Purpose: To describe the structure of intronloc_view to tripal
  2926. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2927. * @see tripal_core.api.inc: tripal_core_chado_update()
  2928. * @see tripal_core.api.inc: tripal_core_chado_select()
  2929. *
  2930. * @return
  2931. * An array describing the current table
  2932. *
  2933. * @ingroup tripal_schema_api
  2934. *
  2935. */
  2936. function tripal_core_chado_intronloc_view_schema () {
  2937. $description = array();
  2938. $description = array(
  2939. 'table' => 'intronloc_view',
  2940. // 'description' => 'TODO: please describe this table!',
  2941. 'fields' => array(
  2942. 'exon1_id' => array(
  2943. // 'description' => 'TODO: please describe this field!',
  2944. 'type' => 'int',
  2945. 'not null' => '',
  2946. ),
  2947. 'exon2_id' => array(
  2948. // 'description' => 'TODO: please describe this field!',
  2949. 'type' => 'int',
  2950. 'not null' => '',
  2951. ),
  2952. 'fmin' => array(
  2953. // 'description' => 'TODO: please describe this field!',
  2954. 'type' => 'int',
  2955. 'not null' => '',
  2956. ),
  2957. 'fmax' => array(
  2958. // 'description' => 'TODO: please describe this field!',
  2959. 'type' => 'int',
  2960. 'not null' => '',
  2961. ),
  2962. 'strand' => array(
  2963. // 'description' => 'TODO: please describe this field!',
  2964. 'type' => 'int',
  2965. 'size' => 'small',
  2966. 'not null' => '',
  2967. ),
  2968. 'srcfeature_id' => array(
  2969. // 'description' => 'TODO: please describe this field!',
  2970. 'type' => 'int',
  2971. 'not null' => '',
  2972. ),
  2973. ),
  2974. 'primary key' => array(
  2975. ),
  2976. 'unique keys' => array(
  2977. ),
  2978. 'indexes' => array(
  2979. ),
  2980. 'foreign keys' => array(
  2981. ),
  2982. );
  2983. return $description;
  2984. }
  2985. /**
  2986. * Implements hook_gff3atts_schema()
  2987. * Purpose: To describe the structure of gff3atts to tripal
  2988. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2989. * @see tripal_core.api.inc: tripal_core_chado_update()
  2990. * @see tripal_core.api.inc: tripal_core_chado_select()
  2991. *
  2992. * @return
  2993. * An array describing the current table
  2994. *
  2995. * @ingroup tripal_schema_api
  2996. *
  2997. */
  2998. function tripal_core_chado_gff3atts_schema () {
  2999. $description = array();
  3000. $description = array(
  3001. 'table' => 'gff3atts',
  3002. // 'description' => 'TODO: please describe this table!',
  3003. 'fields' => array(
  3004. 'feature_id' => array(
  3005. // 'description' => 'TODO: please describe this field!',
  3006. 'type' => 'int',
  3007. 'not null' => '',
  3008. ),
  3009. 'type' => array(
  3010. // 'description' => 'TODO: please describe this field!',
  3011. 'type' => 'text',
  3012. 'not null' => '',
  3013. ),
  3014. 'attribute' => array(
  3015. // 'description' => 'TODO: please describe this field!',
  3016. 'type' => 'varchar',
  3017. 'not null' => '',
  3018. ),
  3019. ),
  3020. 'primary key' => array(
  3021. ),
  3022. 'unique keys' => array(
  3023. ),
  3024. 'indexes' => array(
  3025. ),
  3026. 'foreign keys' => array(
  3027. ),
  3028. );
  3029. return $description;
  3030. }
  3031. /**
  3032. * Implements hook_gff3view_schema()
  3033. * Purpose: To describe the structure of gff3view to tripal
  3034. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3035. * @see tripal_core.api.inc: tripal_core_chado_update()
  3036. * @see tripal_core.api.inc: tripal_core_chado_select()
  3037. *
  3038. * @return
  3039. * An array describing the current table
  3040. *
  3041. * @ingroup tripal_schema_api
  3042. *
  3043. */
  3044. function tripal_core_chado_gff3view_schema () {
  3045. $description = array();
  3046. $description = array(
  3047. 'table' => 'gff3view',
  3048. // 'description' => 'TODO: please describe this table!',
  3049. 'fields' => array(
  3050. 'feature_id' => array(
  3051. // 'description' => 'TODO: please describe this field!',
  3052. 'type' => 'int',
  3053. 'not null' => '',
  3054. ),
  3055. 'ref' => array(
  3056. // 'description' => 'TODO: please describe this field!',
  3057. 'type' => 'varchar',
  3058. 'length' => '255',
  3059. 'not null' => '',
  3060. ),
  3061. 'source' => array(
  3062. // 'description' => 'TODO: please describe this field!',
  3063. 'type' => 'varchar',
  3064. 'length' => '255',
  3065. 'not null' => '',
  3066. ),
  3067. 'type' => array(
  3068. // 'description' => 'TODO: please describe this field!',
  3069. 'type' => 'varchar',
  3070. 'length' => '1024',
  3071. 'not null' => '',
  3072. ),
  3073. 'fstart' => array(
  3074. // 'description' => 'TODO: please describe this field!',
  3075. 'type' => 'int',
  3076. 'not null' => '',
  3077. ),
  3078. 'fend' => array(
  3079. // 'description' => 'TODO: please describe this field!',
  3080. 'type' => 'int',
  3081. 'not null' => '',
  3082. ),
  3083. 'score' => array(
  3084. // 'description' => 'TODO: please describe this field!',
  3085. 'type' => 'float',
  3086. 'size' => 'big',
  3087. 'not null' => '',
  3088. ),
  3089. 'strand' => array(
  3090. // 'description' => 'TODO: please describe this field!',
  3091. 'type' => 'int',
  3092. 'size' => 'small',
  3093. 'not null' => '',
  3094. ),
  3095. 'phase' => array(
  3096. // 'description' => 'TODO: please describe this field!',
  3097. 'type' => 'int',
  3098. 'not null' => '',
  3099. ),
  3100. 'seqlen' => array(
  3101. // 'description' => 'TODO: please describe this field!',
  3102. 'type' => 'int',
  3103. 'not null' => '',
  3104. ),
  3105. 'name' => array(
  3106. // 'description' => 'TODO: please describe this field!',
  3107. 'type' => 'varchar',
  3108. 'length' => '255',
  3109. 'not null' => '',
  3110. ),
  3111. 'organism_id' => array(
  3112. // 'description' => 'TODO: please describe this field!',
  3113. 'type' => 'int',
  3114. 'not null' => '',
  3115. ),
  3116. ),
  3117. 'primary key' => array(
  3118. ),
  3119. 'unique keys' => array(
  3120. ),
  3121. 'indexes' => array(
  3122. ),
  3123. 'foreign keys' => array(
  3124. ),
  3125. );
  3126. return $description;
  3127. }
  3128. /**
  3129. * Implements hook_gffatts_schema()
  3130. * Purpose: To describe the structure of gffatts to tripal
  3131. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3132. * @see tripal_core.api.inc: tripal_core_chado_update()
  3133. * @see tripal_core.api.inc: tripal_core_chado_select()
  3134. *
  3135. * @return
  3136. * An array describing the current table
  3137. *
  3138. * @ingroup tripal_schema_api
  3139. *
  3140. */
  3141. function tripal_core_chado_gffatts_schema () {
  3142. $description = array();
  3143. $description = array(
  3144. 'table' => 'gffatts',
  3145. // 'description' => 'TODO: please describe this table!',
  3146. 'fields' => array(
  3147. 'feature_id' => array(
  3148. // 'description' => 'TODO: please describe this field!',
  3149. 'type' => 'int',
  3150. 'not null' => '',
  3151. ),
  3152. 'type' => array(
  3153. // 'description' => 'TODO: please describe this field!',
  3154. 'type' => 'text',
  3155. 'not null' => '',
  3156. ),
  3157. 'attribute' => array(
  3158. // 'description' => 'TODO: please describe this field!',
  3159. 'type' => 'varchar',
  3160. 'not null' => '',
  3161. ),
  3162. ),
  3163. 'primary key' => array(
  3164. ),
  3165. 'unique keys' => array(
  3166. ),
  3167. 'indexes' => array(
  3168. ),
  3169. 'foreign keys' => array(
  3170. ),
  3171. );
  3172. return $description;
  3173. }
  3174. /**
  3175. * Implements hook_intron_combined_view_schema()
  3176. * Purpose: To describe the structure of intron_combined_view to tripal
  3177. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3178. * @see tripal_core.api.inc: tripal_core_chado_update()
  3179. * @see tripal_core.api.inc: tripal_core_chado_select()
  3180. *
  3181. * @return
  3182. * An array describing the current table
  3183. *
  3184. * @ingroup tripal_schema_api
  3185. *
  3186. */
  3187. function tripal_core_chado_intron_combined_view_schema () {
  3188. $description = array();
  3189. $description = array(
  3190. 'table' => 'intron_combined_view',
  3191. // 'description' => 'TODO: please describe this table!',
  3192. 'fields' => array(
  3193. 'exon1_id' => array(
  3194. // 'description' => 'TODO: please describe this field!',
  3195. 'type' => 'int',
  3196. 'not null' => '',
  3197. ),
  3198. 'exon2_id' => array(
  3199. // 'description' => 'TODO: please describe this field!',
  3200. 'type' => 'int',
  3201. 'not null' => '',
  3202. ),
  3203. 'fmin' => array(
  3204. // 'description' => 'TODO: please describe this field!',
  3205. 'type' => 'int',
  3206. 'not null' => '',
  3207. ),
  3208. 'fmax' => array(
  3209. // 'description' => 'TODO: please describe this field!',
  3210. 'type' => 'int',
  3211. 'not null' => '',
  3212. ),
  3213. 'strand' => array(
  3214. // 'description' => 'TODO: please describe this field!',
  3215. 'type' => 'int',
  3216. 'size' => 'small',
  3217. 'not null' => '',
  3218. ),
  3219. 'srcfeature_id' => array(
  3220. // 'description' => 'TODO: please describe this field!',
  3221. 'type' => 'int',
  3222. 'not null' => '',
  3223. ),
  3224. 'intron_rank' => array(
  3225. // 'description' => 'TODO: please describe this field!',
  3226. 'type' => 'int',
  3227. 'not null' => '',
  3228. ),
  3229. 'transcript_id' => array(
  3230. // 'description' => 'TODO: please describe this field!',
  3231. 'type' => 'int',
  3232. 'not null' => '',
  3233. ),
  3234. ),
  3235. 'primary key' => array(
  3236. ),
  3237. 'unique keys' => array(
  3238. ),
  3239. 'indexes' => array(
  3240. ),
  3241. 'foreign keys' => array(
  3242. ),
  3243. );
  3244. return $description;
  3245. }
  3246. /**
  3247. * Implements hook_project_schema()
  3248. * Purpose: To describe the structure of project to tripal
  3249. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3250. * @see tripal_core.api.inc: tripal_core_chado_update()
  3251. * @see tripal_core.api.inc: tripal_core_chado_select()
  3252. *
  3253. * @return
  3254. * An array describing the current table
  3255. *
  3256. * @ingroup tripal_schema_api
  3257. *
  3258. */
  3259. function tripal_core_chado_project_schema () {
  3260. $description = array();
  3261. $description = array(
  3262. 'table' => 'project',
  3263. // 'description' => 'TODO: please describe this table!',
  3264. 'fields' => array(
  3265. 'project_id' => array(
  3266. // 'description' => 'TODO: please describe this field!',
  3267. 'type' => 'serial',
  3268. 'not null' => '1',
  3269. ),
  3270. 'name' => array(
  3271. // 'description' => 'TODO: please describe this field!',
  3272. 'type' => 'varchar',
  3273. 'length' => '255',
  3274. 'not null' => '1',
  3275. ),
  3276. 'description' => array(
  3277. // 'description' => 'TODO: please describe this field!',
  3278. 'type' => 'varchar',
  3279. 'length' => '255',
  3280. 'not null' => '1',
  3281. ),
  3282. ),
  3283. 'primary key' => array(
  3284. '0' => 'project_id',
  3285. ),
  3286. 'unique keys' => array(
  3287. 'project_c1' => array(
  3288. '0' => 'name',
  3289. ),
  3290. ),
  3291. 'indexes' => array(
  3292. ),
  3293. 'foreign keys' => array(
  3294. ),
  3295. );
  3296. return $description;
  3297. }
  3298. /**
  3299. * Implements hook_protein_coding_gene_schema()
  3300. * Purpose: To describe the structure of protein_coding_gene to tripal
  3301. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3302. * @see tripal_core.api.inc: tripal_core_chado_update()
  3303. * @see tripal_core.api.inc: tripal_core_chado_select()
  3304. *
  3305. * @return
  3306. * An array describing the current table
  3307. *
  3308. * @ingroup tripal_schema_api
  3309. *
  3310. */
  3311. function tripal_core_chado_protein_coding_gene_schema () {
  3312. $description = array();
  3313. $description = array(
  3314. 'table' => 'protein_coding_gene',
  3315. // 'description' => 'TODO: please describe this table!',
  3316. 'fields' => array(
  3317. 'feature_id' => array(
  3318. // 'description' => 'TODO: please describe this field!',
  3319. 'type' => 'int',
  3320. 'not null' => '',
  3321. ),
  3322. 'dbxref_id' => array(
  3323. // 'description' => 'TODO: please describe this field!',
  3324. 'type' => 'int',
  3325. 'not null' => '',
  3326. ),
  3327. 'organism_id' => array(
  3328. // 'description' => 'TODO: please describe this field!',
  3329. 'type' => 'int',
  3330. 'not null' => '',
  3331. ),
  3332. 'name' => array(
  3333. // 'description' => 'TODO: please describe this field!',
  3334. 'type' => 'varchar',
  3335. 'length' => '255',
  3336. 'not null' => '',
  3337. ),
  3338. 'uniquename' => array(
  3339. // 'description' => 'TODO: please describe this field!',
  3340. 'type' => 'text',
  3341. 'not null' => '',
  3342. ),
  3343. 'residues' => array(
  3344. // 'description' => 'TODO: please describe this field!',
  3345. 'type' => 'text',
  3346. 'not null' => '',
  3347. ),
  3348. 'seqlen' => array(
  3349. // 'description' => 'TODO: please describe this field!',
  3350. 'type' => 'int',
  3351. 'not null' => '',
  3352. ),
  3353. 'md5checksum' => array(
  3354. // 'description' => 'TODO: please describe this field!',
  3355. 'type' => 'char',
  3356. 'length' => '32',
  3357. 'not null' => '',
  3358. ),
  3359. 'type_id' => array(
  3360. // 'description' => 'TODO: please describe this field!',
  3361. 'type' => 'int',
  3362. 'not null' => '',
  3363. ),
  3364. 'is_analysis' => array(
  3365. // 'description' => 'TODO: please describe this field!',
  3366. 'type' => 'boolean',
  3367. 'not null' => '',
  3368. ),
  3369. 'is_obsolete' => array(
  3370. // 'description' => 'TODO: please describe this field!',
  3371. 'type' => 'boolean',
  3372. 'not null' => '',
  3373. ),
  3374. 'timeaccessioned' => array(
  3375. // 'description' => 'TODO: please describe this field!',
  3376. 'type' => 'datetime',
  3377. 'not null' => '',
  3378. ),
  3379. 'timelastmodified' => array(
  3380. // 'description' => 'TODO: please describe this field!',
  3381. 'type' => 'datetime',
  3382. 'not null' => '',
  3383. ),
  3384. ),
  3385. 'primary key' => array(
  3386. ),
  3387. 'unique keys' => array(
  3388. ),
  3389. 'indexes' => array(
  3390. ),
  3391. 'foreign keys' => array(
  3392. ),
  3393. );
  3394. return $description;
  3395. }
  3396. /**
  3397. * Implements hook_studyfactorvalue_schema()
  3398. * Purpose: To describe the structure of studyfactorvalue to tripal
  3399. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3400. * @see tripal_core.api.inc: tripal_core_chado_update()
  3401. * @see tripal_core.api.inc: tripal_core_chado_select()
  3402. *
  3403. * @return
  3404. * An array describing the current table
  3405. *
  3406. * @ingroup tripal_schema_api
  3407. *
  3408. */
  3409. function tripal_core_chado_studyfactorvalue_schema () {
  3410. $description = array();
  3411. $description = array(
  3412. 'table' => 'studyfactorvalue',
  3413. // 'description' => 'TODO: please describe this table!',
  3414. 'fields' => array(
  3415. 'studyfactorvalue_id' => array(
  3416. // 'description' => 'TODO: please describe this field!',
  3417. 'type' => 'serial',
  3418. 'not null' => '1',
  3419. ),
  3420. 'studyfactor_id' => array(
  3421. // 'description' => 'TODO: please describe this field!',
  3422. 'type' => 'int',
  3423. 'not null' => '1',
  3424. ),
  3425. 'assay_id' => array(
  3426. // 'description' => 'TODO: please describe this field!',
  3427. 'type' => 'int',
  3428. 'not null' => '1',
  3429. ),
  3430. 'factorvalue' => array(
  3431. // 'description' => 'TODO: please describe this field!',
  3432. 'type' => 'text',
  3433. 'not null' => '',
  3434. ),
  3435. 'name' => array(
  3436. // 'description' => 'TODO: please describe this field!',
  3437. 'type' => 'text',
  3438. 'not null' => '',
  3439. ),
  3440. 'rank' => array(
  3441. // 'description' => 'TODO: please describe this field!',
  3442. 'type' => 'int',
  3443. 'not null' => '1',
  3444. 'default' => '0',
  3445. ),
  3446. ),
  3447. 'primary key' => array(
  3448. '0' => 'studyfactorvalue_id',
  3449. ),
  3450. 'unique keys' => array(
  3451. ),
  3452. 'indexes' => array(
  3453. 'studyfactorvalue_idx1' => array(
  3454. '0' => 'studyfactor_id',
  3455. ),
  3456. 'studyfactorvalue_idx2' => array(
  3457. '0' => 'assay_id',
  3458. ),
  3459. ),
  3460. 'foreign keys' => array(
  3461. ),
  3462. );
  3463. return $description;
  3464. }
  3465. /**
  3466. * Implements hook_studyfactor_schema()
  3467. * Purpose: To describe the structure of studyfactor to tripal
  3468. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3469. * @see tripal_core.api.inc: tripal_core_chado_update()
  3470. * @see tripal_core.api.inc: tripal_core_chado_select()
  3471. *
  3472. * @return
  3473. * An array describing the current table
  3474. *
  3475. * @ingroup tripal_schema_api
  3476. *
  3477. */
  3478. function tripal_core_chado_studyfactor_schema () {
  3479. $description = array();
  3480. $description = array(
  3481. 'table' => 'studyfactor',
  3482. // 'description' => 'TODO: please describe this table!',
  3483. 'fields' => array(
  3484. 'studyfactor_id' => array(
  3485. // 'description' => 'TODO: please describe this field!',
  3486. 'type' => 'serial',
  3487. 'not null' => '1',
  3488. ),
  3489. 'studydesign_id' => array(
  3490. // 'description' => 'TODO: please describe this field!',
  3491. 'type' => 'int',
  3492. 'not null' => '1',
  3493. ),
  3494. 'type_id' => array(
  3495. // 'description' => 'TODO: please describe this field!',
  3496. 'type' => 'int',
  3497. 'not null' => '',
  3498. ),
  3499. 'name' => array(
  3500. // 'description' => 'TODO: please describe this field!',
  3501. 'type' => 'text',
  3502. 'not null' => '1',
  3503. ),
  3504. 'description' => array(
  3505. // 'description' => 'TODO: please describe this field!',
  3506. 'type' => 'text',
  3507. 'not null' => '',
  3508. ),
  3509. ),
  3510. 'primary key' => array(
  3511. '0' => 'studyfactor_id',
  3512. ),
  3513. 'unique keys' => array(
  3514. ),
  3515. 'indexes' => array(
  3516. 'studyfactor_idx1' => array(
  3517. '0' => 'studydesign_id',
  3518. ),
  3519. 'studyfactor_idx2' => array(
  3520. '0' => 'type_id',
  3521. ),
  3522. ),
  3523. 'foreign keys' => array(
  3524. ),
  3525. );
  3526. return $description;
  3527. }
  3528. /**
  3529. * Implements hook_studyprop_schema()
  3530. * Purpose: To describe the structure of studyprop to tripal
  3531. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3532. * @see tripal_core.api.inc: tripal_core_chado_update()
  3533. * @see tripal_core.api.inc: tripal_core_chado_select()
  3534. *
  3535. * @return
  3536. * An array describing the current table
  3537. *
  3538. * @ingroup tripal_schema_api
  3539. *
  3540. */
  3541. function tripal_core_chado_studyprop_schema () {
  3542. $description = array();
  3543. $description = array(
  3544. 'table' => 'studyprop',
  3545. // 'description' => 'TODO: please describe this table!',
  3546. 'fields' => array(
  3547. 'studyprop_id' => array(
  3548. // 'description' => 'TODO: please describe this field!',
  3549. 'type' => 'serial',
  3550. 'not null' => '1',
  3551. ),
  3552. 'study_id' => array(
  3553. // 'description' => 'TODO: please describe this field!',
  3554. 'type' => 'int',
  3555. 'not null' => '1',
  3556. ),
  3557. 'type_id' => array(
  3558. // 'description' => 'TODO: please describe this field!',
  3559. 'type' => 'int',
  3560. 'not null' => '1',
  3561. ),
  3562. 'value' => array(
  3563. // 'description' => 'TODO: please describe this field!',
  3564. 'type' => 'text',
  3565. 'not null' => '',
  3566. ),
  3567. 'rank' => array(
  3568. // 'description' => 'TODO: please describe this field!',
  3569. 'type' => 'int',
  3570. 'not null' => '1',
  3571. 'default' => '0',
  3572. ),
  3573. ),
  3574. 'primary key' => array(
  3575. '0' => 'studyprop_id',
  3576. ),
  3577. 'unique keys' => array(
  3578. 'study_id' => array(
  3579. '0' => 'study_id',
  3580. '1' => 'type_id',
  3581. '2' => 'rank',
  3582. ),
  3583. ),
  3584. 'indexes' => array(
  3585. 'studyprop_idx1' => array(
  3586. '0' => 'study_id',
  3587. ),
  3588. 'studyprop_idx2' => array(
  3589. '0' => 'type_id',
  3590. ),
  3591. ),
  3592. 'foreign keys' => array(
  3593. ),
  3594. );
  3595. return $description;
  3596. }
  3597. /**
  3598. * Implements hook_studyprop_feature_schema()
  3599. * Purpose: To describe the structure of studyprop_feature to tripal
  3600. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3601. * @see tripal_core.api.inc: tripal_core_chado_update()
  3602. * @see tripal_core.api.inc: tripal_core_chado_select()
  3603. *
  3604. * @return
  3605. * An array describing the current table
  3606. *
  3607. * @ingroup tripal_schema_api
  3608. *
  3609. */
  3610. function tripal_core_chado_studyprop_feature_schema () {
  3611. $description = array();
  3612. $description = array(
  3613. 'table' => 'studyprop_feature',
  3614. // 'description' => 'TODO: please describe this table!',
  3615. 'fields' => array(
  3616. 'studyprop_feature_id' => array(
  3617. // 'description' => 'TODO: please describe this field!',
  3618. 'type' => 'serial',
  3619. 'not null' => '1',
  3620. ),
  3621. 'studyprop_id' => array(
  3622. // 'description' => 'TODO: please describe this field!',
  3623. 'type' => 'int',
  3624. 'not null' => '1',
  3625. ),
  3626. 'feature_id' => array(
  3627. // 'description' => 'TODO: please describe this field!',
  3628. 'type' => 'int',
  3629. 'not null' => '1',
  3630. ),
  3631. 'type_id' => array(
  3632. // 'description' => 'TODO: please describe this field!',
  3633. 'type' => 'int',
  3634. 'not null' => '',
  3635. ),
  3636. ),
  3637. 'primary key' => array(
  3638. '0' => 'studyprop_feature_id',
  3639. ),
  3640. 'unique keys' => array(
  3641. 'studyprop_id' => array(
  3642. '0' => 'studyprop_id',
  3643. '1' => 'feature_id',
  3644. ),
  3645. ),
  3646. 'indexes' => array(
  3647. 'studyprop_feature_idx1' => array(
  3648. '0' => 'studyprop_id',
  3649. ),
  3650. 'studyprop_feature_idx2' => array(
  3651. '0' => 'feature_id',
  3652. ),
  3653. ),
  3654. 'foreign keys' => array(
  3655. ),
  3656. );
  3657. return $description;
  3658. }
  3659. /**
  3660. * Implements hook_synonym_schema()
  3661. * Purpose: To describe the structure of synonym to tripal
  3662. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3663. * @see tripal_core.api.inc: tripal_core_chado_update()
  3664. * @see tripal_core.api.inc: tripal_core_chado_select()
  3665. *
  3666. * @return
  3667. * An array describing the current table
  3668. *
  3669. * @ingroup tripal_schema_api
  3670. *
  3671. */
  3672. function tripal_core_chado_synonym_schema () {
  3673. $description = array();
  3674. $description = array(
  3675. 'table' => 'synonym',
  3676. // 'description' => 'TODO: please describe this table!',
  3677. 'fields' => array(
  3678. 'synonym_id' => array(
  3679. // 'description' => 'TODO: please describe this field!',
  3680. 'type' => 'serial',
  3681. 'not null' => '1',
  3682. ),
  3683. 'name' => array(
  3684. // 'description' => 'TODO: please describe this field!',
  3685. 'type' => 'varchar',
  3686. 'length' => '255',
  3687. 'not null' => '1',
  3688. ),
  3689. 'type_id' => array(
  3690. // 'description' => 'TODO: please describe this field!',
  3691. 'type' => 'int',
  3692. 'not null' => '1',
  3693. ),
  3694. 'synonym_sgml' => array(
  3695. // 'description' => 'TODO: please describe this field!',
  3696. 'type' => 'varchar',
  3697. 'length' => '255',
  3698. 'not null' => '1',
  3699. ),
  3700. ),
  3701. 'primary key' => array(
  3702. '0' => 'synonym_id',
  3703. ),
  3704. 'unique keys' => array(
  3705. 'synonym_c1' => array(
  3706. '0' => 'name',
  3707. '1' => 'type_id',
  3708. ),
  3709. ),
  3710. 'indexes' => array(
  3711. 'synonym_idx1' => array(
  3712. '0' => 'type_id',
  3713. ),
  3714. ),
  3715. 'foreign keys' => array(
  3716. ),
  3717. );
  3718. return $description;
  3719. }
  3720. /**
  3721. * Implements hook_studydesignprop_schema()
  3722. * Purpose: To describe the structure of studydesignprop to tripal
  3723. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3724. * @see tripal_core.api.inc: tripal_core_chado_update()
  3725. * @see tripal_core.api.inc: tripal_core_chado_select()
  3726. *
  3727. * @return
  3728. * An array describing the current table
  3729. *
  3730. * @ingroup tripal_schema_api
  3731. *
  3732. */
  3733. function tripal_core_chado_studydesignprop_schema () {
  3734. $description = array();
  3735. $description = array(
  3736. 'table' => 'studydesignprop',
  3737. // 'description' => 'TODO: please describe this table!',
  3738. 'fields' => array(
  3739. 'studydesignprop_id' => array(
  3740. // 'description' => 'TODO: please describe this field!',
  3741. 'type' => 'serial',
  3742. 'not null' => '1',
  3743. ),
  3744. 'studydesign_id' => array(
  3745. // 'description' => 'TODO: please describe this field!',
  3746. 'type' => 'int',
  3747. 'not null' => '1',
  3748. ),
  3749. 'type_id' => array(
  3750. // 'description' => 'TODO: please describe this field!',
  3751. 'type' => 'int',
  3752. 'not null' => '1',
  3753. ),
  3754. 'value' => array(
  3755. // 'description' => 'TODO: please describe this field!',
  3756. 'type' => 'text',
  3757. 'not null' => '',
  3758. ),
  3759. 'rank' => array(
  3760. // 'description' => 'TODO: please describe this field!',
  3761. 'type' => 'int',
  3762. 'not null' => '1',
  3763. 'default' => '0',
  3764. ),
  3765. ),
  3766. 'primary key' => array(
  3767. '0' => 'studydesignprop_id',
  3768. ),
  3769. 'unique keys' => array(
  3770. 'studydesignprop_c1' => array(
  3771. '0' => 'studydesign_id',
  3772. '1' => 'type_id',
  3773. '2' => 'rank',
  3774. ),
  3775. ),
  3776. 'indexes' => array(
  3777. 'studydesignprop_idx1' => array(
  3778. '0' => 'studydesign_id',
  3779. ),
  3780. 'studydesignprop_idx2' => array(
  3781. '0' => 'type_id',
  3782. ),
  3783. ),
  3784. 'foreign keys' => array(
  3785. ),
  3786. );
  3787. return $description;
  3788. }
  3789. /**
  3790. * Implements hook_studydesign_schema()
  3791. * Purpose: To describe the structure of studydesign to tripal
  3792. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3793. * @see tripal_core.api.inc: tripal_core_chado_update()
  3794. * @see tripal_core.api.inc: tripal_core_chado_select()
  3795. *
  3796. * @return
  3797. * An array describing the current table
  3798. *
  3799. * @ingroup tripal_schema_api
  3800. *
  3801. */
  3802. function tripal_core_chado_studydesign_schema () {
  3803. $description = array();
  3804. $description = array(
  3805. 'table' => 'studydesign',
  3806. // 'description' => 'TODO: please describe this table!',
  3807. 'fields' => array(
  3808. 'studydesign_id' => array(
  3809. // 'description' => 'TODO: please describe this field!',
  3810. 'type' => 'serial',
  3811. 'not null' => '1',
  3812. ),
  3813. 'study_id' => array(
  3814. // 'description' => 'TODO: please describe this field!',
  3815. 'type' => 'int',
  3816. 'not null' => '1',
  3817. ),
  3818. 'description' => array(
  3819. // 'description' => 'TODO: please describe this field!',
  3820. 'type' => 'text',
  3821. 'not null' => '',
  3822. ),
  3823. ),
  3824. 'primary key' => array(
  3825. '0' => 'studydesign_id',
  3826. ),
  3827. 'unique keys' => array(
  3828. ),
  3829. 'indexes' => array(
  3830. 'studydesign_idx1' => array(
  3831. '0' => 'study_id',
  3832. ),
  3833. ),
  3834. 'foreign keys' => array(
  3835. ),
  3836. );
  3837. return $description;
  3838. }
  3839. /**
  3840. * Implements hook_stockprop_schema()
  3841. * Purpose: To describe the structure of stockprop to tripal
  3842. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3843. * @see tripal_core.api.inc: tripal_core_chado_update()
  3844. * @see tripal_core.api.inc: tripal_core_chado_select()
  3845. *
  3846. * @return
  3847. * An array describing the current table
  3848. *
  3849. * @ingroup tripal_schema_api
  3850. *
  3851. */
  3852. function tripal_core_chado_stockprop_schema () {
  3853. $description = array();
  3854. $description = array(
  3855. 'table' => 'stockprop',
  3856. // 'description' => 'TODO: please describe this table!',
  3857. 'fields' => array(
  3858. 'stockprop_id' => array(
  3859. // 'description' => 'TODO: please describe this field!',
  3860. 'type' => 'serial',
  3861. 'not null' => '1',
  3862. ),
  3863. 'stock_id' => array(
  3864. // 'description' => 'TODO: please describe this field!',
  3865. 'type' => 'int',
  3866. 'not null' => '1',
  3867. ),
  3868. 'type_id' => array(
  3869. // 'description' => 'TODO: please describe this field!',
  3870. 'type' => 'int',
  3871. 'not null' => '1',
  3872. ),
  3873. 'value' => array(
  3874. // 'description' => 'TODO: please describe this field!',
  3875. 'type' => 'text',
  3876. 'not null' => '',
  3877. ),
  3878. 'rank' => array(
  3879. // 'description' => 'TODO: please describe this field!',
  3880. 'type' => 'int',
  3881. 'not null' => '1',
  3882. 'default' => '0',
  3883. ),
  3884. ),
  3885. 'primary key' => array(
  3886. '0' => 'stockprop_id',
  3887. ),
  3888. 'unique keys' => array(
  3889. 'stockprop_c1' => array(
  3890. '0' => 'stock_id',
  3891. '1' => 'type_id',
  3892. '2' => 'rank',
  3893. ),
  3894. ),
  3895. 'indexes' => array(
  3896. 'stockprop_idx1' => array(
  3897. '0' => 'stock_id',
  3898. ),
  3899. 'stockprop_idx2' => array(
  3900. '0' => 'type_id',
  3901. ),
  3902. ),
  3903. 'foreign keys' => array(
  3904. ),
  3905. );
  3906. return $description;
  3907. }
  3908. /**
  3909. * Implements hook_stockprop_pub_schema()
  3910. * Purpose: To describe the structure of stockprop_pub to tripal
  3911. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3912. * @see tripal_core.api.inc: tripal_core_chado_update()
  3913. * @see tripal_core.api.inc: tripal_core_chado_select()
  3914. *
  3915. * @return
  3916. * An array describing the current table
  3917. *
  3918. * @ingroup tripal_schema_api
  3919. *
  3920. */
  3921. function tripal_core_chado_stockprop_pub_schema () {
  3922. $description = array();
  3923. $description = array(
  3924. 'table' => 'stockprop_pub',
  3925. // 'description' => 'TODO: please describe this table!',
  3926. 'fields' => array(
  3927. 'stockprop_pub_id' => array(
  3928. // 'description' => 'TODO: please describe this field!',
  3929. 'type' => 'serial',
  3930. 'not null' => '1',
  3931. ),
  3932. 'stockprop_id' => array(
  3933. // 'description' => 'TODO: please describe this field!',
  3934. 'type' => 'int',
  3935. 'not null' => '1',
  3936. ),
  3937. 'pub_id' => array(
  3938. // 'description' => 'TODO: please describe this field!',
  3939. 'type' => 'int',
  3940. 'not null' => '1',
  3941. ),
  3942. ),
  3943. 'primary key' => array(
  3944. '0' => 'stockprop_pub_id',
  3945. ),
  3946. 'unique keys' => array(
  3947. 'stockprop_pub_c1' => array(
  3948. '0' => 'stockprop_id',
  3949. '1' => 'pub_id',
  3950. ),
  3951. ),
  3952. 'indexes' => array(
  3953. 'stockprop_pub_idx1' => array(
  3954. '0' => 'stockprop_id',
  3955. ),
  3956. 'stockprop_pub_idx2' => array(
  3957. '0' => 'pub_id',
  3958. ),
  3959. ),
  3960. 'foreign keys' => array(
  3961. ),
  3962. );
  3963. return $description;
  3964. }
  3965. /**
  3966. * Implements hook_study_schema()
  3967. * Purpose: To describe the structure of study to tripal
  3968. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3969. * @see tripal_core.api.inc: tripal_core_chado_update()
  3970. * @see tripal_core.api.inc: tripal_core_chado_select()
  3971. *
  3972. * @return
  3973. * An array describing the current table
  3974. *
  3975. * @ingroup tripal_schema_api
  3976. *
  3977. */
  3978. function tripal_core_chado_study_schema () {
  3979. $description = array();
  3980. $description = array(
  3981. 'table' => 'study',
  3982. // 'description' => 'TODO: please describe this table!',
  3983. 'fields' => array(
  3984. 'study_id' => array(
  3985. // 'description' => 'TODO: please describe this field!',
  3986. 'type' => 'serial',
  3987. 'not null' => '1',
  3988. ),
  3989. 'contact_id' => array(
  3990. // 'description' => 'TODO: please describe this field!',
  3991. 'type' => 'int',
  3992. 'not null' => '1',
  3993. ),
  3994. 'pub_id' => array(
  3995. // 'description' => 'TODO: please describe this field!',
  3996. 'type' => 'int',
  3997. 'not null' => '',
  3998. ),
  3999. 'dbxref_id' => array(
  4000. // 'description' => 'TODO: please describe this field!',
  4001. 'type' => 'int',
  4002. 'not null' => '',
  4003. ),
  4004. 'name' => array(
  4005. // 'description' => 'TODO: please describe this field!',
  4006. 'type' => 'text',
  4007. 'not null' => '1',
  4008. ),
  4009. 'description' => array(
  4010. // 'description' => 'TODO: please describe this field!',
  4011. 'type' => 'text',
  4012. 'not null' => '',
  4013. ),
  4014. ),
  4015. 'primary key' => array(
  4016. '0' => 'study_id',
  4017. ),
  4018. 'unique keys' => array(
  4019. 'study_c1' => array(
  4020. '0' => 'name',
  4021. ),
  4022. ),
  4023. 'indexes' => array(
  4024. 'study_idx1' => array(
  4025. '0' => 'contact_id',
  4026. ),
  4027. 'study_idx2' => array(
  4028. '0' => 'pub_id',
  4029. ),
  4030. 'study_idx3' => array(
  4031. '0' => 'dbxref_id',
  4032. ),
  4033. ),
  4034. 'foreign keys' => array(
  4035. ),
  4036. );
  4037. return $description;
  4038. }
  4039. /**
  4040. * Implements hook_study_assay_schema()
  4041. * Purpose: To describe the structure of study_assay to tripal
  4042. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4043. * @see tripal_core.api.inc: tripal_core_chado_update()
  4044. * @see tripal_core.api.inc: tripal_core_chado_select()
  4045. *
  4046. * @return
  4047. * An array describing the current table
  4048. *
  4049. * @ingroup tripal_schema_api
  4050. *
  4051. */
  4052. function tripal_core_chado_study_assay_schema () {
  4053. $description = array();
  4054. $description = array(
  4055. 'table' => 'study_assay',
  4056. // 'description' => 'TODO: please describe this table!',
  4057. 'fields' => array(
  4058. 'study_assay_id' => array(
  4059. // 'description' => 'TODO: please describe this field!',
  4060. 'type' => 'serial',
  4061. 'not null' => '1',
  4062. ),
  4063. 'study_id' => array(
  4064. // 'description' => 'TODO: please describe this field!',
  4065. 'type' => 'int',
  4066. 'not null' => '1',
  4067. ),
  4068. 'assay_id' => array(
  4069. // 'description' => 'TODO: please describe this field!',
  4070. 'type' => 'int',
  4071. 'not null' => '1',
  4072. ),
  4073. ),
  4074. 'primary key' => array(
  4075. '0' => 'study_assay_id',
  4076. ),
  4077. 'unique keys' => array(
  4078. 'study_assay_c1' => array(
  4079. '0' => 'study_id',
  4080. '1' => 'assay_id',
  4081. ),
  4082. ),
  4083. 'indexes' => array(
  4084. 'study_assay_idx1' => array(
  4085. '0' => 'study_id',
  4086. ),
  4087. 'study_assay_idx2' => array(
  4088. '0' => 'assay_id',
  4089. ),
  4090. ),
  4091. 'foreign keys' => array(
  4092. ),
  4093. );
  4094. return $description;
  4095. }
  4096. /**
  4097. * Implements hook_tableinfo_schema()
  4098. * Purpose: To describe the structure of tableinfo to tripal
  4099. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4100. * @see tripal_core.api.inc: tripal_core_chado_update()
  4101. * @see tripal_core.api.inc: tripal_core_chado_select()
  4102. *
  4103. * @return
  4104. * An array describing the current table
  4105. *
  4106. * @ingroup tripal_schema_api
  4107. *
  4108. */
  4109. function tripal_core_chado_tableinfo_schema () {
  4110. $description = array();
  4111. $description = array(
  4112. 'table' => 'tableinfo',
  4113. // 'description' => 'TODO: please describe this table!',
  4114. 'fields' => array(
  4115. 'tableinfo_id' => array(
  4116. // 'description' => 'TODO: please describe this field!',
  4117. 'type' => 'serial',
  4118. 'not null' => '1',
  4119. ),
  4120. 'name' => array(
  4121. // 'description' => 'TODO: please describe this field!',
  4122. 'type' => 'varchar',
  4123. 'length' => '30',
  4124. 'not null' => '1',
  4125. ),
  4126. 'primary_key_column' => array(
  4127. // 'description' => 'TODO: please describe this field!',
  4128. 'type' => 'varchar',
  4129. 'length' => '30',
  4130. 'not null' => '',
  4131. ),
  4132. 'is_view' => array(
  4133. // 'description' => 'TODO: please describe this field!',
  4134. 'type' => 'int',
  4135. 'not null' => '1',
  4136. 'default' => '0',
  4137. ),
  4138. 'view_on_table_id' => array(
  4139. // 'description' => 'TODO: please describe this field!',
  4140. 'type' => 'int',
  4141. 'not null' => '',
  4142. ),
  4143. 'superclass_table_id' => array(
  4144. // 'description' => 'TODO: please describe this field!',
  4145. 'type' => 'int',
  4146. 'not null' => '',
  4147. ),
  4148. 'is_updateable' => array(
  4149. // 'description' => 'TODO: please describe this field!',
  4150. 'type' => 'int',
  4151. 'not null' => '1',
  4152. 'default' => '1',
  4153. ),
  4154. 'modification_date' => array(
  4155. // 'description' => 'TODO: please describe this field!',
  4156. 'type' => 'date',
  4157. 'not null' => '1',
  4158. 'default' => 'ow(',
  4159. ),
  4160. ),
  4161. 'primary key' => array(
  4162. '0' => 'tableinfo_id',
  4163. ),
  4164. 'unique keys' => array(
  4165. 'tableinfo_c1' => array(
  4166. '0' => 'name',
  4167. ),
  4168. ),
  4169. 'indexes' => array(
  4170. ),
  4171. 'foreign keys' => array(
  4172. ),
  4173. );
  4174. return $description;
  4175. }
  4176. /**
  4177. * Implements hook_treatment_schema()
  4178. * Purpose: To describe the structure of treatment to tripal
  4179. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4180. * @see tripal_core.api.inc: tripal_core_chado_update()
  4181. * @see tripal_core.api.inc: tripal_core_chado_select()
  4182. *
  4183. * @return
  4184. * An array describing the current table
  4185. *
  4186. * @ingroup tripal_schema_api
  4187. *
  4188. */
  4189. function tripal_core_chado_treatment_schema () {
  4190. $description = array();
  4191. $description = array(
  4192. 'table' => 'treatment',
  4193. // 'description' => 'TODO: please describe this table!',
  4194. 'fields' => array(
  4195. 'treatment_id' => array(
  4196. // 'description' => 'TODO: please describe this field!',
  4197. 'type' => 'serial',
  4198. 'not null' => '1',
  4199. ),
  4200. 'rank' => array(
  4201. // 'description' => 'TODO: please describe this field!',
  4202. 'type' => 'int',
  4203. 'not null' => '1',
  4204. 'default' => '0',
  4205. ),
  4206. 'biomaterial_id' => array(
  4207. // 'description' => 'TODO: please describe this field!',
  4208. 'type' => 'int',
  4209. 'not null' => '1',
  4210. ),
  4211. 'type_id' => array(
  4212. // 'description' => 'TODO: please describe this field!',
  4213. 'type' => 'int',
  4214. 'not null' => '1',
  4215. ),
  4216. 'protocol_id' => array(
  4217. // 'description' => 'TODO: please describe this field!',
  4218. 'type' => 'int',
  4219. 'not null' => '',
  4220. ),
  4221. 'name' => array(
  4222. // 'description' => 'TODO: please describe this field!',
  4223. 'type' => 'text',
  4224. 'not null' => '',
  4225. ),
  4226. ),
  4227. 'primary key' => array(
  4228. '0' => 'treatment_id',
  4229. ),
  4230. 'unique keys' => array(
  4231. ),
  4232. 'indexes' => array(
  4233. 'treatment_idx1' => array(
  4234. '0' => 'biomaterial_id',
  4235. ),
  4236. 'treatment_idx2' => array(
  4237. '0' => 'type_id',
  4238. ),
  4239. 'treatment_idx3' => array(
  4240. '0' => 'protocol_id',
  4241. ),
  4242. ),
  4243. 'foreign keys' => array(
  4244. ),
  4245. );
  4246. return $description;
  4247. }
  4248. /**
  4249. * Implements hook_tripal_obo_schema()
  4250. * Purpose: To describe the structure of tripal_obo 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. * @ingroup tripal_schema_api
  4259. *
  4260. */
  4261. function tripal_core_chado_tripal_obo_schema () {
  4262. $description = array();
  4263. $description = array(
  4264. 'table' => 'tripal_obo',
  4265. // 'description' => 'TODO: please describe this table!',
  4266. 'fields' => array(
  4267. 'cv_id' => array(
  4268. // 'description' => 'TODO: please describe this field!',
  4269. 'type' => 'int',
  4270. 'unsigned' => '1',
  4271. 'not null' => '1',
  4272. 'default' => '0',
  4273. ),
  4274. 'file' => array(
  4275. // 'description' => 'TODO: please describe this field!',
  4276. 'type' => 'varchar',
  4277. 'length' => '1024',
  4278. 'not null' => '',
  4279. ),
  4280. 'url' => array(
  4281. // 'description' => 'TODO: please describe this field!',
  4282. 'type' => 'varchar',
  4283. 'length' => '1024',
  4284. 'not null' => '',
  4285. ),
  4286. ),
  4287. 'primary key' => array(
  4288. '0' => 'cv_id',
  4289. ),
  4290. 'unique keys' => array(
  4291. ),
  4292. 'indexes' => array(
  4293. 'cv_id' => array(
  4294. '0' => 'cv_id',
  4295. ),
  4296. ),
  4297. 'foreign keys' => array(
  4298. ),
  4299. );
  4300. return $description;
  4301. }
  4302. /**
  4303. * Implements hook_tripal_organism_views_common_name_schema()
  4304. * Purpose: To describe the structure of tripal_organism_views_common_name to tripal
  4305. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4306. * @see tripal_core.api.inc: tripal_core_chado_update()
  4307. * @see tripal_core.api.inc: tripal_core_chado_select()
  4308. *
  4309. * @return
  4310. * An array describing the current table
  4311. *
  4312. * @ingroup tripal_schema_api
  4313. *
  4314. */
  4315. function tripal_core_chado_tripal_organism_views_common_name_schema () {
  4316. $description = array();
  4317. $description = array(
  4318. 'table' => 'tripal_organism_views_common_name',
  4319. // 'description' => 'TODO: please describe this table!',
  4320. 'fields' => array(
  4321. 'nid' => array(
  4322. // 'description' => 'TODO: please describe this field!',
  4323. 'type' => 'int',
  4324. 'unsigned' => '1',
  4325. 'not null' => '1',
  4326. 'default' => '0',
  4327. ),
  4328. 'common_name' => array(
  4329. // 'description' => 'TODO: please describe this field!',
  4330. 'type' => 'varchar',
  4331. 'length' => '255',
  4332. 'not null' => '1',
  4333. 'default' => 'NA',
  4334. ),
  4335. ),
  4336. 'primary key' => array(
  4337. ),
  4338. 'unique keys' => array(
  4339. ),
  4340. 'indexes' => array(
  4341. ),
  4342. 'foreign keys' => array(
  4343. ),
  4344. );
  4345. return $description;
  4346. }
  4347. /**
  4348. * Implements hook_type_feature_count_schema()
  4349. * Purpose: To describe the structure of type_feature_count to tripal
  4350. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4351. * @see tripal_core.api.inc: tripal_core_chado_update()
  4352. * @see tripal_core.api.inc: tripal_core_chado_select()
  4353. *
  4354. * @return
  4355. * An array describing the current table
  4356. *
  4357. * @ingroup tripal_schema_api
  4358. *
  4359. */
  4360. function tripal_core_chado_type_feature_count_schema () {
  4361. $description = array();
  4362. $description = array(
  4363. 'table' => 'type_feature_count',
  4364. // 'description' => 'TODO: please describe this table!',
  4365. 'fields' => array(
  4366. 'type' => array(
  4367. // 'description' => 'TODO: please describe this field!',
  4368. 'type' => 'varchar',
  4369. 'length' => '1024',
  4370. 'not null' => '',
  4371. ),
  4372. 'num_features' => array(
  4373. // 'description' => 'TODO: please describe this field!',
  4374. 'type' => 'int',
  4375. 'size' => 'big',
  4376. 'not null' => '',
  4377. ),
  4378. ),
  4379. 'primary key' => array(
  4380. ),
  4381. 'unique keys' => array(
  4382. ),
  4383. 'indexes' => array(
  4384. ),
  4385. 'foreign keys' => array(
  4386. ),
  4387. );
  4388. return $description;
  4389. }
  4390. /**
  4391. * Implements hook_stockcollectionprop_schema()
  4392. * Purpose: To describe the structure of stockcollectionprop to tripal
  4393. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4394. * @see tripal_core.api.inc: tripal_core_chado_update()
  4395. * @see tripal_core.api.inc: tripal_core_chado_select()
  4396. *
  4397. * @return
  4398. * An array describing the current table
  4399. *
  4400. * @ingroup tripal_schema_api
  4401. *
  4402. */
  4403. function tripal_core_chado_stockcollectionprop_schema () {
  4404. $description = array();
  4405. $description = array(
  4406. 'table' => 'stockcollectionprop',
  4407. // 'description' => 'TODO: please describe this table!',
  4408. 'fields' => array(
  4409. 'stockcollectionprop_id' => array(
  4410. // 'description' => 'TODO: please describe this field!',
  4411. 'type' => 'serial',
  4412. 'not null' => '1',
  4413. ),
  4414. 'stockcollection_id' => array(
  4415. // 'description' => 'TODO: please describe this field!',
  4416. 'type' => 'int',
  4417. 'not null' => '1',
  4418. ),
  4419. 'type_id' => array(
  4420. // 'description' => 'TODO: please describe this field!',
  4421. 'type' => 'int',
  4422. 'not null' => '1',
  4423. ),
  4424. 'value' => array(
  4425. // 'description' => 'TODO: please describe this field!',
  4426. 'type' => 'text',
  4427. 'not null' => '',
  4428. ),
  4429. 'rank' => array(
  4430. // 'description' => 'TODO: please describe this field!',
  4431. 'type' => 'int',
  4432. 'not null' => '1',
  4433. 'default' => '0',
  4434. ),
  4435. ),
  4436. 'primary key' => array(
  4437. '0' => 'stockcollectionprop_id',
  4438. ),
  4439. 'unique keys' => array(
  4440. 'stockcollectionprop_c1' => array(
  4441. '0' => 'stockcollection_id',
  4442. '1' => 'type_id',
  4443. '2' => 'rank',
  4444. ),
  4445. ),
  4446. 'indexes' => array(
  4447. 'stockcollectionprop_idx1' => array(
  4448. '0' => 'stockcollection_id',
  4449. ),
  4450. 'stockcollectionprop_idx2' => array(
  4451. '0' => 'type_id',
  4452. ),
  4453. ),
  4454. 'foreign keys' => array(
  4455. ),
  4456. );
  4457. return $description;
  4458. }
  4459. /**
  4460. * Implements hook_stockcollection_stock_schema()
  4461. * Purpose: To describe the structure of stockcollection_stock to tripal
  4462. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4463. * @see tripal_core.api.inc: tripal_core_chado_update()
  4464. * @see tripal_core.api.inc: tripal_core_chado_select()
  4465. *
  4466. * @return
  4467. * An array describing the current table
  4468. *
  4469. * @ingroup tripal_schema_api
  4470. *
  4471. */
  4472. function tripal_core_chado_stockcollection_stock_schema () {
  4473. $description = array();
  4474. $description = array(
  4475. 'table' => 'stockcollection_stock',
  4476. // 'description' => 'TODO: please describe this table!',
  4477. 'fields' => array(
  4478. 'stockcollection_stock_id' => array(
  4479. // 'description' => 'TODO: please describe this field!',
  4480. 'type' => 'serial',
  4481. 'not null' => '1',
  4482. ),
  4483. 'stockcollection_id' => array(
  4484. // 'description' => 'TODO: please describe this field!',
  4485. 'type' => 'int',
  4486. 'not null' => '1',
  4487. ),
  4488. 'stock_id' => array(
  4489. // 'description' => 'TODO: please describe this field!',
  4490. 'type' => 'int',
  4491. 'not null' => '1',
  4492. ),
  4493. ),
  4494. 'primary key' => array(
  4495. '0' => 'stockcollection_stock_id',
  4496. ),
  4497. 'unique keys' => array(
  4498. 'stockcollection_stock_c1' => array(
  4499. '0' => 'stockcollection_id',
  4500. '1' => 'stock_id',
  4501. ),
  4502. ),
  4503. 'indexes' => array(
  4504. 'stockcollection_stock_idx1' => array(
  4505. '0' => 'stockcollection_id',
  4506. ),
  4507. 'stockcollection_stock_idx2' => array(
  4508. '0' => 'stock_id',
  4509. ),
  4510. ),
  4511. 'foreign keys' => array(
  4512. ),
  4513. );
  4514. return $description;
  4515. }
  4516. /**
  4517. * Implements hook_public_feature_schema()
  4518. * Purpose: To describe the structure of public_feature to tripal
  4519. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4520. * @see tripal_core.api.inc: tripal_core_chado_update()
  4521. * @see tripal_core.api.inc: tripal_core_chado_select()
  4522. *
  4523. * @return
  4524. * An array describing the current table
  4525. *
  4526. * @ingroup tripal_schema_api
  4527. *
  4528. */
  4529. function tripal_core_chado_public_feature_schema () {
  4530. $description = array();
  4531. $description = array(
  4532. 'table' => 'public_feature',
  4533. // 'description' => 'TODO: please describe this table!',
  4534. 'fields' => array(
  4535. 'vid' => array(
  4536. // 'description' => 'TODO: please describe this field!',
  4537. 'type' => 'int',
  4538. 'unsigned' => '1',
  4539. 'not null' => '1',
  4540. 'default' => '0',
  4541. ),
  4542. 'nid' => array(
  4543. // 'description' => 'TODO: please describe this field!',
  4544. 'type' => 'int',
  4545. 'unsigned' => '1',
  4546. 'not null' => '1',
  4547. 'default' => '0',
  4548. ),
  4549. 'feature_id' => array(
  4550. // 'description' => 'TODO: please describe this field!',
  4551. 'type' => 'int',
  4552. 'not null' => '1',
  4553. 'default' => '0',
  4554. ),
  4555. 'sync_date' => array(
  4556. // 'description' => 'TODO: please describe this field!',
  4557. 'type' => 'int',
  4558. 'not null' => '',
  4559. ),
  4560. ),
  4561. 'primary key' => array(
  4562. '0' => 'nid',
  4563. ),
  4564. 'unique keys' => array(
  4565. 'nid_vid' => array(
  4566. '0' => 'nid',
  4567. '1' => 'vid',
  4568. ),
  4569. 'vid' => array(
  4570. '0' => 'vid',
  4571. ),
  4572. ),
  4573. 'indexes' => array(
  4574. 'feature_id' => array(
  4575. '0' => 'feature_id',
  4576. ),
  4577. ),
  4578. 'foreign keys' => array(
  4579. ),
  4580. );
  4581. return $description;
  4582. }
  4583. /**
  4584. * Implements hook_public_library_schema()
  4585. * Purpose: To describe the structure of public_library to tripal
  4586. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4587. * @see tripal_core.api.inc: tripal_core_chado_update()
  4588. * @see tripal_core.api.inc: tripal_core_chado_select()
  4589. *
  4590. * @return
  4591. * An array describing the current table
  4592. *
  4593. * @ingroup tripal_schema_api
  4594. *
  4595. */
  4596. function tripal_core_chado_public_library_schema () {
  4597. $description = array();
  4598. $description = array(
  4599. 'table' => 'public_library',
  4600. // 'description' => 'TODO: please describe this table!',
  4601. 'fields' => array(
  4602. 'vid' => array(
  4603. // 'description' => 'TODO: please describe this field!',
  4604. 'type' => 'int',
  4605. 'unsigned' => '1',
  4606. 'not null' => '1',
  4607. 'default' => '0',
  4608. ),
  4609. 'nid' => array(
  4610. // 'description' => 'TODO: please describe this field!',
  4611. 'type' => 'int',
  4612. 'unsigned' => '1',
  4613. 'not null' => '1',
  4614. 'default' => '0',
  4615. ),
  4616. 'library_id' => array(
  4617. // 'description' => 'TODO: please describe this field!',
  4618. 'type' => 'int',
  4619. 'not null' => '1',
  4620. 'default' => '0',
  4621. ),
  4622. ),
  4623. 'primary key' => array(
  4624. '0' => 'nid',
  4625. ),
  4626. 'unique keys' => array(
  4627. 'nid_vid' => array(
  4628. '0' => 'nid',
  4629. '1' => 'vid',
  4630. ),
  4631. 'vid' => array(
  4632. '0' => 'vid',
  4633. ),
  4634. ),
  4635. 'indexes' => array(
  4636. 'library_id' => array(
  4637. '0' => 'library_id',
  4638. ),
  4639. ),
  4640. 'foreign keys' => array(
  4641. ),
  4642. );
  4643. return $description;
  4644. }
  4645. /**
  4646. * Implements hook_public_organism_schema()
  4647. * Purpose: To describe the structure of public_organism to tripal
  4648. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4649. * @see tripal_core.api.inc: tripal_core_chado_update()
  4650. * @see tripal_core.api.inc: tripal_core_chado_select()
  4651. *
  4652. * @return
  4653. * An array describing the current table
  4654. *
  4655. * @ingroup tripal_schema_api
  4656. *
  4657. */
  4658. function tripal_core_chado_public_organism_schema () {
  4659. $description = array();
  4660. $description = array(
  4661. 'table' => 'public_organism',
  4662. // 'description' => 'TODO: please describe this table!',
  4663. 'fields' => array(
  4664. 'vid' => array(
  4665. // 'description' => 'TODO: please describe this field!',
  4666. 'type' => 'int',
  4667. 'unsigned' => '1',
  4668. 'not null' => '1',
  4669. 'default' => '0',
  4670. ),
  4671. 'nid' => array(
  4672. // 'description' => 'TODO: please describe this field!',
  4673. 'type' => 'int',
  4674. 'unsigned' => '1',
  4675. 'not null' => '1',
  4676. 'default' => '0',
  4677. ),
  4678. 'organism_id' => array(
  4679. // 'description' => 'TODO: please describe this field!',
  4680. 'type' => 'int',
  4681. 'not null' => '1',
  4682. 'default' => '0',
  4683. ),
  4684. ),
  4685. 'primary key' => array(
  4686. '0' => 'nid',
  4687. ),
  4688. 'unique keys' => array(
  4689. 'nid_vid' => array(
  4690. '0' => 'nid',
  4691. '1' => 'vid',
  4692. ),
  4693. 'vid' => array(
  4694. '0' => 'vid',
  4695. ),
  4696. ),
  4697. 'indexes' => array(
  4698. 'organism_id' => array(
  4699. '0' => 'organism_id',
  4700. ),
  4701. ),
  4702. 'foreign keys' => array(
  4703. ),
  4704. );
  4705. return $description;
  4706. }
  4707. /**
  4708. * Implements hook_pubprop_schema()
  4709. * Purpose: To describe the structure of pubprop to tripal
  4710. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4711. * @see tripal_core.api.inc: tripal_core_chado_update()
  4712. * @see tripal_core.api.inc: tripal_core_chado_select()
  4713. *
  4714. * @return
  4715. * An array describing the current table
  4716. *
  4717. * @ingroup tripal_schema_api
  4718. *
  4719. */
  4720. function tripal_core_chado_pubprop_schema () {
  4721. $description = array();
  4722. $description = array(
  4723. 'table' => 'pubprop',
  4724. // 'description' => 'TODO: please describe this table!',
  4725. 'fields' => array(
  4726. 'pubprop_id' => array(
  4727. // 'description' => 'TODO: please describe this field!',
  4728. 'type' => 'serial',
  4729. 'not null' => '1',
  4730. ),
  4731. 'pub_id' => array(
  4732. // 'description' => 'TODO: please describe this field!',
  4733. 'type' => 'int',
  4734. 'not null' => '1',
  4735. ),
  4736. 'type_id' => array(
  4737. // 'description' => 'TODO: please describe this field!',
  4738. 'type' => 'int',
  4739. 'not null' => '1',
  4740. ),
  4741. 'value' => array(
  4742. // 'description' => 'TODO: please describe this field!',
  4743. 'type' => 'text',
  4744. 'not null' => '1',
  4745. ),
  4746. 'rank' => array(
  4747. // 'description' => 'TODO: please describe this field!',
  4748. 'type' => 'int',
  4749. 'not null' => '',
  4750. ),
  4751. ),
  4752. 'primary key' => array(
  4753. '0' => 'pubprop_id',
  4754. ),
  4755. 'unique keys' => array(
  4756. 'pubprop_c1' => array(
  4757. '0' => 'pub_id',
  4758. '1' => 'type_id',
  4759. '2' => 'rank',
  4760. ),
  4761. ),
  4762. 'indexes' => array(
  4763. 'pubprop_idx1' => array(
  4764. '0' => 'pub_id',
  4765. ),
  4766. 'pubprop_idx2' => array(
  4767. '0' => 'type_id',
  4768. ),
  4769. ),
  4770. 'foreign keys' => array(
  4771. ),
  4772. );
  4773. return $description;
  4774. }
  4775. /**
  4776. * Implements hook_pubauthor_schema()
  4777. * Purpose: To describe the structure of pubauthor to tripal
  4778. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4779. * @see tripal_core.api.inc: tripal_core_chado_update()
  4780. * @see tripal_core.api.inc: tripal_core_chado_select()
  4781. *
  4782. * @return
  4783. * An array describing the current table
  4784. *
  4785. * @ingroup tripal_schema_api
  4786. *
  4787. */
  4788. function tripal_core_chado_pubauthor_schema () {
  4789. $description = array();
  4790. $description = array(
  4791. 'table' => 'pubauthor',
  4792. // 'description' => 'TODO: please describe this table!',
  4793. 'fields' => array(
  4794. 'pubauthor_id' => array(
  4795. // 'description' => 'TODO: please describe this field!',
  4796. 'type' => 'serial',
  4797. 'not null' => '1',
  4798. ),
  4799. 'pub_id' => array(
  4800. // 'description' => 'TODO: please describe this field!',
  4801. 'type' => 'int',
  4802. 'not null' => '1',
  4803. ),
  4804. 'rank' => array(
  4805. // 'description' => 'TODO: please describe this field!',
  4806. 'type' => 'int',
  4807. 'not null' => '1',
  4808. ),
  4809. 'editor' => array(
  4810. // 'description' => 'TODO: please describe this field!',
  4811. 'type' => 'boolean',
  4812. 'not null' => '',
  4813. 'default' => 'als',
  4814. ),
  4815. 'surname' => array(
  4816. // 'description' => 'TODO: please describe this field!',
  4817. 'type' => 'varchar',
  4818. 'length' => '100',
  4819. 'not null' => '1',
  4820. ),
  4821. 'givennames' => array(
  4822. // 'description' => 'TODO: please describe this field!',
  4823. 'type' => 'varchar',
  4824. 'length' => '100',
  4825. 'not null' => '',
  4826. ),
  4827. 'suffix' => array(
  4828. // 'description' => 'TODO: please describe this field!',
  4829. 'type' => 'varchar',
  4830. 'length' => '100',
  4831. 'not null' => '',
  4832. ),
  4833. ),
  4834. 'primary key' => array(
  4835. '0' => 'pubauthor_id',
  4836. ),
  4837. 'unique keys' => array(
  4838. 'pubauthor_c1' => array(
  4839. '0' => 'pub_id',
  4840. '1' => 'rank',
  4841. ),
  4842. ),
  4843. 'indexes' => array(
  4844. 'pubauthor_idx2' => array(
  4845. '0' => 'pub_id',
  4846. ),
  4847. ),
  4848. 'foreign keys' => array(
  4849. ),
  4850. );
  4851. return $description;
  4852. }
  4853. /**
  4854. * Implements hook_pub_relationship_schema()
  4855. * Purpose: To describe the structure of pub_relationship to tripal
  4856. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4857. * @see tripal_core.api.inc: tripal_core_chado_update()
  4858. * @see tripal_core.api.inc: tripal_core_chado_select()
  4859. *
  4860. * @return
  4861. * An array describing the current table
  4862. *
  4863. * @ingroup tripal_schema_api
  4864. *
  4865. */
  4866. function tripal_core_chado_pub_relationship_schema () {
  4867. $description = array();
  4868. $description = array(
  4869. 'table' => 'pub_relationship',
  4870. // 'description' => 'TODO: please describe this table!',
  4871. 'fields' => array(
  4872. 'pub_relationship_id' => array(
  4873. // 'description' => 'TODO: please describe this field!',
  4874. 'type' => 'serial',
  4875. 'not null' => '1',
  4876. ),
  4877. 'subject_id' => array(
  4878. // 'description' => 'TODO: please describe this field!',
  4879. 'type' => 'int',
  4880. 'not null' => '1',
  4881. ),
  4882. 'object_id' => array(
  4883. // 'description' => 'TODO: please describe this field!',
  4884. 'type' => 'int',
  4885. 'not null' => '1',
  4886. ),
  4887. 'type_id' => array(
  4888. // 'description' => 'TODO: please describe this field!',
  4889. 'type' => 'int',
  4890. 'not null' => '1',
  4891. ),
  4892. ),
  4893. 'primary key' => array(
  4894. '0' => 'pub_relationship_id',
  4895. ),
  4896. 'unique keys' => array(
  4897. 'pub_relationship_c1' => array(
  4898. '0' => 'subject_id',
  4899. '1' => 'object_id',
  4900. '2' => 'type_id',
  4901. ),
  4902. ),
  4903. 'indexes' => array(
  4904. 'pub_relationship_idx1' => array(
  4905. '0' => 'subject_id',
  4906. ),
  4907. 'pub_relationship_idx2' => array(
  4908. '0' => 'object_id',
  4909. ),
  4910. 'pub_relationship_idx3' => array(
  4911. '0' => 'type_id',
  4912. ),
  4913. ),
  4914. 'foreign keys' => array(
  4915. ),
  4916. );
  4917. return $description;
  4918. }
  4919. /**
  4920. * Implements hook_protocol_schema()
  4921. * Purpose: To describe the structure of protocol to tripal
  4922. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4923. * @see tripal_core.api.inc: tripal_core_chado_update()
  4924. * @see tripal_core.api.inc: tripal_core_chado_select()
  4925. *
  4926. * @return
  4927. * An array describing the current table
  4928. *
  4929. * @ingroup tripal_schema_api
  4930. *
  4931. */
  4932. function tripal_core_chado_protocol_schema () {
  4933. $description = array();
  4934. $description = array(
  4935. 'table' => 'protocol',
  4936. // 'description' => 'TODO: please describe this table!',
  4937. 'fields' => array(
  4938. 'protocol_id' => array(
  4939. // 'description' => 'TODO: please describe this field!',
  4940. 'type' => 'serial',
  4941. 'not null' => '1',
  4942. ),
  4943. 'type_id' => array(
  4944. // 'description' => 'TODO: please describe this field!',
  4945. 'type' => 'int',
  4946. 'not null' => '1',
  4947. ),
  4948. 'pub_id' => array(
  4949. // 'description' => 'TODO: please describe this field!',
  4950. 'type' => 'int',
  4951. 'not null' => '',
  4952. ),
  4953. 'dbxref_id' => array(
  4954. // 'description' => 'TODO: please describe this field!',
  4955. 'type' => 'int',
  4956. 'not null' => '',
  4957. ),
  4958. 'name' => array(
  4959. // 'description' => 'TODO: please describe this field!',
  4960. 'type' => 'text',
  4961. 'not null' => '1',
  4962. ),
  4963. 'uri' => array(
  4964. // 'description' => 'TODO: please describe this field!',
  4965. 'type' => 'text',
  4966. 'not null' => '',
  4967. ),
  4968. 'protocoldescription' => array(
  4969. // 'description' => 'TODO: please describe this field!',
  4970. 'type' => 'text',
  4971. 'not null' => '',
  4972. ),
  4973. 'hardwaredescription' => array(
  4974. // 'description' => 'TODO: please describe this field!',
  4975. 'type' => 'text',
  4976. 'not null' => '',
  4977. ),
  4978. 'softwaredescription' => array(
  4979. // 'description' => 'TODO: please describe this field!',
  4980. 'type' => 'text',
  4981. 'not null' => '',
  4982. ),
  4983. ),
  4984. 'primary key' => array(
  4985. '0' => 'protocol_id',
  4986. ),
  4987. 'unique keys' => array(
  4988. 'protocol_c1' => array(
  4989. '0' => 'name',
  4990. ),
  4991. ),
  4992. 'indexes' => array(
  4993. 'protocol_idx1' => array(
  4994. '0' => 'type_id',
  4995. ),
  4996. 'protocol_idx2' => array(
  4997. '0' => 'pub_id',
  4998. ),
  4999. 'protocol_idx3' => array(
  5000. '0' => 'dbxref_id',
  5001. ),
  5002. ),
  5003. 'foreign keys' => array(
  5004. ),
  5005. );
  5006. return $description;
  5007. }
  5008. /**
  5009. * Implements hook_protocolparam_schema()
  5010. * Purpose: To describe the structure of protocolparam to tripal
  5011. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5012. * @see tripal_core.api.inc: tripal_core_chado_update()
  5013. * @see tripal_core.api.inc: tripal_core_chado_select()
  5014. *
  5015. * @return
  5016. * An array describing the current table
  5017. *
  5018. * @ingroup tripal_schema_api
  5019. *
  5020. */
  5021. function tripal_core_chado_protocolparam_schema () {
  5022. $description = array();
  5023. $description = array(
  5024. 'table' => 'protocolparam',
  5025. // 'description' => 'TODO: please describe this table!',
  5026. 'fields' => array(
  5027. 'protocolparam_id' => array(
  5028. // 'description' => 'TODO: please describe this field!',
  5029. 'type' => 'serial',
  5030. 'not null' => '1',
  5031. ),
  5032. 'protocol_id' => array(
  5033. // 'description' => 'TODO: please describe this field!',
  5034. 'type' => 'int',
  5035. 'not null' => '1',
  5036. ),
  5037. 'name' => array(
  5038. // 'description' => 'TODO: please describe this field!',
  5039. 'type' => 'text',
  5040. 'not null' => '1',
  5041. ),
  5042. 'datatype_id' => array(
  5043. // 'description' => 'TODO: please describe this field!',
  5044. 'type' => 'int',
  5045. 'not null' => '',
  5046. ),
  5047. 'unittype_id' => array(
  5048. // 'description' => 'TODO: please describe this field!',
  5049. 'type' => 'int',
  5050. 'not null' => '',
  5051. ),
  5052. 'value' => array(
  5053. // 'description' => 'TODO: please describe this field!',
  5054. 'type' => 'text',
  5055. 'not null' => '',
  5056. ),
  5057. 'rank' => array(
  5058. // 'description' => 'TODO: please describe this field!',
  5059. 'type' => 'int',
  5060. 'not null' => '1',
  5061. 'default' => '0',
  5062. ),
  5063. ),
  5064. 'primary key' => array(
  5065. '0' => 'protocolparam_id',
  5066. ),
  5067. 'unique keys' => array(
  5068. ),
  5069. 'indexes' => array(
  5070. 'protocolparam_idx1' => array(
  5071. '0' => 'protocol_id',
  5072. ),
  5073. 'protocolparam_idx2' => array(
  5074. '0' => 'datatype_id',
  5075. ),
  5076. 'protocolparam_idx3' => array(
  5077. '0' => 'unittype_id',
  5078. ),
  5079. ),
  5080. 'foreign keys' => array(
  5081. ),
  5082. );
  5083. return $description;
  5084. }
  5085. /**
  5086. * Implements hook_pub_schema()
  5087. * Purpose: To describe the structure of pub to tripal
  5088. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5089. * @see tripal_core.api.inc: tripal_core_chado_update()
  5090. * @see tripal_core.api.inc: tripal_core_chado_select()
  5091. *
  5092. * @return
  5093. * An array describing the current table
  5094. *
  5095. * @ingroup tripal_schema_api
  5096. *
  5097. */
  5098. function tripal_core_chado_pub_schema () {
  5099. $description = array();
  5100. $description = array(
  5101. 'table' => 'pub',
  5102. // 'description' => 'TODO: please describe this table!',
  5103. 'fields' => array(
  5104. 'pub_id' => array(
  5105. // 'description' => 'TODO: please describe this field!',
  5106. 'type' => 'serial',
  5107. 'not null' => '1',
  5108. ),
  5109. 'title' => array(
  5110. // 'description' => 'TODO: please describe this field!',
  5111. 'type' => 'text',
  5112. 'not null' => '',
  5113. ),
  5114. 'volumetitle' => array(
  5115. // 'description' => 'TODO: please describe this field!',
  5116. 'type' => 'text',
  5117. 'not null' => '',
  5118. ),
  5119. 'volume' => array(
  5120. // 'description' => 'TODO: please describe this field!',
  5121. 'type' => 'varchar',
  5122. 'length' => '255',
  5123. 'not null' => '',
  5124. ),
  5125. 'series_name' => array(
  5126. // 'description' => 'TODO: please describe this field!',
  5127. 'type' => 'varchar',
  5128. 'length' => '255',
  5129. 'not null' => '',
  5130. ),
  5131. 'issue' => array(
  5132. // 'description' => 'TODO: please describe this field!',
  5133. 'type' => 'varchar',
  5134. 'length' => '255',
  5135. 'not null' => '',
  5136. ),
  5137. 'pyear' => array(
  5138. // 'description' => 'TODO: please describe this field!',
  5139. 'type' => 'varchar',
  5140. 'length' => '255',
  5141. 'not null' => '',
  5142. ),
  5143. 'pages' => array(
  5144. // 'description' => 'TODO: please describe this field!',
  5145. 'type' => 'varchar',
  5146. 'length' => '255',
  5147. 'not null' => '',
  5148. ),
  5149. 'miniref' => array(
  5150. // 'description' => 'TODO: please describe this field!',
  5151. 'type' => 'varchar',
  5152. 'length' => '255',
  5153. 'not null' => '',
  5154. ),
  5155. 'uniquename' => array(
  5156. // 'description' => 'TODO: please describe this field!',
  5157. 'type' => 'text',
  5158. 'not null' => '1',
  5159. ),
  5160. 'type_id' => array(
  5161. // 'description' => 'TODO: please describe this field!',
  5162. 'type' => 'int',
  5163. 'not null' => '1',
  5164. ),
  5165. 'is_obsolete' => array(
  5166. // 'description' => 'TODO: please describe this field!',
  5167. 'type' => 'boolean',
  5168. 'not null' => '',
  5169. 'default' => 'als',
  5170. ),
  5171. 'publisher' => array(
  5172. // 'description' => 'TODO: please describe this field!',
  5173. 'type' => 'varchar',
  5174. 'length' => '255',
  5175. 'not null' => '',
  5176. ),
  5177. 'pubplace' => array(
  5178. // 'description' => 'TODO: please describe this field!',
  5179. 'type' => 'varchar',
  5180. 'length' => '255',
  5181. 'not null' => '',
  5182. ),
  5183. ),
  5184. 'primary key' => array(
  5185. '0' => 'pub_id',
  5186. ),
  5187. 'unique keys' => array(
  5188. 'pub_c1' => array(
  5189. '0' => 'uniquename',
  5190. ),
  5191. ),
  5192. 'indexes' => array(
  5193. 'pub_idx1' => array(
  5194. '0' => 'type_id',
  5195. ),
  5196. ),
  5197. 'foreign keys' => array(
  5198. ),
  5199. );
  5200. return $description;
  5201. }
  5202. /**
  5203. * Implements hook_pub_dbxref_schema()
  5204. * Purpose: To describe the structure of pub_dbxref to tripal
  5205. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5206. * @see tripal_core.api.inc: tripal_core_chado_update()
  5207. * @see tripal_core.api.inc: tripal_core_chado_select()
  5208. *
  5209. * @return
  5210. * An array describing the current table
  5211. *
  5212. * @ingroup tripal_schema_api
  5213. *
  5214. */
  5215. function tripal_core_chado_pub_dbxref_schema () {
  5216. $description = array();
  5217. $description = array(
  5218. 'table' => 'pub_dbxref',
  5219. // 'description' => 'TODO: please describe this table!',
  5220. 'fields' => array(
  5221. 'pub_dbxref_id' => array(
  5222. // 'description' => 'TODO: please describe this field!',
  5223. 'type' => 'serial',
  5224. 'not null' => '1',
  5225. ),
  5226. 'pub_id' => array(
  5227. // 'description' => 'TODO: please describe this field!',
  5228. 'type' => 'int',
  5229. 'not null' => '1',
  5230. ),
  5231. 'dbxref_id' => array(
  5232. // 'description' => 'TODO: please describe this field!',
  5233. 'type' => 'int',
  5234. 'not null' => '1',
  5235. ),
  5236. 'is_current' => array(
  5237. // 'description' => 'TODO: please describe this field!',
  5238. 'type' => 'boolean',
  5239. 'not null' => '1',
  5240. 'default' => 'ru',
  5241. ),
  5242. ),
  5243. 'primary key' => array(
  5244. '0' => 'pub_dbxref_id',
  5245. ),
  5246. 'unique keys' => array(
  5247. 'pub_dbxref_c1' => array(
  5248. '0' => 'pub_id',
  5249. '1' => 'dbxref_id',
  5250. ),
  5251. ),
  5252. 'indexes' => array(
  5253. 'pub_dbxref_idx1' => array(
  5254. '0' => 'pub_id',
  5255. ),
  5256. 'pub_dbxref_idx2' => array(
  5257. '0' => 'dbxref_id',
  5258. ),
  5259. ),
  5260. 'foreign keys' => array(
  5261. ),
  5262. );
  5263. return $description;
  5264. }
  5265. /**
  5266. * Implements hook_quantification_schema()
  5267. * Purpose: To describe the structure of quantification to tripal
  5268. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5269. * @see tripal_core.api.inc: tripal_core_chado_update()
  5270. * @see tripal_core.api.inc: tripal_core_chado_select()
  5271. *
  5272. * @return
  5273. * An array describing the current table
  5274. *
  5275. * @ingroup tripal_schema_api
  5276. *
  5277. */
  5278. function tripal_core_chado_quantification_schema () {
  5279. $description = array();
  5280. $description = array(
  5281. 'table' => 'quantification',
  5282. // 'description' => 'TODO: please describe this table!',
  5283. 'fields' => array(
  5284. 'quantification_id' => array(
  5285. // 'description' => 'TODO: please describe this field!',
  5286. 'type' => 'serial',
  5287. 'not null' => '1',
  5288. ),
  5289. 'acquisition_id' => array(
  5290. // 'description' => 'TODO: please describe this field!',
  5291. 'type' => 'int',
  5292. 'not null' => '1',
  5293. ),
  5294. 'operator_id' => array(
  5295. // 'description' => 'TODO: please describe this field!',
  5296. 'type' => 'int',
  5297. 'not null' => '',
  5298. ),
  5299. 'protocol_id' => array(
  5300. // 'description' => 'TODO: please describe this field!',
  5301. 'type' => 'int',
  5302. 'not null' => '',
  5303. ),
  5304. 'analysis_id' => array(
  5305. // 'description' => 'TODO: please describe this field!',
  5306. 'type' => 'int',
  5307. 'not null' => '1',
  5308. ),
  5309. 'quantificationdate' => array(
  5310. // 'description' => 'TODO: please describe this field!',
  5311. 'type' => 'datetime',
  5312. 'not null' => '',
  5313. 'default' => 'ow(',
  5314. ),
  5315. 'name' => array(
  5316. // 'description' => 'TODO: please describe this field!',
  5317. 'type' => 'text',
  5318. 'not null' => '',
  5319. ),
  5320. 'uri' => array(
  5321. // 'description' => 'TODO: please describe this field!',
  5322. 'type' => 'text',
  5323. 'not null' => '',
  5324. ),
  5325. ),
  5326. 'primary key' => array(
  5327. '0' => 'quantification_id',
  5328. ),
  5329. 'unique keys' => array(
  5330. 'quantification_c1' => array(
  5331. '0' => 'name',
  5332. '1' => 'analysis_id',
  5333. ),
  5334. ),
  5335. 'indexes' => array(
  5336. 'quantification_idx1' => array(
  5337. '0' => 'acquisition_id',
  5338. ),
  5339. 'quantification_idx2' => array(
  5340. '0' => 'operator_id',
  5341. ),
  5342. 'quantification_idx3' => array(
  5343. '0' => 'protocol_id',
  5344. ),
  5345. 'quantification_idx4' => array(
  5346. '0' => 'analysis_id',
  5347. ),
  5348. ),
  5349. 'foreign keys' => array(
  5350. ),
  5351. );
  5352. return $description;
  5353. }
  5354. /**
  5355. * Implements hook_quantification_relationship_schema()
  5356. * Purpose: To describe the structure of quantification_relationship to tripal
  5357. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5358. * @see tripal_core.api.inc: tripal_core_chado_update()
  5359. * @see tripal_core.api.inc: tripal_core_chado_select()
  5360. *
  5361. * @return
  5362. * An array describing the current table
  5363. *
  5364. * @ingroup tripal_schema_api
  5365. *
  5366. */
  5367. function tripal_core_chado_quantification_relationship_schema () {
  5368. $description = array();
  5369. $description = array(
  5370. 'table' => 'quantification_relationship',
  5371. // 'description' => 'TODO: please describe this table!',
  5372. 'fields' => array(
  5373. 'quantification_relationship_id' => array(
  5374. // 'description' => 'TODO: please describe this field!',
  5375. 'type' => 'serial',
  5376. 'not null' => '1',
  5377. ),
  5378. 'subject_id' => array(
  5379. // 'description' => 'TODO: please describe this field!',
  5380. 'type' => 'int',
  5381. 'not null' => '1',
  5382. ),
  5383. 'type_id' => array(
  5384. // 'description' => 'TODO: please describe this field!',
  5385. 'type' => 'int',
  5386. 'not null' => '1',
  5387. ),
  5388. 'object_id' => array(
  5389. // 'description' => 'TODO: please describe this field!',
  5390. 'type' => 'int',
  5391. 'not null' => '1',
  5392. ),
  5393. ),
  5394. 'primary key' => array(
  5395. '0' => 'quantification_relationship_id',
  5396. ),
  5397. 'unique keys' => array(
  5398. 'quantification_relationship_c1' => array(
  5399. '0' => 'subject_id',
  5400. '1' => 'object_id',
  5401. '2' => 'type_id',
  5402. ),
  5403. ),
  5404. 'indexes' => array(
  5405. 'quantification_relationship_idx1' => array(
  5406. '0' => 'subject_id',
  5407. ),
  5408. 'quantification_relationship_idx2' => array(
  5409. '0' => 'type_id',
  5410. ),
  5411. 'quantification_relationship_idx3' => array(
  5412. '0' => 'object_id',
  5413. ),
  5414. ),
  5415. 'foreign keys' => array(
  5416. ),
  5417. );
  5418. return $description;
  5419. }
  5420. /**
  5421. * Implements hook_stock_pub_schema()
  5422. * Purpose: To describe the structure of stock_pub to tripal
  5423. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5424. * @see tripal_core.api.inc: tripal_core_chado_update()
  5425. * @see tripal_core.api.inc: tripal_core_chado_select()
  5426. *
  5427. * @return
  5428. * An array describing the current table
  5429. *
  5430. * @ingroup tripal_schema_api
  5431. *
  5432. */
  5433. function tripal_core_chado_stock_pub_schema () {
  5434. $description = array();
  5435. $description = array(
  5436. 'table' => 'stock_pub',
  5437. // 'description' => 'TODO: please describe this table!',
  5438. 'fields' => array(
  5439. 'stock_pub_id' => array(
  5440. // 'description' => 'TODO: please describe this field!',
  5441. 'type' => 'serial',
  5442. 'not null' => '1',
  5443. ),
  5444. 'stock_id' => array(
  5445. // 'description' => 'TODO: please describe this field!',
  5446. 'type' => 'int',
  5447. 'not null' => '1',
  5448. ),
  5449. 'pub_id' => array(
  5450. // 'description' => 'TODO: please describe this field!',
  5451. 'type' => 'int',
  5452. 'not null' => '1',
  5453. ),
  5454. ),
  5455. 'primary key' => array(
  5456. '0' => 'stock_pub_id',
  5457. ),
  5458. 'unique keys' => array(
  5459. 'stock_pub_c1' => array(
  5460. '0' => 'stock_id',
  5461. '1' => 'pub_id',
  5462. ),
  5463. ),
  5464. 'indexes' => array(
  5465. 'stock_pub_idx1' => array(
  5466. '0' => 'stock_id',
  5467. ),
  5468. 'stock_pub_idx2' => array(
  5469. '0' => 'pub_id',
  5470. ),
  5471. ),
  5472. 'foreign keys' => array(
  5473. ),
  5474. );
  5475. return $description;
  5476. }
  5477. /**
  5478. * Implements hook_stock_relationship_schema()
  5479. * Purpose: To describe the structure of stock_relationship to tripal
  5480. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5481. * @see tripal_core.api.inc: tripal_core_chado_update()
  5482. * @see tripal_core.api.inc: tripal_core_chado_select()
  5483. *
  5484. * @return
  5485. * An array describing the current table
  5486. *
  5487. * @ingroup tripal_schema_api
  5488. *
  5489. */
  5490. function tripal_core_chado_stock_relationship_schema () {
  5491. $description = array();
  5492. $description = array(
  5493. 'table' => 'stock_relationship',
  5494. // 'description' => 'TODO: please describe this table!',
  5495. 'fields' => array(
  5496. 'stock_relationship_id' => array(
  5497. // 'description' => 'TODO: please describe this field!',
  5498. 'type' => 'serial',
  5499. 'not null' => '1',
  5500. ),
  5501. 'subject_id' => array(
  5502. // 'description' => 'TODO: please describe this field!',
  5503. 'type' => 'int',
  5504. 'not null' => '1',
  5505. ),
  5506. 'object_id' => array(
  5507. // 'description' => 'TODO: please describe this field!',
  5508. 'type' => 'int',
  5509. 'not null' => '1',
  5510. ),
  5511. 'type_id' => array(
  5512. // 'description' => 'TODO: please describe this field!',
  5513. 'type' => 'int',
  5514. 'not null' => '1',
  5515. ),
  5516. 'value' => array(
  5517. // 'description' => 'TODO: please describe this field!',
  5518. 'type' => 'text',
  5519. 'not null' => '',
  5520. ),
  5521. 'rank' => array(
  5522. // 'description' => 'TODO: please describe this field!',
  5523. 'type' => 'int',
  5524. 'not null' => '1',
  5525. 'default' => '0',
  5526. ),
  5527. ),
  5528. 'primary key' => array(
  5529. '0' => 'stock_relationship_id',
  5530. ),
  5531. 'unique keys' => array(
  5532. 'stock_relationship_c1' => array(
  5533. '0' => 'subject_id',
  5534. '1' => 'object_id',
  5535. '2' => 'type_id',
  5536. '3' => 'rank',
  5537. ),
  5538. ),
  5539. 'indexes' => array(
  5540. 'stock_relationship_idx1' => array(
  5541. '0' => 'subject_id',
  5542. ),
  5543. 'stock_relationship_idx2' => array(
  5544. '0' => 'object_id',
  5545. ),
  5546. 'stock_relationship_idx3' => array(
  5547. '0' => 'type_id',
  5548. ),
  5549. ),
  5550. 'foreign keys' => array(
  5551. ),
  5552. );
  5553. return $description;
  5554. }
  5555. /**
  5556. * Implements hook_stock_relationship_pub_schema()
  5557. * Purpose: To describe the structure of stock_relationship_pub to tripal
  5558. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5559. * @see tripal_core.api.inc: tripal_core_chado_update()
  5560. * @see tripal_core.api.inc: tripal_core_chado_select()
  5561. *
  5562. * @return
  5563. * An array describing the current table
  5564. *
  5565. * @ingroup tripal_schema_api
  5566. *
  5567. */
  5568. function tripal_core_chado_stock_relationship_pub_schema () {
  5569. $description = array();
  5570. $description = array(
  5571. 'table' => 'stock_relationship_pub',
  5572. // 'description' => 'TODO: please describe this table!',
  5573. 'fields' => array(
  5574. 'stock_relationship_pub_id' => array(
  5575. // 'description' => 'TODO: please describe this field!',
  5576. 'type' => 'serial',
  5577. 'not null' => '1',
  5578. ),
  5579. 'stock_relationship_id' => array(
  5580. // 'description' => 'TODO: please describe this field!',
  5581. 'type' => 'int',
  5582. 'not null' => '1',
  5583. ),
  5584. 'pub_id' => array(
  5585. // 'description' => 'TODO: please describe this field!',
  5586. 'type' => 'int',
  5587. 'not null' => '1',
  5588. ),
  5589. ),
  5590. 'primary key' => array(
  5591. '0' => 'stock_relationship_pub_id',
  5592. ),
  5593. 'unique keys' => array(
  5594. 'stock_relationship_pub_c1' => array(
  5595. '0' => 'stock_relationship_id',
  5596. '1' => 'pub_id',
  5597. ),
  5598. ),
  5599. 'indexes' => array(
  5600. 'stock_relationship_pub_idx1' => array(
  5601. '0' => 'stock_relationship_id',
  5602. ),
  5603. 'stock_relationship_pub_idx2' => array(
  5604. '0' => 'pub_id',
  5605. ),
  5606. ),
  5607. 'foreign keys' => array(
  5608. ),
  5609. );
  5610. return $description;
  5611. }
  5612. /**
  5613. * Implements hook_stockcollection_schema()
  5614. * Purpose: To describe the structure of stockcollection to tripal
  5615. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5616. * @see tripal_core.api.inc: tripal_core_chado_update()
  5617. * @see tripal_core.api.inc: tripal_core_chado_select()
  5618. *
  5619. * @return
  5620. * An array describing the current table
  5621. *
  5622. * @ingroup tripal_schema_api
  5623. *
  5624. */
  5625. function tripal_core_chado_stockcollection_schema () {
  5626. $description = array();
  5627. $description = array(
  5628. 'table' => 'stockcollection',
  5629. // 'description' => 'TODO: please describe this table!',
  5630. 'fields' => array(
  5631. 'stockcollection_id' => array(
  5632. // 'description' => 'TODO: please describe this field!',
  5633. 'type' => 'serial',
  5634. 'not null' => '1',
  5635. ),
  5636. 'type_id' => array(
  5637. // 'description' => 'TODO: please describe this field!',
  5638. 'type' => 'int',
  5639. 'not null' => '1',
  5640. ),
  5641. 'contact_id' => array(
  5642. // 'description' => 'TODO: please describe this field!',
  5643. 'type' => 'int',
  5644. 'not null' => '',
  5645. ),
  5646. 'name' => array(
  5647. // 'description' => 'TODO: please describe this field!',
  5648. 'type' => 'varchar',
  5649. 'length' => '255',
  5650. 'not null' => '',
  5651. ),
  5652. 'uniquename' => array(
  5653. // 'description' => 'TODO: please describe this field!',
  5654. 'type' => 'text',
  5655. 'not null' => '1',
  5656. ),
  5657. ),
  5658. 'primary key' => array(
  5659. '0' => 'stockcollection_id',
  5660. ),
  5661. 'unique keys' => array(
  5662. 'stockcollection_c1' => array(
  5663. '0' => 'uniquename',
  5664. '1' => 'type_id',
  5665. ),
  5666. ),
  5667. 'indexes' => array(
  5668. 'stockcollection_idx1' => array(
  5669. '0' => 'contact_id',
  5670. ),
  5671. 'stockcollection_idx2' => array(
  5672. '0' => 'type_id',
  5673. ),
  5674. 'stockcollection_idx3' => array(
  5675. '0' => 'uniquename',
  5676. ),
  5677. 'stockcollection_name_ind1' => array(
  5678. '0' => 'name',
  5679. ),
  5680. ),
  5681. 'foreign keys' => array(
  5682. ),
  5683. );
  5684. return $description;
  5685. }
  5686. /**
  5687. * Implements hook_stock_genotype_schema()
  5688. * Purpose: To describe the structure of stock_genotype to tripal
  5689. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5690. * @see tripal_core.api.inc: tripal_core_chado_update()
  5691. * @see tripal_core.api.inc: tripal_core_chado_select()
  5692. *
  5693. * @return
  5694. * An array describing the current table
  5695. *
  5696. * @ingroup tripal_schema_api
  5697. *
  5698. */
  5699. function tripal_core_chado_stock_genotype_schema () {
  5700. $description = array();
  5701. $description = array(
  5702. 'table' => 'stock_genotype',
  5703. // 'description' => 'TODO: please describe this table!',
  5704. 'fields' => array(
  5705. 'stock_genotype_id' => array(
  5706. // 'description' => 'TODO: please describe this field!',
  5707. 'type' => 'serial',
  5708. 'not null' => '1',
  5709. ),
  5710. 'stock_id' => array(
  5711. // 'description' => 'TODO: please describe this field!',
  5712. 'type' => 'int',
  5713. 'not null' => '1',
  5714. ),
  5715. 'genotype_id' => array(
  5716. // 'description' => 'TODO: please describe this field!',
  5717. 'type' => 'int',
  5718. 'not null' => '1',
  5719. ),
  5720. ),
  5721. 'primary key' => array(
  5722. '0' => 'stock_genotype_id',
  5723. ),
  5724. 'unique keys' => array(
  5725. 'stock_genotype_c1' => array(
  5726. '0' => 'stock_id',
  5727. '1' => 'genotype_id',
  5728. ),
  5729. ),
  5730. 'indexes' => array(
  5731. 'stock_genotype_idx1' => array(
  5732. '0' => 'stock_id',
  5733. ),
  5734. 'stock_genotype_idx2' => array(
  5735. '0' => 'genotype_id',
  5736. ),
  5737. ),
  5738. 'foreign keys' => array(
  5739. ),
  5740. );
  5741. return $description;
  5742. }
  5743. /**
  5744. * Implements hook_stock_dbxref_schema()
  5745. * Purpose: To describe the structure of stock_dbxref to tripal
  5746. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5747. * @see tripal_core.api.inc: tripal_core_chado_update()
  5748. * @see tripal_core.api.inc: tripal_core_chado_select()
  5749. *
  5750. * @return
  5751. * An array describing the current table
  5752. *
  5753. * @ingroup tripal_schema_api
  5754. *
  5755. */
  5756. function tripal_core_chado_stock_dbxref_schema () {
  5757. $description = array();
  5758. $description = array(
  5759. 'table' => 'stock_dbxref',
  5760. // 'description' => 'TODO: please describe this table!',
  5761. 'fields' => array(
  5762. 'stock_dbxref_id' => array(
  5763. // 'description' => 'TODO: please describe this field!',
  5764. 'type' => 'serial',
  5765. 'not null' => '1',
  5766. ),
  5767. 'stock_id' => array(
  5768. // 'description' => 'TODO: please describe this field!',
  5769. 'type' => 'int',
  5770. 'not null' => '1',
  5771. ),
  5772. 'dbxref_id' => array(
  5773. // 'description' => 'TODO: please describe this field!',
  5774. 'type' => 'int',
  5775. 'not null' => '1',
  5776. ),
  5777. 'is_current' => array(
  5778. // 'description' => 'TODO: please describe this field!',
  5779. 'type' => 'boolean',
  5780. 'not null' => '1',
  5781. 'default' => 'ru',
  5782. ),
  5783. ),
  5784. 'primary key' => array(
  5785. '0' => 'stock_dbxref_id',
  5786. ),
  5787. 'unique keys' => array(
  5788. 'stock_dbxref_c1' => array(
  5789. '0' => 'stock_id',
  5790. '1' => 'dbxref_id',
  5791. ),
  5792. ),
  5793. 'indexes' => array(
  5794. 'stock_dbxref_idx1' => array(
  5795. '0' => 'stock_id',
  5796. ),
  5797. 'stock_dbxref_idx2' => array(
  5798. '0' => 'dbxref_id',
  5799. ),
  5800. ),
  5801. 'foreign keys' => array(
  5802. ),
  5803. );
  5804. return $description;
  5805. }
  5806. /**
  5807. * Implements hook_quantificationprop_schema()
  5808. * Purpose: To describe the structure of quantificationprop to tripal
  5809. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5810. * @see tripal_core.api.inc: tripal_core_chado_update()
  5811. * @see tripal_core.api.inc: tripal_core_chado_select()
  5812. *
  5813. * @return
  5814. * An array describing the current table
  5815. *
  5816. * @ingroup tripal_schema_api
  5817. *
  5818. */
  5819. function tripal_core_chado_quantificationprop_schema () {
  5820. $description = array();
  5821. $description = array(
  5822. 'table' => 'quantificationprop',
  5823. // 'description' => 'TODO: please describe this table!',
  5824. 'fields' => array(
  5825. 'quantificationprop_id' => array(
  5826. // 'description' => 'TODO: please describe this field!',
  5827. 'type' => 'serial',
  5828. 'not null' => '1',
  5829. ),
  5830. 'quantification_id' => array(
  5831. // 'description' => 'TODO: please describe this field!',
  5832. 'type' => 'int',
  5833. 'not null' => '1',
  5834. ),
  5835. 'type_id' => array(
  5836. // 'description' => 'TODO: please describe this field!',
  5837. 'type' => 'int',
  5838. 'not null' => '1',
  5839. ),
  5840. 'value' => array(
  5841. // 'description' => 'TODO: please describe this field!',
  5842. 'type' => 'text',
  5843. 'not null' => '',
  5844. ),
  5845. 'rank' => array(
  5846. // 'description' => 'TODO: please describe this field!',
  5847. 'type' => 'int',
  5848. 'not null' => '1',
  5849. 'default' => '0',
  5850. ),
  5851. ),
  5852. 'primary key' => array(
  5853. '0' => 'quantificationprop_id',
  5854. ),
  5855. 'unique keys' => array(
  5856. 'quantificationprop_c1' => array(
  5857. '0' => 'quantification_id',
  5858. '1' => 'type_id',
  5859. '2' => 'rank',
  5860. ),
  5861. ),
  5862. 'indexes' => array(
  5863. 'quantificationprop_idx1' => array(
  5864. '0' => 'quantification_id',
  5865. ),
  5866. 'quantificationprop_idx2' => array(
  5867. '0' => 'type_id',
  5868. ),
  5869. ),
  5870. 'foreign keys' => array(
  5871. ),
  5872. );
  5873. return $description;
  5874. }
  5875. /**
  5876. * Implements hook_stats_paths_to_root_schema()
  5877. * Purpose: To describe the structure of stats_paths_to_root to tripal
  5878. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5879. * @see tripal_core.api.inc: tripal_core_chado_update()
  5880. * @see tripal_core.api.inc: tripal_core_chado_select()
  5881. *
  5882. * @return
  5883. * An array describing the current table
  5884. *
  5885. * @ingroup tripal_schema_api
  5886. *
  5887. */
  5888. function tripal_core_chado_stats_paths_to_root_schema () {
  5889. $description = array();
  5890. $description = array(
  5891. 'table' => 'stats_paths_to_root',
  5892. // 'description' => 'TODO: please describe this table!',
  5893. 'fields' => array(
  5894. 'cvterm_id' => array(
  5895. // 'description' => 'TODO: please describe this field!',
  5896. 'type' => 'int',
  5897. 'not null' => '',
  5898. ),
  5899. 'total_paths' => array(
  5900. // 'description' => 'TODO: please describe this field!',
  5901. 'type' => 'int',
  5902. 'size' => 'big',
  5903. 'not null' => '',
  5904. ),
  5905. 'avg_distance' => array(
  5906. // 'description' => 'TODO: please describe this field!',
  5907. 'type' => 'numeric',
  5908. 'not null' => '',
  5909. 'precision' => '0',
  5910. 'scale' => '0',
  5911. ),
  5912. 'min_distance' => array(
  5913. // 'description' => 'TODO: please describe this field!',
  5914. 'type' => 'int',
  5915. 'not null' => '',
  5916. ),
  5917. 'max_distance' => array(
  5918. // 'description' => 'TODO: please describe this field!',
  5919. 'type' => 'int',
  5920. 'not null' => '',
  5921. ),
  5922. ),
  5923. 'primary key' => array(
  5924. ),
  5925. 'unique keys' => array(
  5926. ),
  5927. 'indexes' => array(
  5928. ),
  5929. 'foreign keys' => array(
  5930. ),
  5931. );
  5932. return $description;
  5933. }
  5934. /**
  5935. * Implements hook_stock_schema()
  5936. * Purpose: To describe the structure of stock to tripal
  5937. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5938. * @see tripal_core.api.inc: tripal_core_chado_update()
  5939. * @see tripal_core.api.inc: tripal_core_chado_select()
  5940. *
  5941. * @return
  5942. * An array describing the current table
  5943. *
  5944. * @ingroup tripal_schema_api
  5945. *
  5946. */
  5947. function tripal_core_chado_stock_schema () {
  5948. $description = array();
  5949. $description = array(
  5950. 'table' => 'stock',
  5951. // 'description' => 'TODO: please describe this table!',
  5952. 'fields' => array(
  5953. 'stock_id' => array(
  5954. // 'description' => 'TODO: please describe this field!',
  5955. 'type' => 'serial',
  5956. 'not null' => '1',
  5957. ),
  5958. 'dbxref_id' => array(
  5959. // 'description' => 'TODO: please describe this field!',
  5960. 'type' => 'int',
  5961. 'not null' => '',
  5962. ),
  5963. 'organism_id' => array(
  5964. // 'description' => 'TODO: please describe this field!',
  5965. 'type' => 'int',
  5966. 'not null' => '1',
  5967. ),
  5968. 'name' => array(
  5969. // 'description' => 'TODO: please describe this field!',
  5970. 'type' => 'varchar',
  5971. 'length' => '255',
  5972. 'not null' => '',
  5973. ),
  5974. 'uniquename' => array(
  5975. // 'description' => 'TODO: please describe this field!',
  5976. 'type' => 'text',
  5977. 'not null' => '1',
  5978. ),
  5979. 'description' => array(
  5980. // 'description' => 'TODO: please describe this field!',
  5981. 'type' => 'text',
  5982. 'not null' => '',
  5983. ),
  5984. 'type_id' => array(
  5985. // 'description' => 'TODO: please describe this field!',
  5986. 'type' => 'int',
  5987. 'not null' => '1',
  5988. ),
  5989. 'is_obsolete' => array(
  5990. // 'description' => 'TODO: please describe this field!',
  5991. 'type' => 'boolean',
  5992. 'not null' => '1',
  5993. 'default' => 'als',
  5994. ),
  5995. ),
  5996. 'primary key' => array(
  5997. '0' => 'stock_id',
  5998. ),
  5999. 'unique keys' => array(
  6000. 'stock_c1' => array(
  6001. '0' => 'organism_id',
  6002. '1' => 'uniquename',
  6003. '2' => 'type_id',
  6004. ),
  6005. ),
  6006. 'indexes' => array(
  6007. 'stock_idx1' => array(
  6008. '0' => 'dbxref_id',
  6009. ),
  6010. 'stock_idx2' => array(
  6011. '0' => 'organism_id',
  6012. ),
  6013. 'stock_idx3' => array(
  6014. '0' => 'type_id',
  6015. ),
  6016. 'stock_idx4' => array(
  6017. '0' => 'uniquename',
  6018. ),
  6019. 'stock_name_ind1' => array(
  6020. '0' => 'name',
  6021. ),
  6022. ),
  6023. 'foreign keys' => array(
  6024. ),
  6025. );
  6026. return $description;
  6027. }
  6028. /**
  6029. * Implements hook_stock_cvterm_schema()
  6030. * Purpose: To describe the structure of stock_cvterm to tripal
  6031. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6032. * @see tripal_core.api.inc: tripal_core_chado_update()
  6033. * @see tripal_core.api.inc: tripal_core_chado_select()
  6034. *
  6035. * @return
  6036. * An array describing the current table
  6037. *
  6038. * @ingroup tripal_schema_api
  6039. *
  6040. */
  6041. function tripal_core_chado_stock_cvterm_schema () {
  6042. $description = array();
  6043. $description = array(
  6044. 'table' => 'stock_cvterm',
  6045. // 'description' => 'TODO: please describe this table!',
  6046. 'fields' => array(
  6047. 'stock_cvterm_id' => array(
  6048. // 'description' => 'TODO: please describe this field!',
  6049. 'type' => 'serial',
  6050. 'not null' => '1',
  6051. ),
  6052. 'stock_id' => array(
  6053. // 'description' => 'TODO: please describe this field!',
  6054. 'type' => 'int',
  6055. 'not null' => '1',
  6056. ),
  6057. 'cvterm_id' => array(
  6058. // 'description' => 'TODO: please describe this field!',
  6059. 'type' => 'int',
  6060. 'not null' => '1',
  6061. ),
  6062. 'pub_id' => array(
  6063. // 'description' => 'TODO: please describe this field!',
  6064. 'type' => 'int',
  6065. 'not null' => '1',
  6066. ),
  6067. ),
  6068. 'primary key' => array(
  6069. '0' => 'stock_cvterm_id',
  6070. ),
  6071. 'unique keys' => array(
  6072. 'stock_cvterm_c1' => array(
  6073. '0' => 'stock_id',
  6074. '1' => 'cvterm_id',
  6075. '2' => 'pub_id',
  6076. ),
  6077. ),
  6078. 'indexes' => array(
  6079. 'stock_cvterm_idx1' => array(
  6080. '0' => 'stock_id',
  6081. ),
  6082. 'stock_cvterm_idx2' => array(
  6083. '0' => 'cvterm_id',
  6084. ),
  6085. 'stock_cvterm_idx3' => array(
  6086. '0' => 'pub_id',
  6087. ),
  6088. ),
  6089. 'foreign keys' => array(
  6090. ),
  6091. );
  6092. return $description;
  6093. }
  6094. /**
  6095. * Implements hook_feature_synonym_schema()
  6096. * Purpose: To describe the structure of feature_synonym to tripal
  6097. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6098. * @see tripal_core.api.inc: tripal_core_chado_update()
  6099. * @see tripal_core.api.inc: tripal_core_chado_select()
  6100. *
  6101. * @return
  6102. * An array describing the current table
  6103. *
  6104. * @ingroup tripal_schema_api
  6105. *
  6106. */
  6107. function tripal_core_chado_feature_synonym_schema () {
  6108. $description = array();
  6109. $description = array(
  6110. 'table' => 'feature_synonym',
  6111. // 'description' => 'TODO: please describe this table!',
  6112. 'fields' => array(
  6113. 'feature_synonym_id' => array(
  6114. // 'description' => 'TODO: please describe this field!',
  6115. 'type' => 'serial',
  6116. 'not null' => '1',
  6117. ),
  6118. 'synonym_id' => array(
  6119. // 'description' => 'TODO: please describe this field!',
  6120. 'type' => 'int',
  6121. 'not null' => '1',
  6122. ),
  6123. 'feature_id' => array(
  6124. // 'description' => 'TODO: please describe this field!',
  6125. 'type' => 'int',
  6126. 'not null' => '1',
  6127. ),
  6128. 'pub_id' => array(
  6129. // 'description' => 'TODO: please describe this field!',
  6130. 'type' => 'int',
  6131. 'not null' => '1',
  6132. ),
  6133. 'is_current' => array(
  6134. // 'description' => 'TODO: please describe this field!',
  6135. 'type' => 'boolean',
  6136. 'not null' => '1',
  6137. 'default' => 'als',
  6138. ),
  6139. 'is_internal' => array(
  6140. // 'description' => 'TODO: please describe this field!',
  6141. 'type' => 'boolean',
  6142. 'not null' => '1',
  6143. 'default' => 'als',
  6144. ),
  6145. ),
  6146. 'primary key' => array(
  6147. '0' => 'feature_synonym_id',
  6148. ),
  6149. 'unique keys' => array(
  6150. 'feature_synonym_c1' => array(
  6151. '0' => 'synonym_id',
  6152. '1' => 'feature_id',
  6153. '2' => 'pub_id',
  6154. ),
  6155. ),
  6156. 'indexes' => array(
  6157. 'feature_synonym_idx1' => array(
  6158. '0' => 'synonym_id',
  6159. ),
  6160. 'feature_synonym_idx2' => array(
  6161. '0' => 'feature_id',
  6162. ),
  6163. 'feature_synonym_idx3' => array(
  6164. '0' => 'pub_id',
  6165. ),
  6166. ),
  6167. 'foreign keys' => array(
  6168. ),
  6169. );
  6170. return $description;
  6171. }
  6172. /**
  6173. * Implements hook_feature_relationshipprop_pub_schema()
  6174. * Purpose: To describe the structure of feature_relationshipprop_pub to tripal
  6175. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6176. * @see tripal_core.api.inc: tripal_core_chado_update()
  6177. * @see tripal_core.api.inc: tripal_core_chado_select()
  6178. *
  6179. * @return
  6180. * An array describing the current table
  6181. *
  6182. * @ingroup tripal_schema_api
  6183. *
  6184. */
  6185. function tripal_core_chado_feature_relationshipprop_pub_schema () {
  6186. $description = array();
  6187. $description = array(
  6188. 'table' => 'feature_relationshipprop_pub',
  6189. // 'description' => 'TODO: please describe this table!',
  6190. 'fields' => array(
  6191. 'feature_relationshipprop_pub_id' => array(
  6192. // 'description' => 'TODO: please describe this field!',
  6193. 'type' => 'serial',
  6194. 'not null' => '1',
  6195. ),
  6196. 'feature_relationshipprop_id' => array(
  6197. // 'description' => 'TODO: please describe this field!',
  6198. 'type' => 'int',
  6199. 'not null' => '1',
  6200. ),
  6201. 'pub_id' => array(
  6202. // 'description' => 'TODO: please describe this field!',
  6203. 'type' => 'int',
  6204. 'not null' => '1',
  6205. ),
  6206. ),
  6207. 'primary key' => array(
  6208. '0' => 'feature_relationshipprop_pub_id',
  6209. ),
  6210. 'unique keys' => array(
  6211. 'feature_relationshipprop_pub_c1' => array(
  6212. '0' => 'feature_relationshipprop_id',
  6213. '1' => 'pub_id',
  6214. ),
  6215. ),
  6216. 'indexes' => array(
  6217. 'feature_relationshipprop_pub_idx1' => array(
  6218. '0' => 'feature_relationshipprop_id',
  6219. ),
  6220. 'feature_relationshipprop_pub_idx2' => array(
  6221. '0' => 'pub_id',
  6222. ),
  6223. ),
  6224. 'foreign keys' => array(
  6225. ),
  6226. );
  6227. return $description;
  6228. }
  6229. /**
  6230. * Implements hook_cell_line_relationship_schema()
  6231. * Purpose: To describe the structure of cell_line_relationship to tripal
  6232. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6233. * @see tripal_core.api.inc: tripal_core_chado_update()
  6234. * @see tripal_core.api.inc: tripal_core_chado_select()
  6235. *
  6236. * @return
  6237. * An array describing the current table
  6238. *
  6239. * @ingroup tripal_schema_api
  6240. *
  6241. */
  6242. function tripal_core_chado_cell_line_relationship_schema () {
  6243. $description = array();
  6244. $description = array(
  6245. 'table' => 'cell_line_relationship',
  6246. // 'description' => 'TODO: please describe this table!',
  6247. 'fields' => array(
  6248. 'cell_line_relationship_id' => array(
  6249. // 'description' => 'TODO: please describe this field!',
  6250. 'type' => 'serial',
  6251. 'not null' => '1',
  6252. ),
  6253. 'subject_id' => array(
  6254. // 'description' => 'TODO: please describe this field!',
  6255. 'type' => 'int',
  6256. 'not null' => '1',
  6257. ),
  6258. 'object_id' => array(
  6259. // 'description' => 'TODO: please describe this field!',
  6260. 'type' => 'int',
  6261. 'not null' => '1',
  6262. ),
  6263. 'type_id' => array(
  6264. // 'description' => 'TODO: please describe this field!',
  6265. 'type' => 'int',
  6266. 'not null' => '1',
  6267. ),
  6268. ),
  6269. 'primary key' => array(
  6270. '0' => 'cell_line_relationship_id',
  6271. ),
  6272. 'unique keys' => array(
  6273. 'cell_line_relationship_c1' => array(
  6274. '0' => 'subject_id',
  6275. '1' => 'object_id',
  6276. '2' => 'type_id',
  6277. ),
  6278. ),
  6279. 'indexes' => array(
  6280. ),
  6281. 'foreign keys' => array(
  6282. ),
  6283. );
  6284. return $description;
  6285. }
  6286. /**
  6287. * Implements hook_cell_line_pub_schema()
  6288. * Purpose: To describe the structure of cell_line_pub to tripal
  6289. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6290. * @see tripal_core.api.inc: tripal_core_chado_update()
  6291. * @see tripal_core.api.inc: tripal_core_chado_select()
  6292. *
  6293. * @return
  6294. * An array describing the current table
  6295. *
  6296. * @ingroup tripal_schema_api
  6297. *
  6298. */
  6299. function tripal_core_chado_cell_line_pub_schema () {
  6300. $description = array();
  6301. $description = array(
  6302. 'table' => 'cell_line_pub',
  6303. // 'description' => 'TODO: please describe this table!',
  6304. 'fields' => array(
  6305. 'cell_line_pub_id' => array(
  6306. // 'description' => 'TODO: please describe this field!',
  6307. 'type' => 'serial',
  6308. 'not null' => '1',
  6309. ),
  6310. 'cell_line_id' => array(
  6311. // 'description' => 'TODO: please describe this field!',
  6312. 'type' => 'int',
  6313. 'not null' => '1',
  6314. ),
  6315. 'pub_id' => array(
  6316. // 'description' => 'TODO: please describe this field!',
  6317. 'type' => 'int',
  6318. 'not null' => '1',
  6319. ),
  6320. ),
  6321. 'primary key' => array(
  6322. '0' => 'cell_line_pub_id',
  6323. ),
  6324. 'unique keys' => array(
  6325. 'cell_line_pub_c1' => array(
  6326. '0' => 'cell_line_id',
  6327. '1' => 'pub_id',
  6328. ),
  6329. ),
  6330. 'indexes' => array(
  6331. ),
  6332. 'foreign keys' => array(
  6333. ),
  6334. );
  6335. return $description;
  6336. }
  6337. /**
  6338. * Implements hook_cell_line_synonym_schema()
  6339. * Purpose: To describe the structure of cell_line_synonym to tripal
  6340. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6341. * @see tripal_core.api.inc: tripal_core_chado_update()
  6342. * @see tripal_core.api.inc: tripal_core_chado_select()
  6343. *
  6344. * @return
  6345. * An array describing the current table
  6346. *
  6347. * @ingroup tripal_schema_api
  6348. *
  6349. */
  6350. function tripal_core_chado_cell_line_synonym_schema () {
  6351. $description = array();
  6352. $description = array(
  6353. 'table' => 'cell_line_synonym',
  6354. // 'description' => 'TODO: please describe this table!',
  6355. 'fields' => array(
  6356. 'cell_line_synonym_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. 'synonym_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. 'is_current' => array(
  6377. // 'description' => 'TODO: please describe this field!',
  6378. 'type' => 'boolean',
  6379. 'not null' => '1',
  6380. 'default' => 'als',
  6381. ),
  6382. 'is_internal' => array(
  6383. // 'description' => 'TODO: please describe this field!',
  6384. 'type' => 'boolean',
  6385. 'not null' => '1',
  6386. 'default' => 'als',
  6387. ),
  6388. ),
  6389. 'primary key' => array(
  6390. '0' => 'cell_line_synonym_id',
  6391. ),
  6392. 'unique keys' => array(
  6393. 'cell_line_synonym_c1' => array(
  6394. '0' => 'synonym_id',
  6395. '1' => 'cell_line_id',
  6396. '2' => 'pub_id',
  6397. ),
  6398. ),
  6399. 'indexes' => array(
  6400. ),
  6401. 'foreign keys' => array(
  6402. ),
  6403. );
  6404. return $description;
  6405. }
  6406. /**
  6407. * Implements hook_cell_lineprop_schema()
  6408. * Purpose: To describe the structure of cell_lineprop to tripal
  6409. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6410. * @see tripal_core.api.inc: tripal_core_chado_update()
  6411. * @see tripal_core.api.inc: tripal_core_chado_select()
  6412. *
  6413. * @return
  6414. * An array describing the current table
  6415. *
  6416. * @ingroup tripal_schema_api
  6417. *
  6418. */
  6419. function tripal_core_chado_cell_lineprop_schema () {
  6420. $description = array();
  6421. $description = array(
  6422. 'table' => 'cell_lineprop',
  6423. // 'description' => 'TODO: please describe this table!',
  6424. 'fields' => array(
  6425. 'cell_lineprop_id' => array(
  6426. // 'description' => 'TODO: please describe this field!',
  6427. 'type' => 'serial',
  6428. 'not null' => '1',
  6429. ),
  6430. 'cell_line_id' => array(
  6431. // 'description' => 'TODO: please describe this field!',
  6432. 'type' => 'int',
  6433. 'not null' => '1',
  6434. ),
  6435. 'type_id' => array(
  6436. // 'description' => 'TODO: please describe this field!',
  6437. 'type' => 'int',
  6438. 'not null' => '1',
  6439. ),
  6440. 'value' => array(
  6441. // 'description' => 'TODO: please describe this field!',
  6442. 'type' => 'text',
  6443. 'not null' => '',
  6444. ),
  6445. 'rank' => array(
  6446. // 'description' => 'TODO: please describe this field!',
  6447. 'type' => 'int',
  6448. 'not null' => '1',
  6449. 'default' => '0',
  6450. ),
  6451. ),
  6452. 'primary key' => array(
  6453. '0' => 'cell_lineprop_id',
  6454. ),
  6455. 'unique keys' => array(
  6456. 'cell_lineprop_c1' => array(
  6457. '0' => 'cell_line_id',
  6458. '1' => 'type_id',
  6459. '2' => 'rank',
  6460. ),
  6461. ),
  6462. 'indexes' => array(
  6463. ),
  6464. 'foreign keys' => array(
  6465. ),
  6466. );
  6467. return $description;
  6468. }
  6469. /**
  6470. * Implements hook_cell_lineprop_pub_schema()
  6471. * Purpose: To describe the structure of cell_lineprop_pub to tripal
  6472. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6473. * @see tripal_core.api.inc: tripal_core_chado_update()
  6474. * @see tripal_core.api.inc: tripal_core_chado_select()
  6475. *
  6476. * @return
  6477. * An array describing the current table
  6478. *
  6479. * @ingroup tripal_schema_api
  6480. *
  6481. */
  6482. function tripal_core_chado_cell_lineprop_pub_schema () {
  6483. $description = array();
  6484. $description = array(
  6485. 'table' => 'cell_lineprop_pub',
  6486. // 'description' => 'TODO: please describe this table!',
  6487. 'fields' => array(
  6488. 'cell_lineprop_pub_id' => array(
  6489. // 'description' => 'TODO: please describe this field!',
  6490. 'type' => 'serial',
  6491. 'not null' => '1',
  6492. ),
  6493. 'cell_lineprop_id' => array(
  6494. // 'description' => 'TODO: please describe this field!',
  6495. 'type' => 'int',
  6496. 'not null' => '1',
  6497. ),
  6498. 'pub_id' => array(
  6499. // 'description' => 'TODO: please describe this field!',
  6500. 'type' => 'int',
  6501. 'not null' => '1',
  6502. ),
  6503. ),
  6504. 'primary key' => array(
  6505. '0' => 'cell_lineprop_pub_id',
  6506. ),
  6507. 'unique keys' => array(
  6508. 'cell_lineprop_pub_c1' => array(
  6509. '0' => 'cell_lineprop_id',
  6510. '1' => 'pub_id',
  6511. ),
  6512. ),
  6513. 'indexes' => array(
  6514. ),
  6515. 'foreign keys' => array(
  6516. ),
  6517. );
  6518. return $description;
  6519. }
  6520. /**
  6521. * Implements hook_cell_line_library_schema()
  6522. * Purpose: To describe the structure of cell_line_library to tripal
  6523. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6524. * @see tripal_core.api.inc: tripal_core_chado_update()
  6525. * @see tripal_core.api.inc: tripal_core_chado_select()
  6526. *
  6527. * @return
  6528. * An array describing the current table
  6529. *
  6530. * @ingroup tripal_schema_api
  6531. *
  6532. */
  6533. function tripal_core_chado_cell_line_library_schema () {
  6534. $description = array();
  6535. $description = array(
  6536. 'table' => 'cell_line_library',
  6537. // 'description' => 'TODO: please describe this table!',
  6538. 'fields' => array(
  6539. 'cell_line_library_id' => array(
  6540. // 'description' => 'TODO: please describe this field!',
  6541. 'type' => 'serial',
  6542. 'not null' => '1',
  6543. ),
  6544. 'cell_line_id' => array(
  6545. // 'description' => 'TODO: please describe this field!',
  6546. 'type' => 'int',
  6547. 'not null' => '1',
  6548. ),
  6549. 'library_id' => array(
  6550. // 'description' => 'TODO: please describe this field!',
  6551. 'type' => 'int',
  6552. 'not null' => '1',
  6553. ),
  6554. 'pub_id' => array(
  6555. // 'description' => 'TODO: please describe this field!',
  6556. 'type' => 'int',
  6557. 'not null' => '1',
  6558. ),
  6559. ),
  6560. 'primary key' => array(
  6561. '0' => 'cell_line_library_id',
  6562. ),
  6563. 'unique keys' => array(
  6564. 'cell_line_library_c1' => array(
  6565. '0' => 'cell_line_id',
  6566. '1' => 'library_id',
  6567. '2' => 'pub_id',
  6568. ),
  6569. ),
  6570. 'indexes' => array(
  6571. ),
  6572. 'foreign keys' => array(
  6573. ),
  6574. );
  6575. return $description;
  6576. }
  6577. /**
  6578. * Implements hook_cell_line_feature_schema()
  6579. * Purpose: To describe the structure of cell_line_feature to tripal
  6580. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6581. * @see tripal_core.api.inc: tripal_core_chado_update()
  6582. * @see tripal_core.api.inc: tripal_core_chado_select()
  6583. *
  6584. * @return
  6585. * An array describing the current table
  6586. *
  6587. * @ingroup tripal_schema_api
  6588. *
  6589. */
  6590. function tripal_core_chado_cell_line_feature_schema () {
  6591. $description = array();
  6592. $description = array(
  6593. 'table' => 'cell_line_feature',
  6594. // 'description' => 'TODO: please describe this table!',
  6595. 'fields' => array(
  6596. 'cell_line_feature_id' => array(
  6597. // 'description' => 'TODO: please describe this field!',
  6598. 'type' => 'serial',
  6599. 'not null' => '1',
  6600. ),
  6601. 'cell_line_id' => array(
  6602. // 'description' => 'TODO: please describe this field!',
  6603. 'type' => 'int',
  6604. 'not null' => '1',
  6605. ),
  6606. 'feature_id' => array(
  6607. // 'description' => 'TODO: please describe this field!',
  6608. 'type' => 'int',
  6609. 'not null' => '1',
  6610. ),
  6611. 'pub_id' => array(
  6612. // 'description' => 'TODO: please describe this field!',
  6613. 'type' => 'int',
  6614. 'not null' => '1',
  6615. ),
  6616. ),
  6617. 'primary key' => array(
  6618. '0' => 'cell_line_feature_id',
  6619. ),
  6620. 'unique keys' => array(
  6621. 'cell_line_feature_c1' => array(
  6622. '0' => 'cell_line_id',
  6623. '1' => 'feature_id',
  6624. '2' => 'pub_id',
  6625. ),
  6626. ),
  6627. 'indexes' => array(
  6628. ),
  6629. 'foreign keys' => array(
  6630. ),
  6631. );
  6632. return $description;
  6633. }
  6634. /**
  6635. * Implements hook_cell_line_schema()
  6636. * Purpose: To describe the structure of cell_line to tripal
  6637. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6638. * @see tripal_core.api.inc: tripal_core_chado_update()
  6639. * @see tripal_core.api.inc: tripal_core_chado_select()
  6640. *
  6641. * @return
  6642. * An array describing the current table
  6643. *
  6644. * @ingroup tripal_schema_api
  6645. *
  6646. */
  6647. function tripal_core_chado_cell_line_schema () {
  6648. $description = array();
  6649. $description = array(
  6650. 'table' => 'cell_line',
  6651. // 'description' => 'TODO: please describe this table!',
  6652. 'fields' => array(
  6653. 'cell_line_id' => array(
  6654. // 'description' => 'TODO: please describe this field!',
  6655. 'type' => 'serial',
  6656. 'not null' => '1',
  6657. ),
  6658. 'name' => array(
  6659. // 'description' => 'TODO: please describe this field!',
  6660. 'type' => 'varchar',
  6661. 'length' => '255',
  6662. 'not null' => '',
  6663. ),
  6664. 'uniquename' => array(
  6665. // 'description' => 'TODO: please describe this field!',
  6666. 'type' => 'varchar',
  6667. 'length' => '255',
  6668. 'not null' => '1',
  6669. ),
  6670. 'organism_id' => array(
  6671. // 'description' => 'TODO: please describe this field!',
  6672. 'type' => 'int',
  6673. 'not null' => '1',
  6674. ),
  6675. 'timeaccessioned' => array(
  6676. // 'description' => 'TODO: please describe this field!',
  6677. 'type' => 'datetime',
  6678. 'not null' => '1',
  6679. 'default' => 'ow(',
  6680. ),
  6681. 'timelastmodified' => array(
  6682. // 'description' => 'TODO: please describe this field!',
  6683. 'type' => 'datetime',
  6684. 'not null' => '1',
  6685. 'default' => 'ow(',
  6686. ),
  6687. ),
  6688. 'primary key' => array(
  6689. '0' => 'cell_line_id',
  6690. ),
  6691. 'unique keys' => array(
  6692. 'cell_line_c1' => array(
  6693. '0' => 'uniquename',
  6694. '1' => 'organism_id',
  6695. ),
  6696. ),
  6697. 'indexes' => array(
  6698. ),
  6699. 'foreign keys' => array(
  6700. ),
  6701. );
  6702. return $description;
  6703. }
  6704. /**
  6705. * Implements hook_cell_line_cvterm_schema()
  6706. * Purpose: To describe the structure of cell_line_cvterm to tripal
  6707. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6708. * @see tripal_core.api.inc: tripal_core_chado_update()
  6709. * @see tripal_core.api.inc: tripal_core_chado_select()
  6710. *
  6711. * @return
  6712. * An array describing the current table
  6713. *
  6714. * @ingroup tripal_schema_api
  6715. *
  6716. */
  6717. function tripal_core_chado_cell_line_cvterm_schema () {
  6718. $description = array();
  6719. $description = array(
  6720. 'table' => 'cell_line_cvterm',
  6721. // 'description' => 'TODO: please describe this table!',
  6722. 'fields' => array(
  6723. 'cell_line_cvterm_id' => array(
  6724. // 'description' => 'TODO: please describe this field!',
  6725. 'type' => 'serial',
  6726. 'not null' => '1',
  6727. ),
  6728. 'cell_line_id' => array(
  6729. // 'description' => 'TODO: please describe this field!',
  6730. 'type' => 'int',
  6731. 'not null' => '1',
  6732. ),
  6733. 'cvterm_id' => array(
  6734. // 'description' => 'TODO: please describe this field!',
  6735. 'type' => 'int',
  6736. 'not null' => '1',
  6737. ),
  6738. 'pub_id' => array(
  6739. // 'description' => 'TODO: please describe this field!',
  6740. 'type' => 'int',
  6741. 'not null' => '1',
  6742. ),
  6743. 'rank' => array(
  6744. // 'description' => 'TODO: please describe this field!',
  6745. 'type' => 'int',
  6746. 'not null' => '1',
  6747. 'default' => '0',
  6748. ),
  6749. ),
  6750. 'primary key' => array(
  6751. '0' => 'cell_line_cvterm_id',
  6752. ),
  6753. 'unique keys' => array(
  6754. 'cell_line_cvterm_c1' => array(
  6755. '0' => 'cell_line_id',
  6756. '1' => 'cvterm_id',
  6757. '2' => 'pub_id',
  6758. '3' => 'rank',
  6759. ),
  6760. ),
  6761. 'indexes' => array(
  6762. ),
  6763. 'foreign keys' => array(
  6764. ),
  6765. );
  6766. return $description;
  6767. }
  6768. /**
  6769. * Implements hook_cell_line_cvtermprop_schema()
  6770. * Purpose: To describe the structure of cell_line_cvtermprop to tripal
  6771. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6772. * @see tripal_core.api.inc: tripal_core_chado_update()
  6773. * @see tripal_core.api.inc: tripal_core_chado_select()
  6774. *
  6775. * @return
  6776. * An array describing the current table
  6777. *
  6778. * @ingroup tripal_schema_api
  6779. *
  6780. */
  6781. function tripal_core_chado_cell_line_cvtermprop_schema () {
  6782. $description = array();
  6783. $description = array(
  6784. 'table' => 'cell_line_cvtermprop',
  6785. // 'description' => 'TODO: please describe this table!',
  6786. 'fields' => array(
  6787. 'cell_line_cvtermprop_id' => array(
  6788. // 'description' => 'TODO: please describe this field!',
  6789. 'type' => 'serial',
  6790. 'not null' => '1',
  6791. ),
  6792. 'cell_line_cvterm_id' => array(
  6793. // 'description' => 'TODO: please describe this field!',
  6794. 'type' => 'int',
  6795. 'not null' => '1',
  6796. ),
  6797. 'type_id' => array(
  6798. // 'description' => 'TODO: please describe this field!',
  6799. 'type' => 'int',
  6800. 'not null' => '1',
  6801. ),
  6802. 'value' => array(
  6803. // 'description' => 'TODO: please describe this field!',
  6804. 'type' => 'text',
  6805. 'not null' => '',
  6806. ),
  6807. 'rank' => array(
  6808. // 'description' => 'TODO: please describe this field!',
  6809. 'type' => 'int',
  6810. 'not null' => '1',
  6811. 'default' => '0',
  6812. ),
  6813. ),
  6814. 'primary key' => array(
  6815. '0' => 'cell_line_cvtermprop_id',
  6816. ),
  6817. 'unique keys' => array(
  6818. 'cell_line_cvtermprop_c1' => array(
  6819. '0' => 'cell_line_cvterm_id',
  6820. '1' => 'type_id',
  6821. '2' => 'rank',
  6822. ),
  6823. ),
  6824. 'indexes' => array(
  6825. ),
  6826. 'foreign keys' => array(
  6827. ),
  6828. );
  6829. return $description;
  6830. }
  6831. /**
  6832. * Implements hook_cell_line_dbxref_schema()
  6833. * Purpose: To describe the structure of cell_line_dbxref to tripal
  6834. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6835. * @see tripal_core.api.inc: tripal_core_chado_update()
  6836. * @see tripal_core.api.inc: tripal_core_chado_select()
  6837. *
  6838. * @return
  6839. * An array describing the current table
  6840. *
  6841. * @ingroup tripal_schema_api
  6842. *
  6843. */
  6844. function tripal_core_chado_cell_line_dbxref_schema () {
  6845. $description = array();
  6846. $description = array(
  6847. 'table' => 'cell_line_dbxref',
  6848. // 'description' => 'TODO: please describe this table!',
  6849. 'fields' => array(
  6850. 'cell_line_dbxref_id' => array(
  6851. // 'description' => 'TODO: please describe this field!',
  6852. 'type' => 'serial',
  6853. 'not null' => '1',
  6854. ),
  6855. 'cell_line_id' => array(
  6856. // 'description' => 'TODO: please describe this field!',
  6857. 'type' => 'int',
  6858. 'not null' => '1',
  6859. ),
  6860. 'dbxref_id' => array(
  6861. // 'description' => 'TODO: please describe this field!',
  6862. 'type' => 'int',
  6863. 'not null' => '1',
  6864. ),
  6865. 'is_current' => array(
  6866. // 'description' => 'TODO: please describe this field!',
  6867. 'type' => 'boolean',
  6868. 'not null' => '1',
  6869. 'default' => 'ru',
  6870. ),
  6871. ),
  6872. 'primary key' => array(
  6873. '0' => 'cell_line_dbxref_id',
  6874. ),
  6875. 'unique keys' => array(
  6876. 'cell_line_dbxref_c1' => array(
  6877. '0' => 'cell_line_id',
  6878. '1' => 'dbxref_id',
  6879. ),
  6880. ),
  6881. 'indexes' => array(
  6882. ),
  6883. 'foreign keys' => array(
  6884. ),
  6885. );
  6886. return $description;
  6887. }
  6888. /**
  6889. * Implements hook_channel_schema()
  6890. * Purpose: To describe the structure of channel to tripal
  6891. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6892. * @see tripal_core.api.inc: tripal_core_chado_update()
  6893. * @see tripal_core.api.inc: tripal_core_chado_select()
  6894. *
  6895. * @return
  6896. * An array describing the current table
  6897. *
  6898. * @ingroup tripal_schema_api
  6899. *
  6900. */
  6901. function tripal_core_chado_channel_schema () {
  6902. $description = array();
  6903. $description = array(
  6904. 'table' => 'channel',
  6905. // 'description' => 'TODO: please describe this table!',
  6906. 'fields' => array(
  6907. 'channel_id' => array(
  6908. // 'description' => 'TODO: please describe this field!',
  6909. 'type' => 'serial',
  6910. 'not null' => '1',
  6911. ),
  6912. 'name' => array(
  6913. // 'description' => 'TODO: please describe this field!',
  6914. 'type' => 'text',
  6915. 'not null' => '1',
  6916. ),
  6917. 'definition' => array(
  6918. // 'description' => 'TODO: please describe this field!',
  6919. 'type' => 'text',
  6920. 'not null' => '1',
  6921. ),
  6922. ),
  6923. 'primary key' => array(
  6924. '0' => 'channel_id',
  6925. ),
  6926. 'unique keys' => array(
  6927. 'channel_c1' => array(
  6928. '0' => 'name',
  6929. ),
  6930. ),
  6931. 'indexes' => array(
  6932. ),
  6933. 'foreign keys' => array(
  6934. ),
  6935. );
  6936. return $description;
  6937. }
  6938. /**
  6939. * Implements hook_common_ancestor_cvterm_schema()
  6940. * Purpose: To describe the structure of common_ancestor_cvterm to tripal
  6941. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6942. * @see tripal_core.api.inc: tripal_core_chado_update()
  6943. * @see tripal_core.api.inc: tripal_core_chado_select()
  6944. *
  6945. * @return
  6946. * An array describing the current table
  6947. *
  6948. * @ingroup tripal_schema_api
  6949. *
  6950. */
  6951. function tripal_core_chado_common_ancestor_cvterm_schema () {
  6952. $description = array();
  6953. $description = array(
  6954. 'table' => 'common_ancestor_cvterm',
  6955. // 'description' => 'TODO: please describe this table!',
  6956. 'fields' => array(
  6957. 'cvterm1_id' => array(
  6958. // 'description' => 'TODO: please describe this field!',
  6959. 'type' => 'int',
  6960. 'not null' => '',
  6961. ),
  6962. 'cvterm2_id' => array(
  6963. // 'description' => 'TODO: please describe this field!',
  6964. 'type' => 'int',
  6965. 'not null' => '',
  6966. ),
  6967. 'ancestor_cvterm_id' => array(
  6968. // 'description' => 'TODO: please describe this field!',
  6969. 'type' => 'int',
  6970. 'not null' => '',
  6971. ),
  6972. 'pathdistance1' => array(
  6973. // 'description' => 'TODO: please describe this field!',
  6974. 'type' => 'int',
  6975. 'not null' => '',
  6976. ),
  6977. 'pathdistance2' => array(
  6978. // 'description' => 'TODO: please describe this field!',
  6979. 'type' => 'int',
  6980. 'not null' => '',
  6981. ),
  6982. 'total_pathdistance' => array(
  6983. // 'description' => 'TODO: please describe this field!',
  6984. 'type' => 'int',
  6985. 'not null' => '',
  6986. ),
  6987. ),
  6988. 'primary key' => array(
  6989. ),
  6990. 'unique keys' => array(
  6991. ),
  6992. 'indexes' => array(
  6993. ),
  6994. 'foreign keys' => array(
  6995. ),
  6996. );
  6997. return $description;
  6998. }
  6999. /**
  7000. * Implements hook_cv_cvterm_count_with_obs_schema()
  7001. * Purpose: To describe the structure of cv_cvterm_count_with_obs to tripal
  7002. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7003. * @see tripal_core.api.inc: tripal_core_chado_update()
  7004. * @see tripal_core.api.inc: tripal_core_chado_select()
  7005. *
  7006. * @return
  7007. * An array describing the current table
  7008. *
  7009. * @ingroup tripal_schema_api
  7010. *
  7011. */
  7012. function tripal_core_chado_cv_cvterm_count_with_obs_schema () {
  7013. $description = array();
  7014. $description = array(
  7015. 'table' => 'cv_cvterm_count_with_obs',
  7016. // 'description' => 'TODO: please describe this table!',
  7017. 'fields' => array(
  7018. 'name' => array(
  7019. // 'description' => 'TODO: please describe this field!',
  7020. 'type' => 'varchar',
  7021. 'length' => '255',
  7022. 'not null' => '',
  7023. ),
  7024. 'num_terms_incl_obs' => array(
  7025. // 'description' => 'TODO: please describe this field!',
  7026. 'type' => 'int',
  7027. 'size' => 'big',
  7028. 'not null' => '',
  7029. ),
  7030. ),
  7031. 'primary key' => array(
  7032. ),
  7033. 'unique keys' => array(
  7034. ),
  7035. 'indexes' => array(
  7036. ),
  7037. 'foreign keys' => array(
  7038. ),
  7039. );
  7040. return $description;
  7041. }
  7042. /**
  7043. * Implements hook_cv_leaf_schema()
  7044. * Purpose: To describe the structure of cv_leaf to tripal
  7045. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7046. * @see tripal_core.api.inc: tripal_core_chado_update()
  7047. * @see tripal_core.api.inc: tripal_core_chado_select()
  7048. *
  7049. * @return
  7050. * An array describing the current table
  7051. *
  7052. * @ingroup tripal_schema_api
  7053. *
  7054. */
  7055. function tripal_core_chado_cv_leaf_schema () {
  7056. $description = array();
  7057. $description = array(
  7058. 'table' => 'cv_leaf',
  7059. // 'description' => 'TODO: please describe this table!',
  7060. 'fields' => array(
  7061. 'cv_id' => array(
  7062. // 'description' => 'TODO: please describe this field!',
  7063. 'type' => 'int',
  7064. 'not null' => '',
  7065. ),
  7066. 'cvterm_id' => array(
  7067. // 'description' => 'TODO: please describe this field!',
  7068. 'type' => 'int',
  7069. 'not null' => '',
  7070. ),
  7071. ),
  7072. 'primary key' => array(
  7073. ),
  7074. 'unique keys' => array(
  7075. ),
  7076. 'indexes' => array(
  7077. ),
  7078. 'foreign keys' => array(
  7079. ),
  7080. );
  7081. return $description;
  7082. }
  7083. /**
  7084. * Implements hook_cv_link_count_schema()
  7085. * Purpose: To describe the structure of cv_link_count to tripal
  7086. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7087. * @see tripal_core.api.inc: tripal_core_chado_update()
  7088. * @see tripal_core.api.inc: tripal_core_chado_select()
  7089. *
  7090. * @return
  7091. * An array describing the current table
  7092. *
  7093. * @ingroup tripal_schema_api
  7094. *
  7095. */
  7096. function tripal_core_chado_cv_link_count_schema () {
  7097. $description = array();
  7098. $description = array(
  7099. 'table' => 'cv_link_count',
  7100. // 'description' => 'TODO: please describe this table!',
  7101. 'fields' => array(
  7102. 'cv_name' => array(
  7103. // 'description' => 'TODO: please describe this field!',
  7104. 'type' => 'varchar',
  7105. 'length' => '255',
  7106. 'not null' => '',
  7107. ),
  7108. 'relation_name' => array(
  7109. // 'description' => 'TODO: please describe this field!',
  7110. 'type' => 'varchar',
  7111. 'length' => '1024',
  7112. 'not null' => '',
  7113. ),
  7114. 'relation_cv_name' => array(
  7115. // 'description' => 'TODO: please describe this field!',
  7116. 'type' => 'varchar',
  7117. 'length' => '255',
  7118. 'not null' => '',
  7119. ),
  7120. 'num_links' => array(
  7121. // 'description' => 'TODO: please describe this field!',
  7122. 'type' => 'int',
  7123. 'size' => 'big',
  7124. 'not null' => '',
  7125. ),
  7126. ),
  7127. 'primary key' => array(
  7128. ),
  7129. 'unique keys' => array(
  7130. ),
  7131. 'indexes' => array(
  7132. ),
  7133. 'foreign keys' => array(
  7134. ),
  7135. );
  7136. return $description;
  7137. }
  7138. /**
  7139. * Implements hook_cv_path_count_schema()
  7140. * Purpose: To describe the structure of cv_path_count to tripal
  7141. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7142. * @see tripal_core.api.inc: tripal_core_chado_update()
  7143. * @see tripal_core.api.inc: tripal_core_chado_select()
  7144. *
  7145. * @return
  7146. * An array describing the current table
  7147. *
  7148. * @ingroup tripal_schema_api
  7149. *
  7150. */
  7151. function tripal_core_chado_cv_path_count_schema () {
  7152. $description = array();
  7153. $description = array(
  7154. 'table' => 'cv_path_count',
  7155. // 'description' => 'TODO: please describe this table!',
  7156. 'fields' => array(
  7157. 'cv_name' => array(
  7158. // 'description' => 'TODO: please describe this field!',
  7159. 'type' => 'varchar',
  7160. 'length' => '255',
  7161. 'not null' => '',
  7162. ),
  7163. 'relation_name' => array(
  7164. // 'description' => 'TODO: please describe this field!',
  7165. 'type' => 'varchar',
  7166. 'length' => '1024',
  7167. 'not null' => '',
  7168. ),
  7169. 'relation_cv_name' => array(
  7170. // 'description' => 'TODO: please describe this field!',
  7171. 'type' => 'varchar',
  7172. 'length' => '255',
  7173. 'not null' => '',
  7174. ),
  7175. 'num_paths' => array(
  7176. // 'description' => 'TODO: please describe this field!',
  7177. 'type' => 'int',
  7178. 'size' => 'big',
  7179. 'not null' => '',
  7180. ),
  7181. ),
  7182. 'primary key' => array(
  7183. ),
  7184. 'unique keys' => array(
  7185. ),
  7186. 'indexes' => array(
  7187. ),
  7188. 'foreign keys' => array(
  7189. ),
  7190. );
  7191. return $description;
  7192. }
  7193. /**
  7194. * Implements hook_cv_cvterm_count_schema()
  7195. * Purpose: To describe the structure of cv_cvterm_count to tripal
  7196. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7197. * @see tripal_core.api.inc: tripal_core_chado_update()
  7198. * @see tripal_core.api.inc: tripal_core_chado_select()
  7199. *
  7200. * @return
  7201. * An array describing the current table
  7202. *
  7203. * @ingroup tripal_schema_api
  7204. *
  7205. */
  7206. function tripal_core_chado_cv_cvterm_count_schema () {
  7207. $description = array();
  7208. $description = array(
  7209. 'table' => 'cv_cvterm_count',
  7210. // 'description' => 'TODO: please describe this table!',
  7211. 'fields' => array(
  7212. 'name' => array(
  7213. // 'description' => 'TODO: please describe this field!',
  7214. 'type' => 'varchar',
  7215. 'length' => '255',
  7216. 'not null' => '',
  7217. ),
  7218. 'num_terms_excl_obs' => array(
  7219. // 'description' => 'TODO: please describe this field!',
  7220. 'type' => 'int',
  7221. 'size' => 'big',
  7222. 'not null' => '',
  7223. ),
  7224. ),
  7225. 'primary key' => array(
  7226. ),
  7227. 'unique keys' => array(
  7228. ),
  7229. 'indexes' => array(
  7230. ),
  7231. 'foreign keys' => array(
  7232. ),
  7233. );
  7234. return $description;
  7235. }
  7236. /**
  7237. * Implements hook_cv_schema()
  7238. * Purpose: To describe the structure of cv to tripal
  7239. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7240. * @see tripal_core.api.inc: tripal_core_chado_update()
  7241. * @see tripal_core.api.inc: tripal_core_chado_select()
  7242. *
  7243. * @return
  7244. * An array describing the current table
  7245. *
  7246. * @ingroup tripal_schema_api
  7247. *
  7248. */
  7249. function tripal_core_chado_cv_schema () {
  7250. $description = array();
  7251. $description = array(
  7252. 'table' => 'cv',
  7253. // 'description' => 'TODO: please describe this table!',
  7254. 'fields' => array(
  7255. 'cv_id' => array(
  7256. // 'description' => 'TODO: please describe this field!',
  7257. 'type' => 'serial',
  7258. 'not null' => '1',
  7259. ),
  7260. 'name' => array(
  7261. // 'description' => 'TODO: please describe this field!',
  7262. 'type' => 'varchar',
  7263. 'length' => '255',
  7264. 'not null' => '1',
  7265. ),
  7266. 'definition' => array(
  7267. // 'description' => 'TODO: please describe this field!',
  7268. 'type' => 'text',
  7269. 'not null' => '',
  7270. ),
  7271. ),
  7272. 'primary key' => array(
  7273. '0' => 'cv_id',
  7274. ),
  7275. 'unique keys' => array(
  7276. 'cv_c1' => array(
  7277. '0' => 'name',
  7278. ),
  7279. ),
  7280. 'indexes' => array(
  7281. ),
  7282. 'foreign keys' => array(
  7283. ),
  7284. );
  7285. return $description;
  7286. }
  7287. /**
  7288. * Implements hook_common_descendant_cvterm_schema()
  7289. * Purpose: To describe the structure of common_descendant_cvterm to tripal
  7290. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7291. * @see tripal_core.api.inc: tripal_core_chado_update()
  7292. * @see tripal_core.api.inc: tripal_core_chado_select()
  7293. *
  7294. * @return
  7295. * An array describing the current table
  7296. *
  7297. * @ingroup tripal_schema_api
  7298. *
  7299. */
  7300. function tripal_core_chado_common_descendant_cvterm_schema () {
  7301. $description = array();
  7302. $description = array(
  7303. 'table' => 'common_descendant_cvterm',
  7304. // 'description' => 'TODO: please describe this table!',
  7305. 'fields' => array(
  7306. 'cvterm1_id' => array(
  7307. // 'description' => 'TODO: please describe this field!',
  7308. 'type' => 'int',
  7309. 'not null' => '',
  7310. ),
  7311. 'cvterm2_id' => array(
  7312. // 'description' => 'TODO: please describe this field!',
  7313. 'type' => 'int',
  7314. 'not null' => '',
  7315. ),
  7316. 'ancestor_cvterm_id' => array(
  7317. // 'description' => 'TODO: please describe this field!',
  7318. 'type' => 'int',
  7319. 'not null' => '',
  7320. ),
  7321. 'pathdistance1' => array(
  7322. // 'description' => 'TODO: please describe this field!',
  7323. 'type' => 'int',
  7324. 'not null' => '',
  7325. ),
  7326. 'pathdistance2' => array(
  7327. // 'description' => 'TODO: please describe this field!',
  7328. 'type' => 'int',
  7329. 'not null' => '',
  7330. ),
  7331. 'total_pathdistance' => array(
  7332. // 'description' => 'TODO: please describe this field!',
  7333. 'type' => 'int',
  7334. 'not null' => '',
  7335. ),
  7336. ),
  7337. 'primary key' => array(
  7338. ),
  7339. 'unique keys' => array(
  7340. ),
  7341. 'indexes' => array(
  7342. ),
  7343. 'foreign keys' => array(
  7344. ),
  7345. );
  7346. return $description;
  7347. }
  7348. /**
  7349. * Implements hook_contact_schema()
  7350. * Purpose: To describe the structure of contact to tripal
  7351. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7352. * @see tripal_core.api.inc: tripal_core_chado_update()
  7353. * @see tripal_core.api.inc: tripal_core_chado_select()
  7354. *
  7355. * @return
  7356. * An array describing the current table
  7357. *
  7358. * @ingroup tripal_schema_api
  7359. *
  7360. */
  7361. function tripal_core_chado_contact_schema () {
  7362. $description = array();
  7363. $description = array(
  7364. 'table' => 'contact',
  7365. // 'description' => 'TODO: please describe this table!',
  7366. 'fields' => array(
  7367. 'contact_id' => array(
  7368. // 'description' => 'TODO: please describe this field!',
  7369. 'type' => 'serial',
  7370. 'not null' => '1',
  7371. ),
  7372. 'type_id' => array(
  7373. // 'description' => 'TODO: please describe this field!',
  7374. 'type' => 'int',
  7375. 'not null' => '',
  7376. ),
  7377. 'name' => array(
  7378. // 'description' => 'TODO: please describe this field!',
  7379. 'type' => 'varchar',
  7380. 'length' => '255',
  7381. 'not null' => '1',
  7382. ),
  7383. 'description' => array(
  7384. // 'description' => 'TODO: please describe this field!',
  7385. 'type' => 'varchar',
  7386. 'length' => '255',
  7387. 'not null' => '',
  7388. ),
  7389. ),
  7390. 'primary key' => array(
  7391. '0' => 'contact_id',
  7392. ),
  7393. 'unique keys' => array(
  7394. 'contact_c1' => array(
  7395. '0' => 'name',
  7396. ),
  7397. ),
  7398. 'indexes' => array(
  7399. ),
  7400. 'foreign keys' => array(
  7401. ),
  7402. );
  7403. return $description;
  7404. }
  7405. /**
  7406. * Implements hook_contact_relationship_schema()
  7407. * Purpose: To describe the structure of contact_relationship to tripal
  7408. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7409. * @see tripal_core.api.inc: tripal_core_chado_update()
  7410. * @see tripal_core.api.inc: tripal_core_chado_select()
  7411. *
  7412. * @return
  7413. * An array describing the current table
  7414. *
  7415. * @ingroup tripal_schema_api
  7416. *
  7417. */
  7418. function tripal_core_chado_contact_relationship_schema () {
  7419. $description = array();
  7420. $description = array(
  7421. 'table' => 'contact_relationship',
  7422. // 'description' => 'TODO: please describe this table!',
  7423. 'fields' => array(
  7424. 'contact_relationship_id' => array(
  7425. // 'description' => 'TODO: please describe this field!',
  7426. 'type' => 'serial',
  7427. 'not null' => '1',
  7428. ),
  7429. 'type_id' => array(
  7430. // 'description' => 'TODO: please describe this field!',
  7431. 'type' => 'int',
  7432. 'not null' => '1',
  7433. ),
  7434. 'subject_id' => array(
  7435. // 'description' => 'TODO: please describe this field!',
  7436. 'type' => 'int',
  7437. 'not null' => '1',
  7438. ),
  7439. 'object_id' => array(
  7440. // 'description' => 'TODO: please describe this field!',
  7441. 'type' => 'int',
  7442. 'not null' => '1',
  7443. ),
  7444. ),
  7445. 'primary key' => array(
  7446. '0' => 'contact_relationship_id',
  7447. ),
  7448. 'unique keys' => array(
  7449. 'contact_relationship_c1' => array(
  7450. '0' => 'subject_id',
  7451. '1' => 'object_id',
  7452. '2' => 'type_id',
  7453. ),
  7454. ),
  7455. 'indexes' => array(
  7456. 'contact_relationship_idx1' => array(
  7457. '0' => 'type_id',
  7458. ),
  7459. 'contact_relationship_idx2' => array(
  7460. '0' => 'subject_id',
  7461. ),
  7462. 'contact_relationship_idx3' => array(
  7463. '0' => 'object_id',
  7464. ),
  7465. ),
  7466. 'foreign keys' => array(
  7467. ),
  7468. );
  7469. return $description;
  7470. }
  7471. /**
  7472. * Implements hook_control_schema()
  7473. * Purpose: To describe the structure of control to tripal
  7474. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7475. * @see tripal_core.api.inc: tripal_core_chado_update()
  7476. * @see tripal_core.api.inc: tripal_core_chado_select()
  7477. *
  7478. * @return
  7479. * An array describing the current table
  7480. *
  7481. * @ingroup tripal_schema_api
  7482. *
  7483. */
  7484. function tripal_core_chado_control_schema () {
  7485. $description = array();
  7486. $description = array(
  7487. 'table' => 'control',
  7488. // 'description' => 'TODO: please describe this table!',
  7489. 'fields' => array(
  7490. 'control_id' => array(
  7491. // 'description' => 'TODO: please describe this field!',
  7492. 'type' => 'serial',
  7493. 'not null' => '1',
  7494. ),
  7495. 'type_id' => array(
  7496. // 'description' => 'TODO: please describe this field!',
  7497. 'type' => 'int',
  7498. 'not null' => '1',
  7499. ),
  7500. 'assay_id' => array(
  7501. // 'description' => 'TODO: please describe this field!',
  7502. 'type' => 'int',
  7503. 'not null' => '1',
  7504. ),
  7505. 'tableinfo_id' => array(
  7506. // 'description' => 'TODO: please describe this field!',
  7507. 'type' => 'int',
  7508. 'not null' => '1',
  7509. ),
  7510. 'row_id' => array(
  7511. // 'description' => 'TODO: please describe this field!',
  7512. 'type' => 'int',
  7513. 'not null' => '1',
  7514. ),
  7515. 'name' => array(
  7516. // 'description' => 'TODO: please describe this field!',
  7517. 'type' => 'text',
  7518. 'not null' => '',
  7519. ),
  7520. 'value' => array(
  7521. // 'description' => 'TODO: please describe this field!',
  7522. 'type' => 'text',
  7523. 'not null' => '',
  7524. ),
  7525. 'rank' => array(
  7526. // 'description' => 'TODO: please describe this field!',
  7527. 'type' => 'int',
  7528. 'not null' => '1',
  7529. 'default' => '0',
  7530. ),
  7531. ),
  7532. 'primary key' => array(
  7533. '0' => 'control_id',
  7534. ),
  7535. 'unique keys' => array(
  7536. ),
  7537. 'indexes' => array(
  7538. 'control_idx1' => array(
  7539. '0' => 'type_id',
  7540. ),
  7541. 'control_idx2' => array(
  7542. '0' => 'assay_id',
  7543. ),
  7544. 'control_idx3' => array(
  7545. '0' => 'tableinfo_id',
  7546. ),
  7547. 'control_idx4' => array(
  7548. '0' => 'row_id',
  7549. ),
  7550. ),
  7551. 'foreign keys' => array(
  7552. ),
  7553. );
  7554. return $description;
  7555. }
  7556. /**
  7557. * Implements hook_biomaterialprop_schema()
  7558. * Purpose: To describe the structure of biomaterialprop to tripal
  7559. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7560. * @see tripal_core.api.inc: tripal_core_chado_update()
  7561. * @see tripal_core.api.inc: tripal_core_chado_select()
  7562. *
  7563. * @return
  7564. * An array describing the current table
  7565. *
  7566. * @ingroup tripal_schema_api
  7567. *
  7568. */
  7569. function tripal_core_chado_biomaterialprop_schema () {
  7570. $description = array();
  7571. $description = array(
  7572. 'table' => 'biomaterialprop',
  7573. // 'description' => 'TODO: please describe this table!',
  7574. 'fields' => array(
  7575. 'biomaterialprop_id' => array(
  7576. // 'description' => 'TODO: please describe this field!',
  7577. 'type' => 'serial',
  7578. 'not null' => '1',
  7579. ),
  7580. 'biomaterial_id' => array(
  7581. // 'description' => 'TODO: please describe this field!',
  7582. 'type' => 'int',
  7583. 'not null' => '1',
  7584. ),
  7585. 'type_id' => array(
  7586. // 'description' => 'TODO: please describe this field!',
  7587. 'type' => 'int',
  7588. 'not null' => '1',
  7589. ),
  7590. 'value' => array(
  7591. // 'description' => 'TODO: please describe this field!',
  7592. 'type' => 'text',
  7593. 'not null' => '',
  7594. ),
  7595. 'rank' => array(
  7596. // 'description' => 'TODO: please describe this field!',
  7597. 'type' => 'int',
  7598. 'not null' => '1',
  7599. 'default' => '0',
  7600. ),
  7601. ),
  7602. 'primary key' => array(
  7603. '0' => 'biomaterialprop_id',
  7604. ),
  7605. 'unique keys' => array(
  7606. 'biomaterialprop_c1' => array(
  7607. '0' => 'biomaterial_id',
  7608. '1' => 'type_id',
  7609. '2' => 'rank',
  7610. ),
  7611. ),
  7612. 'indexes' => array(
  7613. 'biomaterialprop_idx1' => array(
  7614. '0' => 'biomaterial_id',
  7615. ),
  7616. 'biomaterialprop_idx2' => array(
  7617. '0' => 'type_id',
  7618. ),
  7619. ),
  7620. 'foreign keys' => array(
  7621. ),
  7622. );
  7623. return $description;
  7624. }
  7625. /**
  7626. * Implements hook_biomaterial_treatment_schema()
  7627. * Purpose: To describe the structure of biomaterial_treatment to tripal
  7628. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7629. * @see tripal_core.api.inc: tripal_core_chado_update()
  7630. * @see tripal_core.api.inc: tripal_core_chado_select()
  7631. *
  7632. * @return
  7633. * An array describing the current table
  7634. *
  7635. * @ingroup tripal_schema_api
  7636. *
  7637. */
  7638. function tripal_core_chado_biomaterial_treatment_schema () {
  7639. $description = array();
  7640. $description = array(
  7641. 'table' => 'biomaterial_treatment',
  7642. // 'description' => 'TODO: please describe this table!',
  7643. 'fields' => array(
  7644. 'biomaterial_treatment_id' => array(
  7645. // 'description' => 'TODO: please describe this field!',
  7646. 'type' => 'serial',
  7647. 'not null' => '1',
  7648. ),
  7649. 'biomaterial_id' => array(
  7650. // 'description' => 'TODO: please describe this field!',
  7651. 'type' => 'int',
  7652. 'not null' => '1',
  7653. ),
  7654. 'treatment_id' => array(
  7655. // 'description' => 'TODO: please describe this field!',
  7656. 'type' => 'int',
  7657. 'not null' => '1',
  7658. ),
  7659. 'unittype_id' => array(
  7660. // 'description' => 'TODO: please describe this field!',
  7661. 'type' => 'int',
  7662. 'not null' => '',
  7663. ),
  7664. 'value' => array(
  7665. // 'description' => 'TODO: please describe this field!',
  7666. 'type' => 'float',
  7667. 'not null' => '',
  7668. ),
  7669. 'rank' => array(
  7670. // 'description' => 'TODO: please describe this field!',
  7671. 'type' => 'int',
  7672. 'not null' => '1',
  7673. 'default' => '0',
  7674. ),
  7675. ),
  7676. 'primary key' => array(
  7677. '0' => 'biomaterial_treatment_id',
  7678. ),
  7679. 'unique keys' => array(
  7680. 'biomaterial_treatment_c1' => array(
  7681. '0' => 'biomaterial_id',
  7682. '1' => 'treatment_id',
  7683. ),
  7684. ),
  7685. 'indexes' => array(
  7686. 'biomaterial_treatment_idx1' => array(
  7687. '0' => 'biomaterial_id',
  7688. ),
  7689. 'biomaterial_treatment_idx2' => array(
  7690. '0' => 'treatment_id',
  7691. ),
  7692. 'biomaterial_treatment_idx3' => array(
  7693. '0' => 'unittype_id',
  7694. ),
  7695. ),
  7696. 'foreign keys' => array(
  7697. ),
  7698. );
  7699. return $description;
  7700. }
  7701. /**
  7702. * Implements hook_acquisition_relationship_schema()
  7703. * Purpose: To describe the structure of acquisition_relationship to tripal
  7704. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7705. * @see tripal_core.api.inc: tripal_core_chado_update()
  7706. * @see tripal_core.api.inc: tripal_core_chado_select()
  7707. *
  7708. * @return
  7709. * An array describing the current table
  7710. *
  7711. * @ingroup tripal_schema_api
  7712. *
  7713. */
  7714. function tripal_core_chado_acquisition_relationship_schema () {
  7715. $description = array();
  7716. $description = array(
  7717. 'table' => 'acquisition_relationship',
  7718. // 'description' => 'TODO: please describe this table!',
  7719. 'fields' => array(
  7720. 'acquisition_relationship_id' => array(
  7721. // 'description' => 'TODO: please describe this field!',
  7722. 'type' => 'serial',
  7723. 'not null' => '1',
  7724. ),
  7725. 'subject_id' => array(
  7726. // 'description' => 'TODO: please describe this field!',
  7727. 'type' => 'int',
  7728. 'not null' => '1',
  7729. ),
  7730. 'type_id' => array(
  7731. // 'description' => 'TODO: please describe this field!',
  7732. 'type' => 'int',
  7733. 'not null' => '1',
  7734. ),
  7735. 'object_id' => array(
  7736. // 'description' => 'TODO: please describe this field!',
  7737. 'type' => 'int',
  7738. 'not null' => '1',
  7739. ),
  7740. 'value' => array(
  7741. // 'description' => 'TODO: please describe this field!',
  7742. 'type' => 'text',
  7743. 'not null' => '',
  7744. ),
  7745. 'rank' => array(
  7746. // 'description' => 'TODO: please describe this field!',
  7747. 'type' => 'int',
  7748. 'not null' => '1',
  7749. 'default' => '0',
  7750. ),
  7751. ),
  7752. 'primary key' => array(
  7753. '0' => 'acquisition_relationship_id',
  7754. ),
  7755. 'unique keys' => array(
  7756. 'acquisition_relationship_c1' => array(
  7757. '0' => 'subject_id',
  7758. '1' => 'object_id',
  7759. '2' => 'type_id',
  7760. '3' => 'rank',
  7761. ),
  7762. ),
  7763. 'indexes' => array(
  7764. 'acquisition_relationship_idx1' => array(
  7765. '0' => 'subject_id',
  7766. ),
  7767. 'acquisition_relationship_idx2' => array(
  7768. '0' => 'type_id',
  7769. ),
  7770. 'acquisition_relationship_idx3' => array(
  7771. '0' => 'object_id',
  7772. ),
  7773. ),
  7774. 'foreign keys' => array(
  7775. ),
  7776. );
  7777. return $description;
  7778. }
  7779. /**
  7780. * Implements hook_acquisition_schema()
  7781. * Purpose: To describe the structure of acquisition to tripal
  7782. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7783. * @see tripal_core.api.inc: tripal_core_chado_update()
  7784. * @see tripal_core.api.inc: tripal_core_chado_select()
  7785. *
  7786. * @return
  7787. * An array describing the current table
  7788. *
  7789. * @ingroup tripal_schema_api
  7790. *
  7791. */
  7792. function tripal_core_chado_acquisition_schema () {
  7793. $description = array();
  7794. $description = array(
  7795. 'table' => 'acquisition',
  7796. // 'description' => 'TODO: please describe this table!',
  7797. 'fields' => array(
  7798. 'acquisition_id' => array(
  7799. // 'description' => 'TODO: please describe this field!',
  7800. 'type' => 'serial',
  7801. 'not null' => '1',
  7802. ),
  7803. 'assay_id' => array(
  7804. // 'description' => 'TODO: please describe this field!',
  7805. 'type' => 'int',
  7806. 'not null' => '1',
  7807. ),
  7808. 'protocol_id' => array(
  7809. // 'description' => 'TODO: please describe this field!',
  7810. 'type' => 'int',
  7811. 'not null' => '',
  7812. ),
  7813. 'channel_id' => array(
  7814. // 'description' => 'TODO: please describe this field!',
  7815. 'type' => 'int',
  7816. 'not null' => '',
  7817. ),
  7818. 'acquisitiondate' => array(
  7819. // 'description' => 'TODO: please describe this field!',
  7820. 'type' => 'datetime',
  7821. 'not null' => '',
  7822. 'default' => 'ow(',
  7823. ),
  7824. 'name' => array(
  7825. // 'description' => 'TODO: please describe this field!',
  7826. 'type' => 'text',
  7827. 'not null' => '',
  7828. ),
  7829. 'uri' => array(
  7830. // 'description' => 'TODO: please describe this field!',
  7831. 'type' => 'text',
  7832. 'not null' => '',
  7833. ),
  7834. ),
  7835. 'primary key' => array(
  7836. '0' => 'acquisition_id',
  7837. ),
  7838. 'unique keys' => array(
  7839. 'acquisition_c1' => array(
  7840. '0' => 'name',
  7841. ),
  7842. ),
  7843. 'indexes' => array(
  7844. 'acquisition_idx1' => array(
  7845. '0' => 'assay_id',
  7846. ),
  7847. 'acquisition_idx2' => array(
  7848. '0' => 'protocol_id',
  7849. ),
  7850. 'acquisition_idx3' => array(
  7851. '0' => 'channel_id',
  7852. ),
  7853. ),
  7854. 'foreign keys' => array(
  7855. ),
  7856. );
  7857. return $description;
  7858. }
  7859. /**
  7860. * Implements hook_acquisitionprop_schema()
  7861. * Purpose: To describe the structure of acquisitionprop to tripal
  7862. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7863. * @see tripal_core.api.inc: tripal_core_chado_update()
  7864. * @see tripal_core.api.inc: tripal_core_chado_select()
  7865. *
  7866. * @return
  7867. * An array describing the current table
  7868. *
  7869. * @ingroup tripal_schema_api
  7870. *
  7871. */
  7872. function tripal_core_chado_acquisitionprop_schema () {
  7873. $description = array();
  7874. $description = array(
  7875. 'table' => 'acquisitionprop',
  7876. // 'description' => 'TODO: please describe this table!',
  7877. 'fields' => array(
  7878. 'acquisitionprop_id' => array(
  7879. // 'description' => 'TODO: please describe this field!',
  7880. 'type' => 'serial',
  7881. 'not null' => '1',
  7882. ),
  7883. 'acquisition_id' => array(
  7884. // 'description' => 'TODO: please describe this field!',
  7885. 'type' => 'int',
  7886. 'not null' => '1',
  7887. ),
  7888. 'type_id' => array(
  7889. // 'description' => 'TODO: please describe this field!',
  7890. 'type' => 'int',
  7891. 'not null' => '1',
  7892. ),
  7893. 'value' => array(
  7894. // 'description' => 'TODO: please describe this field!',
  7895. 'type' => 'text',
  7896. 'not null' => '',
  7897. ),
  7898. 'rank' => array(
  7899. // 'description' => 'TODO: please describe this field!',
  7900. 'type' => 'int',
  7901. 'not null' => '1',
  7902. 'default' => '0',
  7903. ),
  7904. ),
  7905. 'primary key' => array(
  7906. '0' => 'acquisitionprop_id',
  7907. ),
  7908. 'unique keys' => array(
  7909. 'acquisitionprop_c1' => array(
  7910. '0' => 'acquisition_id',
  7911. '1' => 'type_id',
  7912. '2' => 'rank',
  7913. ),
  7914. ),
  7915. 'indexes' => array(
  7916. 'acquisitionprop_idx1' => array(
  7917. '0' => 'acquisition_id',
  7918. ),
  7919. 'acquisitionprop_idx2' => array(
  7920. '0' => 'type_id',
  7921. ),
  7922. ),
  7923. 'foreign keys' => array(
  7924. ),
  7925. );
  7926. return $description;
  7927. }
  7928. /**
  7929. * Implements hook_all_feature_names_schema()
  7930. * Purpose: To describe the structure of all_feature_names to tripal
  7931. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7932. * @see tripal_core.api.inc: tripal_core_chado_update()
  7933. * @see tripal_core.api.inc: tripal_core_chado_select()
  7934. *
  7935. * @return
  7936. * An array describing the current table
  7937. *
  7938. * @ingroup tripal_schema_api
  7939. *
  7940. */
  7941. function tripal_core_chado_all_feature_names_schema () {
  7942. $description = array();
  7943. $description = array(
  7944. 'table' => 'all_feature_names',
  7945. // 'description' => 'TODO: please describe this table!',
  7946. 'fields' => array(
  7947. 'feature_id' => array(
  7948. // 'description' => 'TODO: please describe this field!',
  7949. 'type' => 'int',
  7950. 'not null' => '',
  7951. ),
  7952. 'name' => array(
  7953. // 'description' => 'TODO: please describe this field!',
  7954. 'type' => 'varchar',
  7955. 'length' => '255',
  7956. 'not null' => '',
  7957. ),
  7958. 'organism_id' => array(
  7959. // 'description' => 'TODO: please describe this field!',
  7960. 'type' => 'int',
  7961. 'not null' => '',
  7962. ),
  7963. ),
  7964. 'primary key' => array(
  7965. ),
  7966. 'unique keys' => array(
  7967. ),
  7968. 'indexes' => array(
  7969. ),
  7970. 'foreign keys' => array(
  7971. ),
  7972. );
  7973. return $description;
  7974. }
  7975. /**
  7976. * Implements hook_analysis_schema()
  7977. * Purpose: To describe the structure of analysis to tripal
  7978. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7979. * @see tripal_core.api.inc: tripal_core_chado_update()
  7980. * @see tripal_core.api.inc: tripal_core_chado_select()
  7981. *
  7982. * @return
  7983. * An array describing the current table
  7984. *
  7985. * @ingroup tripal_schema_api
  7986. *
  7987. */
  7988. function tripal_core_chado_analysis_schema () {
  7989. $description = array();
  7990. $description = array(
  7991. 'table' => 'analysis',
  7992. // 'description' => 'TODO: please describe this table!',
  7993. 'fields' => array(
  7994. 'analysis_id' => array(
  7995. // 'description' => 'TODO: please describe this field!',
  7996. 'type' => 'serial',
  7997. 'not null' => '1',
  7998. ),
  7999. 'name' => array(
  8000. // 'description' => 'TODO: please describe this field!',
  8001. 'type' => 'varchar',
  8002. 'length' => '255',
  8003. 'not null' => '',
  8004. ),
  8005. 'description' => array(
  8006. // 'description' => 'TODO: please describe this field!',
  8007. 'type' => 'text',
  8008. 'not null' => '',
  8009. ),
  8010. 'program' => array(
  8011. // 'description' => 'TODO: please describe this field!',
  8012. 'type' => 'varchar',
  8013. 'length' => '255',
  8014. 'not null' => '1',
  8015. ),
  8016. 'programversion' => array(
  8017. // 'description' => 'TODO: please describe this field!',
  8018. 'type' => 'varchar',
  8019. 'length' => '255',
  8020. 'not null' => '1',
  8021. ),
  8022. 'algorithm' => array(
  8023. // 'description' => 'TODO: please describe this field!',
  8024. 'type' => 'varchar',
  8025. 'length' => '255',
  8026. 'not null' => '',
  8027. ),
  8028. 'sourcename' => array(
  8029. // 'description' => 'TODO: please describe this field!',
  8030. 'type' => 'varchar',
  8031. 'length' => '255',
  8032. 'not null' => '',
  8033. ),
  8034. 'sourceversion' => array(
  8035. // 'description' => 'TODO: please describe this field!',
  8036. 'type' => 'varchar',
  8037. 'length' => '255',
  8038. 'not null' => '',
  8039. ),
  8040. 'sourceuri' => array(
  8041. // 'description' => 'TODO: please describe this field!',
  8042. 'type' => 'text',
  8043. 'not null' => '',
  8044. ),
  8045. 'timeexecuted' => array(
  8046. // 'description' => 'TODO: please describe this field!',
  8047. 'type' => 'datetime',
  8048. 'not null' => '1',
  8049. 'default' => 'ow(',
  8050. ),
  8051. ),
  8052. 'primary key' => array(
  8053. '0' => 'analysis_id',
  8054. ),
  8055. 'unique keys' => array(
  8056. 'analysis_c1' => array(
  8057. '0' => 'program',
  8058. '1' => 'programversion',
  8059. '2' => 'sourcename',
  8060. ),
  8061. ),
  8062. 'indexes' => array(
  8063. ),
  8064. 'foreign keys' => array(
  8065. ),
  8066. );
  8067. return $description;
  8068. }
  8069. /**
  8070. * Implements hook_analysisfeature_schema()
  8071. * Purpose: To describe the structure of analysisfeature to tripal
  8072. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8073. * @see tripal_core.api.inc: tripal_core_chado_update()
  8074. * @see tripal_core.api.inc: tripal_core_chado_select()
  8075. *
  8076. * @return
  8077. * An array describing the current table
  8078. *
  8079. * @ingroup tripal_schema_api
  8080. *
  8081. */
  8082. function tripal_core_chado_analysisfeature_schema () {
  8083. $description = array();
  8084. $description = array(
  8085. 'table' => 'analysisfeature',
  8086. // 'description' => 'TODO: please describe this table!',
  8087. 'fields' => array(
  8088. 'analysisfeature_id' => array(
  8089. // 'description' => 'TODO: please describe this field!',
  8090. 'type' => 'serial',
  8091. 'not null' => '1',
  8092. ),
  8093. 'feature_id' => array(
  8094. // 'description' => 'TODO: please describe this field!',
  8095. 'type' => 'int',
  8096. 'not null' => '1',
  8097. ),
  8098. 'analysis_id' => array(
  8099. // 'description' => 'TODO: please describe this field!',
  8100. 'type' => 'int',
  8101. 'not null' => '1',
  8102. ),
  8103. 'rawscore' => array(
  8104. // 'description' => 'TODO: please describe this field!',
  8105. 'type' => 'float',
  8106. 'size' => 'big',
  8107. 'not null' => '',
  8108. ),
  8109. 'normscore' => array(
  8110. // 'description' => 'TODO: please describe this field!',
  8111. 'type' => 'float',
  8112. 'size' => 'big',
  8113. 'not null' => '',
  8114. ),
  8115. 'significance' => array(
  8116. // 'description' => 'TODO: please describe this field!',
  8117. 'type' => 'float',
  8118. 'size' => 'big',
  8119. 'not null' => '',
  8120. ),
  8121. 'identity' => array(
  8122. // 'description' => 'TODO: please describe this field!',
  8123. 'type' => 'float',
  8124. 'size' => 'big',
  8125. 'not null' => '',
  8126. ),
  8127. ),
  8128. 'primary key' => array(
  8129. '0' => 'analysisfeature_id',
  8130. ),
  8131. 'unique keys' => array(
  8132. 'analysisfeature_c1' => array(
  8133. '0' => 'feature_id',
  8134. '1' => 'analysis_id',
  8135. ),
  8136. ),
  8137. 'indexes' => array(
  8138. 'analysisfeature_idx1' => array(
  8139. '0' => 'feature_id',
  8140. ),
  8141. 'analysisfeature_idx2' => array(
  8142. '0' => 'analysis_id',
  8143. ),
  8144. ),
  8145. 'foreign keys' => array(
  8146. ),
  8147. );
  8148. return $description;
  8149. }
  8150. /**
  8151. * Implements hook_analysisfeatureprop_schema()
  8152. * Purpose: To describe the structure of analysisfeatureprop to tripal
  8153. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8154. * @see tripal_core.api.inc: tripal_core_chado_update()
  8155. * @see tripal_core.api.inc: tripal_core_chado_select()
  8156. *
  8157. * @return
  8158. * An array describing the current table
  8159. *
  8160. * @ingroup tripal_schema_api
  8161. *
  8162. */
  8163. function tripal_core_chado_analysisfeatureprop_schema () {
  8164. $description = array();
  8165. $description = array(
  8166. 'table' => 'analysisfeatureprop',
  8167. // 'description' => 'TODO: please describe this table!',
  8168. 'fields' => array(
  8169. 'analysisfeatureprop_id' => array(
  8170. // 'description' => 'TODO: please describe this field!',
  8171. 'type' => 'serial',
  8172. 'not null' => '1',
  8173. ),
  8174. 'analysisfeature_id' => array(
  8175. // 'description' => 'TODO: please describe this field!',
  8176. 'type' => 'int',
  8177. 'not null' => '1',
  8178. ),
  8179. 'type_id' => array(
  8180. // 'description' => 'TODO: please describe this field!',
  8181. 'type' => 'int',
  8182. 'not null' => '1',
  8183. ),
  8184. 'value' => array(
  8185. // 'description' => 'TODO: please describe this field!',
  8186. 'type' => 'text',
  8187. 'not null' => '',
  8188. ),
  8189. 'rank' => array(
  8190. // 'description' => 'TODO: please describe this field!',
  8191. 'type' => 'int',
  8192. 'not null' => '1',
  8193. ),
  8194. ),
  8195. 'primary key' => array(
  8196. '0' => 'analysisfeatureprop_id',
  8197. ),
  8198. 'unique keys' => array(
  8199. 'analysisfeature_id_type_id_rank' => array(
  8200. '0' => 'analysisfeature_id',
  8201. '1' => 'type_id',
  8202. '2' => 'rank',
  8203. ),
  8204. ),
  8205. 'indexes' => array(
  8206. ),
  8207. 'foreign keys' => array(
  8208. ),
  8209. );
  8210. return $description;
  8211. }
  8212. /**
  8213. * Implements hook_assayprop_schema()
  8214. * Purpose: To describe the structure of assayprop to tripal
  8215. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8216. * @see tripal_core.api.inc: tripal_core_chado_update()
  8217. * @see tripal_core.api.inc: tripal_core_chado_select()
  8218. *
  8219. * @return
  8220. * An array describing the current table
  8221. *
  8222. * @ingroup tripal_schema_api
  8223. *
  8224. */
  8225. function tripal_core_chado_assayprop_schema () {
  8226. $description = array();
  8227. $description = array(
  8228. 'table' => 'assayprop',
  8229. // 'description' => 'TODO: please describe this table!',
  8230. 'fields' => array(
  8231. 'assayprop_id' => array(
  8232. // 'description' => 'TODO: please describe this field!',
  8233. 'type' => 'serial',
  8234. 'not null' => '1',
  8235. ),
  8236. 'assay_id' => array(
  8237. // 'description' => 'TODO: please describe this field!',
  8238. 'type' => 'int',
  8239. 'not null' => '1',
  8240. ),
  8241. 'type_id' => array(
  8242. // 'description' => 'TODO: please describe this field!',
  8243. 'type' => 'int',
  8244. 'not null' => '1',
  8245. ),
  8246. 'value' => array(
  8247. // 'description' => 'TODO: please describe this field!',
  8248. 'type' => 'text',
  8249. 'not null' => '',
  8250. ),
  8251. 'rank' => array(
  8252. // 'description' => 'TODO: please describe this field!',
  8253. 'type' => 'int',
  8254. 'not null' => '1',
  8255. 'default' => '0',
  8256. ),
  8257. ),
  8258. 'primary key' => array(
  8259. '0' => 'assayprop_id',
  8260. ),
  8261. 'unique keys' => array(
  8262. 'assayprop_c1' => array(
  8263. '0' => 'assay_id',
  8264. '1' => 'type_id',
  8265. '2' => 'rank',
  8266. ),
  8267. ),
  8268. 'indexes' => array(
  8269. 'assayprop_idx1' => array(
  8270. '0' => 'assay_id',
  8271. ),
  8272. 'assayprop_idx2' => array(
  8273. '0' => 'type_id',
  8274. ),
  8275. ),
  8276. 'foreign keys' => array(
  8277. ),
  8278. );
  8279. return $description;
  8280. }
  8281. /**
  8282. * Implements hook_biomaterial_schema()
  8283. * Purpose: To describe the structure of biomaterial to tripal
  8284. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8285. * @see tripal_core.api.inc: tripal_core_chado_update()
  8286. * @see tripal_core.api.inc: tripal_core_chado_select()
  8287. *
  8288. * @return
  8289. * An array describing the current table
  8290. *
  8291. * @ingroup tripal_schema_api
  8292. *
  8293. */
  8294. function tripal_core_chado_biomaterial_schema () {
  8295. $description = array();
  8296. $description = array(
  8297. 'table' => 'biomaterial',
  8298. // 'description' => 'TODO: please describe this table!',
  8299. 'fields' => array(
  8300. 'biomaterial_id' => array(
  8301. // 'description' => 'TODO: please describe this field!',
  8302. 'type' => 'serial',
  8303. 'not null' => '1',
  8304. ),
  8305. 'taxon_id' => array(
  8306. // 'description' => 'TODO: please describe this field!',
  8307. 'type' => 'int',
  8308. 'not null' => '',
  8309. ),
  8310. 'biosourceprovider_id' => array(
  8311. // 'description' => 'TODO: please describe this field!',
  8312. 'type' => 'int',
  8313. 'not null' => '',
  8314. ),
  8315. 'dbxref_id' => array(
  8316. // 'description' => 'TODO: please describe this field!',
  8317. 'type' => 'int',
  8318. 'not null' => '',
  8319. ),
  8320. 'name' => array(
  8321. // 'description' => 'TODO: please describe this field!',
  8322. 'type' => 'text',
  8323. 'not null' => '',
  8324. ),
  8325. 'description' => array(
  8326. // 'description' => 'TODO: please describe this field!',
  8327. 'type' => 'text',
  8328. 'not null' => '',
  8329. ),
  8330. ),
  8331. 'primary key' => array(
  8332. '0' => 'biomaterial_id',
  8333. ),
  8334. 'unique keys' => array(
  8335. 'biomaterial_c1' => array(
  8336. '0' => 'name',
  8337. ),
  8338. ),
  8339. 'indexes' => array(
  8340. 'biomaterial_idx1' => array(
  8341. '0' => 'taxon_id',
  8342. ),
  8343. 'biomaterial_idx2' => array(
  8344. '0' => 'biosourceprovider_id',
  8345. ),
  8346. 'biomaterial_idx3' => array(
  8347. '0' => 'dbxref_id',
  8348. ),
  8349. ),
  8350. 'foreign keys' => array(
  8351. ),
  8352. );
  8353. return $description;
  8354. }
  8355. /**
  8356. * Implements hook_biomaterial_dbxref_schema()
  8357. * Purpose: To describe the structure of biomaterial_dbxref to tripal
  8358. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8359. * @see tripal_core.api.inc: tripal_core_chado_update()
  8360. * @see tripal_core.api.inc: tripal_core_chado_select()
  8361. *
  8362. * @return
  8363. * An array describing the current table
  8364. *
  8365. * @ingroup tripal_schema_api
  8366. *
  8367. */
  8368. function tripal_core_chado_biomaterial_dbxref_schema () {
  8369. $description = array();
  8370. $description = array(
  8371. 'table' => 'biomaterial_dbxref',
  8372. // 'description' => 'TODO: please describe this table!',
  8373. 'fields' => array(
  8374. 'biomaterial_dbxref_id' => array(
  8375. // 'description' => 'TODO: please describe this field!',
  8376. 'type' => 'serial',
  8377. 'not null' => '1',
  8378. ),
  8379. 'biomaterial_id' => array(
  8380. // 'description' => 'TODO: please describe this field!',
  8381. 'type' => 'int',
  8382. 'not null' => '1',
  8383. ),
  8384. 'dbxref_id' => array(
  8385. // 'description' => 'TODO: please describe this field!',
  8386. 'type' => 'int',
  8387. 'not null' => '1',
  8388. ),
  8389. ),
  8390. 'primary key' => array(
  8391. '0' => 'biomaterial_dbxref_id',
  8392. ),
  8393. 'unique keys' => array(
  8394. 'biomaterial_dbxref_c1' => array(
  8395. '0' => 'biomaterial_id',
  8396. '1' => 'dbxref_id',
  8397. ),
  8398. ),
  8399. 'indexes' => array(
  8400. 'biomaterial_dbxref_idx1' => array(
  8401. '0' => 'biomaterial_id',
  8402. ),
  8403. 'biomaterial_dbxref_idx2' => array(
  8404. '0' => 'dbxref_id',
  8405. ),
  8406. ),
  8407. 'foreign keys' => array(
  8408. ),
  8409. );
  8410. return $description;
  8411. }
  8412. /**
  8413. * Implements hook_biomaterial_relationship_schema()
  8414. * Purpose: To describe the structure of biomaterial_relationship to tripal
  8415. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8416. * @see tripal_core.api.inc: tripal_core_chado_update()
  8417. * @see tripal_core.api.inc: tripal_core_chado_select()
  8418. *
  8419. * @return
  8420. * An array describing the current table
  8421. *
  8422. * @ingroup tripal_schema_api
  8423. *
  8424. */
  8425. function tripal_core_chado_biomaterial_relationship_schema () {
  8426. $description = array();
  8427. $description = array(
  8428. 'table' => 'biomaterial_relationship',
  8429. // 'description' => 'TODO: please describe this table!',
  8430. 'fields' => array(
  8431. 'biomaterial_relationship_id' => array(
  8432. // 'description' => 'TODO: please describe this field!',
  8433. 'type' => 'serial',
  8434. 'not null' => '1',
  8435. ),
  8436. 'subject_id' => array(
  8437. // 'description' => 'TODO: please describe this field!',
  8438. 'type' => 'int',
  8439. 'not null' => '1',
  8440. ),
  8441. 'type_id' => array(
  8442. // 'description' => 'TODO: please describe this field!',
  8443. 'type' => 'int',
  8444. 'not null' => '1',
  8445. ),
  8446. 'object_id' => array(
  8447. // 'description' => 'TODO: please describe this field!',
  8448. 'type' => 'int',
  8449. 'not null' => '1',
  8450. ),
  8451. ),
  8452. 'primary key' => array(
  8453. '0' => 'biomaterial_relationship_id',
  8454. ),
  8455. 'unique keys' => array(
  8456. 'biomaterial_relationship_c1' => array(
  8457. '0' => 'subject_id',
  8458. '1' => 'object_id',
  8459. '2' => 'type_id',
  8460. ),
  8461. ),
  8462. 'indexes' => array(
  8463. 'biomaterial_relationship_idx1' => array(
  8464. '0' => 'subject_id',
  8465. ),
  8466. 'biomaterial_relationship_idx2' => array(
  8467. '0' => 'object_id',
  8468. ),
  8469. 'biomaterial_relationship_idx3' => array(
  8470. '0' => 'type_id',
  8471. ),
  8472. ),
  8473. 'foreign keys' => array(
  8474. ),
  8475. );
  8476. return $description;
  8477. }
  8478. /**
  8479. * Implements hook_assay_project_schema()
  8480. * Purpose: To describe the structure of assay_project to tripal
  8481. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8482. * @see tripal_core.api.inc: tripal_core_chado_update()
  8483. * @see tripal_core.api.inc: tripal_core_chado_select()
  8484. *
  8485. * @return
  8486. * An array describing the current table
  8487. *
  8488. * @ingroup tripal_schema_api
  8489. *
  8490. */
  8491. function tripal_core_chado_assay_project_schema () {
  8492. $description = array();
  8493. $description = array(
  8494. 'table' => 'assay_project',
  8495. // 'description' => 'TODO: please describe this table!',
  8496. 'fields' => array(
  8497. 'assay_project_id' => array(
  8498. // 'description' => 'TODO: please describe this field!',
  8499. 'type' => 'serial',
  8500. 'not null' => '1',
  8501. ),
  8502. 'assay_id' => array(
  8503. // 'description' => 'TODO: please describe this field!',
  8504. 'type' => 'int',
  8505. 'not null' => '1',
  8506. ),
  8507. 'project_id' => array(
  8508. // 'description' => 'TODO: please describe this field!',
  8509. 'type' => 'int',
  8510. 'not null' => '1',
  8511. ),
  8512. ),
  8513. 'primary key' => array(
  8514. '0' => 'assay_project_id',
  8515. ),
  8516. 'unique keys' => array(
  8517. 'assay_project_c1' => array(
  8518. '0' => 'assay_id',
  8519. '1' => 'project_id',
  8520. ),
  8521. ),
  8522. 'indexes' => array(
  8523. 'assay_project_idx1' => array(
  8524. '0' => 'assay_id',
  8525. ),
  8526. 'assay_project_idx2' => array(
  8527. '0' => 'project_id',
  8528. ),
  8529. ),
  8530. 'foreign keys' => array(
  8531. ),
  8532. );
  8533. return $description;
  8534. }
  8535. /**
  8536. * Implements hook_assay_biomaterial_schema()
  8537. * Purpose: To describe the structure of assay_biomaterial to tripal
  8538. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8539. * @see tripal_core.api.inc: tripal_core_chado_update()
  8540. * @see tripal_core.api.inc: tripal_core_chado_select()
  8541. *
  8542. * @return
  8543. * An array describing the current table
  8544. *
  8545. * @ingroup tripal_schema_api
  8546. *
  8547. */
  8548. function tripal_core_chado_assay_biomaterial_schema () {
  8549. $description = array();
  8550. $description = array(
  8551. 'table' => 'assay_biomaterial',
  8552. // 'description' => 'TODO: please describe this table!',
  8553. 'fields' => array(
  8554. 'assay_biomaterial_id' => array(
  8555. // 'description' => 'TODO: please describe this field!',
  8556. 'type' => 'serial',
  8557. 'not null' => '1',
  8558. ),
  8559. 'assay_id' => array(
  8560. // 'description' => 'TODO: please describe this field!',
  8561. 'type' => 'int',
  8562. 'not null' => '1',
  8563. ),
  8564. 'biomaterial_id' => array(
  8565. // 'description' => 'TODO: please describe this field!',
  8566. 'type' => 'int',
  8567. 'not null' => '1',
  8568. ),
  8569. 'channel_id' => array(
  8570. // 'description' => 'TODO: please describe this field!',
  8571. 'type' => 'int',
  8572. 'not null' => '',
  8573. ),
  8574. 'rank' => array(
  8575. // 'description' => 'TODO: please describe this field!',
  8576. 'type' => 'int',
  8577. 'not null' => '1',
  8578. 'default' => '0',
  8579. ),
  8580. ),
  8581. 'primary key' => array(
  8582. '0' => 'assay_biomaterial_id',
  8583. ),
  8584. 'unique keys' => array(
  8585. 'assay_biomaterial_c1' => array(
  8586. '0' => 'assay_id',
  8587. '1' => 'biomaterial_id',
  8588. '2' => 'channel_id',
  8589. '3' => 'rank',
  8590. ),
  8591. ),
  8592. 'indexes' => array(
  8593. 'assay_biomaterial_idx1' => array(
  8594. '0' => 'assay_id',
  8595. ),
  8596. 'assay_biomaterial_idx2' => array(
  8597. '0' => 'biomaterial_id',
  8598. ),
  8599. 'assay_biomaterial_idx3' => array(
  8600. '0' => 'channel_id',
  8601. ),
  8602. ),
  8603. 'foreign keys' => array(
  8604. ),
  8605. );
  8606. return $description;
  8607. }
  8608. /**
  8609. * Implements hook_analysisprop_schema()
  8610. * Purpose: To describe the structure of analysisprop to tripal
  8611. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8612. * @see tripal_core.api.inc: tripal_core_chado_update()
  8613. * @see tripal_core.api.inc: tripal_core_chado_select()
  8614. *
  8615. * @return
  8616. * An array describing the current table
  8617. *
  8618. * @ingroup tripal_schema_api
  8619. *
  8620. */
  8621. function tripal_core_chado_analysisprop_schema () {
  8622. $description = array();
  8623. $description = array(
  8624. 'table' => 'analysisprop',
  8625. // 'description' => 'TODO: please describe this table!',
  8626. 'fields' => array(
  8627. 'analysisprop_id' => array(
  8628. // 'description' => 'TODO: please describe this field!',
  8629. 'type' => 'serial',
  8630. 'not null' => '1',
  8631. ),
  8632. 'analysis_id' => array(
  8633. // 'description' => 'TODO: please describe this field!',
  8634. 'type' => 'int',
  8635. 'not null' => '1',
  8636. ),
  8637. 'type_id' => array(
  8638. // 'description' => 'TODO: please describe this field!',
  8639. 'type' => 'int',
  8640. 'not null' => '1',
  8641. ),
  8642. 'value' => array(
  8643. // 'description' => 'TODO: please describe this field!',
  8644. 'type' => 'text',
  8645. 'not null' => '',
  8646. ),
  8647. ),
  8648. 'primary key' => array(
  8649. '0' => 'analysisprop_id',
  8650. ),
  8651. 'unique keys' => array(
  8652. 'analysisprop_c1' => array(
  8653. '0' => 'analysis_id',
  8654. '1' => 'type_id',
  8655. ),
  8656. ),
  8657. 'indexes' => array(
  8658. 'analysisprop_idx1' => array(
  8659. '0' => 'analysis_id',
  8660. ),
  8661. 'analysisprop_idx2' => array(
  8662. '0' => 'type_id',
  8663. ),
  8664. ),
  8665. 'foreign keys' => array(
  8666. ),
  8667. );
  8668. return $description;
  8669. }
  8670. /**
  8671. * Implements hook_arraydesign_schema()
  8672. * Purpose: To describe the structure of arraydesign to tripal
  8673. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8674. * @see tripal_core.api.inc: tripal_core_chado_update()
  8675. * @see tripal_core.api.inc: tripal_core_chado_select()
  8676. *
  8677. * @return
  8678. * An array describing the current table
  8679. *
  8680. * @ingroup tripal_schema_api
  8681. *
  8682. */
  8683. function tripal_core_chado_arraydesign_schema () {
  8684. $description = array();
  8685. $description = array(
  8686. 'table' => 'arraydesign',
  8687. // 'description' => 'TODO: please describe this table!',
  8688. 'fields' => array(
  8689. 'arraydesign_id' => array(
  8690. // 'description' => 'TODO: please describe this field!',
  8691. 'type' => 'serial',
  8692. 'not null' => '1',
  8693. ),
  8694. 'manufacturer_id' => array(
  8695. // 'description' => 'TODO: please describe this field!',
  8696. 'type' => 'int',
  8697. 'not null' => '1',
  8698. ),
  8699. 'platformtype_id' => array(
  8700. // 'description' => 'TODO: please describe this field!',
  8701. 'type' => 'int',
  8702. 'not null' => '1',
  8703. ),
  8704. 'substratetype_id' => array(
  8705. // 'description' => 'TODO: please describe this field!',
  8706. 'type' => 'int',
  8707. 'not null' => '',
  8708. ),
  8709. 'protocol_id' => array(
  8710. // 'description' => 'TODO: please describe this field!',
  8711. 'type' => 'int',
  8712. 'not null' => '',
  8713. ),
  8714. 'dbxref_id' => array(
  8715. // 'description' => 'TODO: please describe this field!',
  8716. 'type' => 'int',
  8717. 'not null' => '',
  8718. ),
  8719. 'name' => array(
  8720. // 'description' => 'TODO: please describe this field!',
  8721. 'type' => 'text',
  8722. 'not null' => '1',
  8723. ),
  8724. 'version' => array(
  8725. // 'description' => 'TODO: please describe this field!',
  8726. 'type' => 'text',
  8727. 'not null' => '',
  8728. ),
  8729. 'description' => array(
  8730. // 'description' => 'TODO: please describe this field!',
  8731. 'type' => 'text',
  8732. 'not null' => '',
  8733. ),
  8734. 'array_dimensions' => array(
  8735. // 'description' => 'TODO: please describe this field!',
  8736. 'type' => 'text',
  8737. 'not null' => '',
  8738. ),
  8739. 'element_dimensions' => array(
  8740. // 'description' => 'TODO: please describe this field!',
  8741. 'type' => 'text',
  8742. 'not null' => '',
  8743. ),
  8744. 'num_of_elements' => array(
  8745. // 'description' => 'TODO: please describe this field!',
  8746. 'type' => 'int',
  8747. 'not null' => '',
  8748. ),
  8749. 'num_array_columns' => array(
  8750. // 'description' => 'TODO: please describe this field!',
  8751. 'type' => 'int',
  8752. 'not null' => '',
  8753. ),
  8754. 'num_array_rows' => array(
  8755. // 'description' => 'TODO: please describe this field!',
  8756. 'type' => 'int',
  8757. 'not null' => '',
  8758. ),
  8759. 'num_grid_columns' => array(
  8760. // 'description' => 'TODO: please describe this field!',
  8761. 'type' => 'int',
  8762. 'not null' => '',
  8763. ),
  8764. 'num_grid_rows' => array(
  8765. // 'description' => 'TODO: please describe this field!',
  8766. 'type' => 'int',
  8767. 'not null' => '',
  8768. ),
  8769. 'num_sub_columns' => array(
  8770. // 'description' => 'TODO: please describe this field!',
  8771. 'type' => 'int',
  8772. 'not null' => '',
  8773. ),
  8774. 'num_sub_rows' => array(
  8775. // 'description' => 'TODO: please describe this field!',
  8776. 'type' => 'int',
  8777. 'not null' => '',
  8778. ),
  8779. ),
  8780. 'primary key' => array(
  8781. '0' => 'arraydesign_id',
  8782. ),
  8783. 'unique keys' => array(
  8784. 'arraydesign_c1' => array(
  8785. '0' => 'name',
  8786. ),
  8787. ),
  8788. 'indexes' => array(
  8789. 'arraydesign_idx1' => array(
  8790. '0' => 'manufacturer_id',
  8791. ),
  8792. 'arraydesign_idx2' => array(
  8793. '0' => 'platformtype_id',
  8794. ),
  8795. 'arraydesign_idx3' => array(
  8796. '0' => 'substratetype_id',
  8797. ),
  8798. 'arraydesign_idx4' => array(
  8799. '0' => 'protocol_id',
  8800. ),
  8801. 'arraydesign_idx5' => array(
  8802. '0' => 'dbxref_id',
  8803. ),
  8804. ),
  8805. 'foreign keys' => array(
  8806. ),
  8807. );
  8808. return $description;
  8809. }
  8810. /**
  8811. * Implements hook_arraydesignprop_schema()
  8812. * Purpose: To describe the structure of arraydesignprop to tripal
  8813. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8814. * @see tripal_core.api.inc: tripal_core_chado_update()
  8815. * @see tripal_core.api.inc: tripal_core_chado_select()
  8816. *
  8817. * @return
  8818. * An array describing the current table
  8819. *
  8820. * @ingroup tripal_schema_api
  8821. *
  8822. */
  8823. function tripal_core_chado_arraydesignprop_schema () {
  8824. $description = array();
  8825. $description = array(
  8826. 'table' => 'arraydesignprop',
  8827. // 'description' => 'TODO: please describe this table!',
  8828. 'fields' => array(
  8829. 'arraydesignprop_id' => array(
  8830. // 'description' => 'TODO: please describe this field!',
  8831. 'type' => 'serial',
  8832. 'not null' => '1',
  8833. ),
  8834. 'arraydesign_id' => array(
  8835. // 'description' => 'TODO: please describe this field!',
  8836. 'type' => 'int',
  8837. 'not null' => '1',
  8838. ),
  8839. 'type_id' => array(
  8840. // 'description' => 'TODO: please describe this field!',
  8841. 'type' => 'int',
  8842. 'not null' => '1',
  8843. ),
  8844. 'value' => array(
  8845. // 'description' => 'TODO: please describe this field!',
  8846. 'type' => 'text',
  8847. 'not null' => '',
  8848. ),
  8849. 'rank' => array(
  8850. // 'description' => 'TODO: please describe this field!',
  8851. 'type' => 'int',
  8852. 'not null' => '1',
  8853. 'default' => '0',
  8854. ),
  8855. ),
  8856. 'primary key' => array(
  8857. '0' => 'arraydesignprop_id',
  8858. ),
  8859. 'unique keys' => array(
  8860. 'arraydesignprop_c1' => array(
  8861. '0' => 'arraydesign_id',
  8862. '1' => 'type_id',
  8863. '2' => 'rank',
  8864. ),
  8865. ),
  8866. 'indexes' => array(
  8867. 'arraydesignprop_idx1' => array(
  8868. '0' => 'arraydesign_id',
  8869. ),
  8870. 'arraydesignprop_idx2' => array(
  8871. '0' => 'type_id',
  8872. ),
  8873. ),
  8874. 'foreign keys' => array(
  8875. ),
  8876. );
  8877. return $description;
  8878. }
  8879. /**
  8880. * Implements hook_assay_schema()
  8881. * Purpose: To describe the structure of assay to tripal
  8882. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8883. * @see tripal_core.api.inc: tripal_core_chado_update()
  8884. * @see tripal_core.api.inc: tripal_core_chado_select()
  8885. *
  8886. * @return
  8887. * An array describing the current table
  8888. *
  8889. * @ingroup tripal_schema_api
  8890. *
  8891. */
  8892. function tripal_core_chado_assay_schema () {
  8893. $description = array();
  8894. $description = array(
  8895. 'table' => 'assay',
  8896. // 'description' => 'TODO: please describe this table!',
  8897. 'fields' => array(
  8898. 'assay_id' => array(
  8899. // 'description' => 'TODO: please describe this field!',
  8900. 'type' => 'serial',
  8901. 'not null' => '1',
  8902. ),
  8903. 'arraydesign_id' => array(
  8904. // 'description' => 'TODO: please describe this field!',
  8905. 'type' => 'int',
  8906. 'not null' => '1',
  8907. ),
  8908. 'protocol_id' => array(
  8909. // 'description' => 'TODO: please describe this field!',
  8910. 'type' => 'int',
  8911. 'not null' => '',
  8912. ),
  8913. 'assaydate' => array(
  8914. // 'description' => 'TODO: please describe this field!',
  8915. 'type' => 'datetime',
  8916. 'not null' => '',
  8917. 'default' => 'ow(',
  8918. ),
  8919. 'arrayidentifier' => array(
  8920. // 'description' => 'TODO: please describe this field!',
  8921. 'type' => 'text',
  8922. 'not null' => '',
  8923. ),
  8924. 'arraybatchidentifier' => array(
  8925. // 'description' => 'TODO: please describe this field!',
  8926. 'type' => 'text',
  8927. 'not null' => '',
  8928. ),
  8929. 'operator_id' => array(
  8930. // 'description' => 'TODO: please describe this field!',
  8931. 'type' => 'int',
  8932. 'not null' => '1',
  8933. ),
  8934. 'dbxref_id' => array(
  8935. // 'description' => 'TODO: please describe this field!',
  8936. 'type' => 'int',
  8937. 'not null' => '',
  8938. ),
  8939. 'name' => array(
  8940. // 'description' => 'TODO: please describe this field!',
  8941. 'type' => 'text',
  8942. 'not null' => '',
  8943. ),
  8944. 'description' => array(
  8945. // 'description' => 'TODO: please describe this field!',
  8946. 'type' => 'text',
  8947. 'not null' => '',
  8948. ),
  8949. ),
  8950. 'primary key' => array(
  8951. '0' => 'assay_id',
  8952. ),
  8953. 'unique keys' => array(
  8954. 'assay_c1' => array(
  8955. '0' => 'name',
  8956. ),
  8957. ),
  8958. 'indexes' => array(
  8959. 'assay_idx1' => array(
  8960. '0' => 'arraydesign_id',
  8961. ),
  8962. 'assay_idx2' => array(
  8963. '0' => 'protocol_id',
  8964. ),
  8965. 'assay_idx3' => array(
  8966. '0' => 'operator_id',
  8967. ),
  8968. 'assay_idx4' => array(
  8969. '0' => 'dbxref_id',
  8970. ),
  8971. ),
  8972. 'foreign keys' => array(
  8973. ),
  8974. );
  8975. return $description;
  8976. }
  8977. /**
  8978. * Implements hook_cv_root_schema()
  8979. * Purpose: To describe the structure of cv_root 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. * @ingroup tripal_schema_api
  8988. *
  8989. */
  8990. function tripal_core_chado_cv_root_schema () {
  8991. $description = array();
  8992. $description = array(
  8993. 'table' => 'cv_root',
  8994. // 'description' => 'TODO: please describe this table!',
  8995. 'fields' => array(
  8996. 'cv_id' => array(
  8997. // 'description' => 'TODO: please describe this field!',
  8998. 'type' => 'int',
  8999. 'not null' => '',
  9000. ),
  9001. 'root_cvterm_id' => array(
  9002. // 'description' => 'TODO: please describe this field!',
  9003. 'type' => 'int',
  9004. 'not null' => '',
  9005. ),
  9006. ),
  9007. 'primary key' => array(
  9008. ),
  9009. 'unique keys' => array(
  9010. ),
  9011. 'indexes' => array(
  9012. ),
  9013. 'foreign keys' => array(
  9014. ),
  9015. );
  9016. return $description;
  9017. }
  9018. /**
  9019. * Implements hook_cvterm_schema()
  9020. * Purpose: To describe the structure of cvterm to tripal
  9021. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9022. * @see tripal_core.api.inc: tripal_core_chado_update()
  9023. * @see tripal_core.api.inc: tripal_core_chado_select()
  9024. *
  9025. * @return
  9026. * An array describing the current table
  9027. *
  9028. * @ingroup tripal_schema_api
  9029. *
  9030. */
  9031. function tripal_core_chado_cvterm_schema () {
  9032. $description = array();
  9033. $description = array(
  9034. 'table' => 'cvterm',
  9035. // 'description' => 'TODO: please describe this table!',
  9036. 'fields' => array(
  9037. 'cvterm_id' => array(
  9038. // 'description' => 'TODO: please describe this field!',
  9039. 'type' => 'serial',
  9040. 'not null' => '1',
  9041. ),
  9042. 'cv_id' => array(
  9043. // 'description' => 'TODO: please describe this field!',
  9044. 'type' => 'int',
  9045. 'not null' => '1',
  9046. ),
  9047. 'name' => array(
  9048. // 'description' => 'TODO: please describe this field!',
  9049. 'type' => 'varchar',
  9050. 'length' => '1024',
  9051. 'not null' => '1',
  9052. ),
  9053. 'definition' => array(
  9054. // 'description' => 'TODO: please describe this field!',
  9055. 'type' => 'text',
  9056. 'not null' => '',
  9057. ),
  9058. 'dbxref_id' => array(
  9059. // 'description' => 'TODO: please describe this field!',
  9060. 'type' => 'int',
  9061. 'not null' => '1',
  9062. ),
  9063. 'is_obsolete' => array(
  9064. // 'description' => 'TODO: please describe this field!',
  9065. 'type' => 'int',
  9066. 'not null' => '1',
  9067. 'default' => '0',
  9068. ),
  9069. 'is_relationshiptype' => array(
  9070. // 'description' => 'TODO: please describe this field!',
  9071. 'type' => 'int',
  9072. 'not null' => '1',
  9073. 'default' => '0',
  9074. ),
  9075. ),
  9076. 'primary key' => array(
  9077. '0' => 'cvterm_id',
  9078. ),
  9079. 'unique keys' => array(
  9080. 'cvterm_c1' => array(
  9081. '0' => 'name',
  9082. '1' => 'cv_id',
  9083. '2' => 'is_obsolete',
  9084. ),
  9085. 'cvterm_c2' => array(
  9086. '0' => 'dbxref_id',
  9087. ),
  9088. ),
  9089. 'indexes' => array(
  9090. 'cvterm_idx1' => array(
  9091. '0' => 'cv_id',
  9092. ),
  9093. 'cvterm_idx2' => array(
  9094. '0' => 'name',
  9095. ),
  9096. 'cvterm_idx3' => array(
  9097. '0' => 'dbxref_id',
  9098. ),
  9099. ),
  9100. 'foreign keys' => array(
  9101. ),
  9102. );
  9103. return $description;
  9104. }
  9105. /**
  9106. * Implements hook_feature_dbxref_schema()
  9107. * Purpose: To describe the structure of feature_dbxref to tripal
  9108. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9109. * @see tripal_core.api.inc: tripal_core_chado_update()
  9110. * @see tripal_core.api.inc: tripal_core_chado_select()
  9111. *
  9112. * @return
  9113. * An array describing the current table
  9114. *
  9115. * @ingroup tripal_schema_api
  9116. *
  9117. */
  9118. function tripal_core_chado_feature_dbxref_schema () {
  9119. $description = array();
  9120. $description = array(
  9121. 'table' => 'feature_dbxref',
  9122. // 'description' => 'TODO: please describe this table!',
  9123. 'fields' => array(
  9124. 'feature_dbxref_id' => array(
  9125. // 'description' => 'TODO: please describe this field!',
  9126. 'type' => 'serial',
  9127. 'not null' => '1',
  9128. ),
  9129. 'feature_id' => array(
  9130. // 'description' => 'TODO: please describe this field!',
  9131. 'type' => 'int',
  9132. 'not null' => '1',
  9133. ),
  9134. 'dbxref_id' => array(
  9135. // 'description' => 'TODO: please describe this field!',
  9136. 'type' => 'int',
  9137. 'not null' => '1',
  9138. ),
  9139. 'is_current' => array(
  9140. // 'description' => 'TODO: please describe this field!',
  9141. 'type' => 'boolean',
  9142. 'not null' => '1',
  9143. 'default' => 'ru',
  9144. ),
  9145. ),
  9146. 'primary key' => array(
  9147. '0' => 'feature_dbxref_id',
  9148. ),
  9149. 'unique keys' => array(
  9150. 'feature_dbxref_c1' => array(
  9151. '0' => 'feature_id',
  9152. '1' => 'dbxref_id',
  9153. ),
  9154. ),
  9155. 'indexes' => array(
  9156. 'feature_dbxref_idx1' => array(
  9157. '0' => 'feature_id',
  9158. ),
  9159. 'feature_dbxref_idx2' => array(
  9160. '0' => 'dbxref_id',
  9161. ),
  9162. ),
  9163. 'foreign keys' => array(
  9164. ),
  9165. );
  9166. return $description;
  9167. }
  9168. /**
  9169. * Implements hook_feature_cvtermprop_schema()
  9170. * Purpose: To describe the structure of feature_cvtermprop to tripal
  9171. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9172. * @see tripal_core.api.inc: tripal_core_chado_update()
  9173. * @see tripal_core.api.inc: tripal_core_chado_select()
  9174. *
  9175. * @return
  9176. * An array describing the current table
  9177. *
  9178. * @ingroup tripal_schema_api
  9179. *
  9180. */
  9181. function tripal_core_chado_feature_cvtermprop_schema () {
  9182. $description = array();
  9183. $description = array(
  9184. 'table' => 'feature_cvtermprop',
  9185. // 'description' => 'TODO: please describe this table!',
  9186. 'fields' => array(
  9187. 'feature_cvtermprop_id' => array(
  9188. // 'description' => 'TODO: please describe this field!',
  9189. 'type' => 'serial',
  9190. 'not null' => '1',
  9191. ),
  9192. 'feature_cvterm_id' => array(
  9193. // 'description' => 'TODO: please describe this field!',
  9194. 'type' => 'int',
  9195. 'not null' => '1',
  9196. ),
  9197. 'type_id' => array(
  9198. // 'description' => 'TODO: please describe this field!',
  9199. 'type' => 'int',
  9200. 'not null' => '1',
  9201. ),
  9202. 'value' => array(
  9203. // 'description' => 'TODO: please describe this field!',
  9204. 'type' => 'text',
  9205. 'not null' => '',
  9206. ),
  9207. 'rank' => array(
  9208. // 'description' => 'TODO: please describe this field!',
  9209. 'type' => 'int',
  9210. 'not null' => '1',
  9211. 'default' => '0',
  9212. ),
  9213. ),
  9214. 'primary key' => array(
  9215. '0' => 'feature_cvtermprop_id',
  9216. ),
  9217. 'unique keys' => array(
  9218. 'feature_cvtermprop_c1' => array(
  9219. '0' => 'feature_cvterm_id',
  9220. '1' => 'type_id',
  9221. '2' => 'rank',
  9222. ),
  9223. ),
  9224. 'indexes' => array(
  9225. 'feature_cvtermprop_idx1' => array(
  9226. '0' => 'feature_cvterm_id',
  9227. ),
  9228. 'feature_cvtermprop_idx2' => array(
  9229. '0' => 'type_id',
  9230. ),
  9231. ),
  9232. 'foreign keys' => array(
  9233. ),
  9234. );
  9235. return $description;
  9236. }
  9237. /**
  9238. * Implements hook_feature_difference_schema()
  9239. * Purpose: To describe the structure of feature_difference to tripal
  9240. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9241. * @see tripal_core.api.inc: tripal_core_chado_update()
  9242. * @see tripal_core.api.inc: tripal_core_chado_select()
  9243. *
  9244. * @return
  9245. * An array describing the current table
  9246. *
  9247. * @ingroup tripal_schema_api
  9248. *
  9249. */
  9250. function tripal_core_chado_feature_difference_schema () {
  9251. $description = array();
  9252. $description = array(
  9253. 'table' => 'feature_difference',
  9254. // 'description' => 'TODO: please describe this table!',
  9255. 'fields' => array(
  9256. 'subject_id' => array(
  9257. // 'description' => 'TODO: please describe this field!',
  9258. 'type' => 'int',
  9259. 'not null' => '',
  9260. ),
  9261. 'object_id' => array(
  9262. // 'description' => 'TODO: please describe this field!',
  9263. 'type' => 'int',
  9264. 'not null' => '',
  9265. ),
  9266. 'srcfeature_id' => array(
  9267. // 'description' => 'TODO: please describe this field!',
  9268. 'type' => 'int',
  9269. 'size' => 'small',
  9270. 'not null' => '',
  9271. ),
  9272. 'fmin' => array(
  9273. // 'description' => 'TODO: please describe this field!',
  9274. 'type' => 'int',
  9275. 'not null' => '',
  9276. ),
  9277. 'fmax' => array(
  9278. // 'description' => 'TODO: please describe this field!',
  9279. 'type' => 'int',
  9280. 'not null' => '',
  9281. ),
  9282. 'strand' => array(
  9283. // 'description' => 'TODO: please describe this field!',
  9284. 'type' => 'int',
  9285. 'not null' => '',
  9286. ),
  9287. ),
  9288. 'primary key' => array(
  9289. ),
  9290. 'unique keys' => array(
  9291. ),
  9292. 'indexes' => array(
  9293. ),
  9294. 'foreign keys' => array(
  9295. ),
  9296. );
  9297. return $description;
  9298. }
  9299. /**
  9300. * Implements hook_feature_disjoint_schema()
  9301. * Purpose: To describe the structure of feature_disjoint to tripal
  9302. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9303. * @see tripal_core.api.inc: tripal_core_chado_update()
  9304. * @see tripal_core.api.inc: tripal_core_chado_select()
  9305. *
  9306. * @return
  9307. * An array describing the current table
  9308. *
  9309. * @ingroup tripal_schema_api
  9310. *
  9311. */
  9312. function tripal_core_chado_feature_disjoint_schema () {
  9313. $description = array();
  9314. $description = array(
  9315. 'table' => 'feature_disjoint',
  9316. // 'description' => 'TODO: please describe this table!',
  9317. 'fields' => array(
  9318. 'subject_id' => array(
  9319. // 'description' => 'TODO: please describe this field!',
  9320. 'type' => 'int',
  9321. 'not null' => '',
  9322. ),
  9323. 'object_id' => array(
  9324. // 'description' => 'TODO: please describe this field!',
  9325. 'type' => 'int',
  9326. 'not null' => '',
  9327. ),
  9328. ),
  9329. 'primary key' => array(
  9330. ),
  9331. 'unique keys' => array(
  9332. ),
  9333. 'indexes' => array(
  9334. ),
  9335. 'foreign keys' => array(
  9336. ),
  9337. );
  9338. return $description;
  9339. }
  9340. /**
  9341. * Implements hook_feature_distance_schema()
  9342. * Purpose: To describe the structure of feature_distance to tripal
  9343. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9344. * @see tripal_core.api.inc: tripal_core_chado_update()
  9345. * @see tripal_core.api.inc: tripal_core_chado_select()
  9346. *
  9347. * @return
  9348. * An array describing the current table
  9349. *
  9350. * @ingroup tripal_schema_api
  9351. *
  9352. */
  9353. function tripal_core_chado_feature_distance_schema () {
  9354. $description = array();
  9355. $description = array(
  9356. 'table' => 'feature_distance',
  9357. // 'description' => 'TODO: please describe this table!',
  9358. 'fields' => array(
  9359. 'subject_id' => array(
  9360. // 'description' => 'TODO: please describe this field!',
  9361. 'type' => 'int',
  9362. 'not null' => '',
  9363. ),
  9364. 'object_id' => array(
  9365. // 'description' => 'TODO: please describe this field!',
  9366. 'type' => 'int',
  9367. 'not null' => '',
  9368. ),
  9369. 'srcfeature_id' => array(
  9370. // 'description' => 'TODO: please describe this field!',
  9371. 'type' => 'int',
  9372. 'not null' => '',
  9373. ),
  9374. 'subject_strand' => array(
  9375. // 'description' => 'TODO: please describe this field!',
  9376. 'type' => 'int',
  9377. 'size' => 'small',
  9378. 'not null' => '',
  9379. ),
  9380. 'object_strand' => array(
  9381. // 'description' => 'TODO: please describe this field!',
  9382. 'type' => 'int',
  9383. 'size' => 'small',
  9384. 'not null' => '',
  9385. ),
  9386. 'distance' => array(
  9387. // 'description' => 'TODO: please describe this field!',
  9388. 'type' => 'int',
  9389. 'not null' => '',
  9390. ),
  9391. ),
  9392. 'primary key' => array(
  9393. ),
  9394. 'unique keys' => array(
  9395. ),
  9396. 'indexes' => array(
  9397. ),
  9398. 'foreign keys' => array(
  9399. ),
  9400. );
  9401. return $description;
  9402. }
  9403. /**
  9404. * Implements hook_feature_cvterm_pub_schema()
  9405. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  9406. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9407. * @see tripal_core.api.inc: tripal_core_chado_update()
  9408. * @see tripal_core.api.inc: tripal_core_chado_select()
  9409. *
  9410. * @return
  9411. * An array describing the current table
  9412. *
  9413. * @ingroup tripal_schema_api
  9414. *
  9415. */
  9416. function tripal_core_chado_feature_cvterm_pub_schema () {
  9417. $description = array();
  9418. $description = array(
  9419. 'table' => 'feature_cvterm_pub',
  9420. // 'description' => 'TODO: please describe this table!',
  9421. 'fields' => array(
  9422. 'feature_cvterm_pub_id' => array(
  9423. // 'description' => 'TODO: please describe this field!',
  9424. 'type' => 'serial',
  9425. 'not null' => '1',
  9426. ),
  9427. 'feature_cvterm_id' => array(
  9428. // 'description' => 'TODO: please describe this field!',
  9429. 'type' => 'int',
  9430. 'not null' => '1',
  9431. ),
  9432. 'pub_id' => array(
  9433. // 'description' => 'TODO: please describe this field!',
  9434. 'type' => 'int',
  9435. 'not null' => '1',
  9436. ),
  9437. ),
  9438. 'primary key' => array(
  9439. '0' => 'feature_cvterm_pub_id',
  9440. ),
  9441. 'unique keys' => array(
  9442. 'feature_cvterm_pub_c1' => array(
  9443. '0' => 'feature_cvterm_id',
  9444. '1' => 'pub_id',
  9445. ),
  9446. ),
  9447. 'indexes' => array(
  9448. 'feature_cvterm_pub_idx1' => array(
  9449. '0' => 'feature_cvterm_id',
  9450. ),
  9451. 'feature_cvterm_pub_idx2' => array(
  9452. '0' => 'pub_id',
  9453. ),
  9454. ),
  9455. 'foreign keys' => array(
  9456. ),
  9457. );
  9458. return $description;
  9459. }
  9460. /**
  9461. * Implements hook_feature_cvterm_dbxref_schema()
  9462. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  9463. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9464. * @see tripal_core.api.inc: tripal_core_chado_update()
  9465. * @see tripal_core.api.inc: tripal_core_chado_select()
  9466. *
  9467. * @return
  9468. * An array describing the current table
  9469. *
  9470. * @ingroup tripal_schema_api
  9471. *
  9472. */
  9473. function tripal_core_chado_feature_cvterm_dbxref_schema () {
  9474. $description = array();
  9475. $description = array(
  9476. 'table' => 'feature_cvterm_dbxref',
  9477. // 'description' => 'TODO: please describe this table!',
  9478. 'fields' => array(
  9479. 'feature_cvterm_dbxref_id' => array(
  9480. // 'description' => 'TODO: please describe this field!',
  9481. 'type' => 'serial',
  9482. 'not null' => '1',
  9483. ),
  9484. 'feature_cvterm_id' => array(
  9485. // 'description' => 'TODO: please describe this field!',
  9486. 'type' => 'int',
  9487. 'not null' => '1',
  9488. ),
  9489. 'dbxref_id' => array(
  9490. // 'description' => 'TODO: please describe this field!',
  9491. 'type' => 'int',
  9492. 'not null' => '1',
  9493. ),
  9494. ),
  9495. 'primary key' => array(
  9496. '0' => 'feature_cvterm_dbxref_id',
  9497. ),
  9498. 'unique keys' => array(
  9499. 'feature_cvterm_dbxref_c1' => array(
  9500. '0' => 'feature_cvterm_id',
  9501. '1' => 'dbxref_id',
  9502. ),
  9503. ),
  9504. 'indexes' => array(
  9505. 'feature_cvterm_dbxref_idx1' => array(
  9506. '0' => 'feature_cvterm_id',
  9507. ),
  9508. 'feature_cvterm_dbxref_idx2' => array(
  9509. '0' => 'dbxref_id',
  9510. ),
  9511. ),
  9512. 'foreign keys' => array(
  9513. ),
  9514. );
  9515. return $description;
  9516. }
  9517. /**
  9518. * Implements hook_f_type_schema()
  9519. * Purpose: To describe the structure of f_type to tripal
  9520. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9521. * @see tripal_core.api.inc: tripal_core_chado_update()
  9522. * @see tripal_core.api.inc: tripal_core_chado_select()
  9523. *
  9524. * @return
  9525. * An array describing the current table
  9526. *
  9527. * @ingroup tripal_schema_api
  9528. *
  9529. */
  9530. function tripal_core_chado_f_type_schema () {
  9531. $description = array();
  9532. $description = array(
  9533. 'table' => 'f_type',
  9534. // 'description' => 'TODO: please describe this table!',
  9535. 'fields' => array(
  9536. 'feature_id' => array(
  9537. // 'description' => 'TODO: please describe this field!',
  9538. 'type' => 'int',
  9539. 'not null' => '',
  9540. ),
  9541. 'name' => array(
  9542. // 'description' => 'TODO: please describe this field!',
  9543. 'type' => 'varchar',
  9544. 'length' => '255',
  9545. 'not null' => '',
  9546. ),
  9547. 'dbxref_id' => array(
  9548. // 'description' => 'TODO: please describe this field!',
  9549. 'type' => 'int',
  9550. 'not null' => '',
  9551. ),
  9552. 'type' => array(
  9553. // 'description' => 'TODO: please describe this field!',
  9554. 'type' => 'varchar',
  9555. 'length' => '1024',
  9556. 'not null' => '',
  9557. ),
  9558. 'residues' => array(
  9559. // 'description' => 'TODO: please describe this field!',
  9560. 'type' => 'text',
  9561. 'not null' => '',
  9562. ),
  9563. 'seqlen' => array(
  9564. // 'description' => 'TODO: please describe this field!',
  9565. 'type' => 'int',
  9566. 'not null' => '',
  9567. ),
  9568. 'md5checksum' => array(
  9569. // 'description' => 'TODO: please describe this field!',
  9570. 'type' => 'char',
  9571. 'length' => '32',
  9572. 'not null' => '',
  9573. ),
  9574. 'type_id' => array(
  9575. // 'description' => 'TODO: please describe this field!',
  9576. 'type' => 'int',
  9577. 'not null' => '',
  9578. ),
  9579. 'timeaccessioned' => array(
  9580. // 'description' => 'TODO: please describe this field!',
  9581. 'type' => 'datetime',
  9582. 'not null' => '',
  9583. ),
  9584. 'timelastmodified' => array(
  9585. // 'description' => 'TODO: please describe this field!',
  9586. 'type' => 'datetime',
  9587. 'not null' => '',
  9588. ),
  9589. ),
  9590. 'primary key' => array(
  9591. ),
  9592. 'unique keys' => array(
  9593. ),
  9594. 'indexes' => array(
  9595. ),
  9596. 'foreign keys' => array(
  9597. ),
  9598. );
  9599. return $description;
  9600. }
  9601. /**
  9602. * Implements hook_feature_schema()
  9603. * Purpose: To describe the structure of feature to tripal
  9604. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9605. * @see tripal_core.api.inc: tripal_core_chado_update()
  9606. * @see tripal_core.api.inc: tripal_core_chado_select()
  9607. *
  9608. * @return
  9609. * An array describing the current table
  9610. *
  9611. * @ingroup tripal_schema_api
  9612. *
  9613. */
  9614. function tripal_core_chado_feature_schema () {
  9615. $description = array();
  9616. $description = array(
  9617. 'table' => 'feature',
  9618. // 'description' => 'TODO: please describe this table!',
  9619. 'fields' => array(
  9620. 'feature_id' => array(
  9621. // 'description' => 'TODO: please describe this field!',
  9622. 'type' => 'serial',
  9623. 'not null' => '1',
  9624. ),
  9625. 'dbxref_id' => array(
  9626. // 'description' => 'TODO: please describe this field!',
  9627. 'type' => 'int',
  9628. 'not null' => '',
  9629. ),
  9630. 'organism_id' => array(
  9631. // 'description' => 'TODO: please describe this field!',
  9632. 'type' => 'int',
  9633. 'not null' => '1',
  9634. ),
  9635. 'name' => array(
  9636. // 'description' => 'TODO: please describe this field!',
  9637. 'type' => 'varchar',
  9638. 'length' => '255',
  9639. 'not null' => '',
  9640. ),
  9641. 'uniquename' => array(
  9642. // 'description' => 'TODO: please describe this field!',
  9643. 'type' => 'text',
  9644. 'not null' => '1',
  9645. ),
  9646. 'residues' => array(
  9647. // 'description' => 'TODO: please describe this field!',
  9648. 'type' => 'text',
  9649. 'not null' => '',
  9650. ),
  9651. 'seqlen' => array(
  9652. // 'description' => 'TODO: please describe this field!',
  9653. 'type' => 'int',
  9654. 'not null' => '',
  9655. ),
  9656. 'md5checksum' => array(
  9657. // 'description' => 'TODO: please describe this field!',
  9658. 'type' => 'char',
  9659. 'length' => '32',
  9660. 'not null' => '',
  9661. ),
  9662. 'type_id' => array(
  9663. // 'description' => 'TODO: please describe this field!',
  9664. 'type' => 'int',
  9665. 'not null' => '1',
  9666. ),
  9667. 'is_analysis' => array(
  9668. // 'description' => 'TODO: please describe this field!',
  9669. 'type' => 'boolean',
  9670. 'not null' => '1',
  9671. 'default' => 'als',
  9672. ),
  9673. 'is_obsolete' => array(
  9674. // 'description' => 'TODO: please describe this field!',
  9675. 'type' => 'boolean',
  9676. 'not null' => '1',
  9677. 'default' => 'als',
  9678. ),
  9679. 'timeaccessioned' => array(
  9680. // 'description' => 'TODO: please describe this field!',
  9681. 'type' => 'datetime',
  9682. 'not null' => '1',
  9683. 'default' => 'ow(',
  9684. ),
  9685. 'timelastmodified' => array(
  9686. // 'description' => 'TODO: please describe this field!',
  9687. 'type' => 'datetime',
  9688. 'not null' => '1',
  9689. 'default' => 'ow(',
  9690. ),
  9691. ),
  9692. 'primary key' => array(
  9693. '0' => 'feature_id',
  9694. ),
  9695. 'unique keys' => array(
  9696. 'feature_c1' => array(
  9697. '0' => 'organism_id',
  9698. '1' => 'uniquename',
  9699. '2' => 'type_id',
  9700. ),
  9701. ),
  9702. 'indexes' => array(
  9703. 'feature_idx1' => array(
  9704. '0' => 'dbxref_id',
  9705. ),
  9706. 'feature_idx2' => array(
  9707. '0' => 'organism_id',
  9708. ),
  9709. 'feature_idx3' => array(
  9710. '0' => 'type_id',
  9711. ),
  9712. 'feature_idx4' => array(
  9713. '0' => 'uniquename',
  9714. ),
  9715. 'feature_name_ind1' => array(
  9716. '0' => 'name',
  9717. ),
  9718. ),
  9719. 'foreign keys' => array(
  9720. ),
  9721. );
  9722. return $description;
  9723. }
  9724. /**
  9725. * Implements hook_feature_contains_schema()
  9726. * Purpose: To describe the structure of feature_contains to tripal
  9727. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9728. * @see tripal_core.api.inc: tripal_core_chado_update()
  9729. * @see tripal_core.api.inc: tripal_core_chado_select()
  9730. *
  9731. * @return
  9732. * An array describing the current table
  9733. *
  9734. * @ingroup tripal_schema_api
  9735. *
  9736. */
  9737. function tripal_core_chado_feature_contains_schema () {
  9738. $description = array();
  9739. $description = array(
  9740. 'table' => 'feature_contains',
  9741. // 'description' => 'TODO: please describe this table!',
  9742. 'fields' => array(
  9743. 'subject_id' => array(
  9744. // 'description' => 'TODO: please describe this field!',
  9745. 'type' => 'int',
  9746. 'not null' => '',
  9747. ),
  9748. 'object_id' => array(
  9749. // 'description' => 'TODO: please describe this field!',
  9750. 'type' => 'int',
  9751. 'not null' => '',
  9752. ),
  9753. ),
  9754. 'primary key' => array(
  9755. ),
  9756. 'unique keys' => array(
  9757. ),
  9758. 'indexes' => array(
  9759. ),
  9760. 'foreign keys' => array(
  9761. ),
  9762. );
  9763. return $description;
  9764. }
  9765. /**
  9766. * Implements hook_feature_cvterm_schema()
  9767. * Purpose: To describe the structure of feature_cvterm to tripal
  9768. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9769. * @see tripal_core.api.inc: tripal_core_chado_update()
  9770. * @see tripal_core.api.inc: tripal_core_chado_select()
  9771. *
  9772. * @return
  9773. * An array describing the current table
  9774. *
  9775. * @ingroup tripal_schema_api
  9776. *
  9777. */
  9778. function tripal_core_chado_feature_cvterm_schema () {
  9779. $description = array();
  9780. $description = array(
  9781. 'table' => 'feature_cvterm',
  9782. // 'description' => 'TODO: please describe this table!',
  9783. 'fields' => array(
  9784. 'feature_cvterm_id' => array(
  9785. // 'description' => 'TODO: please describe this field!',
  9786. 'type' => 'serial',
  9787. 'not null' => '1',
  9788. ),
  9789. 'feature_id' => array(
  9790. // 'description' => 'TODO: please describe this field!',
  9791. 'type' => 'int',
  9792. 'not null' => '1',
  9793. ),
  9794. 'cvterm_id' => array(
  9795. // 'description' => 'TODO: please describe this field!',
  9796. 'type' => 'int',
  9797. 'not null' => '1',
  9798. ),
  9799. 'pub_id' => array(
  9800. // 'description' => 'TODO: please describe this field!',
  9801. 'type' => 'int',
  9802. 'not null' => '1',
  9803. ),
  9804. 'is_not' => array(
  9805. // 'description' => 'TODO: please describe this field!',
  9806. 'type' => 'boolean',
  9807. 'not null' => '1',
  9808. 'default' => 'als',
  9809. ),
  9810. 'rank' => array(
  9811. // 'description' => 'TODO: please describe this field!',
  9812. 'type' => 'int',
  9813. 'not null' => '1',
  9814. 'default' => '0',
  9815. ),
  9816. ),
  9817. 'primary key' => array(
  9818. '0' => 'feature_cvterm_id',
  9819. ),
  9820. 'unique keys' => array(
  9821. 'feature_cvterm_c1' => array(
  9822. '0' => 'feature_id',
  9823. '1' => 'cvterm_id',
  9824. '2' => 'pub_id',
  9825. '3' => 'rank',
  9826. ),
  9827. ),
  9828. 'indexes' => array(
  9829. 'feature_cvterm_idx1' => array(
  9830. '0' => 'feature_id',
  9831. ),
  9832. 'feature_cvterm_idx2' => array(
  9833. '0' => 'cvterm_id',
  9834. ),
  9835. 'feature_cvterm_idx3' => array(
  9836. '0' => 'pub_id',
  9837. ),
  9838. ),
  9839. 'foreign keys' => array(
  9840. ),
  9841. );
  9842. return $description;
  9843. }
  9844. /**
  9845. * Implements hook_feature_expression_schema()
  9846. * Purpose: To describe the structure of feature_expression to tripal
  9847. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9848. * @see tripal_core.api.inc: tripal_core_chado_update()
  9849. * @see tripal_core.api.inc: tripal_core_chado_select()
  9850. *
  9851. * @return
  9852. * An array describing the current table
  9853. *
  9854. * @ingroup tripal_schema_api
  9855. *
  9856. */
  9857. function tripal_core_chado_feature_expression_schema () {
  9858. $description = array();
  9859. $description = array(
  9860. 'table' => 'feature_expression',
  9861. // 'description' => 'TODO: please describe this table!',
  9862. 'fields' => array(
  9863. 'feature_expression_id' => array(
  9864. // 'description' => 'TODO: please describe this field!',
  9865. 'type' => 'serial',
  9866. 'not null' => '1',
  9867. ),
  9868. 'expression_id' => array(
  9869. // 'description' => 'TODO: please describe this field!',
  9870. 'type' => 'int',
  9871. 'not null' => '1',
  9872. ),
  9873. 'feature_id' => array(
  9874. // 'description' => 'TODO: please describe this field!',
  9875. 'type' => 'int',
  9876. 'not null' => '1',
  9877. ),
  9878. 'pub_id' => array(
  9879. // 'description' => 'TODO: please describe this field!',
  9880. 'type' => 'int',
  9881. 'not null' => '1',
  9882. ),
  9883. ),
  9884. 'primary key' => array(
  9885. '0' => 'feature_expression_id',
  9886. ),
  9887. 'unique keys' => array(
  9888. 'feature_expression_c1' => array(
  9889. '0' => 'expression_id',
  9890. '1' => 'feature_id',
  9891. '2' => 'pub_id',
  9892. ),
  9893. ),
  9894. 'indexes' => array(
  9895. 'feature_expression_idx1' => array(
  9896. '0' => 'expression_id',
  9897. ),
  9898. 'feature_expression_idx2' => array(
  9899. '0' => 'feature_id',
  9900. ),
  9901. 'feature_expression_idx3' => array(
  9902. '0' => 'pub_id',
  9903. ),
  9904. ),
  9905. 'foreign keys' => array(
  9906. ),
  9907. );
  9908. return $description;
  9909. }
  9910. /**
  9911. * Implements hook_feature_expressionprop_schema()
  9912. * Purpose: To describe the structure of feature_expressionprop to tripal
  9913. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9914. * @see tripal_core.api.inc: tripal_core_chado_update()
  9915. * @see tripal_core.api.inc: tripal_core_chado_select()
  9916. *
  9917. * @return
  9918. * An array describing the current table
  9919. *
  9920. * @ingroup tripal_schema_api
  9921. *
  9922. */
  9923. function tripal_core_chado_feature_expressionprop_schema () {
  9924. $description = array();
  9925. $description = array(
  9926. 'table' => 'feature_expressionprop',
  9927. // 'description' => 'TODO: please describe this table!',
  9928. 'fields' => array(
  9929. 'feature_expressionprop_id' => array(
  9930. // 'description' => 'TODO: please describe this field!',
  9931. 'type' => 'serial',
  9932. 'not null' => '1',
  9933. ),
  9934. 'feature_expression_id' => array(
  9935. // 'description' => 'TODO: please describe this field!',
  9936. 'type' => 'int',
  9937. 'not null' => '1',
  9938. ),
  9939. 'type_id' => array(
  9940. // 'description' => 'TODO: please describe this field!',
  9941. 'type' => 'int',
  9942. 'not null' => '1',
  9943. ),
  9944. 'value' => array(
  9945. // 'description' => 'TODO: please describe this field!',
  9946. 'type' => 'text',
  9947. 'not null' => '',
  9948. ),
  9949. 'rank' => array(
  9950. // 'description' => 'TODO: please describe this field!',
  9951. 'type' => 'int',
  9952. 'not null' => '1',
  9953. 'default' => '0',
  9954. ),
  9955. ),
  9956. 'primary key' => array(
  9957. '0' => 'feature_expressionprop_id',
  9958. ),
  9959. 'unique keys' => array(
  9960. 'feature_expressionprop_c1' => array(
  9961. '0' => 'feature_expression_id',
  9962. '1' => 'type_id',
  9963. '2' => 'rank',
  9964. ),
  9965. ),
  9966. 'indexes' => array(
  9967. 'feature_expressionprop_idx1' => array(
  9968. '0' => 'feature_expression_id',
  9969. ),
  9970. 'feature_expressionprop_idx2' => array(
  9971. '0' => 'type_id',
  9972. ),
  9973. ),
  9974. 'foreign keys' => array(
  9975. ),
  9976. );
  9977. return $description;
  9978. }
  9979. /**
  9980. * Implements hook_feature_pubprop_schema()
  9981. * Purpose: To describe the structure of feature_pubprop to tripal
  9982. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9983. * @see tripal_core.api.inc: tripal_core_chado_update()
  9984. * @see tripal_core.api.inc: tripal_core_chado_select()
  9985. *
  9986. * @return
  9987. * An array describing the current table
  9988. *
  9989. * @ingroup tripal_schema_api
  9990. *
  9991. */
  9992. function tripal_core_chado_feature_pubprop_schema () {
  9993. $description = array();
  9994. $description = array(
  9995. 'table' => 'feature_pubprop',
  9996. // 'description' => 'TODO: please describe this table!',
  9997. 'fields' => array(
  9998. 'feature_pubprop_id' => array(
  9999. // 'description' => 'TODO: please describe this field!',
  10000. 'type' => 'serial',
  10001. 'not null' => '1',
  10002. ),
  10003. 'feature_pub_id' => array(
  10004. // 'description' => 'TODO: please describe this field!',
  10005. 'type' => 'int',
  10006. 'not null' => '1',
  10007. ),
  10008. 'type_id' => array(
  10009. // 'description' => 'TODO: please describe this field!',
  10010. 'type' => 'int',
  10011. 'not null' => '1',
  10012. ),
  10013. 'value' => array(
  10014. // 'description' => 'TODO: please describe this field!',
  10015. 'type' => 'text',
  10016. 'not null' => '',
  10017. ),
  10018. 'rank' => array(
  10019. // 'description' => 'TODO: please describe this field!',
  10020. 'type' => 'int',
  10021. 'not null' => '1',
  10022. 'default' => '0',
  10023. ),
  10024. ),
  10025. 'primary key' => array(
  10026. '0' => 'feature_pubprop_id',
  10027. ),
  10028. 'unique keys' => array(
  10029. 'feature_pubprop_c1' => array(
  10030. '0' => 'feature_pub_id',
  10031. '1' => 'type_id',
  10032. '2' => 'rank',
  10033. ),
  10034. ),
  10035. 'indexes' => array(
  10036. 'feature_pubprop_idx1' => array(
  10037. '0' => 'feature_pub_id',
  10038. ),
  10039. ),
  10040. 'foreign keys' => array(
  10041. ),
  10042. );
  10043. return $description;
  10044. }
  10045. /**
  10046. * Implements hook_feature_relationship_schema()
  10047. * Purpose: To describe the structure of feature_relationship to tripal
  10048. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10049. * @see tripal_core.api.inc: tripal_core_chado_update()
  10050. * @see tripal_core.api.inc: tripal_core_chado_select()
  10051. *
  10052. * @return
  10053. * An array describing the current table
  10054. *
  10055. * @ingroup tripal_schema_api
  10056. *
  10057. */
  10058. function tripal_core_chado_feature_relationship_schema () {
  10059. $description = array();
  10060. $description = array(
  10061. 'table' => 'feature_relationship',
  10062. // 'description' => 'TODO: please describe this table!',
  10063. 'fields' => array(
  10064. 'feature_relationship_id' => array(
  10065. // 'description' => 'TODO: please describe this field!',
  10066. 'type' => 'serial',
  10067. 'not null' => '1',
  10068. ),
  10069. 'subject_id' => array(
  10070. // 'description' => 'TODO: please describe this field!',
  10071. 'type' => 'int',
  10072. 'not null' => '1',
  10073. ),
  10074. 'object_id' => array(
  10075. // 'description' => 'TODO: please describe this field!',
  10076. 'type' => 'int',
  10077. 'not null' => '1',
  10078. ),
  10079. 'type_id' => array(
  10080. // 'description' => 'TODO: please describe this field!',
  10081. 'type' => 'int',
  10082. 'not null' => '1',
  10083. ),
  10084. 'value' => array(
  10085. // 'description' => 'TODO: please describe this field!',
  10086. 'type' => 'text',
  10087. 'not null' => '',
  10088. ),
  10089. 'rank' => array(
  10090. // 'description' => 'TODO: please describe this field!',
  10091. 'type' => 'int',
  10092. 'not null' => '1',
  10093. 'default' => '0',
  10094. ),
  10095. ),
  10096. 'primary key' => array(
  10097. '0' => 'feature_relationship_id',
  10098. ),
  10099. 'unique keys' => array(
  10100. 'feature_relationship_c1' => array(
  10101. '0' => 'subject_id',
  10102. '1' => 'object_id',
  10103. '2' => 'type_id',
  10104. '3' => 'rank',
  10105. ),
  10106. ),
  10107. 'indexes' => array(
  10108. 'feature_relationship_idx1' => array(
  10109. '0' => 'subject_id',
  10110. ),
  10111. 'feature_relationship_idx2' => array(
  10112. '0' => 'object_id',
  10113. ),
  10114. 'feature_relationship_idx3' => array(
  10115. '0' => 'type_id',
  10116. ),
  10117. ),
  10118. 'foreign keys' => array(
  10119. ),
  10120. );
  10121. return $description;
  10122. }
  10123. /**
  10124. * Implements hook_feature_relationship_pub_schema()
  10125. * Purpose: To describe the structure of feature_relationship_pub to tripal
  10126. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10127. * @see tripal_core.api.inc: tripal_core_chado_update()
  10128. * @see tripal_core.api.inc: tripal_core_chado_select()
  10129. *
  10130. * @return
  10131. * An array describing the current table
  10132. *
  10133. * @ingroup tripal_schema_api
  10134. *
  10135. */
  10136. function tripal_core_chado_feature_relationship_pub_schema () {
  10137. $description = array();
  10138. $description = array(
  10139. 'table' => 'feature_relationship_pub',
  10140. // 'description' => 'TODO: please describe this table!',
  10141. 'fields' => array(
  10142. 'feature_relationship_pub_id' => array(
  10143. // 'description' => 'TODO: please describe this field!',
  10144. 'type' => 'serial',
  10145. 'not null' => '1',
  10146. ),
  10147. 'feature_relationship_id' => array(
  10148. // 'description' => 'TODO: please describe this field!',
  10149. 'type' => 'int',
  10150. 'not null' => '1',
  10151. ),
  10152. 'pub_id' => array(
  10153. // 'description' => 'TODO: please describe this field!',
  10154. 'type' => 'int',
  10155. 'not null' => '1',
  10156. ),
  10157. ),
  10158. 'primary key' => array(
  10159. '0' => 'feature_relationship_pub_id',
  10160. ),
  10161. 'unique keys' => array(
  10162. 'feature_relationship_pub_c1' => array(
  10163. '0' => 'feature_relationship_id',
  10164. '1' => 'pub_id',
  10165. ),
  10166. ),
  10167. 'indexes' => array(
  10168. 'feature_relationship_pub_idx1' => array(
  10169. '0' => 'feature_relationship_id',
  10170. ),
  10171. 'feature_relationship_pub_idx2' => array(
  10172. '0' => 'pub_id',
  10173. ),
  10174. ),
  10175. 'foreign keys' => array(
  10176. ),
  10177. );
  10178. return $description;
  10179. }
  10180. /**
  10181. * Implements hook_feature_relationshipprop_schema()
  10182. * Purpose: To describe the structure of feature_relationshipprop to tripal
  10183. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10184. * @see tripal_core.api.inc: tripal_core_chado_update()
  10185. * @see tripal_core.api.inc: tripal_core_chado_select()
  10186. *
  10187. * @return
  10188. * An array describing the current table
  10189. *
  10190. * @ingroup tripal_schema_api
  10191. *
  10192. */
  10193. function tripal_core_chado_feature_relationshipprop_schema () {
  10194. $description = array();
  10195. $description = array(
  10196. 'table' => 'feature_relationshipprop',
  10197. // 'description' => 'TODO: please describe this table!',
  10198. 'fields' => array(
  10199. 'feature_relationshipprop_id' => array(
  10200. // 'description' => 'TODO: please describe this field!',
  10201. 'type' => 'serial',
  10202. 'not null' => '1',
  10203. ),
  10204. 'feature_relationship_id' => array(
  10205. // 'description' => 'TODO: please describe this field!',
  10206. 'type' => 'int',
  10207. 'not null' => '1',
  10208. ),
  10209. 'type_id' => array(
  10210. // 'description' => 'TODO: please describe this field!',
  10211. 'type' => 'int',
  10212. 'not null' => '1',
  10213. ),
  10214. 'value' => array(
  10215. // 'description' => 'TODO: please describe this field!',
  10216. 'type' => 'text',
  10217. 'not null' => '',
  10218. ),
  10219. 'rank' => array(
  10220. // 'description' => 'TODO: please describe this field!',
  10221. 'type' => 'int',
  10222. 'not null' => '1',
  10223. 'default' => '0',
  10224. ),
  10225. ),
  10226. 'primary key' => array(
  10227. '0' => 'feature_relationshipprop_id',
  10228. ),
  10229. 'unique keys' => array(
  10230. 'feature_relationshipprop_c1' => array(
  10231. '0' => 'feature_relationship_id',
  10232. '1' => 'type_id',
  10233. '2' => 'rank',
  10234. ),
  10235. ),
  10236. 'indexes' => array(
  10237. 'feature_relationshipprop_idx1' => array(
  10238. '0' => 'feature_relationship_id',
  10239. ),
  10240. 'feature_relationshipprop_idx2' => array(
  10241. '0' => 'type_id',
  10242. ),
  10243. ),
  10244. 'foreign keys' => array(
  10245. ),
  10246. );
  10247. return $description;
  10248. }
  10249. /**
  10250. * Implements hook_feature_pub_schema()
  10251. * Purpose: To describe the structure of feature_pub to tripal
  10252. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10253. * @see tripal_core.api.inc: tripal_core_chado_update()
  10254. * @see tripal_core.api.inc: tripal_core_chado_select()
  10255. *
  10256. * @return
  10257. * An array describing the current table
  10258. *
  10259. * @ingroup tripal_schema_api
  10260. *
  10261. */
  10262. function tripal_core_chado_feature_pub_schema () {
  10263. $description = array();
  10264. $description = array(
  10265. 'table' => 'feature_pub',
  10266. // 'description' => 'TODO: please describe this table!',
  10267. 'fields' => array(
  10268. 'feature_pub_id' => array(
  10269. // 'description' => 'TODO: please describe this field!',
  10270. 'type' => 'serial',
  10271. 'not null' => '1',
  10272. ),
  10273. 'feature_id' => array(
  10274. // 'description' => 'TODO: please describe this field!',
  10275. 'type' => 'int',
  10276. 'not null' => '1',
  10277. ),
  10278. 'pub_id' => array(
  10279. // 'description' => 'TODO: please describe this field!',
  10280. 'type' => 'int',
  10281. 'not null' => '1',
  10282. ),
  10283. ),
  10284. 'primary key' => array(
  10285. '0' => 'feature_pub_id',
  10286. ),
  10287. 'unique keys' => array(
  10288. 'feature_pub_c1' => array(
  10289. '0' => 'feature_id',
  10290. '1' => 'pub_id',
  10291. ),
  10292. ),
  10293. 'indexes' => array(
  10294. 'feature_pub_idx1' => array(
  10295. '0' => 'feature_id',
  10296. ),
  10297. 'feature_pub_idx2' => array(
  10298. '0' => 'pub_id',
  10299. ),
  10300. ),
  10301. 'foreign keys' => array(
  10302. ),
  10303. );
  10304. return $description;
  10305. }
  10306. /**
  10307. * Implements hook_feature_phenotype_schema()
  10308. * Purpose: To describe the structure of feature_phenotype to tripal
  10309. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10310. * @see tripal_core.api.inc: tripal_core_chado_update()
  10311. * @see tripal_core.api.inc: tripal_core_chado_select()
  10312. *
  10313. * @return
  10314. * An array describing the current table
  10315. *
  10316. * @ingroup tripal_schema_api
  10317. *
  10318. */
  10319. function tripal_core_chado_feature_phenotype_schema () {
  10320. $description = array();
  10321. $description = array(
  10322. 'table' => 'feature_phenotype',
  10323. // 'description' => 'TODO: please describe this table!',
  10324. 'fields' => array(
  10325. 'feature_phenotype_id' => array(
  10326. // 'description' => 'TODO: please describe this field!',
  10327. 'type' => 'serial',
  10328. 'not null' => '1',
  10329. ),
  10330. 'feature_id' => array(
  10331. // 'description' => 'TODO: please describe this field!',
  10332. 'type' => 'int',
  10333. 'not null' => '1',
  10334. ),
  10335. 'phenotype_id' => array(
  10336. // 'description' => 'TODO: please describe this field!',
  10337. 'type' => 'int',
  10338. 'not null' => '1',
  10339. ),
  10340. ),
  10341. 'primary key' => array(
  10342. '0' => 'feature_phenotype_id',
  10343. ),
  10344. 'unique keys' => array(
  10345. 'feature_phenotype_c1' => array(
  10346. '0' => 'feature_id',
  10347. '1' => 'phenotype_id',
  10348. ),
  10349. ),
  10350. 'indexes' => array(
  10351. 'feature_phenotype_idx1' => array(
  10352. '0' => 'feature_id',
  10353. ),
  10354. 'feature_phenotype_idx2' => array(
  10355. '0' => 'phenotype_id',
  10356. ),
  10357. ),
  10358. 'foreign keys' => array(
  10359. ),
  10360. );
  10361. return $description;
  10362. }
  10363. /**
  10364. * Implements hook_feature_genotype_schema()
  10365. * Purpose: To describe the structure of feature_genotype to tripal
  10366. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10367. * @see tripal_core.api.inc: tripal_core_chado_update()
  10368. * @see tripal_core.api.inc: tripal_core_chado_select()
  10369. *
  10370. * @return
  10371. * An array describing the current table
  10372. *
  10373. * @ingroup tripal_schema_api
  10374. *
  10375. */
  10376. function tripal_core_chado_feature_genotype_schema () {
  10377. $description = array();
  10378. $description = array(
  10379. 'table' => 'feature_genotype',
  10380. // 'description' => 'TODO: please describe this table!',
  10381. 'fields' => array(
  10382. 'feature_genotype_id' => array(
  10383. // 'description' => 'TODO: please describe this field!',
  10384. 'type' => 'serial',
  10385. 'not null' => '1',
  10386. ),
  10387. 'feature_id' => array(
  10388. // 'description' => 'TODO: please describe this field!',
  10389. 'type' => 'int',
  10390. 'not null' => '1',
  10391. ),
  10392. 'genotype_id' => array(
  10393. // 'description' => 'TODO: please describe this field!',
  10394. 'type' => 'int',
  10395. 'not null' => '1',
  10396. ),
  10397. 'chromosome_id' => array(
  10398. // 'description' => 'TODO: please describe this field!',
  10399. 'type' => 'int',
  10400. 'not null' => '',
  10401. ),
  10402. 'rank' => array(
  10403. // 'description' => 'TODO: please describe this field!',
  10404. 'type' => 'int',
  10405. 'not null' => '1',
  10406. ),
  10407. 'cgroup' => array(
  10408. // 'description' => 'TODO: please describe this field!',
  10409. 'type' => 'int',
  10410. 'not null' => '1',
  10411. ),
  10412. 'cvterm_id' => array(
  10413. // 'description' => 'TODO: please describe this field!',
  10414. 'type' => 'int',
  10415. 'not null' => '1',
  10416. ),
  10417. ),
  10418. 'primary key' => array(
  10419. '0' => 'feature_genotype_id',
  10420. ),
  10421. 'unique keys' => array(
  10422. 'feature_genotype_c1' => array(
  10423. '0' => 'feature_id',
  10424. '1' => 'genotype_id',
  10425. '2' => 'cvterm_id',
  10426. '3' => 'chromosome_id',
  10427. '4' => 'rank',
  10428. '5' => 'cgroup',
  10429. ),
  10430. ),
  10431. 'indexes' => array(
  10432. 'feature_genotype_idx1' => array(
  10433. '0' => 'feature_id',
  10434. ),
  10435. 'feature_genotype_idx2' => array(
  10436. '0' => 'genotype_id',
  10437. ),
  10438. ),
  10439. 'foreign keys' => array(
  10440. ),
  10441. );
  10442. return $description;
  10443. }
  10444. /**
  10445. * Implements hook_feature_intersection_schema()
  10446. * Purpose: To describe the structure of feature_intersection to tripal
  10447. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10448. * @see tripal_core.api.inc: tripal_core_chado_update()
  10449. * @see tripal_core.api.inc: tripal_core_chado_select()
  10450. *
  10451. * @return
  10452. * An array describing the current table
  10453. *
  10454. * @ingroup tripal_schema_api
  10455. *
  10456. */
  10457. function tripal_core_chado_feature_intersection_schema () {
  10458. $description = array();
  10459. $description = array(
  10460. 'table' => 'feature_intersection',
  10461. // 'description' => 'TODO: please describe this table!',
  10462. 'fields' => array(
  10463. 'subject_id' => array(
  10464. // 'description' => 'TODO: please describe this field!',
  10465. 'type' => 'int',
  10466. 'not null' => '',
  10467. ),
  10468. 'object_id' => array(
  10469. // 'description' => 'TODO: please describe this field!',
  10470. 'type' => 'int',
  10471. 'not null' => '',
  10472. ),
  10473. 'srcfeature_id' => array(
  10474. // 'description' => 'TODO: please describe this field!',
  10475. 'type' => 'int',
  10476. 'not null' => '',
  10477. ),
  10478. 'subject_strand' => array(
  10479. // 'description' => 'TODO: please describe this field!',
  10480. 'type' => 'int',
  10481. 'size' => 'small',
  10482. 'not null' => '',
  10483. ),
  10484. 'object_strand' => array(
  10485. // 'description' => 'TODO: please describe this field!',
  10486. 'type' => 'int',
  10487. 'size' => 'small',
  10488. 'not null' => '',
  10489. ),
  10490. 'fmin' => array(
  10491. // 'description' => 'TODO: please describe this field!',
  10492. 'type' => 'int',
  10493. 'not null' => '',
  10494. ),
  10495. 'fmax' => array(
  10496. // 'description' => 'TODO: please describe this field!',
  10497. 'type' => 'int',
  10498. 'not null' => '',
  10499. ),
  10500. ),
  10501. 'primary key' => array(
  10502. ),
  10503. 'unique keys' => array(
  10504. ),
  10505. 'indexes' => array(
  10506. ),
  10507. 'foreign keys' => array(
  10508. ),
  10509. );
  10510. return $description;
  10511. }
  10512. /**
  10513. * Implements hook_feature_meets_schema()
  10514. * Purpose: To describe the structure of feature_meets to tripal
  10515. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10516. * @see tripal_core.api.inc: tripal_core_chado_update()
  10517. * @see tripal_core.api.inc: tripal_core_chado_select()
  10518. *
  10519. * @return
  10520. * An array describing the current table
  10521. *
  10522. * @ingroup tripal_schema_api
  10523. *
  10524. */
  10525. function tripal_core_chado_feature_meets_schema () {
  10526. $description = array();
  10527. $description = array(
  10528. 'table' => 'feature_meets',
  10529. // 'description' => 'TODO: please describe this table!',
  10530. 'fields' => array(
  10531. 'subject_id' => array(
  10532. // 'description' => 'TODO: please describe this field!',
  10533. 'type' => 'int',
  10534. 'not null' => '',
  10535. ),
  10536. 'object_id' => array(
  10537. // 'description' => 'TODO: please describe this field!',
  10538. 'type' => 'int',
  10539. 'not null' => '',
  10540. ),
  10541. ),
  10542. 'primary key' => array(
  10543. ),
  10544. 'unique keys' => array(
  10545. ),
  10546. 'indexes' => array(
  10547. ),
  10548. 'foreign keys' => array(
  10549. ),
  10550. );
  10551. return $description;
  10552. }
  10553. /**
  10554. * Implements hook_feature_meets_on_same_strand_schema()
  10555. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10556. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10557. * @see tripal_core.api.inc: tripal_core_chado_update()
  10558. * @see tripal_core.api.inc: tripal_core_chado_select()
  10559. *
  10560. * @return
  10561. * An array describing the current table
  10562. *
  10563. * @ingroup tripal_schema_api
  10564. *
  10565. */
  10566. function tripal_core_chado_feature_meets_on_same_strand_schema () {
  10567. $description = array();
  10568. $description = array(
  10569. 'table' => 'feature_meets_on_same_strand',
  10570. // 'description' => 'TODO: please describe this table!',
  10571. 'fields' => array(
  10572. 'subject_id' => array(
  10573. // 'description' => 'TODO: please describe this field!',
  10574. 'type' => 'int',
  10575. 'not null' => '',
  10576. ),
  10577. 'object_id' => array(
  10578. // 'description' => 'TODO: please describe this field!',
  10579. 'type' => 'int',
  10580. 'not null' => '',
  10581. ),
  10582. ),
  10583. 'primary key' => array(
  10584. ),
  10585. 'unique keys' => array(
  10586. ),
  10587. 'indexes' => array(
  10588. ),
  10589. 'foreign keys' => array(
  10590. ),
  10591. );
  10592. return $description;
  10593. }
  10594. /**
  10595. * Implements hook_f_loc_schema()
  10596. * Purpose: To describe the structure of f_loc to tripal
  10597. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10598. * @see tripal_core.api.inc: tripal_core_chado_update()
  10599. * @see tripal_core.api.inc: tripal_core_chado_select()
  10600. *
  10601. * @return
  10602. * An array describing the current table
  10603. *
  10604. * @ingroup tripal_schema_api
  10605. *
  10606. */
  10607. function tripal_core_chado_f_loc_schema () {
  10608. $description = array();
  10609. $description = array(
  10610. 'table' => 'f_loc',
  10611. // 'description' => 'TODO: please describe this table!',
  10612. 'fields' => array(
  10613. 'feature_id' => array(
  10614. // 'description' => 'TODO: please describe this field!',
  10615. 'type' => 'int',
  10616. 'not null' => '',
  10617. ),
  10618. 'name' => array(
  10619. // 'description' => 'TODO: please describe this field!',
  10620. 'type' => 'varchar',
  10621. 'length' => '255',
  10622. 'not null' => '',
  10623. ),
  10624. 'dbxref_id' => array(
  10625. // 'description' => 'TODO: please describe this field!',
  10626. 'type' => 'int',
  10627. 'not null' => '',
  10628. ),
  10629. 'nbeg' => array(
  10630. // 'description' => 'TODO: please describe this field!',
  10631. 'type' => 'int',
  10632. 'not null' => '',
  10633. ),
  10634. 'nend' => array(
  10635. // 'description' => 'TODO: please describe this field!',
  10636. 'type' => 'int',
  10637. 'not null' => '',
  10638. ),
  10639. 'strand' => array(
  10640. // 'description' => 'TODO: please describe this field!',
  10641. 'type' => 'int',
  10642. 'size' => 'small',
  10643. 'not null' => '',
  10644. ),
  10645. ),
  10646. 'primary key' => array(
  10647. ),
  10648. 'unique keys' => array(
  10649. ),
  10650. 'indexes' => array(
  10651. ),
  10652. 'foreign keys' => array(
  10653. ),
  10654. );
  10655. return $description;
  10656. }
  10657. /**
  10658. * Implements hook_expressionprop_schema()
  10659. * Purpose: To describe the structure of expressionprop to tripal
  10660. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10661. * @see tripal_core.api.inc: tripal_core_chado_update()
  10662. * @see tripal_core.api.inc: tripal_core_chado_select()
  10663. *
  10664. * @return
  10665. * An array describing the current table
  10666. *
  10667. * @ingroup tripal_schema_api
  10668. *
  10669. */
  10670. function tripal_core_chado_expressionprop_schema () {
  10671. $description = array();
  10672. $description = array(
  10673. 'table' => 'expressionprop',
  10674. // 'description' => 'TODO: please describe this table!',
  10675. 'fields' => array(
  10676. 'expressionprop_id' => array(
  10677. // 'description' => 'TODO: please describe this field!',
  10678. 'type' => 'serial',
  10679. 'not null' => '1',
  10680. ),
  10681. 'expression_id' => array(
  10682. // 'description' => 'TODO: please describe this field!',
  10683. 'type' => 'int',
  10684. 'not null' => '1',
  10685. ),
  10686. 'type_id' => array(
  10687. // 'description' => 'TODO: please describe this field!',
  10688. 'type' => 'int',
  10689. 'not null' => '1',
  10690. ),
  10691. 'value' => array(
  10692. // 'description' => 'TODO: please describe this field!',
  10693. 'type' => 'text',
  10694. 'not null' => '',
  10695. ),
  10696. 'rank' => array(
  10697. // 'description' => 'TODO: please describe this field!',
  10698. 'type' => 'int',
  10699. 'not null' => '1',
  10700. 'default' => '0',
  10701. ),
  10702. ),
  10703. 'primary key' => array(
  10704. '0' => 'expressionprop_id',
  10705. ),
  10706. 'unique keys' => array(
  10707. 'expressionprop_c1' => array(
  10708. '0' => 'expression_id',
  10709. '1' => 'type_id',
  10710. '2' => 'rank',
  10711. ),
  10712. ),
  10713. 'indexes' => array(
  10714. 'expressionprop_idx1' => array(
  10715. '0' => 'expression_id',
  10716. ),
  10717. 'expressionprop_idx2' => array(
  10718. '0' => 'type_id',
  10719. ),
  10720. ),
  10721. 'foreign keys' => array(
  10722. ),
  10723. );
  10724. return $description;
  10725. }
  10726. /**
  10727. * Implements hook_db_dbxref_count_schema()
  10728. * Purpose: To describe the structure of db_dbxref_count to tripal
  10729. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10730. * @see tripal_core.api.inc: tripal_core_chado_update()
  10731. * @see tripal_core.api.inc: tripal_core_chado_select()
  10732. *
  10733. * @return
  10734. * An array describing the current table
  10735. *
  10736. * @ingroup tripal_schema_api
  10737. *
  10738. */
  10739. function tripal_core_chado_db_dbxref_count_schema () {
  10740. $description = array();
  10741. $description = array(
  10742. 'table' => 'db_dbxref_count',
  10743. // 'description' => 'TODO: please describe this table!',
  10744. 'fields' => array(
  10745. 'name' => array(
  10746. // 'description' => 'TODO: please describe this field!',
  10747. 'type' => 'varchar',
  10748. 'length' => '255',
  10749. 'not null' => '',
  10750. ),
  10751. 'num_dbxrefs' => array(
  10752. // 'description' => 'TODO: please describe this field!',
  10753. 'type' => 'int',
  10754. 'size' => 'big',
  10755. 'not null' => '',
  10756. ),
  10757. ),
  10758. 'primary key' => array(
  10759. ),
  10760. 'unique keys' => array(
  10761. ),
  10762. 'indexes' => array(
  10763. ),
  10764. 'foreign keys' => array(
  10765. ),
  10766. );
  10767. return $description;
  10768. }
  10769. /**
  10770. * Implements hook_dbxref_schema()
  10771. * Purpose: To describe the structure of dbxref to tripal
  10772. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10773. * @see tripal_core.api.inc: tripal_core_chado_update()
  10774. * @see tripal_core.api.inc: tripal_core_chado_select()
  10775. *
  10776. * @return
  10777. * An array describing the current table
  10778. *
  10779. * @ingroup tripal_schema_api
  10780. *
  10781. */
  10782. function tripal_core_chado_dbxref_schema () {
  10783. $description = array();
  10784. $description = array(
  10785. 'table' => 'dbxref',
  10786. // 'description' => 'TODO: please describe this table!',
  10787. 'fields' => array(
  10788. 'dbxref_id' => array(
  10789. // 'description' => 'TODO: please describe this field!',
  10790. 'type' => 'serial',
  10791. 'not null' => '1',
  10792. ),
  10793. 'db_id' => array(
  10794. // 'description' => 'TODO: please describe this field!',
  10795. 'type' => 'int',
  10796. 'not null' => '1',
  10797. ),
  10798. 'accession' => array(
  10799. // 'description' => 'TODO: please describe this field!',
  10800. 'type' => 'varchar',
  10801. 'length' => '255',
  10802. 'not null' => '1',
  10803. ),
  10804. 'version' => array(
  10805. // 'description' => 'TODO: please describe this field!',
  10806. 'type' => 'varchar',
  10807. 'length' => '255',
  10808. 'not null' => '1',
  10809. 'default' => '',
  10810. ),
  10811. 'description' => array(
  10812. // 'description' => 'TODO: please describe this field!',
  10813. 'type' => 'text',
  10814. 'not null' => '',
  10815. ),
  10816. ),
  10817. 'primary key' => array(
  10818. '0' => 'dbxref_id',
  10819. ),
  10820. 'unique keys' => array(
  10821. 'dbxref_c1' => array(
  10822. '0' => 'db_id',
  10823. '1' => 'accession',
  10824. '2' => 'version',
  10825. ),
  10826. ),
  10827. 'indexes' => array(
  10828. 'dbxref_idx1' => array(
  10829. '0' => 'db_id',
  10830. ),
  10831. 'dbxref_idx2' => array(
  10832. '0' => 'accession',
  10833. ),
  10834. 'dbxref_idx3' => array(
  10835. '0' => 'version',
  10836. ),
  10837. ),
  10838. 'foreign keys' => array(
  10839. ),
  10840. );
  10841. return $description;
  10842. }
  10843. /**
  10844. * Implements hook_dbxrefprop_schema()
  10845. * Purpose: To describe the structure of dbxrefprop to tripal
  10846. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10847. * @see tripal_core.api.inc: tripal_core_chado_update()
  10848. * @see tripal_core.api.inc: tripal_core_chado_select()
  10849. *
  10850. * @return
  10851. * An array describing the current table
  10852. *
  10853. * @ingroup tripal_schema_api
  10854. *
  10855. */
  10856. function tripal_core_chado_dbxrefprop_schema () {
  10857. $description = array();
  10858. $description = array(
  10859. 'table' => 'dbxrefprop',
  10860. // 'description' => 'TODO: please describe this table!',
  10861. 'fields' => array(
  10862. 'dbxrefprop_id' => array(
  10863. // 'description' => 'TODO: please describe this field!',
  10864. 'type' => 'serial',
  10865. 'not null' => '1',
  10866. ),
  10867. 'dbxref_id' => array(
  10868. // 'description' => 'TODO: please describe this field!',
  10869. 'type' => 'int',
  10870. 'not null' => '1',
  10871. ),
  10872. 'type_id' => array(
  10873. // 'description' => 'TODO: please describe this field!',
  10874. 'type' => 'int',
  10875. 'not null' => '1',
  10876. ),
  10877. 'value' => array(
  10878. // 'description' => 'TODO: please describe this field!',
  10879. 'type' => 'text',
  10880. 'not null' => '1',
  10881. 'default' => '',
  10882. ),
  10883. 'rank' => array(
  10884. // 'description' => 'TODO: please describe this field!',
  10885. 'type' => 'int',
  10886. 'not null' => '1',
  10887. 'default' => '0',
  10888. ),
  10889. ),
  10890. 'primary key' => array(
  10891. '0' => 'dbxrefprop_id',
  10892. ),
  10893. 'unique keys' => array(
  10894. 'dbxrefprop_c1' => array(
  10895. '0' => 'dbxref_id',
  10896. '1' => 'type_id',
  10897. '2' => 'rank',
  10898. ),
  10899. ),
  10900. 'indexes' => array(
  10901. 'dbxrefprop_idx1' => array(
  10902. '0' => 'dbxref_id',
  10903. ),
  10904. 'dbxrefprop_idx2' => array(
  10905. '0' => 'type_id',
  10906. ),
  10907. ),
  10908. 'foreign keys' => array(
  10909. ),
  10910. );
  10911. return $description;
  10912. }
  10913. /**
  10914. * Implements hook_dfeatureloc_schema()
  10915. * Purpose: To describe the structure of dfeatureloc to tripal
  10916. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10917. * @see tripal_core.api.inc: tripal_core_chado_update()
  10918. * @see tripal_core.api.inc: tripal_core_chado_select()
  10919. *
  10920. * @return
  10921. * An array describing the current table
  10922. *
  10923. * @ingroup tripal_schema_api
  10924. *
  10925. */
  10926. function tripal_core_chado_dfeatureloc_schema () {
  10927. $description = array();
  10928. $description = array(
  10929. 'table' => 'dfeatureloc',
  10930. // 'description' => 'TODO: please describe this table!',
  10931. 'fields' => array(
  10932. 'featureloc_id' => array(
  10933. // 'description' => 'TODO: please describe this field!',
  10934. 'type' => 'int',
  10935. 'not null' => '',
  10936. ),
  10937. 'feature_id' => array(
  10938. // 'description' => 'TODO: please describe this field!',
  10939. 'type' => 'int',
  10940. 'not null' => '',
  10941. ),
  10942. 'srcfeature_id' => array(
  10943. // 'description' => 'TODO: please describe this field!',
  10944. 'type' => 'int',
  10945. 'not null' => '',
  10946. ),
  10947. 'nbeg' => array(
  10948. // 'description' => 'TODO: please describe this field!',
  10949. 'type' => 'int',
  10950. 'not null' => '',
  10951. ),
  10952. 'is_nbeg_partial' => array(
  10953. // 'description' => 'TODO: please describe this field!',
  10954. 'type' => 'boolean',
  10955. 'not null' => '',
  10956. ),
  10957. 'nend' => array(
  10958. // 'description' => 'TODO: please describe this field!',
  10959. 'type' => 'int',
  10960. 'not null' => '',
  10961. ),
  10962. 'is_nend_partial' => array(
  10963. // 'description' => 'TODO: please describe this field!',
  10964. 'type' => 'boolean',
  10965. 'not null' => '',
  10966. ),
  10967. 'strand' => array(
  10968. // 'description' => 'TODO: please describe this field!',
  10969. 'type' => 'int',
  10970. 'size' => 'small',
  10971. 'not null' => '',
  10972. ),
  10973. 'phase' => array(
  10974. // 'description' => 'TODO: please describe this field!',
  10975. 'type' => 'int',
  10976. 'not null' => '',
  10977. ),
  10978. 'residue_info' => array(
  10979. // 'description' => 'TODO: please describe this field!',
  10980. 'type' => 'text',
  10981. 'not null' => '',
  10982. ),
  10983. 'locgroup' => array(
  10984. // 'description' => 'TODO: please describe this field!',
  10985. 'type' => 'int',
  10986. 'not null' => '',
  10987. ),
  10988. 'rank' => array(
  10989. // 'description' => 'TODO: please describe this field!',
  10990. 'type' => 'int',
  10991. 'not null' => '',
  10992. ),
  10993. ),
  10994. 'primary key' => array(
  10995. ),
  10996. 'unique keys' => array(
  10997. ),
  10998. 'indexes' => array(
  10999. ),
  11000. 'foreign keys' => array(
  11001. ),
  11002. );
  11003. return $description;
  11004. }
  11005. /**
  11006. * Implements hook_db_schema()
  11007. * Purpose: To describe the structure of db to tripal
  11008. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11009. * @see tripal_core.api.inc: tripal_core_chado_update()
  11010. * @see tripal_core.api.inc: tripal_core_chado_select()
  11011. *
  11012. * @return
  11013. * An array describing the current table
  11014. *
  11015. * @ingroup tripal_schema_api
  11016. *
  11017. */
  11018. function tripal_core_chado_db_schema () {
  11019. $description = array();
  11020. $description = array(
  11021. 'table' => 'db',
  11022. // 'description' => 'TODO: please describe this table!',
  11023. 'fields' => array(
  11024. 'db_id' => array(
  11025. // 'description' => 'TODO: please describe this field!',
  11026. 'type' => 'serial',
  11027. 'not null' => '1',
  11028. ),
  11029. 'name' => array(
  11030. // 'description' => 'TODO: please describe this field!',
  11031. 'type' => 'varchar',
  11032. 'length' => '255',
  11033. 'not null' => '1',
  11034. ),
  11035. 'description' => array(
  11036. // 'description' => 'TODO: please describe this field!',
  11037. 'type' => 'varchar',
  11038. 'length' => '255',
  11039. 'not null' => '',
  11040. ),
  11041. 'urlprefix' => array(
  11042. // 'description' => 'TODO: please describe this field!',
  11043. 'type' => 'varchar',
  11044. 'length' => '255',
  11045. 'not null' => '',
  11046. ),
  11047. 'url' => array(
  11048. // 'description' => 'TODO: please describe this field!',
  11049. 'type' => 'varchar',
  11050. 'length' => '255',
  11051. 'not null' => '',
  11052. ),
  11053. ),
  11054. 'primary key' => array(
  11055. '0' => 'db_id',
  11056. ),
  11057. 'unique keys' => array(
  11058. 'db_c1' => array(
  11059. '0' => 'name',
  11060. ),
  11061. ),
  11062. 'indexes' => array(
  11063. ),
  11064. 'foreign keys' => array(
  11065. ),
  11066. );
  11067. return $description;
  11068. }
  11069. /**
  11070. * Implements hook_cvtermsynonym_schema()
  11071. * Purpose: To describe the structure of cvtermsynonym to tripal
  11072. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11073. * @see tripal_core.api.inc: tripal_core_chado_update()
  11074. * @see tripal_core.api.inc: tripal_core_chado_select()
  11075. *
  11076. * @return
  11077. * An array describing the current table
  11078. *
  11079. * @ingroup tripal_schema_api
  11080. *
  11081. */
  11082. function tripal_core_chado_cvtermsynonym_schema () {
  11083. $description = array();
  11084. $description = array(
  11085. 'table' => 'cvtermsynonym',
  11086. // 'description' => 'TODO: please describe this table!',
  11087. 'fields' => array(
  11088. 'cvtermsynonym_id' => array(
  11089. // 'description' => 'TODO: please describe this field!',
  11090. 'type' => 'serial',
  11091. 'not null' => '1',
  11092. ),
  11093. 'cvterm_id' => array(
  11094. // 'description' => 'TODO: please describe this field!',
  11095. 'type' => 'int',
  11096. 'not null' => '1',
  11097. ),
  11098. 'synonym' => array(
  11099. // 'description' => 'TODO: please describe this field!',
  11100. 'type' => 'varchar',
  11101. 'length' => '1024',
  11102. 'not null' => '1',
  11103. ),
  11104. 'type_id' => array(
  11105. // 'description' => 'TODO: please describe this field!',
  11106. 'type' => 'int',
  11107. 'not null' => '',
  11108. ),
  11109. ),
  11110. 'primary key' => array(
  11111. '0' => 'cvtermsynonym_id',
  11112. ),
  11113. 'unique keys' => array(
  11114. 'cvtermsynonym_c1' => array(
  11115. '0' => 'cvterm_id',
  11116. '1' => 'synonym',
  11117. ),
  11118. ),
  11119. 'indexes' => array(
  11120. 'cvtermsynonym_idx1' => array(
  11121. '0' => 'cvterm_id',
  11122. ),
  11123. ),
  11124. 'foreign keys' => array(
  11125. ),
  11126. );
  11127. return $description;
  11128. }
  11129. /**
  11130. * Implements hook_cvterm_dbxref_schema()
  11131. * Purpose: To describe the structure of cvterm_dbxref to tripal
  11132. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11133. * @see tripal_core.api.inc: tripal_core_chado_update()
  11134. * @see tripal_core.api.inc: tripal_core_chado_select()
  11135. *
  11136. * @return
  11137. * An array describing the current table
  11138. *
  11139. * @ingroup tripal_schema_api
  11140. *
  11141. */
  11142. function tripal_core_chado_cvterm_dbxref_schema () {
  11143. $description = array();
  11144. $description = array(
  11145. 'table' => 'cvterm_dbxref',
  11146. // 'description' => 'TODO: please describe this table!',
  11147. 'fields' => array(
  11148. 'cvterm_dbxref_id' => array(
  11149. // 'description' => 'TODO: please describe this field!',
  11150. 'type' => 'serial',
  11151. 'not null' => '1',
  11152. ),
  11153. 'cvterm_id' => array(
  11154. // 'description' => 'TODO: please describe this field!',
  11155. 'type' => 'int',
  11156. 'not null' => '1',
  11157. ),
  11158. 'dbxref_id' => array(
  11159. // 'description' => 'TODO: please describe this field!',
  11160. 'type' => 'int',
  11161. 'not null' => '1',
  11162. ),
  11163. 'is_for_definition' => array(
  11164. // 'description' => 'TODO: please describe this field!',
  11165. 'type' => 'int',
  11166. 'not null' => '1',
  11167. 'default' => '0',
  11168. ),
  11169. ),
  11170. 'primary key' => array(
  11171. '0' => 'cvterm_dbxref_id',
  11172. ),
  11173. 'unique keys' => array(
  11174. 'cvterm_dbxref_c1' => array(
  11175. '0' => 'cvterm_id',
  11176. '1' => 'dbxref_id',
  11177. ),
  11178. ),
  11179. 'indexes' => array(
  11180. 'cvterm_dbxref_idx1' => array(
  11181. '0' => 'cvterm_id',
  11182. ),
  11183. 'cvterm_dbxref_idx2' => array(
  11184. '0' => 'dbxref_id',
  11185. ),
  11186. ),
  11187. 'foreign keys' => array(
  11188. ),
  11189. );
  11190. return $description;
  11191. }
  11192. /**
  11193. * Implements hook_cvterm_relationship_schema()
  11194. * Purpose: To describe the structure of cvterm_relationship to tripal
  11195. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11196. * @see tripal_core.api.inc: tripal_core_chado_update()
  11197. * @see tripal_core.api.inc: tripal_core_chado_select()
  11198. *
  11199. * @return
  11200. * An array describing the current table
  11201. *
  11202. * @ingroup tripal_schema_api
  11203. *
  11204. */
  11205. function tripal_core_chado_cvterm_relationship_schema () {
  11206. $description = array();
  11207. $description = array(
  11208. 'table' => 'cvterm_relationship',
  11209. // 'description' => 'TODO: please describe this table!',
  11210. 'fields' => array(
  11211. 'cvterm_relationship_id' => array(
  11212. // 'description' => 'TODO: please describe this field!',
  11213. 'type' => 'serial',
  11214. 'not null' => '1',
  11215. ),
  11216. 'type_id' => array(
  11217. // 'description' => 'TODO: please describe this field!',
  11218. 'type' => 'int',
  11219. 'not null' => '1',
  11220. ),
  11221. 'subject_id' => array(
  11222. // 'description' => 'TODO: please describe this field!',
  11223. 'type' => 'int',
  11224. 'not null' => '1',
  11225. ),
  11226. 'object_id' => array(
  11227. // 'description' => 'TODO: please describe this field!',
  11228. 'type' => 'int',
  11229. 'not null' => '1',
  11230. ),
  11231. ),
  11232. 'primary key' => array(
  11233. '0' => 'cvterm_relationship_id',
  11234. ),
  11235. 'unique keys' => array(
  11236. 'cvterm_relationship_c1' => array(
  11237. '0' => 'subject_id',
  11238. '1' => 'object_id',
  11239. '2' => 'type_id',
  11240. ),
  11241. ),
  11242. 'indexes' => array(
  11243. 'cvterm_relationship_idx1' => array(
  11244. '0' => 'type_id',
  11245. ),
  11246. 'cvterm_relationship_idx2' => array(
  11247. '0' => 'subject_id',
  11248. ),
  11249. 'cvterm_relationship_idx3' => array(
  11250. '0' => 'object_id',
  11251. ),
  11252. ),
  11253. 'foreign keys' => array(
  11254. ),
  11255. );
  11256. return $description;
  11257. }
  11258. /**
  11259. * Implements hook_cvtermpath_schema()
  11260. * Purpose: To describe the structure of cvtermpath to tripal
  11261. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11262. * @see tripal_core.api.inc: tripal_core_chado_update()
  11263. * @see tripal_core.api.inc: tripal_core_chado_select()
  11264. *
  11265. * @return
  11266. * An array describing the current table
  11267. *
  11268. * @ingroup tripal_schema_api
  11269. *
  11270. */
  11271. function tripal_core_chado_cvtermpath_schema () {
  11272. $description = array();
  11273. $description = array(
  11274. 'table' => 'cvtermpath',
  11275. // 'description' => 'TODO: please describe this table!',
  11276. 'fields' => array(
  11277. 'cvtermpath_id' => array(
  11278. // 'description' => 'TODO: please describe this field!',
  11279. 'type' => 'serial',
  11280. 'not null' => '1',
  11281. ),
  11282. 'type_id' => array(
  11283. // 'description' => 'TODO: please describe this field!',
  11284. 'type' => 'int',
  11285. 'not null' => '',
  11286. ),
  11287. 'subject_id' => array(
  11288. // 'description' => 'TODO: please describe this field!',
  11289. 'type' => 'int',
  11290. 'not null' => '1',
  11291. ),
  11292. 'object_id' => array(
  11293. // 'description' => 'TODO: please describe this field!',
  11294. 'type' => 'int',
  11295. 'not null' => '1',
  11296. ),
  11297. 'cv_id' => array(
  11298. // 'description' => 'TODO: please describe this field!',
  11299. 'type' => 'int',
  11300. 'not null' => '1',
  11301. ),
  11302. 'pathdistance' => array(
  11303. // 'description' => 'TODO: please describe this field!',
  11304. 'type' => 'int',
  11305. 'not null' => '',
  11306. ),
  11307. ),
  11308. 'primary key' => array(
  11309. '0' => 'cvtermpath_id',
  11310. ),
  11311. 'unique keys' => array(
  11312. 'cvtermpath_c1' => array(
  11313. '0' => 'subject_id',
  11314. '1' => 'object_id',
  11315. '2' => 'type_id',
  11316. '3' => 'pathdistance',
  11317. ),
  11318. ),
  11319. 'indexes' => array(
  11320. 'cvtermpath_idx1' => array(
  11321. '0' => 'type_id',
  11322. ),
  11323. 'cvtermpath_idx2' => array(
  11324. '0' => 'subject_id',
  11325. ),
  11326. 'cvtermpath_idx3' => array(
  11327. '0' => 'object_id',
  11328. ),
  11329. 'cvtermpath_idx4' => array(
  11330. '0' => 'cv_id',
  11331. ),
  11332. ),
  11333. 'foreign keys' => array(
  11334. ),
  11335. );
  11336. return $description;
  11337. }
  11338. /**
  11339. * Implements hook_cvtermprop_schema()
  11340. * Purpose: To describe the structure of cvtermprop to tripal
  11341. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11342. * @see tripal_core.api.inc: tripal_core_chado_update()
  11343. * @see tripal_core.api.inc: tripal_core_chado_select()
  11344. *
  11345. * @return
  11346. * An array describing the current table
  11347. *
  11348. * @ingroup tripal_schema_api
  11349. *
  11350. */
  11351. function tripal_core_chado_cvtermprop_schema () {
  11352. $description = array();
  11353. $description = array(
  11354. 'table' => 'cvtermprop',
  11355. // 'description' => 'TODO: please describe this table!',
  11356. 'fields' => array(
  11357. 'cvtermprop_id' => array(
  11358. // 'description' => 'TODO: please describe this field!',
  11359. 'type' => 'serial',
  11360. 'not null' => '1',
  11361. ),
  11362. 'cvterm_id' => array(
  11363. // 'description' => 'TODO: please describe this field!',
  11364. 'type' => 'int',
  11365. 'not null' => '1',
  11366. ),
  11367. 'type_id' => array(
  11368. // 'description' => 'TODO: please describe this field!',
  11369. 'type' => 'int',
  11370. 'not null' => '1',
  11371. ),
  11372. 'value' => array(
  11373. // 'description' => 'TODO: please describe this field!',
  11374. 'type' => 'text',
  11375. 'not null' => '1',
  11376. 'default' => '',
  11377. ),
  11378. 'rank' => array(
  11379. // 'description' => 'TODO: please describe this field!',
  11380. 'type' => 'int',
  11381. 'not null' => '1',
  11382. 'default' => '0',
  11383. ),
  11384. ),
  11385. 'primary key' => array(
  11386. '0' => 'cvtermprop_id',
  11387. ),
  11388. 'unique keys' => array(
  11389. 'cvterm_id' => array(
  11390. '0' => 'cvterm_id',
  11391. '1' => 'type_id',
  11392. '2' => 'value',
  11393. '3' => 'rank',
  11394. ),
  11395. ),
  11396. 'indexes' => array(
  11397. 'cvtermprop_idx1' => array(
  11398. '0' => 'cvterm_id',
  11399. ),
  11400. 'cvtermprop_idx2' => array(
  11401. '0' => 'type_id',
  11402. ),
  11403. ),
  11404. 'foreign keys' => array(
  11405. ),
  11406. );
  11407. return $description;
  11408. }
  11409. /**
  11410. * Implements hook_eimage_schema()
  11411. * Purpose: To describe the structure of eimage to tripal
  11412. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11413. * @see tripal_core.api.inc: tripal_core_chado_update()
  11414. * @see tripal_core.api.inc: tripal_core_chado_select()
  11415. *
  11416. * @return
  11417. * An array describing the current table
  11418. *
  11419. * @ingroup tripal_schema_api
  11420. *
  11421. */
  11422. function tripal_core_chado_eimage_schema () {
  11423. $description = array();
  11424. $description = array(
  11425. 'table' => 'eimage',
  11426. // 'description' => 'TODO: please describe this table!',
  11427. 'fields' => array(
  11428. 'eimage_id' => array(
  11429. // 'description' => 'TODO: please describe this field!',
  11430. 'type' => 'serial',
  11431. 'not null' => '1',
  11432. ),
  11433. 'eimage_data' => array(
  11434. // 'description' => 'TODO: please describe this field!',
  11435. 'type' => 'text',
  11436. 'not null' => '',
  11437. ),
  11438. 'eimage_type' => array(
  11439. // 'description' => 'TODO: please describe this field!',
  11440. 'type' => 'varchar',
  11441. 'length' => '255',
  11442. 'not null' => '1',
  11443. ),
  11444. 'image_uri' => array(
  11445. // 'description' => 'TODO: please describe this field!',
  11446. 'type' => 'varchar',
  11447. 'length' => '255',
  11448. 'not null' => '',
  11449. ),
  11450. ),
  11451. 'primary key' => array(
  11452. '0' => 'eimage_id',
  11453. ),
  11454. 'unique keys' => array(
  11455. ),
  11456. 'indexes' => array(
  11457. ),
  11458. 'foreign keys' => array(
  11459. ),
  11460. );
  11461. return $description;
  11462. }
  11463. /**
  11464. * Implements hook_element_schema()
  11465. * Purpose: To describe the structure of element to tripal
  11466. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11467. * @see tripal_core.api.inc: tripal_core_chado_update()
  11468. * @see tripal_core.api.inc: tripal_core_chado_select()
  11469. *
  11470. * @return
  11471. * An array describing the current table
  11472. *
  11473. * @ingroup tripal_schema_api
  11474. *
  11475. */
  11476. function tripal_core_chado_element_schema () {
  11477. $description = array();
  11478. $description = array(
  11479. 'table' => 'element',
  11480. // 'description' => 'TODO: please describe this table!',
  11481. 'fields' => array(
  11482. 'element_id' => array(
  11483. // 'description' => 'TODO: please describe this field!',
  11484. 'type' => 'serial',
  11485. 'not null' => '1',
  11486. ),
  11487. 'feature_id' => array(
  11488. // 'description' => 'TODO: please describe this field!',
  11489. 'type' => 'int',
  11490. 'not null' => '',
  11491. ),
  11492. 'arraydesign_id' => array(
  11493. // 'description' => 'TODO: please describe this field!',
  11494. 'type' => 'int',
  11495. 'not null' => '1',
  11496. ),
  11497. 'type_id' => array(
  11498. // 'description' => 'TODO: please describe this field!',
  11499. 'type' => 'int',
  11500. 'not null' => '',
  11501. ),
  11502. 'dbxref_id' => array(
  11503. // 'description' => 'TODO: please describe this field!',
  11504. 'type' => 'int',
  11505. 'not null' => '',
  11506. ),
  11507. ),
  11508. 'primary key' => array(
  11509. '0' => 'element_id',
  11510. ),
  11511. 'unique keys' => array(
  11512. 'element_c1' => array(
  11513. '0' => 'feature_id',
  11514. '1' => 'arraydesign_id',
  11515. ),
  11516. ),
  11517. 'indexes' => array(
  11518. 'element_idx1' => array(
  11519. '0' => 'feature_id',
  11520. ),
  11521. 'element_idx2' => array(
  11522. '0' => 'arraydesign_id',
  11523. ),
  11524. 'element_idx3' => array(
  11525. '0' => 'type_id',
  11526. ),
  11527. 'element_idx4' => array(
  11528. '0' => 'dbxref_id',
  11529. ),
  11530. ),
  11531. 'foreign keys' => array(
  11532. ),
  11533. );
  11534. return $description;
  11535. }
  11536. /**
  11537. * Implements hook_expression_cvterm_schema()
  11538. * Purpose: To describe the structure of expression_cvterm to tripal
  11539. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11540. * @see tripal_core.api.inc: tripal_core_chado_update()
  11541. * @see tripal_core.api.inc: tripal_core_chado_select()
  11542. *
  11543. * @return
  11544. * An array describing the current table
  11545. *
  11546. * @ingroup tripal_schema_api
  11547. *
  11548. */
  11549. function tripal_core_chado_expression_cvterm_schema () {
  11550. $description = array();
  11551. $description = array(
  11552. 'table' => 'expression_cvterm',
  11553. // 'description' => 'TODO: please describe this table!',
  11554. 'fields' => array(
  11555. 'expression_cvterm_id' => array(
  11556. // 'description' => 'TODO: please describe this field!',
  11557. 'type' => 'serial',
  11558. 'not null' => '1',
  11559. ),
  11560. 'expression_id' => array(
  11561. // 'description' => 'TODO: please describe this field!',
  11562. 'type' => 'int',
  11563. 'not null' => '1',
  11564. ),
  11565. 'cvterm_id' => array(
  11566. // 'description' => 'TODO: please describe this field!',
  11567. 'type' => 'int',
  11568. 'not null' => '1',
  11569. ),
  11570. 'rank' => array(
  11571. // 'description' => 'TODO: please describe this field!',
  11572. 'type' => 'int',
  11573. 'not null' => '1',
  11574. 'default' => '0',
  11575. ),
  11576. 'cvterm_type_id' => array(
  11577. // 'description' => 'TODO: please describe this field!',
  11578. 'type' => 'int',
  11579. 'not null' => '1',
  11580. ),
  11581. ),
  11582. 'primary key' => array(
  11583. '0' => 'expression_cvterm_id',
  11584. ),
  11585. 'unique keys' => array(
  11586. 'expression_cvterm_c1' => array(
  11587. '0' => 'expression_id',
  11588. '1' => 'cvterm_id',
  11589. '2' => 'cvterm_type_id',
  11590. ),
  11591. ),
  11592. 'indexes' => array(
  11593. 'expression_cvterm_idx1' => array(
  11594. '0' => 'expression_id',
  11595. ),
  11596. 'expression_cvterm_idx2' => array(
  11597. '0' => 'cvterm_id',
  11598. ),
  11599. 'expression_cvterm_idx3' => array(
  11600. '0' => 'cvterm_type_id',
  11601. ),
  11602. ),
  11603. 'foreign keys' => array(
  11604. ),
  11605. );
  11606. return $description;
  11607. }
  11608. /**
  11609. * Implements hook_expression_cvtermprop_schema()
  11610. * Purpose: To describe the structure of expression_cvtermprop to tripal
  11611. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11612. * @see tripal_core.api.inc: tripal_core_chado_update()
  11613. * @see tripal_core.api.inc: tripal_core_chado_select()
  11614. *
  11615. * @return
  11616. * An array describing the current table
  11617. *
  11618. * @ingroup tripal_schema_api
  11619. *
  11620. */
  11621. function tripal_core_chado_expression_cvtermprop_schema () {
  11622. $description = array();
  11623. $description = array(
  11624. 'table' => 'expression_cvtermprop',
  11625. // 'description' => 'TODO: please describe this table!',
  11626. 'fields' => array(
  11627. 'expression_cvtermprop_id' => array(
  11628. // 'description' => 'TODO: please describe this field!',
  11629. 'type' => 'serial',
  11630. 'not null' => '1',
  11631. ),
  11632. 'expression_cvterm_id' => array(
  11633. // 'description' => 'TODO: please describe this field!',
  11634. 'type' => 'int',
  11635. 'not null' => '1',
  11636. ),
  11637. 'type_id' => array(
  11638. // 'description' => 'TODO: please describe this field!',
  11639. 'type' => 'int',
  11640. 'not null' => '1',
  11641. ),
  11642. 'value' => array(
  11643. // 'description' => 'TODO: please describe this field!',
  11644. 'type' => 'text',
  11645. 'not null' => '',
  11646. ),
  11647. 'rank' => array(
  11648. // 'description' => 'TODO: please describe this field!',
  11649. 'type' => 'int',
  11650. 'not null' => '1',
  11651. 'default' => '0',
  11652. ),
  11653. ),
  11654. 'primary key' => array(
  11655. '0' => 'expression_cvtermprop_id',
  11656. ),
  11657. 'unique keys' => array(
  11658. 'expression_cvtermprop_c1' => array(
  11659. '0' => 'expression_cvterm_id',
  11660. '1' => 'type_id',
  11661. '2' => 'rank',
  11662. ),
  11663. ),
  11664. 'indexes' => array(
  11665. 'expression_cvtermprop_idx1' => array(
  11666. '0' => 'expression_cvterm_id',
  11667. ),
  11668. 'expression_cvtermprop_idx2' => array(
  11669. '0' => 'type_id',
  11670. ),
  11671. ),
  11672. 'foreign keys' => array(
  11673. ),
  11674. );
  11675. return $description;
  11676. }
  11677. /**
  11678. * Implements hook_expression_image_schema()
  11679. * Purpose: To describe the structure of expression_image to tripal
  11680. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11681. * @see tripal_core.api.inc: tripal_core_chado_update()
  11682. * @see tripal_core.api.inc: tripal_core_chado_select()
  11683. *
  11684. * @return
  11685. * An array describing the current table
  11686. *
  11687. * @ingroup tripal_schema_api
  11688. *
  11689. */
  11690. function tripal_core_chado_expression_image_schema () {
  11691. $description = array();
  11692. $description = array(
  11693. 'table' => 'expression_image',
  11694. // 'description' => 'TODO: please describe this table!',
  11695. 'fields' => array(
  11696. 'expression_image_id' => array(
  11697. // 'description' => 'TODO: please describe this field!',
  11698. 'type' => 'serial',
  11699. 'not null' => '1',
  11700. ),
  11701. 'expression_id' => array(
  11702. // 'description' => 'TODO: please describe this field!',
  11703. 'type' => 'int',
  11704. 'not null' => '1',
  11705. ),
  11706. 'eimage_id' => array(
  11707. // 'description' => 'TODO: please describe this field!',
  11708. 'type' => 'int',
  11709. 'not null' => '1',
  11710. ),
  11711. ),
  11712. 'primary key' => array(
  11713. '0' => 'expression_image_id',
  11714. ),
  11715. 'unique keys' => array(
  11716. 'expression_image_c1' => array(
  11717. '0' => 'expression_id',
  11718. '1' => 'eimage_id',
  11719. ),
  11720. ),
  11721. 'indexes' => array(
  11722. 'expression_image_idx1' => array(
  11723. '0' => 'expression_id',
  11724. ),
  11725. 'expression_image_idx2' => array(
  11726. '0' => 'eimage_id',
  11727. ),
  11728. ),
  11729. 'foreign keys' => array(
  11730. ),
  11731. );
  11732. return $description;
  11733. }
  11734. /**
  11735. * Implements hook_expression_pub_schema()
  11736. * Purpose: To describe the structure of expression_pub to tripal
  11737. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11738. * @see tripal_core.api.inc: tripal_core_chado_update()
  11739. * @see tripal_core.api.inc: tripal_core_chado_select()
  11740. *
  11741. * @return
  11742. * An array describing the current table
  11743. *
  11744. * @ingroup tripal_schema_api
  11745. *
  11746. */
  11747. function tripal_core_chado_expression_pub_schema () {
  11748. $description = array();
  11749. $description = array(
  11750. 'table' => 'expression_pub',
  11751. // 'description' => 'TODO: please describe this table!',
  11752. 'fields' => array(
  11753. 'expression_pub_id' => array(
  11754. // 'description' => 'TODO: please describe this field!',
  11755. 'type' => 'serial',
  11756. 'not null' => '1',
  11757. ),
  11758. 'expression_id' => array(
  11759. // 'description' => 'TODO: please describe this field!',
  11760. 'type' => 'int',
  11761. 'not null' => '1',
  11762. ),
  11763. 'pub_id' => array(
  11764. // 'description' => 'TODO: please describe this field!',
  11765. 'type' => 'int',
  11766. 'not null' => '1',
  11767. ),
  11768. ),
  11769. 'primary key' => array(
  11770. '0' => 'expression_pub_id',
  11771. ),
  11772. 'unique keys' => array(
  11773. 'expression_pub_c1' => array(
  11774. '0' => 'expression_id',
  11775. '1' => 'pub_id',
  11776. ),
  11777. ),
  11778. 'indexes' => array(
  11779. 'expression_pub_idx1' => array(
  11780. '0' => 'expression_id',
  11781. ),
  11782. 'expression_pub_idx2' => array(
  11783. '0' => 'pub_id',
  11784. ),
  11785. ),
  11786. 'foreign keys' => array(
  11787. ),
  11788. );
  11789. return $description;
  11790. }
  11791. /**
  11792. * Implements hook_expression_schema()
  11793. * Purpose: To describe the structure of expression to tripal
  11794. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11795. * @see tripal_core.api.inc: tripal_core_chado_update()
  11796. * @see tripal_core.api.inc: tripal_core_chado_select()
  11797. *
  11798. * @return
  11799. * An array describing the current table
  11800. *
  11801. * @ingroup tripal_schema_api
  11802. *
  11803. */
  11804. function tripal_core_chado_expression_schema () {
  11805. $description = array();
  11806. $description = array(
  11807. 'table' => 'expression',
  11808. // 'description' => 'TODO: please describe this table!',
  11809. 'fields' => array(
  11810. 'expression_id' => array(
  11811. // 'description' => 'TODO: please describe this field!',
  11812. 'type' => 'serial',
  11813. 'not null' => '1',
  11814. ),
  11815. 'uniquename' => array(
  11816. // 'description' => 'TODO: please describe this field!',
  11817. 'type' => 'text',
  11818. 'not null' => '1',
  11819. ),
  11820. 'md5checksum' => array(
  11821. // 'description' => 'TODO: please describe this field!',
  11822. 'type' => 'char',
  11823. 'length' => '32',
  11824. 'not null' => '',
  11825. ),
  11826. 'description' => array(
  11827. // 'description' => 'TODO: please describe this field!',
  11828. 'type' => 'text',
  11829. 'not null' => '',
  11830. ),
  11831. ),
  11832. 'primary key' => array(
  11833. '0' => 'expression_id',
  11834. ),
  11835. 'unique keys' => array(
  11836. 'expression_c1' => array(
  11837. '0' => 'uniquename',
  11838. ),
  11839. ),
  11840. 'indexes' => array(
  11841. ),
  11842. 'foreign keys' => array(
  11843. ),
  11844. );
  11845. return $description;
  11846. }
  11847. /**
  11848. * Implements hook_environment_cvterm_schema()
  11849. * Purpose: To describe the structure of environment_cvterm to tripal
  11850. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11851. * @see tripal_core.api.inc: tripal_core_chado_update()
  11852. * @see tripal_core.api.inc: tripal_core_chado_select()
  11853. *
  11854. * @return
  11855. * An array describing the current table
  11856. *
  11857. * @ingroup tripal_schema_api
  11858. *
  11859. */
  11860. function tripal_core_chado_environment_cvterm_schema () {
  11861. $description = array();
  11862. $description = array(
  11863. 'table' => 'environment_cvterm',
  11864. // 'description' => 'TODO: please describe this table!',
  11865. 'fields' => array(
  11866. 'environment_cvterm_id' => array(
  11867. // 'description' => 'TODO: please describe this field!',
  11868. 'type' => 'serial',
  11869. 'not null' => '1',
  11870. ),
  11871. 'environment_id' => array(
  11872. // 'description' => 'TODO: please describe this field!',
  11873. 'type' => 'int',
  11874. 'not null' => '1',
  11875. ),
  11876. 'cvterm_id' => array(
  11877. // 'description' => 'TODO: please describe this field!',
  11878. 'type' => 'int',
  11879. 'not null' => '1',
  11880. ),
  11881. ),
  11882. 'primary key' => array(
  11883. '0' => 'environment_cvterm_id',
  11884. ),
  11885. 'unique keys' => array(
  11886. 'environment_cvterm_c1' => array(
  11887. '0' => 'environment_id',
  11888. '1' => 'cvterm_id',
  11889. ),
  11890. ),
  11891. 'indexes' => array(
  11892. 'environment_cvterm_idx1' => array(
  11893. '0' => 'environment_id',
  11894. ),
  11895. 'environment_cvterm_idx2' => array(
  11896. '0' => 'cvterm_id',
  11897. ),
  11898. ),
  11899. 'foreign keys' => array(
  11900. ),
  11901. );
  11902. return $description;
  11903. }
  11904. /**
  11905. * Implements hook_element_relationship_schema()
  11906. * Purpose: To describe the structure of element_relationship to tripal
  11907. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11908. * @see tripal_core.api.inc: tripal_core_chado_update()
  11909. * @see tripal_core.api.inc: tripal_core_chado_select()
  11910. *
  11911. * @return
  11912. * An array describing the current table
  11913. *
  11914. * @ingroup tripal_schema_api
  11915. *
  11916. */
  11917. function tripal_core_chado_element_relationship_schema () {
  11918. $description = array();
  11919. $description = array(
  11920. 'table' => 'element_relationship',
  11921. // 'description' => 'TODO: please describe this table!',
  11922. 'fields' => array(
  11923. 'element_relationship_id' => array(
  11924. // 'description' => 'TODO: please describe this field!',
  11925. 'type' => 'serial',
  11926. 'not null' => '1',
  11927. ),
  11928. 'subject_id' => array(
  11929. // 'description' => 'TODO: please describe this field!',
  11930. 'type' => 'int',
  11931. 'not null' => '1',
  11932. ),
  11933. 'type_id' => array(
  11934. // 'description' => 'TODO: please describe this field!',
  11935. 'type' => 'int',
  11936. 'not null' => '1',
  11937. ),
  11938. 'object_id' => array(
  11939. // 'description' => 'TODO: please describe this field!',
  11940. 'type' => 'int',
  11941. 'not null' => '1',
  11942. ),
  11943. 'value' => array(
  11944. // 'description' => 'TODO: please describe this field!',
  11945. 'type' => 'text',
  11946. 'not null' => '',
  11947. ),
  11948. 'rank' => array(
  11949. // 'description' => 'TODO: please describe this field!',
  11950. 'type' => 'int',
  11951. 'not null' => '1',
  11952. 'default' => '0',
  11953. ),
  11954. ),
  11955. 'primary key' => array(
  11956. '0' => 'element_relationship_id',
  11957. ),
  11958. 'unique keys' => array(
  11959. 'element_relationship_c1' => array(
  11960. '0' => 'subject_id',
  11961. '1' => 'object_id',
  11962. '2' => 'type_id',
  11963. '3' => 'rank',
  11964. ),
  11965. ),
  11966. 'indexes' => array(
  11967. 'element_relationship_idx1' => array(
  11968. '0' => 'subject_id',
  11969. ),
  11970. 'element_relationship_idx2' => array(
  11971. '0' => 'type_id',
  11972. ),
  11973. 'element_relationship_idx3' => array(
  11974. '0' => 'object_id',
  11975. ),
  11976. 'element_relationship_idx4' => array(
  11977. '0' => 'value',
  11978. ),
  11979. ),
  11980. 'foreign keys' => array(
  11981. ),
  11982. );
  11983. return $description;
  11984. }
  11985. /**
  11986. * Implements hook_elementresult_schema()
  11987. * Purpose: To describe the structure of elementresult to tripal
  11988. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11989. * @see tripal_core.api.inc: tripal_core_chado_update()
  11990. * @see tripal_core.api.inc: tripal_core_chado_select()
  11991. *
  11992. * @return
  11993. * An array describing the current table
  11994. *
  11995. * @ingroup tripal_schema_api
  11996. *
  11997. */
  11998. function tripal_core_chado_elementresult_schema () {
  11999. $description = array();
  12000. $description = array(
  12001. 'table' => 'elementresult',
  12002. // 'description' => 'TODO: please describe this table!',
  12003. 'fields' => array(
  12004. 'elementresult_id' => array(
  12005. // 'description' => 'TODO: please describe this field!',
  12006. 'type' => 'serial',
  12007. 'not null' => '1',
  12008. ),
  12009. 'element_id' => array(
  12010. // 'description' => 'TODO: please describe this field!',
  12011. 'type' => 'int',
  12012. 'not null' => '1',
  12013. ),
  12014. 'quantification_id' => array(
  12015. // 'description' => 'TODO: please describe this field!',
  12016. 'type' => 'int',
  12017. 'not null' => '1',
  12018. ),
  12019. 'signal' => array(
  12020. // 'description' => 'TODO: please describe this field!',
  12021. 'type' => 'float',
  12022. 'size' => 'big',
  12023. 'not null' => '1',
  12024. ),
  12025. ),
  12026. 'primary key' => array(
  12027. '0' => 'elementresult_id',
  12028. ),
  12029. 'unique keys' => array(
  12030. 'elementresult_c1' => array(
  12031. '0' => 'element_id',
  12032. '1' => 'quantification_id',
  12033. ),
  12034. ),
  12035. 'indexes' => array(
  12036. 'elementresult_idx1' => array(
  12037. '0' => 'element_id',
  12038. ),
  12039. 'elementresult_idx2' => array(
  12040. '0' => 'quantification_id',
  12041. ),
  12042. 'elementresult_idx3' => array(
  12043. '0' => 'signal',
  12044. ),
  12045. ),
  12046. 'foreign keys' => array(
  12047. ),
  12048. );
  12049. return $description;
  12050. }
  12051. /**
  12052. * Implements hook_elementresult_relationship_schema()
  12053. * Purpose: To describe the structure of elementresult_relationship to tripal
  12054. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12055. * @see tripal_core.api.inc: tripal_core_chado_update()
  12056. * @see tripal_core.api.inc: tripal_core_chado_select()
  12057. *
  12058. * @return
  12059. * An array describing the current table
  12060. *
  12061. * @ingroup tripal_schema_api
  12062. *
  12063. */
  12064. function tripal_core_chado_elementresult_relationship_schema () {
  12065. $description = array();
  12066. $description = array(
  12067. 'table' => 'elementresult_relationship',
  12068. // 'description' => 'TODO: please describe this table!',
  12069. 'fields' => array(
  12070. 'elementresult_relationship_id' => array(
  12071. // 'description' => 'TODO: please describe this field!',
  12072. 'type' => 'serial',
  12073. 'not null' => '1',
  12074. ),
  12075. 'subject_id' => array(
  12076. // 'description' => 'TODO: please describe this field!',
  12077. 'type' => 'int',
  12078. 'not null' => '1',
  12079. ),
  12080. 'type_id' => array(
  12081. // 'description' => 'TODO: please describe this field!',
  12082. 'type' => 'int',
  12083. 'not null' => '1',
  12084. ),
  12085. 'object_id' => array(
  12086. // 'description' => 'TODO: please describe this field!',
  12087. 'type' => 'int',
  12088. 'not null' => '1',
  12089. ),
  12090. 'value' => array(
  12091. // 'description' => 'TODO: please describe this field!',
  12092. 'type' => 'text',
  12093. 'not null' => '',
  12094. ),
  12095. 'rank' => array(
  12096. // 'description' => 'TODO: please describe this field!',
  12097. 'type' => 'int',
  12098. 'not null' => '1',
  12099. 'default' => '0',
  12100. ),
  12101. ),
  12102. 'primary key' => array(
  12103. '0' => 'elementresult_relationship_id',
  12104. ),
  12105. 'unique keys' => array(
  12106. 'elementresult_relationship_c1' => array(
  12107. '0' => 'subject_id',
  12108. '1' => 'object_id',
  12109. '2' => 'type_id',
  12110. '3' => 'rank',
  12111. ),
  12112. ),
  12113. 'indexes' => array(
  12114. 'elementresult_relationship_idx1' => array(
  12115. '0' => 'subject_id',
  12116. ),
  12117. 'elementresult_relationship_idx2' => array(
  12118. '0' => 'type_id',
  12119. ),
  12120. 'elementresult_relationship_idx3' => array(
  12121. '0' => 'object_id',
  12122. ),
  12123. 'elementresult_relationship_idx4' => array(
  12124. '0' => 'value',
  12125. ),
  12126. ),
  12127. 'foreign keys' => array(
  12128. ),
  12129. );
  12130. return $description;
  12131. }
  12132. /**
  12133. * Implements hook_environment_schema()
  12134. * Purpose: To describe the structure of environment to tripal
  12135. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12136. * @see tripal_core.api.inc: tripal_core_chado_update()
  12137. * @see tripal_core.api.inc: tripal_core_chado_select()
  12138. *
  12139. * @return
  12140. * An array describing the current table
  12141. *
  12142. * @ingroup tripal_schema_api
  12143. *
  12144. */
  12145. function tripal_core_chado_environment_schema () {
  12146. $description = array();
  12147. $description = array(
  12148. 'table' => 'environment',
  12149. // 'description' => 'TODO: please describe this table!',
  12150. 'fields' => array(
  12151. 'environment_id' => array(
  12152. // 'description' => 'TODO: please describe this field!',
  12153. 'type' => 'serial',
  12154. 'not null' => '1',
  12155. ),
  12156. 'uniquename' => array(
  12157. // 'description' => 'TODO: please describe this field!',
  12158. 'type' => 'text',
  12159. 'not null' => '1',
  12160. ),
  12161. 'description' => array(
  12162. // 'description' => 'TODO: please describe this field!',
  12163. 'type' => 'text',
  12164. 'not null' => '',
  12165. ),
  12166. ),
  12167. 'primary key' => array(
  12168. '0' => 'environment_id',
  12169. ),
  12170. 'unique keys' => array(
  12171. 'environment_c1' => array(
  12172. '0' => 'uniquename',
  12173. ),
  12174. ),
  12175. 'indexes' => array(
  12176. 'environment_idx1' => array(
  12177. '0' => 'uniquename',
  12178. ),
  12179. ),
  12180. 'foreign keys' => array(
  12181. ),
  12182. );
  12183. return $description;
  12184. }