Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Fix: Added github id with github user details #618

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/adapters/supabase/helpers/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export type UserProfileAdditions = {
};
const getDbDataFromUserProfile = (userProfile: UserProfile, additions?: UserProfileAdditions) => {
return {
user_id: userProfile.id,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to also add this field to upsertUser

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, will be implemented in next commit.

user_login: userProfile.login,
user_type: userProfile.type,
user_name: userProfile.name,
Expand Down
3 changes: 3 additions & 0 deletions src/adapters/supabase/types/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export interface Database {
user_login: string;
user_name: string;
user_type: string | null;
user_id: number;
baibhavKumar1 marked this conversation as resolved.
Show resolved Hide resolved
wallet_address: string | null;
};
Insert: {
Expand All @@ -167,6 +168,7 @@ export interface Database {
user_login: string;
user_name: string;
user_type?: string | null;
user_id: number;
wallet_address?: string | null;
};
Update: {
Expand All @@ -189,6 +191,7 @@ export interface Database {
user_login?: string;
user_name?: string;
user_type?: string | null;
user_id: number;
wallet_address?: string | null;
};
Relationships: [];
Expand Down
1 change: 1 addition & 0 deletions supabase/migrations/20230111145014_initial_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CREATE TYPE issue_status AS ENUM (
);

CREATE TABLE users (
user_id bigint NOT NULL,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a new migration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear about this. Please describe.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrations are only run once, so when you want to make a change to the database you need to make a new migration that will alter the database.

user_login character varying(255) NOT NULL PRIMARY KEY,
user_type character varying(255),
user_name character varying(255) NOT NULL,
Expand Down