From 111b242b7ae86bcdb6df72044a1cbe209243771f Mon Sep 17 00:00:00 2001 From: Kunal Singh Date: Tue, 28 May 2024 19:25:39 +0530 Subject: [PATCH] fix: minor --- drizzle/0004_sour_dazzler.sql | 1 + drizzle/meta/0004_snapshot.json | 225 ++++++++++++++++++++++++++++++++ drizzle/meta/_journal.json | 7 + src/components/LinkBox.tsx | 3 +- src/components/UserProfile.tsx | 4 +- src/server-function.ts | 2 - 6 files changed, 238 insertions(+), 4 deletions(-) create mode 100644 drizzle/0004_sour_dazzler.sql create mode 100644 drizzle/meta/0004_snapshot.json diff --git a/drizzle/0004_sour_dazzler.sql b/drizzle/0004_sour_dazzler.sql new file mode 100644 index 0000000..525ba7f --- /dev/null +++ b/drizzle/0004_sour_dazzler.sql @@ -0,0 +1 @@ +ALTER TABLE "links" ALTER COLUMN "user_name" DROP DEFAULT; \ No newline at end of file diff --git a/drizzle/meta/0004_snapshot.json b/drizzle/meta/0004_snapshot.json new file mode 100644 index 0000000..b1065a4 --- /dev/null +++ b/drizzle/meta/0004_snapshot.json @@ -0,0 +1,225 @@ +{ + "id": "3c47963d-4dee-4d96-9ba2-0d56e589d5d3", + "prevId": "a7517c57-dfc2-4ebd-92f0-40e145372409", + "version": "6", + "dialect": "postgresql", + "tables": { + "public.links": { + "name": "links", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "host": { + "name": "host", + "type": "varchar(325)", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_name": { + "name": "user_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "votes": { + "name": "votes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "links_user_id_users_id_fk": { + "name": "links_user_id_users_id_fk", + "tableFrom": "links", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.user_upvote_link": { + "name": "user_upvote_link", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "link_id": { + "name": "link_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "user_upvote_link_user_id_users_id_fk": { + "name": "user_upvote_link_user_id_users_id_fk", + "tableFrom": "user_upvote_link", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "user_upvote_link_link_id_links_id_fk": { + "name": "user_upvote_link_link_id_links_id_fk", + "tableFrom": "user_upvote_link", + "tableTo": "links", + "columnsFrom": [ + "link_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "frist_name": { + "name": "frist_name", + "type": "varchar(256)", + "primaryKey": false, + "notNull": true + }, + "last_name": { + "name": "last_name", + "type": "varchar(256)", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "varchar(256)", + "primaryKey": false, + "notNull": true + }, + "image": { + "name": "image", + "type": "varchar(256)", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "email_index": { + "name": "email_index", + "columns": [ + "email" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": { + "public.categories": { + "name": "categories", + "schema": "public", + "values": [ + "manufacturing", + "research" + ] + } + }, + "schemas": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 96e29c9..6ffd95d 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -29,6 +29,13 @@ "when": 1716894631934, "tag": "0003_massive_hydra", "breakpoints": true + }, + { + "idx": 4, + "version": "6", + "when": 1716897330232, + "tag": "0004_sour_dazzler", + "breakpoints": true } ] } \ No newline at end of file diff --git a/src/components/LinkBox.tsx b/src/components/LinkBox.tsx index eaf9d07..3a7fe34 100644 --- a/src/components/LinkBox.tsx +++ b/src/components/LinkBox.tsx @@ -58,7 +58,8 @@ export default function LinkBox({