Learn Git by building an SQL reference object bug?

Hi all, I’m working on the this project until the point of adding the rename key to the database object, CodeRoad keeps returning:

Your “sql_reference.json” file should have the correct properties and values

Even though I have tried copying the whole text from the hint (yes, i did leave an empty line at the end), the issue still persist . Any one have a suggestion on how to deal with this?

Here’s my json file:

{
  "database": {
    "create": "CREATE DATABASE database_name;",
    "drop": "DROP DATABASE database_name;",
    "rename": "ALTER DATABASE database_name RENAME TO new_name;"
  },
  "table": {
    "create": "CREATE TABLE table_name();",
    "drop": "DROP TABLE table_name;"
  },
  "row": {
    "insert": "INSERT INTO table_name(columns) VALUES(values);",
    "update": "UPDATE table_name SET column_name = new_value WHERE condition;",
    "delete": "DELETE FROM table_name WHERE condition;"
  }
}

Thanks in advance.

I encountered a similar problem on this same course when I got to " Open up your .json file and create an object with a reference for how to create a database that looks like this:"

{
  "database": {
    "create": "CREATE DATABASE database_name;"
  }
}

I did the course locally using Docker Desktop.
I investigated why a simple test like that could not pass by checking the test sample files.
I found out that the only difference between my result and the expected result was my VS Code formatting. I installed Prettier - Code formatter extension on the container and formatted my code and that solved the problem for me.

1 Like

I was having this exact issue and your reply helped me overcome this test.

Next time this happens, I will be sure to access the test files and check for any changes between my result and the expected result.

Thank you for your help!