Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Database Initialization

Hello,

I'am attempting to automated the Vanilla Forum set up and Iam running into a multitude of issues. I either need to POST a few lines to the set-up page and for every plug-in/theme I need to use or initialize the DB with the tables that set up creates (much preferred). Is there documentation around what tables/columns/values are needed for the base forum to run? Is each plug-in enable in turn a table created?

Has anyone had success Chef-ing their forum?

Thanks!

Tagged:

Comments

  • @Martialshot said:

    Is there documentation around what tables/columns/values are needed for the base forum to run?

    pretty much a default installation will create all the tables/columns/values it needs.
    make a clean install and back it up... what you see is what you need.

    pretty much all the database info is in these routines

    here https://github.com/vanilla/vanilla/tree/2.1/library/database

    Is each plug-in enable in turn a table created?

    depends on the plugin. some plugins change tables by adding columns, some plugins add tables, some plugins add routing, some plugins add permissions to the permissions table.

    so the answer it depends. look in the plugin at the structure() , setup() and construct routines and you will see what each plugin does upon enable. That is why, it is generally a good rule of thumb to always enable plugins from the dashboard instead of manually changing the config.php

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • For the plugins you would need a valid cookie and GET /settings/plugins/all/{PluginName}/{TransientKey}

    Or just create a helper plugin that exposes an endpoint to enable the plugins you wish:

    PluginController_EnablePlugin_Create() {
        if (Gdn::Request()->Post('SecretCode') == '123456')
            Gdn::PluginManager()->EnablePlugin(Gdn::Request()->Post('PluginName'), null);
    }
    

    This would have to be enabled by directly writing to the config, of course.

    But most of the plugins shipped with Vanilla only require additional tables/columns, so you could just set them to enabled in the config file and run utility/structure afterwards.

Sign In or Register to comment.