Revert migration change since some cloudrons already got 4.3.3
This commit is contained in:
@@ -14,6 +14,7 @@ exports.up = function(db, callback) {
|
||||
}, done);
|
||||
});
|
||||
},
|
||||
db.runSql.bind(db, 'ALTER TABLE apps MODIFY COLUMN mailboxDomain VARCHAR(128) NOT NULL'),
|
||||
db.runSql.bind(db, 'ALTER TABLE apps ADD CONSTRAINT apps_mailDomain_constraint FOREIGN KEY(mailboxDomain) REFERENCES domains(domain)'),
|
||||
], callback);
|
||||
};
|
||||
|
||||
@@ -85,7 +85,7 @@ CREATE TABLE IF NOT EXISTS apps(
|
||||
enableBackup BOOLEAN DEFAULT 1, // misnomer: controls automatic daily backups
|
||||
enableAutomaticUpdate BOOLEAN DEFAULT 1,
|
||||
mailboxName VARCHAR(128), // mailbox of this app. default allocated as '.app'
|
||||
mailboxDomain VARCHAR(128), // mailbox domain of this apps
|
||||
mailboxDomain VARCHAR(128) NOT NULL, // mailbox domain of this apps
|
||||
label VARCHAR(128), // display name
|
||||
tagsJson VARCHAR(2048), // array of tags
|
||||
dataDir VARCHAR(256) UNIQUE,
|
||||
|
||||
+1
-1
@@ -1315,4 +1315,4 @@ function resolveList(listName, listDomain, callback) {
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ function setup(done) {
|
||||
|
||||
function addApp(callback) {
|
||||
var manifest = { version: '0.0.1', manifestVersion: 1, dockerImage: 'foo', healthCheckPath: '/', httpPort: 3, title: 'ok', addons: { } };
|
||||
appdb.add('appid', 'appStoreId', manifest, 'location', DOMAIN_0.domain, [ ] /* portBindings */, { installationState: 'installed', runState: 'running' }, callback);
|
||||
appdb.add('appid', 'appStoreId', manifest, 'location', DOMAIN_0.domain, [ ] /* portBindings */, { installationState: 'installed', runState: 'running', mailboxDomain: DOMAIN_0.domain }, callback);
|
||||
},
|
||||
|
||||
function createSettings(callback) {
|
||||
|
||||
@@ -68,7 +68,8 @@ describe('OAuth2', function () {
|
||||
accessRestriction: null,
|
||||
memoryLimit: 0,
|
||||
installationState: 'pending_install',
|
||||
runState: 'running'
|
||||
runState: 'running',
|
||||
mailboxDomain: DOMAIN_0.domain
|
||||
};
|
||||
|
||||
var APP_1 = {
|
||||
@@ -81,7 +82,8 @@ describe('OAuth2', function () {
|
||||
accessRestriction: { users: [ 'foobar' ] },
|
||||
memoryLimit: 0,
|
||||
installationState: 'pending_install',
|
||||
runState: 'running'
|
||||
runState: 'running',
|
||||
mailboxDomain: DOMAIN_0.domain
|
||||
};
|
||||
|
||||
var APP_2 = {
|
||||
@@ -94,7 +96,8 @@ describe('OAuth2', function () {
|
||||
accessRestriction: { users: [ USER_0.id ] },
|
||||
memoryLimit: 0,
|
||||
installationState: 'pending_install',
|
||||
runState: 'running'
|
||||
runState: 'running',
|
||||
mailboxDomain: DOMAIN_0.domain
|
||||
};
|
||||
|
||||
var APP_3 = {
|
||||
@@ -107,7 +110,8 @@ describe('OAuth2', function () {
|
||||
accessRestriction: { groups: [ 'someothergroup', 'admin', 'anothergroup' ] },
|
||||
memoryLimit: 0,
|
||||
installationState: 'pending_install',
|
||||
runState: 'running'
|
||||
runState: 'running',
|
||||
mailboxDomain: DOMAIN_0.domain
|
||||
};
|
||||
|
||||
// unknown app
|
||||
|
||||
@@ -80,6 +80,7 @@ describe('updatechecker - box - manual (email)', function () {
|
||||
settings._setApiServerOrigin.bind(null, 'http://localhost:4444'),
|
||||
cron.startJobs,
|
||||
domains.add.bind(null, DOMAIN_0.domain, DOMAIN_0, AUDIT_SOURCE),
|
||||
settings.setAdmin.bind(null, DOMAIN_0.domain, 'my.' + DOMAIN_0.domain),
|
||||
mail.addDomain.bind(null, DOMAIN_0.domain),
|
||||
users.createOwner.bind(null, USER_0.username, USER_0.password, USER_0.email, USER_0.displayName, AUDIT_SOURCE),
|
||||
settings.setBoxAutoupdatePattern.bind(null, constants.AUTOUPDATE_PATTERN_NEVER),
|
||||
@@ -151,6 +152,7 @@ describe('updatechecker - box - automatic (no email)', function () {
|
||||
settings._setApiServerOrigin.bind(null, 'http://localhost:4444'),
|
||||
cron.startJobs,
|
||||
domains.add.bind(null, DOMAIN_0.domain, DOMAIN_0, AUDIT_SOURCE),
|
||||
settings.setAdmin.bind(null, DOMAIN_0.domain, 'my.' + DOMAIN_0.domain),
|
||||
mail.addDomain.bind(null, DOMAIN_0.domain),
|
||||
users.createOwner.bind(null, USER_0.username, USER_0.password, USER_0.email, USER_0.displayName, AUDIT_SOURCE),
|
||||
settingsdb.set.bind(null, settings.CLOUDRON_TOKEN_KEY, 'atoken'),
|
||||
@@ -186,6 +188,7 @@ describe('updatechecker - box - automatic free (email)', function () {
|
||||
settings._setApiServerOrigin.bind(null, 'http://localhost:4444'),
|
||||
cron.startJobs,
|
||||
domains.add.bind(null, DOMAIN_0.domain, DOMAIN_0, AUDIT_SOURCE),
|
||||
settings.setAdmin.bind(null, DOMAIN_0.domain, 'my.' + DOMAIN_0.domain),
|
||||
mail.addDomain.bind(null, DOMAIN_0.domain),
|
||||
users.createOwner.bind(null, USER_0.username, USER_0.password, USER_0.email, USER_0.displayName, AUDIT_SOURCE),
|
||||
settingsdb.set.bind(null, settings.CLOUDRON_TOKEN_KEY, 'atoken'),
|
||||
@@ -235,7 +238,9 @@ describe('updatechecker - app - manual (email)', function () {
|
||||
portBindings: { PORT: 5678 },
|
||||
healthy: null,
|
||||
accessRestriction: null,
|
||||
memoryLimit: 0
|
||||
memoryLimit: 0,
|
||||
mailboxName: 'mail',
|
||||
mailboxDomain: DOMAIN_0.domain
|
||||
};
|
||||
|
||||
before(function (done) {
|
||||
@@ -247,6 +252,7 @@ describe('updatechecker - app - manual (email)', function () {
|
||||
settings._setApiServerOrigin.bind(null, 'http://localhost:4444'),
|
||||
cron.startJobs,
|
||||
domains.add.bind(null, DOMAIN_0.domain, DOMAIN_0, AUDIT_SOURCE),
|
||||
settings.setAdmin.bind(null, DOMAIN_0.domain, 'my.' + DOMAIN_0.domain),
|
||||
mail.addDomain.bind(null, DOMAIN_0.domain),
|
||||
users.createOwner.bind(null, USER_0.username, USER_0.password, USER_0.email, USER_0.displayName, AUDIT_SOURCE),
|
||||
appdb.add.bind(null, APP_0.id, APP_0.appStoreId, APP_0.manifest, APP_0.location, APP_0.domain, apps._translatePortBindings(APP_0.portBindings, APP_0.manifest), APP_0),
|
||||
@@ -342,7 +348,9 @@ describe('updatechecker - app - automatic (no email)', function () {
|
||||
portBindings: { PORT: 5678 },
|
||||
healthy: null,
|
||||
accessRestriction: null,
|
||||
memoryLimit: 0
|
||||
memoryLimit: 0,
|
||||
mailboxName: 'mail',
|
||||
mailboxDomain: DOMAIN_0.domain
|
||||
};
|
||||
|
||||
before(function (done) {
|
||||
@@ -354,6 +362,7 @@ describe('updatechecker - app - automatic (no email)', function () {
|
||||
settings._setApiServerOrigin.bind(null, 'http://localhost:4444'),
|
||||
cron.startJobs,
|
||||
domains.add.bind(null, DOMAIN_0.domain, DOMAIN_0, AUDIT_SOURCE),
|
||||
settings.setAdmin.bind(null, DOMAIN_0.domain, 'my.' + DOMAIN_0.domain),
|
||||
mail.addDomain.bind(null, DOMAIN_0.domain),
|
||||
users.createOwner.bind(null, USER_0.username, USER_0.password, USER_0.email, USER_0.displayName, AUDIT_SOURCE),
|
||||
appdb.add.bind(null, APP_0.id, APP_0.appStoreId, APP_0.manifest, APP_0.location, APP_0.domain, apps._translatePortBindings(APP_0.portBindings, APP_0.manifest), APP_0),
|
||||
@@ -405,7 +414,9 @@ describe('updatechecker - app - automatic free (email)', function () {
|
||||
portBindings: { PORT: 5678 },
|
||||
healthy: null,
|
||||
accessRestriction: null,
|
||||
memoryLimit: 0
|
||||
memoryLimit: 0,
|
||||
mailboxName: 'mail',
|
||||
mailboxDomain: DOMAIN_0.domain
|
||||
};
|
||||
|
||||
before(function (done) {
|
||||
@@ -417,6 +428,7 @@ describe('updatechecker - app - automatic free (email)', function () {
|
||||
settings._setApiServerOrigin.bind(null, 'http://localhost:4444'),
|
||||
cron.startJobs,
|
||||
domains.add.bind(null, DOMAIN_0.domain, DOMAIN_0, AUDIT_SOURCE),
|
||||
settings.setAdmin.bind(null, DOMAIN_0.domain, 'my.' + DOMAIN_0.domain),
|
||||
mail.addDomain.bind(null, DOMAIN_0.domain),
|
||||
users.createOwner.bind(null, USER_0.username, USER_0.password, USER_0.email, USER_0.displayName, AUDIT_SOURCE),
|
||||
appdb.add.bind(null, APP_0.id, APP_0.appStoreId, APP_0.manifest, APP_0.location, APP_0.domain, apps._translatePortBindings(APP_0.portBindings, APP_0.manifest), APP_0),
|
||||
|
||||
Reference in New Issue
Block a user