Git Product home page Git Product logo

Comments (4)

maxcell avatar maxcell commented on July 17, 2024

To create our database steps:

  • Signing up with Supabase through GitHub
  • Clicking new project and adding it to our organization
    CleanShot 2022-03-31 at 11 54 36
  • Naming it whatever they want, a password that they should keep since it won't be shown ever again, and them selecting a region that works best for them which is close to them
    CleanShot 2022-03-31 at 11 55 47
  • It will take some time for the project to be fully scaffold so they need to wait before the next step.
  • Going over to their SQL Editor
    CleanShot 2022-03-31 at 11 57 16
  • Selecting "New Query"
    CleanShot 2022-03-31 at 11 59 29
  • Copying our SQL queries and clicking the "RUN" button:
-- Create public profile table that references our auth.user
create table public.profiles (
  id uuid references auth.users not null,
  created_at timestamptz not null default current_timestamp,
  email varchar not null,

  primary key (id)
);

-- Create public notes table
create table public.notes (
  id uuid not null default uuid_generate_v4(),
  title text,
  body text,
  created_at timestamp default current_timestamp,
  updated_at timestamp default current_timestamp,
  profile_id uuid references public.profiles not null,

  primary key (id)
);

-- inserts a row into public.users
create or replace function public.handle_new_user() 
returns trigger 
language plpgsql 
security definer set search_path = public
as $$
begin
  insert into public.profiles (id, email)
  values (new.id, new.email);
  return new;
end;
$$;

-- trigger the function every time a user is created
drop trigger if exists on_auth_user_created on auth.user;
create trigger on_auth_user_created
  after insert on auth.users
  for each row execute procedure public.handle_new_user();

CleanShot 2022-03-31 at 12 04 31

  • Lastly going over to Authentication and Settings, and switching off "Enable email confirmations" for our project.
    CleanShot 2022-03-31 at 12 07 47

from kpop-stack.

kentcdodds avatar kentcdodds commented on July 17, 2024

Was just about to open this same issue :) Would be good to add this to the top somewhere:

npx create-remix --template netlify-templates/kpop-stack

And you can use this for the header image in the README and the social image in this repo's settings :)

kpop-stack

Feel free to change it however you like. Just a suggestion :)

from kpop-stack.

kentcdodds avatar kentcdodds commented on July 17, 2024

Also, I love the choice for music sub-genre 👏

from kpop-stack.

kentcdodds avatar kentcdodds commented on July 17, 2024

lol, just noticed #33 😅

from kpop-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.