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

Mongodb support #27

Open
doubleprincez opened this issue May 7, 2020 · 2 comments
Open

Mongodb support #27

doubleprincez opened this issue May 7, 2020 · 2 comments
Labels
feature new feature for this package

Comments

@doubleprincez
Copy link

I tried using this package with my mongodb project but got stuck in the seeding phase.
This is the result i got from running php artisan world:init
migrations error

Recreate:
create a new project, add Jenssegers Laravel Mongodb to the project and configure it as the default database for the project. Install khsing Laravel World package and follow the installation steps.

Previous Debug Steps:
I tried changing all migrations and seed to implement the specified mongodb alternatives in the root folder of khsing package in vendor but still unable to fix it but get this error:

Symfony\Component\Debug\Exception\FatalThrowableError
Call to a member function prepare() on null
@muarachmann
Copy link

This is perharps because mongodb doesn't support the sql snytax. Look he is trying to disable/enable before and after seeding the data. What you can do is check if the DB connection is SQLiteConnection, MySqlConnection or PostgresConnection or "MongoDB.." then perform the statement. However, I'am not versed with mongodb so you might have to look for a way to disable constraints there. Hope it helps

@khsing
Copy link
Owner

khsing commented Mar 7, 2021

@doubleprincez I have not test in MongoDB. I am planing to remove relation database dependent. That may helps you.

@khsing khsing added the feature new feature for this package label Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature for this package
Projects
None yet
Development

No branches or pull requests

3 participants