moharouri / heatquizappAPIV1

0 stars 0 forks source link

Database file HQDB.sql import failed #1

Open shaobingtongzhi opened 2 months ago

shaobingtongzhi commented 2 months ago

As mentioned in the question, but when I tried to import the data, it failed. When I restored the HQDB.sql file to normal text format using the pg_restore command, I found that the SQL statements inside did not include any content related to creating table structures, only insertion statements. The pg_restore command I used is as follows: pg_restore - f hqdb_file.sql C:/Users/Administrator/Desktop/HQDB.sql Snipaste_2024-09-06_14-41-05 Can you give me the statement to create the table structure? Thank you

moharouri commented 2 months ago

I will check the problem and give you an answer by Monday

moharouri commented 2 months ago

@shaobingtongzhi
Can you try now the following steps: 1- update the code with a git pull hit. 2- Create an empty PostgreSQL database (maybe with pgadmin) 3- Import (restore) the new database image hqdb.sql in "DatabaseImage" file for the newly created database. then test if everything works.

Please let me know how things go.

shaobingtongzhi commented 2 months ago

@shaobingtongzhi Can you try now the following steps: 1- update the code with a git pull hit. 2- Create an empty PostgreSQL database (maybe with pgadmin) 3- Import (restore) the new database image hqdb.sql in "DatabaseImage" file for the newly created database. then test if everything works.

Please let me know how things go.

Thank you !! I think it should be working now. Although there was an error, I noticed that 60 tables were imported, and I was able to query the data. Below is the screenshot of the error Snipaste_2024-09-10_08-03-29 Snipaste_2024-09-10_08-03-57 Snipaste_2024-09-10_08-11-07

moharouri commented 2 months ago

@shaobingtongzhi Great news. Did you try to run the system and play games and so on ??