#Is it even possible to change/remove the sqlite database??

65 messages · Page 1 of 1 (latest)

lapis salmon
#

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??

potent oracle
#

It's certainly possible, have you tried clearing your config cache?

lapis salmon
#

Why can sqlite not be used in production tho?

potent oracle
#

it can, you probably don't have permissions setup correctly

mild frigate
potent oracle
#

It does have it's use cases, not everything has enough load to require an actual DB

lapis salmon
#

@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

potent oracle
#

do you have a sessions table migration in your migrations folder?

lapis salmon
#

nope, but I never had one

#

It's some build in laravel 11 shit

potent oracle
#

not in the create_users_table migration?

lapis salmon
#

ohhh yeah apparently

#

wait

lapis salmon
potent oracle
#

are you running this in docker or something?

lapis salmon
#

yep

potent oracle
#

are you running the artisan commands within the container?

lapis salmon
#

yep

#

tried running docker exec laravel php artisan migrate:fresh

potent oracle
#

I'm confused as to how migrate:fresh wouldn't complain but there's still no sessions table

lapis salmon
#

which does run, but it doesnt make it work

potent oracle
#

you haven't set a different connection or something up right?

lapis salmon
#

wdym exactly?

potent oracle
#

in the database config or something, there's clearly something weird going in with dbs somewhere

lapis salmon
#

not that I know of

#

for some reason it doesnt create a new database.sqlite file either?? In my development environment it does tho

potent oracle
#

when you switch back to sqlite or?

#

pretty sure that database.sqlite file is made by the installer, not the app itself

lapis salmon
lapis salmon
#

but for some reason it doesnt do that

#

and if I make one myself it still doenst work

potent oracle
#

that's not part of the migrate command?

#

that's a post-create script

lapis salmon
#

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

potent oracle
#

no that gets ran by the installer once it's finished

#

more accurately it gets ran by composer's project installer

lapis salmon
#

no clue then

potent oracle
#

you should just be able to touch the database.sqlite file to make that if you want to move back to sqlite

lapis salmon
potent oracle
#

did you set the db driver back?

lapis salmon
#

didnt change it

potent oracle
#

weren't you using mysql?

#

what are you currently trying to do?

lapis salmon
#

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

potent oracle
#

could you share your docker compose

lapis salmon
#

any clue?

potent oracle
#

uhh, well you'd need you DB_CONNECTION to be set to mariadb

#

I also wouldn't recommend the bitnami containers

lapis salmon
#

thx man

#

idk how tf that worked before without that ho

lapis salmon
potent oracle
#

there are official mariadb containers and the bitnami laravel container uses artisan serve which is not good

lapis salmon
#

ahh damn alr alr, thx, I'll look into it later

lapis salmon