{"action":"created","issue":{"url":"https://api.github.com/repos/eoyilmaz/stalker/issues/51","repository_url":"https://api.github.com/repos/eoyilmaz/stalker","labels_url":"https://api.github.com/repos/eoyilmaz/stalker/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/eoyilmaz/stalker/issues/51/comments","events_url":"https://api.github.com/repos/eoyilmaz/stalker/issues/51/events","html_url":"https://github.com/eoyilmaz/stalker/issues/51","id":213772640,"number":51,"title":"Error on \"alembic upgrade head\"","user":{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars1.githubusercontent.com/u/994357?v=3","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-03-13T13:52:21Z","updated_at":"2017-04-11T06:48:20Z","closed_at":"2017-04-11T06:48:20Z","body":"I ran `alembic.exe upgrade head` from my Python 3.5 installation on my Windows machine and I got this error:\r\n\r\n```\r\nINFO  [alembic.runtime.migration] Context impl PostgresqlImpl.\r\nINFO  [alembic.runtime.migration] Will assume transactional DDL.\r\nINFO  [alembic.runtime.migration] Running upgrade f2005d1fbadc -> 92257ba439e1, Budget is now statusable\r\nINFO  [alembic.runtime.migration] Running upgrade 92257ba439e1 -> d8421de6a206, Added Project_Users.rate\r\nINFO  [alembic.runtime.migration] Running upgrade d8421de6a206 -> ea28a39ba3f5, Added Invoices table\r\nINFO  [alembic.runtime.migration] Running upgrade ea28a39ba3f5 -> 255ee1f9c7b3, Added Payments table\r\nINFO  [alembic.runtime.migration] Running upgrade 255ee1f9c7b3 -> f16651477e64, Added AuthenticationLog class\r\nINFO  [alembic.runtime.migration] Running upgrade f16651477e64 -> a9319b19f7be, added shot.fps\r\nINFO  [alembic.runtime.migration] Running upgrade a9319b19f7be -> 0063f547dc2e, updated version_inputs table\r\nINFO  [alembic.runtime.migration] Running upgrade 0063f547dc2e -> c5607b4cfb0a, Added support for time zones\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] upgrading table: AuthenticationLogs\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: date\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] done upgrading table: AuthenticationLogs\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] upgrading table: SimpleEntities\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: date_created\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: date_updated\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] done upgrading table: SimpleEntities\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] upgrading table: Tasks\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] done upgrading table: Tasks\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] upgrading table: Vacations\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] done upgrading table: Vacations\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] upgrading table: Projects\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] done upgrading table: Projects\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] upgrading table: TimeLogs\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] done upgrading table: TimeLogs\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] upgrading table: Studios\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: computed_end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: start\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: end\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: scheduling_started_at\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] altering column: last_scheduled_at\r\nINFO  [c5607b4cfb0a_added_support_for_time_zones_py] done upgrading table: Studios\r\nINFO  [alembic.runtime.migration] Running upgrade c5607b4cfb0a -> 31b1e22b455e, Added exclude and check constraints to TimeLogs table\r\nINFO  [31b1e22b455e_added_exclude_and_check_constraints_to__py] Removing duplicate TimeLog entries\r\nINFO  [31b1e22b455e_added_exclude_and_check_constraints_to__py] Removing contained TimeLog entries (TimeLogs surrounded by other TimeLogs\r\nINFO  [31b1e22b455e_added_exclude_and_check_constraints_to__py] Trimming residual overlapping TimeLog.end values\r\nINFO  [31b1e22b455e_added_exclude_and_check_constraints_to__py] Trimming residual overlapping TimeLog.start values\r\nINFO  [31b1e22b455e_added_exclude_and_check_constraints_to__py] Adding CheckConstraint(end > start) to TimeLogs table\r\nINFO  [31b1e22b455e_added_exclude_and_check_constraints_to__py] Adding ExcludeConstraint to TimeLogs table\r\nDEBUG [stalker.models.task] add_exclude_constraint is Running!\r\nDEBUG [stalker.models.task] running \"btree_gist\" extension creation!\r\nDEBUG [stalker.models.task] add_exclude_constraint: (psycopg2.ProgrammingError) permission denied to create extension \"btree_gist\"\r\nHINT:  Must be superuser to create this extension.\r\n [SQL: 'CREATE EXTENSION btree_gist;']\r\nDEBUG [stalker.models.task] creating ts_to_box function!\r\nTraceback (most recent call last):\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 1182, in _execute_context\r\n    context)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\engine\\default.py\", line 469, in do_execute\r\n    cursor.execute(statement, parameters)\r\npsycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block\r\n\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"C:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\Scripts\\alembic.exe\\__main__.py\", line 9, in <module>\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\alembic\\config.py\", line 479, in main\r\n    CommandLine(prog=prog).main(argv=argv)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\alembic\\config.py\", line 473, in main\r\n    self.run_cmd(cfg, options)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\alembic\\config.py\", line 456, in run_cmd\r\n    **dict((k, getattr(options, k)) for k in kwarg)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\alembic\\command.py\", line 174, in upgrade\r\n    script.run_env()\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\alembic\\script\\base.py\", line 407, in run_env\r\n    util.load_python_file(self.dir, 'env.py')\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\alembic\\util\\pyfiles.py\", line 93, in load_python_file\r\n    module = load_module_py(module_id, path)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\alembic\\util\\compat.py\", line 68, in load_module_py\r\n    module_id, path).load_module(module_id)\r\n  File \"<frozen importlib._bootstrap_external>\", line 396, in _check_name_wrapper\r\n  File \"<frozen importlib._bootstrap_external>\", line 817, in load_module\r\n  File \"<frozen importlib._bootstrap_external>\", line 676, in load_module\r\n  File \"<frozen importlib._bootstrap>\", line 268, in _load_module_shim\r\n  File \"<frozen importlib._bootstrap>\", line 693, in _load\r\n  File \"<frozen importlib._bootstrap>\", line 673, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap_external>\", line 673, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\r\n  File \"alembic\\env.py\", line 72, in <module>\r\n    run_migrations_online()\r\n  File \"alembic\\env.py\", line 65, in run_migrations_online\r\n    context.run_migrations()\r\n  File \"<string>\", line 8, in run_migrations\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\alembic\\runtime\\environment.py\", line 797, in run_migrations\r\n    self.get_context().run_migrations(**kw)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\alembic\\runtime\\migration.py\", line 312, in run_migrations\r\n    step.migration_fn(**kw)\r\n  File \"C:\\Users\\iruser\\code\\repos\\stalker\\alembic\\versions\\31b1e22b455e_added_exclude_and_check_constraints_to_.py\", line 123, in upgrade\r\n    add_exclude_constraint(TimeLog.__table__, conn)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\stalker\\models\\task.py\", line 3189, in add_exclude_constraint\r\n    ts_to_box.execute(bind=connection)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\sql\\ddl.py\", line 96, in execute\r\n    return bind.execute(self.against(target))\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 945, in execute\r\n    return meth(self, multiparams, params)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\sql\\ddl.py\", line 68, in _execute_on_connection\r\n    return connection._execute_ddl(self, multiparams, params)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 1002, in _execute_ddl\r\n    compiled\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 1189, in _execute_context\r\n    context)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 1393, in _handle_dbapi_exception\r\n    exc_info\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\util\\compat.py\", line 202, in raise_from_cause\r\n    reraise(type(exception), exception, tb=exc_tb, cause=cause)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\util\\compat.py\", line 185, in reraise\r\n    raise value.with_traceback(tb)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 1182, in _execute_context\r\n    context)\r\n  File \"c:\\users\\iruser\\skalman\\condaenvs\\skalman_py35\\lib\\site-packages\\sqlalchemy\\engine\\default.py\", line 469, in do_execute\r\n    cursor.execute(statement, parameters)\r\nsqlalchemy.exc.InternalError: (psycopg2.InternalError) current transaction is aborted, commands ignored until end of transaction block\r\n [SQL: \"CREATE FUNCTION ts_to_box(TIMESTAMPTZ, TIMESTAMPTZ)\\nRETURNS BOX\\nAS\\n$$\\n    SELECT  BOX(\\n      POINT(DATE_PART('epoch', $1), 0),\\n      POINT(DATE_PART('epoch', $2 - interval '1 minute'), 1)\\n    )\\n$$\\nLANGUAGE 'sql'\\nIMMUTABLE;\\n\"]\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/eoyilmaz/stalker/issues/comments/293167129","html_url":"https://github.com/eoyilmaz/stalker/issues/51#issuecomment-293167129","issue_url":"https://api.github.com/repos/eoyilmaz/stalker/issues/51","id":293167129,"user":{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars1.githubusercontent.com/u/994357?v=3","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"created_at":"2017-04-11T06:48:20Z","updated_at":"2017-04-11T06:48:20Z","body":"I'm closing this. "}}
{"actor":{"display_login":"fredrikaverpil"}}