Database server does not connect
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
Project ID:
a9fc5e35-67d8-4b92-976b-89746f62441f
a9fc5e35-67d8-4b92-976b-89746f62441f
may I ask what the screenshot of the failed build logs has to do with database tables
I thought the error was in the database because of the message "OperationalError at /CrearPoster/
no such table: blog_content"
So I don't understand the problem, how can I solve it?
do you think you could answer my question first?
yes with pleasure
^
I don't exactly know what causes the failed build logs since the requirements.txt is updated
okay but what does it have to do with database tables
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.
again, what does the requirements.txt have to do with database tables
I thought that because of the packages I am using such as dj-database-url, psycopg2, python-dotenv
are you running migrations
yes I did python manage.py migrate
where are you running that and how
also create a service variable DATABASE_URL
^
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
you should run the migration with
railway run
railway run python manage.py migrate
Where should I write and how please?
in your local terminal in your project
"railway run python manage.py migrate" no exist
I already did it python manage.py migrate
have you installed the cli?
no
well theres your issue
That's good, what would the command be like?
my problem was using packages to connect to the database