Skip to content
New issue

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

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

Already on GitHub? Sign in 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

Projects
None yet
2 participants
@engram-design
Copy link
Contributor

commented Apr 23, 2018

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

1 check failed

Scrutinizer Analysis: Errored – Tests: failed
Details

brandonkelly added a commit that referenced this pull request Apr 23, 2018

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Apr 23, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.