Skip to content

Commit 1e0fa6a

Browse files
authored
Merge pull request #119 from Friedrich482/features
Profile page: update username, email, link google account and additional stats
2 parents 36971e8 + c4d63bc commit 1e0fa6a

121 files changed

Lines changed: 8140 additions & 892 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ALTER TABLE "pending_registrations" RENAME COLUMN "name" TO "username";--> statement-breakpoint
2+
ALTER TABLE "users" RENAME COLUMN "name" TO "username";--> statement-breakpoint
3+
ALTER TABLE "pending_registrations" DROP CONSTRAINT "pending_registrations_name_unique";--> statement-breakpoint
4+
ALTER TABLE "users" DROP CONSTRAINT "users_name_unique";--> statement-breakpoint
5+
ALTER TABLE "pending_registrations" ADD CONSTRAINT "pending_registrations_username_unique" UNIQUE("username");--> statement-breakpoint
6+
ALTER TABLE "users" ADD CONSTRAINT "users_username_unique" UNIQUE("username");
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ALTER TABLE "pending_registrations" RENAME TO "email_verifications";--> statement-breakpoint
2+
ALTER TABLE "email_verifications" DROP CONSTRAINT "pending_registrations_username_unique";--> statement-breakpoint
3+
ALTER TABLE "email_verifications" DROP CONSTRAINT "pending_registrations_email_unique";--> statement-breakpoint
4+
ALTER TABLE "email_verifications" ADD CONSTRAINT "email_verifications_username_unique" UNIQUE("username");--> statement-breakpoint
5+
ALTER TABLE "email_verifications" ADD CONSTRAINT "email_verifications_email_unique" UNIQUE("email");
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ALTER TABLE "email_verifications" DROP CONSTRAINT "email_verifications_username_unique";--> statement-breakpoint
2+
ALTER TABLE "email_verifications" ADD COLUMN "verified_at" timestamp DEFAULT NULL;--> statement-breakpoint
3+
ALTER TABLE "email_verifications" DROP COLUMN "username";--> statement-breakpoint
4+
ALTER TABLE "email_verifications" DROP COLUMN "hashed_password";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE "users" ALTER COLUMN "auth_method" DROP DEFAULT;--> statement-breakpoint
2+
ALTER TABLE "users" ALTER COLUMN "auth_method" SET NOT NULL;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ALTER TABLE "users"
2+
ALTER COLUMN "profile_picture"
3+
DROP NOT NULL;
4+
5+
UPDATE "public"."users"
6+
SET
7+
profile_picture = NULL
8+
WHERE
9+
auth_method = 'email';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CREATE TYPE "public"."auth_method" AS ENUM ('email', 'google', 'both');
2+
3+
--> statement-breakpoint
4+
ALTER TABLE "users"
5+
ALTER COLUMN "auth_method" TYPE "public"."auth_method" USING auth_method::"public"."auth_method";

0 commit comments

Comments
 (0)