0

I am working on a Java Spring API where I need to create new relations (tables) that will be stored in a PostgreSQL database.

I am creating new tables that add a new column to the existing tables with a character appended to the label.

The app uses Flyway migration scripts for the database.

I created a SQL file that creates a test table. I also added create table SQL commands within existing Java model files.

When I build the API Docker container and also the console (this program builds the PostgreSQL database) Docker container, I run the app locally and then I get this error in the API console when I attempt to query the new tables through the app. Below is an example of an error.

513 ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper : ERROR: relation "adds.ox_maint_r_c" does not exist
626 ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper : ERROR: relation "adds.shed_storage_r_c" does not exist

Also, I accessed the database using DBeaver and I do not see the new databases.

Any recommendations on a solution? It seems nothing I am doing is affecting the database. Apologies for the long post as I am attempting to explain a problem with a lot of context.

12
  • 2
    Please edit the code and provide a minimal reproducible example. Commented Nov 24 at 15:21
  • I cleaned up the code section. Not sure how I can provide an example since I'm working with an entire API and console programs with multiple files. Commented Nov 24 at 16:16
  • Can you show me how you created the tables? And the general structure of the files? Commented Nov 24 at 16:27
  • 1
    Look at the Postgres server log files and see what is actually hitting the database and work backwards from there. This Also, I accessed the database using DBeaver and I do not see the new databases. is confusing/does not make sense. What are you defining as a database? Commented Nov 24 at 16:35
  • 1
    1) Do not use DBeaver for troubleshooting, it creates it's own problems. Use psql to verify the contents of the database. 2) You need to create test case code that does the basic work of CREATE TABLE for the changes you are making and step through it to see why the tables are not actually being created. 3) Are you sure the changes are pointing at the correct database and/or Postgres cluster? Commented Nov 24 at 16:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.