Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2023-10-19 16:28:58.894
- [SQL: ALTER TABLE company ADD COLUMN "VAT_number_id" VARCHAR(64) NOT NULL]
- 2023-10-19 16:28:58.894
- 2023-10-19 16:28:58.894
- sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) column "VAT_number_id" of relation "company" contains null values
- 2023-10-19 16:28:58.894
- cursor.execute(statement, parameters)
- 2023-10-19 16:28:58.894
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute
- 2023-10-19 16:28:58.894
- self.dialect.do_execute(
- 2023-10-19 16:28:58.893
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context
- 2023-10-19 16:28:58.893
- raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
- 2023-10-19 16:28:58.892
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception
- 2023-10-19 16:28:58.892
- self._handle_dbapi_exception(
- 2023-10-19 16:28:58.892
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1984, in _exec_single_context
- 2023-10-19 16:28:58.892
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2023-10-19 16:28:58.892
- return self._exec_single_context(
- 2023-10-19 16:28:58.891
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1844, in _execute_context
- 2023-10-19 16:28:58.891
- ^^^^^^^^^^^^^^^^^^^^^^
- 2023-10-19 16:28:58.891
- ret = self._execute_context(
- 2023-10-19 16:28:58.890
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1524, in _execute_ddl
- 2023-10-19 16:28:58.890
- ^^^^^^^^^^^^^^^^^^^^^^^^
- 2023-10-19 16:28:58.890
- return connection._execute_ddl(
- 2023-10-19 16:28:58.890
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/ddl.py", line 181, in _execute_on_connection
- 2023-10-19 16:28:58.890
- ^^^^^
- 2023-10-19 16:28:58.890
- return meth(
- 2023-10-19 16:28:58.889
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1412, in execute
- 2023-10-19 16:28:58.889
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2023-10-19 16:28:58.889
- return conn.execute( # type: ignore[call-overload]
- 2023-10-19 16:28:58.889
- File "/usr/local/lib/python3.11/site-packages/alembic/ddl/impl.py", line 193, in _exec
- 2023-10-19 16:28:58.889
- self._exec(base.AddColumn(table_name, column, schema=schema))
- 2023-10-19 16:28:58.889
- File "/usr/local/lib/python3.11/site-packages/alembic/ddl/impl.py", line 322, in add_column
- 2023-10-19 16:28:58.889
- operations.impl.add_column(table_name, column, schema=schema, **kw)
- 2023-10-19 16:28:58.889
- File "/usr/local/lib/python3.11/site-packages/alembic/operations/toimpl.py", line 168, in add_column
- 2023-10-19 16:28:58.889
- ^^^^^^^^^^^^^^^^^^^
- 2023-10-19 16:28:58.888
- return fn(self, operation)
- 2023-10-19 16:28:58.888
- File "/usr/local/lib/python3.11/site-packages/alembic/operations/base.py", line 393, in invoke
- 2023-10-19 16:28:58.888
- ^^^^^^^^^^^^^^^^^^^^^
- 2023-10-19 16:28:58.888
- return operations.invoke(op)
- 2023-10-19 16:28:58.887
- File "/usr/local/lib/python3.11/site-packages/alembic/operations/ops.py", line 2128, in add_column
- 2023-10-19 16:28:58.887
- File "<string>", line 3, in add_column
- 2023-10-19 16:28:58.887
- File "<string>", line 8, in add_column
- 2023-10-19 16:28:58.887
- op.add_column('company', sa.Column('VAT_number_id', sa.String(length=64), nullable=False))
- 2023-10-19 16:28:58.887
- File "/code/alembic/versions/8dd048488348_add_field_vat_to_company.py", line 21, in upgrade
- 2023-10-19 16:28:58.887
- step.migration_fn(**kw)
- 2023-10-19 16:28:58.886
- File "/usr/local/lib/python3.11/site-packages/alembic/runtime/migration.py", line 624, in run_migrations
- 2023-10-19 16:28:58.886
- self.get_context().run_migrations(**kw)
- 2023-10-19 16:28:58.886
- File "/usr/local/lib/python3.11/site-packages/alembic/runtime/environment.py", line 937, in run_migrations
- 2023-10-19 16:28:58.886
- File "<string>", line 8, in run_migrations
- 2023-10-19 16:28:58.886
- context.run_migrations()
- 2023-10-19 16:28:58.886
- File "/code/alembic/env.py", line 86, in run_migrations_online
- 2023-10-19 16:28:58.886
- run_migrations_online()
- 2023-10-19 16:28:58.885
- File "/code/alembic/env.py", line 92, in <module>
- 2023-10-19 16:28:58.885
- File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
- 2023-10-19 16:28:58.885
- File "<frozen importlib._bootstrap_external>", line 940, in exec_module
- 2023-10-19 16:28:58.885
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2023-10-19 16:28:58.885
- spec.loader.exec_module(module) # type: ignore
- 2023-10-19 16:28:58.885
- File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 109, in load_module_py
- 2023-10-19 16:28:58.885
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2023-10-19 16:28:58.885
- module = load_module_py(module_id, path)
- 2023-10-19 16:28:58.885
- File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
- 2023-10-19 16:28:58.885
- util.load_python_file(self.dir, "env.py")
- 2023-10-19 16:28:58.885
- File "/usr/local/lib/python3.11/site-packages/alembic/script/base.py", line 578, in run_env
- 2023-10-19 16:28:58.885
- script.run_env()
- 2023-10-19 16:28:58.884
- File "/usr/local/lib/python3.11/site-packages/alembic/command.py", line 399, in upgrade
- 2023-10-19 16:28:58.884
- fn(
- 2023-10-19 16:28:58.884
- File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 601, in run_cmd
- 2023-10-19 16:28:58.884
- self.run_cmd(cfg, options)
- 2023-10-19 16:28:58.884
- File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 624, in main
- 2023-10-19 16:28:58.884
- CommandLine(prog=prog).main(argv=argv)
- 2023-10-19 16:28:58.884
- File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 630, in main
- 2023-10-19 16:28:58.883
- ^^^^^^
- 2023-10-19 16:28:58.883
- sys.exit(main())
- 2023-10-19 16:28:58.883
- File "/usr/local/bin/alembic", line 8, in <module>
- 2023-10-19 16:28:58.883
- Traceback (most recent call last):
- 2023-10-19 16:28:58.883
- 2023-10-19 16:28:58.883
- The above exception was the direct cause of the following exception:
- 2023-10-19 16:28:58.883
- 2023-10-19 16:28:58.883
- 2023-10-19 16:28:58.883
- psycopg2.errors.NotNullViolation: column "VAT_number_id" of relation "company" contains null values
- 2023-10-19 16:28:58.883
- cursor.execute(statement, parameters)
- 2023-10-19 16:28:58.795
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute
- 2023-10-19 16:28:58.795
- self.dialect.do_execute(
- 2023-10-19 16:28:58.794
- File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context
- 2023-10-19 16:28:58.794
- Traceback (most recent call last):
Add Comment
Please, Sign In to add comment