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

linkace:simple image doesn't work with sqlite, can't create user #353

Closed
helmut72 opened this issue Jan 16, 2022 · 5 comments
Closed

linkace:simple image doesn't work with sqlite, can't create user #353

helmut72 opened this issue Jan 16, 2022 · 5 comments
Labels
Bug Something isn't working

Comments

@helmut72
Copy link

Describe the bug

linkace:simple image doesn't work with sqlite, can't create user:

To Reproduce

I used this docs setup, variables and APP_KEY:
https://www.linkace.org/docs/v1/setup/setup-with-docker/simple/
https://www.linkace.org/docs/v1/setup/setup-with-sqlite/

docker exec -it linkace php artisan migrate
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migration table created successfully.
Nothing to migrate.
/app # ls -l /app/.env /app/database/linkace.sqlite 
-rw-rw-rw-    1 root     root          2442 Jan 16 11:18 /app/.env
-rw-rw-rw-    1 root     root         12288 Jan 16 11:12 /app/database/linkace.sqlite

Then run:

docker exec -it linkace php artisan registeruser

 Please enter the user name::
 > test

 Please enter the user email address::
 > test@test.com


In Connection.php line 712:
                                                                                                                             
  SQLSTATE[HY000]: General error: 1 no such table: users (SQL: select * from "users" where "email" = test@test.com limit 1)  
                                                                                                                             

In Exception.php line 18:
                                                          
  SQLSTATE[HY000]: General error: 1 no such table: users  
                                                          

In PDOConnection.php line 82:
                                                          
  SQLSTATE[HY000]: General error: 1 no such table: users  
                                                          

Expected behavior

Register first user should work

@helmut72 helmut72 added the Bug Something isn't working label Jan 16, 2022
@Kovah
Copy link
Owner

Kovah commented Jan 16, 2022

Hi, could you please delete the database file and try again?

@helmut72
Copy link
Author

helmut72 commented Jan 16, 2022

Have tried it many times and also used production in APP_ENV=local. Edit: Also tried with APP_URL=https://linkace.mydomain.com. My Reverse Proxy is ready. I just want to try Linkace in my environment, but looks like I need MariaDB or Postgres. Here is my env file:

APP_NAME=LinkAce
COMPOSE_PROJECT_NAME=linkace

APP_URL=http://localhost
APP_ENV=local
APP_KEY=base64:deleted
APP_DEBUG=false
SETUP_COMPLETED=false
SESSION_LIFETIME=10080

BACKUP_ENABLED=false
BACKUP_DISK=s3
BACKUP_NOTIFICATION_EMAIL=your@email.com
BACKUP_MAX_SIZE=512

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

MAIL_FROM_ADDRESS=your@email.com
MAIL_FROM_NAME=LinkAce
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

DB_CONNECTION=sqlite
DB_DATABASE=/app/database/linkace.sqlite

SESSION_DRIVER=file
LOG_CHANNEL=stack
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_DRIVER=database

Edit2: There is only a migration table:

sqlite3 linkace.sqlite 
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.

sqlite> .tables
migrations

@Kovah
Copy link
Owner

Kovah commented Jan 16, 2022

Well, yes please use MySQL or Postgres in the meantime. I will update the documentation to discourage usage of SQlite because it only causes issues at the moment.

@helmut72
Copy link
Author

MariaDB works. But want to avoid another DB server just for testing Linkace with a Single User.

@Kovah
Copy link
Owner

Kovah commented Jan 30, 2022

I am closing this issue in favor of #327. Please add any new issues there.

@Kovah Kovah closed this as completed Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants