1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/castopod_ynh.git synced 2024-09-03 18:16:14 +02:00

Fix migrations as pc_platforms changed.

This commit is contained in:
Mateusz 2024-07-13 23:47:18 +02:00
parent 76c0451884
commit fb90a39e33
7 changed files with 3 additions and 44 deletions

View file

@ -1,2 +0,0 @@
INSERT INTO `cp_platforms` (`slug`, `type`, `label`, `home_url`, `submit_url`) VALUES
('bluesky', 'social', 'Bluesky', 'https://bsky.app/', 'https://bsky.app/');

View file

@ -1,4 +0,0 @@
INSERT INTO `cp_platforms` (`slug`, `type`, `label`, `home_url`, `submit_url`) VALUES
('telegram', 'social', 'Telegram', 'https://www.telegram.org/', ''),
('episodes-fm', 'podcasting', 'Episodes.fm', 'https://episodes.fm/', 'https://podcastindex.org/add'),
('truefans', 'podcasting', 'Truefans', 'https://truefans.fm/', 'https://podcastindex.org/add');

View file

@ -1,14 +1,4 @@
-- change Twitter to X
INSERT IGNORE INTO `cp_platforms` (`slug`, `type`, `label`, `home_url`, `submit_url`) VALUES
('x', 'social', 'X', 'https://x.com/', 'https://x.com/i/flow/signup');
UPDATE `cp_podcasts_platforms`
SET `platform_slug` = 'x'
WHERE `platform_slug` = 'twitter';
DELETE FROM `cp_platforms` WHERE `slug` = 'twitter';
-- add buymeacoffee and kofi as funding platforms
INSERT IGNORE INTO `cp_platforms` (`slug`, `type`, `label`, `home_url`, `submit_url`) VALUES
('buymeacoffee', 'funding', 'Buy Me a Coffee', 'https://www.buymeacoffee.com/', 'https://www.buymeacoffee.com/signup'),
('kofi', 'funding', 'Ko-fi', 'https://ko-fi.com/', 'https://ko-fi.com/account/register');
UPDATE `cp_platforms`
SET `slug` = 'x'
WHERE `slug` = 'twitter';

View file

@ -1,2 +0,0 @@
INSERT IGNORE INTO `cp_platforms` (`slug`, `type`, `label`, `home_url`, `submit_url`) VALUES
('tiktok', 'social', 'Tiktok', 'https://www.tiktok.com/', 'https://www.tiktok.com/signup');

View file

@ -1,3 +0,0 @@
INSERT INTO `cp_platforms` (`slug`, `type`, `label`, `home_url`, `submit_url`) VALUES
('threads', 'social', 'Threads', 'https://www.threads.net/', 'https://www.threads.net/login'),
('youtube-music', 'podcasting', 'YouTube Music', 'https://www.youtube.com/creators/podcasts/', 'https://studio.youtube.com/channel/content/podcasts');

View file

@ -1,2 +0,0 @@
INSERT INTO `cp_platforms` (`slug`, `type`, `label`, `home_url`, `submit_url`) VALUES
('matrix', 'social', 'Matrix', 'https://matrix.org/', 'https://matrix.org/try-matrix/');

View file

@ -121,24 +121,6 @@ popd
if ynh_compare_current_package_version --comparison le --version "1.6.5~ynh1"; then
# cf https://code.castopod.org/adaures/castopod/-/releases/v1.5.2
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "../conf/sql/v1.5.2.sql"
# cf https://code.castopod.org/adaures/castopod/-/releases/v1.6.1
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "../conf/sql/v1.6.1.sql"
fi
if ynh_compare_current_package_version --comparison lt --version "1.7.3~ynh1"; then
# cf https://code.castopod.org/adaures/castopod/-/releases/v1.7.3
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "../conf/sql/v1.7.3.sql"
fi
if ynh_compare_current_package_version --comparison lt --version "1.8.2~ynh1"; then
# cf https://code.castopod.org/adaures/castopod/-/releases/v1.8.2
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "../conf/sql/v1.8.0.sql"
fi
if ynh_compare_current_package_version --comparison lt --version "1.10.5~ynh1"; then
# cf https://code.castopod.org/adaures/castopod/-/releases/v1.10.5
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "../conf/sql/v1.10.5.sql"
fi
if ynh_compare_current_package_version --comparison lt --version "1.11.0~ynh1"; then
# cf https://code.castopod.org/adaures/castopod/-/releases/v1.11.0
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "../conf/sql/v1.11.0.sql"
fi
#=================================================