#5233 I try to use centos8 in dev/containers/base, but when pagure starts, it prompts some error
Opened 7 months ago by zwl. Modified 7 months ago

Hello, I try to use centos8 in dev/containers/base, but when pagure starts, it prompts the following error,What should I do, is there a command line to manually create a table

postgresql_1 | 2021-10-16 01:04:25.835 UTC [29] ERROR: relation "pull_requests" does not exist
postgresql_1 | 2021-10-16 01:04:25.835 UTC [29] STATEMENT: ALTER TABLE pull_requests ADD COLUMN merge_status merge_status_enum
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
web_1 | cursor, statement, parameters, context
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
web_1 | cursor.execute(statement, parameters)
web_1 | psycopg2.ProgrammingError: relation "pull_requests" does not exist

web_1 | The above exception was the direct cause of the following exception:
web_1 |
web_1 | Traceback (most recent call last):
web_1 | File "/usr/bin/alembic-3", line 11, in <module>
web_1 | load_entry_point('alembic==1.1.0', 'console_scripts', 'alembic')()
web_1 | File "/usr/lib/python3.6/site-packages/alembic/config.py", line 540, in main
web_1 | CommandLine(prog=prog).main(argv=argv)
web_1 | File "/usr/lib/python3.6/site-packages/alembic/config.py", line 534, in main
web_1 | self.run_cmd(cfg, options)
web_1 | File "/usr/lib/python3.6/site-packages/alembic/config.py", line 514, in run_cmd
web_1 | dict((k, getattr(options, k, None)) for k in kwarg)
web_1 | File "/usr/lib/python3.6/site-packages/alembic/command.py", line 279, in upgrade
web_1 | script.run_env()
web_1 | File "/usr/lib/python3.6/site-packages/alembic/script/base.py", line 475, in run_env
web_1 | util.load_python_file(self.dir, "env.py")
web_1 | File "/usr/lib/python3.6/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
web_1 | module = load_module_py(module_id, path)
web_1 | File "/usr/lib/python3.6/site-packages/alembic/util/compat.py", line 174, in load_module_py
web_1 | spec.loader.exec_module(module)
web_1 | File "<frozen importlib._bootstrap_external>", line 678, in exec_module
web_1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
web_1 | File "/code/alembic/env.py", line 90, in <module>
web_1 | run_migrations_online()
web_1 | File "/code/alembic/env.py", line 84, in run_migrations_online
web_1 | context.run_migrations()
web_1 | File "<string>", line 8, in run_migrations
web_1 | File "/usr/lib/python3.6/site-packages/alembic/runtime/environment.py", line 846, in run_migrations
web_1 | self.get_context().run_migrations(
kw)
web_1 | File "/usr/lib/python3.6/site-packages/alembic/runtime/migration.py", line 365, in run_migrations
web_1 | step.migration_fn(kw)
web_1 | File "/code/alembic/versions/b5efae6bb23_add_merge_status_to_the_pull_requests_.py", line 28, in upgrade
web_1 | sa.Column('merge_status', enum, nullable=True)
web_1 | File "<string>", line 8, in add_column
web_1 | File "<string>", line 3, in add_column
web_1 | File "/usr/lib/python3.6/site-packages/alembic/operations/ops.py", line 1904, in add_column
web_1 | return operations.invoke(op)
web_1 | File "/usr/lib/python3.6/site-packages/alembic/operations/base.py", line 345, in invoke
web_1 | return fn(self, operation)
web_1 | File "/usr/lib/python3.6/site-packages/alembic/operations/toimpl.py", line 131, in add_column
web_1 | operations.impl.add_column(table_name, column, schema=schema)
web_1 | File "/usr/lib/python3.6/site-packages/alembic/ddl/impl.py", line 231, in add_column
web_1 | self._exec(base.AddColumn(table_name, column, schema=schema))
web_1 | File "/usr/lib/python3.6/site-packages/alembic/ddl/impl.py", line 134, in _exec
web_1 | return conn.execute(construct, *multiparams,
params)
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
web_1 | return meth(self, multiparams, params)
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/sql/ddl.py", line 72, in execute_on_connection
web_1 | return connection._execute_ddl(self, multiparams, params)
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1073, in _execute_ddl
web_1 | compiled,
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
web_1 | e, statement, parameters, cursor, context
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1511, in _handle_dbapi_exception
web_1 | sqlalchemy_exception, with_traceback=exc_info[2], from
=e
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
web_1 | raise exception
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
web_1 | cursor, statement, parameters, context
web_1 | File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
web_1 | cursor.execute(statement, parameters)
web_1 | sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "pull_requests" does not exist
web_1 |
web_1 | [SQL: ALTER TABLE pull_requests ADD COLUMN merge_status merge_status_enum]
web_1 | (Background on this error at: http://sqlalche.me/e/13/f405)


The startup command I used is ”/bin/bash -x dev/docker-start.sh“

delete /attachments/inited in dev/containers/web-run,Error disappeared,What's wrong?

Login to comment on this ticket.

Metadata