gaurav1998
gaurav1998
Explore posts from servers
KPCKevin Powell - Community
Created by gaurav1998 on 7/3/2024 in #front-end
Why does this background image appear as 180px wide?
Codepen: https://codepen.io/Gaurav-Narayan-Varma/pen/zYQggZj I am attempting to a scale an image along both axis' by 2 while settings its width to the screen size, which in this case is 360px in width. I have the following code: HTML: <div id="background"></div> CSS:
body {
margin: 0
}

#background {
background-image: url(https://i.ibb.co/9GQ0wXh/background.png);
width: 50%;
height: 256px;
background-size: cover;
transform: scaleX(2) scaleY(2);
}
body {
margin: 0
}

#background {
background-image: url(https://i.ibb.co/9GQ0wXh/background.png);
width: 50%;
height: 256px;
background-size: cover;
transform: scaleX(2) scaleY(2);
}
The width of 50% should cut the div down to 180px from 360px, while the scale of 2 should bring it back up to 360px. However, as you can see in the codepen the background image does not expand to fit the width of the screen (even though in devtools it will say it has a width of 360px). Any idea what the issue could be here?
3 replies
PPrisma
Created by gaurav1998 on 6/3/2024 in #help-and-questions
Field excluded when running prisma query to supabase
No description
6 replies
PPrisma
Created by gaurav1998 on 5/31/2024 in #help-and-questions
500 (Internal Server Error) from simple query
No description
3 replies
PPrisma
Created by gaurav1998 on 5/29/2024 in #help-and-questions
npx prisma migrate dev --name init from tutorial not working
Once I get to the part in the supabase prisma tutorial where I run the command npx prisma migrate dev --name init the terminal gets stuck at:
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "aws-0-us-west-1.pooler.supabase.com:6543"
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "aws-0-us-west-1.pooler.supabase.com:6543"
Any ideas what the issue is here?
8 replies
DTDrizzle Team
Created by gaurav1998 on 5/29/2024 in #help
How to check migration history?
It would be useful to see which migrations have been applied and which have not
1 replies
DTDrizzle Team
Created by gaurav1998 on 5/28/2024 in #help
Drizzle not migrating (SupaBase) when I run npx drizzle-kit migrate
In the terminal the execution get's stuck infinitely:
➜ dgcl git:(main) ✗ npx drizzle-kit migrate
drizzle-kit: v0.21.2
drizzle-orm: v0.30.10

No config path provided, using default path
Reading config file '/Users/gauravvarma/2024/dgcl/drizzle.config.ts'
Using 'postgres' driver for database querying
[⣟] applying migrations...
➜ dgcl git:(main) ✗ npx drizzle-kit migrate
drizzle-kit: v0.21.2
drizzle-orm: v0.30.10

No config path provided, using default path
Reading config file '/Users/gauravvarma/2024/dgcl/drizzle.config.ts'
Using 'postgres' driver for database querying
[⣟] applying migrations...
I am attempting to add two columns to my current table, and before I run migrate I first generate successfully. Below is the schema with the two added columns (the card columns specifically):
export const servicesTable = pgTable("services_table", {
id: serial("id").primaryKey(),
name: text("name").notNull(),
slug: text("slug").notNull(),
html: text("html").notNull(),
card_title: text("card_title"),
card_description: text("card_description"),
editor_state: text("editor_state").notNull(),
createdAt: timestamp("created_at").notNull().defaultNow(),
updatedAt: timestamp("updated_at")
.notNull()
.$onUpdate(() => new Date()),
});
export const servicesTable = pgTable("services_table", {
id: serial("id").primaryKey(),
name: text("name").notNull(),
slug: text("slug").notNull(),
html: text("html").notNull(),
card_title: text("card_title"),
card_description: text("card_description"),
editor_state: text("editor_state").notNull(),
createdAt: timestamp("created_at").notNull().defaultNow(),
updatedAt: timestamp("updated_at")
.notNull()
.$onUpdate(() => new Date()),
});
Any idea what is happening here?
1 replies
DTDrizzle Team
Created by gaurav1998 on 5/20/2024 in #help
Exploring Type Safety in Drizzle: Does Zod Enhance or Redundantly Overlap?
I'm new to Drizzle and I'm curious: with Drizzle handling type checking, is there still a benefit to using Zod?
2 replies