IDEMPIERE-3952 - review entitytype & data access level - new tables & fix script

This commit is contained in:
Murilo Habermann Torquato 2019-04-15 18:09:17 -03:00
parent 5b1f3d8958
commit 9b34245402
7 changed files with 198 additions and 3 deletions

View File

@ -460,5 +460,5 @@ update ad_toolbarbutton set entitytype = 'D' where ad_toolbarbutton_id in (20004
update AD_SearchDefinition set entitytype = 'D' where ad_searchdefinition_id in (50000,50001);
update pa_documentstatus set entitytype = 'D' where pa_documentstatus_id in (200000,200001,200002,200003,200005,200004);
SELECT register_migration_script('201904101655_IDEMPIERE-3947.sql') FROM dual
SELECT register_migration_script('201904151144_IDEMPIERE-3952.sql') FROM dual
;

View File

@ -0,0 +1,62 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
-- Apr 15, 2019, 5:55:14 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,ReadOnlyLogic,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (213905,0,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200089,'EntityType','@SQL=select get_sysconfig(''DEFAULT_ENTITYTYPE'',''U'',0,0) from dual',40,'N','N','N','N','N',0,'N',18,389,0,0,'Y',TO_DATE('2019-04-15 17:55:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-15 17:55:13','YYYY-MM-DD HH24:MI:SS'),100,1682,'Y','N','@EntityType@=D','D','N','N','N','Y','dd1498af-40e4-435d-99f4-a70a65bbb150','Y',0,'N','N','N','N')
;
-- Apr 15, 2019, 5:55:16 PM BRT
UPDATE AD_Column SET FKConstraintName='EntityType_ADInfoRelated', FKConstraintType='N',Updated=TO_DATE('2019-04-15 17:55:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213905
;
-- Apr 15, 2019, 5:55:16 PM BRT
ALTER TABLE AD_InfoRelated ADD EntityType VARCHAR2(40) DEFAULT NULL
;
-- Apr 15, 2019, 5:55:16 PM BRT
ALTER TABLE AD_InfoRelated ADD CONSTRAINT EntityType_ADInfoRelated FOREIGN KEY (EntityType) REFERENCES ad_entitytype(entitytype) DEFERRABLE INITIALLY DEFERRED
;
-- Apr 15, 2019, 5:55:21 PM BRT
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2019-04-15 17:55:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213905
;
-- Apr 15, 2019, 5:55:36 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206043,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200100,213905,'Y',40,120,'N','N','N','N',0,0,'Y',TO_DATE('2019-04-15 17:55:35','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-15 17:55:35','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7761f8ce-7944-4357-8f2f-4926b244a822','Y',90,2)
;
-- Apr 15, 2019, 5:56:11 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,ReadOnlyLogic,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (213906,0,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200129,'EntityType','@SQL=select get_sysconfig(''DEFAULT_ENTITYTYPE'',''U'',0,0) from dual',40,'N','N','N','N','N',0,'N',18,389,0,0,'Y',TO_DATE('2019-04-15 17:56:11','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-15 17:56:11','YYYY-MM-DD HH24:MI:SS'),100,1682,'Y','N','@EntityType@=D','D','N','N','N','Y','1c4e35cd-bd24-4b3f-b3c7-bc58b2ca7cda','Y',0,'N','N','N','N')
;
-- Apr 15, 2019, 5:56:13 PM BRT
UPDATE AD_Column SET FKConstraintName='EntityType_ADInfoProcess', FKConstraintType='N',Updated=TO_DATE('2019-04-15 17:56:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213906
;
-- Apr 15, 2019, 5:56:13 PM BRT
ALTER TABLE AD_InfoProcess ADD EntityType VARCHAR2(40) DEFAULT NULL
;
-- Apr 15, 2019, 5:56:13 PM BRT
ALTER TABLE AD_InfoProcess ADD CONSTRAINT EntityType_ADInfoProcess FOREIGN KEY (EntityType) REFERENCES ad_entitytype(entitytype) DEFERRABLE INITIALLY DEFERRED
;
-- Apr 15, 2019, 5:56:19 PM BRT
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2019-04-15 17:56:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213906
;
-- Apr 15, 2019, 5:57:13 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206044,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200142,213906,'Y',40,110,'N','N','N','N',0,0,'Y',TO_DATE('2019-04-15 17:57:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-15 17:57:13','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','19881ce2-9ecc-4a44-9259-6729048ef4a8','Y',80,2)
;
SELECT register_migration_script('201904151144_IDEMPIERE-3952.sql') FROM dual
;

View File

@ -0,0 +1,59 @@
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
-- Apr 15, 2019, 5:55:14 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,ReadOnlyLogic,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (213905,0,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200089,'EntityType','@SQL=select get_sysconfig(''DEFAULT_ENTITYTYPE'',''U'',0,0) from dual',40,'N','N','N','N','N',0,'N',18,389,0,0,'Y',TO_TIMESTAMP('2019-04-15 17:55:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-15 17:55:13','YYYY-MM-DD HH24:MI:SS'),100,1682,'Y','N','@EntityType@=D','D','N','N','N','Y','dd1498af-40e4-435d-99f4-a70a65bbb150','Y',0,'N','N','N','N')
;
-- Apr 15, 2019, 5:55:16 PM BRT
UPDATE AD_Column SET FKConstraintName='EntityType_ADInfoRelated', FKConstraintType='N',Updated=TO_TIMESTAMP('2019-04-15 17:55:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213905
;
-- Apr 15, 2019, 5:55:16 PM BRT
ALTER TABLE AD_InfoRelated ADD COLUMN EntityType VARCHAR(40) DEFAULT NULL
;
-- Apr 15, 2019, 5:55:16 PM BRT
ALTER TABLE AD_InfoRelated ADD CONSTRAINT EntityType_ADInfoRelated FOREIGN KEY (EntityType) REFERENCES ad_entitytype(entitytype) DEFERRABLE INITIALLY DEFERRED
;
-- Apr 15, 2019, 5:55:22 PM BRT
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2019-04-15 17:55:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213905
;
-- Apr 15, 2019, 5:55:36 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206043,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200100,213905,'Y',40,120,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2019-04-15 17:55:35','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-15 17:55:35','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7761f8ce-7944-4357-8f2f-4926b244a822','Y',90,2)
;
-- Apr 15, 2019, 5:56:11 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,ReadOnlyLogic,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (213906,0,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200129,'EntityType','@SQL=select get_sysconfig(''DEFAULT_ENTITYTYPE'',''U'',0,0) from dual',40,'N','N','N','N','N',0,'N',18,389,0,0,'Y',TO_TIMESTAMP('2019-04-15 17:56:11','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-15 17:56:11','YYYY-MM-DD HH24:MI:SS'),100,1682,'Y','N','@EntityType@=D','D','N','N','N','Y','1c4e35cd-bd24-4b3f-b3c7-bc58b2ca7cda','Y',0,'N','N','N','N')
;
-- Apr 15, 2019, 5:56:13 PM BRT
UPDATE AD_Column SET FKConstraintName='EntityType_ADInfoProcess', FKConstraintType='N',Updated=TO_TIMESTAMP('2019-04-15 17:56:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213906
;
-- Apr 15, 2019, 5:56:13 PM BRT
ALTER TABLE AD_InfoProcess ADD COLUMN EntityType VARCHAR(40) DEFAULT NULL
;
-- Apr 15, 2019, 5:56:13 PM BRT
ALTER TABLE AD_InfoProcess ADD CONSTRAINT EntityType_ADInfoProcess FOREIGN KEY (EntityType) REFERENCES ad_entitytype(entitytype) DEFERRABLE INITIALLY DEFERRED
;
-- Apr 15, 2019, 5:56:19 PM BRT
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2019-04-15 17:56:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213906
;
-- Apr 15, 2019, 5:57:13 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206044,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200142,213906,'Y',40,110,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2019-04-15 17:57:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-15 17:57:13','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','19881ce2-9ecc-4a44-9259-6729048ef4a8','Y',80,2)
;
SELECT register_migration_script('201904151810_IDEMPIERE-3952.sql') FROM dual
;

View File

@ -154,6 +154,21 @@ public interface I_AD_InfoProcess
*/
public String getDisplayLogic();
/** Column name EntityType */
public static final String COLUMNNAME_EntityType = "EntityType";
/** Set Entity Type.
* Dictionary Entity Type;
Determines ownership and synchronization
*/
public void setEntityType (String EntityType);
/** Get Entity Type.
* Dictionary Entity Type;
Determines ownership and synchronization
*/
public String getEntityType();
/** Column name ImageURL */
public static final String COLUMNNAME_ImageURL = "ImageURL";

View File

@ -124,6 +124,21 @@ public interface I_AD_InfoRelated
*/
public String getDescription();
/** Column name EntityType */
public static final String COLUMNNAME_EntityType = "EntityType";
/** Set Entity Type.
* Dictionary Entity Type;
Determines ownership and synchronization
*/
public void setEntityType (String EntityType);
/** Get Entity Type.
* Dictionary Entity Type;
Determines ownership and synchronization
*/
public String getEntityType();
/** Column name Help */
public static final String COLUMNNAME_Help = "Help";

View File

@ -30,7 +30,7 @@ public class X_AD_InfoProcess extends PO implements I_AD_InfoProcess, I_Persiste
/**
*
*/
private static final long serialVersionUID = 20190106L;
private static final long serialVersionUID = 20190415L;
/** Standard Constructor */
public X_AD_InfoProcess (Properties ctx, int AD_InfoProcess_ID, String trxName)
@ -41,6 +41,8 @@ public class X_AD_InfoProcess extends PO implements I_AD_InfoProcess, I_Persiste
setAD_InfoProcess_ID (0);
setAD_InfoProcess_UU (null);
setAD_Process_ID (0);
setEntityType (null);
// @SQL=select get_sysconfig('DEFAULT_ENTITYTYPE','U',0,0) from dual
setLayoutType (null);
// B
setSeqNo (0);
@ -219,6 +221,26 @@ public class X_AD_InfoProcess extends PO implements I_AD_InfoProcess, I_Persiste
return (String)get_Value(COLUMNNAME_DisplayLogic);
}
/** EntityType AD_Reference_ID=389 */
public static final int ENTITYTYPE_AD_Reference_ID=389;
/** Set Entity Type.
@param EntityType
Dictionary Entity Type; Determines ownership and synchronization
*/
public void setEntityType (String EntityType)
{
set_Value (COLUMNNAME_EntityType, EntityType);
}
/** Get Entity Type.
@return Dictionary Entity Type; Determines ownership and synchronization
*/
public String getEntityType ()
{
return (String)get_Value(COLUMNNAME_EntityType);
}
/** Set Image URL.
@param ImageURL
URL of image

View File

@ -30,7 +30,7 @@ public class X_AD_InfoRelated extends PO implements I_AD_InfoRelated, I_Persiste
/**
*
*/
private static final long serialVersionUID = 20190106L;
private static final long serialVersionUID = 20190415L;
/** Standard Constructor */
public X_AD_InfoRelated (Properties ctx, int AD_InfoRelated_ID, String trxName)
@ -40,6 +40,8 @@ public class X_AD_InfoRelated extends PO implements I_AD_InfoRelated, I_Persiste
{
setAD_InfoRelated_ID (0);
setAD_InfoWindow_ID (0);
setEntityType (null);
// @SQL=select get_sysconfig('DEFAULT_ENTITYTYPE','U',0,0) from dual
setName (null);
setRelatedColumn_ID (0);
// 0
@ -156,6 +158,26 @@ public class X_AD_InfoRelated extends PO implements I_AD_InfoRelated, I_Persiste
return (String)get_Value(COLUMNNAME_Description);
}
/** EntityType AD_Reference_ID=389 */
public static final int ENTITYTYPE_AD_Reference_ID=389;
/** Set Entity Type.
@param EntityType
Dictionary Entity Type; Determines ownership and synchronization
*/
public void setEntityType (String EntityType)
{
set_Value (COLUMNNAME_EntityType, EntityType);
}
/** Get Entity Type.
@return Dictionary Entity Type; Determines ownership and synchronization
*/
public String getEntityType ()
{
return (String)get_Value(COLUMNNAME_EntityType);
}
/** Set Comment/Help.
@param Help
Comment or Hint