Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Define MySQL functions on /dev/build


Go to End


1004 Views

Avatar
Jare

Community Member, 39 Posts

16 August 2016 at 10:52am

Hi,

I'm not sure about in which category does this topic belong to, so you can move this if needed.

What I would like to do is to define MySQL functions so that SilverStripe would automatically ensure that those functions exist in the database. I tried to find documentation for this, but didn't find anything related.

If no such feature exist, I could write some code that gets executed during the build task and that would create the functions in the database if necessary. In this case, I just need to know how to get my custom class/method executed during /dev/build? I have created several BuildTasks already, but don't know if they can be joined to the main database build task or not.

Thanks for help! :)