User:Victor Grousset - tuxayo/Coding Guidelines-SQL11-changes

From Koha Wiki

Jump to: navigation, search

Contents

Proposed change

current guideline: https://wiki.koha-community.org/wiki/Coding_Guidelines#SQL11:_All_fields_added_to_the_database_must_be_documented_in_kohastructure.sql

WIP see if there is something to change and what.

  • Coding Guidelines
  • QA tools?
  • Existing comments?

Reasons

WIP

Current state

Field comments

  • 12 occurrences of «COMMENT '»
  • More than 1000 occurrences of «, --». After a check, more than 99% are field comments so it's not noise/false positive
SchemaSpy compatibility

Both

DBIC compatibility

Only the COMMENT syntax ends up in DBIC files

check: COMMENT syntax

https://gitlab.com/koha-community/Koha/-/blob/4eac2298592ef7d75bd6575cb2e823aeeace8f9d/installer/data/mysql/kohastructure.sql#L1368

https://gitlab.com/koha-community/Koha/-/blob/7cfeb543747cea87223cfaa7e380f48df754a017/Koha/Schema/Result/SearchField.pm#L46

check: , -- syntax

https://gitlab.com/koha-community/Koha/-/blob/4eac2298592ef7d75bd6575cb2e823aeeace8f9d/installer/data/mysql/kohastructure.sql#L1327

https://gitlab.com/koha-community/Koha/-/blob/feab2cbeb2179589c74524135bd2ff57b660a8e1/Koha/Schema/Result/SavedSql.pm#L32

Table comments

  • 68 occurrences of «( --»
  • 2 occurrences of «COMMENT=»
SchemaSpy compatibility

Only the COMMENT= syntax

DBIC compatibility

Only the COMMENT= syntax

Personal tools