Changes between Version 5 and Version 6 of DmlScript


Ignore:
Timestamp:
05/05/26 22:08:43 (3 weeks ago)
Author:
231141
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DmlScript

    v5 v6  
    884884
    885885
    886 
    887 
     886INSERT INTO NotificationPreference
     887(is_enabled, channel, user_id, notification_type_id)
     888SELECT
     889    (random() > 0.25)                     AS is_enabled,
     890    channel                               AS channel,
     891    u                                     AS user_id,
     892    nt                                    AS notification_type_id
     893FROM
     894    generate_series((SELECT min(id) FROM useraccount), (SELECT max(id) FROM useraccount)) AS u,
     895    generate_series(1, 20)                AS nt,
     896    (VALUES ('EMAIL'), ('SMS'), ('PUSH')) AS c(channel)
     897WHERE u IN (SELECT id FROM useraccount)  -- only real user IDs
     898LIMIT 7000000; 
     899
     900--++++++++++ compalaints +++++++++++
    888901
    889902DO $$
     
    984997
    985998
    986 --++++++++++ compalaints +++++++++++
    987999CREATE TEMP TABLE complaints_ordered AS
    9881000SELECT