SuviTV / app

Repo for Suvi app
0 stars 0 forks source link

:RES: learn mongo, look into mongo AWS stuff #30

Open brennongs opened 6 years ago

brennongs commented 6 years ago

We are going to put friend info into sql and movie information into mongo. I will get started on working on the SQL first.

brennongs commented 6 years ago

Working on add friends functionality. Currently in the DB there is a function get_user_id(email) which returns ID. invoke it like this select * from get_user_id('brennon@suvi.tv'); --> returns 1

brennongs commented 6 years ago
insert into "Relations" (initiator, recipient, current_status)
  values (
    (select * from get_user_id('brennon@suvi.tv')),
    (select * from get_user_id('steve@suvi.tv')),
    'pending'
  );

inserts the row correctly. next step is to switch on current status.