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

Problems with database schema #137

Open
foxlapinou opened this issue Feb 21, 2020 · 1 comment
Open

Problems with database schema #137

foxlapinou opened this issue Feb 21, 2020 · 1 comment

Comments

@foxlapinou
Copy link

Hi,

I'm using Moodle 3.7.4 and Moodle 3.5.10, with latest Attestoodle version (1.8.3).
I've just checked the database schema (admin/cli/check_database_schema.php) and found errors related to Attestoodle plugin, only for Moodle 3.5.10 (strange for me) :

-------------------------------------------------------------------------------
tool_attestoodle_training
* column 'startdate' should be NOT NULL (I)
-------------------------------------------------------------------------------
tool_attestoodle_user_style
* column 'userid' should be NOT NULL (I)
* column 'trainingid' should be NOT NULL (I)
* column 'templateid' should be NOT NULL (I)
-------------------------------------------------------------------------------
tool_attestoodle_learner
* column 'userid' should be NOT NULL (I)
* column 'trainingid' should be NOT NULL (I)
* column 'categoryid' should be NOT NULL (I)
-------------------------------------------------------------------------------

Do you think there's a coherence problem between files db/upgrade.php and db/install.xml, that you should correct ?

Or is the problem only in my Moodle installation (because it's 3.5) ? And if it's the case, how to correct this?

Thanks in advance if you can provide information.
Séverin

@mleconte
Copy link
Collaborator

Hello
Thank you for your comments, I didn't know about this test.

I don't have a platform in 3.5, but I don't think it comes from the Moodle version.
I think on your Moodle 3.5 you installed attestoodle and upgraded it, so the definition of the new tables was given by upgrade.php rather than install.xml.

Whereas on your 3.8 you directly installed the last version that had natively these tables.

I'm going to modify the upgrade.php file even though it should not be used anymore.

After checking the indexes via xmldb, I see that the indexes refer to table names with prefix, I will also modify the install.xml

Yours sincerely.

@mleconte mleconte mentioned this issue Feb 24, 2020
mleconte added a commit that referenced this issue Feb 24, 2020
correction définition schéma BDD (cf issue #137)
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

No branches or pull requests

2 participants