Mochinov

Untitled

Oct 19th, 2023
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.90 KB | None | 0 0
  1.  
  2. 2023-10-19 16:28:58.894
  3. [SQL: ALTER TABLE company ADD COLUMN "VAT_number_id" VARCHAR(64) NOT NULL]
  4. 2023-10-19 16:28:58.894
  5.  
  6. 2023-10-19 16:28:58.894
  7. sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) column "VAT_number_id" of relation "company" contains null values
  8. 2023-10-19 16:28:58.894
  9. cursor.execute(statement, parameters)
  10. 2023-10-19 16:28:58.894
  11. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute
  12. 2023-10-19 16:28:58.894
  13. self.dialect.do_execute(
  14. 2023-10-19 16:28:58.893
  15. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context
  16. 2023-10-19 16:28:58.893
  17. raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  18. 2023-10-19 16:28:58.892
  19. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception
  20. 2023-10-19 16:28:58.892
  21. self._handle_dbapi_exception(
  22. 2023-10-19 16:28:58.892
  23. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1984, in _exec_single_context
  24. 2023-10-19 16:28:58.892
  25. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  26. 2023-10-19 16:28:58.892
  27. return self._exec_single_context(
  28. 2023-10-19 16:28:58.891
  29. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1844, in _execute_context
  30. 2023-10-19 16:28:58.891
  31. ^^^^^^^^^^^^^^^^^^^^^^
  32. 2023-10-19 16:28:58.891
  33. ret = self._execute_context(
  34. 2023-10-19 16:28:58.890
  35. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1524, in _execute_ddl
  36. 2023-10-19 16:28:58.890
  37. ^^^^^^^^^^^^^^^^^^^^^^^^
  38. 2023-10-19 16:28:58.890
  39. return connection._execute_ddl(
  40. 2023-10-19 16:28:58.890
  41. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/ddl.py", line 181, in _execute_on_connection
  42. 2023-10-19 16:28:58.890
  43. ^^^^^
  44. 2023-10-19 16:28:58.890
  45. return meth(
  46. 2023-10-19 16:28:58.889
  47. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1412, in execute
  48. 2023-10-19 16:28:58.889
  49. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  50. 2023-10-19 16:28:58.889
  51. return conn.execute( # type: ignore[call-overload]
  52. 2023-10-19 16:28:58.889
  53. File "/usr/local/lib/python3.11/site-packages/alembic/ddl/impl.py", line 193, in _exec
  54. 2023-10-19 16:28:58.889
  55. self._exec(base.AddColumn(table_name, column, schema=schema))
  56. 2023-10-19 16:28:58.889
  57. File "/usr/local/lib/python3.11/site-packages/alembic/ddl/impl.py", line 322, in add_column
  58. 2023-10-19 16:28:58.889
  59. operations.impl.add_column(table_name, column, schema=schema, **kw)
  60. 2023-10-19 16:28:58.889
  61. File "/usr/local/lib/python3.11/site-packages/alembic/operations/toimpl.py", line 168, in add_column
  62. 2023-10-19 16:28:58.889
  63. ^^^^^^^^^^^^^^^^^^^
  64. 2023-10-19 16:28:58.888
  65. return fn(self, operation)
  66. 2023-10-19 16:28:58.888
  67. File "/usr/local/lib/python3.11/site-packages/alembic/operations/base.py", line 393, in invoke
  68. 2023-10-19 16:28:58.888
  69. ^^^^^^^^^^^^^^^^^^^^^
  70. 2023-10-19 16:28:58.888
  71. return operations.invoke(op)
  72. 2023-10-19 16:28:58.887
  73. File "/usr/local/lib/python3.11/site-packages/alembic/operations/ops.py", line 2128, in add_column
  74. 2023-10-19 16:28:58.887
  75. File "<string>", line 3, in add_column
  76. 2023-10-19 16:28:58.887
  77. File "<string>", line 8, in add_column
  78. 2023-10-19 16:28:58.887
  79. op.add_column('company', sa.Column('VAT_number_id', sa.String(length=64), nullable=False))
  80. 2023-10-19 16:28:58.887
  81. File "/code/alembic/versions/8dd048488348_add_field_vat_to_company.py", line 21, in upgrade
  82. 2023-10-19 16:28:58.887
  83. step.migration_fn(**kw)
  84. 2023-10-19 16:28:58.886
  85. File "/usr/local/lib/python3.11/site-packages/alembic/runtime/migration.py", line 624, in run_migrations
  86. 2023-10-19 16:28:58.886
  87. self.get_context().run_migrations(**kw)
  88. 2023-10-19 16:28:58.886
  89. File "/usr/local/lib/python3.11/site-packages/alembic/runtime/environment.py", line 937, in run_migrations
  90. 2023-10-19 16:28:58.886
  91. File "<string>", line 8, in run_migrations
  92. 2023-10-19 16:28:58.886
  93. context.run_migrations()
  94. 2023-10-19 16:28:58.886
  95. File "/code/alembic/env.py", line 86, in run_migrations_online
  96. 2023-10-19 16:28:58.886
  97. run_migrations_online()
  98. 2023-10-19 16:28:58.885
  99. File "/code/alembic/env.py", line 92, in <module>
  100. 2023-10-19 16:28:58.885
  101. File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  102. 2023-10-19 16:28:58.885
  103. File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  104. 2023-10-19 16:28:58.885
  105. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  106. 2023-10-19 16:28:58.885
  107. spec.loader.exec_module(module) # type: ignore
  108. 2023-10-19 16:28:58.885
  109. File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 109, in load_module_py
  110. 2023-10-19 16:28:58.885
  111. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  112. 2023-10-19 16:28:58.885
  113. module = load_module_py(module_id, path)
  114. 2023-10-19 16:28:58.885
  115. File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
  116. 2023-10-19 16:28:58.885
  117. util.load_python_file(self.dir, "env.py")
  118. 2023-10-19 16:28:58.885
  119. File "/usr/local/lib/python3.11/site-packages/alembic/script/base.py", line 578, in run_env
  120. 2023-10-19 16:28:58.885
  121. script.run_env()
  122. 2023-10-19 16:28:58.884
  123. File "/usr/local/lib/python3.11/site-packages/alembic/command.py", line 399, in upgrade
  124. 2023-10-19 16:28:58.884
  125. fn(
  126. 2023-10-19 16:28:58.884
  127. File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 601, in run_cmd
  128. 2023-10-19 16:28:58.884
  129. self.run_cmd(cfg, options)
  130. 2023-10-19 16:28:58.884
  131. File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 624, in main
  132. 2023-10-19 16:28:58.884
  133. CommandLine(prog=prog).main(argv=argv)
  134. 2023-10-19 16:28:58.884
  135. File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 630, in main
  136. 2023-10-19 16:28:58.883
  137. ^^^^^^
  138. 2023-10-19 16:28:58.883
  139. sys.exit(main())
  140. 2023-10-19 16:28:58.883
  141. File "/usr/local/bin/alembic", line 8, in <module>
  142. 2023-10-19 16:28:58.883
  143. Traceback (most recent call last):
  144. 2023-10-19 16:28:58.883
  145.  
  146. 2023-10-19 16:28:58.883
  147. The above exception was the direct cause of the following exception:
  148. 2023-10-19 16:28:58.883
  149.  
  150. 2023-10-19 16:28:58.883
  151.  
  152. 2023-10-19 16:28:58.883
  153. psycopg2.errors.NotNullViolation: column "VAT_number_id" of relation "company" contains null values
  154. 2023-10-19 16:28:58.883
  155. cursor.execute(statement, parameters)
  156. 2023-10-19 16:28:58.795
  157. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute
  158. 2023-10-19 16:28:58.795
  159. self.dialect.do_execute(
  160. 2023-10-19 16:28:58.794
  161. File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context
  162. 2023-10-19 16:28:58.794
  163. Traceback (most recent call last):
Add Comment
Please, Sign In to add comment