-
Notifications
You must be signed in to change notification settings - Fork 34
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
Nova migrations ignore the --database flag #2952
Comments
Laravel Nova only use the default Laravel migrations command and it doesn't have anything related to database connection. |
Im sorry @crynobone I don't understand what you mean. Are you saying there is now way to pass the variables to it? |
@aaronahearne I'm saying that it shouldn't cause this issue as Laravel Nova only uses the default migration command as if any other Laravel packages. DB_CONNECTION=mysql Run artisan command with |
@crynobone Im sorry I dont understand how that makes any difference, Im not running an sqlite database. The nova migrations ARE getting triggered without the variables being past to them when I run the migrate command on my own migrations. I have found it documented elsewhere on Laracasts since I've posted this question but also with no answer. |
Please provide reproducing code to prove this, can't reproduce the issue. |
This actually a bug with Laravel Passport, let's continue the discussion there. |
Description:
Unable to migrate test database due to Nova migrations ignoring --database tag.
Detailed steps to reproduce the issue on a fresh Nova installation:
// config/database.php
// env.testing
php artisan migrate --database=mysql-test
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oauth_auth_codes' already exists (SQL: create table
oauth_auth_codes(
idvarchar(100) not null,
user_idbigint unsigned not null,
client_idbigint unsigned not null,
scopestext null,
revokedtinyint(1) not null,
expires_atdatetime null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
The text was updated successfully, but these errors were encountered: