)]}'
{"nova/db/sqlalchemy/migrate_repo/versions/216_havana.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cf15932c84c8a46152363df72364b30449196d5c","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"            \u0027ALTER TABLE migrate_version CONVERT TO CHARACTER SET utf8\u0027)"},{"line_number":1527,"context_line":"        # Set default DB charset to UTF8."},{"line_number":1528,"context_line":"        migrate_engine.execute("},{"line_number":1529,"context_line":"            \u0027ALTER DATABASE `%s` DEFAULT CHARACTER SET utf8\u0027 %"},{"line_number":1530,"context_line":"            migrate_engine.url.database)"},{"line_number":1531,"context_line":""},{"line_number":1532,"context_line":"    _create_shadow_tables(migrate_engine)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_8774a4ff","line":1529,"updated":"2020-08-25 19:58:56.000000000","message":"I\u0027ve never used backticks in SQL before. Are we sure those are the right type of quotes to use?","commit_id":"b39d8b8c9675d554791511a13b62651c8546e7b9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5ed0975e396fd35ea2cc766e25f12d7507bb2b72","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"            \u0027ALTER TABLE migrate_version CONVERT TO CHARACTER SET utf8\u0027)"},{"line_number":1527,"context_line":"        # Set default DB charset to UTF8."},{"line_number":1528,"context_line":"        migrate_engine.execute("},{"line_number":1529,"context_line":"            \u0027ALTER DATABASE `%s` DEFAULT CHARACTER SET utf8\u0027 %"},{"line_number":1530,"context_line":"            migrate_engine.url.database)"},{"line_number":1531,"context_line":""},{"line_number":1532,"context_line":"    _create_shadow_tables(migrate_engine)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_4a0f3136","line":1529,"in_reply_to":"9f560f44_2a1e3d0b","updated":"2020-08-25 21:06:15.000000000","message":"L1523 implies that we only do this for mysql, so I think this is safe based on your googling (not that I really doubted it, hence the +2).\n\nI wonder if maybe database names with dashes are more problematic in general and we shouldn\u0027t be allowing them on principle or something? But anyway, I\u0027m sure we should just merge this.","commit_id":"b39d8b8c9675d554791511a13b62651c8546e7b9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3e2afe36a11d718a6c37c86b9ed9b1c1863b51ad","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"            \u0027ALTER TABLE migrate_version CONVERT TO CHARACTER SET utf8\u0027)"},{"line_number":1527,"context_line":"        # Set default DB charset to UTF8."},{"line_number":1528,"context_line":"        migrate_engine.execute("},{"line_number":1529,"context_line":"            \u0027ALTER DATABASE `%s` DEFAULT CHARACTER SET utf8\u0027 %"},{"line_number":1530,"context_line":"            migrate_engine.url.database)"},{"line_number":1531,"context_line":""},{"line_number":1532,"context_line":"    _create_shadow_tables(migrate_engine)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_7575b631","line":1529,"in_reply_to":"9f560f44_4a0f3136","updated":"2020-08-25 21:36:57.000000000","message":"Oh, derp. I didn\u0027t notice this block is MySQL only.\n\nI agree this should then be OK based on what I found.","commit_id":"b39d8b8c9675d554791511a13b62651c8546e7b9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6af1f7224580740fe5a89d48d2ac35737ee96d51","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"            \u0027ALTER TABLE migrate_version CONVERT TO CHARACTER SET utf8\u0027)"},{"line_number":1527,"context_line":"        # Set default DB charset to UTF8."},{"line_number":1528,"context_line":"        migrate_engine.execute("},{"line_number":1529,"context_line":"            \u0027ALTER DATABASE `%s` DEFAULT CHARACTER SET utf8\u0027 %"},{"line_number":1530,"context_line":"            migrate_engine.url.database)"},{"line_number":1531,"context_line":""},{"line_number":1532,"context_line":"    _create_shadow_tables(migrate_engine)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_2a1e3d0b","line":1529,"in_reply_to":"9f560f44_8774a4ff","updated":"2020-08-25 20:30:58.000000000","message":"According to stackoverflow [1], backticks are a MySQL-only thing [2] for quoting identifiers.\n\nThey say in order to support other brands of DBMS, standard double quotes are more appropriate, though to do this in MySQL you need to SET sql_mode \u003d \u0027ANSI_QUOTES\u0027; [3] first.\n\nDo we still support other DBMS like PostgreSQL or others? If so, it sounds like we should use the double quotes and enable the ANSI_QUOTES mode for MySQL.\n\n[1] https://dba.stackexchange.com/questions/23129/benefits-of-using-backtick-in-mysql-queries\n[2] https://dev.mysql.com/doc/refman/8.0/en/identifiers.html\n[3] https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_ansi_quotes","commit_id":"b39d8b8c9675d554791511a13b62651c8546e7b9"}]}
