mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
Try to ignore mariadb warning
This commit is contained in:
parent
a1e87109b6
commit
19dcc52600
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ then
|
|||
|
||||
# Migrate old (erroneous) database scheme (see: https://github.com/YunoHost-Apps/wallabag2_ynh/pull/125#issuecomment-1041426972)
|
||||
ynh_script_progression --message="Migrating old (pre-2018) database scheme..." --weight=11
|
||||
ynh_mysql_execute_as_root --sql="START TRANSACTION; ALTER TABLE oauth2_access_tokens DROP FOREIGN KEY IF EXISTS FK_D247A21BA76ED395; ALTER TABLE oauth2_access_tokens ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE oauth2_access_tokens DROP FOREIGN KEY IF EXISTS FK_D247A21B19EB6921; ALTER TABLE oauth2_access_tokens ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES oauth2_clients (id); ALTER TABLE oauth2_auth_codes DROP FOREIGN KEY IF EXISTS FK_A018A10DA76ED395; ALTER TABLE oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE oauth2_clients DROP FOREIGN KEY IF EXISTS FK_F9D02AE6A76ED395; ALTER TABLE oauth2_clients ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); ALTER TABLE oauth2_refresh_tokens DROP FOREIGN KEY IF EXISTS FK_D394478CA76ED395; ALTER TABLE oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE config DROP FOREIGN KEY IF EXISTS FK_D48A2F7CA76ED395; ALTER TABLE config ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE entry DROP FOREIGN KEY IF EXISTS FK_2B219D70A76ED395; ALTER TABLE entry ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE oauth2_auth_codes DROP FOREIGN KEY IF EXISTS FK_A018A10D19EB6921; ALTER TABLE oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES oauth2_clients (id); ALTER TABLE oauth2_refresh_tokens DROP FOREIGN KEY IF EXISTS FK_D394478C19EB6921; ALTER TABLE oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES oauth2_clients (id); ALTER TABLE tagging_rule DROP FOREIGN KEY IF EXISTS FK_1AF95E7824DB0683; ALTER TABLE tagging_rule ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES config (id); COMMIT;" --database=$db_name
|
||||
ynh_exec_warn_less ynh_mysql_execute_as_root --sql="START TRANSACTION; ALTER TABLE oauth2_access_tokens DROP FOREIGN KEY IF EXISTS FK_D247A21BA76ED395; ALTER TABLE oauth2_access_tokens ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE oauth2_access_tokens DROP FOREIGN KEY IF EXISTS FK_D247A21B19EB6921; ALTER TABLE oauth2_access_tokens ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES oauth2_clients (id); ALTER TABLE oauth2_auth_codes DROP FOREIGN KEY IF EXISTS FK_A018A10DA76ED395; ALTER TABLE oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE oauth2_clients DROP FOREIGN KEY IF EXISTS FK_F9D02AE6A76ED395; ALTER TABLE oauth2_clients ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); ALTER TABLE oauth2_refresh_tokens DROP FOREIGN KEY IF EXISTS FK_D394478CA76ED395; ALTER TABLE oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE config DROP FOREIGN KEY IF EXISTS FK_D48A2F7CA76ED395; ALTER TABLE config ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE entry DROP FOREIGN KEY IF EXISTS FK_2B219D70A76ED395; ALTER TABLE entry ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES user (id); ALTER TABLE oauth2_auth_codes DROP FOREIGN KEY IF EXISTS FK_A018A10D19EB6921; ALTER TABLE oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES oauth2_clients (id); ALTER TABLE oauth2_refresh_tokens DROP FOREIGN KEY IF EXISTS FK_D394478C19EB6921; ALTER TABLE oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES oauth2_clients (id); ALTER TABLE tagging_rule DROP FOREIGN KEY IF EXISTS FK_1AF95E7824DB0683; ALTER TABLE tagging_rule ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES config (id); COMMIT;" --database=$db_name
|
||||
ynh_script_progression --message="Database migration done. Resuming normal upgrade process" --weight=11
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue