Travis supports only mysql 5.5 by default. 5.5 doesn't support

precision in timestamp, so we have to manually install the mysql
version 5.6.14
 - Fixes #127
This commit is contained in:
Giri Dandu 2015-04-09 00:23:44 -04:00
parent dcf517450e
commit a8981f7a8a
6 changed files with 20 additions and 6 deletions

View File

@ -19,4 +19,18 @@ env:
before_install:
- mysql -e 'create database deploydb;'
- psql -c 'create database travis_ci_test;' -U postgres
- psql -c 'create database travis_ci_test;' -U postgres
install:
- "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5"
- "sudo apt-get autoremove"
- "sudo apt-get install libaio1"
- "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/"
- "sudo dpkg -i mysql-5.6.14.deb"
- "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server"
- "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/"
# some config values were changed since 5.5
- "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf"
- "sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf"
- "sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf"
- "sudo /etc/init.d/mysql.server start"

View File

@ -47,7 +47,7 @@ class V2__artifacts_versions extends DeployDBMigration {
version VARCHAR(255) NOT NULL,
sourceUrl TEXT,
createdAt TIMESTAMP(3),
deletedAt TIMESTAMP NULL
deletedAt TIMESTAMP(3) NULL
);
"""
}

View File

@ -54,7 +54,7 @@ class V4__create_deployments_table extends DeployDBMigration {
status INT NOT NULL,
createdAt TIMESTAMP(3),
deletedAt TIMESTAMP NULL,
deletedAt TIMESTAMP(3) NULL,
PRIMARY KEY (id)
);

View File

@ -52,7 +52,7 @@ class V5__create_flows_table extends DeployDBMigration {
service TEXT NOT NULL,
createdAt TIMESTAMP(3),
deletedAt TIMESTAMP NULL,
deletedAt TIMESTAMP(3) NULL,
PRIMARY KEY (id)
);

View File

@ -58,7 +58,7 @@ class V6__create_promotion_results_table extends DeployDBMigration {
deploymentId BIGINT NOT NULL,
createdAt TIMESTAMP(3),
deletedAt TIMESTAMP NULL,
deletedAt TIMESTAMP(3) NULL,
PRIMARY KEY (id),
FOREIGN KEY (deploymentId) REFERENCES deployments(id)

View File

@ -52,7 +52,7 @@ class V8__create_configs_table extends DeployDBMigration {
ident VARCHAR(8192),
modelType INT NOT NULL,
createdAt TIMESTAMP(3),
deletedAt TIMESTAMP NULL,
deletedAt TIMESTAMP(3) NULL,
PRIMARY KEY (id)
);
"""