Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add tablePrefix to SetupController.php, allowing it to be used as a command-line parameter #2791

Merged
merged 1 commit into from
Apr 23, 2018

Conversation

engram-design
Copy link
Contributor

We're doing the following in our own command-line scaffolding, and it works great! However, it seems like tablePrefix is the only option not able to be set via the command line. For instance, we're doing:

$dbOptions = [
    'driver' => 'mysql',
    'user' => 'root',
    'server' => 'localhost',
    'port' => '3306',
    'password' => 'somepassword',
    'database' => 'craft_database',
    'tablePrefix' => 'craft_',
];

Craft::$app->runAction('setup/db-creds', $dbOptions);

Which throws an error Error: Unknown option: --tablePrefix. Adding this fixes the issue.

@brandonkelly brandonkelly merged commit 442a482 into craftcms:develop Apr 23, 2018
brandonkelly added a commit that referenced this pull request Apr 23, 2018
@brandonkelly
Copy link
Member

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants