Project

General

Profile

Revision d72180e7

IDd72180e7806c55637a9c05c2e79ee4d589a3aac6
Parent ffc63466
Child e604c689

Added by Andreas Müller about 2 months ago

ref #5369 Adapt table and column names to hibernate 5 naming strategy (for PermissionsUpdater)

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/permissions/PermissionsUpdater.java
69 69

  
70 70
		//insert useraccount_grantedauthority for user admin
71 71

  
72
		/*sql = "INSERT INTO useraccount_grantedauthorityimpl (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE '" + Configuration.adminLogin + "'), 4)";
72
		/*sql = "INSERT INTO useraccount_grantedauthorityimpl (User_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE '" + Configuration.adminLogin + "'), 4)";
73 73
		datasource.executeUpdate(sql);
74 74

  
75
		sql = "INSERT INTO useraccount_grantedauthorityimpl (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE '" + Configuration.adminLogin + "'), 3)";
75
		sql = "INSERT INTO useraccount_grantedauthorityimpl (User_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE '" + Configuration.adminLogin + "'), 3)";
76 76
		datasource.executeUpdate(sql);
77 77

  
78
		sql = "INSERT INTO useraccount_grantedauthorityimpl (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE '" + Configuration.adminLogin + "'), 2)";
78
		sql = "INSERT INTO useraccount_grantedauthorityimpl (User_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE '" + Configuration.adminLogin + "'), 2)";
79 79
		datasource.executeUpdate(sql);
80 80

  
81
		sql = "INSERT INTO useraccount_grantedauthorityimpl (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE '" + Configuration.adminLogin + "'), 1)";
81
		sql = "INSERT INTO useraccount_grantedauthorityimpl (User_id, grantedauthorities_id) VALUES ((SELECT id FROM useraccount WHERE username LIKE '" + Configuration.adminLogin + "'), 1)";
82 82
		datasource.executeUpdate(sql);
83 83
		*/
84
		sql = "INSERT INTO @@UserAccount_GrantedAuthorityImpl@@ (UserAccount_id, grantedauthorities_id) VALUES ((SELECT id FROM @@UserAccount@@ WHERE username LIKE '" + Configuration.adminLogin + "'), 5)";
84
		sql = "INSERT INTO @@UserAccount_GrantedAuthorityImpl@@ (User_id, grantedauthorities_id) VALUES ((SELECT id FROM @@UserAccount@@ WHERE username LIKE '" + Configuration.adminLogin + "'), 5)";
85 85
		datasource.executeUpdate(caseType.replaceTableNames(sql));
86 86

  
87 87
		return;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)