-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only notify project owner on project overtime (#7842)
* add migration adn revision * only notify project owner about project overtime * add migration entry * add changelog entry * fix evolution & schema file * remove overtimemailinglist from organizations.csv dummy data used for testing --------- Co-authored-by: Florian M <fm3@users.noreply.github.com>
- Loading branch information
1 parent
d3b0638
commit 5818b61
Showing
10 changed files
with
62 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
START TRANSACTION; | ||
|
||
do $$ begin ASSERT (select schemaVersion from webknossos.releaseInformation) = 115, 'Previous schema version mismatch'; end; $$ LANGUAGE plpgsql; | ||
|
||
DROP VIEW webknossos.userInfos; | ||
DROP VIEW webknossos.organizations_; | ||
|
||
ALTER TABLE webknossos.organizations DROP COLUMN overTimeMailingList; | ||
|
||
|
||
|
||
CREATE VIEW webknossos.organizations_ AS SELECT * FROM webknossos.organizations WHERE NOT isDeleted; | ||
|
||
CREATE VIEW webknossos.userInfos AS | ||
SELECT | ||
u._id AS _user, m.email, u.firstName, u.lastname, o.displayName AS organization_displayName, | ||
u.isDeactivated, u.isDatasetManager, u.isAdmin, m.isSuperUser, | ||
u._organization, o.name AS organization_name, u.created AS user_created, | ||
m.created AS multiuser_created, u._multiUser, m._lastLoggedInIdentity, u.lastActivity, m.isEmailVerified | ||
FROM webknossos.users_ u | ||
JOIN webknossos.organizations_ o ON u._organization = o._id | ||
JOIN webknossos.multiUsers_ m on u._multiUser = m._id; | ||
|
||
UPDATE webknossos.releaseInformation SET schemaVersion = 116; | ||
|
||
COMMIT TRANSACTION; |
24 changes: 24 additions & 0 deletions
24
conf/evolutions/reversions/116-drop-overtimemailinglist.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
START TRANSACTION; | ||
|
||
do $$ begin ASSERT (select schemaVersion from webknossos.releaseInformation) = 116, 'Previous schema version mismatch'; end; $$ LANGUAGE plpgsql; | ||
|
||
DROP VIEW webknossos.userInfos; | ||
DROP VIEW webknossos.organizations_; | ||
|
||
ALTER TABLE webknossos.organizations ADD COLUMN overTimeMailingList VARCHAR(512) NOT NULL DEFAULT ''; | ||
|
||
CREATE VIEW webknossos.organizations_ AS SELECT * FROM webknossos.organizations WHERE NOT isDeleted; | ||
|
||
CREATE VIEW webknossos.userInfos AS | ||
SELECT | ||
u._id AS _user, m.email, u.firstName, u.lastname, o.displayName AS organization_displayName, | ||
u.isDeactivated, u.isDatasetManager, u.isAdmin, m.isSuperUser, | ||
u._organization, o.name AS organization_name, u.created AS user_created, | ||
m.created AS multiuser_created, u._multiUser, m._lastLoggedInIdentity, u.lastActivity, m.isEmailVerified | ||
FROM webknossos.users_ u | ||
JOIN webknossos.organizations_ o ON u._organization = o._id | ||
JOIN webknossos.multiUsers_ m on u._multiUser = m._id; | ||
|
||
UPDATE webknossos.releaseInformation SET schemaVersion = 115; | ||
|
||
COMMIT TRANSACTION; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
_id,name,additionalinformation,logoUrl,displayName,_rootFolder,newusermailinglist,overtimemailinglist,enableautoverify,pricingPlan,paidUntil,includedUsers,includedStorage,lastStorageScanTime,created,isdeleted | ||
'5ab0c6a674d0af7b003b23ac','Organization_X','lorem ipsum','/assets/images/mpi-logos.svg','Organization_X',570b9f4e4bb848d0885ea917,'','',f,'Custom',,,,,0,'2000-01-01 09:30:31.91+01','2018-03-20 09:30:31.91+01',f | ||
'6bb0c6a674d0af7b003b23bd','Organization_Y','foo bar','/assets/images/mpi-logos.svg','Organization_Y','570b9f4e4bb848d088a83aef','','',f,'Custom',,,,,0,'2000-01-01 09:30:31.91+01','2018-03-24 09:30:31.91+01',f | ||
_id,name,additionalinformation,logoUrl,displayName,_rootFolder,newusermailinglist,enableautoverify,pricingPlan,paidUntil,includedUsers,includedStorage,lastStorageScanTime,created,isdeleted | ||
'5ab0c6a674d0af7b003b23ac','Organization_X','lorem ipsum','/assets/images/mpi-logos.svg','Organization_X',570b9f4e4bb848d0885ea917,'',f,'Custom',,,,,0,'2000-01-01 09:30:31.91+01','2018-03-20 09:30:31.91+01',f | ||
'6bb0c6a674d0af7b003b23bd','Organization_Y','foo bar','/assets/images/mpi-logos.svg','Organization_Y','570b9f4e4bb848d088a83aef','',f,'Custom',,,,,0,'2000-01-01 09:30:31.91+01','2018-03-24 09:30:31.91+01',f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters