| 886 | | |
| 887 | | |
| | 886 | INSERT INTO NotificationPreference |
| | 887 | (is_enabled, channel, user_id, notification_type_id) |
| | 888 | SELECT |
| | 889 | (random() > 0.25) AS is_enabled, |
| | 890 | channel AS channel, |
| | 891 | u AS user_id, |
| | 892 | nt AS notification_type_id |
| | 893 | FROM |
| | 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) |
| | 897 | WHERE u IN (SELECT id FROM useraccount) -- only real user IDs |
| | 898 | LIMIT 7000000; |
| | 899 | |
| | 900 | --++++++++++ compalaints +++++++++++ |