These are chat archives for damianh/Cedar

2nd
Nov 2015
Dan Barua
@danbarua
Nov 02 2015 16:10
if (Schema.Schema("public").Table("events").Exists())
{
    Execute.Sql(@"
-- update user created date from event streams
WITH user_streams AS (
 SELECT u.id, s.id_internal
 FROM projections.users AS u
 JOIN public.streams AS s ON s.id_original = 'User-' || u.id::text
),
user_created_events AS (
 SELECT e.*, (e.json_data->>'TimeStamp')::timestamptz as timestamp
 FROM events AS e
 WHERE e.type = 'TTL.Digivoice.Domain.Events.User.UserCreated, TTL.Digivoice.Domain'
)
UPDATE projections.users
 SET  created = 
 (SELECT user_created_events.timestamp
  FROM user_streams
  JOIN user_created_events
  ON user_streams.id_internal = user_created_events.stream_id_internal
  WHERE user_streams.id =  projections.users.id)
");
}
Cheeklily migrating a projection without doing a full rebuild ^
Damian Hickey
@damianh
Nov 02 2015 22:08
oh