Hello everyone, I am working on a website with laravel 11 and I ran into a problem while trying to deploy the website.
First of all, I don't use/need a database for my website, but apparently Laravel now has a standard database or something? What for??
I tried to deploy the website on my server, using Docker, but it didn't work and I could not change the database to mysql, I also can't change the database to mysql in my dev environment (.env file) for some reason. how? and why??
#Is it even possible to change/remove the sqlite database??
65 messages · Page 1 of 1 (latest)
It's certainly possible, have you tried clearing your config cache?
Yes, works
Why can sqlite not be used in production tho?
it can, you probably don't have permissions setup correctly
Poor performance. Only one process can write to sqlite.
It does have it's use cases, not everything has enough load to require an actual DB
@potent oracle so, now I am getting this error... in production
I tried config clear and everything and migrate:fresh
cant get it to work
do you have a sessions table migration in your migrations folder?
not in the create_users_table migration?
yeah I do have it and I also have it in my production files
are you running this in docker or something?
yep
are you running the artisan commands within the container?
I'm confused as to how migrate:fresh wouldn't complain but there's still no sessions table
which does run, but it doesnt make it work
I have no damn clue either
you haven't set a different connection or something up right?
wdym exactly?
in the database config or something, there's clearly something weird going in with dbs somewhere
not that I know of
for some reason it doesnt create a new database.sqlite file either?? In my development environment it does tho
when you switch back to sqlite or?
pretty sure that database.sqlite file is made by the installer, not the app itself
there is this in the composer.json which does that
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
]```
whenever you run migrate, and there is no sqlite file, it makes a new one
but for some reason it doesnt do that
and if I make one myself it still doenst work
yeah I know, I assume thats what does that tho or does it not?
otherwise I have no clue how the file gets created
but it normally does
no that gets ran by the installer once it's finished
more accurately it gets ran by composer's project installer
no clue then
you should just be able to touch the database.sqlite file to make that if you want to move back to sqlite
I tried that, ran migrations and it still doesnt work
did you set the db driver back?
didnt change it
tried to switch, couldnt get it to work, switched back
or well, a friend set it back up but its still using sqlite
or atleast in the .env it is
in the docker-compose there is mariadb
could you share your docker compose
any clue?
uhh, well you'd need you DB_CONNECTION to be set to mariadb
I also wouldn't recommend the bitnami containers
damn that worked
thx man
idk how tf that worked before without that ho
ahh why
there are official mariadb containers and the bitnami laravel container uses artisan serve which is not good
ahh damn alr alr, thx, I'll look into it later
only for mariadb or also for laravel?