Primary keys needed for bat_event

Created on 21 January 2024, 10 months ago
Updated 31 March 2024, 8 months ago

Problem/Motivation

I am on Drupal 10.0.x (stuck there for now)
When I enable bat_event, I see the following in my site status report:

Transaction isolation level
READ-COMMITTED
For this to work correctly, all tables must have a primary key. The following table(s) do not have a primary key: bat_event_availability_hourly_day_event, bat_event_availability_daily_hour_state, bat_event_availability_daily_minute_event, bat_event_availability_daily_day_state, bat_event_availability_daily_day_event, bat_event_availability_hourly_hour_event, bat_event_availability_hourly_hour_state, bat_event_availability_hourly_minute_state, webform_timeout, poll_vote, bat_event_availability_hourly_minute_event, regcode_users, bat_event_availability_hourly_day_state, amazon_item_participant, bat_event_availability_daily_minute_state, bat_event_availability_daily_hour_event. See the setting MySQL transaction isolation level page for more information.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Component

Code

Created by

🇺🇸United States SocialNicheGuru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @SocialNicheGuru
  • 🇮🇹Italy afagioli Rome

    please share here the DESC from mysql client for a few of those tables.
    IE desc bat_event_availability_hourly_day_event ;

  • Status changed to Postponed: needs info 10 months ago
  • 🇺🇸United States SocialNicheGuru

    desc bat_event_availability_hourly_day_event ;
    +---------+------------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +---------+------------------+------+-----+---------+-------+
    | unit_id | int(10) unsigned | NO | PRI | NULL | |
    | year | int(11) | NO | PRI | 0 | |
    | month | int(11) | NO | PRI | 0 | |
    | d1 | int(11) | NO | | 0 | |
    | d2 | int(11) | NO | | 0 | |
    | d3 | int(11) | NO | | 0 | |
    | d4 | int(11) | NO | | 0 | |
    | d5 | int(11) | NO | | 0 | |
    | d6 | int(11) | NO | | 0 | |
    | d7 | int(11) | NO | | 0 | |
    | d8 | int(11) | NO | | 0 | |
    | d9 | int(11) | NO | | 0 | |
    | d10 | int(11) | NO | | 0 | |
    | d11 | int(11) | NO | | 0 | |
    | d12 | int(11) | NO | | 0 | |
    | d13 | int(11) | NO | | 0 | |
    | d14 | int(11) | NO | | 0 | |
    | d15 | int(11) | NO | | 0 | |
    | d16 | int(11) | NO | | 0 | |
    | d17 | int(11) | NO | | 0 | |
    | d18 | int(11) | NO | | 0 | |
    | d19 | int(11) | NO | | 0 | |
    | d20 | int(11) | NO | | 0 | |
    | d21 | int(11) | NO | | 0 | |
    | d22 | int(11) | NO | | 0 | |
    | d23 | int(11) | NO | | 0 | |
    | d24 | int(11) | NO | | 0 | |
    | d25 | int(11) | NO | | 0 | |
    | d26 | int(11) | NO | | 0 | |
    | d27 | int(11) | NO | | 0 | |
    | d28 | int(11) | NO | | 0 | |
    | d29 | int(11) | NO | | 0 | |
    | d30 | int(11) | NO | | 0 | |
    | d31 | int(11) | NO | | 0 | |
    +---------+------------------+------+-----+---------+-------+
    34 rows in set (0.002 sec)

  • Status changed to Active 9 months ago
  • 🇺🇸United States SocialNicheGuru

    desc bat_event_availability_hourly_minute_state;
    +---------+------------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +---------+------------------+------+-----+---------+-------+
    | unit_id | int(10) unsigned | NO | PRI | NULL | |
    | year | int(11) | NO | PRI | 0 | |
    | month | int(11) | NO | PRI | 0 | |
    | day | int(11) | NO | PRI | 0 | |
    | hour | int(11) | NO | PRI | 0 | |
    | m00 | int(11) | NO | | 0 | |
    | m01 | int(11) | NO | | 0 | |
    | m02 | int(11) | NO | | 0 | |
    | m03 | int(11) | NO | | 0 | |
    | m04 | int(11) | NO | | 0 | |
    | m05 | int(11) | NO | | 0 | |
    | m06 | int(11) | NO | | 0 | |
    | m07 | int(11) | NO | | 0 | |
    | m08 | int(11) | NO | | 0 | |
    | m09 | int(11) | NO | | 0 | |
    | m10 | int(11) | NO | | 0 | |
    | m11 | int(11) | NO | | 0 | |
    | m12 | int(11) | NO | | 0 | |
    | m13 | int(11) | NO | | 0 | |
    | m14 | int(11) | NO | | 0 | |
    | m15 | int(11) | NO | | 0 | |
    | m16 | int(11) | NO | | 0 | |
    | m17 | int(11) | NO | | 0 | |
    | m18 | int(11) | NO | | 0 | |
    | m19 | int(11) | NO | | 0 | |
    | m20 | int(11) | NO | | 0 | |
    | m21 | int(11) | NO | | 0 | |
    | m22 | int(11) | NO | | 0 | |
    | m23 | int(11) | NO | | 0 | |
    | m24 | int(11) | NO | | 0 | |
    | m25 | int(11) | NO | | 0 | |
    | m26 | int(11) | NO | | 0 | |
    | m27 | int(11) | NO | | 0 | |
    | m28 | int(11) | NO | | 0 | |
    | m29 | int(11) | NO | | 0 | |
    | m30 | int(11) | NO | | 0 | |
    | m31 | int(11) | NO | | 0 | |
    | m32 | int(11) | NO | | 0 | |
    | m33 | int(11) | NO | | 0 | |
    | m34 | int(11) | NO | | 0 | |
    | m35 | int(11) | NO | | 0 | |
    | m36 | int(11) | NO | | 0 | |
    | m37 | int(11) | NO | | 0 | |
    | m38 | int(11) | NO | | 0 | |
    | m39 | int(11) | NO | | 0 | |
    | m40 | int(11) | NO | | 0 | |
    | m41 | int(11) | NO | | 0 | |
    | m42 | int(11) | NO | | 0 | |
    | m43 | int(11) | NO | | 0 | |
    | m44 | int(11) | NO | | 0 | |
    | m45 | int(11) | NO | | 0 | |
    | m46 | int(11) | NO | | 0 | |
    | m47 | int(11) | NO | | 0 | |
    | m48 | int(11) | NO | | 0 | |
    | m49 | int(11) | NO | | 0 | |
    | m50 | int(11) | NO | | 0 | |
    | m51 | int(11) | NO | | 0 | |
    | m52 | int(11) | NO | | 0 | |
    | m53 | int(11) | NO | | 0 | |
    | m54 | int(11) | NO | | 0 | |
    | m55 | int(11) | NO | | 0 | |
    | m56 | int(11) | NO | | 0 | |
    | m57 | int(11) | NO | | 0 | |
    | m58 | int(11) | NO | | 0 | |
    | m59 | int(11) | NO | | 0 | |
    +---------+------------------+------+-----+---------+-------+
    65 rows in set (0.001 sec)

  • Status changed to Needs work 9 months ago
  • Status changed to Needs review 9 months ago
  • 🇮🇹Italy afagioli Rome

    On BAT existing instances, you can

    ALTER TABLE TABLE_NAME ADD PRIMARY KEY(unit_id, year, month);

    or produce the proper hook_update_????()

Production build 0.71.5 2024