mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #4303 from overleaf/sk-tag-saas-migrations
Migrations: tag migrations with relevant environment GitOrigin-RevId: ad6c3bea19d3c21a1fdae58e09c861a3173c792b
This commit is contained in:
@@ -1,12 +1,25 @@
|
||||
const { exec } = require('child_process')
|
||||
const { execFile } = require('child_process')
|
||||
const { waitForDb, db } = require('../../../../app/src/infrastructure/mongodb')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
const DEFAULT_ENV = 'saas'
|
||||
|
||||
module.exports = {
|
||||
initialize() {
|
||||
before(waitForDb)
|
||||
|
||||
before(function (done) {
|
||||
exec('bin/east migrate', (error, stdout, stderr) => {
|
||||
const args = [
|
||||
'run',
|
||||
'migrations',
|
||||
'--',
|
||||
'migrate',
|
||||
'-t',
|
||||
Settings.env || DEFAULT_ENV,
|
||||
]
|
||||
execFile('npm', args, (error, stdout, stderr) => {
|
||||
console.log(stdout)
|
||||
console.error(stderr)
|
||||
if (error) {
|
||||
throw error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user