Skip to content

Instantly share code, notes, and snippets.

@alexandremcosta
Last active July 29, 2022 20:41
Show Gist options
  • Save alexandremcosta/48c85b6bc433859ced1196be20e97a6c to your computer and use it in GitHub Desktop.
Save alexandremcosta/48c85b6bc433859ced1196be20e97a6c to your computer and use it in GitHub Desktop.

Design Document

How to read this?

  • Merged
  • Review Required

For additional information, check this presentation.

Summary of Pull Requests

Phase 1: Naboo.Businesses
  • Part 1: Remove unused user code
  • Part 2: Change business_channel.json to get data from %Channel{}
  • Part 3: Business.paginate_business_channels gets data from %Channel{}
  • Part 4: Read Business Channels from Channel schema instead of User
  • Part 5: AssignBusinessChannel assigns a %Channel{} struct.
  • Part 6: Remove %User{} clause from business_channel.json
  • Part 7: BrandingPreset belongs to Channel
  • Part 8: Move any_channel_function to Naboo.Channels
  • Part 9: Index %Channel{} in elasticsearch
  • Part 10: GraphWeb gets channel from Businesses instead of Accounts
Phase 2: Naboo.Media.Video
  • Part 11: Point Video.creator to Channel
  • Part 12: ChannelView receives %Channel not %User{}
  • Part 13: VideoView.creator renders ChannelView instead of UserView
  • Part 14: Replace paginate_user_videos with paginate_channel_videos
  • Part 15: FeedQuery change user to channel
  • Part 16: paginate_created_videos receives channel
  • Part 17: Remove unused logic that treats Video.creator_id as user
  • Part 18: Review TODOs to be done after refactor Video.creator to channel
  • Part 19: Find other places that queries video by creator_id and change to channel
  • Part 20: video_fixture() creates video with channel_fixture() as creator
Phase 3: Other associations
Phase 4: Prepare to copy DB tables
  • Part 31: Duplicate Channel on both tables
  • Part 32: extract UsernameGenerator logic to work with channels
  • Part 33: Media.create_video/2 receives Channel
  • Part 34: Review channel.json username URLs to work with channels
  • Part 35: Review TODOs to be done before copy users to channels table
  • Part 36: /admin/channels/
  • Part 37: ChannelsList uses Channel instead of User
  • Part 38: Script to copy old channels from users to channels
  • Part 39: Write function to verify that copy was successful
Phase 5: Copy DB tables
  • Part 40: Fix tests when Channel schema points to channels
  • YOU ARE HERE Review all TODO @alex to be done before copying tables
    Part 42: Run script to copy old channels from users to channels
    Part 43: FLIP THE SWITCH!!! Point Channel schema to channels table
    Part XX: Remove channel Profile association
    Part XX: Review all TODO @alex to be done stop creating users copying tables
    Part XX: Stop creating users when creating channels and remove ChannelInsertion
    Part XX: Remove all TODOs
EXTRA: Rachel Collaboration
  • Create search index for channel link
  • Drop column: Video.geo link
  • Remove unused logic (app-phase user interactions) from Naboo link
  • Tie Cohorts to Channel link
  • Fix bad preload error link
  • Drop and remove reference for firework creator portal link
  • Remove logic on Chats, Blocks and Participations link
  • Repurpose followship to be channel_follow link
  • Channels Have reposts use link
  • Remove old reposting logic link
  • Adds channel_id column to video_automations link
  • Have video automation use channels link
  • Repurpose soundtracks link
  • Fix bad association on channel, in admin functions link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment