Project

General

Profile

Revision b28a9050

IDb28a90506f2310c1ebf51dcd2b939ef92814c0be
Parent 22ab9ced
Child 986f6827

Added by Andreas Müller over 1 year ago

fix #7276 Make User.emailAddress a unique field

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/User.java
116 116
    protected String password;
117 117

  
118 118
    @XmlElement(name = "EmailAddress")
119
    @Column(unique = true)
119 120
    protected String emailAddress;
120 121

  
121 122
    @XmlElementWrapper(name = "GrantedAuthorities")
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/IndexAdder.java
23 23
 *
24 24
 * @see {@link UsernameConstraintUpdater}
25 25
 * @author a.mueller
26
 * @since 16.09.2010
26
 * @since 2016-10-18
27 27
 *
28 28
 */
29 29
public class IndexAdder extends SchemaUpdaterStepBase {
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v33_34/SchemaUpdater_331_34.java
20 20
import eu.etaxonomy.cdm.database.update.ColumnTypeChanger;
21 21
import eu.etaxonomy.cdm.database.update.ISchemaUpdater;
22 22
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
23
import eu.etaxonomy.cdm.database.update.IndexAdder;
23 24
import eu.etaxonomy.cdm.database.update.SchemaUpdaterBase;
24 25
import eu.etaxonomy.cdm.database.update.SimpleSchemaUpdaterStep;
25 26
import eu.etaxonomy.cdm.database.update.TableCreator;
......
29 30
/**
30 31
 * @author a.mueller
31 32
 * @since Jan 14, 2014
33
 * @see IndexAdder
32 34
 */
33 35
public class SchemaUpdater_331_34 extends SchemaUpdaterBase {
34 36

  
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v33_34/UsernameConstraintUpdater.java
24 24

  
25 25
/**
26 26
 * @author a.mueller
27
 * @since 16.09.2010
28
 *
27
 * @since 2014-06-25
29 28
 */
30 29
public class UsernameConstraintUpdater
31 30
        extends SchemaUpdaterStepBase {
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v47_49/SchemaUpdater_47_49.java
24 24
import eu.etaxonomy.cdm.database.update.SimpleSchemaUpdaterStep;
25 25
import eu.etaxonomy.cdm.database.update.TableNameChanger;
26 26
import eu.etaxonomy.cdm.database.update.TermRepresentationUpdater;
27
import eu.etaxonomy.cdm.database.update.v33_34.UsernameConstraintUpdater;
27 28
import eu.etaxonomy.cdm.database.update.v41_47.SchemaUpdater_41_47;
28 29

  
29 30
/**
......
146 147
        stepList.add(step);
147 148

  
148 149

  
150
        //7276  Make User.emailAddress a unique field
151
        //TODO H2 / PostGreSQL / SQL Server
152
        //User.email unique
153
        stepName = "Update User.emailAdress unique index";
154
        tableName = "UserAccount";
155
        String columnName = "emailAddress";
156
        step = UsernameConstraintUpdater.NewInstance(stepName, tableName, columnName);
157
        stepList.add(step);
158

  
149 159
        return stepList;
150 160
    }
151 161

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)