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

Error when wanting to use remote only #15

Open
floodx92 opened this issue Jan 18, 2025 · 1 comment
Open

Error when wanting to use remote only #15

floodx92 opened this issue Jan 18, 2025 · 1 comment

Comments

@floodx92
Copy link

In the docs it says I should put this on my databases.php

return [
    "default" => env("DB_CONNECTION", "libsql"),

    "connections" => [
        "libsql" => [
            "driver" => "libsql",
            "url" => env("TURSO_DATABASE_URL"),
            "password" => env("TURSO_AUTH_TOKEN"),
        ],
        // ...
    ],
];

I throws an error.... database key is missing.

10:58:13    INFO  Compiled views cleared successfully.  
10:58:13 
10:58:13 
10:58:13    ErrorException 
10:58:13 
10:58:13   Undefined array key "database"
10:58:13 
10:58:13   at vendor/turso/libsql-laravel/src/LibsqlServiceProvider.php:90
10:58:13      86▕                             password: $config["password"] ?? '',
10:58:13      87▕                             options: $config
10:58:13      88▕                         );
10:58:13      89▕                     },
10:58:13   ➜  90▕                     database: $config["database"],
10:58:13      91▕                     config: $config,
10:58:13      92▕                 );
10:58:13      93▕             });
10:58:13      94▕         });
10:58:13 
10:58:13       �[2m+23 vendor frames �[22m

If I put an empty database key, it will throw another error:

Sync is not supported in databases opened in Remote mode. (Connection: libsql, SQL: select exists (select 1 from sqlite_master where name = 'migrations' and type = 'table') as "exists")
@darkterminal
Copy link
Contributor

darkterminal commented Jan 18, 2025

Related #5 , you can see the tests/TestCase.php for an example

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

No branches or pull requests

2 participants