Skip to content

Building mysql database from translations overwrites 'translations' table #102

Open
@skypablo089

Description

@skypablo089

The scripts/ReadMe.md indicates, that the script build_mysql_database.py adds each translation to the database:

"You can use this for every version you wish to add."

However the translations table is dropped each time a new translation is added, thus loosing the record for any existing translation in the database.

# Drop existing tables
sqlfile.write(f"DROP TABLE IF EXISTS ``{translation}_books``;\n")
sqlfile.write(f"DROP TABLE IF EXISTS ``{translation}_verses``;\n")
sqlfile.write("DROP TABLE IF EXISTS ``translations``;\n\n")

Is this behaviour intended? In this case the ReadMe is missleading.
If no, then I recommend to adjust the code. I ran the script after deleting the last row of the above code block, which did the trick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions