Jay
Jay
Explore posts from servers
PPrisma
Created by Jay on 6/13/2024 in #help-and-questions
prisma migrate dev deleted all my data and when I do another migrate dev again I got shadow error
no its not there
6 replies
PPrisma
Created by Jay on 6/13/2024 in #help-and-questions
prisma migrate dev deleted all my data and when I do another migrate dev again I got shadow error
typescript

Error: P3006

Migration `20240613195319_delete_all` failed to apply cleanly to the shadow database.
Error:
ERROR: function uuid_generate_v4() does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
0: schema_core::state::DevDiagnostic
at schema-engine\core\src\state.rs:276
typescript

Error: P3006

Migration `20240613195319_delete_all` failed to apply cleanly to the shadow database.
Error:
ERROR: function uuid_generate_v4() does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
0: schema_core::state::DevDiagnostic
at schema-engine\core\src\state.rs:276
6 replies
PPrisma
Created by Jay on 6/8/2024 in #help-and-questions
Problems regarding new feature (v5.15.0)
I see I thought I still need schema.prisma file
8 replies
PPrisma
Created by Jay on 6/8/2024 in #help-and-questions
Problems regarding new feature (v5.15.0)
not in schema folder
8 replies
PPrisma
Created by Jay on 6/8/2024 in #help-and-questions
Problems regarding new feature (v5.15.0)
my project structure is like this :
./prisma
/schema
./schema.prisma
./prisma
/schema
./schema.prisma
schema.prisma is in ./prisma folder
8 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
Yes I did but now i got different error {"name":"Error","message":"Error retrieving shop items: \nInvalid prisma.shopItem.count() invocation:\n\n\nThis request could not be understood by the server: {"type":"UnknownJsonError","body":{"code":"P6008","message":"Accelerate was not able to connect to your database. The underlying error is: "}} (The request id was: 88bd196649a27dc1)"}
16 replies
PPrisma
Created by Jay on 5/28/2024 in #help-and-questions
How to ignore custom migtation script without reset all data?
I'm trying to rename the enum
4 replies
PPrisma
Created by Jay on 5/28/2024 in #help-and-questions
How to ignore custom migtation script without reset all data?
its saying migration script was modified after applied
4 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
but I want to use prisma accelreate
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
but with normal connection to db with pgbouncer=true just work
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
im using prisma accelerate
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
I got different error now
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
197 shopItemId: number
198 ): Promise<PromotionItem | null> {
199 // Fetch all ongoing promotion items for the given shop item ID
→ 200 const promotionItems = await this.prisma.promotionItem.findMany(
Can't reach database server at `aws-0-ap-southeast-1.pooler.supabase.com:5432`

Please make sure your database server is running at `aws-0-ap-southeast-1.pooler.supabase.com:5432`. UNKNOWN
197 shopItemId: number
198 ): Promise<PromotionItem | null> {
199 // Fetch all ongoing promotion items for the given shop item ID
→ 200 const promotionItems = await this.prisma.promotionItem.findMany(
Can't reach database server at `aws-0-ap-southeast-1.pooler.supabase.com:5432`

Please make sure your database server is running at `aws-0-ap-southeast-1.pooler.supabase.com:5432`. UNKNOWN
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
I tried. cant reach database supabase prisma accelerate
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
After some time it just work idk why and some time it does not
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
should i use session for this?
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
not session
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
this is the transaction url from supabase
16 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
DATABASE_URL=postgres://postgres.lsxwnndvcppunnpvxcij:@aws-0-ap-southeast-1.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1
DATABASE_URL=postgres://postgres.lsxwnndvcppunnpvxcij:@aws-0-ap-southeast-1.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1
16 replies
PPrisma
Created by Jay on 4/26/2024 in #help-and-questions
Bun App. Cant fix Prisma Generate. Dockerfile?
# syntax = docker/dockerfile:1

# Adjust BUN_VERSION as desired
ARG BUN_VERSION=1.1.4
FROM oven/bun:${BUN_VERSION}-slim as base

LABEL fly_launch_runtime="Bun/Prisma"

# Bun/Prisma app lives here
WORKDIR /app

# Set production environment
ENV NODE_ENV="production"


# Throw-away build stage to reduce size of final image
FROM base as build

# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential openssl pkg-config python-is-python3

# Install node modules
COPY --link bun.lockb package.json ./
RUN bun install

# Generate Prisma Client
COPY --link prisma .
RUN bunx prisma generate

# Copy application code
COPY --link . .

# Generate Prisma Client
RUN bunx prisma generate

# Build application
RUN bun run build

# Remove development dependencies
RUN rm -rf node_modules && \
bun install --ci


# Final stage for app image
FROM base

# Install packages needed for deployment
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y openssl && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Copy built application
COPY --from=build /app /app

# Start the server by default, this can be overwritten at runtime
EXPOSE 3001
CMD [ "bun", "run", "start" ]
# syntax = docker/dockerfile:1

# Adjust BUN_VERSION as desired
ARG BUN_VERSION=1.1.4
FROM oven/bun:${BUN_VERSION}-slim as base

LABEL fly_launch_runtime="Bun/Prisma"

# Bun/Prisma app lives here
WORKDIR /app

# Set production environment
ENV NODE_ENV="production"


# Throw-away build stage to reduce size of final image
FROM base as build

# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential openssl pkg-config python-is-python3

# Install node modules
COPY --link bun.lockb package.json ./
RUN bun install

# Generate Prisma Client
COPY --link prisma .
RUN bunx prisma generate

# Copy application code
COPY --link . .

# Generate Prisma Client
RUN bunx prisma generate

# Build application
RUN bun run build

# Remove development dependencies
RUN rm -rf node_modules && \
bun install --ci


# Final stage for app image
FROM base

# Install packages needed for deployment
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y openssl && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Copy built application
COPY --from=build /app /app

# Start the server by default, this can be overwritten at runtime
EXPOSE 3001
CMD [ "bun", "run", "start" ]
3 replies