diff --git a/migration/i2.0z/oracle/201407151334_IDEMPIERE-1998.sql b/migration/i2.0z/oracle/201407151334_IDEMPIERE-1998.sql new file mode 100644 index 0000000000..dbc4959e71 --- /dev/null +++ b/migration/i2.0z/oracle/201407151334_IDEMPIERE-1998.sql @@ -0,0 +1,27 @@ +-- IDEMPIERE-1998 for backward compatibility insert the creator as scheduler recipient +insert +into ad_schedulerrecipient + ( + ad_schedulerrecipient_id, + ad_client_id, + ad_org_id, + isactive, + created, + createdby, + updated, + updatedby, + ad_scheduler_id, + ad_user_id, + ad_role_id, + ad_schedulerrecipient_uu + ) +select nextidfunc(921,'N'), s.ad_client_id, s.ad_org_id, s.isactive, sysdate, 100, sysdate, 100, s.ad_scheduler_id, s.createdby, null, generate_uuid() +from ad_scheduler s +where not exists ( select 1 + from ad_schedulerrecipient sr + where s.ad_scheduler_id=sr.ad_scheduler_id) +; + +SELECT register_migration_script('201407151334_IDEMPIERE-1998.sql') FROM dual +; + diff --git a/migration/i2.0z/postgresql/201407151334_IDEMPIERE-1998.sql b/migration/i2.0z/postgresql/201407151334_IDEMPIERE-1998.sql new file mode 100644 index 0000000000..85c51bb958 --- /dev/null +++ b/migration/i2.0z/postgresql/201407151334_IDEMPIERE-1998.sql @@ -0,0 +1,27 @@ +-- IDEMPIERE-1998 for backward compatibility insert the creator as scheduler recipient +insert +into ad_schedulerrecipient + ( + ad_schedulerrecipient_id, + ad_client_id, + ad_org_id, + isactive, + created, + createdby, + updated, + updatedby, + ad_scheduler_id, + ad_user_id, + ad_role_id, + ad_schedulerrecipient_uu + ) +select nextidfunc(921,'N'), s.ad_client_id, s.ad_org_id, s.isactive, statement_timestamp(), 100, statement_timestamp(), 100, s.ad_scheduler_id, s.createdby, null, generate_uuid() +from ad_scheduler s +where not exists ( select 1 + from ad_schedulerrecipient sr + where s.ad_scheduler_id=sr.ad_scheduler_id) +; + +SELECT register_migration_script('201407151334_IDEMPIERE-1998.sql') FROM dual +; +