refs/heads/dev-parth @ 3db7e82

← Dashboard

[build_instance] Creating MySQL database: clevara_rb_dev_parth_3db7e82
mysql: [Warning] Using a password on the command line interface can be insecure.
[build_instance] Setting up Python venv
[build_instance] Running migrations
Could not create table account_analytic_lines: (pymysql.err.ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_DATE, \n\taccount_id INTEGER NOT NULL, \n\tamount FLOAT, \n\tunit_amount FLOAT' at line 4")
[SQL: 
CREATE TABLE account_analytic_lines (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	name VARCHAR(255) NOT NULL, 
	date DATE NOT NULL DEFAULT CURRENT_DATE, 
	account_id INTEGER NOT NULL, 
	amount FLOAT, 
	unit_amount FLOAT, 
	currency_id INTEGER, 
	product_id INTEGER, 
	product_uom_id INTEGER, 
	user_id INTEGER, 
	employee_id INTEGER, 
	move_line_id INTEGER, 
	general_account_id INTEGER, 
	task_id INTEGER, 
	project_id INTEGER, 
	timesheet_invoice_type VARCHAR(20), 
	analytic_distribution JSON, 
	tenant_id INTEGER, 
	company_id INTEGER, 
	branch_id INTEGER, 
	create_date DATETIME DEFAULT (now()), 
	write_date DATETIME DEFAULT (now()), 
	active BOOL NOT NULL, 
	create_uid INTEGER, 
	write_uid INTEGER, 
	PRIMARY KEY (id)
)

]
(Background on this error at: https://sqlalche.me/e/20/f405)
Could not upgrade to 1d32aac02330: (pymysql.err.OperationalError) (1824, "Failed to open the referenced table 'website_studio_websites'")
[SQL: 
CREATE TABLE website_studio_redirects (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	tenant_id INTEGER, 
	company_id INTEGER, 
	branch_id INTEGER, 
	create_uid INTEGER, 
	write_uid INTEGER, 
	create_date DATETIME DEFAULT (NOW()), 
	write_date DATETIME DEFAULT (NOW()), 
	active BOOL DEFAULT 1, 
	website_id INTEGER NOT NULL, 
	from_path VARCHAR(512) NOT NULL, 
	to_path VARCHAR(512) NOT NULL, 
	code INTEGER NOT NULL DEFAULT '301', 
	created_at DATETIME DEFAULT (NOW()), 
	updated_at DATETIME, 
	PRIMARY KEY (id), 
	FOREIGN KEY(tenant_id) REFERENCES tenants (id) ON DELETE CASCADE, 
	FOREIGN KEY(company_id) REFERENCES companies (id) ON DELETE SET NULL, 
	FOREIGN KEY(branch_id) REFERENCES branches (id) ON DELETE SET NULL, 
	FOREIGN KEY(website_id) REFERENCES website_studio_websites (id) ON DELETE CASCADE
)

]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Could not upgrade to 90c24c7ef982: (pymysql.err.OperationalError) (1824, "Failed to open the referenced table 'website_studio_websites'")
[SQL: 
CREATE TABLE website_studio_redirects (
	id INTEGER NOT NULL AUTO_INCREMENT, 
	tenant_id INTEGER, 
	company_id INTEGER, 
	branch_id INTEGER, 
	create_uid INTEGER, 
	write_uid INTEGER, 
	create_date DATETIME DEFAULT (NOW()), 
	write_date DATETIME DEFAULT (NOW()), 
	active BOOL DEFAULT 1, 
	website_id INTEGER NOT NULL, 
	from_path VARCHAR(512) NOT NULL, 
	to_path VARCHAR(512) NOT NULL, 
	code INTEGER NOT NULL DEFAULT '301', 
	created_at DATETIME DEFAULT (NOW()), 
	updated_at DATETIME, 
	PRIMARY KEY (id), 
	FOREIGN KEY(tenant_id) REFERENCES tenants (id) ON DELETE CASCADE, 
	FOREIGN KEY(company_id) REFERENCES companies (id) ON DELETE SET NULL, 
	FOREIGN KEY(branch_id) REFERENCES branches (id) ON DELETE SET NULL, 
	FOREIGN KEY(website_id) REFERENCES website_studio_websites (id) ON DELETE CASCADE
)

]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
MIGRATIONS_OK
[build_instance] Bootstrapping tenant/company/superuser
Traceback (most recent call last):
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1969, in _exec_single_context
    self.dialect.do_execute(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
    cursor.execute(statement, parameters)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/cursors.py", line 159, in execute
    result = self._query(query)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/cursors.py", line 330, in _query
    conn.query(q)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/connections.py", line 582, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/connections.py", line 847, in _read_query_result
    result.read()
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/connections.py", line 1245, in read
    first_packet = self.connection._read_packet()
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/connections.py", line 803, in _read_packet
    packet.raise_for_error()
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/protocol.py", line 219, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/err.py", line 154, in raise_mysql_exception
    raise errorclass(errno, errval, sqlstate=sqlstate)
pymysql.err.OperationalError: (1054, "Unknown column 'companies.parent_id' in 'field list'")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/scripts/bootstrap_instance.py", line 63, in main
    company = db.query(Company).filter(Company.tenant_id == tenant.id).order_by(Company.id.asc()).first()
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2766, in first
    return self.limit(1)._iter().first()  # type: ignore
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2864, in _iter
    result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2372, in execute
    return self._execute_internal(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2270, in _execute_internal
    result: Result[Any] = compile_state_cls.orm_execute_statement(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 306, in orm_execute_statement
    result = conn.execute(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1421, in execute
    return meth(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 526, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1643, in _execute_clauseelement
    ret = self._execute_context(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1848, in _execute_context
    return self._exec_single_context(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1988, in _exec_single_context
    self._handle_dbapi_exception(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2365, in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1969, in _exec_single_context
    self.dialect.do_execute(
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
    cursor.execute(statement, parameters)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/cursors.py", line 159, in execute
    result = self._query(query)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/cursors.py", line 330, in _query
    conn.query(q)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/connections.py", line 582, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/connections.py", line 847, in _read_query_result
    result.read()
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/connections.py", line 1245, in read
    first_packet = self.connection._read_packet()
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/connections.py", line 803, in _read_packet
    packet.raise_for_error()
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/protocol.py", line 219, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/var/lib/clevara-runbot/builds/dev-parth-3db7e82/src/backend/venv/lib/python3.10/site-packages/pymysql/err.py", line 154, in raise_mysql_exception
    raise errorclass(errno, errval, sqlstate=sqlstate)
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1054, "Unknown column 'companies.parent_id' in 'field list'")
[SQL: SELECT companies.id AS companies_id, companies.tenant_id AS companies_tenant_id, companies.parent_id AS companies_parent_id, companies.currency_id AS companies_currency_id, companies.name AS companies_name, companies.code AS companies_code, companies.logo_url AS companies_logo_url, companies.favicon_url AS companies_favicon_url, companies.logo AS companies_logo, companies.favicon AS companies_favicon, companies.is_active AS companies_is_active, companies.property_account_receivable_id AS companies_property_account_receivable_id, companies.property_account_payable_id AS companies_property_account_payable_id, companies.property_account_expense_categ_id AS companies_property_account_expense_categ_id, companies.property_account_income_categ_id AS companies_property_account_income_categ_id, companies.created_at AS companies_created_at 
FROM companies 
WHERE companies.tenant_id = %(tenant_id_1)s ORDER BY companies.id ASC 
 LIMIT %(param_1)s]
[parameters: {'tenant_id_1': 1, 'param_1': 1}]
(Background on this error at: https://sqlalche.me/e/20/e3q8)

=== Build dev-parth-3db7e82 started ===