tripal_chado.schema_v1.11.api.inc 236 KB

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