From d75933c3dcf4732de3f323ba263b4868c93f247e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 19 Jan 2023 17:25:42 +0100 Subject: [PATCH] Fix missing table --- scripts/from_beta_16.sql | 11 +++++++++++ scripts/upgrade | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 scripts/from_beta_16.sql diff --git a/scripts/from_beta_16.sql b/scripts/from_beta_16.sql new file mode 100644 index 0000000..ce55a4b --- /dev/null +++ b/scripts/from_beta_16.sql @@ -0,0 +1,11 @@ +SET AUTOCOMMIT = 0; +START TRANSACTION; + +ALTER TABLE `cp_settings` +ADD COLUMN context VARCHAR(255) NULL AFTER `type`; + +ALTER TABLE cp_podcasts ADD COLUMN published_at DATETIME DEFAULT NULL AFTER +updated_by; +UPDATE cp_podcasts SET published_at = created_at; + +COMMIT; \ No newline at end of file diff --git a/scripts/upgrade b/scripts/upgrade index 78cd7df..053b893 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,6 +116,8 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./from_beta_16.sql + #================================================= # UPGRADE DEPENDENCIES #=================================================