mautic-recommender-bundle icon indicating copy to clipboard operation
mautic-recommender-bundle copied to clipboard

Database table error

Open Var20 opened this issue 3 years ago • 0 comments

Hello,

Upgraded to Mautic v3 and installed Recommender v3 compatible i.e ''a2 branch''

Here are the database errors;

  1. when updating the database:

Executing console doctrine:schema:update --force

Updating database schema...

In AbstractMySQLDriver.php line 106:

An exception occurred while executing 'ALTER TABLE mauwr_recommender ADD CO
NSTRAINT FK_D179E67512469DE2 FOREIGN KEY (category_id) REFERENCES mauwr_cat
egories (id) ON DELETE SET NULL':

Can't create table remmo_bul.mauwr_recommender (errno: 150 "Fore
ign key constraint is incorrectly formed")

In MysqliStatement.php line 151:

Can't create table remmo_bul.mauwr_recommender (errno: 150 "Fore
ign key constraint is incorrectly formed")

doctrine:schema:update [--complete] [--dump-sql] [-f|--force] [--em [EM]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--]

After updating with old recommender tables in database

  1. When again updating database error:

Executing console doctrine:schema:update --force

Updating database schema...

In AbstractMySQLDriver.php line 106:

An exception occurred while executing 'ALTER TABLE mauwr_oauth2_accesstoken
s CHANGE client_id client_id INT UNSIGNED NOT NULL, CHANGE user_id user_id
INT UNSIGNED NOT NULL, CHANGE token token VARCHAR(191) NOT NULL, CHANGE exp
ires_at expires_at BIGINT DEFAULT NULL, CHANGE scope scope VARCHAR(191) DEF
AULT NULL':

Cannot change column 'client_id': used in a foreign key constraint 'FK_9B1F
734B19EB6921'

In MysqliStatement.php line 151:

Cannot change column 'client_id': used in a foreign key constraint 'FK_9B1F
734B19EB6921'

doctrine:schema:update [--complete] [--dump-sql] [-f|--force] [--em [EM]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--]


  1. When updating segment:

Executing console mautic:segments:update --batch-limit=50 Rebuilding contacts for segment 2

In AbstractMySQLDriver.php line 42:

An exception occurred while executing 'SELECT count(leadIdPrimary) count, m
ax(leadIdPrimary) maxId, min(leadIdPrimary) minId FROM (SELECT DISTINCT l.i
d as leadIdPrimary, hoxKcPGJ.lead_id AS hoxKcPGJ_lead_id FROM mauwr_leads l
LEFT JOIN mauwr_lead_lists_leads hoxKcPGJ ON hoxKcPGJ.lead_id = l.id and (
hoxKcPGJ.leadlist_id = 2) WHERE (EXISTS(SELECT NULL FROM recommender_event_
log eEiXjkDM LEFT JOIN recommender_event_log nUzLSOTP ON nUzLSOTP.lead_id =
eEiXjkDM.lead_id AND nUzLSOTP.id > eEiXjkDM.id AND nUzLSOTP.item_id = eEi
XjkDM.item_id AND ((eEiXjkDM.item_id = nUzLSOTP.item_id AND nUzLSOTP.event
_id = 3) OR nUzLSOTP.event_id = 4) WHERE (eEiXjkDM.event_id = 2) AND (eEi
XjkDM.lead_id = l.id) AND (eEiXjkDM.date_added > ?) AND (nUzLSOTP.id IS NUL
L))) AND (hoxKcPGJ.lead_id IS NULL)) sss' with params ["2020-10-29"]:

Table 'remmo_bul.recommender_event_log' doesn't exist

In MysqliStatement.php line 86:

Table 'remmo_bul.recommender_event_log' doesn't exist

mautic:segments:update [-b|--batch-limit [BATCH-LIMIT]] [-m|--max-contacts [MAX-CONTACTS]] [-i|--list-id [LIST-ID]] [-f|--force] [--bypass-locking] [-t|--timeout TIMEOUT] [-x|--lock_mode LOCK_MODE] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--]

Thanks

Var20 avatar Oct 30 '20 11:10 Var20