chore: Centralize environment detection
This commit is contained in:
@@ -33,11 +33,10 @@ export async function checkDataMigrations() {
|
||||
return;
|
||||
}
|
||||
|
||||
const isProduction = env.ENVIRONMENT === "production";
|
||||
const teams = await Team.count();
|
||||
const providers = await AuthenticationProvider.count();
|
||||
|
||||
if (isProduction && teams && !providers) {
|
||||
if (env.isProduction && teams && !providers) {
|
||||
Logger.warn(`
|
||||
This version of Outline cannot start until a data migration is complete.
|
||||
Backup your database, run the database migrations and the following script:
|
||||
|
||||
Reference in New Issue
Block a user