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

database connection in IseedCommand.php #51

Closed
csambrus opened this issue Mar 7, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@csambrus
Copy link

commented Mar 7, 2016

Please change the hasTable check in generateFileName
https://github.com/orangehill/iseed/blob/master/src/Orangehill/Iseed/IseedCommand.php#L158
to
if (!\Schema::connection($database)->hasTable($table)) {

and add
$database = $this->option('database') ?: config('database.default');
to
https://github.com/orangehill/iseed/blob/master/src/Orangehill/Iseed/IseedCommand.php#L51

and change
https://github.com/orangehill/iseed/blob/master/src/Orangehill/Iseed/IseedCommand.php#L70
to:
list($fileName, $className) = $this->generateFileName($database, $table);

Thanks.

@MoT3rror MoT3rror referenced this issue Apr 6, 2016

Closed

Fix issue 51 #52

@PaulVisscher

This comment has been minimized.

Copy link

commented Oct 27, 2016

I can confirm these changes are needed for multi database projects.

tihomiro added a commit that referenced this issue Dec 19, 2016

tihomiro added a commit that referenced this issue Dec 20, 2016

tihomiro added a commit that referenced this issue Dec 20, 2016

@tihomiro tihomiro referenced this issue Dec 20, 2016

Merged

Issue51fix #78

@tihomiro

This comment has been minimized.

Copy link
Member

commented Dec 20, 2016

Fixed.

@tihomiro tihomiro closed this Dec 20, 2016

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.