I have several problems installing this extension.
First of all: the tables created by this extension were of type InnoDB whereas all the other tables of Flarum are MyISAM. Is this supposed to be that way? Additionally I got errors I unfortunately didn't save and don't remember anymore.
Then I changed the default storage engine to MyISAM but with limited success. Only one of the tables was created, so I created the other table myself according to the instructions in the migrations, but it seems I made mistakes there, as I could activate the extension but adding a policy resulted in a strange error:
Column not found: 1054 Unknown column 'updated_at' in 'field list'' in ...
When I renamed
updated_at, I got the error:
Column not found: 1054 Unknown column 'term_updated_at' in 'field list'' in ...
So I decided to go back to start: removed the extension via ssh, removed the tables
flagrow_terms_policy_user, removed the columns
flagrow-terms.signup-legal-text in the
settings table (only those had been added during my previous trials), and changed the default storage engine back to InnoDB.
But now my database seems to refuse to create the tables
flagrow_terms_policy_user when I reinstall your extension. Accordingly, the admin panel throws an error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'flarum.flagrow_terms_policies' doesn't exist (SQL: select `flagrow_terms_policies`.*, `flagrow_terms_policy_user`.`user_id` as `pivot_user_id`, `flagrow_terms_policy_user`.`policy_id` as `pivot_policy_id`, `flagrow_terms_policy_user`.`accepted_at` as `pivot_accepted_at` from `flagrow_terms_policies` inner join `flagrow_terms_policy_user` on `flagrow_terms_policies`.`id` = `flagrow_terms_policy_user`.`policy_id` where `flagrow_terms_policy_user`.`user_id` = 1)
This happens even before I have the chance to activate the extension, so I assume that the migration should take place during ssh
composer require flagrow/termsalready. But there is no error message:
composer require flagrow/terms
Using version ^0.1.2 for flagrow/terms
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing flagrow/terms (0.1.2): Loading from cache
Package http-interop/http-middleware is abandoned, you should avoid using it. Use http-interop/http-server-middleware instead.
Writing lock file
Generating autoload files
In the database the tables
flagrow_terms_policy_user indeed don't exist after installing terms.
Do you have any idea?