mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-20 00:18:45 +01:00
Format all source code using Prettier
This commit is contained in:
@@ -4,7 +4,6 @@ const db = require('../database');
|
||||
const settings = require('../settings');
|
||||
const { runMigrations } = require('./run_migrations');
|
||||
|
||||
|
||||
// IMPORTANT: Add new migrations that need to traverse entire database, e.g.
|
||||
// messages store, below. Whenever we need this, we need to force attachment
|
||||
// migration on startup:
|
||||
@@ -20,7 +19,9 @@ const migrations = [
|
||||
exports.run = async ({ Backbone, database } = {}) => {
|
||||
const { canRun } = await exports.getStatus({ database });
|
||||
if (!canRun) {
|
||||
throw new Error('Cannot run migrations on database without attachment data');
|
||||
throw new Error(
|
||||
'Cannot run migrations on database without attachment data'
|
||||
);
|
||||
}
|
||||
|
||||
await runMigrations({ Backbone, database });
|
||||
@@ -28,8 +29,9 @@ exports.run = async ({ Backbone, database } = {}) => {
|
||||
|
||||
exports.getStatus = async ({ database } = {}) => {
|
||||
const connection = await db.open(database.id, database.version);
|
||||
const isAttachmentMigrationComplete =
|
||||
await settings.isAttachmentMigrationComplete(connection);
|
||||
const isAttachmentMigrationComplete = await settings.isAttachmentMigrationComplete(
|
||||
connection
|
||||
);
|
||||
const hasMigrations = migrations.length > 0;
|
||||
|
||||
const canRun = isAttachmentMigrationComplete && hasMigrations;
|
||||
|
||||
Reference in New Issue
Block a user