diff --git a/src/addons.js b/src/addons.js index f0655febb..2ab82a0d6 100644 --- a/src/addons.js +++ b/src/addons.js @@ -1453,7 +1453,8 @@ function setupPostgreSql(app, options, callback) { const data = { database: database, username: username, - password: error ? hat(4 * 128) : existingPassword + password: error ? hat(4 * 128) : existingPassword, + locale: options.locale || 'C' }; getContainerDetails('postgresql', 'CLOUDRON_POSTGRESQL_TOKEN', function (error, result) { @@ -1487,13 +1488,14 @@ function clearPostgreSql(app, options, callback) { assert.strictEqual(typeof callback, 'function'); const { database, username } = postgreSqlNames(app.id); + const locale = options.locale || 'C'; debugApp(app, 'Clearing postgresql'); getContainerDetails('postgresql', 'CLOUDRON_POSTGRESQL_TOKEN', function (error, result) { if (error) return callback(error); - request.post(`https://${result.ip}:3000/databases/${database}/clear?access_token=${result.token}&username=${username}`, { json: true, rejectUnauthorized: false }, function (error, response) { + request.post(`https://${result.ip}:3000/databases/${database}/clear?access_token=${result.token}&username=${username}&locale=${locale}`, { json: true, rejectUnauthorized: false }, function (error, response) { if (error) return callback(new BoxError(BoxError.ADDONS_ERROR, `Network error clearing postgresql: ${error.message}`)); if (response.statusCode !== 200) return callback(new BoxError(BoxError.ADDONS_ERROR, `Error clearing postgresql. Status code: ${response.statusCode} message: ${response.body.message}`)); diff --git a/src/infra_version.js b/src/infra_version.js index 39ee1714e..1ddec8d8e 100644 --- a/src/infra_version.js +++ b/src/infra_version.js @@ -17,7 +17,7 @@ exports = module.exports = { 'images': { 'turn': { repo: 'cloudron/turn', tag: 'cloudron/turn:1.1.0@sha256:e1dd22aa6eef5beb7339834b200a8bb787ffc2264ce11139857a054108fefb4f' }, 'mysql': { repo: 'cloudron/mysql', tag: 'cloudron/mysql:2.3.2@sha256:dd624870c7f8ba9b2759f93ce740d1e092a1ac4b2d6af5007a01b30ad6b316d0' }, - 'postgresql': { repo: 'cloudron/postgresql', tag: 'cloudron/postgresql:3.2.1@sha256:ca45ba2c8356fd1ec5ec996a4e8ce1e9df6711b36c358ca19f6ab4bdc476695e' }, + 'postgresql': { repo: 'cloudron/postgresql', tag: 'cloudron/postgresql:3.2.2@sha256:9ad409f5c9ad7a37db8d62328290702ed8ea8410b633a366643519d47177eac5' }, 'mongodb': { repo: 'cloudron/mongodb', tag: 'cloudron/mongodb:3.0.0@sha256:59e50b1f55e433ffdf6d678f8c658812b4119f631db8325572a52ee40d3bc562' }, 'redis': { repo: 'cloudron/redis', tag: 'cloudron/redis:2.3.0@sha256:0e31ec817e235b1814c04af97b1e7cf0053384aca2569570ce92bef0d95e94d2' }, 'mail': { repo: 'cloudron/mail', tag: 'cloudron/mail:2.10.0@sha256:3aff92bfc85d6ca3cc6fc381c8a89625d2af95cc55ed2db692ef4e483e600372' },