Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update xmldb.md #710

Merged
merged 1 commit into from
Aug 27, 2023
Merged

Update xmldb.md #710

merged 1 commit into from
Aug 27, 2023

Conversation

lucaboesch
Copy link
Collaborator

@lucaboesch lucaboesch commented Aug 25, 2023

Ordering of the Conventions List as in https://docs.moodle.org/dev/XMLDB_defining_an_XML_structure. Note that the Github Markdown preview does not do accurately preview ordered lists second level numbers like they should appear see https://youtu.be/iBA-j6XaHNc?si=w1mE3--keCxcnxZR&t=333 I hope docusaurus then gets it right.

@netlify
Copy link

netlify bot commented Aug 25, 2023

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4933162
🔍 Latest deploy log https://app.netlify.com/sites/moodledevdocs/deploys/64ea25df1519ac0008bb6773
😎 Deploy Preview https://deploy-preview-710--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2023

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 74 🟠 87 🟢 92 🟢 90 🟢 100 Report
/docs/apis/commonfiles 🔴 38 🟠 85 🟢 92 🟢 100 🟢 100 Report
/general/development/gettingstarted 🟠 52 🟠 87 🟢 92 🟢 90 🟢 100 Report
/general/releases 🔴 47 🟠 87 🟢 92 🟢 100 🟢 100 Report

Copy link
Member

@andrewnicols andrewnicols left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Luca,

How about simply indenting them?

1. About names:
    1. All lowercase names (tables, indexes, keys and fields).
    1. Table names and field names must use only a-z, 0-9 and _ chars. Max 28 characters.
    1. Key and index names under the XMLDB Files must be formed by concatenating the name of the fields present in the key/index with the '"-" (minus) character.
    1. Primary key always must be named "primary" (this is one exception to the previous convention).
    1. It's highly recommended to avoid [reserved words](https://docs.moodle.org/dev/XMLDB_reserved_words) completely. We know we have some of them now but they should be completely out for next releases.
1. About NULLS
    1. Avoid to create all the fields as NOT NULL with the *silly* default value `*` (empty string). The underlying code used to create tables will handle it properly but the XMLDB structure must be REAL. Read more in the [Problems Page](https://docs.moodle.org/dev/XMLDB_Problems#NOT_NULL_fields_using_a_DEFAULT_*_clause).
1. About FOREIGN KEYS
    1. Under the tables of every XMLDB file, you must define the existing **Foreign Keys** (FK) properly. This will allow everybody to know a bit better the structure, allow to evolve to a better constrained system in the future and will provide the underlying code with the needed info to create the proper indexes.
    1. Note that, if you define any field combination as FK you won't have to create any index on that fields, the code will do it automatically!
    1. Respect Convention 1.3
1. About UNIQUE KEYS
    1. Declare any fields as UNIQUE KEY (UK) only if they are going to be used as target for one FK. Create unique indexes instead.
    1. Respect Convention 1.3

No need for all of this HTML.

@lucaboesch
Copy link
Collaborator Author

Okay fair enough @andrewnicols
I tried do do this in Markdown and submitted another, amended, commit.

@lucaboesch lucaboesch force-pushed the xmldbnumbering branch 4 times, most recently from bc165b4 to 44c80b9 Compare August 26, 2023 10:00
Ordering of the Conventions List as in https://docs.moodle.org/dev/XMLDB_defining_an_XML_structure.
Note that the Github Markdown preview does not do accurately preview ordered lists second level numbers like they should appear see https://youtu.be/iBA-j6XaHNc?si=w1mE3--keCxcnxZR&t=333 I hope docusaurus then gets it right.
auto-merge was automatically disabled August 26, 2023 16:18

Head branch was pushed to by a user without write access

@andrewnicols andrewnicols added this pull request to the merge queue Aug 27, 2023
Merged via the queue into moodle:main with commit 47a30d9 Aug 27, 2023
7 checks passed
@lucaboesch
Copy link
Collaborator Author

Yet, as I was fearing, it does not take arabic (1,2,3) numbers for the sublists.
image
I think there's no way around this except some coding in HTML.

That has to be arabic because it is consistently referring to point 1.3…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants