aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/application/application.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/application/application.ts')
-rw-r--r--server/models/application/application.ts18
1 files changed, 0 insertions, 18 deletions
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 @@
1import { Transaction } from 'sequelize'
2import { AllowNull, Column, Default, IsInt, Model, Table } from 'sequelize-typescript' 1import { AllowNull, Column, Default, IsInt, Model, Table } from 'sequelize-typescript'
3 2
4@Table({ 3@Table({
@@ -15,21 +14,4 @@ export class ApplicationModel extends Model<ApplicationModel> {
15 static countTotal () { 14 static countTotal () {
16 return ApplicationModel.count() 15 return ApplicationModel.count()
17 } 16 }
18
19 static loadMigrationVersion () {
20 const query = {
21 attributes: [ 'migrationVersion' ]
22 }
23
24 return ApplicationModel.findOne(query).then(data => data ? data.migrationVersion : null)
25 }
26
27 static updateMigrationVersion (newVersion: number, transaction: Transaction) {
28 const options = {
29 where: {},
30 transaction: transaction
31 }
32
33 return ApplicationModel.update({ migrationVersion: newVersion }, options)
34 }
35} 17}