add install/migrate.sql

This commit is contained in:
Milan
2018-01-17 23:08:50 +01:00
parent fa4e7c636c
commit cec1a0fdcc
4 changed files with 64 additions and 3 deletions

View File

@@ -148,6 +148,8 @@ apt-get install <deb-package>
== 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 <perl-package>
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

33
install/migrate.sql Normal file
View File

@@ -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';