From cec1a0fdccca5e7c44003a12ef411a81882a8ca8 Mon Sep 17 00:00:00 2001 From: Milan Date: Wed, 17 Jan 2018 23:08:50 +0100 Subject: [PATCH] add install/migrate.sql --- install/INSTALL.txt | 17 ++++++++++++++--- install/migrate.sql | 33 +++++++++++++++++++++++++++++++++ recordings/README.md | 0 website/agenda/.project | 17 +++++++++++++++++ 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 install/migrate.sql delete mode 100644 recordings/README.md create mode 100644 website/agenda/.project diff --git a/install/INSTALL.txt b/install/INSTALL.txt index 3a6485b..64d4d71 100644 --- a/install/INSTALL.txt +++ b/install/INSTALL.txt @@ -148,6 +148,8 @@ apt-get install == Install by deb package == +mariadb-server +build-essentials libapreq2-3 libapache-dbi-perl libauthen-passphrase-blowfish-perl @@ -171,19 +173,20 @@ libtext-wikicreole-perl liburi-escape-xs-perl perlmagick - == Install by CPAN perl packages == cpan Apache2::Upload Apache::DBI +Authen::Passphrase Authen::Passphrase::BlowfishCrypt Calendar::Simple +CGI::Simple +CGI::Session CGI CGI::Carp CGI::Cookie -CGI::Session Config::General Data::Dumper DateTime @@ -201,7 +204,7 @@ HTML::Template::Compiled::Plugin::XMLEscape JSON MIME::Base64 MIME::Lite -POSIX +Text::Diff::FormatedHtml Text::WikiCreole Time::Local Time::localtime @@ -225,3 +228,11 @@ https://localhost/agenda/planung/ ccAdmin shug!3Lu +=== how to migrate schema from one version to another one + +cat calcmsOld.sql | mysql -u root calcmsOld +cat calcmsNew.sql | mysql -u root calcmsNew + +mysqldiff --force --changes-for=server2 --difftype=sql calcmsOld:calcmsNew > migrate.sql +cat migrate | mysql -u root calcms + diff --git a/install/migrate.sql b/install/migrate.sql new file mode 100644 index 0000000..6c27fbe --- /dev/null +++ b/install/migrate.sql @@ -0,0 +1,33 @@ +ALTER TABLE `calcms_audio_recordings` + DROP COLUMN md5, + ADD COLUMN processed tinyint(1) NULL DEFAULT '0', + ADD COLUMN modified_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + ADD COLUMN mastered tinyint(1) NULL DEFAULT '0', + ADD COLUMN rmsLeft float NULL, + ADD COLUMN audioDuration float NULL DEFAULT '0' AFTER size, + ADD COLUMN rmsRight float NULL, + ADD COLUMN eventDuration int(11) NULL DEFAULT '0', + CHANGE COLUMN created_at created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + CHANGE COLUMN size size bigint(20) unsigned NOT NULL DEFAULT '0' AFTER created_at; + + +ALTER TABLE `calcms_playout` + DROP COLUMN relpay_gain, + ADD INDEX modified_at (modified_at), + ADD COLUMN replay_gain float NULL AFTER rms_image, + ADD COLUMN modified_at datetime NULL, + ADD COLUMN updated_at datetime NULL DEFAULT CURRENT_TIMESTAMP; + + +ALTER TABLE `calcms_roles` + ADD COLUMN read_playout tinyint(1) unsigned NOT NULL AFTER delete_audio_recordings; + + +ALTER TABLE `calcms_series_events` + ADD INDEX pse (studio_id,project_id,event_id); + + +ALTER TABLE `calcms_series_schedule` + CHANGE COLUMN start_offset start_offset int(11) NULL DEFAULT '0', + CHANGE COLUMN nextDay nextDay int(11) NULL DEFAULT '0'; + diff --git a/recordings/README.md b/recordings/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/website/agenda/.project b/website/agenda/.project new file mode 100644 index 0000000..cdc7e2c --- /dev/null +++ b/website/agenda/.project @@ -0,0 +1,17 @@ + + + piradio.de-calcms + + + + + + org.epic.perleditor.perlbuilder + + + + + + org.epic.perleditor.perlnature + +