asterisk / asterisk

The official Asterisk Project repository.

Home Page:https://www.asterisk.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug]: create_tables.py fails when trying to create MySQL 8.3 tables.

NormB opened this issue · comments

Severity

Trivial

Versions

Asterisk Master / MySQL 8.3

Components/Modules

alembic

Operating Environment

R&D being performed on Debian Bookworm.

Frequency of Occurrence

Constant

Issue Description

During an installation using MySQL, Alembic is used to create the sippeers table.

The problem is that the script used to perform the table creation fails.

Research into the problem indicated that a "qualify" column creation is attempted. The problem is that with MySQL 8.3, "qualify" is now a reserved name and backticks are required by MySQL if a reserved name is used as a column label.

https://dev.mysql.com/doc/refman/8.3/en/keywords.html#keywords-8-3-detailed-Q

Relevant log output

asterisk/contrib/ast-db-manage/config/versions
/4da0c5f79a9c_create_tables.py

Line 126 (sippeers table)

  sa.Column('qualify', sa.String(40)),

Line 223 (iaxfriends table)

 sa.Column('qualify', sa.String(10)),

Asterisk Issue Guidelines

  • Yes, I have read the Asterisk Issue Guidelines

@NormB if you're able to test #652 that'd be helpful. I can confirm that the generated SQL now has the keyword quoted, but I don't have MySQL 8.3 to test against.

@seanbright I've successfully tested and updated your PR with the results.

Thank you for the quick turnaround.