Database server does not connect
Anonymous
TRIALOP

2 years ago

Good afternoon, I have already made all the connections with the postgreSQL database server but when I am using the website it tells me no such table.

28 Replies

Anonymous
TRIALOP

2 years ago

a9fc5e35-67d8-4b92-976b-89746f62441f


brody
EMPLOYEE

2 years ago

may I ask what the screenshot of the failed build logs has to do with database tables


Anonymous
TRIALOP

2 years ago

I thought the error was in the database because of the message "OperationalError at /CrearPoster/
no such table: blog_content"


Anonymous
TRIALOP

2 years ago

So I don't understand the problem, how can I solve it?


brody
EMPLOYEE

2 years ago

do you think you could answer my question first?


Anonymous
TRIALOP

2 years ago

yes with pleasure


brody
EMPLOYEE

2 years ago

^


Anonymous
TRIALOP

2 years ago

I don't exactly know what causes the failed build logs since the requirements.txt is updated


brody
EMPLOYEE

2 years ago

okay but what does it have to do with database tables


Anonymous
TRIALOP

2 years ago

I thought it was the database table because that error was told to me on the website. But the table in the database does appear in the data section. That's the reason I'm confused.


brody
EMPLOYEE

2 years ago

again, what does the requirements.txt have to do with database tables


Anonymous
TRIALOP

2 years ago

I thought that because of the packages I am using such as dj-database-url, psycopg2, python-dotenv


brody
EMPLOYEE

2 years ago

are you running migrations


Anonymous
TRIALOP

2 years ago

yes I did python manage.py migrate


brody
EMPLOYEE

2 years ago

where are you running that and how


Anonymous
TRIALOP

2 years ago

also create a service variable DATABASE_URL


brody
EMPLOYEE

2 years ago

^


Anonymous
TRIALOP

2 years ago

I ran it in visual studio, with the database entered as a String after doing the migrations, I changed it for an environment variable (the same error came out in both ways) the two times I changed I did git push origin main


brody
EMPLOYEE

2 years ago

you should run the migration with railway run
railway run python [manage.py](manage.py) migrate


Anonymous
TRIALOP

2 years ago

Where should I write and how please?


brody
EMPLOYEE

2 years ago

in your local terminal in your project


Anonymous
TRIALOP

2 years ago

"railway run python manage.py migrate" no exist
I already did it python manage.py migrate


brody
EMPLOYEE

2 years ago

have you installed the cli?


Anonymous
TRIALOP

2 years ago

no


brody
EMPLOYEE

2 years ago

well theres your issue


Anonymous
TRIALOP

2 years ago

That's good, what would the command be like?


brody
EMPLOYEE

2 years ago


Anonymous
TRIALOP

2 years ago

my problem was using packages to connect to the database


Loading...