Project

General

Profile

Revision 612548d6

ID612548d697ca1cbfb5b65062c1b119ccdfafb04a
Parent 80f29fef
Child 60454c9a

Added by Andreas Müller 11 months ago

ref #7276 revert "make User.email a unique field"

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/User.java
127 127
    protected String salt;
128 128

  
129 129
    @XmlElement(name = "EmailAddress")
130
    @Column(unique = true)
131 130
    protected String emailAddress;
132 131

  
133 132
    @XmlElementWrapper(name = "GrantedAuthorities")
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v33_34/UsernameConstraintUpdater.java
60 60
	private void removeDuplicates(ICdmDataSource datasource, CaseType caseType,
61 61
	        SchemaUpdateResult result) {
62 62
		try {
63
			Set<String> existing = new HashSet<String>();
63
			Set<String> existing = new HashSet<>();
64 64
			String sql = " SELECT id, columnName as uniquecol FROM tableName ";
65 65
			sql = sql.replace("columnName", columnName).replace("tableName", caseType.transformTo(tableName));
66 66
			ResultSet rs = datasource.executeQuery(sql);
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v47_49/SchemaUpdater_47_49.java
25 25
import eu.etaxonomy.cdm.database.update.SimpleSchemaUpdaterStep;
26 26
import eu.etaxonomy.cdm.database.update.TableNameChanger;
27 27
import eu.etaxonomy.cdm.database.update.TermRepresentationUpdater;
28
import eu.etaxonomy.cdm.database.update.v33_34.UsernameConstraintUpdater;
29 28
import eu.etaxonomy.cdm.database.update.v41_47.SchemaUpdater_41_47;
30 29

  
31 30
/**
......
217 216

  
218 217

  
219 218

  
220
        //7276  Make User.emailAddress a unique field
221
        //TODO H2 / PostGreSQL / SQL Server
222
        //User.email unique
223
        stepName = "Update User.emailAdress unique index";
224
        tableName = "UserAccount";
225
        columnName = "emailAddress";
226
        step = UsernameConstraintUpdater.NewInstance(stepName, tableName, columnName);
227
        stepList.add(step);
219
//        //7276  Make User.emailAddress a unique field
220
//        //TODO H2 / PostGreSQL / SQL Server
221
//        //User.email unique
222
//        stepName = "Update User.emailAdress unique index";
223
//        tableName = "UserAccount";
224
//        columnName = "emailAddress";
225
//        step = UsernameConstraintUpdater.NewInstance(stepName, tableName, columnName);
226
//        stepList.add(step);
228 227

  
229 228
        return stepList;
230 229
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)