From d48ff09d27d234425c3e9f091ae9072d8e6d8b7a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Dec 2017 10:07:57 +0100 Subject: Use sequelize scopes --- server/models/application/application.ts | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'server/models/application') diff --git a/server/models/application/application.ts b/server/models/application/application.ts index f3c0f1052..9fc07e850 100644 --- a/server/models/application/application.ts +++ b/server/models/application/application.ts @@ -1,4 +1,3 @@ -import { Transaction } from 'sequelize' import { AllowNull, Column, Default, IsInt, Model, Table } from 'sequelize-typescript' @Table({ @@ -15,21 +14,4 @@ export class ApplicationModel extends Model { static countTotal () { return ApplicationModel.count() } - - static loadMigrationVersion () { - const query = { - attributes: [ 'migrationVersion' ] - } - - return ApplicationModel.findOne(query).then(data => data ? data.migrationVersion : null) - } - - static updateMigrationVersion (newVersion: number, transaction: Transaction) { - const options = { - where: {}, - transaction: transaction - } - - return ApplicationModel.update({ migrationVersion: newVersion }, options) - } } -- cgit v1.2.3