Project

General

Profile

Revision 6c8124b2

ID6c8124b25742269b5d5a4e32c34bddeb32a442df
Parent 7b733b2a
Child 4f817727

Added by Andreas Müller about 1 year ago

ref #7099 update script for CdmAuthority tables

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v55_58/SchemaUpdater_58_581.java
18 18
import eu.etaxonomy.cdm.database.update.ISchemaUpdater;
19 19
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
20 20
import eu.etaxonomy.cdm.database.update.SchemaUpdaterBase;
21
import eu.etaxonomy.cdm.database.update.TableCreator;
21 22

  
22 23
/**
23 24
 * @author a.mueller
......
63 64
		ColumnNameChanger.NewIntegerInstance(stepList, stepName, tableName,
64 65
		        oldColumnName, newColumnName, INCLUDE_AUDIT);
65 66

  
66
		return stepList;
67
		//7099 Make CdmAuthority a persistable class - create 'Authority' table
68
		stepName = "Create Authority table ";
69
        tableName = "Authority";
70
        String[] columnNames = new String[]{"DTYPE", "operations", "permissionClass",
71
                "property", "targetUuid", "role"};
72
        String[] columnTypes = new String[]{"string_255","string_255","string_255","string_255",
73
                "string_36","string_255"};
74
        String[] referencedTables = new String[]{null, null, null, null, null, null};
75
        TableCreator.NewNonVersionableInstance(stepList, stepName, tableName,
76
                columnNames, columnTypes, referencedTables);
77

  
78
        //7099 Make CdmAuthority a persistable class - create PermissionGroup_Authority table
79
        stepName = "Create PermissionGroup_Authority table ";
80
        tableName = "PermissionGroup_Authority";
81
        columnNames = new String[]{"Group_id", "authorities_id"};
82
        columnTypes = new String[]{"int","int"};
83
        referencedTables = new String[]{"PermissionGroup", "Authority"};
84
        TableCreator.NewNonVersionableInstance(stepList, stepName, tableName,
85
                columnNames, columnTypes, referencedTables);
86

  
87
        //7099 Make CdmAuthority a persistable class - create UserAccount_Authority table
88
        stepName = "Create UserAccount_Authority table ";
89
        tableName = "UserAccount_Authority";
90
        columnNames = new String[]{"User_id", "authorities_id"};
91
        columnTypes = new String[]{"int","int"};
92
        referencedTables = new String[]{"UserAccount", "Authority"};
93
        TableCreator.NewNonVersionableInstance(stepList, stepName, tableName,
94
                columnNames, columnTypes, referencedTables);
67 95

  
68 96
    }
69 97

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)