You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
valupgradeNotNeededMsg="DB schema does not need upgrading, it is already at the latest schema version: "
223
224
224
225
// Assemble the list of db actions to alter schema of existing tables and create tables that are new in each of the schema versions we have to catch up on
elseDBIO.failed(newThrowable("DB upgrade error: did not find a row in the schemas table")).asTry
230
+
valschemaRow= v.head
231
+
if (SchemaTQ.isLatestSchemaVersion(schemaRow.schemaVersion)) DBIO.failed(newThrowable(upgradeNotNeededMsg + schemaRow.schemaVersion)).asTry // I do not think there is a way to pass a msg thru the Success path
actions +=sqlu"alter table agbotagreements add column serviceOrgid character varying not null default ''"
83
+
actions +=sqlu"alter table agbotagreements add column servicePattern character varying not null default ''"
84
+
actions +=sqlu"alter table agbotagreements add column serviceUrl character varying not null default ''"
85
+
actions +=sqlu"alter table nodestatus add column services character varying not null default ''"
86
+
// If in this current level of code we started upgrading from 2 or less, that means we created the services table with the correct schema, so no need to modify it
87
+
if (fromSchemaVersion >=3) actions +=sqlu"alter table services rename column pkg to imagestore"
88
+
DBIO.seq(actions: _*) // convert the list of actions to a DBIO seq
89
+
case other => logger.error("getUpgradeSchemaStep was given invalid step "+other); DBIO.seq() // should never get here
90
+
}
91
+
}
92
+
vallatestSchemaVersion=8// NOTE: THIS MUST BE CHANGED WHEN YOU ADD TO getUpgradeSchemaStep()
65
93
vallatestSchemaDescription="Added columns agbotagreements and nodestatus tables, and changed column pkg to imagestore in services table"
0 commit comments