{"action":"closed","issue":{"url":"https://api.github.com/repos/kvesteri/sqlalchemy-utils/issues/122","labels_url":"https://api.github.com/repos/kvesteri/sqlalchemy-utils/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/kvesteri/sqlalchemy-utils/issues/122/comments","events_url":"https://api.github.com/repos/kvesteri/sqlalchemy-utils/issues/122/events","html_url":"https://github.com/kvesteri/sqlalchemy-utils/issues/122","id":55259029,"number":122,"title":"drop_database doesn't quote database name","user":{"login":"jpvanhal","id":250983,"avatar_url":"https://avatars.githubusercontent.com/u/250983?v=3","gravatar_id":"","url":"https://api.github.com/users/jpvanhal","html_url":"https://github.com/jpvanhal","followers_url":"https://api.github.com/users/jpvanhal/followers","following_url":"https://api.github.com/users/jpvanhal/following{/other_user}","gists_url":"https://api.github.com/users/jpvanhal/gists{/gist_id}","starred_url":"https://api.github.com/users/jpvanhal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpvanhal/subscriptions","organizations_url":"https://api.github.com/users/jpvanhal/orgs","repos_url":"https://api.github.com/users/jpvanhal/repos","events_url":"https://api.github.com/users/jpvanhal/events{/privacy}","received_events_url":"https://api.github.com/users/jpvanhal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kvesteri/sqlalchemy-utils/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-23T09:02:46Z","updated_at":"2015-01-24T09:44:35Z","closed_at":"2015-01-24T09:44:35Z","body":"```pytb\r\nTraceback (most recent call last):\r\n  File \"/Users/janne/.local/bin/stellar\", line 9, in <module>\r\n    load_entry_point('stellar==0.4.2', 'console_scripts', 'stellar')()\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/stellar/command.py\", line 264, in main\r\n    stellar()\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/click/core.py\", line 572, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/click/core.py\", line 552, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/click/core.py\", line 893, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/click/core.py\", line 744, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/click/core.py\", line 388, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/stellar/command.py\", line 128, in restore\r\n    app.restore(snapshot)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/stellar/app.py\", line 155, in restore\r\n    self.operations.remove_database(table.table_name)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/stellar/operations.py\", line 111, in remove_database\r\n    get_engine_url(raw_conn, database)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/sqlalchemy_utils/functions/database.py\", line 267, in drop_database\r\n    engine.execute(text)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1690, in execute\r\n    return connection.execute(statement, *multiparams, **params)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 719, in execute\r\n    return self._execute_text(object, multiparams, params)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 868, in _execute_text\r\n    statement, parameters\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 954, in _execute_context\r\n    context)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1116, in _handle_dbapi_exception\r\n    exc_info\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/sqlalchemy/util/compat.py\", line 189, in raise_from_cause\r\n    reraise(type(exception), exception, tb=exc_tb)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 947, in _execute_context\r\n    context)\r\n  File \"/Users/janne/.local/venvs/stellar/lib/python2.7/site-packages/sqlalchemy/engine/default.py\", line 435, in do_execute\r\n    cursor.execute(statement, parameters)\r\nsqlalchemy.exc.ProgrammingError: (ProgrammingError) syntax error at or near \"-\"\r\nLINE 1: DROP DATABASE foo-bar\r\n```"}}